From 7f98acb5e34055365fee512f96ff8f42aec33f3f Mon Sep 17 00:00:00 2001 From: jhyang0 Date: Tue, 15 Jul 2025 15:32:24 +0900 Subject: [PATCH] whisper install fix --- src/bridge/featureBridge.js | 2 -- src/features/common/services/modelStateService.js | 8 ++++++-- src/features/common/services/whisperService.js | 4 ++-- src/ui/settings/SettingsView.js | 3 ++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/bridge/featureBridge.js b/src/bridge/featureBridge.js index b5c13eb..afe12d7 100644 --- a/src/bridge/featureBridge.js +++ b/src/bridge/featureBridge.js @@ -7,9 +7,7 @@ const ollamaService = require('../features/common/services/ollamaService'); const modelStateService = require('../features/common/services/modelStateService'); const shortcutsService = require('../features/shortcuts/shortcutsService'); const presetRepository = require('../features/common/repositories/preset'); -const windowBridge = require('./windowBridge'); const localAIManager = require('../features/common/services/localAIManager'); - const askService = require('../features/ask/askService'); const listenService = require('../features/listen/listenService'); const permissionService = require('../features/common/services/permissionService'); diff --git a/src/features/common/services/modelStateService.js b/src/features/common/services/modelStateService.js index 46242ae..57e18be 100644 --- a/src/features/common/services/modelStateService.js +++ b/src/features/common/services/modelStateService.js @@ -426,7 +426,7 @@ class ModelStateService extends EventEmitter { } } - setFirebaseVirtualKey(virtualKey) { + async setFirebaseVirtualKey(virtualKey) { console.log(`[ModelStateService] Setting Firebase virtual key (for openai-glass).`); this.state.apiKeys['openai-glass'] = virtualKey; @@ -448,8 +448,12 @@ class ModelStateService extends EventEmitter { this._autoSelectAvailableModels(); } - this._saveState(); + await this._saveState(); this._logCurrentSelection(); + + // Emit events to update UI + this.emit('state-updated', this.state); + this.emit('settings-updated'); } async setApiKey(provider, key) { diff --git a/src/features/common/services/whisperService.js b/src/features/common/services/whisperService.js index e676913..7d285a9 100644 --- a/src/features/common/services/whisperService.js +++ b/src/features/common/services/whisperService.js @@ -643,7 +643,7 @@ class WhisperService extends EventEmitter { async installWindows() { console.log('[WhisperService] Installing Whisper on Windows...'); const version = 'v1.7.6'; - const binaryUrl = `https://github.com/ggerganov/whisper.cpp/releases/download/${version}/whisper-cpp-${version}-win-x64.zip`; + const binaryUrl = `https://github.com/ggml-org/whisper.cpp/releases/download/${version}/whisper-cpp-${version}-win-x64.zip`; const tempFile = path.join(this.tempDir, 'whisper-binary.zip'); try { @@ -757,7 +757,7 @@ class WhisperService extends EventEmitter { async installLinux() { console.log('[WhisperService] Installing Whisper on Linux...'); const version = 'v1.7.6'; - const binaryUrl = `https://github.com/ggerganov/whisper.cpp/releases/download/${version}/whisper-cpp-${version}-linux-x64.tar.gz`; + const binaryUrl = `https://github.com/ggml-org/whisper.cpp/releases/download/${version}/whisper-cpp-${version}-linux-x64.tar.gz`; const tempFile = path.join(this.tempDir, 'whisper-binary.tar.gz'); try { diff --git a/src/ui/settings/SettingsView.js b/src/ui/settings/SettingsView.js index 1df713e..a8b4502 100644 --- a/src/ui/settings/SettingsView.js +++ b/src/ui/settings/SettingsView.js @@ -956,7 +956,8 @@ export class SettingsView extends LitElement { this.firebaseUser = null; } this.loadAutoUpdateSetting(); - this.requestUpdate(); + // Reload model settings when user state changes (Firebase login/logout) + this.loadInitialData(); }; this._settingsUpdatedListener = (event, settings) => {