Repository navigation
chat: link subagent completion and coordination messages - #348949
Conversation
- Link completion, read-agent, and write-to-agent messages to the matching child chat. - Share pill rendering and keep inline references compact without changing launch pills. - Preserve chat links through markdown conversion and use the persisted catalog during restore. - Add regression tests for restored identities, rendering, spacing, and navigation. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the child-chat navigation changes.
No open issues 🎉
What changed in this PR
This PR connects subagent completion and coordination messages to their child chats, extending VS Code’s existing subagent navigation to compact inline references.
Changes:
- Generate child-chat links for completion, read-agent, and write-to-agent messages, including restored history.
- Share pill rendering across chat surfaces while preserving launch-pill presentation.
- Add regression coverage, update fixtures, and document keyboard navigation.
The PR reports successful automated validation; live verification remains pending.
| File | Description |
|---|---|
src/vs/workbench/test/browser/componentFixtures/chat/chatSubagentContent.fixture.ts |
Adds completion and coordination reference fixtures. |
src/vs/workbench/test/browser/componentFixtures/chat/chatAgentMergeNotice.fixture.ts |
Updates services and notification constructor arguments. |
src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatToolProgressPart.test.ts |
Tests pill navigation without expanding tool details. |
src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatSystemNotificationContentPart.test.ts |
Tests notification pill layout and navigation. |
src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatSubagentContentPart.test.ts |
Adapts context inspection to the shared toolbar. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/stateToProgressAdapter.test.ts |
Tests chat-link preservation during markdown conversion. |
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts |
Passes parent-session context to notifications. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentOpenChat.css |
Adds compact inline-pill styling. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.ts |
Supplies navigation context to tool titles. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSystemNotificationContentPart.ts |
Renders notification chat links as pills. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.ts |
Extracts the shared toolbar and inline-link renderer. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.ts |
Reuses the shared toolbar for launch pills. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.ts |
Renders pills in initial and updated progress messages. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.ts |
Supports child-chat pills in markdown titles. |
src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.ts |
Allows the chat URI scheme in markdown links. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts |
Preserves chat links rather than rewriting them as files. |
src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts |
Documents navigation from the new reference locations. |
src/vs/platform/agentHost/test/node/mapSessionEvents.test.ts |
Tests linked notifications and coordination messages during replay. |
src/vs/platform/agentHost/test/node/copilotToolDisplay.test.ts |
Tests recipient links across tool execution stages. |
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Tests live and restored links and markdown escaping. |
src/vs/platform/agentHost/test/node/agentService.test.ts |
Tests restored child identity for both URI formats. |
src/vs/platform/agentHost/node/copilot/mapSessionEvents.ts |
Resolves historical agent references to child-chat links. |
src/vs/platform/agentHost/node/copilot/copilotToolDisplay.ts |
Formats linked recipient labels with fallback text. |
src/vs/platform/agentHost/node/copilot/copilotSystemNotification.ts |
Generates linked completion and idle notifications. |
src/vs/platform/agentHost/node/copilot/copilotSubagentTracking.ts |
Supports seeding historical agent-to-tool mappings. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Wires chat resolution into live messages and replay. |
src/vs/platform/agentHost/node/copilot/copilotAgent.ts |
Supplies child-chat resolution when loading history. |
src/vs/platform/agentHost/node/agentChatContext.ts |
Uses the persisted default-chat format before registration. |
Review effort: Balanced
Set the session resource in the progress fixture context so link rendering can read its owner. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Demo of
|


chat: link subagent completion and coordination messages
(Commit message generated by Copilot)
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Validation
pnpm run build-fast --client-only— passed.pnpm run typecheck-client— passed.git merge-tree --write-tree HEAD origin/main— passed; no conflicts with fetched main.The following targeted test commands passed: 11, 203, and 17 tests respectively.
./scripts/test.sh --reporter dot \ --run src/vs/platform/agentHost/test/node/agentService.test.ts \ --run src/vs/platform/agentHost/test/node/agentHostSeams.test.ts \ --grep 'restored historical subagent references|chat owner reference|new sessions keep one child per spawn edge'./scripts/test.sh --reporter dot \ --run src/vs/platform/agentHost/test/node/agentHostSeams.test.ts \ --run src/vs/workbench/contrib/chat/test/browser/agentSessions/stateToProgressAdapter.test.ts \ --run src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatSubagentContentPart.test.ts \ --run src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatSystemNotificationContentPart.test.ts \ --run src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatToolProgressPart.test.ts \ --grep 'Agent Host provider seams|subagent|Subagent|agent links|agent coordination'Manual Verification
Live verification is left to the maintainer. Start a subagent, read from and write to it, and wait for its completion. Confirm that each compact reference shows the agent name and opens the same child chat as the launch pill. Repeat after restoring the session, and check keyboard activation and that activating a reference does not expand the enclosing tool details.