All notable changes to the "AI Code Explanation" extension will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Initial release of AI Code Explanation extension
- Core functionality for AI-powered code explanations using Google Gemini API
- Smart code selection and relationship detection
- Visual highlighting of selected and related code lines
- Dedicated sidebar panel for viewing explanations
- Explanation history with persistent storage
- Comprehensive configuration options
- Keyboard shortcuts and context menu integration
- Support for all VS Code supported programming languages
- Automatic and manual explanation modes
- Debounced selection handling for performance
- Error handling and retry logic with exponential backoff
- API key management and validation
- Connection testing functionality
- Comprehensive logging and debugging support
-
Smart Code Analysis: Automatically identifies related code lines including:
- Variable declarations and usages
- Function calls and definitions
- Control flow structures (if/else, loops, try/catch)
- Import dependencies
- Class members and relationships
-
Visual Highlighting:
- Selected line highlighting with "🎯 Selected" indicator
- Related lines highlighting with "🔗 Related" indicator
- Overview ruler indicators for easy navigation
- Customizable highlighting colors based on VS Code theme
-
AI Integration:
- Google Gemini API integration with configurable models
- Intelligent prompt building with code context
- Response validation and error handling
- Retry logic for transient failures
- Rate limiting awareness
-
User Interface:
- Dedicated webview panel in explorer sidebar
- Responsive design adapting to panel size
- Explanation history with timestamps and code snippets
- Loading states and error messages
- Copy to clipboard functionality
- Markdown-style formatting for explanations
-
Configuration:
- Secure API key storage in VS Code settings
- Configurable Gemini model selection
- Adjustable temperature and token limits
- Debounce delay customization
- Auto-explanation toggle
-
Developer Experience:
- Comprehensive keyboard shortcuts
- Context menu integration
- Command palette commands
- Extension status monitoring
- Detailed output logging
- Performance monitoring
- Architecture: Modular design with clear separation of concerns
- Error Handling: Comprehensive error categorization and recovery
- Performance: Debounced event handling and efficient code analysis
- Testing: Unit tests, integration tests, and end-to-end test coverage
- Code Quality: TypeScript with strict typing and ESLint configuration
- Documentation: Comprehensive inline documentation and README
aiCodeExplanation.setApiKey- Configure Gemini API keyaiCodeExplanation.explainCode- Explain selected codeaiCodeExplanation.toggleHighlights- Toggle code highlightingaiCodeExplanation.clearHighlights- Clear all highlightsaiCodeExplanation.testConnection- Test API connectivityaiCodeExplanation.showOutput- Show extension output logs
Ctrl+Shift+E(Cmd+Shift+Eon Mac) - Explain selected codeCtrl+Shift+H(Cmd+Shift+Hon Mac) - Toggle highlights
aiCodeExplanation.geminiApiKey- Gemini API keyaiCodeExplanation.model- Gemini model selectionaiCodeExplanation.temperature- AI response creativity (0-1)aiCodeExplanation.maxTokens- Maximum response lengthaiCodeExplanation.enableAutoExplanation- Auto-explain on selectionaiCodeExplanation.debounceDelay- Selection processing delay
@google/genai- Google Gemini API client- VS Code Engine
^1.74.0 - TypeScript for development
- ESLint for code quality
- Jest for testing
- Support for additional AI providers (OpenAI, Anthropic)
- Code explanation caching for improved performance
- Batch explanation for multiple selections
- Export explanations to various formats
- Integration with VS Code's built-in AI features
- Custom explanation templates
- Collaborative explanation sharing
- Advanced code relationship visualization
- Performance analytics and insights
- Multi-language explanation support
- Large files (>1000 lines) may experience slower analysis
- Complex nested code structures may have incomplete relationship detection
- API rate limiting may cause delays during heavy usage
- Some edge cases in code parsing for certain languages
We're actively seeking feedback on:
- Code relationship detection accuracy
- Explanation quality and usefulness
- Performance in different scenarios
- Additional features and improvements
- Integration with other VS Code extensions