feat(chat): implement AgentHostSessionListStore for managing agent-host sessions#322333
Merged
Conversation
…st sessions - Introduced AgentHostSessionListStore to manage and cache agent-host sessions. - Added interfaces for session list connection, entries, and notifications. - Implemented methods for session management including refresh, add, update, and remove. - Integrated workspace context filtering for session visibility. - Updated tests to cover new session list store functionality and ensure correct behavior during session notifications and refresh operations.
…_registerAgent methods
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a shared AgentHostSessionListStore that centralizes agent-host session enumeration, caching, notification handling, and workspace-folder-based visibility filtering, while updating per-provider session list controllers to project state from that shared store. The contribution wiring and the existing agent-host chat test suite are updated to use (and validate) the new store behavior, including race scenarios during refresh and notifications.
Changes:
- Added
AgentHostSessionListStorewith shared refresh/caching, workspace filtering, and notification-driven deltas. - Updated
AgentHostSessionListControllerto consume the shared store instead of directly querying the agent host. - Updated
AgentHostSessionListContributionand expanded tests to cover shared-store semantics and refresh/notification races.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts | Refactors tests to use the shared store and adds coverage for provider separation and refresh/notification race cases. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.ts | New shared session-list store (caching, refresh coalescing, workspace filtering, and notification handling). |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.ts | Switches controller to project items from the shared store and apply store deltas. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.ts | Wires a single store instance for all providers; uses it for cache invalidation on agent-host restart. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 2
connor4312
reviewed
Jun 22, 2026
…HostSessionListController and AgentHostSessionListStore
connor4312
approved these changes
Jun 24, 2026
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.
Addresses comment https://github.com/microsoft/vscode/pull/322030/changes#r3440361045