diff --git a/VoiceInk/HotkeyManager.swift b/VoiceInk/HotkeyManager.swift index 92faa4c..b069aa6 100644 --- a/VoiceInk/HotkeyManager.swift +++ b/VoiceInk/HotkeyManager.swift @@ -316,11 +316,14 @@ class HotkeyManager: ObservableObject { await ActiveWindowService.shared.applyConfiguration(selectedConfig) } } else { - guard let enhancementService = await self.whisperState.getEnhancementService(), - enhancementService.isEnhancementEnabled else { return } + guard let enhancementService = await self.whisperState.getEnhancementService() else { return } let availablePrompts = enhancementService.allPrompts if index < availablePrompts.count { + if !enhancementService.isEnhancementEnabled { + enhancementService.isEnhancementEnabled = true + } + enhancementService.setActivePrompt(availablePrompts[index]) } } diff --git a/VoiceInk/Views/Recorder/EnhancementPromptPopover.swift b/VoiceInk/Views/Recorder/EnhancementPromptPopover.swift index 89f086c..ff1dd2e 100644 --- a/VoiceInk/Views/Recorder/EnhancementPromptPopover.swift +++ b/VoiceInk/Views/Recorder/EnhancementPromptPopover.swift @@ -49,6 +49,9 @@ struct EnhancementPromptPopover: View { // Set the initially selected prompt selectedPrompt = enhancementService.activePrompt } + .onChange(of: enhancementService.selectedPromptId) { oldValue, newValue in + selectedPrompt = enhancementService.activePrompt + } } }