Repository navigation
AgentHost - Ensure that we only refresh the uncommitted changes if there is an active subscriber - #321130
Merged
Ladislau Szomoru (lszomoru) merged 4 commits intoJun 12, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the AgentHost changeset pipeline so the uncommitted changeset is only recomputed when there is an active subscriber (i.e., someone is actually watching <session>/changeset/uncommitted), reducing unnecessary background work.
Changes:
- Added an “uncommitted subscriber probe” to
IAgentHostChangesetServiceand wired it fromChangesetSessionCoordinatorsorefreshUncommittedChangeset()can early-out when unobserved. - Updated coordinator subscription handling to track uncommitted-subscribed sessions and to stop refreshing uncommitted changesets for plain session-URI subscriptions.
- Adjusted/expanded tests to reflect the new gating behavior (including a new test asserting git-state refresh behavior depends on uncommitted subscribers).
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/node/agentHostChangesetService.ts | Adds the uncommitted subscriber probe API and gates uncommitted refresh work; also updates lifecycle refresh scheduling. |
| src/vs/platform/agentHost/node/agentHostChangesetCoordinator.ts | Tracks uncommitted changeset subscriptions and wires the probe into the changeset service. |
| src/vs/platform/agentHost/test/node/agentHostChangesetCoordinator.test.ts | Updates expectations and adds coverage for git-state-triggered uncommitted refresh gating. |
| src/vs/platform/agentHost/test/node/agentSideEffects.test.ts | Updates test fake to satisfy the expanded changeset service interface. |
| src/vs/platform/agentHost/test/node/agentHostTurnTelemetry.test.ts | Updates test fake to satisfy the expanded changeset service interface. |
| src/vs/platform/agentHost/test/node/agentHostCommitOperationHandler.test.ts | Updates test fake to satisfy the expanded changeset service interface. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 3
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Alexandru Dima (alexdima)
approved these changes
Jun 12, 2026
Ladislau Szomoru (lszomoru)
deleted the
agents/in-the-agenthost-we-seem-to-be-continuously-dd628278
branch
June 12, 2026 12:33
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.