add intelligence and SQL tabs to admin interface with corresponding API endpoints
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const Database = require("better-sqlite3");
|
||||
const sqliteVec = require("sqlite-vec");
|
||||
|
||||
let archiveDb = null;
|
||||
let intelligenceDb = null;
|
||||
@@ -6,6 +7,7 @@ let intelligenceDb = null;
|
||||
function getArchiveDb(dbPath) {
|
||||
if (!archiveDb) {
|
||||
archiveDb = new Database(dbPath, { readonly: true });
|
||||
sqliteVec.load(archiveDb);
|
||||
archiveDb.pragma("journal_mode = WAL");
|
||||
}
|
||||
return archiveDb;
|
||||
|
||||
@@ -17,8 +17,8 @@ function resolvePath(p, fallback) {
|
||||
}
|
||||
|
||||
const config = {
|
||||
duriin_db: resolvePath(rawConfig.duriin_db, path.resolve(configDir, "archive.sqlite")),
|
||||
intelligence_db: resolvePath(rawConfig.intelligence_db, path.resolve(configDir, "intelligence.sqlite")),
|
||||
duriin_db: process.env.DURIIN_DB || resolvePath(rawConfig.duriin_db, path.resolve(configDir, "archive.sqlite")),
|
||||
intelligence_db: process.env.INTELLIGENCE_DB || resolvePath(rawConfig.intelligence_db, path.resolve(configDir, "intelligence.sqlite")),
|
||||
llm: rawConfig.llm || {},
|
||||
workers: rawConfig.workers || {},
|
||||
openRouter: rawConfig.openRouter || {},
|
||||
|
||||
Reference in New Issue
Block a user