From f534cd674bb7dfc709ba3c34015f776f04badc39 Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 9 Dec 2024 21:57:12 +0000 Subject: [PATCH] fix: Add missing imports and fix type checking --- frontend/src/state/chat-slice.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/state/chat-slice.ts b/frontend/src/state/chat-slice.ts index fa8aefd39d02..fc3da4e77099 100644 --- a/frontend/src/state/chat-slice.ts +++ b/frontend/src/state/chat-slice.ts @@ -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"]; function getRiskText(risk: ActionSecurityRisk) { switch (risk) {