MCPcopy Index your code
hub / github.com/codeaashu/claude-code / fetchSessionTitle

Function fetchSessionTitle

src/bridge/bridgeMain.ts:1971–1978  ·  view source on GitHub ↗

* 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,
)

Source from the content-addressed store, hash-verified

1969 * first user message.
1970 */
1971async 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
1980export async function bridgeMain(args: string[]): Promise<void> {
1981 const parsed = parseArgs(args)

Callers 1

runBridgeLoopFunction · 0.85

Calls 1

getBridgeSessionFunction · 0.85

Tested by

no test coverage detected