Skip to content

Improve ahp copilot cli tool display via matching tool names#316284

Merged
anthonykim1 merged 4 commits into
mainfrom
anthonykim1/betterToolName
May 14, 2026
Merged

Improve ahp copilot cli tool display via matching tool names#316284
anthonykim1 merged 4 commits into
mainfrom
anthonykim1/betterToolName

Conversation

@anthonykim1
Copy link
Copy Markdown
Contributor

@anthonykim1 anthonykim1 commented May 13, 2026

Part of: #315182

  • Align Agent Host Copilot CLI tool display names with the Copilot Chat CLI integration for known built-in tools.
  • Cover shell, file/edit, search, agent/task, PR, MCP, validation, and CodeQL tool names while keeping the raw toolName unchanged for protocol identity.

Expected with this PR:

  • Agent Host Copilot CLI chat shows friendly labels such as Read Terminal, Edit File, Create Pull Request, and instead of raw tool IDs.
  • glob renders with the same search-style hint as grep / rg.
  • File edits made through str_replace, insert, or editing str_replace_editor commands can still produce file-edit/diff content.
  • str_replace_editor view/read usage does not get treated as a file edit.
readTerminalAlignments todoAlignments
Steps to manually validate

Ask Copilot CLI - Agent Host to run and read shell output:

Run ls in terminal, then read the terminal output.

Expected: the read helper row says Read Terminal.

Ask it to use glob search:

Find all package.json files in this repo using glob.

Expected: the tool displays as Search and uses search-style rendering.

Ask it to make a tiny scratch-file edit with an edit tool such as str_replace / insert / editing str_replace_editor:

Create a scratch file, make a tiny edit to it, then show me the change.

Expected: the edit tool displays as Edit File and the changed file can appear in the file-change summary/diff UI.

Follow-up:

  • This PR is scoped to AHP tool display naming, rendering hints, localization-key hygiene, and edit tracking for the aligned edit tools.
  • Expandable tool input/output UI and the SQL-backed todo widget bridge remain separate follow-up work.

Inspirations from:

@anthonykim1 anthonykim1 added this to the 1.121.0 milestone May 13, 2026
@anthonykim1 anthonykim1 self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 18:32
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 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 getToolDisplayName coverage to mirror Copilot CLI friendly labels for a representative set of tool names.
  • Expanded getToolDisplayName mappings to cover more Copilot CLI tools and adjusted shell read messages (“Reading Terminal” / “Read Terminal”).
  • Added sql tool invocation/completion messaging that prefers an optional description parameter.
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

  • glob is now displayed as “Search”, but getToolKind only returns 'search' for grep/rg (via SEARCH_TOOL_NAMES). This will likely render glob without the search icon/kind, making it inconsistent with the new labeling. Consider adding glob to SEARCH_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

Comment thread src/vs/platform/agentHost/node/copilot/copilotToolDisplay.ts
Comment thread src/vs/platform/agentHost/node/copilot/copilotToolDisplay.ts Outdated
@anthonykim1
Copy link
Copy Markdown
Contributor Author

Also addressed the suppressed glob suggestion in aca1db98780: glob is now included in SEARCH_TOOL_NAMES, so it gets toolKind: search to match its Search display label. Added a unit test for that path.

@anthonykim1 anthonykim1 marked this pull request as ready for review May 14, 2026 01:27
@anthonykim1 anthonykim1 moved this to In Progress in Agent Host Protocol May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: a4ef193e Current: c9b07125

Changed (2)

agentSessionsViewer/CloudProvider/Dark
Before After
before after
agentSessionsViewer/CloudProvider/Light
Before After
before after

@anthonykim1 anthonykim1 merged commit 0d2147e into main May 14, 2026
25 checks passed
@anthonykim1 anthonykim1 deleted the anthonykim1/betterToolName branch May 14, 2026 02:06
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Agent Host Protocol May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants