Skip to content

Agents - add "Sync Changes" action to the new session screen in the Files view#315346

Merged
lszomoru merged 4 commits intomainfrom
lszomoru/known-prawn
May 8, 2026
Merged

Agents - add "Sync Changes" action to the new session screen in the Files view#315346
lszomoru merged 4 commits intomainfrom
lszomoru/known-prawn

Conversation

@lszomoru
Copy link
Copy Markdown
Member

@lszomoru lszomoru commented May 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 8, 2026 19:22
@lszomoru lszomoru enabled auto-merge (squash) May 8, 2026 19:22
@lszomoru lszomoru self-assigned this May 8, 2026
@lszomoru lszomoru added this to the 1.120.0 milestone May 8, 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 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.syncChanges view-title action (gated to Sessions window + new session + git repository context) that invokes git.sync.
  • Add a custom ActionViewItem to render the action’s label/tooltip from SCM provider statusBarCommands.
  • Adjust Git extension setting git.confirmSync to 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

Comment thread src/vs/sessions/contrib/files/browser/syncChangesActionViewItem.ts Outdated
Comment thread src/vs/sessions/contrib/files/browser/syncChangesActionViewItem.ts
@lszomoru lszomoru merged commit 11ce4e2 into main May 8, 2026
25 checks passed
@lszomoru lszomoru deleted the lszomoru/known-prawn branch May 8, 2026 21:11
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