Skip to content

agentHost: allow enabling tunnel access to local agent host#310294

Merged
connor4312 merged 2 commits intomainfrom
connor4312/tunnel-local-publish
Apr 16, 2026
Merged

agentHost: allow enabling tunnel access to local agent host#310294
connor4312 merged 2 commits intomainfrom
connor4312/tunnel-local-publish

Conversation

@connor4312
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 15, 2026 22:34
@connor4312 connor4312 enabled auto-merge April 15, 2026 22:34
@connor4312 connor4312 self-assigned this Apr 15, 2026
@vs-code-engineering
Copy link
Copy Markdown
Contributor

vs-code-engineering bot commented Apr 15, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts

@deepak1556

Matched files:

  • src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

Screenshot Changes

Base: 0807b424 Current: 6584f61b

Changed (17)

editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after
agentSessionsViewer/CompletedRead/Dark
Before After
before after
agentSessionsViewer/CompletedRead/Light
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Dark
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Light
Before After
before after
agentSessionsViewer/WithFileChangesList/Dark
Before After
before after
agentSessionsViewer/WithFileChangesList/Light
Before After
before after
agentSessionsViewer/WithBadge/Dark
Before After
before after
agentSessionsViewer/WithBadge/Light
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Light
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Dark
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Light
Before After
before after
agentSessionsViewer/BackgroundProvider/Dark
Before After
before after
agentSessionsViewer/BackgroundProvider/Light
Before After
before after
agentSessionsViewer/ClaudeProvider/Dark
Before After
before after
agentSessionsViewer/ClaudeProvider/Light
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Dark
Before After
before after

blocks-ci screenshots changed

Replace the contents of test/componentFixtures/blocks-ci-screenshots.md with:

Updated blocks-ci-screenshots.md
<!-- auto-generated by CI — do not edit manually -->

#### editor/codeEditor/CodeEditor/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/cb32a3e854b5734fe5aaca2318f2e0a42ee821b05ea97883ea42c5ba95edb3c3)

#### editor/codeEditor/CodeEditor/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/42624fbba5e0db7f32c224b5eb9c5dd3b08245697ae2e7d2a88be0d7c287129b)

Yoyokrazy
Yoyokrazy previously approved these changes Apr 15, 2026
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

Adds an opt-in “tunnel host” capability so the Sessions desktop app can expose a local agent host over a dev tunnel (enabling remote connections), including a UI toggle and shared-process hosting implementation.

Changes:

  • Add Sessions desktop contribution + UI action/view-item to toggle “Allow Remote Connections” and view related output.
  • Introduce a renderer-side ITunnelHostService that requests an on-demand local agent-host WebSocket listener and starts/stops hosting via shared process IPC.
  • Add a shared-process TunnelHostMainService that creates/dev-hosts a dev tunnel and pipes forwarded connections into the local agent host socket.
Show a summary per file
File Description
src/vs/sessions/sessions.desktop.main.ts Wires the new tunnel host contribution into the Sessions desktop entrypoint.
src/vs/sessions/contrib/tunnelHost/common/tunnelHost.ts Defines the Sessions-side ITunnelHostService contract.
src/vs/sessions/contrib/tunnelHost/electron-browser/tunnelHostService.ts Implements renderer-side tunnel hosting orchestration + auth token acquisition.
src/vs/sessions/contrib/tunnelHost/electron-browser/tunnelHost.contribution.ts Registers service, UI toggle action, output action, and configuration.
src/vs/sessions/contrib/tunnelHost/electron-browser/toggleRemoteConnectionsActionViewItem.ts Adds a custom titlebar action view item with hover + toast + connecting pulse.
src/vs/sessions/contrib/tunnelHost/electron-browser/media/tunnelHost.css Styles for the toggle button, pulse animation, and toast.
src/vs/platform/agentHost/common/agentService.ts Adds IConnectionTrackerService.startWebSocketServer() and IAgentHostSocketInfo.
src/vs/platform/agentHost/electron-browser/agentHostService.ts Exposes IAgentHostService.startWebSocketServer() by proxying to the tracker channel.
src/vs/platform/agentHost/node/agentHostMain.ts Implements on-demand WebSocket server creation for tunnel hosting via IPC.
src/vs/platform/agentHost/common/tunnelAgentHost.ts Adds IPC channel/types for tunnel hosting service (ITunnelAgentHostHostingService).
src/vs/platform/agentHost/node/tunnelHostMainService.ts Implements shared-process tunnel creation/hosting and stream piping to local socket.
src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts Registers and exposes the tunnel host service over a shared-process IPC channel.

Copilot's findings

  • Files reviewed: 12/12 changed files
  • Comments generated: 4

Comment thread src/vs/platform/agentHost/node/agentHostMain.ts
Comment thread src/vs/platform/agentHost/node/tunnelHostMainService.ts
@connor4312 connor4312 merged commit 55c1881 into main Apr 16, 2026
39 of 42 checks passed
@connor4312 connor4312 deleted the connor4312/tunnel-local-publish branch April 16, 2026 01:51
@vs-code-engineering vs-code-engineering bot added this to the 1.117.0 milestone Apr 16, 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.

3 participants