Use terminal-secure icon for sandboxed commands#303778
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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/codiconsto0.0.46-0(root +remote/web) and update codicon library/attribution files. - Add optional
icon?: ThemeIcontoIPreparedToolInvocation/IChatToolInvocationso tools can provide a per-invocation icon. - Use
Codicon.terminalSecurefor 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
src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts
Show resolved
Hide resolved
bpasero
approved these changes
Mar 21, 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.
Fixes #303422
Changes
Adopt
@vscode/codicons0.0.46-0@vscode/codiconsfrom0.0.45-14to0.0.46-0in root andremote/webcodiconsLibrary.ts(addsterminal-secureicon)cgmanifest.jsonandThirdPartyNotices.txtUse
terminal-securecodicon for sandboxed terminal commandsiconfield toIPreparedToolInvocationandIChatToolInvocation, allowing tools to set a per-invocation iconterminal-securewhen sandbox is active, orterminalotherwisegetToolInvocationIcon()now accepts an optional registered icon, using it when provided instead of the ID-based heuristiccc @Tyriar @meganrogge @roblourens @justschen