Skip to content

trim leading slash from terminal commands#301550

Merged
meganrogge merged 5 commits intomainfrom
merogge/slash
Mar 13, 2026
Merged

trim leading slash from terminal commands#301550
meganrogge merged 5 commits intomainfrom
merogge/slash

Conversation

@meganrogge
Copy link
Collaborator

cc @Tyriar

fix #301294

Copilot AI review requested due to automatic review settings March 13, 2026 17:55
@meganrogge meganrogge self-assigned this Mar 13, 2026
@meganrogge meganrogge added this to the 1.112.0 milestone Mar 13, 2026
@meganrogge meganrogge enabled auto-merge (squash) March 13, 2026 17:55
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 adjusts how terminal tool commands are presented in the chat UI to avoid showing transient escape artifacts while a run_in_terminal tool call is streaming, addressing the UX issue reported in #301294.

Changes:

  • Added normalizeTerminalCommandForDisplay helper to clean up displayed command strings.
  • Applied normalization when rendering streamed tool invocation messages and when computing commandLine.forDisplay for terminal confirmations.
  • Added unit tests covering quote-unescape behavior for the new normalization helper.

Reviewed changes

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

File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/runInTerminalHelpers.test.ts Adds unit coverage for the new command-display normalization helper.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts Uses normalized command text for streaming status text and forDisplay/confirmation rendering.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.ts Introduces normalizeTerminalCommandForDisplay used to remove escape artifacts in UI.

meganrogge and others added 2 commits March 13, 2026 13:59
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@meganrogge meganrogge merged commit 83c783c into main Mar 13, 2026
20 checks passed
@meganrogge meganrogge deleted the merogge/slash branch March 13, 2026 18:39
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.

\ escapes in terminal command

3 participants