MCPcopy
hub / github.com/codeaashu/claude-code / findTeammateColor

Function findTeammateColor

src/tools/SendMessageTool/SendMessageTool.ts:133–147  ·  view source on GitHub ↗
(
  appState: {
    teamContext?: { teammates: { [id: string]: { color?: string } } }
  },
  name: string,
)

Source from the content-addressed store, hash-verified

131 | ResponseOutput
132
133function findTeammateColor(
134 appState: {
135 teamContext?: { teammates: { [id: string]: { color?: string } } }
136 },
137 name: string,
138): string | undefined {
139 const teammates = appState.teamContext?.teammates
140 if (!teammates) return undefined
141 for (const teammate of Object.values(teammates)) {
142 if ('name' in teammate && (teammate as { name: string }).name === name) {
143 return teammate.color
144 }
145 }
146 return undefined
147}
148
149async function handleMessage(
150 recipientName: string,

Callers 1

handleMessageFunction · 0.85

Calls 1

valuesMethod · 0.80

Tested by

no test coverage detected