π OpenHands: AI-Driven Development
fix(frontend): displaying observation result statuses (#11559)
Hiep Le0e7fefca7e66
diff --git a/frontend/src/components/v1/chat/event-content-helpers/get-observation-result.ts b/frontend/src/components/v1/chat/event-content-helpers/get-observation-result.tsindex 032e8823de..e5a52bfe95 100644--- a/frontend/src/components/v1/chat/event-content-helpers/get-observation-result.ts+++ b/frontend/src/components/v1/chat/event-content-helpers/get-observation-result.ts@@ -11,9 +11,10 @@ export const getObservationResult = (switch (observationType) {case "ExecuteBashObservation": {const exitCode = observation.exit_code;+ const { metadata } = observation;- if (exitCode === -1) return "timeout"; // Command timed out- if (exitCode === 0) return "success"; // Command executed successfully+ if (exitCode === -1 || metadata.exit_code === -1) return "timeout"; // Command timed out+ if (exitCode === 0 || metadata.exit_code === 0) return "success"; // Command executed successfullyreturn "error"; // Command failed}case "FileEditorObservation":