(toolName: string, timeout?: number)
| 373 | } |
| 374 | |
| 375 | async waitForToolCall(toolName: string, timeout?: number) { |
| 376 | // Use environment-specific timeout |
| 377 | if (!timeout) { |
| 378 | timeout = this.getDefaultTimeout(); |
| 379 | } |
| 380 | |
| 381 | // Wait for telemetry to be ready before polling for tool calls |
| 382 | await this.waitForTelemetryReady(); |
| 383 | |
| 384 | return this.poll( |
| 385 | () => { |
| 386 | const toolLogs = this.readToolLogs(); |
| 387 | return toolLogs.some((log) => log.toolRequest.name === toolName); |
| 388 | }, |
| 389 | timeout, |
| 390 | 100, |
| 391 | ); |
| 392 | } |
| 393 | |
| 394 | async waitForAnyToolCall(toolNames: string[], timeout?: number) { |
| 395 | // Use environment-specific timeout |
no test coverage detected