Skip to content

AH skill completions: qualify skill with plugin#321929

Open
aeschli wants to merge 1 commit into
mainfrom
aeschli/alert-dingo-566
Open

AH skill completions: qualify skill with plugin#321929
aeschli wants to merge 1 commit into
mainfrom
aeschli/alert-dingo-566

Conversation

@aeschli

@aeschli aeschli commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 18, 2026 14:04
@aeschli aeschli enabled auto-merge (squash) June 18, 2026 14:04
@aeschli aeschli self-assigned this Jun 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants