Skip to content

feat(cleanup): add prompt dictation style - #506

Merged
DailyXplorer merged 4 commits into
mainfrom
feat/prompt-dictation-style
Dec 5, 2026
Merged

DailyXplorer merged 4 commits into
mainfrom
feat/prompt-dictation-style

Conversation

@DailyXplorer

Copy link
Copy Markdown
Owner

Summary

Adds a Prompt dictation style that structures longer spoken requests (12+ words) into four Markdown sections for coding assistants (## Goal, ## Constraints, ## Done when, ## Open questions), usable globally or per app type (e.g. Coding / AI prompts).

When the rewrite invents code, file paths, links, or ungrounded content, Murmur rejects it and falls back to normal AI cleanup so the user still gets clean text. Onboarding keeps the three general writing tones (Formal, Normal, Casual), while Prompt is available in Settings and "By app type".

Closes #486

Changes

  • Settings & routing: Added DictationStyle::Prompt and CategoryStyle::Prompt (src-tauri/src/settings/types.rs, src-tauri/src/actions/kind_style.rs), regenerated src/bindings.ts.
  • 12-word threshold: cleanup_plan (src-tauri/src/actions/output.rs) runs Prompt from 12 words (PROMPT_MIN_WORDS) and downgrades shorter dictations to Normal.
  • Prompt instructions & guard: Added the PROMPT instruction block (src-tauri/src/cleanup/prompt.rs) and a dedicated validator (src-tauri/src/cleanup/reply/prompt.rs) checking exact section structure, no added code/paths/links, and order-independent content grounding.
  • Fallback to normal cleanup: On guard rejection or length-cap overflow in Prompt style, src-tauri/src/cleanup/mod.rs falls back to Normal cleanup (and to raw transcript only if that fails too).
  • UI & i18n: Added Prompt to DICTATION_STYLES and all six locale files (en, fr, es, de, it, pt), keeping StyleOnboarding on the three prose tones.

Testing

  • bun run check — passed (translations, platforms, file size, doctests, versions, ESLint, Prettier, cargo fmt, frontend build, test typecheck, Clippy).
  • cargo clippy --locked --all-targets -- -D warnings — passed.
  • cargo test --locked --lib — 1772 passed, 0 failed (covers 12-word threshold, per-app routing, prompt guard acceptance/rejection for code/paths/links/hallucinations/CJK, and rejection fallback to normal cleanup).
  • Playwright (dictation-style, by-app-type, style-onboarding, no-all-caps, settings-labels-fit) — 35 passed, 4 optional screenshot tests skipped.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a4817fe and b1fa779.

Files ignored due to path filters: 1

  • src/bindings.ts is excluded by !src/bindings.ts
Files selected for processing: 19

  • src-tauri/src/actions.rs
  • src-tauri/src/actions/kind_style.rs
  • src-tauri/src/actions/output.rs
  • src-tauri/src/actions/tests.rs
  • src-tauri/src/cleanup/mod.rs
  • src-tauri/src/cleanup/prompt.rs
  • src-tauri/src/cleanup/reply.rs
  • src-tauri/src/cleanup/reply/prompt.rs
  • src-tauri/src/settings/tests.rs
  • src-tauri/src/settings/types.rs
  • src/components/onboarding/StyleOnboarding.tsx
  • src/components/settings/DictationStyle.tsx
  • src/i18n/locales/de/translation.json
  • src/i18n/locales/en/translation.json
  • src/i18n/locales/es/translation.json
  • src/i18n/locales/fr/translation.json
  • src/i18n/locales/it/translation.json
  • src/i18n/locales/pt/translation.json
  • tests/dictation-style.spec.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@DailyXplorer
DailyXplorer merged commit a171206 into main Dec 5, 2026
24 checks passed
@DailyXplorer
DailyXplorer deleted the feat/prompt-dictation-style branch December 5, 2026 00:14
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.

Idea: a "prompt" dictation style for AI assistants

1 participant