(context: StreamingContext, toolIds: string[])
| 314 | } |
| 315 | |
| 316 | async function waitForToolIds(context: StreamingContext, toolIds: string[]): Promise<void> { |
| 317 | const promises: Promise<unknown>[] = [] |
| 318 | for (const id of toolIds) { |
| 319 | const p = context.pendingToolPromises.get(id) |
| 320 | if (p) promises.push(p) |
| 321 | } |
| 322 | if (promises.length > 0) await Promise.allSettled(promises) |
| 323 | } |
| 324 | |
| 325 | function collectResultsForToolIds( |
| 326 | context: StreamingContext, |
no test coverage detected