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

Method cancelAll

src/node/services/askUserQuestionManager.ts:68–81  ·  view source on GitHub ↗
(workspaceId: string, reason: string)

Source from the content-addressed store, hash-verified

66 }
67
68 cancelAll(workspaceId: string, reason: string): void {
69 assert(workspaceId.length > 0, "workspaceId must be non-empty");
70 assert(reason.length > 0, "reason must be non-empty");
71
72 const workspaceMap = this.pendingByWorkspace.get(workspaceId);
73 if (!workspaceMap) {
74 return;
75 }
76
77 for (const toolCallId of workspaceMap.keys()) {
78 // cancel() will delete from map via finally cleanup
79 this.cancel(workspaceId, toolCallId, reason);
80 }
81 }
82
83 getLatestPending(workspaceId: string): PendingAskUserQuestion | null {
84 assert(workspaceId.length > 0, "workspaceId must be non-empty");

Calls 3

cancelMethod · 0.95
getMethod · 0.65
assertFunction · 0.50

Tested by

no test coverage detected