mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
chore: Fix types that were broken due to reverts.
This commit is contained in:
@@ -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"],
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user