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