mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +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]
|
const thread = this.state.allThreads[threadId]
|
||||||
if (!thread) return // should never happen
|
if (!thread) return // should never happen
|
||||||
|
|
||||||
// interrupt any effects
|
|
||||||
const interrupt = await this.streamState[threadId]?.interrupt
|
|
||||||
interrupt?.()
|
|
||||||
|
|
||||||
// add assistant message
|
// add assistant message
|
||||||
if (this.streamState[threadId]?.isRunning === 'LLM') {
|
if (this.streamState[threadId]?.isRunning === 'LLM') {
|
||||||
const { displayContentSoFar, reasoningSoFar, toolCallSoFar } = this.streamState[threadId].llmInfo
|
const { displayContentSoFar, reasoningSoFar, toolCallSoFar } = this.streamState[threadId].llmInfo
|
||||||
|
|
@ -506,6 +502,11 @@ class ChatThreadService extends Disposable implements IChatThreadService {
|
||||||
this.rejectLatestToolRequest(threadId)
|
this.rejectLatestToolRequest(threadId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// interrupt any effects
|
||||||
|
const interrupt = await this.streamState[threadId]?.interrupt
|
||||||
|
interrupt?.()
|
||||||
|
|
||||||
|
|
||||||
this._setStreamState(threadId, undefined)
|
this._setStreamState(threadId, undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue