Skip to content

agentHost: Map resources through owning connection - #332088

Draft
roblourens wants to merge 3 commits into
mainfrom
roblou/agents/investigate-vscode-issue-331879
Draft

agentHost: Map resources through owning connection#332088
roblourens wants to merge 3 commits into
mainfrom
roblou/agents/investigate-vscode-issue-331879

Conversation

@roblourens

Copy link
Copy Markdown
Member

Fixes #331879.

Summary

  • exposes bidirectional resource URI mapping on IAgentConnection, so application features do not need the remote host authority
  • maps Agent Host feedback annotations and addComment reveal links before opening them on the client
  • maps plan-review files through the same owning connection for live and restored sessions
  • adds remote URI regressions for mapper round-trips, feedback annotations, reveal links, and plan reviews

Validation

  • npm run compile-client
  • targeted unit tests: 504 passing
  • focused ESLint on all changed files
  • npm run valid-layers-check
  • repository pre-commit hygiene hook

The full npm run compile reached 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)

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>
Copilot AI balanced review requested due to automatic review settings August 22, 2026 04:53
@roblourens
roblourens marked this pull request as draft August 22, 2026 04:54
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. The fix is minimal and correct.

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.

Reveal (comments) when connected to a remote agent host fails

3 participants