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

Function ensureDb

apps/cli/src/http/routes/web/helpers.ts:35–41  ·  view source on GitHub ↗
(dbManager: DatabaseManager, sessionId: string)

Source from the content-addressed store, hash-verified

33}
34
35export function ensureDb(dbManager: DatabaseManager, sessionId: string) {
36 const db = dbManager.open(sessionId)
37 if (!db) {
38 throw Object.assign(new Error(`Session not found: ${sessionId}`), { statusCode: 404 })
39 }
40 return db
41}

Callers

nothing calls this directly

Calls 1

openMethod · 0.65

Tested by

no test coverage detected