Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add copilot tag #1069

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +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 chatParticipants = doesContribute('chatParticipants') ? ['chat-participant', 'copilot'] : [];

const localizationContributions = ((contributes && contributes['localizations']) ?? []).reduce<string[]>(
(r, l) => [...r, `lp-${l.languageId}`, ...toLanguagePackTags(l.translations, l.languageId)],
Expand Down Expand Up @@ -1636,7 +1636,7 @@ async function collectAllFiles(
cwd: string,
dependencies: 'npm' | 'yarn' | 'none' | undefined,
dependencyEntryPoints?: string[],
followSymlinks:boolean = true
followSymlinks: boolean = true
): Promise<string[]> {
const deps = await getDependencies(cwd, dependencies, dependencyEntryPoints);
const promises = deps.map(dep =>
Expand Down Expand Up @@ -1670,7 +1670,7 @@ function collectFiles(
ignoreFile?: string,
manifestFileIncludes?: string[],
readmePath?: string,
followSymlinks:boolean = false
followSymlinks: boolean = false
): Promise<string[]> {
readmePath = readmePath ?? 'README.md';
const notIgnored = ['!package.json', `!${readmePath}`];
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