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)
|
await ActiveWindowService.shared.applyConfiguration(selectedConfig)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
guard let enhancementService = await self.whisperState.getEnhancementService(),
|
guard let enhancementService = await self.whisperState.getEnhancementService() else { return }
|
||||||
enhancementService.isEnhancementEnabled else { return }
|
|
||||||
|
|
||||||
let availablePrompts = enhancementService.allPrompts
|
let availablePrompts = enhancementService.allPrompts
|
||||||
if index < availablePrompts.count {
|
if index < availablePrompts.count {
|
||||||
|
if !enhancementService.isEnhancementEnabled {
|
||||||
|
enhancementService.isEnhancementEnabled = true
|
||||||
|
}
|
||||||
|
|
||||||
enhancementService.setActivePrompt(availablePrompts[index])
|
enhancementService.setActivePrompt(availablePrompts[index])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,6 +49,9 @@ struct EnhancementPromptPopover: View {
|
|||||||
// Set the initially selected prompt
|
// Set the initially selected prompt
|
||||||
selectedPrompt = enhancementService.activePrompt
|
selectedPrompt = enhancementService.activePrompt
|
||||||
}
|
}
|
||||||
|
.onChange(of: enhancementService.selectedPromptId) { oldValue, newValue in
|
||||||
|
selectedPrompt = enhancementService.activePrompt
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user