Agents - add "Sync Changes" action to the new session screen in the Files view#315346
Merged
Agents - add "Sync Changes" action to the new session screen in the Files view#315346
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a “Sync Changes” action to the Sessions (Agents) window Files view title when you’re on the new session screen, aiming to reuse Git/SCM’s dynamic sync status (including the spinning sync icon state).
Changes:
- Register a new
sessions.files.action.syncChangesview-title action (gated to Sessions window + new session + git repository context) that invokesgit.sync. - Add a custom
ActionViewItemto render the action’s label/tooltip from SCM providerstatusBarCommands. - Adjust Git extension setting
git.confirmSyncto be disabled (and read-only) in the Agents window.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/files/browser/syncChangesActionViewItem.ts | New custom view item that derives label/tooltip from SCM status bar commands. |
| src/vs/sessions/contrib/files/browser/media/filesView.css | Adds styling for the sync action label layout in the view title. |
| src/vs/sessions/contrib/files/browser/filesView.ts | Overrides createActionViewItem to use the custom sync view item. |
| src/vs/sessions/contrib/files/browser/files.contribution.ts | Registers the “Sync Changes” action and executes git.sync. |
| src/vs/sessions/common/contextkeys.ts | Adds a context key tracking whether the Sessions sync action is currently running. |
| extensions/git/package.json | Sets git.confirmSync default to false (read-only) for the Agents window. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 2
dmitrivMS
approved these changes
May 8, 2026
dmitrivMS
approved these changes
May 8, 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.
No description provided.