Show active background shells in agent chats - #338713
Closed
Anthony Kim (anthonykim1) wants to merge 1 commit into
Closed
Anthony Kim (anthonykim1) wants to merge 1 commit into
Anthony Kim (anthonykim1) wants to merge 1 commit into
Conversation
Copilot started reviewing on behalf of
Anthony Kim (anthonykim1)
September 29, 2026 16:30
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Aborting can discard the only shell refresh, and the editor chat surface remains unwired.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Adds protocol-backed background-shell visibility to agent chats, including live status UI and task reconciliation.
Changes:
- Adds AHP background-shell state/actions and session projection.
- Publishes and refreshes Copilot shell inventories.
- Adds the Agents window shell pill, details picker, accessibility help, and tests.
| File | Description |
|---|---|
src/vs/workbench/test/browser/chatPills.test.ts |
Tests shell dropdown behavior. |
src/vs/workbench/contrib/chat/test/common/sessionChatPills.test.ts |
Tests pill visibility defaults. |
src/vs/workbench/contrib/chat/test/browser/chatInputPills.test.ts |
Tests shell pill presentation. |
src/vs/workbench/contrib/chat/common/sessionChatPills.ts |
Registers the new pill kind. |
src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.ts |
Defines shell pill options. |
src/vs/workbench/contrib/chat/browser/chatInputPills.ts |
Adds the shared shell source. |
src/vs/workbench/browser/chatDropdownPill.ts |
Supports activation-driven details. |
src/vs/sessions/services/sessions/common/session.ts |
Adds provider-neutral shell metadata. |
src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts |
Tests per-chat projection. |
src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts |
Projects protocol shell state. |
src/vs/sessions/contrib/chat/test/browser/sessionBackgroundShellsControl.test.ts |
Tests live shell presentation. |
src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts |
Documents keyboard interaction. |
src/vs/sessions/contrib/chat/browser/sessionChatInputToolbar.ts |
Wires the Agents window pill. |
src/vs/sessions/contrib/chat/browser/sessionBackgroundShellsControl.ts |
Implements shell rows and details. |
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Tests reconciliation and polling. |
src/vs/platform/agentHost/test/node/agentService.test.ts |
Tests subscription-scoped watches. |
src/vs/platform/agentHost/test/node/agentHostStateManager.test.ts |
Tests catalog mirroring. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Reads and publishes runtime tasks. |
src/vs/platform/agentHost/node/copilot/copilotAgent.ts |
Manages per-chat shell watches. |
src/vs/platform/agentHost/node/agentService.ts |
Starts watches for subscribed chats. |
src/vs/platform/agentHost/node/agentHostStateManager.ts |
Mirrors shells into chat summaries. |
src/vs/platform/agentHost/common/state/sessionState.ts |
Maps shell state and summaries. |
src/vs/platform/agentHost/common/state/protocol/version/registry.ts |
Versions the new actions. |
src/vs/platform/agentHost/common/state/protocol/common/actions.ts |
Registers protocol action types. |
src/vs/platform/agentHost/common/state/protocol/channels-chat/state.ts |
Defines protocol shell metadata. |
src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.ts |
Reduces shell set/removal actions. |
src/vs/platform/agentHost/common/state/protocol/channels-chat/actions.ts |
Defines shell actions. |
src/vs/platform/agentHost/common/state/protocol/action-origin.generated.ts |
Updates generated action unions. |
src/vs/platform/agentHost/common/agent.ts |
Adds the optional watch API. |
src/vs/platform/actionWidget/test/browser/actionList.test.ts |
Tests live detail panels and layout. |
src/vs/platform/actionWidget/browser/actionList.ts |
Adds activated hover panels and bottom alignment. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| this._subagentTaskCompletionSchedulers.clearAndDisposeAll(); | ||
| this._subagentActivityRevisions.clear(); | ||
| this._subagentTaskStatusRevision++; | ||
| this._backgroundTaskStatusRevision++; |
| customizations: { sections: this._customizationSections }, | ||
| browsers: { sections: this._browsers.sections }, | ||
| subagents: this._backgroundActivities, | ||
| backgroundShells, |
Comment on lines
+666
to
+668
| readonly status: 'running' | 'idle'; | ||
| readonly startedAt: string; | ||
| readonly attachmentMode: 'attached' | 'detached'; |
Contributor
Contributor
Author
|
Replaced by #338723, which uses the background work shape from microsoft/agent-host-protocol#482. |
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.

Depends on: microsoft/agent-host-protocol#475
Related: #336348
session.background_tasks_changedfires or a client starts watching the chat, readsession.rpc.tasks.list()and dispatch the new AHPchat/backgroundShellSetandchat/backgroundShellRemovedactions.session.rpc.tasks.refresh()before listing, every 5 seconds.AgentService._watchChatHistorybecomes_watchChatUpdatesand also calls the new optionalIAgent.watchChatBackgroundShells.session/chatUpdated. Lists are per chat, so the same shell ID in two chats doesn't collide.openHoverOnSelect), move keyboard focus into them, and pin them to the bottom of the picker (alignToParentBottom) so they stay above the input..ahp-version, as d1fdacc did. A full AHP sync can follow once mkdirp: don't try to create fs roots #475 merges.Still to do in this draft:
How to test:
sleep 120with its shell tool in async mode, without detaching.Validation on this branch:
npm run typecheck-client: passed.npx eslint --max-warnings=0on the 31 changed.tsfiles: passed../scripts/test.sh src/vs/platform/actionWidget/test/browser/actionList.test.ts src/vs/workbench/test/browser/chatPills.test.ts src/vs/workbench/contrib/chat/test/browser/chatInputPills.test.ts src/vs/workbench/contrib/chat/test/common/sessionChatPills.test.ts src/vs/sessions/contrib/chat/test/browser/sessionBackgroundShellsControl.test.ts src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts: 514 passing, 0 failing.npm run test-node -- --run src/vs/platform/agentHost/test/node/agentService.test.ts --run src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts --run src/vs/platform/agentHost/test/node/agentHostStateManager.test.ts: 1488 passing, 0 failing.Inspirations from:
session.background_tasks_changedand dropping superseded reads with a revision counter extends the subagent reconcile in_reconcileSubagentTaskStatusesand itsonBackgroundTasksChangedregistration.AgentService._watchChatHistory.sessionBackgroundShellsPillOptionsfollowssessionSubagentsPillOptions.StandardChatInputPillSources.alignToParentBottomnaming followsIActionListItemHover.alignToParent.