Repository navigation
feat(cleanup): add prompt dictation style - #506
Merged
Merged
Conversation
|
Warning Review limit reachedYou'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. View limit details
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. |
# Conflicts: # src-tauri/src/actions/tests.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
Promptdictation 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), whilePromptis available in Settings and "By app type".Closes #486
Changes
DictationStyle::PromptandCategoryStyle::Prompt(src-tauri/src/settings/types.rs,src-tauri/src/actions/kind_style.rs), regeneratedsrc/bindings.ts.cleanup_plan(src-tauri/src/actions/output.rs) runsPromptfrom 12 words (PROMPT_MIN_WORDS) and downgrades shorter dictations toNormal.PROMPTinstruction 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.Promptstyle,src-tauri/src/cleanup/mod.rsfalls back toNormalcleanup (and to raw transcript only if that fails too).PrompttoDICTATION_STYLESand all six locale files (en,fr,es,de,it,pt), keepingStyleOnboardingon 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).dictation-style,by-app-type,style-onboarding,no-all-caps,settings-labels-fit) — 35 passed, 4 optional screenshot tests skipped.