( sessionId: UUID, agentColor: string, fullPath?: string, )
| 2837 | } |
| 2838 | |
| 2839 | export async function saveAgentColor( |
| 2840 | sessionId: UUID, |
| 2841 | agentColor: string, |
| 2842 | fullPath?: string, |
| 2843 | ) { |
| 2844 | const resolvedPath = fullPath ?? getTranscriptPathForSession(sessionId) |
| 2845 | appendEntryToFile(resolvedPath, { |
| 2846 | type: 'agent-color', |
| 2847 | agentColor, |
| 2848 | sessionId, |
| 2849 | }) |
| 2850 | // Cache for current session only (for immediate visibility) |
| 2851 | if (sessionId === getSessionId()) { |
| 2852 | getProject().currentSessionAgentColor = agentColor |
| 2853 | } |
| 2854 | logEvent('tengu_agent_color_set', {}) |
| 2855 | } |
| 2856 | |
| 2857 | /** |
| 2858 | * Cache the session agent setting. Written to disk by materializeSessionFile |
no test coverage detected