From 97ba89eae46709498ee67aa1cce9b62ce3839a26 Mon Sep 17 00:00:00 2001 From: chezsmithy Date: Tue, 15 Apr 2025 14:42:04 -0700 Subject: [PATCH] Fixes for missing handler to enable streaming for terminal output. --- core/core.ts | 8 ++++++++ core/protocol/core.ts | 4 ++++ 2 files changed, 12 insertions(+) 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[]];