chore: Fix types that were broken due to reverts.

This commit is contained in:
cpojer
2026-02-17 10:53:58 +09:00
parent 01ea808876
commit b3d9ecf4e4
3 changed files with 7 additions and 13 deletions

View File

@@ -240,7 +240,6 @@ function createMockRuntime(): PluginRuntime {
},
discord: {} as PluginRuntime["channel"]["discord"],
activity: {} as PluginRuntime["channel"]["activity"],
linq: {} as PluginRuntime["channel"]["linq"],
line: {} as PluginRuntime["channel"]["line"],
slack: {} as PluginRuntime["channel"]["slack"],
telegram: {} as PluginRuntime["channel"]["telegram"],

View File

@@ -441,7 +441,7 @@ type ConnectResponse = {
type: "res";
id: string;
ok: boolean;
payload?: unknown;
payload?: Record<string, unknown>;
error?: { message?: string };
};
@@ -573,7 +573,7 @@ export async function connectOk(ws: WebSocket, opts?: Parameters<typeof connectR
return res.payload as { type: "hello-ok" };
}
export async function rpcReq<T = unknown>(
export async function rpcReq<T extends Record<string, unknown>>(
ws: WebSocket,
method: string,
params?: unknown,
@@ -586,7 +586,7 @@ export async function rpcReq<T = unknown>(
type: "res";
id: string;
ok: boolean;
payload?: T;
payload?: T | null | undefined;
error?: { message?: string; code?: string };
}>(
ws,

View File

@@ -1,17 +1,12 @@
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 EventHandlerContext = {
chatLog: {
startTool: (...args: unknown[]) => void;
updateToolResult: (...args: unknown[]) => void;
addSystem: (...args: unknown[]) => void;
updateAssistant: (...args: unknown[]) => void;
finalizeAssistant: (...args: unknown[]) => void;
dropAssistant: (...args: unknown[]) => void;
};
tui: { requestRender: (...args: unknown[]) => void };
chatLog: ChatLog;
tui: TUI;
state: TuiStateAccess;
setActivityStatus: (text: string) => void;
refreshSessionInfo?: () => Promise<void>;