MCPcopy
hub / github.com/coder/mux / getSubagentConnector

Function getSubagentConnector

tests/ui/workspaces/subagents.test.ts:50–62  ·  view source on GitHub ↗
(container: HTMLElement, workspaceId: string)

Source from the content-addressed store, hash-verified

48}
49
50function getSubagentConnector(container: HTMLElement, workspaceId: string): HTMLElement | null {
51 // Find all connector elements and match by shared parent with the target workspace row.
52 // This avoids fragile sibling/parent traversal assumptions.
53 const connectors = container.querySelectorAll('[data-testid="subagent-connector"]');
54 for (const connector of connectors) {
55 const wrapper = connector.parentElement;
56 if (!wrapper) continue;
57 if (wrapper.querySelector(`[data-workspace-id="${workspaceId}"]`)) {
58 return connector as HTMLElement;
59 }
60 }
61 return null;
62}
63
64async function findWorkspaceActionsButton(params: {
65 container: HTMLElement;

Callers 2

getAncestorTrunkSegmentsFunction · 0.85
subagents.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected