Skip to content

Commit

Permalink
fix: Add missing imports and fix type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Dec 9, 2024
1 parent 9c210eb commit f534cd6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/src/state/chat-slice.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import { createSlice, PayloadAction } from "@reduxjs/toolkit";

import { ActionSecurityRisk } from "#/state/security-analyzer-slice";
import { OpenHandsObservation } from "#/types/core/observations";
import {
OpenHandsObservation,
CommandObservation,
IPythonObservation,
} from "#/types/core/observations";
import { OpenHandsAction } from "#/types/core/actions";
import { OpenHandsEventType } from "#/types/core/base";

type SliceState = { messages: Message[] };

const MAX_CONTENT_LENGTH = 1000;

const HANDLED_ACTIONS = ["run", "run_ipython", "write", "read"];
const HANDLED_ACTIONS: OpenHandsEventType[] = ["run", "run_ipython", "write", "read"];

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

View workflow job for this annotation

GitHub Actions / Lint frontend

Replace `"run",·"run_ipython",·"write",·"read"` with `⏎··"run",⏎··"run_ipython",⏎··"write",⏎··"read",⏎`

function getRiskText(risk: ActionSecurityRisk) {
switch (risk) {
Expand Down

0 comments on commit f534cd6

Please sign in to comment.