MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / ensureSession

Function ensureSession

apps/desktop/main/api/routes/sessions.ts:11–15  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

9const EXPORT_MESSAGE_LIMIT = 100_000
10
11async function ensureSession(sessionId: string) {
12 const session = await worker.getSession(sessionId)
13 if (!session) throw sessionNotFound(sessionId)
14 return session
15}
16
17export function registerSessionRoutes(server: FastifyInstance): void {
18 // GET /api/v1/sessions — List all sessions

Callers 1

registerSessionRoutesFunction · 0.85

Calls 2

sessionNotFoundFunction · 0.90
getSessionMethod · 0.65

Tested by

no test coverage detected