✨ Features
- 🤯 Generate a commit message from staged git diffs through an OpenAI-compatible API.
- 🧠 Use the Responses API, with reasoning effort and output verbosity.
- 🔁 Keep models in priority order. A failure, rate limit, or timeout continues with the next model.
- 🛠️ Edit the system prompt in a multiline field. The default is
始终使用中文回答。
📦 Installation
- Search for "Commit Assist" in VSCode and click the "Install" button.
- Install it directly from the Visual Studio Code Marketplace.
Note
Make sure your node version >= 16
🤯 Usage
- Ensure that you have installed and enabled the "Commit Assist" extension.
- In VSCode settings, locate the "commit-assist" configuration options and configure them as needed.
- Make changes in your project and add the changes to the staging area (git add).
- (Optional) If you want to provide additional context for the commit message, type it in the Source Control panel's message input box before clicking the Commit Assist button.
- Next to the commit message input box in the "Source Control" panel, click the "Commit Assist" icon button. After clicking, the extension will generate a commit message (considering any additional context if provided) and populate it in the input box.
- Review the generated commit message, and if you are satisfied, proceed to commit your changes.
Note
If the code exceeds the maximum token length, consider adding it to the staging area in batches.
⚙️ Configuration
The system prompt is sent exactly as saved. Leave it empty to send no system prompt. Resetting restores 始终使用中文回答。
In the VSCode settings, locate the "commit-assist" configuration options and configure them as needed:
| Configuration |
Type |
Default |
Required |
Notes |
| AI_PROVIDER |
string |
openai |
Yes |
Only OpenAI. It is selected by default. |
| OPENAI_API_KEY |
string |
empty |
Yes |
OpenAI API key. |
| OPENAI_BASE_URL |
string |
empty |
No |
Optional base URL. Leave empty to use the official endpoint. |
| OPENAI_MODEL |
string[] |
gpt-4o |
Yes |
Models in priority order. A failure, rate limit, or timeout uses the next model. |
| OPENAI_TEMPERATURE |
number |
0.7 |
No |
Randomness from 0 to 2. Higher is more random. |
| OPENAI_API_TYPE |
string |
completion |
No |
completion or response. |
| OPENAI_REASONING_EFFORT |
string |
medium |
No |
Responses API only: minimal, low, medium, high. |
| OPENAI_TEXT_VERBOSITY |
string |
medium |
No |
Responses API only: low, medium, high. |
| COMMIT_ASSIST_LANGUAGE |
string |
Simplified Chinese |
No |
Stored language preference. It does not rewrite the system prompt. |
| COMMIT_ASSIST_SYSTEM_PROMPT |
string |
empty |
No |
Multiline system prompt. Empty sends no system prompt. |
⌨️ Local Development
You can use Github Codespaces for online development:

Alternatively, you can clone the repository and run the following commands for local development:
$ git clone https://github.com/hxyou/commit-assist.git
$ cd commit-assist
$ npm install
Open the project folder in VSCode. Press F5 to run the project. This will open a new Extension Development Host window and launch the plugin within it.
🤝 Contributing
Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what you’re made of.

💗 All Thanks To Our Contributors

📝 License
This project is MIT licensed.