@@ -4,14 +4,14 @@ Date: Mon, 11 Mar 2024 17:38:30 +0100
44Subject: [PATCH] fix: improve extension contribution types
55
66---
7- .../platform/extensions/common/extensions.ts | 1448 ++++++++++++++++-
7+ .../platform/extensions/common/extensions.ts | 1457 ++++++++++++++++-
88 .../services/search/common/queryBuilder.ts | 8 +-
99 .../themes/common/colorExtensionPoint.ts | 2 +-
1010 .../tokenClassificationExtensionPoint.ts | 1 +
11- 4 files changed, 1389 insertions(+), 70 deletions(-)
11+ 4 files changed, 1398 insertions(+), 70 deletions(-)
1212
1313diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts
14- index 3e5b309b826..6e099d27098 100644
14+ index 3e5b309b826..22328736cac 100644
1515--- a/src/vs/platform/extensions/common/extensions.ts
1616+++ b/src/vs/platform/extensions/common/extensions.ts
1717@@ -3,6 +3,7 @@
@@ -369,10 +369,8 @@ index 3e5b309b826..6e099d27098 100644
369369+ * Path of the tmTheme file. The path is relative to the extension folder and is typically './colorthemes/awesome-color-theme.json'.
370370+ */
371371+ readonly path: string;
372- }
373-
374- - export interface ITheme {
375- - label: string;
372+ + }
373+ +
376374+ export interface IIconTheme {
377375+ /**
378376+ * Id of the file icon theme as used in the user settings.
@@ -386,8 +384,10 @@ index 3e5b309b826..6e099d27098 100644
386384+ * Path of the file icon theme definition file. The path is relative to the extension folder and is typically './fileicons/awesome-icon-theme.json'.
387385+ */
388386+ readonly path: string;
389- + }
390- +
387+ }
388+
389+ - export interface ITheme {
390+ - label: string;
391391+ export interface IProductTheme {
392392+ /**
393393+ * Id of the product icon theme as used in the user settings.
@@ -642,11 +642,11 @@ index 3e5b309b826..6e099d27098 100644
642642+ * Unique identifier of the notebook output renderer.
643643+ */
644644 readonly id: string;
645+ - readonly displayName: string;
645646+ /**
646647+ * Human readable name of the notebook output renderer.
647648+ */
648- readonly displayName: string;
649- - readonly mimeTypes: string[];
649+ + readonly displayName: string;
650650+ readonly dependencies?: string[];
651651+ readonly optionalDependencies?: string[];
652652+ /**
@@ -656,15 +656,15 @@ index 3e5b309b826..6e099d27098 100644
656656+ /**
657657+ * Set of globs that the notebook is for.
658658+ */
659- + readonly mimeTypes: string[];
659+ readonly mimeTypes: string[];
660660+ readonly entrypoint: string | {
661661+ readonly extends: string;
662662+ readonly path: string;
663663+ };
664664 }
665665
666666 export interface IDebugVisualizationContribution {
667- @@ -157,16 +625,706 @@ export interface IDebugVisualizationContribution {
667+ @@ -157,32 +625,735 @@ export interface IDebugVisualizationContribution {
668668 }
669669
670670 export interface ITranslation {
@@ -1377,31 +1377,42 @@ index 3e5b309b826..6e099d27098 100644
13771377 }
13781378
13791379 export interface IChatParticipantContribution {
1380- @@ -176,6 +1334,7 @@ export interface IChatParticipantContribution {
1380+ id: string;
1381+ name: string;
1382+ fullName: string;
1383+ + when?: string;
13811384 description?: string;
13821385 isDefault?: boolean;
1386+ + isSticky?: boolean;
1387+ + sampleRequest?: string;
13831388 commands?: { name: string }[];
1384- + modes: string[]
1389+ + locations?: string[];
1390+ + modes: string[];
1391+ + disambiguation?: { category: string; categoryName?: string /** Deprecated */; description: string; examples: string[] }[];
13851392 }
13861393
13871394 export interface IToolContribution {
1388- @@ -183,6 +1342,9 @@ export interface IToolContribution {
1395+ name: string;
13891396 displayName: string;
13901397 modelDescription: string;
1391- userDescription?: string;
13921398+ toolReferenceName?: string;
1393- + canBeReferencedInPrompt?: boolean
1394- + inputSchema?: object
1399+ + legacyToolReferenceFullNames?: string[];
1400+ + icon?: string | { light: string; dark: string };
1401+ + when?: string;
1402+ + tags?: string[];
1403+ userDescription?: string;
1404+ + inputSchema?: IJSONSchema;
1405+ + canBeReferencedInPrompt?: boolean;
13951406 }
13961407
13971408 export interface IToolSetContribution {
1398- @@ -206,32 +1368 ,112 @@ export interface IChatFileContribution {
1409+ @@ -206,32 +1377 ,112 @@ export interface IChatFileContribution {
13991410 readonly when?: string;
14001411 }
14011412
14021413+ export interface ILanguageModelChatProvider {
1403- + vendor: string
1404- + displayName?: string
1414+ + vendor: string;
1415+ + displayName?: string;
14051416+ }
14061417+
14071418 export interface IExtensionContributions {
@@ -1528,7 +1539,7 @@ index 3e5b309b826..6e099d27098 100644
15281539 readonly chatParticipants?: ReadonlyArray<IChatParticipantContribution>;
15291540 readonly chatPromptFiles?: ReadonlyArray<IChatFileContribution>;
15301541 readonly chatInstructions?: ReadonlyArray<IChatFileContribution>;
1531- @@ -240,6 +1482 ,82 @@ export interface IExtensionContributions {
1542+ @@ -240,6 +1491 ,82 @@ export interface IExtensionContributions {
15321543 readonly languageModelTools?: ReadonlyArray<IToolContribution>;
15331544 readonly languageModelToolSets?: ReadonlyArray<IToolSetContribution>;
15341545 readonly mcpServerDefinitionProviders?: ReadonlyArray<IMcpCollectionContribution>;
0 commit comments