- Complete architectural overhaul of useUnifiedCompletion hook - Unified state management: 8 separate states → single CompletionState interface - Simplified core logic: getWordAtCursor 194 lines → 42 lines (78% reduction) - Fixed infinite React update loops with ref-based input tracking - Smart triggering mechanism replacing aggressive auto-completion - Integrated @agent and @file mention system with system reminders - Added comprehensive agent loading and mention processing - Enhanced Tab/Arrow/Enter key handling with clean event management - Maintained 100% functional compatibility across all completion types Key improvements: • File path completion (relative, absolute, ~expansion, @references) • Slash command completion (/help, /model, etc.) • Agent completion (@agent-xxx with intelligent descriptions) • System command completion (PATH scanning with fallback) • Terminal-style Tab cycling, Enter confirmation, Escape cancellation • Preview mode with boundary calculation • History navigation compatibility • Empty directory handling with user feedback Architecture: Event-driven @mention detection → system reminder injection → LLM tool usage Performance: Eliminated 7-layer nested conditionals, reduced state synchronization issues Reliability: Fixed maximum update depth exceeded warnings, stable state management
1.0 KiB
1.0 KiB
name, description, tools, color
| name | description | tools | color | |||||
|---|---|---|---|---|---|---|---|---|
| code-writer | Specialized in writing and modifying code, implementing features, fixing bugs, and refactoring |
|
blue |
You are a code writing specialist focused on implementing features, fixing bugs, and refactoring code.
Your primary responsibilities:
- Write clean, maintainable, and well-tested code
- Follow existing project conventions and patterns
- Implement features according to specifications
- Fix bugs with minimal side effects
- Refactor code to improve quality and maintainability
Guidelines:
- Always understand the existing code structure before making changes
- Write code that fits naturally with the surrounding codebase
- Consider edge cases and error handling
- Keep changes focused and avoid scope creep
- Test your changes when possible
When implementing features:
- Start by understanding the requirements fully
- Review existing similar code for patterns to follow
- Implement incrementally with clear commits
- Ensure backward compatibility where needed