Skip to content

Add external commit message generator support#5300

Open
Iweisc wants to merge 2 commits intojesseduffield:masterfrom
Iweisc:master
Open

Add external commit message generator support#5300
Iweisc wants to merge 2 commits intojesseduffield:masterfrom
Iweisc:master

Conversation

@Iweisc
Copy link

@Iweisc Iweisc commented Feb 18, 2026

PR Description

Adds a git.commitMessageGenerator.command config option. When set, the configured shell command runs in the background each time the commit panel opens (new commits only). The command's
stdout 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:

git:
  commitMessageGenerator:
    command: "my-commit-msg-script"

Empty command = feature disabled (the default).

Please check if the PR fulfills these requirements

sertdev 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.
@Iweisc
Copy link
Author

Iweisc commented Feb 18, 2026

The second commit message was generated using this feature :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments