mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 09:11:22 +00:00
chore: chore: Fix types in tests 12/N.
This commit is contained in:
@@ -1,12 +1,27 @@
|
||||
import { TUI } from "@mariozechner/pi-tui";
|
||||
import { ChatLog } from "./components/chat-log.js";
|
||||
import { asString, extractTextFromMessage, isCommandMessage } from "./tui-formatters.js";
|
||||
import { TuiStreamAssembler } from "./tui-stream-assembler.js";
|
||||
import type { AgentEvent, ChatEvent, TuiStateAccess } from "./tui-types.js";
|
||||
|
||||
type EventHandlerChatLog = {
|
||||
startTool: (toolCallId: string, toolName: string, args: unknown) => void;
|
||||
updateToolResult: (
|
||||
toolCallId: string,
|
||||
result: unknown,
|
||||
options?: { partial?: boolean; isError?: boolean },
|
||||
) => void;
|
||||
addSystem: (text: string) => void;
|
||||
updateAssistant: (text: string, runId: string) => void;
|
||||
finalizeAssistant: (text: string, runId: string) => void;
|
||||
dropAssistant: (runId: string) => void;
|
||||
};
|
||||
|
||||
type EventHandlerTui = {
|
||||
requestRender: () => void;
|
||||
};
|
||||
|
||||
type EventHandlerContext = {
|
||||
chatLog: ChatLog;
|
||||
tui: TUI;
|
||||
chatLog: EventHandlerChatLog;
|
||||
tui: EventHandlerTui;
|
||||
state: TuiStateAccess;
|
||||
setActivityStatus: (text: string) => void;
|
||||
refreshSessionInfo?: () => Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user