(toolCallIds: string[])
| 423 | } |
| 424 | |
| 425 | export async function getAsyncToolCalls(toolCallIds: string[]) { |
| 426 | if (toolCallIds.length === 0) return [] |
| 427 | return withDbSpan( |
| 428 | TraceSpan.CopilotAsyncRunsGetMany, |
| 429 | 'SELECT', |
| 430 | 'copilot_async_tool_calls', |
| 431 | { [TraceAttr.CopilotAsyncToolIdsCount]: toolCallIds.length }, |
| 432 | async () => |
| 433 | db |
| 434 | .select() |
| 435 | .from(copilotAsyncToolCalls) |
| 436 | .where(inArray(copilotAsyncToolCalls.toolCallId, toolCallIds)) |
| 437 | ) |
| 438 | } |
| 439 | |
| 440 | export async function claimCompletedAsyncToolCall(toolCallId: string, workerId: string) { |
| 441 | return withDbSpan( |
no test coverage detected