Added episodic layer with FTS5 triggers and search

This commit is contained in:
Storme-bit
2026-04-04 06:53:36 -07:00
parent 5d51aa9895
commit 34075258c0
4 changed files with 252 additions and 1 deletions

View File

@@ -13,6 +13,11 @@ function getDB() {
db.pragma('foreign_keys = ON');
db.exec(schema);
// Sync FTS index with any existing episodes data
db.exec(`INSERT OR REPLACE INTO episodes_fts(rowid, user_message, ai_response)
SELECT id, user_message, ai_response FROM episodes`);
console.log(`Connected to SQLite database at ${path}`);
}
return db;