Align run_in_terminal output cap to 60kb and remove dead sanitizeTerminalOutput#311298
Merged
anthonykim1 merged 2 commits intomainfrom Apr 20, 2026
Merged
Align run_in_terminal output cap to 60kb and remove dead sanitizeTerminalOutput#311298anthonykim1 merged 2 commits intomainfrom
anthonykim1 merged 2 commits intomainfrom
Conversation
…inalOutput Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a mismatch in the terminal chat agent tools where run_in_terminal advertised ~60KB of output but the live output retrieval path truncated at ~16KB. It also removes an unused output-sanitization helper to eliminate duplicate truncation constants.
Changes:
- Increase
getOutputtruncation limit from 16,000 to 60,000 characters to match the tool description. - Remove dead
sanitizeTerminalOutputhelper and its associated test coverage. - Simplify
runInTerminalHelpersimports after removing the dead helper.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/runInTerminalHelpers.test.ts | Removes the now-obsolete unit test for the deleted sanitizeTerminalOutput. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.ts | Deletes dead sanitizeTerminalOutput and its unused max-length constant/import. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.ts | Aligns the live terminal output cap to 60,000 characters. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 1
Contributor
justschen
approved these changes
Apr 20, 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.
Resolves: #309372
/cc @meganrogge
What was happening:
run_in_terminaltool description told model output was truncated at 60kb ->vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts
Line 135 in 173f07e
getOutputpath was actually capping at 16kb instead.This PR aligns it to 60kb.
Also deleting
sanitizeTerminalOutputand the duplicate MAX_OUTPUT_LENGTHsanitizeTerminalOutputwas only referenced in test and nowhere else. Ghost code.