agentHost: make 'new terminal' button open a terminal in the remote by default#311075
Merged
connor4312 merged 3 commits intomainfrom Apr 17, 2026
Merged
agentHost: make 'new terminal' button open a terminal in the remote by default#311075connor4312 merged 3 commits intomainfrom
connor4312 merged 3 commits intomainfrom
Conversation
…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.
Contributor
There was a problem hiding this comment.
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
ITerminalProfileServicewithoverrideDefaultProfile(...)and implement it inTerminalProfileService. - 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
roblourens
previously approved these changes
Apr 17, 2026
Contributor
roblourens
approved these changes
Apr 17, 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.
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.