copilotToolDisplay.ts ×14

Frontier kind: Code frontier

unlabeled · c_5fbd8f3f9d75

125 tests · 18241 LOC · 67 files · introduces 0 tests · 22 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
14 ranges22 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1238 ranges18241 lines · 67 files · Browse complete extent
All tests (intent)
125 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: 22 introduced LOC across 14 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotToolDisplay.ts 22 introduced LOC · 14 ranges

Open complete file

586
587 export function getInvocationMessage(toolName: string, displayName: string, parameters: Record<string, unknown> | undefined): StringOrMarkdown {
588 > const serverDisplay = getServerToolDisplay(toolName, parameters)?.invocationMessage; copilotToolDisplay.ts
589 > if (serverDisplay !== undefined) {
590 return serverDisplay;
591 }
632 return localize('toolInvoke.view', "Reading file");
633 }
634 > case CopilotToolName.Edit: { copilotToolDisplay.ts
635 const args = parameters as ICopilotFileToolArgs | undefined;
636 if (args?.path) {
639 return localize('toolInvoke.edit', "Editing file");
640 }
641 > case CopilotToolName.Create: { copilotToolDisplay.ts
642 const args = parameters as ICopilotFileToolArgs | undefined;
643 if (args?.path) {
646 return localize('toolInvoke.create', "Creating file");
647 }
648 > case CopilotToolName.Grep: { copilotToolDisplay.ts
649 const args = parameters as ICopilotGrepToolArgs | undefined;
650 if (args?.pattern) {
653 return localize('toolInvoke.grep', "Searching files");
654 }
655 > case CopilotToolName.Rg: { copilotToolDisplay.ts
656 const args = parameters as ICopilotRgToolArgs | undefined;
657 if (args?.pattern) {
660 return localize('toolInvoke.grep', "Searching files");
661 }
662 > case CopilotToolName.Glob: { copilotToolDisplay.ts
663 const args = parameters as ICopilotGlobToolArgs | undefined;
664 if (args?.pattern) {
667 return localize('toolInvoke.glob', "Finding files");
668 }
669 > case CopilotToolName.ApplyPatch: copilotToolDisplay.ts
670 > case CopilotToolName.GitApplyPatch: {
671 const files = getEditFilePaths(parameters);
672 if (files.length === 1) {
678 return localize('toolInvoke.patch', "Editing files");
679 }
680 > case CopilotToolName.Sql: { copilotToolDisplay.ts
681 const args = parameters as ICopilotSqlToolArgs | undefined;
682 return args?.description || localize('toolInvoke.sql', "Executing SQL query");
683 }
684 > case CopilotToolName.WebFetch: { copilotToolDisplay.ts
685 const args = parameters as ICopilotWebFetchToolArgs | undefined;
686 if (args?.url) {
689 return localize('toolInvoke.webFetchGeneric', "Fetching URL");
690 }
691 > case CopilotToolName.ExitPlanMode: copilotToolDisplay.ts
692 return localize('toolInvoke.exitPlanMode', "Presenting plan");
693 > case CopilotToolName.Task: copilotToolDisplay.ts
694 return localize('toolInvoke.task', "Delegating task");
695 > // The agent-coordination tools (list/read/write agents) are fast, so copilotToolDisplay.ts
696 > // they use a single message for both the running and completed states:
697 > // the past-tense phrasing. See getPastTenseMessage.
698 > case CopilotToolName.ListAgents:
699 > case CopilotToolName.ReadAgent:
700 > case CopilotToolName.WriteAgent:
701 return getPastTenseMessage(toolName, displayName, parameters, true);
702 > default: copilotToolDisplay.ts
703 return displayName;
705 > }
706
707 export function getPastTenseMessage(toolName: string, displayName: string, parameters: Record<string, unknown> | undefined, success: boolean, resultText?: string): StringOrMarkdown {