Skip to content

Sessions - wire up the discard changes action#305830

Merged
lszomoru merged 1 commit intomainfrom
lszomoru/parallel-horse
Mar 27, 2026
Merged

Sessions - wire up the discard changes action#305830
lszomoru merged 1 commit intomainfrom
lszomoru/parallel-horse

Conversation

@lszomoru
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 27, 2026 21:35
@lszomoru lszomoru enabled auto-merge (squash) March 27, 2026 21:35
@lszomoru lszomoru self-assigned this Mar 27, 2026
@vs-code-engineering vs-code-engineering bot added this to the Backlog milestone Mar 27, 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 updates the Agent Sessions “Changes” view to correctly pass a discard reference to its per-file actions, and enhances the built-in Git extension so discarding/restoring changes also clears AI-edit contribution tracking and properly handles untracked resources.

Changes:

  • Update the Sessions changes view action runner to supply a single “discard ref” argument (derived from session checkpoints) instead of an original/modified ref pair.
  • In the Git extension, improve Repository.restore() to clean untracked/ignored resources and clear AI contribution tracking when discarding/restoring.
  • Refactor untracked deletion logic into a shared _clean() helper used by both clean() and restore().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/sessions/contrib/changes/browser/changesView.ts Adjusts Sessions changes-view action wiring to pass a discard reference based on checkpoint refs/version mode.
extensions/git/src/repository.ts Ensures restore/discard clears AI contribution state and can delete untracked/ignored resources; refactors trash/permanent delete flow into a helper.

@lszomoru lszomoru merged commit cbc5724 into main Mar 27, 2026
22 checks passed
@lszomoru lszomoru deleted the lszomoru/parallel-horse branch March 27, 2026 22:04
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