( sessionId: UUID, agentColor: string, fullPath?: string, )
| 3016 | } |
| 3017 | |
| 3018 | export 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 |
no test coverage detected