@codingame/monaco-vscode-api 1.83.14 → 1.83.15-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/api.js +1 -1
  2. package/contributions.js +36 -0
  3. package/extensions.d.ts +83 -4
  4. package/extensions.js +9 -14
  5. package/lifecycle.js +4 -1
  6. package/localExtensionHost.js +207 -0
  7. package/missing-services.js +15 -3
  8. package/monaco-editor-treemending.patch +3376 -3365
  9. package/monaco.js +4 -36
  10. package/package.json +10 -6
  11. package/service-override/tools/editor.d.ts +6 -6
  12. package/services.d.ts +18 -18
  13. package/services.js +1 -0
  14. package/vscode/src/vs/base/common/errors.d.ts +1 -8
  15. package/vscode/src/vs/base/common/uri.d.ts +1 -7
  16. package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -27
  17. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +39 -1
  18. package/vscode/src/vs/platform/workspace/common/workspace.d.ts +1 -44
  19. package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +160 -2
  20. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +1 -0
  21. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +10 -0
  22. package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +2 -37
  23. package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +2 -73
  24. package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +1 -5
  25. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +174 -0
  26. package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +49 -0
  27. package/vscode-dts/vscode.proposed.authGetSessions.d.ts +62 -0
  28. package/vscode-dts/vscode.proposed.authSession.d.ts +13 -0
  29. package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +47 -0
  30. package/vscode-dts/vscode.proposed.chat.d.ts +25 -0
  31. package/vscode-dts/vscode.proposed.chatAgents.d.ts +39 -0
  32. package/vscode-dts/vscode.proposed.chatProvider.d.ts +38 -0
  33. package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +47 -0
  34. package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +47 -0
  35. package/vscode-dts/vscode.proposed.chatVariables.d.ts +35 -0
  36. package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +48 -0
  37. package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +18 -0
  38. package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +6 -0
  39. package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +10 -0
  40. package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +8 -0
  41. package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +8 -0
  42. package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +6 -0
  43. package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +6 -0
  44. package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +6 -0
  45. package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +6 -0
  46. package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +6 -0
  47. package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +6 -0
  48. package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +7 -0
  49. package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +8 -0
  50. package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +6 -0
  51. package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +6 -0
  52. package/vscode-dts/vscode.proposed.customEditorMove.d.ts +29 -0
  53. package/vscode-dts/vscode.proposed.debugFocus.d.ts +74 -0
  54. package/vscode-dts/vscode.proposed.diffCommand.d.ts +38 -0
  55. package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +16 -0
  56. package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +13 -0
  57. package/vscode-dts/vscode.proposed.documentPaste.d.ts +111 -0
  58. package/vscode-dts/vscode.proposed.dropMetadata.d.ts +60 -0
  59. package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +71 -0
  60. package/vscode-dts/vscode.proposed.editorInsets.d.ts +22 -0
  61. package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +24 -0
  62. package/vscode-dts/vscode.proposed.extensionsAny.d.ts +40 -0
  63. package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +163 -0
  64. package/vscode-dts/vscode.proposed.fileComments.d.ts +85 -0
  65. package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +67 -0
  66. package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +104 -0
  67. package/vscode-dts/vscode.proposed.fsChunks.d.ts +16 -0
  68. package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +31 -0
  69. package/vscode-dts/vscode.proposed.idToken.d.ts +16 -0
  70. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +71 -0
  71. package/vscode-dts/vscode.proposed.interactive.d.ts +227 -0
  72. package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +70 -0
  73. package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +25 -0
  74. package/vscode-dts/vscode.proposed.ipc.d.ts +37 -0
  75. package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +42 -0
  76. package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +52 -0
  77. package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +17 -0
  78. package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +16 -0
  79. package/vscode-dts/vscode.proposed.notebookExecution.d.ts +39 -0
  80. package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +46 -0
  81. package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +21 -0
  82. package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +68 -0
  83. package/vscode-dts/vscode.proposed.notebookMime.d.ts +33 -0
  84. package/vscode-dts/vscode.proposed.portsAttributes.d.ts +100 -0
  85. package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +19 -0
  86. package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +17 -0
  87. package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +16 -0
  88. package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +16 -0
  89. package/vscode-dts/vscode.proposed.readonlyMessage.d.ts +14 -0
  90. package/vscode-dts/vscode.proposed.resolvers.d.ts +371 -0
  91. package/vscode-dts/vscode.proposed.saveEditor.d.ts +35 -0
  92. package/vscode-dts/vscode.proposed.scmActionButton.d.ts +19 -0
  93. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +77 -0
  94. package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +22 -0
  95. package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +19 -0
  96. package/vscode-dts/vscode.proposed.scmValidation.d.ts +60 -0
  97. package/vscode-dts/vscode.proposed.shareProvider.d.ts +74 -0
  98. package/vscode-dts/vscode.proposed.showLocal.d.ts +19 -0
  99. package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +25 -0
  100. package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +16 -0
  101. package/vscode-dts/vscode.proposed.telemetry.d.ts +36 -0
  102. package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +32 -0
  103. package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +39 -0
  104. package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +46 -0
  105. package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +83 -0
  106. package/vscode-dts/vscode.proposed.terminalSelection.d.ts +16 -0
  107. package/vscode-dts/vscode.proposed.testCoverage.d.ts +198 -0
  108. package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +45 -0
  109. package/vscode-dts/vscode.proposed.testObserver.d.ts +184 -0
  110. package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +281 -0
  111. package/vscode-dts/vscode.proposed.timeline.d.ts +163 -0
  112. package/vscode-dts/vscode.proposed.tokenInformation.d.ts +26 -0
  113. package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +30 -0
  114. package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +28 -0
  115. package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +13 -0
  116. package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +44 -0
  117. package/vscode-dts/vscode.proposed.tunnels.d.ts +64 -0
  118. package/vscode-dts/vscode.proposed.windowActivity.d.ts +17 -0
  119. package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +30 -0
  120. package/vscode/src/vs/base/common/ternarySearchTree.d.ts +0 -46
  121. package/vscode/src/vs/base/common/uriIpc.d.ts +0 -10
  122. package/vscode/src/vs/platform/workspace/common/editSessions.d.ts +0 -7
  123. package/vscode/src/vs/workbench/services/extensions/common/proxyIdentifier.d.ts +0 -44
  124. package/vscode/src/vs/workbench/services/search/common/search.d.ts +0 -52
  125. package/vscode.proposed.d.ts +0 -4787
@@ -1,11 +1,5 @@
1
- import { Event } from '../../../../base/common/event.js';
2
- import { ExtensionIdentifier, IExtensionDescription } from '../../../../platform/extensions/common/extensions.js';
1
+ import { IExtensionDescription, ExtensionIdentifier } from '../../../../platform/extensions/common/extensions.js';
3
2
 
4
- declare class DeltaExtensionsResult {
5
- readonly versionId: number;
6
- readonly removedDueToLooping: IExtensionDescription[];
7
- constructor(versionId: number, removedDueToLooping: IExtensionDescription[]);
8
- }
9
3
  interface IReadOnlyExtensionDescriptionRegistry {
10
4
  containsActivationEvent(activationEvent: string): boolean;
11
5
  containsExtension(extensionId: ExtensionIdentifier): boolean;
@@ -15,39 +9,10 @@ interface IReadOnlyExtensionDescriptionRegistry {
15
9
  getExtensionDescriptionByUUID(uuid: string): IExtensionDescription | undefined;
16
10
  getExtensionDescriptionByIdOrUUID(extensionId: ExtensionIdentifier | string, uuid: string | undefined): IExtensionDescription | undefined;
17
11
  }
18
- declare class ExtensionDescriptionRegistry implements IReadOnlyExtensionDescriptionRegistry {
19
- private readonly _activationEventsReader;
20
- static isHostExtension(extensionId: ExtensionIdentifier | string, myRegistry: ExtensionDescriptionRegistry, globalRegistry: ExtensionDescriptionRegistry): boolean;
21
- private readonly _onDidChange;
22
- readonly onDidChange: Event<void>;
23
- private _versionId;
24
- private _extensionDescriptions;
25
- private _extensionsMap;
26
- private _extensionsArr;
27
- private _activationMap;
28
- constructor(_activationEventsReader: IActivationEventsReader, extensionDescriptions: IExtensionDescription[]);
29
- private _initialize;
30
- set(extensionDescriptions: IExtensionDescription[]): {
31
- versionId: number;
32
- };
33
- deltaExtensions(toAdd: IExtensionDescription[], toRemove: ExtensionIdentifier[]): DeltaExtensionsResult;
34
- private static _findLoopingExtensions;
35
- containsActivationEvent(activationEvent: string): boolean;
36
- containsExtension(extensionId: ExtensionIdentifier): boolean;
37
- getExtensionDescriptionsForActivationEvent(activationEvent: string): IExtensionDescription[];
38
- getAllExtensionDescriptions(): IExtensionDescription[];
39
- getSnapshot(): ExtensionDescriptionRegistrySnapshot;
40
- getExtensionDescription(extensionId: ExtensionIdentifier | string): IExtensionDescription | undefined;
41
- getExtensionDescriptionByUUID(uuid: string): IExtensionDescription | undefined;
42
- getExtensionDescriptionByIdOrUUID(extensionId: ExtensionIdentifier | string, uuid: string | undefined): IExtensionDescription | undefined;
43
- }
44
12
  declare class ExtensionDescriptionRegistrySnapshot {
45
13
  readonly versionId: number;
46
14
  readonly extensions: readonly IExtensionDescription[];
47
15
  constructor(versionId: number, extensions: readonly IExtensionDescription[]);
48
16
  }
49
- interface IActivationEventsReader {
50
- readActivationEvents(extensionDescription: IExtensionDescription): string[] | undefined;
51
- }
52
17
 
53
- export { DeltaExtensionsResult, ExtensionDescriptionRegistry, ExtensionDescriptionRegistrySnapshot, type IActivationEventsReader, type IReadOnlyExtensionDescriptionRegistry };
18
+ export { ExtensionDescriptionRegistrySnapshot, type IReadOnlyExtensionDescriptionRegistry };
@@ -1,7 +1,4 @@
1
- import { URI, UriDto, UriComponents } from '../../../../base/common/uri.js';
2
- import { ExtensionIdentifier, IExtensionDescription } from '../../../../platform/extensions/common/extensions.js';
3
- import { LogLevel, ILoggerResource } from '../../../../platform/log/common/log.js';
4
- import { IRemoteConnectionData } from '../../../../platform/remote/common/remoteAuthorityResolver.js';
1
+ import { IExtensionDescription, ExtensionIdentifier } from '../../../../platform/extensions/common/extensions.js';
5
2
 
6
3
  interface IExtensionDescriptionSnapshot {
7
4
  readonly versionId: number;
@@ -21,73 +18,5 @@ interface IExtensionDescriptionDelta {
21
18
  readonly myToRemove: ExtensionIdentifier[];
22
19
  readonly myToAdd: ExtensionIdentifier[];
23
20
  }
24
- interface IExtensionHostInitData {
25
- version: string;
26
- quality: string | undefined;
27
- commit?: string;
28
- /**
29
- * When set to `0`, no polling for the parent process still running will happen.
30
- */
31
- parentPid: number | 0;
32
- environment: IEnvironment;
33
- workspace?: IStaticWorkspaceData | null;
34
- extensions: IExtensionDescriptionSnapshot;
35
- nlsBaseUrl?: URI;
36
- telemetryInfo: {
37
- readonly sessionId: string;
38
- readonly machineId: string;
39
- readonly firstSessionDate: string;
40
- readonly msftInternal?: boolean;
41
- };
42
- logLevel: LogLevel;
43
- loggers: UriDto<ILoggerResource>[];
44
- logsLocation: URI;
45
- autoStart: boolean;
46
- remote: {
47
- isRemote: boolean;
48
- authority: string | undefined;
49
- connectionData: IRemoteConnectionData | null;
50
- };
51
- consoleForward: {
52
- includeStack: boolean;
53
- logNative: boolean;
54
- };
55
- uiKind: UIKind;
56
- messagePorts?: ReadonlyMap<string, MessagePortLike>;
57
- }
58
- interface IEnvironment {
59
- isExtensionDevelopmentDebug: boolean;
60
- appName: string;
61
- appHost: string;
62
- appRoot?: URI;
63
- appLanguage: string;
64
- extensionTelemetryLogResource: URI;
65
- isExtensionTelemetryLoggingOnly: boolean;
66
- appUriScheme: string;
67
- extensionDevelopmentLocationURI?: URI[];
68
- extensionTestsLocationURI?: URI;
69
- globalStorageHome: URI;
70
- workspaceStorageHome: URI;
71
- useHostProxy?: boolean;
72
- skipWorkspaceStorageLock?: boolean;
73
- extensionLogLevel?: [string, string][];
74
- }
75
- interface IStaticWorkspaceData {
76
- id: string;
77
- name: string;
78
- transient?: boolean;
79
- configuration?: UriComponents | null;
80
- isUntitled?: boolean | null;
81
- }
82
- interface MessagePortLike {
83
- postMessage(message: any, transfer?: any[]): void;
84
- addEventListener(type: 'message', listener: (e: any) => any): void;
85
- removeEventListener(type: 'message', listener: (e: any) => any): void;
86
- start(): void;
87
- }
88
- declare enum UIKind {
89
- Desktop = 1,
90
- Web = 2
91
- }
92
21
 
93
- export { type IEnvironment, type IExtensionDescriptionDelta, type IExtensionDescriptionSnapshot, type IExtensionHostInitData, type IStaticWorkspaceData, type MessagePortLike, UIKind };
22
+ export type { IExtensionDescriptionDelta, IExtensionDescriptionSnapshot };
@@ -22,10 +22,6 @@ interface IExtensionsStatus {
22
22
  runtimeErrors: Error[];
23
23
  runningLocation: ExtensionRunningLocation | null;
24
24
  }
25
- declare class MissingExtensionDependency {
26
- readonly dependency: string;
27
- constructor(dependency: string);
28
- }
29
25
  declare const enum ExtensionHostStartup {
30
26
  /**
31
27
  * The extension host should be launched immediately and doesn't require a `$startExtensionHost` call.
@@ -237,4 +233,4 @@ interface IExtensionService {
237
233
  }): Promise<void>;
238
234
  }
239
235
 
240
- export { ActivationKind, ActivationTimes, type ExtensionActivationReason, ExtensionHostExtensions, ExtensionHostStartup, ExtensionPointContribution, type IExtensionHost, IExtensionService, type IExtensionsStatus, type IMessage, type IResponsiveStateChangeEvent, type IWillActivateEvent, MissingExtensionDependency, type WillStopExtensionHostsEvent };
236
+ export { ActivationKind, ActivationTimes, type ExtensionActivationReason, ExtensionHostExtensions, ExtensionHostStartup, ExtensionPointContribution, type IExtensionHost, IExtensionService, type IExtensionsStatus, type IMessage, type IResponsiveStateChangeEvent, type IWillActivateEvent, type WillStopExtensionHostsEvent };
@@ -0,0 +1,174 @@
1
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
2
+ import { ExtensionsRegistry } from '../../extensions/common/extensionsRegistry.js';
3
+ import { Extensions } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
4
+ import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
5
+ import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
6
+ import * as resources from 'monaco-editor/esm/vs/base/common/resources.js';
7
+ import { extname, posix } from 'monaco-editor/esm/vs/base/common/path.js';
8
+ const iconRegistry = ( Registry.as(Extensions.IconContribution));
9
+ const iconReferenceSchema = iconRegistry.getIconReferenceSchema();
10
+ const iconIdPattern = `^${ThemeIcon.iconNameSegment}(-${ThemeIcon.iconNameSegment})+$`;
11
+ const iconConfigurationExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
12
+ extensionPoint: 'icons',
13
+ jsonSchema: {
14
+ description: ( nls.localizeWithPath(
15
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
16
+ 'contributes.icons',
17
+ 'Contributes extension defined themable icons'
18
+ )),
19
+ type: 'object',
20
+ propertyNames: {
21
+ pattern: iconIdPattern,
22
+ description: ( nls.localizeWithPath(
23
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
24
+ 'contributes.icon.id',
25
+ 'The identifier of the themable icon'
26
+ )),
27
+ patternErrorMessage: ( nls.localizeWithPath(
28
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
29
+ 'contributes.icon.id.format',
30
+ 'Identifiers can only contain letters, digits and minuses and need to consist of at least two segments in the form `component-iconname`.'
31
+ )),
32
+ },
33
+ additionalProperties: {
34
+ type: 'object',
35
+ properties: {
36
+ description: {
37
+ type: 'string',
38
+ description: ( nls.localizeWithPath(
39
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
40
+ 'contributes.icon.description',
41
+ 'The description of the themable icon'
42
+ )),
43
+ },
44
+ default: {
45
+ anyOf: [
46
+ iconReferenceSchema,
47
+ {
48
+ type: 'object',
49
+ properties: {
50
+ fontPath: {
51
+ description: ( nls.localizeWithPath(
52
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
53
+ 'contributes.icon.default.fontPath',
54
+ 'The path of the icon font that defines the icon.'
55
+ )),
56
+ type: 'string'
57
+ },
58
+ fontCharacter: {
59
+ description: ( nls.localizeWithPath(
60
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
61
+ 'contributes.icon.default.fontCharacter',
62
+ 'The character for the icon in the icon font.'
63
+ )),
64
+ type: 'string'
65
+ }
66
+ },
67
+ required: ['fontPath', 'fontCharacter'],
68
+ defaultSnippets: [{ body: { fontPath: '${1:myiconfont.woff}', fontCharacter: '${2:\\\\E001}' } }]
69
+ }
70
+ ],
71
+ description: ( nls.localizeWithPath(
72
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
73
+ 'contributes.icon.default',
74
+ 'The default of the icon. Either a reference to an extisting ThemeIcon or an icon in an icon font.'
75
+ )),
76
+ }
77
+ },
78
+ required: ['description', 'default'],
79
+ defaultSnippets: [{ body: { description: '${1:my icon}', default: { fontPath: '${2:myiconfont.woff}', fontCharacter: '${3:\\\\E001}' } } }]
80
+ },
81
+ defaultSnippets: [{ body: { '${1:my-icon-id}': { description: '${2:my icon}', default: { fontPath: '${3:myiconfont.woff}', fontCharacter: '${4:\\\\E001}' } } } }]
82
+ }
83
+ }));
84
+ class IconExtensionPoint {
85
+ constructor() {
86
+ iconConfigurationExtPoint.setHandler((extensions, delta) => {
87
+ for (const extension of delta.added) {
88
+ const extensionValue = extension.value;
89
+ const collector = extension.collector;
90
+ if (!extensionValue || typeof extensionValue !== 'object') {
91
+ collector.error(( nls.localizeWithPath(
92
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
93
+ 'invalid.icons.configuration',
94
+ "'configuration.icons' must be an object with the icon names as properties."
95
+ )));
96
+ return;
97
+ }
98
+ for (const id in extensionValue) {
99
+ if (!id.match(iconIdPattern)) {
100
+ collector.error(( nls.localizeWithPath(
101
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
102
+ 'invalid.icons.id.format',
103
+ "'configuration.icons' keys represent the icon id and can only contain letter, digits and minuses. They need to consist of at least two segments in the form `component-iconname`."
104
+ )));
105
+ return;
106
+ }
107
+ const iconContribution = extensionValue[id];
108
+ if (typeof iconContribution.description !== 'string' || iconContribution.description.length === 0) {
109
+ collector.error(( nls.localizeWithPath(
110
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
111
+ 'invalid.icons.description',
112
+ "'configuration.icons.description' must be defined and can not be empty"
113
+ )));
114
+ return;
115
+ }
116
+ const defaultIcon = iconContribution.default;
117
+ if (typeof defaultIcon === 'string') {
118
+ iconRegistry.registerIcon(id, { id: defaultIcon }, iconContribution.description);
119
+ }
120
+ else if (typeof defaultIcon === 'object' && typeof defaultIcon.fontPath === 'string' && typeof defaultIcon.fontCharacter === 'string') {
121
+ const format = extname(defaultIcon.fontPath).substring(1);
122
+ if (['woff', 'woff2', 'ttf'].indexOf(format) === -1) {
123
+ collector.warn(( nls.localizeWithPath(
124
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
125
+ 'invalid.icons.default.fontPath.extension',
126
+ "Expected `contributes.icons.default.fontPath` to have file extension 'woff', woff2' or 'ttf', is '{0}'.",
127
+ format
128
+ )));
129
+ return;
130
+ }
131
+ const extensionLocation = extension.description.extensionLocation;
132
+ const iconFontLocation = resources.joinPath(extensionLocation, defaultIcon.fontPath);
133
+ if (!resources.isEqualOrParent(iconFontLocation, extensionLocation)) {
134
+ collector.warn(( nls.localizeWithPath(
135
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
136
+ 'invalid.icons.default.fontPath.path',
137
+ "Expected `contributes.icons.default.fontPath` ({0}) to be included inside extension's folder ({0}).",
138
+ iconFontLocation.path,
139
+ extensionLocation.path
140
+ )));
141
+ return;
142
+ }
143
+ const fontId = getFontId(extension.description, defaultIcon.fontPath);
144
+ const definition = iconRegistry.registerIconFont(fontId, { src: [{ location: iconFontLocation, format }] });
145
+ iconRegistry.registerIcon(id, {
146
+ fontCharacter: defaultIcon.fontCharacter,
147
+ font: {
148
+ id: fontId,
149
+ definition
150
+ }
151
+ }, iconContribution.description);
152
+ }
153
+ else {
154
+ collector.error(( nls.localizeWithPath(
155
+ 'vs/workbench/services/themes/common/iconExtensionPoint',
156
+ 'invalid.icons.default',
157
+ "'configuration.icons.default' must be either a reference to the id of an other theme icon (string) or a icon definition (object) with properties `fontPath` and `fontCharacter`."
158
+ )));
159
+ }
160
+ }
161
+ }
162
+ for (const extension of delta.removed) {
163
+ const extensionValue = extension.value;
164
+ for (const id in extensionValue) {
165
+ iconRegistry.deregisterIcon(id);
166
+ }
167
+ }
168
+ });
169
+ }
170
+ }
171
+ function getFontId(description, fontPath) {
172
+ return posix.join(description.identifier.value, fontPath);
173
+ }
174
+ export { IconExtensionPoint };
@@ -0,0 +1,49 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/190909
9
+
10
+ export enum RelatedInformationType {
11
+ SymbolInformation = 1,
12
+ CommandInformation = 2,
13
+ SearchInformation = 3,
14
+ SettingInformation = 4
15
+ }
16
+
17
+ interface RelatedInformationBaseResult {
18
+ type: RelatedInformationType;
19
+ weight: number;
20
+ }
21
+
22
+ // TODO: Symbols and Search
23
+
24
+ export interface CommandInformationResult extends RelatedInformationBaseResult {
25
+ type: RelatedInformationType.CommandInformation;
26
+ command: string;
27
+ }
28
+
29
+ export interface SettingInformationResult extends RelatedInformationBaseResult {
30
+ type: RelatedInformationType.SettingInformation;
31
+ setting: string;
32
+ }
33
+
34
+ export type RelatedInformationResult = CommandInformationResult | SettingInformationResult;
35
+
36
+ export interface RelatedInformationProvider {
37
+ provideRelatedInformation(query: string, token: CancellationToken): ProviderResult<RelatedInformationResult[]>;
38
+ }
39
+
40
+ export interface EmbeddingVectorProvider {
41
+ provideEmbeddingVector(strings: string[], token: CancellationToken): ProviderResult<number[][]>;
42
+ }
43
+
44
+ export namespace ai {
45
+ export function getRelatedInformation(query: string, types: RelatedInformationType[], token: CancellationToken): Thenable<RelatedInformationResult[]>;
46
+ export function registerRelatedInformationProvider(type: RelatedInformationType, provider: RelatedInformationProvider): Disposable;
47
+ export function registerEmbeddingVectorProvider(model: string, provider: EmbeddingVectorProvider): Disposable;
48
+ }
49
+ }
@@ -0,0 +1,62 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/152399
9
+
10
+ export interface AuthenticationForceNewSessionOptions {
11
+ /**
12
+ * The session that you are asking to be recreated. The Auth Provider can use this to
13
+ * help guide the user to log in to the correct account.
14
+ */
15
+ sessionToRecreate?: AuthenticationSession;
16
+ }
17
+
18
+ export namespace authentication {
19
+ /**
20
+ * Get all authentication sessions matching the desired scopes that this extension has access to. In order to request access,
21
+ * use {@link getSession}. To request an additional account, specify {@link AuthenticationGetSessionOptions.clearSessionPreference}
22
+ * and {@link AuthenticationGetSessionOptions.createIfNone} together.
23
+ *
24
+ * Currently, there are only two authentication providers that are contributed from built in extensions
25
+ * to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
26
+ *
27
+ * @param providerId The id of the provider to use
28
+ * @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
29
+ * @returns A thenable that resolves to a readonly array of authentication sessions.
30
+ */
31
+ export function getSessions(providerId: string, scopes: readonly string[]): Thenable<readonly AuthenticationSession[]>;
32
+ }
33
+
34
+ /**
35
+ * The options passed in to the provider when creating a session.
36
+ */
37
+ export interface AuthenticationProviderCreateSessionOptions {
38
+ /**
39
+ * The session that is being asked to be recreated. If this is passed in, the provider should
40
+ * attempt to recreate the session based on the information in this session.
41
+ */
42
+ sessionToRecreate?: AuthenticationSession;
43
+ }
44
+
45
+ export interface AuthenticationProvider {
46
+ /**
47
+ * Prompts a user to login.
48
+ *
49
+ * If login is successful, the onDidChangeSessions event should be fired.
50
+ *
51
+ * If login fails, a rejected promise should be returned.
52
+ *
53
+ * If the provider has specified that it does not support multiple accounts,
54
+ * then this should never be called if there is already an existing session matching these
55
+ * scopes.
56
+ * @param scopes A list of scopes, permissions, that the new session should be created with.
57
+ * @param options Additional options for creating a session.
58
+ * @returns A promise that resolves to an authentication session.
59
+ */
60
+ createSession(scopes: readonly string[], options: AuthenticationProviderCreateSessionOptions): Thenable<AuthenticationSession>;
61
+ }
62
+ }
@@ -0,0 +1,13 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+ export namespace authentication {
8
+ /**
9
+ * @deprecated Use {@link getSession()} {@link AuthenticationGetSessionOptions.silent} instead.
10
+ */
11
+ export function hasSession(providerId: string, scopes: readonly string[]): Thenable<boolean>;
12
+ }
13
+ }
@@ -0,0 +1,47 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/180582
9
+
10
+ export namespace workspace {
11
+ /**
12
+ *
13
+ * @param scheme The URI scheme that this provider can provide canonical URIs for.
14
+ * A canonical URI represents the conversion of a resource's alias into a source of truth URI.
15
+ * Multiple aliases may convert to the same source of truth URI.
16
+ * @param provider A provider which can convert URIs of scheme @param scheme to
17
+ * a canonical URI which is stable across machines.
18
+ */
19
+ export function registerCanonicalUriProvider(scheme: string, provider: CanonicalUriProvider): Disposable;
20
+
21
+ /**
22
+ *
23
+ * @param uri The URI to provide a canonical URI for.
24
+ * @param token A cancellation token for the request.
25
+ */
26
+ export function getCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
27
+ }
28
+
29
+ export interface CanonicalUriProvider {
30
+ /**
31
+ *
32
+ * @param uri The URI to provide a canonical URI for.
33
+ * @param options Options that the provider should honor in the URI it returns.
34
+ * @param token A cancellation token for the request.
35
+ * @returns The canonical URI for the requested URI or undefined if no canonical URI can be provided.
36
+ */
37
+ provideCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
38
+ }
39
+
40
+ export interface CanonicalUriRequestOptions {
41
+ /**
42
+ *
43
+ * The desired scheme of the canonical URI.
44
+ */
45
+ targetScheme: string;
46
+ }
47
+ }
@@ -0,0 +1,25 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // ChatML
9
+ export enum ChatMessageRole {
10
+ System = 0,
11
+ User = 1,
12
+ Assistant = 2,
13
+ Function = 3,
14
+ }
15
+
16
+ // ChatML
17
+ export class ChatMessage {
18
+ role: ChatMessageRole;
19
+ content: string;
20
+ name?: string;
21
+
22
+ constructor(role: ChatMessageRole, content: string);
23
+ }
24
+
25
+ }
@@ -0,0 +1,39 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ export interface ChatAgentContext {
9
+ history: ChatMessage[];
10
+ }
11
+
12
+ export interface ChatAgentResponse {
13
+ message: MarkdownString | InteractiveProgressFileTree;
14
+ }
15
+
16
+ export interface ChatAgentResult {
17
+ followUp?: InteractiveSessionFollowup[];
18
+ }
19
+
20
+ export interface ChatAgentCommand {
21
+ name: string;
22
+ description: string;
23
+ }
24
+
25
+ export interface ChatAgentMetadata {
26
+ description: string;
27
+ fullName?: string;
28
+ icon?: Uri;
29
+ subCommands: ChatAgentCommand[];
30
+ }
31
+
32
+ export interface ChatAgent {
33
+ (prompt: ChatMessage, context: ChatAgentContext, progress: Progress<ChatAgentResponse>, token: CancellationToken): Thenable<ChatAgentResult | void>;
34
+ }
35
+
36
+ export namespace chat {
37
+ export function registerAgent(id: string, agent: ChatAgent, metadata: ChatAgentMetadata): Disposable;
38
+ }
39
+ }
@@ -0,0 +1,38 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ export interface ChatResponseFragment {
9
+ index: number;
10
+ part: string;
11
+ }
12
+
13
+ /**
14
+ * Represents a large language model that accepts ChatML messages and produces a streaming response
15
+ */
16
+ export interface ChatResponseProvider {
17
+ provideChatResponse(messages: ChatMessage[], options: { [name: string]: any }, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
18
+ }
19
+
20
+ export interface ChatResponseProviderMetadata {
21
+ // TODO: add way to compute token count
22
+ name: string;
23
+ }
24
+
25
+ export namespace chat {
26
+
27
+ /**
28
+ * Register a LLM as chat response provider to the editor.
29
+ *
30
+ *
31
+ * @param id
32
+ * @param provider
33
+ * @param metadata
34
+ */
35
+ export function registerChatResponseProvider(id: string, provider: ChatResponseProvider, metadata: ChatResponseProviderMetadata): Disposable;
36
+ }
37
+
38
+ }
@@ -0,0 +1,47 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ export interface ChatResponseFragment {
9
+ index: number;
10
+ part: string;
11
+ }
12
+
13
+ /**
14
+ * Represents access to using a chat provider (LLM). Access is granted and temporary, usually only valid
15
+ * for the duration of an user interaction.
16
+ */
17
+ export interface ChatAccess {
18
+
19
+ /**
20
+ * Whether the access to chat has been revoked. This happens when the user interaction that allowed for
21
+ * chat access is finished.
22
+ */
23
+ isRevoked: boolean;
24
+
25
+ /**
26
+ * TODO: return an AsyncIterable instead of asking to pass Progress<...>?
27
+ *
28
+ * @param messages
29
+ * @param options
30
+ * @param progress
31
+ * @param token
32
+ */
33
+ makeRequest(messages: ChatMessage[], options: { [name: string]: any }, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
34
+ }
35
+
36
+ export namespace chat {
37
+
38
+ /**
39
+ * Request access to chat.
40
+ *
41
+ * *Note* that this function will throw an error unless an user interaction is currently active.
42
+ *
43
+ * @param id The id of the chat provider, e.g `copilot`
44
+ */
45
+ export function requestChatAccess(id: string): Thenable<ChatAccess>;
46
+ }
47
+ }