Skip to content

Commit 6fe5abd

Browse files
committed
and fix languageModelTools
1 parent 203c51a commit 6fe5abd

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

src/package.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ export class TagsProcessor extends BaseProcessor {
682682
const json = doesContribute('jsonValidation') ? ['json'] : [];
683683
const remoteMenu = doesContribute('menus', 'statusBar/remoteIndicator') ? ['remote-menu'] : [];
684684
const chatParticipants = doesContribute('chatParticipants') ? ['chat-participant'] : [];
685-
const languageModelTool = doesContribute('languageModelTool') ? ['tools'] : [];
685+
const languageModelTools = doesContribute('languageModelTools') ? ['tools'] : [];
686686

687687
const localizationContributions = ((contributes && contributes['localizations']) ?? []).reduce<string[]>(
688688
(r, l) => [...r, `lp-${l.languageId}`, ...toLanguagePackTags(l.translations, l.languageId)],
@@ -724,7 +724,7 @@ export class TagsProcessor extends BaseProcessor {
724724
...json,
725725
...remoteMenu,
726726
...chatParticipants,
727-
...languageModelTool,
727+
...languageModelTools,
728728
...localizationContributions,
729729
...languageContributions,
730730
...languageActivations,

src/test/package.test.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ describe('toVsixManifest', () => {
13331333
.then(result => assert.deepEqual(result.PackageManifest.Metadata[0].Tags[0], 'snippet,__web_extension'));
13341334
});
13351335

1336-
it('should automatically add chatParticipant and github-copilot tag', () => {
1336+
it('should automatically add chatParticipant tag', () => {
13371337
const manifest = {
13381338
name: 'test',
13391339
publisher: 'mocha',
@@ -1346,7 +1346,23 @@ describe('toVsixManifest', () => {
13461346

13471347
return _toVsixManifest(manifest, [])
13481348
.then(parseXmlManifest)
1349-
.then(result => assert.deepEqual(result.PackageManifest.Metadata[0].Tags[0], 'chat-participant,github-copilot,__web_extension'));
1349+
.then(result => assert.deepEqual(result.PackageManifest.Metadata[0].Tags[0], 'chat-participant,__web_extension'));
1350+
});
1351+
1352+
it('should automatically add tools tag', () => {
1353+
const manifest = {
1354+
name: 'test',
1355+
publisher: 'mocha',
1356+
version: '0.0.1',
1357+
engines: Object.create(null),
1358+
contributes: {
1359+
languageModelTools: [{ name: 'test', id: 'test' }],
1360+
},
1361+
};
1362+
1363+
return _toVsixManifest(manifest, [])
1364+
.then(parseXmlManifest)
1365+
.then(result => assert.deepEqual(result.PackageManifest.Metadata[0].Tags[0], 'tools,__web_extension'));
13501366
});
13511367

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

0 commit comments

Comments
 (0)