* One-shot fetch of a session's title via GET /v1/sessions/{id}. * * Uses `getBridgeSession` from createSession.ts (ccr-byoc headers + org UUID) * rather than the environments-level bridgeApi client, whose headers make the * Sessions API return 404. Returns undefined if the session has no title
( compatSessionId: string, baseUrl: string, )
| 1969 | * first user message. |
| 1970 | */ |
| 1971 | async function fetchSessionTitle( |
| 1972 | compatSessionId: string, |
| 1973 | baseUrl: string, |
| 1974 | ): Promise<string | undefined> { |
| 1975 | const { getBridgeSession } = await import('./createSession.js') |
| 1976 | const session = await getBridgeSession(compatSessionId, { baseUrl }) |
| 1977 | return session?.title || undefined |
| 1978 | } |
| 1979 | |
| 1980 | export async function bridgeMain(args: string[]): Promise<void> { |
| 1981 | const parsed = parseArgs(args) |
no test coverage detected