Skip to content

Commit ba070b6

Browse files
authored
Merge pull request #1058 from microsoft/benibenj/potential-narwhal
Auto Assign Chat Participant Tag
2 parents 6e45fcd + bb7be2f commit ba070b6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/package.ts

+2
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ export class TagsProcessor extends BaseProcessor {
670670
const debuggers = doesContribute('debuggers') ? ['debuggers'] : [];
671671
const json = doesContribute('jsonValidation') ? ['json'] : [];
672672
const remoteMenu = doesContribute('menus', 'statusBar/remoteIndicator') ? ['remote-menu'] : [];
673+
const chatParticipants = doesContribute('chatParticipants') ? ['chat-participant'] : [];
673674

674675
const localizationContributions = ((contributes && contributes['localizations']) ?? []).reduce<string[]>(
675676
(r, l) => [...r, `lp-${l.languageId}`, ...toLanguagePackTags(l.translations, l.languageId)],
@@ -710,6 +711,7 @@ export class TagsProcessor extends BaseProcessor {
710711
...debuggers,
711712
...json,
712713
...remoteMenu,
714+
...chatParticipants,
713715
...localizationContributions,
714716
...languageContributions,
715717
...languageActivations,

src/test/package.test.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,22 @@ describe('toVsixManifest', () => {
13321332
.then(result => assert.deepEqual(result.PackageManifest.Metadata[0].Tags[0], 'snippet,__web_extension'));
13331333
});
13341334

1335+
it('should automatically add chatParticipant tag', () => {
1336+
const manifest = {
1337+
name: 'test',
1338+
publisher: 'mocha',
1339+
version: '0.0.1',
1340+
engines: Object.create(null),
1341+
contributes: {
1342+
chatParticipants: [{ name: 'test', id: 'test' }],
1343+
},
1344+
};
1345+
1346+
return _toVsixManifest(manifest, [])
1347+
.then(parseXmlManifest)
1348+
.then(result => assert.deepEqual(result.PackageManifest.Metadata[0].Tags[0], 'chat-participant,__web_extension'));
1349+
});
1350+
13351351
it('should remove duplicate tags', () => {
13361352
const manifest = {
13371353
name: 'test',

0 commit comments

Comments
 (0)