Skip to content

feat(settings): expose dedicated AI Prompt dictation shortcut - #941

Open
Azilone wants to merge 1 commit into
altic-dev:mainfrom
Azilone:feature/ai-prompt-dictation-shortcut
Open

feat(settings): expose dedicated AI Prompt dictation shortcut#941
Azilone wants to merge 1 commit into
altic-dev:mainfrom
Azilone:feature/ai-prompt-dictation-shortcut

Conversation

@Azilone

@Azilone Azilone commented Sep 3, 2026

Copy link
Copy Markdown

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 GlobalHotkeyManager and ContentView, but the current Settings UI does not expose the associated shortcut. This adds an AI Prompt Dictation row to Global Hotkey → Shortcuts, including:

  • a dedicated enable/disable toggle;
  • shortcut recording and conflict detection through the existing shortcut flow; and
  • selection of the prompt used by the secondary dictation slot.

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

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

Related Issue or Discussion

Related to #400, which tracked the inability to configure the secondary dictation / prompt-mode shortcut from the UI.

Testing

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: macOS 26.5
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources
  • Ran formatter locally: swiftformat --config .swiftformat Sources
  • Ran tests locally: swiftc -frontend -parse Sources/Fluid/ContentView.swift Sources/Fluid/UI/SettingsView.swift passed.
  • Full Xcode build: not run because Xcode is not installed in the local environment.

Screenshots / Video

AI Prompt shortcut settings

Representative visual reference for the prompt shortcut configuration. The implementation reuses the current Global Hotkey settings components.

Notes

  • The feature reuses the existing prompt-mode lifecycle, AI processing path, and shortcut conflict handling.
  • No changes were made to text insertion or clipboard behavior.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T08:13:53.693598Z e8edae2 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown

Greptile Summary

This 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.

  • Adds the shortcut toggle, recorder, and secondary prompt picker to Global Hotkey settings.
  • Connects the new controls to existing ContentView state, persistence, and hotkey-manager behavior.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking discoverability issue in Settings search.

The shortcut configuration and runtime synchronization paths remain intact, but the newly exposed setting cannot be found, highlighted, or selected through the application’s existing Settings search flow.

Files Needing Attention: Sources/Fluid/UI/SettingsView.swift and Sources/Fluid/UI/SettingsSearch.swift

Fix all with Greploop Fix All in Codex

Prompt To Fix All With AI
### Issue 1
Sources/Fluid/UI/SettingsView.swift:714-733
**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.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(settings): expose AI prompt dictati..." | Re-trigger Greptile

Comment on lines +714 to +733
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Fix in Codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +494 to +495
if isEnabled, SettingsStore.shared.dictationPromptSelection(for: .secondary) == .off {
SettingsStore.shared.setDictationPromptSelection(.default, for: .secondary)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +725 to +726
isEnabled: self.$promptModeShortcutEnabled,
requiresShortcutToEnable: true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +718 to +719
title: "AI Prompt Dictation",
description: "Transcribe and improve speech with a selected AI prompt"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@altic-dev

Copy link
Copy Markdown
Owner

Did you know you can configure this in
image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants