π OpenHands: AI-Driven Development
feat(frontend): display command in observation block in ui (#11884)
Hiep Lecd9a3b02cfa1
diff --git a/frontend/src/components/v1/chat/event-content-helpers/get-observation-content.ts b/frontend/src/components/v1/chat/event-content-helpers/get-observation-content.tsindex 35d01b0655..da2558af42 100644--- a/frontend/src/components/v1/chat/event-content-helpers/get-observation-content.ts+++ b/frontend/src/components/v1/chat/event-content-helpers/get-observation-content.ts@@ -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