Fix prompt popover keyboard shortcuts
This commit is contained in:
parent
b8899bf0b7
commit
17c2ca4e2e
@ -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])
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user