Update background change migration UI#4288
Merged
DonJayamanne merged 4 commits intomainfrom Mar 10, 2026
Merged
Conversation
3b449ad to
965223c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the uncommitted changes confirmation UI from the generic vscode_get_confirmation_with_options tool to a new vscode_get_modified_files_confirmation tool that includes modified file information in its input. The production code is refactored to decompose the monolithic checkIfRepoHasUncommittedChanges + promptForUncommittedChangesAction flow into smaller, focused helper methods, and a backward-compatible fallback is retained for environments where the new tool isn't available.
Changes:
- Refactored
FolderRepositoryManagerto use the newvscode_get_modified_files_confirmationtool withmodifiedFilesdata, falling back to the oldvscode_get_confirmation_with_optionstool when the new one isn't registered. - Decomposed the old
checkIfRepoHasUncommittedChangesmethod intogetRepositoryForUncommittedChanges,getModifiedFilesForConfirmation, andtoModifiedFileConfirmationEntryfor clearer separation of concerns. - Updated test fakes and assertions across two test files to mock the new tool and verify the richer input shape (including
modifiedFilesandoptions).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/extension/chatSessions/vscode-node/folderRepositoryManagerImpl.ts |
Core refactoring: new tool invocation, helper methods for gathering modified files, backward-compat fallback via promptForUncommittedChangesActionOld |
src/extension/chatSessions/vscode-node/test/folderRepositoryManager.spec.ts |
Updated FakeToolsService and FakeChatSessionWorkspaceFolderService mocks; updated test assertions to match new tool name and input shape |
src/extension/chatSessions/vscode-node/test/copilotCLIChatSessionParticipant.spec.ts |
Same mock and assertion updates as folderRepositoryManager.spec.ts for the chat participant tests |
src/extension/chatSessions/copilotcli/node/test/copilotcliSession.spec.ts |
Cosmetic: simplified vi.mock syntax for cliHelpers |
auto-merge was automatically disabled
March 10, 2026 05:12
Pull request was converted to draft
justschen
approved these changes
Mar 10, 2026
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.
Enhance the migration UI during delegation and address minor issues in the codebase. Adjustments include mocking improvements and updates to confirmation tool invocations.