Skip to content

agentHost: adopt eager activeClient announcement#311129

Merged
connor4312 merged 5 commits intomainfrom
connor4312/eager-activeclient
Apr 20, 2026
Merged

agentHost: adopt eager activeClient announcement#311129
connor4312 merged 5 commits intomainfrom
connor4312/eager-activeclient

Conversation

@connor4312
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 18, 2026 01:15
@connor4312 connor4312 enabled auto-merge (squash) April 18, 2026 01:15
@connor4312 connor4312 self-assigned this Apr 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 18, 2026

Screenshot Changes

Base: ad7c7593 Current: 2c6608b4

Changed (1)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after

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

Adopts an “eager” active-client claim by threading activeClient through createSession, so the server can publish the active client state atomically with session creation (instead of a follow-up session/activeClientChanged dispatch from the client).

Changes:

  • Pass activeClient (clientId, tools, customizations) in createSession calls from the chat session handler.
  • Update the protocol server to dispatch SessionActiveClientChanged immediately after session creation when activeClient is provided.
  • Adjust/add tests to validate the new eager-claim behavior across workbench and agent host layers.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts Builds activeClient and includes it in createSession; removes immediate post-create dispatch.
src/vs/platform/agentHost/node/protocolServerHandler.ts Accepts activeClient on createSession and emits SessionActiveClientChanged after creation.
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Seeds active-client tools/customizations during session creation based on activeClient.
src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.ts Forwards activeClient through the remote protocol client createSession call.
src/vs/platform/agentHost/common/state/protocol/commands.ts Protocol surface update: ICreateSessionParams now supports activeClient.
src/vs/platform/agentHost/common/state/protocol/.ahp-version Bumps synced agent-host-protocol version.
src/vs/platform/agentHost/common/agentService.ts Exposes activeClient in IAgentCreateSessionConfig.
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts Updates expectations to assert activeClient is carried via createSession instead of separate dispatch.
src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts Adds tests for createSession eager active-client claim behavior and mismatch rejection.
src/vs/platform/agentHost/test/node/copilotAgent.test.ts Adds tests ensuring eager seeding triggers customization sync and tools seeding.

Copilot's findings

  • Files reviewed: 10/10 changed files
  • Comments generated: 4

Comment thread src/vs/platform/agentHost/node/protocolServerHandler.ts Outdated
Comment thread src/vs/platform/agentHost/node/protocolServerHandler.ts Outdated
Comment thread src/vs/platform/agentHost/node/copilot/copilotAgent.ts Outdated
Comment thread src/vs/platform/agentHost/node/copilot/copilotAgent.ts
@connor4312 connor4312 disabled auto-merge April 18, 2026 14:29
lszomoru
lszomoru previously approved these changes Apr 18, 2026
roblourens
roblourens previously approved these changes Apr 18, 2026
roblourens
roblourens previously approved these changes Apr 19, 2026
@connor4312 connor4312 merged commit abdc25a into main Apr 20, 2026
26 checks passed
@connor4312 connor4312 deleted the connor4312/eager-activeclient branch April 20, 2026 15:58
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 20, 2026
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.

5 participants