MCPcopy Index your code
hub / github.com/codeaashu/claude-code / assignTeammateColor

Function assignTeammateColor

src/utils/swarm/teammateLayoutManager.ts:22–33  ·  view source on GitHub ↗
(teammateId: string)

Source from the content-addressed store, hash-verified

20 * Colors are assigned in round-robin order.
21 */
22export function assignTeammateColor(teammateId: string): AgentColorName {
23 const existing = teammateColorAssignments.get(teammateId)
24 if (existing) {
25 return existing
26 }
27
28 const color = AGENT_COLORS[colorIndex % AGENT_COLORS.length]!
29 teammateColorAssignments.set(teammateId, color)
30 colorIndex++
31
32 return color
33}
34
35/**
36 * Gets the assigned color for a teammate, if any.

Callers 5

handleSpawnSplitPaneFunction · 0.85
handleSpawnInProcessFunction · 0.85
callFunction · 0.85
spawnMethod · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected