Skip to content

Use terminal-secure icon for sandboxed commands#303778

Merged
alexdima merged 4 commits intomainfrom
alexd/loyal-turtle
Mar 21, 2026
Merged

Use terminal-secure icon for sandboxed commands#303778
alexdima merged 4 commits intomainfrom
alexd/loyal-turtle

Conversation

@alexdima
Copy link
Member

@alexdima alexdima commented Mar 21, 2026

Fixes #303422

Changes

Adopt @vscode/codicons 0.0.46-0

  • Update @vscode/codicons from 0.0.45-14 to 0.0.46-0 in root and remote/web
  • Copy updated codiconsLibrary.ts (adds terminal-secure icon)
  • Update cgmanifest.json and ThirdPartyNotices.txt

Use terminal-secure codicon for sandboxed terminal commands

  • Add optional icon field to IPreparedToolInvocation and IChatToolInvocation, allowing tools to set a per-invocation icon
  • The terminal tool sets the icon to terminal-secure when sandbox is active, or terminal otherwise
  • getToolInvocationIcon() now accepts an optional registered icon, using it when provided instead of the ID-based heuristic
  • Remove $(lock) theme icon prefix from sandbox invocation messages — the icon on the tool invocation itself now communicates the sandbox state

cc @Tyriar @meganrogge @roblourens @justschen

Add per-invocation icon support to tool invocations via
`IPreparedToolInvocation.icon` and `IChatToolInvocation.icon`.
The terminal tool sets the icon to `terminal-secure` when sandbox
is active, or `terminal` otherwise. The thinking content part and
subagent content part use this icon when rendering, falling back
to the existing heuristic for tools without a registered icon.

Also removes the $(lock) theme icon prefix from sandbox invocation
messages since the icon now communicates the sandbox state.
Copilot AI review requested due to automatic review settings March 21, 2026 20:30
@alexdima alexdima changed the title Adopt @vscode/codicons 0.0.46-0 and use terminal-secure icon for sandboxed commands Use terminal-secure icon for sandboxed commands Mar 21, 2026
@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 21, 2026
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 updates the repo to @vscode/codicons@0.0.46-0 (bringing in the new terminal-secure codicon) and threads a per-invocation icon through the chat tool invocation pipeline so the terminal tool can visually indicate when a command ran sandboxed.

Changes:

  • Bump @vscode/codicons to 0.0.46-0 (root + remote/web) and update codicon library/attribution files.
  • Add optional icon?: ThemeIcon to IPreparedToolInvocation / IChatToolInvocation so tools can provide a per-invocation icon.
  • Use Codicon.terminalSecure for sandboxed terminal invocations and remove the $(lock) prefix in sandbox messages.

Reviewed changes

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

Show a summary per file
File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts Sets tool + invocation icon to terminal-secure for sandboxed executions; removes lock-prefix message.
src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.ts Extends IPreparedToolInvocation with optional icon.
src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.ts Plumbs prepared/tool icon into ChatToolInvocation.
src/vs/workbench/contrib/chat/common/chatService/chatService.ts Adds icon?: ThemeIcon to IChatToolInvocation surface type (and a compatibility placeholder on serialized type).
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.ts Removes $(lock) prefix from sandbox terminal progress label.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.ts Allows a registered/per-invocation icon to override heuristic icon selection.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.ts Passes per-invocation icon through to getToolInvocationIcon.
src/vs/base/common/codiconsLibrary.ts Adds terminal-secure mapping (terminalSecure).
remote/web/package.json Updates @vscode/codicons dependency.
remote/web/package-lock.json Locks @vscode/codicons to 0.0.46-0.
package.json Updates @vscode/codicons dependency.
package-lock.json Locks @vscode/codicons to 0.0.46-0.
cgmanifest.json Updates codicons component version.
ThirdPartyNotices.txt Updates codicons notice/version.
Files not reviewed (1)
  • remote/web/package-lock.json: Language not supported

@alexdima alexdima enabled auto-merge March 21, 2026 20:52
@alexdima alexdima merged commit c021375 into main Mar 21, 2026
19 checks passed
@alexdima alexdima deleted the alexd/loyal-turtle branch March 21, 2026 21:15
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.

Sandbox icon is not vertically aligned and could be better

3 participants