( sessionId: UUID, agentName: string, fullPath?: string, source: 'user' | 'auto' = 'user', )
| 2901 | } |
| 2902 | |
| 2903 | export async function saveAgentName( |
| 2904 | sessionId: UUID, |
| 2905 | agentName: string, |
| 2906 | fullPath?: string, |
| 2907 | source: 'user' | 'auto' = 'user', |
| 2908 | ) { |
| 2909 | const resolvedPath = fullPath ?? getTranscriptPathForSession(sessionId) |
| 2910 | appendEntryToFile(resolvedPath, { type: 'agent-name', agentName, sessionId }) |
| 2911 | // Cache for current session only (for immediate visibility) |
| 2912 | if (sessionId === getSessionId()) { |
| 2913 | getProject().currentSessionAgentName = agentName |
| 2914 | void updateSessionName(agentName) |
| 2915 | } |
| 2916 | logEvent('tengu_agent_name_set', { |
| 2917 | source: |
| 2918 | source as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, |
| 2919 | }) |
| 2920 | } |
| 2921 | |
| 2922 | export async function saveAgentColor( |
| 2923 | sessionId: UUID, |
no test coverage detected