Improve ahp copilot cli tool display via matching tool names#316284
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns the Agent Host’s Copilot tool display (names and some invocation/completion messages) with the friendly labels used by the Copilot Chat CLI integration, as tracked in issue #315182.
Changes:
- Added
getToolDisplayNamecoverage to mirror Copilot CLI friendly labels for a representative set of tool names. - Expanded
getToolDisplayNamemappings to cover more Copilot CLI tools and adjusted shell read messages (“Reading Terminal” / “Read Terminal”). - Added
sqltool invocation/completion messaging that prefers an optionaldescriptionparameter.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/node/copilot/copilotToolDisplay.ts | Adds/adjusts friendly tool display name mappings and updates some tool messages (shell read + sql). |
| src/vs/platform/agentHost/test/node/copilotToolDisplay.test.ts | Adds assertions for friendly tool labels, updates shell read message expectations, and adds SQL message tests. |
Copilot's findings
Comments suppressed due to low confidence (1)
src/vs/platform/agentHost/node/copilot/copilotToolDisplay.ts:417
globis now displayed as “Search”, butgetToolKindonly returns'search'forgrep/rg(viaSEARCH_TOOL_NAMES). This will likely renderglobwithout the search icon/kind, making it inconsistent with the new labeling. Consider addingglobtoSEARCH_TOOL_NAMES(and updating tests if needed) so the UI hint matches the friendly name.
case CopilotToolName.Grep:
case CopilotToolName.Rg:
case CopilotToolName.Glob: return localize('toolName.search', "Search");
- Files reviewed: 2/2 changed files
- Comments generated: 2
Contributor
Author
|
Also addressed the suppressed |
Contributor
TylerLeonhardt
approved these changes
May 14, 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.
Part of: #315182
toolNameunchanged for protocol identity.Expected with this PR:
Read Terminal,Edit File,Create Pull Request, and instead of raw tool IDs.globrenders with the same search-style hint asgrep/rg.str_replace,insert, or editingstr_replace_editorcommands can still produce file-edit/diff content.str_replace_editorview/read usage does not get treated as a file edit.Steps to manually validate
Ask Copilot CLI - Agent Host to run and read shell output:
Expected: the read helper row says
Read Terminal.Ask it to use glob search:
Expected: the tool displays as
Searchand uses search-style rendering.Ask it to make a tiny scratch-file edit with an edit tool such as
str_replace/insert/ editingstr_replace_editor:Expected: the edit tool displays as
Edit Fileand the changed file can appear in the file-change summary/diff UI.Follow-up:
Inspirations from:
ToolFriendlyNameAndHandlers.str_replace_editoredit-vs-view classification followsisCopilotCliEditToolCalland affected-file detection ingetAffectedUrisForEditTool.str_replace_editorcommand split betweenview,edit,insert, andcreatecomes fromformatStrReplaceEditorInvocation.globsearch-kind update extends the existing Agent Host search rendering hook inSEARCH_TOOL_NAMES.