mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
feat(frontend): display command in observation block in ui (#11884)
This commit is contained in:
@@ -71,7 +71,18 @@ const getTerminalObservationContent = (
|
||||
content = `${content.slice(0, MAX_CONTENT_LENGTH)}...`;
|
||||
}
|
||||
|
||||
return `Output:\n\`\`\`sh\n${content.trim() || i18n.t("OBSERVATION$COMMAND_NO_OUTPUT")}\n\`\`\``;
|
||||
// Build the output string
|
||||
let output = "";
|
||||
|
||||
// Display the command if available
|
||||
if (observation.command) {
|
||||
output += `Command: \`${observation.command}\`\n\n`;
|
||||
}
|
||||
|
||||
// Display the output
|
||||
output += `Output:\n\`\`\`sh\n${content.trim() || i18n.t("OBSERVATION$COMMAND_NO_OUTPUT")}\n\`\`\``;
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
// Tool Observations
|
||||
|
||||
Reference in New Issue
Block a user