Table of contents
TOC
🚀 Quick Start
Installation
- Install from VS Code Marketplace
- Configure AI Service
- Start Using
Features
🤖 AI Service Integration
OpenAI API
|
Local AI - Ollama
|
VSCode Built-in AI
|
Free AI Services
|
OpenAI API
- Supports GPT-3.5/GPT-4 models
- Best for high-quality generation results
- Usage-based pricing
Local AI Model - Ollama
- Offline deployment capability
- Support for open-source models
- Enhanced data privacy
VSCode Built-in AI
- Leverages GitHub Copilot
- Seamless VSCode integration
- Requires Copilot subscription
Free AI Services
- Zhipu AI (GLM-4) - Monthly free quota
- Gemini AI - 1500 requests/day
- Doubao AI - 50 QPS, 100K TPM
- DashScope - Enterprise-grade service
📝 Version Control Support
Multiple VCS Support
- Git integration
- SVN integration
- Unified commit message interface
Conventional Commits
- Standard commit message format
- Type/scope/description structure
- Breaking changes support
- Automatic scope detection
Emoji Enhancement
- Automatic emoji insertion
- Type-based emoji matching
- Configurable emoji support
🔍 Code Intelligence
Smart Diff Analysis
- Intelligent code change detection
- Context-aware analysis
- Customizable analysis depth
- Multi-file change support
Code Review
- AI-powered review suggestions
- Quality and performance checks
- Multiple provider support
📊 Reporting & Analysis
- Weekly Report Generation
- AI-based work summarization
- Customizable templates
- Multi-provider support
- Project/task organization
🌍 Language Support
- 19 Languages Available
- Major languages: English, Chinese (Simplified/Traditional), Japanese, Korean
- European languages: German, French, Italian, etc.
- Southeast Asian languages: Indonesian, Vietnamese, Thai
- Customizable language settings
âī¸ Advanced Features
Merge Commit Support
- Multi-file change analysis
- Smart commit message aggregation
- Relationship detection
Customization Options
- Configurable AI providers
- Adjustable code analysis parameters
- Custom prompts and templates
- Flexible formatting options
📋 Requirements
- VS Code 1.80.0+
- SVN Command Line Tool
- SVN SCM (Optional) - Install SVN SCM v2.18.1+ if you need to enter commit messages in VSCode's SCM input box
- Download the latest version of the SVN SCM extension from the release page
- Git SCM (Optional) - Install Git SCM if you need to enter commit messages in VSCode's SCM input box
- Valid AI service configuration (OpenAI API Key or Ollama service)
Configuration
Configuration |
Type |
Default |
Description |
dish-ai-commit.base.language |
string |
Simplified Chinese |
Language selection for commit messages, supports 19 languages including Chinese, English, Japanese, etc. |
dish-ai-commit.base.systemPrompt |
string |
"" |
Global custom system prompt for personalizing AI-generated commit message behavior |
dish-ai-commit.base.provider |
string |
OpenAI |
AI service provider selection (OpenAI/Ollama/VS Code/Zhipu/DashScope/Doubao/Gemini) |
dish-ai-commit.base.model |
string |
gpt-3.5-turbo |
Name of AI model to use (e.g., OpenAI's gpt-3.5-turbo/gpt-4, Zhipu's glm-4, etc.) |
dish-ai-commit.providers.openai.apiKey |
string |
"" |
OpenAI API key for accessing GPT services |
dish-ai-commit.providers.openai.baseUrl |
string |
https://api.openai.com/v1 |
OpenAI API base URL, can configure proxy address or custom endpoint |
dish-ai-commit.providers.zhipu.apiKey |
string |
"" |
Zhipu AI API key, supports GLM series models |
dish-ai-commit.providers.dashscope.apiKey |
string |
"" |
Alibaba Cloud Tongyi Qianwen API key, supports Tongyi series models |
dish-ai-commit.providers.doubao.apiKey |
string |
"" |
Doubao AI API key, supports high concurrency requests |
dish-ai-commit.providers.ollama.baseUrl |
string |
http://localhost:11434 |
Ollama local service address, supports custom model deployment |
dish-ai-commit.providers.gemini.apiKey |
string |
"" |
Google Gemini AI API key, supports daily free quota |
dish-ai-commit.features.codeAnalysis.simplifyDiff |
boolean |
false |
Enable diff content simplification, can reduce complexity but may affect accuracy |
dish-ai-commit.features.codeAnalysis.maxLineLength |
number |
120 |
Maximum line length limit for simplified code, affects readability |
dish-ai-commit.features.codeAnalysis.contextLines |
number |
3 |
Number of context lines retained during code analysis, used to understand code changes |
dish-ai-commit.features.commitFormat.enableMergeCommit |
boolean |
false |
Allow merging changes from multiple related files into a single commit message |
dish-ai-commit.features.commitFormat.enableEmoji |
boolean |
true |
Use emojis in commit messages to enhance readability |
dish-ai-commit.features.weeklyReport.systemPrompt |
string |
"" |
Custom system prompt for weekly report generation, used to personalize report style |
dish-ai-commit.features.codeReview.systemPrompt |
string |
"Custom system prompt" |
Custom system prompt for code review, guiding AI to conduct code review |
Commands
Command ID |
Category |
Title |
Description |
dish-ai-commit.selectModel |
[Dish AI Commit] |
Select AI Model for Commit Generation |
Choose the AI model for generating commit messages |
dish-ai-commit.generateWeeklyReport |
[Dish AI Commit] |
Generate Weekly Report |
Generate AI-powered weekly work report |
dish-ai-commit.reviewCode |
[Dish AI Commit] |
Review Code |
Generate AI-powered code review suggestions |
Configuration Instructions
- OpenAI Configuration
{
"dish-ai-commit.base.provider": "openai",
"dish-ai-commit.providers.openai.apiKey": "your-api-key",
"dish-ai-commit.providers.openai.baseUrl": "https://api.openai.com/v1",
"dish-ai-commit.base.model": "gpt-3.5-turbo" // Optional: gpt-4, gpt-3.5-turbo etc
}
- Ollama Configuration (Local Deployment)
{
"dish-ai-commit.base.provider": "ollama",
"dish-ai-commit.providers.ollama.baseUrl": "http://localhost:11434",
"dish-ai-commit.base.model": "llama2" // Choose based on locally installed models
}
- VSCode Configuration (Requires GitHub Copilot subscription)
{
"dish-ai-commit.base.provider": "vscode"
}
- Zhipu AI Configuration (Free Quota)
{
"dish-ai-commit.base.provider": "zhipu",
"dish-ai-commit.providers.zhipu.apiKey": "your-api-key",
"dish-ai-commit.base.model": "glm-4" // Optional: glm-4, glm-3-turbo
}
- DashScope Configuration
{
"dish-ai-commit.base.provider": "dashscope",
"dish-ai-commit.providers.dashscope.apiKey": "your-api-key"
}
- Doubao AI Configuration (High Concurrency Limit)
{
"dish-ai-commit.base.provider": "doubao",
"dish-ai-commit.providers.doubao.apiKey": "your-api-key"
}
- Gemini AI Configuration (Daily Free Quota)
{
"dish-ai-commit.base.provider": "gemini",
"dish-ai-commit.providers.gemini.apiKey": "your-api-key"
}
- General Feature Configuration
{
"dish-ai-commit.base.language": "Simplified Chinese", // Set commit message language
"dish-ai-commit.features.commitFormat.enableEmoji": true, // Enable emoji
"dish-ai-commit.features.commitFormat.enableMergeCommit": true, // Enable multi-file merge commits
"dish-ai-commit.features.codeAnalysis.simplifyDiff": false, // Whether to simplify diff content
"dish-ai-commit.features.codeAnalysis.maxLineLength": 120, // Maximum line length
"dish-ai-commit.features.codeAnalysis.contextLines": 3, // Number of context lines
"dish-ai-commit.features.weeklyReport.systemPrompt": "", // Custom weekly report generation prompt
"dish-ai-commit.features.codeReview.systemPrompt": "Please conduct a comprehensive code review, including code quality, performance, and security" // Custom code review prompt
}
📋 How to use
- Select the file to be submitted from the source code manager
- Click the "Dish AI Commit" icon in the source code manager title bar
- Or execute the "Dish AI Commit" command in the command panel
- AI will automatically generate a submission message that meets the specifications
📥 Install
- Search "Dish AI Commit" from the VS Code extension market
- Click to install
- Restart VS Code
- Configure AI service parameters according to actual needs
📝 Changelog
See CHANGELOG.md for a detailed version history.
📋 Dependency Requirements
- VS Code 1.80.0+
- SVN command line tool
- SVN SCM (optional) - To enter commit information in the SCM input box of VSCode, please install SVN SCM v2.18.1+
- Valid AI service configuration (OpenAI API Key or Ollama service)
💡 Frequently asked questions
- Ensure that the SVN command line tool is correctly installed and accessible
- Ensure that the SVN SCM extension is correctly installed and enabled
- Configure the correct AI service parameters
- Ensure that the network can access the selected AI service
🛠ī¸ Development Guide
You can use Github Codespaces for online development:
Alternatively, you can clone the repository and run the following command for local development:
$ git clone https://github.com/littleCareless/dish-ai-commit
$ cd ai-commit
$ npm install
Open the project folder in VSCode. Press F5 to run the project. A new Extension Development Host window will pop up and start the extension.
🤝 Contribution Guidelines
We welcome all forms of contributions, including but not limited to:
- Submit Issues to report bugs
- Propose new features
- Submit Pull Request to improve the code
- Improve the documentation
Please make sure before submitting a PR:
The code has been tested
Update the relevant documents
Follow the project code specifications
💗 Thanks to our contributors
🙏 Acknowledgments
This project is inspired by and references these excellent open source projects:
- svn-scm - SVN source control management for VSCode
- vscode - Visual Studio Code editor
- vscode-gitlens - Git supercharged for VSCode
- ai-commit - AI assisted Git commit message generation
📄 License
This project is MIT licensed.