{{ message }}
Repository navigation
Agents window: commit customization changes through core git instead copilot extension commands - #343149
Open
Vijay Upadya (vijayupadya) wants to merge 3 commits into
Open
Agents window: commit customization changes through core git instead copilot extension commands#343149Vijay Upadya (vijayupadya) wants to merge 3 commits into
Vijay Upadya (vijayupadya) wants to merge 3 commits into
Conversation
…of Copilot extension commands
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
$commitFilescurrently stages the provided paths and then commits the entire index. If the user… · New_editorHasUncommittedSaveis cleared before the commit runs. IfcommitCustomization(...)… · New Prefer routing errors through the workbench logging/error utilities used elsewhere in this file… · New
What changed in this PR
Moves Agents window customization commits off legacy Copilot CLI session-provider commands and into core git plumbing via IGitService, while fixing editor/list issues that prevented commits from triggering in common workflows (auto-save, Ctrl+S, delete).
Changes:
- Add
IGitRepository.commitFiles(...)and wire it through the git delegate + RPC boundary (main thread ↔ ext host). - Update customization workspace service to stage+commit via core git and improve failure notifications.
- Fix customization management UI commit triggers: correct delete context source, add explicit save handling, and serialize commits.
Review effort: Lite
Vijay Upadya (vijayupadya)
marked this pull request as ready for review
October 21, 2026 14:39
Vijay Upadya (vijayupadya)
enabled auto-merge (squash)
October 21, 2026 14:39
This branch has not been deployed
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.




What
The Agents window commits customization saves and deletions to the repository and the session worktree. Until now it did this by running
github.copilot.cli.sessions.commitToRepositoryandgithub.copilot.cli.sessions.commitToWorktree, which are registered only by the legacy Copilot CLI session provider inextensions/copilot. Removing that provider would make every customization save or delete in a worktree session fail with "command not found".This PR moves the git stage and commit into core, using the built-in git extension through
IGitService, and fixes two bugs in the Customizations editor that stopped commits from happening in the Agents window.Changes
IGitRepository.commitFiles(files, message, options?)stages files, including deletions, and commits. It is plumbed throughIGitExtensionDelegate,MainThreadGitExtensionService, a new$commitFilesRPC andExtHostGitExtensionService. Nothing to commit and not-a-git-repository resolve as no-ops. The extension host does this check because git error codes don't survive the RPC.SessionsAICustomizationWorkspaceService: callsIGitService.openRepository(...).commitFiles(...)with{ noVerify: true, signCommit: false }and the same commit message as before. A failed repo or worktree commit now shows a notification in every case, where before only some failures did.sourcein the action context, but the delete action readcontext.storage, sodeleteFilesnever ran. This has been broken since add ChatSessionCustomizationItem.source, clean up AICustomizationPromptsStorage #317555 renamed the field in the list widget. The action now readssource ?? storage. This also makes the plugin and built-in guards in that action work when invoked from the list.files.autoSavetoafterDelay. Auto Save clears the dirty flag, so the editor's commit-on-exit never ran. Ctrl+S also never reached the file, because the management editor's save handler only handled built-in overrides.Behavior notes
commitToWorktreealso cleared worktree-change caches and refreshed the legacy session. That only applied to legacycopilotcli:sessions, so it is not carried over.How to test
Launch with
scripts\code.bat --agents <git-repo-folder>and start a worktree-isolated session on a repo. Check commits withgit log --statin both the repo and the worktree.Update customization: <file>commit in each tree.commit.gpgsign=true, the commit still succeeds..git/index.lockin the main repo. Expect the "couldn't apply it to the default branch" warning, and the worktree commit still succeeds.--disable-extension GitHub.copilot-chatto confirm the old commands are not needed.Unit tests are in
aiCustomizationWorkspaceService.test.ts. They cover save and delete to repo and worktree, non-git folders, and the warning on a failed repo commit. I haven't added a test for the editor changes, because the existing management editor test harness doesn't stub the working-copy or commit services. They were checked manually with the scenarios above.