MCPcopy Index your code
hub / github.com/anomalyco/opencode / pickAvailableColor

Function pickAvailableColor

packages/app/src/context/layout.tsx:431–435  ·  view source on GitHub ↗
(used: Set<string>)

Source from the content-addressed store, hash-verified

429 const colorRequested = new Map<string, AvatarColorKey>()
430
431 function pickAvailableColor(used: Set<string>): AvatarColorKey {
432 const available = AVATAR_COLOR_KEYS.filter((c) => !used.has(c))
433 if (available.length === 0) return AVATAR_COLOR_KEYS[Math.floor(Math.random() * AVATAR_COLOR_KEYS.length)]
434 return available[Math.floor(Math.random() * available.length)]
435 }
436
437 function enrich(project: { worktree: string; expanded: boolean }) {
438 const [childStore] = serverSync().child(project.worktree, { bootstrap: false })

Callers 1

layout.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected