diff --git a/core/core.ts b/core/core.ts index 0d66adff2..fbc0fd0c0 100644 --- a/core/core.ts +++ b/core/core.ts @@ -734,6 +734,14 @@ export class Core { this.send("process/isBackgroundedResponse", { isBackgrounded }, messageId); return true; // Return true to indicate the message was handled successfully }); + + // Handle partial output updates from tool calls + on("toolCallPartialOutput", ({ data }) => { + // This handler simply forwards the message to the webview + // The actual data processing happens in the Chat component's useWebviewListener + this.send("toolCallPartialOutput", data); + return; + }); } private async isItemTooBig(item: ContextItemWithId) { diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 47cd8ab3f..93efc8c90 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -44,6 +44,10 @@ export type ToCoreFromIdeOrWebviewProtocol = { // Special ping: [string, string]; abort: [undefined, void]; + toolCallPartialOutput: [ + { toolCallId: string; contextItems: any[] }, + void, + ]; // History "history/list": [ListHistoryOptions, SessionMetadata[]];