AH skill completions: qualify skill with plugin#321929
Open
aeschli wants to merge 1 commit into
Open
Conversation
lszomoru
approved these changes
Jun 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Agent Host skill slash-completion logic to include plugin qualification in the suggested command name (e.g. plugin-id:skill-id) and adjusts the completion tests to cover plugin-qualified skills, including the “plugin name equals skill name” case.
Changes:
- Emit completions using a plugin-qualified slash command name (
/<pluginId>:<skillName>) while keeping the underlying attachment metadata (_meta.name) as the raw skill name. - Add/adjust unit tests to validate plugin qualification behavior and token replacement behavior while typing.
- Refactor candidate construction to carry both the raw skill name and the computed slash command name.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/node/agentHostSkillCompletionProvider.ts | Builds skill completion items using a plugin-qualified slash-command name. |
| src/vs/platform/agentHost/test/node/agentHostSkillCompletionProvider.test.ts | Updates/adds tests asserting the new plugin-qualified completion behavior. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 8
| const result = await run(provider, '/'); | ||
|
|
||
| assert.deepStrictEqual(result.map(item => item.insertText), ['/session-skill ', '/global-skill ']); | ||
| assert.deepStrictEqual(result.map(item => item.insertText), ['/$first:session-skill ', '/$second:global-skill ']); |
| const result = await run(provider, '/'); | ||
|
|
||
| assert.deepStrictEqual(result.map(item => item.insertText), ['/visible-skill ']); | ||
| assert.deepStrictEqual(result.map(item => item.insertText), ['/$enabled:visible-skill ']); |
Comment on lines
+158
to
162
| const result = await run(provider, '/$skills:b extra', '/$skills:b'.length); | ||
|
|
||
| assert.deepStrictEqual(result.map(item => ({ insertText: item.insertText, rangeStart: item.rangeStart, rangeEnd: item.rangeEnd })), [ | ||
| { insertText: '/beta ', rangeStart: 0, rangeEnd: 2 }, | ||
| { insertText: '/$skills:beta ', rangeStart: 0, rangeEnd: 10 }, | ||
| ]); |
Comment on lines
+169
to
175
| const text = 'use /$skills:b extra'; | ||
|
|
||
| const result = await run(provider, text, text.indexOf('/b') + '/b'.length); | ||
| const result = await run(provider, text, text.indexOf('/$skills:b') + '/$skills:b'.length); | ||
|
|
||
| assert.deepStrictEqual(result.map(item => ({ insertText: item.insertText, rangeStart: item.rangeStart, rangeEnd: item.rangeEnd })), [ | ||
| { insertText: '/beta ', rangeStart: 4, rangeEnd: 6 }, | ||
| { insertText: '/$skills:beta ', rangeStart: 4, rangeEnd: 14 }, | ||
| ]); |
Comment on lines
186
to
189
| assert.deepStrictEqual(result.map(item => ({ insertText: item.insertText, rangeStart: item.rangeStart, rangeEnd: item.rangeEnd })), [ | ||
| { insertText: '/alpha ', rangeStart: 4, rangeEnd: 5 }, | ||
| { insertText: '/beta ', rangeStart: 4, rangeEnd: 5 }, | ||
| { insertText: '/$skills:alpha ', rangeStart: 4, rangeEnd: 5 }, | ||
| { insertText: '/$skills:beta ', rangeStart: 4, rangeEnd: 5 }, | ||
| ]); |
| agent.getSessionCustomizations = async () => [plugin('skills', [skill('cached-skill')])]; | ||
| const provider = createProvider(agent); | ||
| const text = 'use /cached-skill trailing'; | ||
| const text = 'use /$skills:cached-skill trailing'; |
| const agent = new MockAgent('mock'); | ||
| agent.getSessionCustomizations = async () => [plugin('skills', [skill('cached-skill')])]; | ||
| const provider = createProvider(agent); | ||
| const text = '/$skills:cached-skill trailing'; |
Comment on lines
88
to
90
| if (child.type === CustomizationType.Skill) { | ||
| result.push(child); | ||
| result.push(this._toSlashCommandCandidate(c.type === CustomizationType.Plugin ? c.name : undefined, child)); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.