copilotToolDisplay.ts ×17

Frontier kind: Code frontier

unlabeled · c_43c48a8a0cf3

69 tests · 18230 LOC · 67 files · introduces 0 tests · 19 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
17 ranges19 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1237 ranges18230 lines · 67 files · Browse complete extent
All tests (intent)
69 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: 19 introduced LOC across 17 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotToolDisplay.ts 19 introduced LOC · 17 ranges

Open complete file

706
707 export function getPastTenseMessage(toolName: string, displayName: string, parameters: Record<string, unknown> | undefined, success: boolean, resultText?: string): StringOrMarkdown {
708 > if (!success) { copilotToolDisplay.ts
709 return localize('toolComplete.failed', "\"{0}\" failed", displayName);
710 }
711
712 const serverDisplay = getServerToolDisplay(toolName, parameters, { text: resultText, success })?.pastTenseMessage;
713 > if (serverDisplay !== undefined) { copilotToolDisplay.ts
714 return serverDisplay;
715 }
756 return localize('toolComplete.view', "Read file");
757 }
758 > case CopilotToolName.Edit: { copilotToolDisplay.ts
759 const args = parameters as ICopilotFileToolArgs | undefined;
760 if (args?.path) {
763 return localize('toolComplete.edit', "Edited file");
764 }
765 > case CopilotToolName.Create: { copilotToolDisplay.ts
766 const args = parameters as ICopilotFileToolArgs | undefined;
767 if (args?.path) {
770 return localize('toolComplete.create', "Created file");
771 }
772 > case CopilotToolName.Grep: { copilotToolDisplay.ts
773 const args = parameters as ICopilotGrepToolArgs | undefined;
774 if (args?.pattern) {
777 return localize('toolComplete.grep', "Searched files");
778 }
779 > case CopilotToolName.Rg: { copilotToolDisplay.ts
780 const args = parameters as ICopilotRgToolArgs | undefined;
781 if (args?.pattern) {
784 return localize('toolComplete.grep', "Searched files");
785 }
786 > case CopilotToolName.Glob: { copilotToolDisplay.ts
787 const args = parameters as ICopilotGlobToolArgs | undefined;
788 if (args?.pattern) {
791 return localize('toolComplete.glob', "Found files");
792 }
793 > case CopilotToolName.ApplyPatch: copilotToolDisplay.ts
794 > case CopilotToolName.GitApplyPatch: {
795 const files = getEditFilePaths(parameters);
796 if (files.length === 1) {
802 return localize('toolComplete.patch', "Edited files");
803 }
804 > case CopilotToolName.Sql: { copilotToolDisplay.ts
805 const args = parameters as ICopilotSqlToolArgs | undefined;
806 return args?.description || localize('toolComplete.sql', "Executed SQL query");
807 }
808 > case CopilotToolName.WebFetch: { copilotToolDisplay.ts
809 const args = parameters as ICopilotWebFetchToolArgs | undefined;
810 if (args?.url) {
813 return localize('toolComplete.webFetchGeneric', "Fetched URL");
814 }
815 > case CopilotToolName.ExitPlanMode: copilotToolDisplay.ts
816 return localize('toolComplete.exitPlanMode', "Exited plan mode");
817 > case CopilotToolName.Task: copilotToolDisplay.ts
818 return localize('toolComplete.task', "Delegated task");
819 > case CopilotToolName.ListAgents: copilotToolDisplay.ts
820 return localize('toolComplete.listAgents', "Listed agents");
821 > case CopilotToolName.ReadAgent: { copilotToolDisplay.ts
822 const agentId = getAgentId(parameters);
823 if (agentId) {
826 return localize('toolComplete.readAgentGeneric', "Read agent");
827 }
828 > case CopilotToolName.WriteAgent: { copilotToolDisplay.ts
829 const agentId = getAgentId(parameters);
830 if (agentId) {
833 return localize('toolComplete.writeAgentGeneric', "Wrote to agent");
834 }
835 > default: copilotToolDisplay.ts
836 return displayName;
838 > }
839
840 // =============================================================================