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

Function saveAgentColor

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

Source from the content-addressed store, hash-verified

2836}
2837
2838export async function saveAgentColor(
2839 sessionId: UUID,
2840 agentColor: string,
2841 fullPath?: string,
2842) {
2843 const resolvedPath = fullPath ?? getTranscriptPathForSession(sessionId)
2844 appendEntryToFile(resolvedPath, {
2845 type: 'agent-color',
2846 agentColor,
2847 sessionId,
2848 })
2849 // Cache for current session only (for immediate visibility)
2850 if (sessionId === getSessionId()) {
2851 getProject().currentSessionAgentColor = agentColor
2852 }
2853 logEvent('tengu_agent_color_set', {})
2854}
2855
2856/**
2857 * 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