GitHunt
AZ

AzronChan/dish-ai-commit

Vibe Coding!!! ๐Ÿค– AI-Powered VSCode extension for generating standardized Git/SVN commit messages. โœจ Supports multiple AI services: OpenAI, ChatGPT, Ollama, Zhipu, DashScope, Doubao, Gemini and VS Code built-in AI. ๐ŸŒ Multi-language support (EN/CN/JP/KR/Other). ๐Ÿ“Š Auto-generate weekly reports.

Dish AI Commit Gen

A VSCode extension for generating standardized Git/SVN commit messages using AI

Report Bug ยท Request Feature








Demo

English | ็ฎ€ไฝ“ไธญๆ–‡

Deutsch |
Espaรฑol |
franรงais |
ๆ—ฅๆœฌ่ชž |
ํ•œ๊ตญ์–ด |
Portuguรชs |
ะ ัƒััะบะธะน |
ไธญๆ–‡

A VSCode extension that uses AI to generate standardized Git/SVN commit messages. Supports OpenAI, Ollama, VSCode built-in AI service, Zhipu AI, DashScope, Gemini AI, Doubao AI, Deepseek AI, SiliconFlow and OpenRouter.

๐Ÿ†“ Free AI model support

  • Zhipu AI (GLM-4-Flash) - Fixed monthly free quota (Get API Key)
  • Gemini AI - 1,500 free requests per day (Get API Key)

โœจ What's New

  • PR Summary Generation: Automatically generate PR titles and descriptions based on Git commit history.
  • Code Semantic Indexing and Search: Utilizes tree-sitter and a vector database (Qdrant) to index the codebase semantically, providing richer context for generating commit messages and code reviews.
  • Function Calling Mode: An experimental feature that generates structured commit messages through the AI's function-calling capabilities.
  • Dynamic Settings UI: The plugin's settings interface is now dynamically generated based on configuration definitions, offering more flexible and detailed options.

Features

๐Ÿค– Multi-platform AI support

AI provider Features Applicable scenarios
OpenAI API High-quality generated results, support GPT-3.5/GPT-4 Scenarios that require high-quality output, charged by usage
Ollama Local deployment, support for multiple open source models Scenarios with high data privacy requirements
VSCode built-in AI Using GitHub Copilot Users with GitHub Copilot subscription
Zhipu AI (GLM-4) Excellent Chinese processing capabilities, fixed monthly free quota Chinese users, Chinese processing
DashScope Provided by Alibaba Cloud, supports Tongyi Qianwen series models Enterprise-level applications
Gemini AI Daily free quota of 1,500 requests Individual developers
Deepseek AI High-quality open source large model, Chinese and English bilingual optimization Multi-language support requirements
SiliconFlow High-performance AI reasoning platform Scenarios that require multi-model support
OpenRouter Open source AI routing service, multi-model support Flexible model selection requirements

๐Ÿ“ Version Control System Support

  • SVN
  • Git

๐Ÿ“Š Weekly Report Generation

  • AI-powered weekly report generation
  • Automatically summarize your work progress
  • Customizable report templates
  • Support multiple AI providers for report generation

๐ŸŒฟ Branch name generation

  • Automatically generate Git branch names that meet specifications
  • Intelligently create branch names based on requirements or function descriptions
  • Support multiple branch naming conventions and formats
  • Seamless integration with all AI providers
  • Improve team branch naming consistency

๐ŸŒ Multi-language Commit Message Generation

Supports the following 19 languages:

  • Simplified Chinese (็ฎ€ไฝ“ไธญๆ–‡)
  • Traditional Chinese (็น้ซ”ไธญๆ–‡)
  • Japanese (ๆ—ฅๆœฌ่ชž)
  • Korean (ํ•œ๊ตญ์–ด)
  • Czech (ฤŒeลกtina)
  • German (Deutsch)
  • French (Franรงais)
  • Italian (Italiano)
  • Dutch (Nederlands)
  • Portuguese (Portuguรชs)
  • Vietnamese (Tiแบฟng Viแป‡t)
  • English
  • Spanish (Espaรฑol)
  • Swedish (Svenska)
  • Russian (ะ ัƒััะบะธะน)
  • Bahasa Indonesia
  • Polish (Polski)
  • Turkish (Tรผrkรงe)
  • Thai (เน„เธ—เธข)

๐ŸŽจ Conventional Commits Compliant

Generates commit messages following the Conventional Commits specification:

  • Commit Message Format:

    <type>[optional scope]: <description>
    
    [optional body]
    
    [optional footer(s)]
    
  • Supported Commit Types:

    • feat: New feature
    • fix: Bug fix
    • docs: Documentation changes
    • style: Code style adjustments
    • refactor: Code refactoring
    • perf: Performance improvements
    • test: Test-related changes
    • build: Build-related changes
    • ci: CI/CD-related changes
    • chore: Other changes
    • revert: Revert commits
  • Automatic Scope Detection:

    • Automatically inferred from modified file paths
    • Smart categorization for multi-file changes
    • Customizable scope rules via configuration
  • Breaking Changes Support:

    • Mark breaking changes with !
    • Detailed impact description in body
    • Example: feat!: Restructure authentication system
  • Intelligent Description Generation:

    • Automatic code change analysis
    • Key modification point extraction
    • Clear and concise description generation

๐Ÿ˜„ Automatic Emoji Addition

  • Automatically adds emojis to commit messages
  • Can be enabled/disabled through configuration:
{
  "dish-ai-commit.features.commitFormat.enableEmoji": true // Enable emoji
}
  • Emojis automatically match commit types:
    • โœจ feat: New features
    • ๐Ÿ› fix: Bug fixes
    • ๐Ÿ“ docs: Documentation
    • ๐Ÿ’„ style: Styling
    • โ™ป๏ธ refactor: Refactoring
    • โšก๏ธ perf: Performance
    • โœ… test: Testing
    • ๐Ÿ”ง chore: Other changes

๐Ÿ“Š Code Analysis Features

  • Intelligent code difference analysis
  • Automatically simplify complex code changes
  • Preserve key context information

๐Ÿ”„ Merge Commit Support

By enabling the enableMergeCommit option, you can:

  • Merge changes from multiple related files into a single commit message
  • Automatically analyze file associations
  • Generate more concise commit records

๐Ÿ“‹ Subject-Only Commit Messages

By disabling the enableBody option, you can:

  • Generate commit messages with only the subject line (without body content)
  • Create more concise commit history
  • Focus on the essential information

Enable/disable through configuration:

{
  "dish-ai-commit.features.commitFormat.enableBody": false // Disable commit message body
}

๐Ÿ“ Weekly Report Templates

Weekly report generation supports custom templates:

  • Customize prompts via systemPrompt configuration
  • Summarize by project/task
  • Customize report format and key content

๐Ÿš€ PR Summary Generation

  • Automatic PR Summary Generation: Automatically generate PR titles and descriptions based on Git commit history.
  • Multi-AI Provider Support: Supports multiple AI providers for summary generation.
  • Customizable: Customizable summary templates.
  • Semantic Indexing: Utilizes tree-sitter and a vector database (Qdrant) to index the codebase semantically.
  • Context Enhancement: Provides richer context for generating commit messages and code reviews.
  • Multi-embedding Service Support: Supports multiple embedding services like Ollama and Qdrant.

๐Ÿ“ž Function Calling Mode

  • Structured Commits: An experimental feature that generates structured commit messages through the AI's function-calling capabilities.
  • Tool Integration: Allows the AI model to return structured commit message data through specified tools.

โš™๏ธ Dynamic Settings UI

  • Dynamic Generation: The plugin's settings interface is now dynamically generated based on configuration definitions.
  • Flexible Configuration: Offers more flexible and detailed configuration options.

Configuration

Configuration Type Default Description
dish-ai-commit.base.language string Simplified Chinese Commit message language
dish-ai-commit.base.systemPrompt string "" Custom system prompt
dish-ai-commit.base.provider string OpenAI AI provider
dish-ai-commit.base.model string gpt-3.5-turbo AI model
dish-ai-commit.providers.openai.apiKey string "" OpenAI API key
dish-ai-commit.providers.openai.baseUrl string https://api.openai.com/v1 OpenAI API base URL
dish-ai-commit.providers.zhipu.apiKey string "" Zhipu AI API key
dish-ai-commit.providers.dashscope.apiKey string "" DashScope API key
dish-ai-commit.providers.doubao.apiKey string "" Doubao API key
dish-ai-commit.providers.ollama.baseUrl string http://localhost:11434 Ollama API base URL
dish-ai-commit.providers.gemini.apiKey string "" Gemini AI API key
dish-ai-commit.providers.deepseek.apiKey string "" Deepseek AI API key
dish-ai-commit.providers.siliconflow.apiKey string "" SiliconFlow API key
dish-ai-commit.providers.openrouter.apiKey string "" OpenRouter API key
dish-ai-commit.features.codeAnalysis.simplifyDiff boolean false Enable diff content simplification
dish-ai-commit.features.commitFormat.enableMergeCommit boolean false Allow merging multiple file changes into one commit
dish-ai-commit.features.commitFormat.enableEmoji boolean true Use emoji in commit messages
dish-ai-commit.features.commitFormat.enableBody boolean true Include body content in commit messages
dish-ai-commit.features.weeklyReport.systemPrompt string "" Custom system prompt for weekly reports
dish-ai-commit.features.prSummary.systemPrompt string "" Custom system prompt for PR summaries
dish-ai-commit.features.codeIndex.enabled boolean false Enable code semantic indexing
dish-ai-commit.features.codeIndex.provider string "ollama" Embedding provider for code indexing
dish-ai-commit.features.codeIndex.model string "nomic-embed-text" Embedding model for code indexing
dish-ai-commit.features.codeIndex.qdrantUrl string "http://localhost:6333" Qdrant vector database URL

Commands

Command ID Category Title Description
dish-ai-commit.selectModel [Dish AI Commit] Select the AI โ€‹โ€‹model for commit generation Select the AI โ€‹โ€‹model for generating commit messages
dish-ai-commit.generateWeeklyReport [Dish AI Commit] Generate weekly report Generate AI-driven weekly work report
dish-ai-commit.generateBranchName [Dish AI Commit] Generate branch name Generate standardized branch name based on requirement description
dish-ai-commit.generateCommitMessage [Dish AI Commit] Generate commit message Generate a commit message that complies with the specification
dish-ai-commit.reviewCode [Dish AI Commit] Code review AI-assisted code review
dish-ai-commit.generatePRSummary [Dish AI Commit] Generate PR Summary Generate PR summary based on Git commit history

Configuration Instructions

  1. 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"
}
  1. Ollama Configuration
{
  "dish-ai-commit.base.provider": "ollama",
  "dish-ai-commit.providers.ollama.baseUrl": "http://localhost:11434"
}
  1. VSCode Configuration
{
  "dish-ai-commit.base.provider": "vscode"
}
  1. Deepseek AI Configuration
{
  "dish-ai-commit.base.provider": "deepseek",
  "dish-ai-commit.providers.deepseek.apiKey": "your-api-key"
}
  1. SiliconFlow Configuration
{
  "dish-ai-commit.base.provider": "siliconflow",
  "dish-ai-commit.providers.siliconflow.apiKey": "your-api-key"
}
  1. OpenRouter Configuration
{
  "dish-ai-commit.base.provider": "openrouter",
  "dish-ai-commit.providers.openrouter.apiKey": "your-api-key"
}

๐Ÿ“‹ 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

  1. Search "Dish AI Commit" from the VS Code extension market
  2. Click to install
  3. Restart VS Code
  4. 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) - 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)

๐Ÿ’ก 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:

github-codespace

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:

  1. The code has been tested

  2. Update the relevant documents

  3. 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.