(sessionId: string)
| 43 | } |
| 44 | |
| 45 | export 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 | |
| 56 | export function rebuildFtsIndex(sessionId: string): { indexed: number } { |
| 57 | const db = openWritableDb(sessionId) |
nothing calls this directly
no test coverage detected