MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / saveAgentColor

Function saveAgentColor

src/utils/sessionStorage.ts:2922–2938  ·  view source on GitHub ↗
(
  sessionId: UUID,
  agentColor: string,
  fullPath?: string,
)

Source from the content-addressed store, hash-verified

2920}
2921
2922export async function saveAgentColor(
2923 sessionId: UUID,
2924 agentColor: string,
2925 fullPath?: string,
2926) {
2927 const resolvedPath = fullPath ?? getTranscriptPathForSession(sessionId)
2928 appendEntryToFile(resolvedPath, {
2929 type: 'agent-color',
2930 agentColor,
2931 sessionId,
2932 })
2933 // Cache for current session only (for immediate visibility)
2934 if (sessionId === getSessionId()) {
2935 getProject().currentSessionAgentColor = agentColor
2936 }
2937 logEvent('tengu_agent_color_set', {})
2938}
2939
2940/**
2941 * Cache the session agent setting. Written to disk by materializeSessionFile

Callers 1

callFunction · 0.85

Calls 5

appendEntryToFileFunction · 0.85
getSessionIdFunction · 0.85
getProjectFunction · 0.85
logEventFunction · 0.85

Tested by

no test coverage detected