Add external commit message generator support#5300
Open
Iweisc wants to merge 2 commits intojesseduffield:masterfrom
Open
Add external commit message generator support#5300Iweisc wants to merge 2 commits intojesseduffield:masterfrom
Iweisc wants to merge 2 commits intojesseduffield:masterfrom
Conversation
added 2 commits
February 18, 2026 12:57
Add a new `git.commitMessageGenerator.command` config option that runs a shell command in the background when the commit panel opens. The command output populates both the summary and description fields of the native commit panel. If the user starts typing before the command finishes, the result is silently discarded.
…essage generation Add a new `git.commitMessageGenerator` configuration option that allows users to specify a shell command to generate commit messages from staged changes (e.g. using AI tools). The command should call `git diff --cached` itself and output a commit message where the first line is the title and the rest after a blank line is the body. Also extract the "Generating commit message..." subtitle string into the translation set for localization support, and update the JSON schema to include the new configuration definition.
Author
|
The second commit message was generated using this feature :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Adds a
git.commitMessageGenerator.commandconfig option. When set, the configured shell command runs in the background each time the commit panel opens (new commits only). The command'sstdout populates the summary and description fields — first line becomes the summary, everything after the first blank line becomes the description.
If the user starts typing before the command finishes, the output is discarded.
The command is responsible for its own input (e.g. running
git diff --cached). Any script or binary works.Example config:
Empty command = feature disabled (the default).
Please check if the PR fulfills these requirements