Improve terminal unsandbox retry confirmation#309671
Merged
dileepyavan merged 14 commits intomainfrom Apr 14, 2026
Merged
Conversation
…r/tools/runInTerminalTool.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts: # src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts
Contributor
Screenshot ChangesBase: Changed (17) |
Contributor
There was a problem hiding this comment.
Pull request overview
Improves the UX and logic around the “automatic unsandbox retry” confirmation shown after a sandboxed terminal command fails due to sandbox restrictions, keeping the pre-run unsandbox confirmation behavior unchanged.
Changes:
- Removes the sandbox documentation markdown link from the retry confirmation title by introducing a dedicated title builder.
- Separates “force auto-approval” from the retry-confirmation decision so forced approvals can still suppress the initial confirmation but not suppress the retry elicitation.
- Adds tests covering the new retry title text and the force-approval vs retry-confirmation behavior.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts | Refactors auto-approval logic to preserve retry confirmations and adds a helper to generate a plain retry title (no doc link). |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts | Adds unit tests validating the retry title text and ensuring forced auto-approval still requires retry elicitation when appropriate. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
roblourens
previously approved these changes
Apr 13, 2026
joshspicer
approved these changes
Apr 14, 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.
Summary
Fixes #308506
This improves the automatic unsandbox retry confirmation shown after a sandboxed terminal command fails due to sandbox restrictions.
Changes:
Run \bash` command outside the sandbox?`Run \bash` command outside the sandbox to access `example.com`?`Testing
npm run transpile-client./scripts/test.sh --run src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.tsResult:
157 passing105 pendingNote: the focused test command was run unsandboxed because sandboxed execution repeatedly failed during Electron bootstrap while resolving/downloading from
github.com, before tests executed.