MCPcopy Index your code
hub / github.com/Noumena-Network/code / saveAgentColor

Function saveAgentColor

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

Source from the content-addressed store, hash-verified

3016}
3017
3018export async function saveAgentColor(
3019 sessionId: UUID,
3020 agentColor: string,
3021 fullPath?: string,
3022) {
3023 const resolvedPath = fullPath ?? getTranscriptPathForSession(sessionId)
3024 appendEntryToFile(resolvedPath, {
3025 type: 'agent-color',
3026 agentColor,
3027 sessionId,
3028 })
3029 // Cache for current session only (for immediate visibility)
3030 if (sessionId === getSessionId()) {
3031 getProject().currentSessionAgentColor = agentColor
3032 }
3033 logEvent('ncode_agent_color_set', {})
3034}
3035
3036/**
3037 * 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.50

Tested by

no test coverage detected