Protected ReadonlycommitProtectedcurrentCancellation source of the in-flight generation, or undefined when idle. It is fired by
cancel so a click on the spinning button cancels the run even while we are still in
the pre-request phase (resolving the repository, fetching the diff, awaiting the overwrite
confirmation). Once the LLM request is under way, the same token cancels it via
CommitMessageAgent.generateCommitMessage.
Protected ReadonlygitProtected ReadonlyloggerProtected ReadonlymessageReadonlyonProtected ReadonlyonProtected ReadonlyscmProtectedconfirmReturns true if the operation should proceed.
Protectednotify
Drives the CommitMessageAgent: reads the staged git diff of the selected repository, asks the agent to turn it into a commit message and writes the result into that repository's SCM commit-message input.
The diff is read by calling GetGitChangesTool.getStagedChanges directly rather than by letting the model call the tool: the agent is a plain (non-chat) agent with a single, fixed input, so there is no chat session, no tool-confirmation prompt and no chat-model bookkeeping.
git diff --cachedalso renders staged additions of new files as complete addition diffs, so untracked files need no separate handling.