fix: update changeset labels and descriptions to reflect branch changes#317243
Draft
DonJayamanne wants to merge 2 commits into
Draft
fix: update changeset labels and descriptions to reflect branch changes#317243DonJayamanne wants to merge 2 commits into
DonJayamanne wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the agent-host “changesets” catalogue terminology and behavior to better reflect branch-based diffs, including updating labels/descriptions, adding a lazy refresh path for the session/branch changeset, and gating git-only catalogue entries when git state is unavailable.
Changes:
- Rename the session-wide changeset label from “Session Changes” to “Branch Changes” and adjust default catalogue ordering.
- Add an uncommitted changeset description and thread it through catalogue synthesis (live + persisted).
- Add
refreshSessionChangesetand trigger it on first subscription to the session changeset URI (and also when subscribing to the session URI itself), plus strip git-only catalogue entries when git state is absent.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts | Updates expected changeset label to “Branch Changes” in protocol handler tests. |
| src/vs/platform/agentHost/test/node/agentSideEffects.test.ts | Updates the test fake changeset service to include the new refresh hook. |
| src/vs/platform/agentHost/test/node/agentService.test.ts | Updates expectations for new labels/order/description and adds coverage for stripping git-only catalogue entries. |
| src/vs/platform/agentHost/test/node/agentHostChangesetService.test.ts | Updates expected default catalogue entries (label/order/description) and session entry label. |
| src/vs/platform/agentHost/node/agentService.ts | Implements stripping of git-only catalogue entries based on git probe results. |
| src/vs/platform/agentHost/node/agentHostChangesetService.ts | Threads optional descriptions through static catalogue entries and adds refreshSessionChangeset. |
| src/vs/platform/agentHost/node/agentHostChangesetCoordinator.ts | Triggers session changeset refresh on first subscription and on session-URI subscription. |
| src/vs/platform/agentHost/common/changesetUri.ts | Renames label to “Branch Changes”, adds uncommitted description, and updates the default catalogue shape. |
Copilot's findings
- Files reviewed: 8/8 changed files
- Comments generated: 1
Comment on lines
+548
to
+555
| * (`Branch Changes`, `Uncommitted Changes`): when the working | ||
| * directory is absent or not a git repo, those entries are stripped | ||
| * from `summary.changesets`, leaving only `This Turn`. | ||
| */ | ||
| private _attachGitState(session: URI, workingDirectory: URI | undefined): void { | ||
| const sessionKey = session.toString(); | ||
| if (!workingDirectory) { | ||
| this._stripGitOnlyChangesetEntries(sessionKey); |
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.