diff --git a/core/core.ts b/core/core.ts index fbc0fd0c0..f40de4642 100644 --- a/core/core.ts +++ b/core/core.ts @@ -687,8 +687,8 @@ export class Core { } // Define a callback for streaming output updates - const onPartialOutput = (params: { - toolCallId: string, + const onPartialOutput = (params: { + toolCallId: string, contextItems: any[] }) => { this.messenger.send("toolCallPartialOutput" as any, params); @@ -726,7 +726,7 @@ export class Core { const { markProcessAsBackgrounded } = await import("./tools/implementations/processState"); markProcessAsBackgrounded(toolCallId); }); - + on("process/isBackgrounded", async ({ data: { toolCallId }, messageId }) => { const { isProcessBackgrounded } = await import("./tools/implementations/processState"); const isBackgrounded = isProcessBackgrounded(toolCallId); @@ -735,13 +735,6 @@ export class Core { 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 93efc8c90..47cd8ab3f 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -44,10 +44,6 @@ export type ToCoreFromIdeOrWebviewProtocol = { // Special ping: [string, string]; abort: [undefined, void]; - toolCallPartialOutput: [ - { toolCallId: string; contextItems: any[] }, - void, - ]; // History "history/list": [ListHistoryOptions, SessionMetadata[]]; diff --git a/core/protocol/coreWebview.ts b/core/protocol/coreWebview.ts index 5f76ac777..292682f8a 100644 --- a/core/protocol/coreWebview.ts +++ b/core/protocol/coreWebview.ts @@ -7,9 +7,5 @@ export type ToCoreFromWebviewProtocol = ToCoreFromIdeOrWebviewProtocol & { { id: string | null; profileId?: string | null }, void, ]; - toolCallPartialOutput: [ - { toolCallId: string; contextItems: any[] }, - void, - ]; }; export type ToWebviewFromCoreProtocol = ToWebviewFromIdeOrCoreProtocol; diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index 2dd5186f0..16f039726 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -8,7 +8,6 @@ import { // extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = [ - "toolCallPartialOutput", "ping", "abort", "history/list", diff --git a/core/tools/implementations/runTerminalCommand.ts b/core/tools/implementations/runTerminalCommand.ts index 533e16b0c..2d24cd715 100644 --- a/core/tools/implementations/runTerminalCommand.ts +++ b/core/tools/implementations/runTerminalCommand.ts @@ -109,7 +109,7 @@ export const runTerminalCommandImpl: ToolImpl = async (args, extras) => { removeBackgroundedProcess(toolCallId); return; } - + if (!waitForCompletion) { // Already resolved, just update the UI with final output if (extras.onPartialOutput) { diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 0420606b2..66d361beb 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -277,7 +277,6 @@ export function Chat() { useWebviewListener( "toolCallPartialOutput", async (data) => { - if (data && typeof data === "object" && "toolCallId" in data && "contextItems" in data) { console.log("toolCallPartialOutput", data); // Update tool call output in Redux store dispatch( @@ -286,7 +285,6 @@ export function Chat() { contextItems: data.contextItems, }), ); - } }, [dispatch], );