agentHost: make 'open in vscode' button work for ssh/tunnel sessions#309067
Merged
connor4312 merged 3 commits intomainfrom Apr 13, 2026
Merged
agentHost: make 'open in vscode' button work for ssh/tunnel sessions#309067connor4312 merged 3 commits intomainfrom
connor4312 merged 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Sessions window “Open in VS Code” flow to correctly deep-link into VS Code with the appropriate remote authority for SSH and Dev Tunnel-backed sessions, instead of always opening as a local file:// path.
Changes:
- Resolve a VS Code remote authority (
ssh-remote+…/tunnel+…) from the active session provider and open viavscode://vscode-remote/.... - Enrich remote agent host entries with the metadata needed to construct those authorities (SSH host/user/port; tunnel label) and add a lookup API by address.
- Add browser tests covering authority resolution and SSH authority string encoding.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/remoteAgentHost/electron-browser/tunnelAgentHostServiceImpl.ts | Adds tunnel label into the registered tunnel connection metadata. |
| src/vs/sessions/contrib/chat/browser/chat.contribution.ts | Updates “Open in VS Code” to open remote URIs for SSH/tunnel sessions; adds resolveRemoteAuthority + sshAuthorityString. |
| src/vs/sessions/contrib/chat/test/browser/resolveRemoteAuthority.test.ts | New tests for remote authority resolution and SSH authority encoding behavior. |
| src/vs/platform/agentHost/electron-browser/sshRemoteAgentHostServiceImpl.ts | Populates SSH connection metadata (hostName, user, port) when registering connections. |
| src/vs/platform/agentHost/electron-browser/remoteAgentHostServiceImpl.ts | Adds getEntryByAddress and tracks dynamically registered entries for lookup (tunnels/SSH). |
| src/vs/platform/agentHost/common/remoteAgentHostService.ts | Extends connection types (SSH host/user/port; tunnel label) and the service interface with getEntryByAddress; updates raw entry persistence shape. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 3
lszomoru
previously approved these changes
Apr 10, 2026
lszomoru
previously approved these changes
Apr 10, 2026
joshspicer
previously approved these changes
Apr 10, 2026
dmitrivMS
approved these changes
Apr 13, 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.
No description provided.