MCPcopy Index your code
hub / github.com/coder/mux / listBlockingWorkspaceTurnTaskIds

Method listBlockingWorkspaceTurnTaskIds

src/node/services/taskService.ts:6713–6728  ·  view source on GitHub ↗

* Filter active workspace-turn handle IDs down to those whose persisted * attention policy still blocks the owner's turn-end. `notify_on_terminal` * handles are non-blocking; their terminal output is delivered via wake-up.

(
    ownerWorkspaceId: string,
    handleIds: string[]
  )

Source from the content-addressed store, hash-verified

6711 * handles are non-blocking; their terminal output is delivered via wake-up.
6712 */
6713 private async listBlockingWorkspaceTurnTaskIds(
6714 ownerWorkspaceId: string,
6715 handleIds: string[]
6716 ): Promise<string[]> {
6717 if (handleIds.length === 0) {
6718 return [];
6719 }
6720 const blocking: string[] = [];
6721 for (const handleId of handleIds) {
6722 const record = await this.taskHandleStore.getWorkspaceTurn(ownerWorkspaceId, handleId);
6723 if (resolveBackgroundWorkAttentionPolicy(record?.attentionPolicy) !== "notify_on_terminal") {
6724 blocking.push(handleId);
6725 }
6726 }
6727 return blocking;
6728 }
6729
6730 /**
6731 * Filter active workflow run IDs down to those whose persisted attention

Callers 2

handleStreamEndMethod · 0.95

Calls 3

getWorkspaceTurnMethod · 0.80
pushMethod · 0.65

Tested by

no test coverage detected