copilotToolDisplay.ts ×2

Frontier kind: Code frontier

unlabeled · c_0adec2b9fc90

112 tests · 18276 LOC · 67 files · introduces 0 tests · 57 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
2 ranges57 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1226 ranges18276 lines · 67 files · Browse complete extent
All tests (intent)
112 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 57 introduced LOC across 2 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotToolDisplay.ts 57 introduced LOC · 2 ranges

Open complete file

523
524 export function getToolDisplayName(toolName: string): string {
525 > const serverDisplay = getServerToolDisplay(toolName, undefined)?.displayName; copilotToolDisplay.ts
526 > if (serverDisplay !== undefined) {
527 return serverDisplay;
528 }
529 switch (toolName) {
530 case CopilotToolName.StrReplaceEditor:
531 > case CopilotToolName.Edit: copilotToolDisplay.ts
532 > case CopilotToolName.StrReplace:
533 > case CopilotToolName.Insert: return localize('toolName.edit', "Edit File");
534 > case CopilotToolName.Create: return localize('toolName.create', "Create File");
535 > case CopilotToolName.View: return localize('toolName.read', "Read");
536 > case CopilotToolName.Bash:
537 > case CopilotToolName.PowerShell: return localize('toolName.shell', "Run Shell Command");
538 > case CopilotToolName.ReadBash:
539 > case CopilotToolName.ReadPowerShell: return localize('toolName.readTerminal', "Read Terminal");
540 > case CopilotToolName.WriteBash: return localize('toolName.writeBash', "Write to Bash");
541 > case CopilotToolName.WritePowerShell: return localize('toolName.writePowerShell', "Write to PowerShell");
542 > case CopilotToolName.StopBash:
543 > case CopilotToolName.StopPowerShell:
544 > case CopilotToolName.BashShutdown:
545 > case CopilotToolName.PowerShellShutdown: return localize('toolName.stopShell', "Stop Terminal Session");
546 > case CopilotToolName.ListBash:
547 > case CopilotToolName.ListPowerShell: return localize('toolName.listShellSessions', "List Shell Sessions");
548 > case CopilotToolName.Grep:
549 > case CopilotToolName.Rg:
550 > case CopilotToolName.Glob: return localize('toolName.search', "Search");
551 > case CopilotToolName.SearchCodeSubagent: return localize('toolName.searchCode', "Search Code");
552 > case CopilotToolName.ApplyPatch: return localize('toolName.applyPatch', "Apply Patch");
553 > case CopilotToolName.GitApplyPatch: return localize('toolName.patch', "Patch");
554 > case CopilotToolName.CodeqlChecker: return localize('toolName.codeqlChecker', "CodeQL Security Scan");
555 > case CopilotToolName.CodeReview: return localize('toolName.codeReview', "Code Review");
556 > case CopilotToolName.ReplyToComment: return localize('toolName.replyToComment', "Reply to Comment");
557 > case CopilotToolName.Think: return localize('toolName.think', "Thinking");
558 > case CopilotToolName.ReportIntent: return localize('toolName.reportIntent', "Report Intent");
559 > case CopilotToolName.ReportProgress: return localize('toolName.reportProgress', "Progress update");
560 > case CopilotToolName.WebSearch: return localize('toolName.webSearch', "Web Search");
561 > case CopilotToolName.WebFetch: return localize('toolName.fetchWebContent', "Fetch Web Content");
562 > case CopilotToolName.UpdateTodo: return localize('toolName.updateTodo', "Update Todo");
563 > case CopilotToolName.ShowFile: return localize('toolName.showFile', "Show File");
564 > case CopilotToolName.FetchCopilotCliDocumentation: return localize('toolName.fetchCopilotCliDocumentation', "Fetch Documentation");
565 > case CopilotToolName.ProposeWork: return localize('toolName.proposeWork', "Propose Work");
566 > case CopilotToolName.TaskComplete: return localize('toolName.taskComplete', "Task Complete");
567 > case CopilotToolName.AskUser: return localize('toolName.askUser', "Ask User");
568 > case CopilotToolName.Skill: return localize('toolName.invokeSkill', "Invoke Skill");
569 > case CopilotToolName.Task: return localize('toolName.task', "Delegate Task");
570 > case CopilotToolName.ListAgents: return localize('toolName.listAgents', "List Agents");
571 > case CopilotToolName.ReadAgent: return localize('toolName.readAgent', "Read Agent");
572 > case CopilotToolName.ExitPlanMode: return localize('toolName.exitPlanModeFull', "Exit Plan Mode");
573 > case CopilotToolName.Sql: return localize('toolName.sql', "Execute SQL");
574 > case CopilotToolName.Lsp: return localize('toolName.lsp', "Language Server");
575 > case CopilotToolName.CreatePullRequest: return localize('toolName.createPullRequest', "Create Pull Request");
576 > case CopilotToolName.GhAdvisoryDatabase: return localize('toolName.ghAdvisoryDatabase', "Check Dependencies");
577 > case CopilotToolName.StoreMemory: return localize('toolName.storeMemory', "Store Memory");
578 > case CopilotToolName.ParallelValidation: return localize('toolName.parallelValidation', "Validate Changes");
579 > case CopilotToolName.WriteAgent: return localize('toolName.writeAgent', "Write to Agent");
580 > case CopilotToolName.McpReload: return localize('toolName.mcpReload', "Reload MCP Config");
581 > case CopilotToolName.McpValidate: return localize('toolName.mcpValidate', "Validate MCP Config");
582 > case CopilotToolName.ToolSearchToolRegex: return localize('toolName.toolSearchToolRegex', "Search Tools");
583 > default: return toolName;
584 > }
585 > }
586
587 export function getInvocationMessage(toolName: string, displayName: string, parameters: Record<string, unknown> | undefined): StringOrMarkdown {