feat(settings): expose dedicated AI Prompt dictation shortcut - #941
feat(settings): expose dedicated AI Prompt dictation shortcut#941Azilone wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Greptile SummaryThis PR exposes the existing prompt-mode hotkey as a separately configurable AI Prompt Dictation shortcut and selects the default secondary prompt when enabling an unconfigured shortcut.
|
| self.shortcutRow( | ||
| content: .init( | ||
| icon: "sparkles", | ||
| iconColor: .secondary, | ||
| title: "AI Prompt Dictation", | ||
| description: "Transcribe and improve speech with a selected AI prompt" | ||
| ), | ||
| shortcut: self.promptModeShortcut, | ||
| isRecording: self.isRecording(.secondaryDictation), | ||
| isAnyRecordingActive: self.isRecordingAnyShortcut, | ||
| recordingMessage: self.isRecording(.secondaryDictation) ? self.shortcutRecordingMessage : nil, | ||
| isEnabled: self.$promptModeShortcutEnabled, | ||
| requiresShortcutToEnable: true, | ||
| onChangePressed: { | ||
| DebugLogger.shared.debug("Starting to record new AI prompt shortcut", source: "SettingsView") | ||
| self.shortcutRecordingMessage = nil | ||
| self.activeShortcutRecordingTarget = .secondaryDictation | ||
| } | ||
| ) | ||
| self.dictationPromptPicker(for: .secondary) |
There was a problem hiding this comment.
AI shortcut omitted from search
The new shortcut row and secondary prompt picker have no settings-search target or anchor, so searches for terms such as “AI Prompt” or “secondary” cannot navigate to or highlight these controls and can surface unrelated settings instead.
Knowledge Base Used: Settings and onboarding
Prompt To Fix With AI
This is a comment left during a code review.
Path: Sources/Fluid/UI/SettingsView.swift
Line: 714-733
Comment:
**AI shortcut omitted from search**
The new shortcut row and secondary prompt picker have no settings-search target or anchor, so searches for terms such as “AI Prompt” or “secondary” cannot navigate to or highlight these controls and can surface unrelated settings instead.
**Knowledge Base Used:** [Settings and onboarding](https://app.greptile.com/altic/-/custom-context/knowledge-base/altic-dev/fluidvoice/-/docs/settings-and-onboarding.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8edae2674
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if isEnabled, SettingsStore.shared.dictationPromptSelection(for: .secondary) == .off { | ||
| SettingsStore.shared.setDictationPromptSelection(.default, for: .secondary) |
There was a problem hiding this comment.
Select the private-AI prompt when enabling the shortcut
When Private AI is installed and verified and the secondary selection is currently Off, enabling this shortcut forces .default, even though the picker disables external/default prompts in that configuration. DictationAIPostProcessingGate.isConfigured rejects a non-.privateAI selection whose resolved route uses Private AI, so the new “AI Prompt Dictation” shortcut silently produces unprocessed transcription. Select .privateAI when PrivateAIProviderPromptFormat.isAvailable() and use .default otherwise.
Useful? React with 👍 / 👎.
| isEnabled: self.$promptModeShortcutEnabled, | ||
| requiresShortcutToEnable: true, |
There was a problem hiding this comment.
Validate the stored shortcut before enabling it
If the disabled prompt-mode shortcut overlaps a shortcut configured while it was disabled—for example, primary dictation was changed to the default prompt shortcut, Right Shift—this toggle enables it without running shortcutConflictMessage. GlobalHotkeyManager checks prompt mode before primary dictation, so the existing primary shortcut is then hijacked by prompt mode. Validate conflicts on enable or require recording a nonconflicting shortcut before activation.
Useful? React with 👍 / 👎.
| title: "AI Prompt Dictation", | ||
| description: "Transcribe and improve speech with a selected AI prompt" |
There was a problem hiding this comment.
Add the new shortcut to settings search
The new row has neither a SettingsSearchTarget nor an entry in SettingsSearchIndex.entries, unlike each surrounding shortcut setting. Consequently, searching for the exact visible name “AI Prompt Dictation” produces no result and shows the no-matches state, making this newly exposed control undiscoverable through the settings search. Add a dedicated target/index entry and attach it to this row.
Useful? React with 👍 / 👎.


Description
This PR re-exposes the existing AI Prompt dictation mode as a separately configurable global keyboard shortcut.
The prompt-mode hotkey and processing path already exist in
GlobalHotkeyManagerandContentView, but the current Settings UI does not expose the associated shortcut. This adds anAI Prompt Dictationrow to Global Hotkey → Shortcuts, including:When the shortcut is enabled without a secondary prompt selected, the existing default prompt is selected so the new control starts in a usable state.
This PR is intentionally limited to the AI Prompt shortcut. It does not change text insertion behavior.
Type of Change
Related Issue or Discussion
Related to #400, which tracked the inability to configure the secondary dictation / prompt-mode shortcut from the UI.
Testing
swiftlint --strict --config .swiftlint.yml Sourcesswiftformat --config .swiftformat Sourcesswiftc -frontend -parse Sources/Fluid/ContentView.swift Sources/Fluid/UI/SettingsView.swiftpassed.Screenshots / Video
Representative visual reference for the prompt shortcut configuration. The implementation reuses the current Global Hotkey settings components.
Notes