English | ็ฎไฝไธญๆ
Deutsch |
Espaรฑol |
Franรงais |
ๆฅๆฌ่ช |
ํ๊ตญ์ด |
Portuguรชs |
ะ ัััะบะธะน |
ไธญๆ
💡 Why Dish AI Commit Gen?
Unlike other AI commit tools, we provide the most comprehensive AI provider support (20+ providers), pioneering semantic code analysis (Tree-sitter + Qdrant), and multi-dimensional intelligent generation (commits, branches, PR summaries, weekly reports). Built with enterprise-grade architecture following SOLID principles for maximum maintainability and extensibility.
🚀 Core Features Overview
🤖 AI-Powered Generation
- Commit Message Generation: Intelligent commit messages from code changes with context-aware analysis
- Branch Name Generation: Smart branch naming based on requirements or code changes
- PR Summary Generation: Auto-generate PR titles and descriptions from commit history
- Weekly Report Generation: AI-powered work summaries and progress tracking
- Code Review: AI-assisted code review with detailed feedback
🏗๏ธ Advanced Architecture
- Modular Design: SOLID principles, core classes < 200 lines
- Multi-layer Architecture: Command โ Handler โ Builder โ Service โ Utils
- Graceful Degradation: Multi-level fallback for Git and SVN
- Unified AI Interface: 20+ providers with consistent API
🧠 Intelligent Analysis
- Semantic Indexing: Tree-sitter + Qdrant vector database
- Context Collection: Automatic code change analysis and context building
- Framework Detection: Framework-specific commit suggestions
- Smart Caching: LRU cache for performance optimization
🎨 Modern UI
- Interactive Chat: Real-time commit generation through natural language
- Dynamic Settings: Schema-driven auto-generated configuration UI
- Multi-language Support: 18 languages including English and Chinese
- System Notifications: Cross-platform native notifications
โจ What's New (v0.56.1)
🔥 Latest Features
- Xiaomi MiMo Support: Added Xiaomi's MiMo as a new AI service provider
- Enhanced Settings Migration: Improved robustness and traceability for settings migration
- Framework-Specific Suggestions: Intelligent commit suggestions based on project type
- Commit Caching: LRU cache mechanism to improve performance
- New User Onboarding: Enhanced guidance and configuration file robustness
- Performance Optimizations: Optimized commit generation and logging
📊 Recent Major Features
- Cross-Repository Support: Handle multiple repositories in single workspace
- Function Calling Mode: Structured commit messages via AI function calling
- Dynamic Settings UI: Auto-generated configuration interface
- System Notifications: Native notifications (macOS, Windows, Linux)
- Layered Commits: Multi-file commit with detailed descriptions
🤖 Comprehensive AI Provider Support
Provider Categories
| Category |
Providers |
Key Features |
Best For |
| Premium AI |
OpenAI (GPT-3.5/4/4o, o1-preview/mini) |
Highest quality, latest models |
Production use |
| Local Deployment |
Ollama, LM Studio |
100+ open-source models, privacy |
Data-sensitive environments |
| VSCode Integration |
GitHub Copilot |
Built-in VSCode AI service |
Copilot subscribers |
| Chinese AI Services |
Zhipu AI, DashScope, Doubao, Deepseek, Baidu Qianfan, Xiaomi MiMo |
Excellent Chinese processing |
Chinese users |
| International |
Gemini, Claude, Mistral, SiliconFlow, OpenRouter |
Global reach, diverse options |
International teams |
| Enterprise |
Azure OpenAI, Vertex AI, Cloudflare Workers AI |
Enterprise-grade security |
Large organizations |
| Open Source |
Together AI, X.AI (Grok), Groq, Prem AI |
Cost-effective, community-driven |
Budget-conscious users |
🆓 Free AI Models
- Zhipu AI (GLM-4-Flash): Fixed monthly free quota (Get API Key)
- Gemini AI: 1,500 free requests per day (Get API Key)
- Ollama: Completely free local deployment with 100+ models
- LM Studio: Free local model hosting and management
- Xiaomi MiMo: Competitive pricing with excellent Chinese support
📝 Version Control System Support
Git Support
- VS Code Git API: Full integration with VS Code's Git extension
- CLI Fallback: Command-line Git operations when API unavailable
- Multi-repository: Handle multiple Git repositories in workspace
- Smart Detection: Automatic repository detection and switching
SVN Support
- SVN SCM Extension: Integration with VS Code SVN extension
- CLI Implementation: Direct SVN command-line operations
- Graceful Degradation: 3-level fallback (API โ CLI โ Simple CLI)
- Unified Interface: Same API as Git for seamless switching
🏗๏ธ Architecture Highlights
Modular Design (SOLID Principles)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Command Layer โ
โ GenerateCommitCommand (222 lines) โ
โ GenerateBranchNameCommand (146 lines) โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ Handler Layer โ
โ โข StreamingHandler โ
โ โข FunctionCallingHandler โ
โ โข LayeredCommitHandler โ
โ โข CrossRepositoryHandler โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ Builder Layer โ
โ โข CommitContextBuilder โ
โ โข CommitMessageBuilder โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ Service Layer โ
โ โข CommitCacheService โ
โ โข NotificationService โ
โ โข SettingsMigration โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ Utils Layer โ
โ โข StreamingGenerationHelper โ
โ โข ContextCollector โ
โ โข CommitFormatter โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Smart Caching: LRU cache with MD5-based keys (50 items max)
- Incremental Indexing: Only updates changed files
- Context Management: Intelligent prompt length optimization
- Request Retries: Automatic retry with exponential backoff
โ๏ธ Configuration
Core Settings
| Configuration |
Type |
Default |
Description |
dish-ai-commit.base.language |
string |
Simplified Chinese |
Commit message language |
dish-ai-commit.base.provider |
string |
OpenAI |
Active AI provider |
dish-ai-commit.base.model |
string |
gpt-3.5-turbo |
Active AI model |
dish-ai-commit.providers.openai.apiKey |
string |
"" |
OpenAI API key |
dish-ai-commit.providers.mimo.apiKey |
string |
"" |
Xiaomi MiMo API key |
dish-ai-commit.providers.ollama.baseUrl |
string |
http://localhost:11434 |
Ollama API URL |
dish-ai-commit.features.commitFormat.enableEmoji |
boolean |
true |
Use emoji in commits |
dish-ai-commit.features.commitFormat.enableBody |
boolean |
true |
Include commit body |
dish-ai-commit.features.commitFormat.enableMergeCommit |
boolean |
false |
Merge multiple files |
dish-ai-commit.features.codeIndex.enabled |
boolean |
false |
Enable semantic indexing |
dish-ai-commit.features.codeIndex.provider |
string |
ollama |
Embedding provider |
dish-ai-commit.features.codeIndex.qdrantUrl |
string |
http://localhost:6333 |
Qdrant URL |
Available Commands
| Command ID |
Title |
Description |
dish-ai-commit.selectModel |
Select AI Model |
Choose provider and model |
dish-ai-commit.generateCommitMessage |
Generate Commit |
Generate commit from changes |
dish-ai-commit.generateBranchName |
Generate Branch Name |
Create standardized branch |
dish-ai-commit.generateWeeklyReport |
Generate Weekly Report |
AI-powered work summary |
dish-ai-commit.generatePRSummary |
Generate PR Summary |
PR title and description |
dish-ai-commit.reviewCode |
Code Review |
AI-assisted code review |
📋 Configuration Examples
1. OpenAI Configuration
{
"dish-ai-commit.base.provider": "openai",
"dish-ai-commit.providers.openai.apiKey": "sk-...",
"dish-ai-commit.providers.openai.baseUrl": "https://api.openai.com/v1"
}
2. Xiaomi MiMo Configuration
{
"dish-ai-commit.base.provider": "mimo",
"dish-ai-commit.providers.mimo.apiKey": "your-mimo-key"
}
3. Ollama Local Configuration
{
"dish-ai-commit.base.provider": "ollama",
"dish-ai-commit.providers.ollama.baseUrl": "http://localhost:11434"
}
4. GitHub Copilot Configuration
{
"dish-ai-commit.base.provider": "vscode"
}
🚀 Quick Start
Installation
- Search "Dish AI Commit" in VS Code Extension Marketplace
- Click Install
- Restart VS Code
- Configure your preferred AI provider
Basic Usage
Generate Commit Message
- Open Source Control view (Git or SVN)
- Select files to commit
- Click "Dish AI Commit" icon in SCM title bar
- Or use Command Palette:
Dish AI Commit: Generate Commit Message
- AI generates commit message automatically
Generate Branch Name
- Use Command Palette:
Dish AI Commit: Generate Branch Name
- Choose mode:
- From Description: Enter feature description
- From Changes: Use current code changes
- Select from suggested branch names
- Branch is created automatically
Interactive Chat
- Open Command Palette:
Dish AI Commit: Open Chat Interface
- Type your requirements in natural language
- Use commands:
/help, /template, /style, /language
- Get real-time commit suggestions
📚 Documentation
Core Modules
Architecture Deep Dive
- Modular Design: All core commands follow SOLID principles
- Graceful Degradation: Multi-level fallback mechanisms
- Performance: LRU caching, incremental indexing, smart context management
- Security: Secret storage, input validation, error handling
🛠๏ธ Development
Prerequisites
- Node.js 18.20.8+
- pnpm 10.0.0+
- VS Code 1.80.0+
Setup
# Clone repository
git clone https://github.com/littleCareless/dish-ai-commit
cd dish-ai-commit
# Install dependencies
pnpm install
# Start development
pnpm dev
# Build extension
pnpm build
# Package extension
pnpm package
Project Structure
src/
โโโ ai/ # AI providers and model registry
โโโ commands/ # Feature commands (commit, branch, etc.)
โโโ scm/ # Git/SVN integration
โโโ services/ # Business services (cache, notification)
โโโ config/ # Configuration schema
โโโ core/ # Core extension logic
โโโ utils/ # Utility functions
โโโ i18n/ # Internationalization
โโโ prompt/ # AI prompt templates
โโโ extension.ts # Extension entry point
webview-ui/
โโโ src/ # React frontend
โ โโโ components/ # UI components
โ โโโ services/ # Webview services
โ โโโ hooks/ # React hooks
โโโ package.json # Frontend dependencies
Code Quality Standards
- โ
Single file < 500 lines (core classes < 200 lines)
- โ
Clear separation of concerns
- โ
Comprehensive TypeScript types
- โ
Unit tests for critical paths
- โ
Documentation for public APIs
Get Help & Share Ideas
- Be respectful and constructive
- Provide detailed information (version, OS, config)
- Include screenshots when applicable
- Search existing issues before creating new ones
Stay Updated
- โญ Star the repo to get notified of new releases
- 👀 Watch for issue and PR updates
- 📧 Follow for important announcements
🤝 Contributing
We welcome all contributions!
How to Contribute
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'feat: add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
Contribution Guidelines
- Follow existing code style and patterns
- Add tests for new functionality
- Update documentation
- Ensure all checks pass
- Reference related issues
Development Workflow
# Install dependencies
pnpm install
# Start development mode
pnpm dev
# Run tests
pnpm test
# Check types
pnpm check-types
# Lint code
pnpm lint
# Format code
pnpm format
📊 Project Statistics
Code Metrics
- Total Files: 100+ TypeScript files
- Core Commands: 2 main commands (refactored to < 400 lines total)
- AI Providers: 20+ supported
- Languages: 18 supported languages
- Test Coverage: Comprehensive unit tests
Refactoring Achievements
- GenerateCommit: 636 lines โ 222 lines (65% reduction)
- GenerateBranchName: 674 lines โ 146 lines (78% reduction)
- Architecture: Monolithic โ Modular (SOLID principles)
🙏 Acknowledgments
This project is inspired by and references these excellent open source projects:
📄 License
This project is MIT licensed.
Version: v0.56.1
Last Updated: December 2024
Architecture: SOLID Principles
Status: โ
Production Ready