From 413be993d8fb48948d96e154a01e571eab1daa3b Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Tue, 29 Apr 2025 00:25:16 -0700 Subject: [PATCH] interruptions work --- .../workbench/contrib/void/browser/chatThreadService.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/chatThreadService.ts b/src/vs/workbench/contrib/void/browser/chatThreadService.ts index 7a9a38c9..a2d5dbd7 100644 --- a/src/vs/workbench/contrib/void/browser/chatThreadService.ts +++ b/src/vs/workbench/contrib/void/browser/chatThreadService.ts @@ -485,10 +485,6 @@ class ChatThreadService extends Disposable implements IChatThreadService { const thread = this.state.allThreads[threadId] if (!thread) return // should never happen - // interrupt any effects - const interrupt = await this.streamState[threadId]?.interrupt - interrupt?.() - // add assistant message if (this.streamState[threadId]?.isRunning === 'LLM') { const { displayContentSoFar, reasoningSoFar, toolCallSoFar } = this.streamState[threadId].llmInfo @@ -506,6 +502,11 @@ class ChatThreadService extends Disposable implements IChatThreadService { this.rejectLatestToolRequest(threadId) } + // interrupt any effects + const interrupt = await this.streamState[threadId]?.interrupt + interrupt?.() + + this._setStreamState(threadId, undefined) }