mirror of
https://github.com/voideditor/void
synced 2026-05-24 01:48:25 +00:00
interruptions work
This commit is contained in:
parent
58804620f7
commit
413be993d8
1 changed files with 5 additions and 4 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue