feat: add toggle to send only the user's dictation prompt without the forced base prompt#464
Conversation
… forced base prompt
There was a problem hiding this comment.
💡 Codex Review
FluidVoice/Sources/Fluid/UI/AISettingsView+AdvancedSettings.swift
Lines 1749 to 1751 in 7d02784
When test mode is enabled from a Dictate prompt editor, the draft prompt is still passed through combinedDraftPrompt, which always prepends the built-in base prompt and does not consult sendCustomPromptOnly. With the new toggle on, the test request therefore exercises a different prompt than the one this setting is meant to send, so users can get misleading test output before saving or using the prompt.
ℹ️ 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 normalizedMode == .dictate, self.sendCustomPromptOnly { | ||
| return trimmedBody |
There was a problem hiding this comment.
Honor custom-only prompts on the recording path
When a user enables this toggle and selects a custom Dictate prompt for the primary or secondary shortcut, the live recording path never reaches this new helper: applyDictationShortcutSelectionContext builds promptModeOverrideText with SettingsStore.combineBasePrompt(...) (ContentView.swift:3399-3402), and processTextWithAI prefers that non-empty overrideSystemPrompt before calling buildSystemPrompt (ContentView.swift:1819-1822). In that common selected-profile scenario, the built-in base prompt is still prepended even though sendCustomPromptOnly is true, so the advertised feature only works for paths that resolve through SettingsStore directly, such as app-bound profiles.
Useful? React with 👍 / 👎.
| var sendCustomPromptOnly: Bool { | ||
| get { self.defaults.bool(forKey: Keys.sendCustomPromptOnly) } | ||
| set { | ||
| objectWillChange.send() | ||
| self.defaults.set(newValue, forKey: Keys.sendCustomPromptOnly) |
There was a problem hiding this comment.
Preserve custom-only prompt setting in backups
This new persisted setting is not included in SettingsBackupPayload/settingsBackupPayload() and restore(from:) never reads it back, so exporting and importing a backup silently resets the toggle to the default false. For users who rely on custom-only Dictate prompts, a restored machine will start prepending the built-in base prompt again even though their prompt profiles and selections were restored.
Useful? React with 👍 / 👎.
Summary
Adds a
sendCustomPromptOnlytoggle so AI Enhancement sends only the user's custom dictation prompt, without the forced base prompt prepended. This matches the "yolo toggle" approach @grohith327 endorsed on the issue: the resolution point isSettingsStore's prompt composition, routed through a newsystemPrompt(forCustomProfileBody:mode:)helper. Default behavior is unchanged; the base prompt is only dropped when the toggle is on.Adds request-body tests covering both toggle states.
Fixes #307