( sessionId: UUID, agentName: string, fullPath?: string, source: 'user' | 'auto' = 'user', )
| 2997 | } |
| 2998 | |
| 2999 | export async function saveAgentName( |
| 3000 | sessionId: UUID, |
| 3001 | agentName: string, |
| 3002 | fullPath?: string, |
| 3003 | source: 'user' | 'auto' = 'user', |
| 3004 | ) { |
| 3005 | const resolvedPath = fullPath ?? getTranscriptPathForSession(sessionId) |
| 3006 | appendEntryToFile(resolvedPath, { type: 'agent-name', agentName, sessionId }) |
| 3007 | // Cache for current session only (for immediate visibility) |
| 3008 | if (sessionId === getSessionId()) { |
| 3009 | getProject().currentSessionAgentName = agentName |
| 3010 | void updateSessionName(agentName) |
| 3011 | } |
| 3012 | logEvent('ncode_agent_name_set', { |
| 3013 | source: |
| 3014 | source as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, |
| 3015 | }) |
| 3016 | } |
| 3017 | |
| 3018 | export async function saveAgentColor( |
| 3019 | sessionId: UUID, |
no test coverage detected