Flatten sandbox network settings#304270
Merged
alexdima merged 1 commit intorelease/1.113from Mar 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.networkto 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. |
src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts
Outdated
Show resolved
Hide resolved
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
679578d to
811be76
Compare
mjbvz
approved these changes
Mar 23, 2026
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
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.
Split the nested
chat.tools.terminal.sandbox.networkobject setting into three flat settings:chat.tools.terminal.sandbox.network.allowedDomainschat.tools.terminal.sandbox.network.deniedDomainschat.tools.terminal.sandbox.network.allowTrustedDomainsIncludes 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