MCPcopy Create free account
hub / github.com/HELPMEEADICE/doge-code / saveAgentColor

Function saveAgentColor

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

Source from the content-addressed store, hash-verified

2882}
2883
2884export async function saveAgentColor(
2885 sessionId: UUID,
2886 agentColor: string,
2887 fullPath?: string,
2888) {
2889 const resolvedPath = fullPath ?? getTranscriptPathForSession(sessionId)
2890 appendEntryToFile(resolvedPath, {
2891 type: 'agent-color',
2892 agentColor,
2893 sessionId,
2894 })
2895 // Cache for current session only (for immediate visibility)
2896 if (sessionId === getSessionId()) {
2897 getProject().currentSessionAgentColor = agentColor
2898 }
2899 logEvent('tengu_agent_color_set', {})
2900}
2901
2902/**
2903 * 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