Skip to content

Align run_in_terminal output cap to 60kb and remove dead sanitizeTerminalOutput#311298

Merged
anthonykim1 merged 2 commits intomainfrom
anthonykim1/fix60and16
Apr 20, 2026
Merged

Align run_in_terminal output cap to 60kb and remove dead sanitizeTerminalOutput#311298
anthonykim1 merged 2 commits intomainfrom
anthonykim1/fix60and16

Conversation

@anthonykim1
Copy link
Copy Markdown
Contributor

Resolves: #309372

/cc @meganrogge

What was happening:

This PR aligns it to 60kb.

Also deleting sanitizeTerminalOutput and the duplicate MAX_OUTPUT_LENGTH

  • sanitizeTerminalOutput was only referenced in test and nowhere else. Ghost code.

…inalOutput

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 20, 2026 04:22
@anthonykim1 anthonykim1 self-assigned this Apr 20, 2026
@anthonykim1 anthonykim1 added this to the 1.117.0 milestone Apr 20, 2026
@anthonykim1 anthonykim1 marked this pull request as ready for review April 20, 2026 04:23
Copy link
Copy Markdown
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 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 getOutput truncation limit from 16,000 to 60,000 characters to match the tool description.
  • Remove dead sanitizeTerminalOutput helper and its associated test coverage.
  • Simplify runInTerminalHelpers imports 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 20, 2026

Screenshot Changes

Base: 173f07e5 Current: aa496636

Changed (3)

agentSessionsViewer/CompletedUnread/Dark
Before After
before after
agentSessionsViewer/WithBadge/Dark
Before After
before after
agentSessionsViewer/WithBadge/Light
Before After
before after

@anthonykim1 anthonykim1 merged commit 341ef7d into main Apr 20, 2026
26 checks passed
@anthonykim1 anthonykim1 deleted the anthonykim1/fix60and16 branch April 20, 2026 05:02
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.

run_in_terminal tool description advertises 60KB output truncation but the live code path truncates at 16KB

3 participants