(session: AgentSession, signal?: AbortSignal)
| 556 | const IDLE_ONLY_BUSY_SKIP_MESSAGE = "Workspace is busy; idle-only send was skipped."; |
| 557 | |
| 558 | async function waitForAgentSessionIdle(session: AgentSession, signal?: AbortSignal): Promise<void> { |
| 559 | assert(session instanceof AgentSession, "waitForAgentSessionIdle requires an AgentSession"); |
| 560 | try { |
| 561 | await session.waitForIdle(signal); |
| 562 | } catch (error) { |
| 563 | if (signal?.aborted === true) { |
| 564 | throw new Error(WORKSPACE_IDLE_WAIT_CANCELED_MESSAGE); |
| 565 | } |
| 566 | throw new Error(getErrorMessage(error)); |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | interface FileCompletionsCacheEntry { |
| 571 | index: FileCompletionsIndex; |
no test coverage detected