Honor "Send Custom Prompt Only" for dictation-shortcut prompt overrides - #919
Conversation
When a custom prompt profile is selected for a dictation shortcut, applyDictationShortcutSelectionContext precomputed promptModeOverrideText with combineBasePrompt unconditionally, so the built-in base prompt was prepended even with "Send Custom Prompt Only" enabled. The override then short-circuited processTextWithAI before the correctly-gated SettingsStore paths (effectiveDictationSystemPrompt et al.) ever ran. Route the override through a new SettingsStore helper that applies the same sendCustomPromptOnly gate as the effective-prompt paths, and cover it with a regression test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011SmpFBuhCzgoPjakR3e9B7
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 makes dictation-shortcut profile overrides honor the existing Send Custom Prompt Only preference by routing prompt construction through
|
|
Thanks for the PR! |
Description
When a custom prompt profile is selected for a dictation shortcut,
applyDictationShortcutSelectionContext(for:)precomputespromptModeOverrideTextwithSettingsStore.combineBasePrompt(...)unconditionally, ignoring Send Custom Prompt Only. The override then short-circuitsprocessTextWithAI(overrideSystemPrompt:)before the correctly-gatedSettingsStorepaths (effectiveDictationSystemPromptet al.) ever run — so the built-in base prompt is prepended on the path every normal dictation with a selected profile takes.This PR routes the override through a new
SettingsStore.shortcutOverrideSystemPrompt(for:mode:)helper that applies the samesendCustomPromptOnlygate as the effective-prompt paths, and adds a regression test alongside the existingtestCustomPromptOnly_*coverage.Type of Change
Related Issue or Discussion
Closes #918
Testing
swiftlint --strict --config .swiftlint.yml Sources— touched files report 0 violations (a newer local SwiftLint flags 7 pre-existing issues in unrelated files; CI's pinned 0.63.2 is authoritative)swiftformat --config .swiftformat Sources— not applied: without a.swift-versionin the repo it reformats many untouched files; kept the diff minimal insteadxcodebuild test -project Fluid.xcodeproj -scheme Fluid -only-testing:FluidDictationIntegrationTests/LLMClientRequestBodyTests— 9/9 passed, including the newtestCustomPromptOnly_shortcutProfileOverrideOmitsBasePromptScreenshots / Video
Notes
Found while pointing dictation cleanup at a narrow text-normalizer fine-tune (Superwhisper s1-mini) through a local gateway: with the base rule-list prepended the model deterministically dropped leading sentences; with the custom prompt alone it cleans correctly. Request-level evidence and
[PromptTrace][Dictate] Prompt override in use: yestraces are in #918.🤖 Generated with Claude Code
https://claude.ai/code/session_011SmpFBuhCzgoPjakR3e9B7