豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Update background change migration UI#4288

Merged
DonJayamanne merged 4 commits intomainfrom
don/delegate-annual-bass-9-march
Mar 10, 2026
Merged

Update background change migration UI#4288
DonJayamanne merged 4 commits intomainfrom
don/delegate-annual-bass-9-march

Conversation

@DonJayamanne
Copy link
Copy Markdown
Collaborator

Enhance the migration UI during delegation and address minor issues in the codebase. Adjustments include mocking improvements and updates to confirmation tool invocations.

@DonJayamanne DonJayamanne self-assigned this Mar 9, 2026
@DonJayamanne DonJayamanne force-pushed the don/delegate-annual-bass-9-march branch from 3b449ad to 965223c Compare March 10, 2026 03:50
@DonJayamanne DonJayamanne marked this pull request as ready for review March 10, 2026 04:58
Copilot AI review requested due to automatic review settings March 10, 2026 04:58
@DonJayamanne DonJayamanne enabled auto-merge March 10, 2026 04:58
@vs-code-engineering vs-code-engineering bot added this to the 1.112.0 milestone Mar 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 FolderRepositoryManager to use the new vscode_get_modified_files_confirmation tool with modifiedFiles data, falling back to the old vscode_get_confirmation_with_options tool when the new one isn't registered.
  • Decomposed the old checkIfRepoHasUncommittedChanges method into getRepositoryForUncommittedChanges, getModifiedFilesForConfirmation, and toModifiedFileConfirmationEntry for 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 modifiedFiles and options).

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

@DonJayamanne DonJayamanne marked this pull request as draft March 10, 2026 05:12
auto-merge was automatically disabled March 10, 2026 05:12

Pull request was converted to draft

@DonJayamanne DonJayamanne marked this pull request as ready for review March 10, 2026 05:29
@DonJayamanne DonJayamanne enabled auto-merge March 10, 2026 05:29
@DonJayamanne DonJayamanne marked this pull request as draft March 10, 2026 05:36
auto-merge was automatically disabled March 10, 2026 05:36

Pull request was converted to draft

@DonJayamanne DonJayamanne marked this pull request as ready for review March 10, 2026 05:47
@DonJayamanne DonJayamanne enabled auto-merge March 10, 2026 05:47
@DonJayamanne DonJayamanne added this pull request to the merge queue Mar 10, 2026
Merged via the queue into main with commit afdf1da Mar 10, 2026
19 checks passed
@DonJayamanne DonJayamanne deleted the don/delegate-annual-bass-9-march branch March 10, 2026 08:53
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.

3 participants