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

Function deleteImportedSessionFiles

apps/desktop/main/worker/workerManager.ts:550–560  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

548}
549
550function deleteImportedSessionFiles(sessionId: string): void {
551 const dbPath = path.join(getDbDir(), `${sessionId}.db`)
552 for (const suffix of ['', '-wal', '-shm']) {
553 try {
554 const p = dbPath + suffix
555 if (fs.existsSync(p)) fs.unlinkSync(p)
556 } catch {
557 /* ignore */
558 }
559 }
560}
561
562/**
563 * 获取数据库目录(供外部使用)

Callers 1

streamImportFunction · 0.85

Calls 1

getDbDirFunction · 0.70

Tested by

no test coverage detected