Skip to content

AgentHost - Ensure that we only refresh the uncommitted changes if there is an active subscriber - #321130

Merged
Ladislau Szomoru (lszomoru) merged 4 commits into
mainfrom
agents/in-the-agenthost-we-seem-to-be-continuously-dd628278
Jun 12, 2026
Merged

Ladislau Szomoru (lszomoru) merged 4 commits into
mainfrom
agents/in-the-agenthost-we-seem-to-be-continuously-dd628278

Conversation

@lszomoru

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 12, 2026 12:01
@lszomoru
Ladislau Szomoru (lszomoru) enabled auto-merge (squash) June 12, 2026 12:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 IAgentHostChangesetService and wired it from ChangesetSessionCoordinator so refreshUncommittedChangeset() 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]>
@lszomoru
Ladislau Szomoru (lszomoru) merged commit cbc2dc6 into main Jun 12, 2026
25 checks passed
@lszomoru
Ladislau Szomoru (lszomoru) deleted the agents/in-the-agenthost-we-seem-to-be-continuously-dd628278 branch June 12, 2026 12:33
@vs-code-engineering vs-code-engineering Bot added this to the 1.125.0 milestone Jun 12, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jul 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants