mirror of
https://github.com/voideditor/void
synced 2026-05-23 09:28:23 +00:00
interrupt fallback
This commit is contained in:
parent
8c1626f79b
commit
d6b3bdee35
1 changed files with 5 additions and 4 deletions
|
|
@ -616,12 +616,13 @@ class ChatThreadService extends Disposable implements IChatThreadService {
|
|||
delete this._currentlyRunningToolInterruptor[threadId];
|
||||
}
|
||||
toolResult = await result // ts is bad... await is needed
|
||||
|
||||
if (interrupted) { return { interrupted: true } } // the tool result is added where we interrupt, not here
|
||||
}
|
||||
catch (error) {
|
||||
if (interrupted) {
|
||||
// the tool result is added when we stop running
|
||||
return { interrupted: true }
|
||||
}
|
||||
if (interrupted) { return { interrupted: true } } // the tool result is added where we interrupt, not here
|
||||
|
||||
|
||||
const errorMessage = getErrorMessage(error)
|
||||
this._updateLatestTool(threadId, { role: 'tool', type: 'tool_error', params: toolParams, result: errorMessage, name: toolName, content: errorMessage, })
|
||||
return {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue