(msgs: Message[])
| 2494 | toolAbort.abort('TOOL_TIMEOUT'); |
| 2495 | const err: any = new Error(`Tool '${tc.function.name}' exceeded ${timeoutSec}s timeout`); |
| 2496 | err.code = 'TOOL_TIMEOUT'; |
| 2497 | reject(err); |
| 2498 | }, timeoutMs); |
| 2499 | }); |
| 2500 | |
| 2501 | const ctx: ToolContext = { |
| 2502 | cwd: this.effectiveCwd ?? this.cwd, |
| 2503 | sessionId, |
| 2504 | transaction, |
| 2505 | permissions: this.permissions, |
| 2506 | askUser: options.askUser, |
| 2507 | emit: (ev) => { |
| 2508 | uiEvents.push(ev); |
| 2509 | if (options.onToolUI) options.onToolUI(ev); |
| 2510 | }, |
| 2511 | signal: toolAbort.signal, |
| 2512 | // The snapshot service (if any) is plumbed in from the agent loop's instance. |
no test coverage detected