Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Fix #5637: Check for errors in IPython content instead of message (#5895)

Engel Nyste71808980254
diff --git a/frontend/src/state/chat-slice.ts b/frontend/src/state/chat-slice.ts
index 6891f629e5..aefcaf6972 100644
--- a/frontend/src/state/chat-slice.ts
+++ b/frontend/src/state/chat-slice.ts
@@ -148,9 +148,9 @@ 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
+ causeMessage.success = !ipythonObs.content
.toLowerCase()
- .includes("error");
+ .includes("error:");
}
if (observationID === "run" || observationID === "run_ipython") {