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 da0b7ee commit c4f35c1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions frontend/src/state/chat-slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +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");

Check failure on line 151 in frontend/src/state/chat-slice.ts

View workflow job for this annotation

GitHub Actions / Lint frontend

Replace `.toLowerCase()` with `โŽยทยทยทยทยทยทยทยทยทยท.toLowerCase()โŽยทยทยทยทยทยทยทยทยทยท`
} 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");

Check failure on line 155 in frontend/src/state/chat-slice.ts

View workflow job for this annotation

GitHub Actions / Lint frontend

Replace `.toLowerCase()` with `โŽยทยทยทยทยทยทยทยทยทยท.toLowerCase()โŽยทยทยทยทยทยทยทยทยทยท`
} else if (observationID === "read") {
// For read operations, we consider them successful if there's no error message
const readObs = observation.payload as ReadObservation;
causeMessage.success = !readObs.message
.toLowerCase()
.includes("error");
causeMessage.success = !readObs.message.toLowerCase().includes("error");
}

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

0 comments on commit c4f35c1

Please sign in to comment.