-
-
Notifications
You must be signed in to change notification settings - Fork 808
feat(settings): expose dedicated AI Prompt dictation shortcut #941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,13 +42,15 @@ struct SettingsView: View { | |
| @Binding var primaryDictationShortcuts: [HotkeyShortcut] | ||
| @Binding var activeShortcutRecordingTarget: ShortcutRecordingTarget? | ||
| @Binding var shortcutRecordingMessage: String? | ||
| @Binding var promptModeShortcut: HotkeyShortcut | ||
| @Binding var commandModeShortcut: HotkeyShortcut? | ||
| @Binding var rewriteShortcut: HotkeyShortcut | ||
| @Binding var cancelRecordingShortcut: HotkeyShortcut | ||
| @Binding var pasteLastTranscriptionShortcut: HotkeyShortcut? | ||
| @Binding var commandModeShortcutEnabled: Bool | ||
| @Binding var rewriteShortcutEnabled: Bool | ||
| @Binding var pasteLastTranscriptionShortcutEnabled: Bool | ||
| @Binding var promptModeShortcutEnabled: Bool | ||
| @Binding var hotkeyManagerInitialized: Bool | ||
| @Binding var hotkeyMode: HotkeyActivationMode | ||
| @Binding var enableStreamingPreview: Bool | ||
|
|
@@ -709,6 +711,28 @@ struct SettingsView: View { | |
| self.dictationPromptPicker(for: .primary) | ||
| Divider().opacity(0.2).padding(.vertical, 4) | ||
|
|
||
| self.shortcutRow( | ||
| content: .init( | ||
| icon: "sparkles", | ||
| iconColor: .secondary, | ||
| title: "AI Prompt Dictation", | ||
| description: "Transcribe and improve speech with a selected AI prompt" | ||
|
Comment on lines
+718
to
+719
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new row has neither a Useful? React with 👍 / 👎. |
||
| ), | ||
| shortcut: self.promptModeShortcut, | ||
| isRecording: self.isRecording(.secondaryDictation), | ||
| isAnyRecordingActive: self.isRecordingAnyShortcut, | ||
| recordingMessage: self.isRecording(.secondaryDictation) ? self.shortcutRecordingMessage : nil, | ||
| isEnabled: self.$promptModeShortcutEnabled, | ||
| requiresShortcutToEnable: true, | ||
|
Comment on lines
+725
to
+726
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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 Useful? React with 👍 / 👎. |
||
| onChangePressed: { | ||
| DebugLogger.shared.debug("Starting to record new AI prompt shortcut", source: "SettingsView") | ||
| self.shortcutRecordingMessage = nil | ||
| self.activeShortcutRecordingTarget = .secondaryDictation | ||
| } | ||
| ) | ||
| self.dictationPromptPicker(for: .secondary) | ||
|
Comment on lines
+714
to
+733
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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 AIThis 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. |
||
| Divider().opacity(0.2).padding(.vertical, 4) | ||
|
|
||
| self.shortcutRow( | ||
| content: .init( | ||
| icon: "terminal.fill", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.isConfiguredrejects a non-.privateAIselection whose resolved route uses Private AI, so the new “AI Prompt Dictation” shortcut silently produces unprocessed transcription. Select.privateAIwhenPrivateAIProviderPromptFormat.isAvailable()and use.defaultotherwise.Useful? React with 👍 / 👎.