Skip to content

Flatten sandbox network settings#304270

Merged
alexdima merged 1 commit intorelease/1.113from
alexdima/flatten-sandbox-network-settings
Mar 23, 2026
Merged

Flatten sandbox network settings#304270
alexdima merged 1 commit intorelease/1.113from
alexdima/flatten-sandbox-network-settings

Conversation

@alexdima
Copy link
Member

Split the nested chat.tools.terminal.sandbox.network object setting into three flat settings:

  • chat.tools.terminal.sandbox.network.allowedDomains
  • chat.tools.terminal.sandbox.network.deniedDomains
  • chat.tools.terminal.sandbox.network.allowTrustedDomains

Includes a configuration migration that automatically moves existing values from the old nested format to the new flat settings and clears the deprecated key.

The old setting is preserved as deprecated with a deprecation message pointing to the new ones.

Fixes #304232

Copy link
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 terminal sandbox network configuration to use three flat settings instead of a single nested object, and adds a configuration migration to move existing values over while deprecating the old key. This aligns the settings structure with VS Code’s preference for flat settings keys and addresses #304232.

Changes:

  • Introduces flat sandbox network settings for allowed domains, denied domains, and trusted-domain inclusion.
  • Adds a configuration migration to move values from chat.tools.terminal.sandbox.network to the new flat keys and clears the deprecated key.
  • Updates sandbox/service consumers and related tests to use the new setting IDs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts Updates config-change test trigger to the new allowedDomains setting key.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/terminalSandboxService.test.ts Updates sandbox tests to set the new flat network settings instead of the nested object.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts Switches sandbox config generation and change detection to read the new flat settings.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandbox.ts Removes now-unused nested network/settings interfaces.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts Defines the new flat settings, adds a deprecated schema entry for the old nested key.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.ts Updates guidance text to reference the new allowedDomains setting key.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.ts Updates refresh logic to react to changes in any of the new flat settings.
src/vs/workbench/contrib/terminal/terminalContribExports.ts Exports the new setting IDs (and deprecated key) via TerminalContribSettingId.
src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts Adds the configuration migration from the deprecated nested key to the new flat keys.

Split the nested `chat.tools.terminal.sandbox.network` object setting into three flat settings:
- `chat.tools.terminal.sandbox.network.allowedDomains`
- `chat.tools.terminal.sandbox.network.deniedDomains`
- `chat.tools.terminal.sandbox.network.allowTrustedDomains`

Add configuration migration to automatically migrate existing values.
The old setting is preserved as deprecated with a pointer to the new ones.

Fixes #304232
@alexdima alexdima force-pushed the alexdima/flatten-sandbox-network-settings branch from 679578d to 811be76 Compare March 23, 2026 21:36
@alexdima alexdima marked this pull request as ready for review March 23, 2026 21:37
@alexdima alexdima enabled auto-merge (squash) March 23, 2026 21:37
@alexdima alexdima self-assigned this Mar 23, 2026
@alexdima alexdima modified the milestones: 1.112.1, 1.113.0 Mar 23, 2026
@alexdima alexdima linked an issue Mar 23, 2026 that may be closed by this pull request
@alexdima alexdima disabled auto-merge March 23, 2026 22:17
@alexdima alexdima merged commit 9590091 into release/1.113 Mar 23, 2026
19 checks passed
@alexdima alexdima deleted the alexdima/flatten-sandbox-network-settings branch March 23, 2026 22:17
alexdima added a commit that referenced this pull request Mar 23, 2026
Split the nested `chat.tools.terminal.sandbox.network` object setting into three flat settings:
- `chat.tools.terminal.sandbox.network.allowedDomains`
- `chat.tools.terminal.sandbox.network.deniedDomains`
- `chat.tools.terminal.sandbox.network.allowTrustedDomains`

Add configuration migration to automatically migrate existing values.
The old setting is preserved as deprecated with a pointer to the new ones.

Fixes #304232
alexdima added a commit that referenced this pull request Mar 23, 2026
Flatten sandbox network settings (#304270)

Split the nested `chat.tools.terminal.sandbox.network` object setting into three flat settings:
- `chat.tools.terminal.sandbox.network.allowedDomains`
- `chat.tools.terminal.sandbox.network.deniedDomains`
- `chat.tools.terminal.sandbox.network.allowTrustedDomains`

Add configuration migration to automatically migrate existing values.
The old setting is preserved as deprecated with a pointer to the new ones.

Fixes #304232
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.

Flatten sandbox network settings

3 participants