Skip to content

[cherry-pick] fix for not showing sandboxed command in chat window#314250

Merged
dileepyavan merged 2 commits intomicrosoft:release/1.119from
dileepyavan:DileepY/314200-release-1.119
May 5, 2026
Merged

[cherry-pick] fix for not showing sandboxed command in chat window#314250
dileepyavan merged 2 commits intomicrosoft:release/1.119from
dileepyavan:DileepY/314200-release-1.119

Conversation

@dileepyavan
Copy link
Copy Markdown
Member

@dileepyavan dileepyavan commented May 4, 2026

fixes #314200

Copilot AI review requested due to automatic review settings May 4, 2026 21:46
@dileepyavan dileepyavan enabled auto-merge (squash) May 4, 2026 21:48
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 cherry-pick updates runInTerminalTool so background terminal notifications use a display-oriented command label instead of the wrapped sandbox command, improving how terminal activity is surfaced back into chat.

Changes:

  • Pass a metadata/display command string into background completion notifications.
  • Prefer the non-wrapper command text for sandboxed executions shown in chat/system-initiated labels.
Show a summary per file
File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts Changes the command label used when registering background terminal completion/input-needed notifications.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts:1573

  • This changes the label-selection path for background notifications, but the existing runInTerminalTool tests only cover fixed command names passed directly into _registerCompletionNotification. There is no regression test for the sandboxed + user-edited case, which is how the stale-label bug above slips through.
					this._registerCompletionNotification(toolTerminal.instance, termId, chatSessionResource, commandLineForMetadata || command, outputMonitor);
  • Files reviewed: 1/1 changed files
  • Comments generated: 1

// background terminal, and continue the output monitor for prompt-for-input detection.
if (shouldSendNotifications) {
this._registerCompletionNotification(toolTerminal.instance, termId, chatSessionResource, command, outputMonitor);
this._registerCompletionNotification(toolTerminal.instance, termId, chatSessionResource, commandLineForMetadata || command, outputMonitor);
@dileepyavan dileepyavan merged commit 81ab96d into microsoft:release/1.119 May 5, 2026
25 of 26 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.119.0 milestone May 5, 2026
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.

3 participants