Skip to content

Commit a87fb97

Browse files
rajbosCopilot
andcommitted
Remove capitalized duplicates and add deduplication rule to agent
- Remove capitalized duplicate entries from toolNames.json: Agent, Glob, Grep, Read, Write, Edit, Skill, ToolSearch (lowercase variants already exist) - Remove capitalized duplicates from automaticTools.json: Read, Grep, Glob, ToolSearch - Update tool-names.agent.md with case-insensitive deduplication rule to prevent re-adding PascalCase variants when lowercase form already exists Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a8759b7 commit a87fb97

3 files changed

Lines changed: 2 additions & 12 deletions

File tree

.github/agents/tool-names.agent.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ When adding a new tool to `toolNames.json`, also determine if it belongs in `aut
124124
- The file is a plain JSON array of tool ID strings
125125
- Add new entries at the end of the array (before the closing `]`)
126126
- Keep related tool variants together (e.g., all variants of `read_file`)
127+
- **Case-insensitive deduplication**: Before adding a tool ID, check if a differently-cased variant (e.g., lowercase equivalent) is already in the array. If `grep` is already there, do **not** add `Grep`. Only add a capitalized variant if the lowercase form is absent.
127128

128129

129130

@@ -134,6 +135,7 @@ When adding a new tool to `toolNames.json`, also determine if it belongs in `aut
134135
- Insert new MCP entries near existing entries with the same prefix
135136
- Insert new non-MCP entries alphabetically or near logically related tools
136137
- Never remove existing entries
138+
- **Case-insensitive deduplication**: Before adding a new tool ID, check whether a lowercase (or differently-cased) variant already exists. If `grep` is already mapped, do **not** add `Grep`. If `tool_search` is already mapped, do **not** add `ToolSearch`. The lookup code handles exact-match only, so capitalized variants do map differently — but if both would resolve to the *exact same friendly name*, skip the duplicate. Only add a capitalized variant when it has a meaningfully different name or the lowercase form does not exist at all.
137139

138140
### Validation
139141

vscode-extension/src/automaticTools.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"read_file",
33
"copilot_readFile",
44
"read",
5-
"Read",
65
"view",
76
"view_image",
87
"copilot_viewImage",
@@ -22,9 +21,7 @@
2221

2322
"grep_search",
2423
"grep",
25-
"Grep",
2624
"glob",
27-
"Glob",
2825

2926
"semantic_search",
3027
"copilot_searchCodebase",
@@ -74,7 +71,6 @@
7471
"tool_replay",
7572
"copilot_toolReplay",
7673
"tool_search",
77-
"ToolSearch",
7874

7975
"get_task_output",
8076
"get_output_window_logs",

vscode-extension/src/toolNames.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@
187187
,"test_search": "Test Search"
188188
,"tool_replay": "Tool Replay"
189189
,"tool_search": "Tool Search"
190-
,"ToolSearch": "Tool Search"
191190
,"vscode_askQuestions": "VSCode Ask Questions"
192191
,"vscode_get_confirmation": "VSCode Get Confirmation"
193192
,"vscode_get_confirmation_with_options": "VSCode Get Confirmation With Options"
@@ -317,20 +316,16 @@
317316
,"claude-code": "Claude Code"
318317
,"copilot-cloud-agent": "Copilot Cloud Agent"
319318
,"agent": "Agent"
320-
,"Agent": "Agent"
321319
,"copilotcli": "Copilot CLI"
322320
,"github.copilot.default": "GitHub Copilot Default"
323321
,"github.copilot.workspace": "GitHub Copilot Workspace"
324322
,"github.copilot.vscode": "GitHub Copilot VSCode"
325323
,"github.copilot-dynamic.platform": "GitHub Copilot Dynamic: Platform"
326324
,"glob": "Glob"
327-
,"Glob": "Glob"
328325
,"file_glob_search": "File Glob Search"
329326
,"grep": "Grep"
330-
,"Grep": "Grep"
331327
,"kill_terminal": "Kill Terminal"
332328
,"read": "Read"
333-
,"Read": "Read"
334329
,"view": "View"
335330
,"vscode_editFile_internal": "VSCode Edit File (Internal)"
336331
,"vscode_fetchWebPage_internal": "VSCode Fetch Web Page (Internal)"
@@ -344,15 +339,12 @@
344339
,"webfetch": "Web Fetch"
345340
,"web_fetch": "Web Fetch"
346341
,"write": "Write"
347-
,"Write": "Write"
348342
,"edit": "Edit"
349-
,"Edit": "Edit"
350343
,"search_replace": "Search Replace"
351344
,"write_file": "Write File"
352345
,"multiedit": "Multi Edit"
353346
,"question": "Question"
354347
,"skill": "Skill"
355-
,"Skill": "Skill"
356348
,"read_skill": "Read Skill"
357349
,"task": "Task"
358350
,"todowrite": "Todo Write"

0 commit comments

Comments
 (0)