feat: redesign /rewrite for a natural, casual voice#201
Merged
Conversation
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
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.
Overview
Redesigns the
/rewriteslash command so it rewrites text into a natural, casual, everyday voice instead of lightly polishing it. The previous prompt only smoothed flow with minimal edits; the new prompt rewrites freely to sound like a fluent native speaker in everyday conversation while preserving the writer's meaning, personality, and point of view.What changed
/rewritepromptTemplateinsrc/config/commands.ts: defaults to a relaxed, conversational tone and only stays formal when the source clearly is, never making the text stiffer than the original.[Additional instruction]follow-up channel, so tweaks like "make it more formal" override the defaults.description, docs summary and behavior, and the prompt-help summary.docs/commands.md,src-tauri/prompts/generated/slash_commands.txt) from source viagenerate:commands.How it works
/rewritekeeps the same unified dispatch and$INPUTsubstitution path; only the prompt content changed. Selected text plus a typed remainder still compose intoselection\n\n[Additional instruction]: remainder, which the new prompt explicitly respects so follow-up tweaks keep working.Testing
bun run test:coverage: 1521 frontend tests pass; the/rewriteprompt assertions inApp.test.tsxwere updated to the new template.bun run typecheck,bun run lint:frontend,bun run format:check,bun run build:frontend: all clean.commandArtifacts.test.ts.Note: the backend is untouched apart from the regenerated prompt string that is baked in via
include_str!; no Rust logic or test depends on its exact wording.