Adopt message attachment URI protocol#312553
Merged
roblourens merged 2 commits intomainfrom Apr 25, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adopts the Agent Host Protocol attachment field rename from path → uri and threads attachment URIs through VS Code using serialized protocol URI strings and internal URI objects, converting back to Copilot SDK path/filePath at the boundary.
Changes:
- Update chat → agent-host protocol dispatch to emit
MessageAttachment.uri(string) and keep file-scheme filtering + working-dir rebasing. - Update node side effects to parse protocol attachment URI strings into
URIobjects before calling agents. - Update Copilot SDK boundary to map internal
URIattachments back to SDKpath/filePath, with focused unit tests for both conversion directions.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts | Updates expectations to assert attachment uri strings and refines a skip-case test for non-file URIs. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts | Emits protocol MessageAttachment objects with uri strings (post-rebase) instead of filesystem path. |
| src/vs/platform/agentHost/test/node/mockAgent.ts | Extends mock agent to record optional attachments passed to sendMessage. |
| src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts | Adds test ensuring internal URI attachments map to Copilot SDK path/filePath. |
| src/vs/platform/agentHost/test/node/agentSideEffects.test.ts | Adds coverage for parsing protocol attachment URI strings into URI objects (turn + queued messages). |
| src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts | Converts internal URI attachments to Copilot SDK path/filePath fields at the SDK boundary. |
| src/vs/platform/agentHost/node/agentSideEffects.ts | Parses action.userMessage.attachments[].uri strings via URI.parse before calling the agent. |
| src/vs/platform/agentHost/common/state/protocol/version/registry.ts | Updates action version registry for newly synced protocol actions. |
| src/vs/platform/agentHost/common/state/protocol/state.ts | Syncs generated protocol types including MessageAttachment.uri and additional session fields from the newer AHP revision. |
| src/vs/platform/agentHost/common/state/protocol/reducers.ts | Adds reducers for newly synced protocol actions (activity/meta). |
| src/vs/platform/agentHost/common/state/protocol/actions.ts | Adds newly synced protocol actions/types and updates unions accordingly. |
| src/vs/platform/agentHost/common/state/protocol/action-origin.generated.ts | Regenerates action origin/unions and dispatchability map to include the new actions. |
| src/vs/platform/agentHost/common/state/protocol/.ahp-version | Bumps the pinned agent-host-protocol revision hash. |
| src/vs/platform/agentHost/common/agentService.ts | Updates IAgentAttachment to carry a URI instead of a filesystem path. |
Copilot's findings
- Files reviewed: 14/14 changed files
- Comments generated: 0
TylerLeonhardt
approved these changes
Apr 25, 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.
Adopts the Agent Host Protocol message attachment rename from
pathtouriin VS Code.Summary:
urivalues and internalURIobjects.path/filePathvalues at the SDK boundary.Related protocol PR: https://github.com/microsoft/agent-host-protocol/pull/84
Validation:
(Written by Copilot)