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

Function buildFtsIndex

apps/desktop/main/worker/query/fts.ts:45–54  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

43}
44
45export function buildFtsIndex(sessionId: string): { indexed: number } {
46 const db = openWritableDb(sessionId)
47 if (!db) return { indexed: 0 }
48
49 try {
50 return coreBuildFtsIndex(new BetterSqliteAdapter(db))
51 } finally {
52 db.close()
53 }
54}
55
56export function rebuildFtsIndex(sessionId: string): { indexed: number } {
57 const db = openWritableDb(sessionId)

Callers

nothing calls this directly

Calls 2

openWritableDbFunction · 0.85
closeMethod · 0.65

Tested by

no test coverage detected