(sessionId: string)
| 54 | } |
| 55 | |
| 56 | export 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 | |
| 67 | export function insertFtsEntries(sessionId: string, entries: Array<{ id: number; content: string | null }>): void { |
| 68 | const db = openWritableDb(sessionId) |
nothing calls this directly
no test coverage detected