Skip to content

Commit

Permalink
add copilot tag
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed Oct 18, 2024
1 parent a4930cc commit b665f24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ export class TagsProcessor extends BaseProcessor {
const json = doesContribute('jsonValidation') ? ['json'] : [];
const remoteMenu = doesContribute('menus', 'statusBar/remoteIndicator') ? ['remote-menu'] : [];
const chatParticipants = doesContribute('chatParticipants') ? ['chat-participant'] : [];
const copilot = doesContribute('chatParticipants') ? ['copilot'] : [];

const localizationContributions = ((contributes && contributes['localizations']) ?? []).reduce<string[]>(
(r, l) => [...r, `lp-${l.languageId}`, ...toLanguagePackTags(l.translations, l.languageId)],
Expand Down Expand Up @@ -717,6 +718,7 @@ export class TagsProcessor extends BaseProcessor {
...json,
...remoteMenu,
...chatParticipants,
...copilot,
...localizationContributions,
...languageContributions,
...languageActivations,
Expand Down
4 changes: 2 additions & 2 deletions src/test/package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ describe('toVsixManifest', () => {
.then(result => assert.deepEqual(result.PackageManifest.Metadata[0].Tags[0], 'snippet,__web_extension'));
});

it('should automatically add chatParticipant tag', () => {
it('should automatically add chatParticipant and copilot tag', () => {
const manifest = {
name: 'test',
publisher: 'mocha',
Expand All @@ -1345,7 +1345,7 @@ describe('toVsixManifest', () => {

return _toVsixManifest(manifest, [])
.then(parseXmlManifest)
.then(result => assert.deepEqual(result.PackageManifest.Metadata[0].Tags[0], 'chat-participant,__web_extension'));
.then(result => assert.deepEqual(result.PackageManifest.Metadata[0].Tags[0], 'chat-participant,copilot,__web_extension'));
});

it('should remove duplicate tags', () => {
Expand Down

0 comments on commit b665f24

Please sign in to comment.