BREAKING CHANGE: This PR introduces a major new feature set that significantly expands CodeWhisper's capabilities, transforming it from a documentation-focused tool to a powerful AI-driven coding assistant. Due to the extensive changes and new dependencies, this update requires a major version bump.
AI-Assisted Code Generation in CodeWhisper
This PR introduces advanced AI-assisted code generation capabilities to CodeWhisper, marking a significant evolution in its functionality. The new features enable users to leverage AI for task planning, code generation, and implementation, all seamlessly integrated with CodeWhisper's existing strengths in documentation and file handling.
Key Features
AI-Driven Task Workflow:
New task command in CLI for initiating AI-assisted coding tasks
Interactive task description input using a multi-line editor
AI-generated implementation plans with user review and editing capabilities
AI-powered code generation based on approved plans
Enhanced File Handling:
Utilization of CodeWhisper's existing file selection mechanism for providing context to AI
Improved file processing with support for various file types and comment handling
Git Integration:
Automatic creation of new git branches for AI-generated changes
Smart branch naming to avoid conflicts
Option to automatically commit changes or review before committing
AI Model Flexibility:
Support for multiple AI models, including various Claude and GPT (nyi) models
Configurable model selection for different tasks
Cost Management:
Token usage estimation and cost calculation for AI operations
Customizable cost thresholds to prevent unexpected expenses
Dry Run Capability:
Option to preview AI-generated changes without applying them to the codebase
Option to apply the previewed changes generated by a dry run
Enhanced Logging and Error Handling:
Comprehensive logging system using Winston for better debugging and monitoring
Improved error handling throughout the AI-assisted workflow
Technical Enhancements
Integration with Vercel's AI SDK for interaction with Claude AI models
New modules for AI interaction, prompt engineering, and code generation
Expanded TypeScript type definitions for improved type safety
Enhanced template system for AI prompts using Handlebars
User Experience Improvements
Seamless integration of AI features with existing CodeWhisper CLI interface
Interactive prompts for task description and plan review
Detailed output of AI-generated plans and code changes
Cost estimation and reporting for transparency
Breaking Changes
New dependencies added for AI functionality and git operations
Changes to the CLI interface with the addition of the task command
Potential changes in behavior for existing file processing functions due to enhancements
Migration Guide
Users upgrading to this version should:
Review the updated documentation for new AI-assisted features
Ensure all new dependencies are properly installed
Update any scripts or workflows that rely on CodeWhisper's CLI to accommodate the new task command
Be aware of potential changes in file processing behavior and test existing workflows
Future Work
Update documentation
More comprehensive tests
OpenAI model support is prepared but not finalized yet
Further refinement of user experience based on feedback
Performance optimizations for large-scale codebases
Integration with issue tracking systems on GitHub / Gitlab, ...
Integration with PRs on GitHub / Gitlab
This major update positions CodeWhisper as a versatile tool for both documentation and AI-assisted code development, significantly expanding its utility for developers and teams.
feat(ai): Implement AI-assisted code generation capabilities
BREAKING CHANGE: This PR introduces a major new feature set that significantly expands CodeWhisper's capabilities, transforming it from a documentation-focused tool to a powerful AI-driven coding assistant. Due to the extensive changes and new dependencies, this update requires a major version bump.
AI-Assisted Code Generation in CodeWhisper
This PR introduces advanced AI-assisted code generation capabilities to CodeWhisper, marking a significant evolution in its functionality. The new features enable users to leverage AI for task planning, code generation, and implementation, all seamlessly integrated with CodeWhisper's existing strengths in documentation and file handling.
Key Features
AI-Driven Task Workflow:
task
command in CLI for initiating AI-assisted coding tasksEnhanced File Handling:
Git Integration:
AI Model Flexibility:
Cost Management:
Dry Run Capability:
Enhanced Logging and Error Handling:
Technical Enhancements
User Experience Improvements
Breaking Changes
task
commandMigration Guide
Users upgrading to this version should:
task
commandFuture Work
This major update positions CodeWhisper as a versatile tool for both documentation and AI-assisted code development, significantly expanding its utility for developers and teams.