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

Method hasChildAgentTasks

src/node/services/taskService.ts:6943–6945  ·  view source on GitHub ↗

* Topology predicate: does this workspace still have child agent-task nodes in config? * Unlike hasActiveDescendantAgentTasks (which checks runtime activity for scheduling), * this checks structural tree shape — any child node blocks parent deletion regardless * of its status.

(index: AgentTaskIndex, workspaceId: string)

Source from the content-addressed store, hash-verified

6941 * of its status.
6942 */
6943 private hasChildAgentTasks(index: AgentTaskIndex, workspaceId: string): boolean {
6944 return (index.childrenByParent.get(workspaceId)?.length ?? 0) > 0;
6945 }
6946
6947 private getTaskDepth(
6948 config: ReturnType<Config["loadConfigOrDefault"]>,

Callers 1

Calls 1

getMethod · 0.65

Tested by

no test coverage detected