Skip to content

Commit

Permalink
Fix pr #5644: Fix issue #5637: [Bug]: Incorrectly interpreting a Pyth…
Browse files Browse the repository at this point in the history
…on error as a success message
  • Loading branch information
openhands-agent committed Dec 17, 2024
1 parent 087d34c commit 39ce6cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/state/chat-slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,8 @@ export const chatSlice = createSlice({
} else if (observationID === "run_ipython") {
// For IPython, we consider it successful if there's no error message
const ipythonObs = observation.payload as IPythonObservation;
causeMessage.success = !ipythonObs.message
.toLowerCase()
.includes("error");
// Check for error in the message field which contains error information
causeMessage.success = !ipythonObs.message;
}

if (observationID === "run" || observationID === "run_ipython") {
Expand Down

0 comments on commit 39ce6cd

Please sign in to comment.