Skip to content

Commit

Permalink
style: Fix method chaining formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Dec 9, 2024
1 parent c4f35c1 commit a8f5112
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/state/chat-slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,15 @@ 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");
causeMessage.success = !ipythonObs.message
.toLowerCase()
.includes("error");
} else if (observationID === "write") {
// For write operations, we consider them successful if there's no error message
const writeObs = observation.payload as WriteObservation;
causeMessage.success = !writeObs.message.toLowerCase().includes("error");
causeMessage.success = !writeObs.message
.toLowerCase()
.includes("error");
} else if (observationID === "read") {
// For read operations, we consider them successful if there's no error message
const readObs = observation.payload as ReadObservation;
Expand Down

0 comments on commit a8f5112

Please sign in to comment.