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

Function rebuildFtsIndex

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

Source from the content-addressed store, hash-verified

54}
55
56export function rebuildFtsIndex(sessionId: string): { indexed: number } {
57 const db = openWritableDb(sessionId)
58 if (!db) return { indexed: 0 }
59
60 try {
61 return coreRebuildFtsIndex(new BetterSqliteAdapter(db))
62 } finally {
63 db.close()
64 }
65}
66
67export function insertFtsEntries(sessionId: string, entries: Array<{ id: number; content: string | null }>): void {
68 const db = openWritableDb(sessionId)

Callers

nothing calls this directly

Calls 2

openWritableDbFunction · 0.85
closeMethod · 0.65

Tested by

no test coverage detected