File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,6 @@ export const callMainPrompt = async (
229229 } )
230230
231231 const { sessionState, toolCalls, toolResults } = result
232-
233232
234233 // Send prompt data back
235234 sendAction ( ws , {
@@ -429,7 +428,7 @@ export async function requestToolCall(
429428 }
430429 error ?: string
431430} > {
432- return new Promise ( ( resolve , reject ) => {
431+ return new Promise ( ( resolve ) => {
433432 const requestId = generateCompactId ( )
434433 const timeoutInSeconds =
435434 ( input . timeout_seconds || 30 ) < 0
@@ -443,11 +442,10 @@ export async function requestToolCall(
443442 : setTimeout (
444443 ( ) => {
445444 unsubscribe ( )
446- reject (
447- new Error (
448- `Tool call '${ toolName } ' timed out after ${ timeoutInSeconds } s` ,
449- ) ,
450- )
445+ resolve ( {
446+ success : false ,
447+ error : `Tool call '${ toolName } ' timed out after ${ timeoutInSeconds } s` ,
448+ } )
451449 } ,
452450 timeoutInSeconds * 1000 + 5000 , // Convert to ms and add a small buffer
453451 )
You can’t perform that action at this time.
0 commit comments