feat(frontend): display command in observation block in ui (#11884)

This commit is contained in:
Hiep Le 2025-12-03 19:55:55 +07:00 committed by GitHub
parent 14695a8f0e
commit cd9a3b02cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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