chore: chore: Fix types in tests 12/N.

This commit is contained in:
cpojer
2026-02-17 11:17:45 +09:00
parent e02feaff83
commit 262b7a157a
7 changed files with 107 additions and 90 deletions

View File

@@ -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>;