Skip to content

agentHost: make 'new terminal' button open a terminal in the remote by default#311075

Merged
connor4312 merged 3 commits intomainfrom
connor4312/ah-terminals-default
Apr 17, 2026
Merged

agentHost: make 'new terminal' button open a terminal in the remote by default#311075
connor4312 merged 3 commits intomainfrom
connor4312/ah-terminals-default

Conversation

@connor4312
Copy link
Copy Markdown
Member

Adds a new notion of 'default profile overrides' that the sessions app uses to set the default terminal profile when a remote session is open.

…y default

Adds a new notion of 'default profile overrides' that the sessions app
uses to set the default terminal profile when a remote session is open.
Copilot AI review requested due to automatic review settings April 17, 2026 19:17
@connor4312 connor4312 enabled auto-merge (squash) April 17, 2026 19:17
@connor4312 connor4312 self-assigned this Apr 17, 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 support for programmatically overriding the default contributed terminal profile, then uses it in the Sessions app so “New Terminal” targets the active agent-host session (remote) by default.

Changes:

  • Extend ITerminalProfileService with overrideDefaultProfile(...) and implement it in TerminalProfileService.
  • Move agent-host terminal profile registration/selection into AgentHostTerminalService (entries + quick-pick profile + observable profile list).
  • Update Sessions terminal behavior to (a) set default cwd from the active session and (b) override the default contributed profile when an agent-host session is active.
Show a summary per file
File Description
src/vs/workbench/test/browser/workbenchTestServices.ts Updates test ITerminalProfileService stub to include overrideDefaultProfile.
src/vs/workbench/contrib/terminal/common/terminal.ts Adds overrideDefaultProfile API to ITerminalProfileService.
src/vs/workbench/contrib/terminal/browser/terminalProfileService.ts Implements override logic in getContributedDefaultProfile.
src/vs/workbench/contrib/terminal/browser/agentHostTerminalService.ts Adds agent-host entry/profile management and terminal creation by entry address.
src/vs/workbench/contrib/terminal/browser/agentHostPty.ts Ensures cwd sent over protocol unwraps agenthost: URIs to underlying URIs.
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostClientTools.test.ts Updates IAgentHostTerminalService stubs for new API surface.
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts Updates IAgentHostTerminalService stubs for new API surface.
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.ts Switches local agent-host terminal registration to use IAgentHostTerminalService.registerEntry.
src/vs/sessions/contrib/terminal/browser/sessionsTerminalContribution.ts Overrides default terminal profile + syncs cwd based on active session; creates remote terminals via agent host when applicable.
src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHostTerminal.contribution.ts Registers remote agent-host terminal entries with IAgentHostTerminalService.
src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHostActions.ts Attempts to avoid re-auth by checking existing auth sessions (currently incorrect).
src/vs/platform/agentHost/node/agentHostTerminalManager.ts Resolves protocol cwd strings as file URIs to local fs paths on the agent host.

Copilot's findings

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

Comment thread src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHostActions.ts Outdated
roblourens
roblourens previously approved these changes Apr 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 17, 2026

Screenshot Changes

Base: ab11a299 Current: b5494d1e

Changed (2)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after

@connor4312 connor4312 merged commit 1493a10 into main Apr 17, 2026
40 of 41 checks passed
@connor4312 connor4312 deleted the connor4312/ah-terminals-default branch April 17, 2026 22:22
@vs-code-engineering vs-code-engineering bot added this to the 1.117.0 milestone Apr 17, 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