From b665f247aa8734e18e8161a03c26e786582fa7c6 Mon Sep 17 00:00:00 2001 From: isidorn Date: Fri, 18 Oct 2024 16:49:05 +0200 Subject: [PATCH 1/2] add copilot tag --- src/package.ts | 2 ++ src/test/package.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/package.ts b/src/package.ts index b0b95ea3..f7e65e8e 100644 --- a/src/package.ts +++ b/src/package.ts @@ -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( (r, l) => [...r, `lp-${l.languageId}`, ...toLanguagePackTags(l.translations, l.languageId)], @@ -717,6 +718,7 @@ export class TagsProcessor extends BaseProcessor { ...json, ...remoteMenu, ...chatParticipants, + ...copilot, ...localizationContributions, ...languageContributions, ...languageActivations, diff --git a/src/test/package.test.ts b/src/test/package.test.ts index ba18dac3..e020e0a6 100644 --- a/src/test/package.test.ts +++ b/src/test/package.test.ts @@ -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', @@ -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', () => { From 7fbc8c6a061f091d08e6d8fa14680fa725474404 Mon Sep 17 00:00:00 2001 From: BeniBenj Date: Fri, 18 Oct 2024 17:51:27 +0200 Subject: [PATCH 2/2] :lipstick: --- src/package.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/package.ts b/src/package.ts index f7e65e8e..c005c2f2 100644 --- a/src/package.ts +++ b/src/package.ts @@ -675,8 +675,7 @@ export class TagsProcessor extends BaseProcessor { const debuggers = doesContribute('debuggers') ? ['debuggers'] : []; 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 chatParticipants = doesContribute('chatParticipants') ? ['chat-participant', 'copilot'] : []; const localizationContributions = ((contributes && contributes['localizations']) ?? []).reduce( (r, l) => [...r, `lp-${l.languageId}`, ...toLanguagePackTags(l.translations, l.languageId)], @@ -718,7 +717,6 @@ export class TagsProcessor extends BaseProcessor { ...json, ...remoteMenu, ...chatParticipants, - ...copilot, ...localizationContributions, ...languageContributions, ...languageActivations, @@ -1638,7 +1636,7 @@ async function collectAllFiles( cwd: string, dependencies: 'npm' | 'yarn' | 'none' | undefined, dependencyEntryPoints?: string[], - followSymlinks:boolean = true + followSymlinks: boolean = true ): Promise { const deps = await getDependencies(cwd, dependencies, dependencyEntryPoints); const promises = deps.map(dep => @@ -1672,7 +1670,7 @@ function collectFiles( ignoreFile?: string, manifestFileIncludes?: string[], readmePath?: string, - followSymlinks:boolean = false + followSymlinks: boolean = false ): Promise { readmePath = readmePath ?? 'README.md'; const notIgnored = ['!package.json', `!${readmePath}`];