agentHost: Map resources through owning connection - #332088
Draft
roblourens wants to merge 3 commits into
Draft
Conversation
Expose connection-owned resource URI mapping and use it for remote feedback comments, reveal links, and plan review files. This keeps host authority details out of application features and fixes cross-platform remote opens for #331879.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve the AgentHostProtocolClient rename while preserving connection-owned resource URI mapping.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds connection-owned URI mapping for Agent Host resources across remote clients, feedback, reveal links, and plan reviews.
Changes:
- Exposes bidirectional resource mapping on Agent Host connections.
- Maps feedback annotations, reveal links, and plan-review files.
- Adds remote-resource regression tests.
Show a summary per file
| File | Description |
|---|---|
editorRemoteAgentHostServiceClient.ts |
Exposes the protocol client’s mapper. |
agentHostPty.test.ts |
Updates the connection mock. |
stateToProgressAdapter.test.ts |
Tests remote reveal-link mapping. |
agentHostChatContribution.test.ts |
Tests mapped plan-review URIs. |
stateToProgressAdapter.ts |
Maps reveal and plan-review resources. |
agentHostSessionHandler.ts |
Forwards the owning connection mapper. |
agentFeedbackItemsBackend.test.ts |
Tests annotation resource mapping. |
agentFeedbackItemsBackend.ts |
Maps annotation resources client-side. |
agentHostFileSystemProvider.test.ts |
Tests mapper round trips and identity behavior. |
localAgentHostService.ts |
Exposes local resource mapping. |
agentService.ts |
Adds mapping to the connection contract. |
agentHostUri.ts |
Defines mapper implementations. |
remoteAgentHostProtocolClient.ts |
Creates identity or remote mappers. |
nullAgentHostService.ts |
Supplies an identity mapper. |
Review details
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 14/14 changed files
- Comments generated: 3
- Review effort level: Balanced
Use the owning connection mapper for all addComment and plan review paths, and unwrap mapped feedback resources before sending mutations back to the host.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mohammad javad Dianat (dianatofficial)
left a comment
There was a problem hiding this comment.
Approved. The fix is minimal and correct.
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.
Fixes #331879.
Summary
IAgentConnection, so application features do not need the remote host authorityaddCommentreveal links before opening them on the clientValidation
npm run compile-clientnpm run valid-layers-checkThe full
npm run compilereached built-in extension bundling but could not complete because this worktree's Copilot dependency install is missing prepackaged Shiki/WASM assets; the client compilation covering this change passes.(Written by Copilot)