copilotSlashCommandCompletionProvider.ts ×11

Frontier kind: Code frontier

unlabeled · c_c604e9c641e7

33 tests · 21755 LOC · 81 files · introduces 0 tests · 15 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges15 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1858 ranges21755 lines · 81 files · Browse complete extent
All tests (intent)
33 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: 15 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotSlashCommandCompletionProvider.ts 15 introduced LOC · 11 ranges

Open complete file

121
122 for (const command of runtimeCommands) {
123 > if (!command.name) { copilotSlashCommandCompletionProvider.ts
124 continue;
125 }
126 > if (returnJustSkills && command.kind !== 'skill') { copilotSlashCommandCompletionProvider.ts
127 continue;
128 }
129 > if (command.kind === 'skill' && knownSkills.has(command.name)) { copilotSlashCommandCompletionProvider.ts
130 // This is a known skill, so we don't want to show it in the runtime command completion list.
131 continue;
132 }
133 > if (HIDDEN_RUNTIME_COMMANDS.has(command.name) || command.aliases?.some(alias => HIDDEN_RUNTIME_COMMANDS.has(alias))) { copilotSlashCommandCompletionProvider.ts
134 continue;
135 }
137 // as workbench-defined items; skip any runtime command that collides
138 // with them (e.g. a runtime `plan`) to avoid duplicate suggestions.
139 > if (isCopilotConfigSlashCommand(command.name) || command.aliases?.some(alias => isCopilotConfigSlashCommand(alias))) { copilotSlashCommandCompletionProvider.ts
140 continue;
141 }
142 > if (!rubberDuckEnabled && command.name === 'rubber-duck') { copilotSlashCommandCompletionProvider.ts
143 continue;
144 }
145 > if (!matchesSlashCompletion(typedLower, command.name) && !command.aliases?.some(alias => matchesSlashCompletion(typedLower, alias))) { copilotSlashCommandCompletionProvider.ts
146 continue;
147 }
151 // If we have a hint, then this means we have a structured command with sub commands or options.
152 // I.e. the standalone command is also valie.
153 > if (command.input?.hint || !command.input?.choices?.length) { copilotSlashCommandCompletionProvider.ts
154 options.push({ name: '', description: command.description, argumentHint: command.input?.hint });
155 }
156 > if (command.input?.choices?.length) { copilotSlashCommandCompletionProvider.ts
157 options.push(...command.input.choices);
158 }
160 // Generate completion items for each alias and option combination.
161 // If there are no options, generate a single completion item for the alias.
162 > const aliases = Array.from(new Set([command.name].concat(command.aliases ?? []))); copilotSlashCommandCompletionProvider.ts
163 > aliases
164 > .filter(alias => !addedAliases.has(alias))
165 > .forEach(alias => {
166 options
167 .forEach(option => {