fix: resolve TS build errors and add missing Ollama keys to Rust keyring

- Use for...of entries() instead of index-based loops in summarization.ts
  to satisfy strict noUncheckedIndexedAccess (7 TS18048/TS2345 errors)
- Replace fragile API_PROVIDERS[1] with .find(p => p.name === groq)
- Add OLLAMA_API_URL and OLLAMA_MODEL to SUPPORTED_SECRET_KEYS in main.rs
  so keychain secrets are injected into sidecar on desktop startup
This commit is contained in:
Elie Habib
2026-02-19 19:33:40 +04:00
parent 5cdc41712c
commit bb14f0e9a8
2 changed files with 8 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ const DESKTOP_LOG_FILE: &str = "desktop.log";
const MENU_FILE_SETTINGS_ID: &str = "file.settings";
const MENU_HELP_GITHUB_ID: &str = "help.github";
const MENU_HELP_DEVTOOLS_ID: &str = "help.devtools";
const SUPPORTED_SECRET_KEYS: [&str; 18] = [
const SUPPORTED_SECRET_KEYS: [&str; 20] = [
"GROQ_API_KEY",
"OPENROUTER_API_KEY",
"FRED_API_KEY",
@@ -43,6 +43,8 @@ const SUPPORTED_SECRET_KEYS: [&str; 18] = [
"VITE_WS_RELAY_URL",
"FINNHUB_API_KEY",
"NASA_FIRMS_API_KEY",
"OLLAMA_API_URL",
"OLLAMA_MODEL",
];
#[derive(Default)]