This commit is contained in:
Andrew Pareles 2025-02-17 00:07:33 -08:00
parent a78a6169f8
commit fecfbd924a

View file

@ -339,8 +339,8 @@ class ChatThreadService extends Disposable implements IChatThreadService {
let toolResult: Awaited<ReturnType<ToolFns[ToolName]>>
try {
toolResult = await this._toolsService.toolFns[toolName](tool.params)
} catch (e) {
this._setStreamState(threadId, { error: e })
} catch (error) {
this._setStreamState(threadId, { error })
shouldContinue = false
break
}
@ -349,8 +349,8 @@ class ChatThreadService extends Disposable implements IChatThreadService {
let toolResultStr: string
try {
toolResultStr = this._toolsService.toolResultToString[toolName](toolResult as any) // typescript is so bad it doesn't even couple the type of ToolResult with the type of the function being called here
} catch (e) {
this._setStreamState(threadId, { error: e })
} catch (error) {
this._setStreamState(threadId, { error })
shouldContinue = false
break
}