mirror of
https://github.com/hanzoai/code.git
synced 2026-09-30 20:53:35 +00:00
interruptions work
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user