Conversation
- Add message-formatter.ts for consistent CLI output styling - Replace raw ANSI codes with chalk in diff-display.ts - Standardize emoji usage across all commands (10 distinct types) - Implement color scheme (red=error, green=success, yellow=warning, cyan=info) - Translate Japanese comments/messages to English in backup.ts - Refactor all console output to use msg.* helpers - Add verbose mode support with debug messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add displayColoredCodeBlock function to parse markdown code blocks - Display code with green + prefix and dim backticks - Apply to INSERT_CODE_BLOCK and default preview cases - Improve visual clarity when previewing code insertions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Detect CODE_REF comment changes with arrow (→) - Display old CODE_REF in red, arrow in yellow, new CODE_REF in green - Highlight CODE_REF: label in cyan bold for single comments - Dim HTML comment markers (<!-- and -->) - Improve visual clarity when reviewing fix options 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…NTENT_MISMATCH When Option 2 is selected for CODE_CONTENT_MISMATCH errors (converting symbol reference to line numbers), the preview now displays a diff showing: - The code block that will be kept (from markdown) - The actual code in the file at the new line numbers This makes it clear to users that the code block needs manual adjustment after updating the CODE_REF comment to use line numbers instead of symbol references. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ISMATCH When Option 2 is selected for CODE_CONTENT_MISMATCH errors (converting symbol reference to line numbers), the preview was incorrectly showing both expected and actual code as the same. Root cause: The switch statement was using error.type instead of action.type, which caused it to hit the CODE_CONTENT_MISMATCH case handler instead of the UPDATE_LINE_NUMBERS case handler. This resulted in comparing error.expectedCode (1 line from document) with action.newCodeBlock (also 1 line from document) instead of extracting the actual code from the file (4 lines with JSDoc). Changes: - Switch on action.type instead of error.type in displayFixPreview - Add special handling for CODE_LOCATION_MISMATCH within UPDATE_LINE_NUMBERS case - Remove unused displayLineRangeDiff import - Update test to use flexible string matching for colored output Now correctly displays: - Expected code (in document): 1 line without JSDoc - Actual code (in file): 4 lines with JSDoc comment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
When Option 2 is selected for CODE_CONTENT_MISMATCH (convert symbol to line numbers), the previous behavior showed a confusing diff between document code and file code, making users think the code block would be updated. However, Option 2 only updates the CODE_REF comment and keeps the code block unchanged. Changes: - Remove code diff display for UPDATE_LINE_NUMBERS from CODE_CONTENT_MISMATCH - Show clear warning message that code block will remain unchanged - Remove unused extractLinesFromFile import This makes it clear that: - Option 1: Updates both CODE_REF and code block - Option 2: Updates only CODE_REF, code block needs manual adjustment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add note about color-coded output in CLI usage guide - Describe standardized color schemes and emoji indicators - Update following introduction of centralized message formatter
Add 48 test cases covering: - Basic message formatting (error, warning, info, success, neutral) - Verbose mode and debug functionality - Error detail formatting with optional location - Summary formatting with backup paths - Specialized messages (startFix, startValidation, file, backup, skip, context) - msg convenience export - COLOR_SCHEMES export - Special character handling (HTML, newlines, Unicode) - Edge cases (long messages, large numbers, many backups) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Feature/#36 unify style prompts
PR Review: Release - Update Style of Prompts for ConsistencySummaryThis PR introduces a centralized message formatting system to standardize CLI output across the Code Quality & Best Practices ✅Strengths
Code Style Adherence ✅The code follows all standards from
Potential Issues & Concerns1. Static State in MessageFormatter (Minor)Location: export class MessageFormatter {
private static verboseMode = false;Issue: Using static state for Suggestion: Consider passing verbose mode as a parameter to methods that need it, or document that this is intentional for CLI usage. 2. Missing Type Safety for Emojis (Minor)Location: The Suggestion: This is actually well-designed as-is. No action needed. 3. Regex Efficiency in formatCodeLine (Minor)Location: The function creates multiple regex instances on every line formatting call: keywords.forEach((keyword) => {
const regex = new RegExp(`\\b(${keyword})\\b`, 'g');
formattedLine = formattedLine.replace(regex, chalk.cyan('$1'));
});Impact: Low - this is for CLI output which is not performance-critical. Suggestion: For micro-optimization, pre-compile regexes as constants outside the function. 4. Code Duplication in Preview Display (Minor)Location: The Suggestion: Consider extracting helpers like Performance Concerns✅ No significant performance concerns. All changes are in CLI output formatting which is inherently I/O bound and not performance-critical. Security Concerns✅ No security issues identified. The changes are primarily cosmetic and don't introduce:
The code properly escapes special characters in regex patterns and uses chalk for safe terminal output. Test CoverageStrengths ✅
Gaps
|
|
🎉 This PR is included in version 0.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.