mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix(frontend): displaying observation result statuses (#11559)
This commit is contained in:
parent
4020448d64
commit
0e7fefca7e
@ -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 successfully
|
||||
return "error"; // Command failed
|
||||
}
|
||||
case "FileEditorObservation":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user