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

Function deleteDatabase

apps/desktop/main/worker/import/streamImport.ts:77–87  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

75 return new BetterSqliteAdapter(db)
76 },
77 deleteDatabase(sessionId: string) {
78 const dbPath = getDbPath(sessionId)
79 for (const suffix of ['', '-wal', '-shm']) {
80 try {
81 const p = dbPath + suffix
82 if (fs.existsSync(p)) fs.unlinkSync(p)
83 } catch {
84 /* ignore */
85 }
86 }
87 },
88 onProgress(progress) {
89 sendProgress(requestId, progress)
90 },

Callers

nothing calls this directly

Calls 1

getDbPathFunction · 0.90

Tested by

no test coverage detected