Skip to content

agentHost: make 'open in vscode' button work for ssh/tunnel sessions#309067

Merged
connor4312 merged 3 commits intomainfrom
connor4312/open-vscode-sessions
Apr 13, 2026
Merged

agentHost: make 'open in vscode' button work for ssh/tunnel sessions#309067
connor4312 merged 3 commits intomainfrom
connor4312/open-vscode-sessions

Conversation

@connor4312
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 10, 2026 17:54
@connor4312 connor4312 enabled auto-merge (squash) April 10, 2026 17:54
@connor4312 connor4312 self-assigned this Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Screenshot Changes

Base: 46933de5 Current: c7c6ead5

Changed (65)

chat/aiCustomizations/aiCustomizationManagementEditor/WelcomePage/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/LocalHarness/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/CliHarness/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/Sessions/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SessionsSkillsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SkillsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/InstructionsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/HooksTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTabScrolled/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabScrolled/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTabScrolled/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabNarrow/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTabNarrow/Light
Before After
before after
chat/aiCustomizations/aiCustomizationWelcomePages/WelcomePagePromptLaunchers/Light
Before After
before after
chat/aiCustomizations/aiCustomizationWelcomePages/WelcomePageSelectorPromptLaunchers/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/WelcomePage/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/LocalHarness/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/CliHarness/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/Sessions/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SessionsSkillsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SkillsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/InstructionsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/HooksTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabNarrow/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTabNarrow/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationWelcomePages/WelcomePagePromptLaunchers/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationWelcomePages/WelcomePageSelectorPromptLaunchers/Dark
Before After
before after
editor/inlineChatAffordance/InlineChatAffordance/Light
Before After
before after
editor/inlineChatAffordance/InlineChatOverlay/Light
Before After
before after
editor/inlineCompletions/other/HintsToolbar/Light
Before After
before after
editor/inlineCompletions/other/HintsToolbarHovered/Light
Before After
before after
editor/inlineCompletions/views/SideBySideViewSmall/Light
Before After
before after
editor/inlineCompletions/views/SideBySideViewWide/Light
Before After
before after
editor/inlineCompletions/views/WordReplacementView/Light
Before After
before after
editor/inlineChatAffordance/InlineChatAffordance/Dark
Before After
before after
editor/inlineChatAffordance/InlineChatOverlay/Dark
Before After
before after
editor/inlineCompletions/other/HintsToolbar/Dark
Before After
before after
editor/inlineCompletions/other/HintsToolbarHovered/Dark
Before After
before after
editor/inlineCompletions/views/SideBySideViewSmall/Dark
Before After
before after
editor/inlineCompletions/views/SideBySideViewWide/Dark
Before After
before after
editor/inlineCompletions/views/WordReplacementView/Dark
Before After
before after
editor/inlineCompletions/views/DeletionView/Dark
Before After
before after
editor/inlineCompletions/views/LineReplacementView/Dark
Before After
before after
editor/multiDiffEditor/MultiDiffEditor/Dark
Before After
before after
editor/suggestWidget/MethodCompletions/Dark
Before After
before after
peekReference/PeekReferences/Dark
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Dark
Before After
before after
editor/inlineCompletions/views/DeletionView/Light
Before After
before after
editor/inlineCompletions/views/LineReplacementView/Light
Before After
before after
editor/multiDiffEditor/MultiDiffEditor/Light
Before After
before after
editor/suggestWidget/MethodCompletions/Light
Before After
before after
peekReference/PeekReferences/Light
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Light
Before After
before after
agentSessionsViewer/ApprovalRowLongLabel/Dark
Before After
before after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 via vscode://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

Comment thread src/vs/sessions/contrib/chat/browser/chat.contribution.ts Outdated
Comment thread src/vs/platform/agentHost/common/remoteAgentHostService.ts
lszomoru
lszomoru previously approved these changes Apr 10, 2026
lszomoru
lszomoru previously approved these changes Apr 10, 2026
joshspicer
joshspicer previously approved these changes Apr 10, 2026
@connor4312 connor4312 dismissed stale reviews from joshspicer and lszomoru via 4857ade April 13, 2026 05:30
@connor4312 connor4312 merged commit 2277f35 into main Apr 13, 2026
26 checks passed
@connor4312 connor4312 deleted the connor4312/open-vscode-sessions branch April 13, 2026 08:06
@vs-code-engineering vs-code-engineering bot added this to the 1.117.0 milestone Apr 13, 2026
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.

5 participants