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