Skip to content

[TerminalSandboxing]: Include workspace folders as default in the sandbox config#302834

Merged
dileepyavan merged 2 commits intomainfrom
DileepY/multipleWorkspace_issue
Mar 18, 2026
Merged

[TerminalSandboxing]: Include workspace folders as default in the sandbox config#302834
dileepyavan merged 2 commits intomainfrom
DileepY/multipleWorkspace_issue

Conversation

@dileepyavan
Copy link
Member

@dileepyavan dileepyavan commented Mar 18, 2026

fixes #302904

This PR adds the multi root workspace folders as default to the sandbox config

Copilot AI review requested due to automatic review settings March 18, 2026 14:13
@dileepyavan dileepyavan enabled auto-merge (squash) March 18, 2026 14:14
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 config generation so that workspace folder paths are included in the default filesystem allowWrite list, and ensures the config is refreshed when workspace folders change (multi-root support).

Changes:

  • Add IWorkspaceContextService dependency to TerminalSandboxService and refresh sandbox config on workspace folder changes.
  • Include current workspace folder paths in the generated sandbox filesystem allowWrite list.
  • Extend unit tests with a workspace context service mock and a test covering config refresh on folder changes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts Adds workspace-folder-driven allowWrite defaults and triggers config regeneration on workspace folder changes.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/terminalSandboxService.test.ts Adds workspace context mocking and a test asserting config refresh behavior when workspace folders change.

You can also share your feedback on Copilot code review. Take the survey.

@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 18, 2026
@dileepyavan dileepyavan merged commit a76935c into main Mar 18, 2026
24 checks passed
@dileepyavan dileepyavan deleted the DileepY/multipleWorkspace_issue branch March 18, 2026 14:41
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.

Support multi-root workspaces in sandboxing

3 participants