()
| 37 | try { |
| 38 | this.db = new Database(GEMINI_CONFIG_DB_PATH); |
| 39 | this.db.exec(`CREATE TABLE IF NOT EXISTS config (key TEXT PRIMARY KEY, value TEXT NOT NULL)`); |
| 40 | this.initialized = true; |
| 41 | } catch (error) { |
| 42 | console.error("[convert] Failed to initialize Gemini config DB:", error); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | static get(key: string): string { |
| 47 | this.init(); |
| 48 | if (!this.db) { |
| 49 | console.error("[convert] DB not initialized, cannot get config."); |
| 50 | return ""; |
| 51 | } |