mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
feat(frontend): display command in observation block in ui (#11884)
This commit is contained in:
parent
14695a8f0e
commit
cd9a3b02cf
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user