MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / fetchSessionTitle

Function fetchSessionTitle

src/bridge/bridgeMain.ts:1992–1999  ·  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

1990 * first user message.
1991 */
1992async function fetchSessionTitle(
1993 compatSessionId: string,
1994 baseUrl: string,
1995): Promise<string | undefined> {
1996 const { getBridgeSession } = await import('./createSession.js')
1997 const session = await getBridgeSession(compatSessionId, { baseUrl })
1998 return session?.title || undefined
1999}
2000
2001export async function bridgeMain(args: string[]): Promise<void> {
2002 const parsed = parseArgs(args)

Callers 1

runBridgeLoopFunction · 0.85

Calls 1

getBridgeSessionFunction · 0.85

Tested by

no test coverage detected