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