fix(settings): resolve ReferenceError and add detailed persistence logs

This commit is contained in:
Michael committed 2026-02-21 14:49:14 +01:00
1 parent 85215565fa
commit 1c5fe4499a
2 files changed
+7 -5

No files matched your search

+3 -1
View File
@@ -64,7 +64,9 @@ export async function getSavedDatabaseConfig(): Promise<DbConfig | null> {
return null;
}
const data = await fs.readFile(CONFIG_FILE, "utf-8");
return JSON.parse(data);
const config = JSON.parse(data);
console.log(`[Settings] Config read from ${CONFIG_FILE}. Key present: ${!!config.openRouterKey}, Model: ${config.openRouterModel || "default"}`);
return config;
} catch (error) {
console.error(`[Settings] Error reading config from ${CONFIG_FILE}:`, error);
return null;