@codingame/monaco-vscode-api 1.83.14 → 1.83.15
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.
- package/api.js +1 -1
- package/contributions.js +36 -0
- package/extensions.d.ts +83 -4
- package/extensions.js +9 -14
- package/lifecycle.js +4 -1
- package/localExtensionHost.js +207 -0
- package/missing-services.js +15 -3
- package/monaco-editor-treemending.patch +966 -955
- package/monaco.js +4 -36
- package/package.json +10 -6
- package/service-override/tools/editor.d.ts +6 -6
- package/services.d.ts +18 -18
- package/services.js +1 -0
- package/vscode/src/vs/base/common/errors.d.ts +1 -8
- package/vscode/src/vs/base/common/uri.d.ts +1 -7
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -27
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +39 -1
- package/vscode/src/vs/platform/workspace/common/workspace.d.ts +1 -44
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +160 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +564 -11
- package/vscode/src/vs/workbench/contrib/scm/common/scm.js +9 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +1 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +594 -2
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +307 -1
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +10 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +2 -37
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +2 -73
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +1 -5
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.js +6 -2
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +174 -0
- package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +49 -0
- package/vscode-dts/vscode.proposed.authGetSessions.d.ts +62 -0
- package/vscode-dts/vscode.proposed.authSession.d.ts +13 -0
- package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chat.d.ts +25 -0
- package/vscode-dts/vscode.proposed.chatAgents.d.ts +39 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +38 -0
- package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chatVariables.d.ts +35 -0
- package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +48 -0
- package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +18 -0
- package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +10 -0
- package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +7 -0
- package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +6 -0
- package/vscode-dts/vscode.proposed.customEditorMove.d.ts +29 -0
- package/vscode-dts/vscode.proposed.debugFocus.d.ts +74 -0
- package/vscode-dts/vscode.proposed.diffCommand.d.ts +38 -0
- package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +16 -0
- package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +13 -0
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +111 -0
- package/vscode-dts/vscode.proposed.dropMetadata.d.ts +60 -0
- package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +71 -0
- package/vscode-dts/vscode.proposed.editorInsets.d.ts +22 -0
- package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +24 -0
- package/vscode-dts/vscode.proposed.extensionsAny.d.ts +40 -0
- package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +163 -0
- package/vscode-dts/vscode.proposed.fileComments.d.ts +85 -0
- package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +67 -0
- package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +104 -0
- package/vscode-dts/vscode.proposed.fsChunks.d.ts +16 -0
- package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +31 -0
- package/vscode-dts/vscode.proposed.idToken.d.ts +16 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +71 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +227 -0
- package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +70 -0
- package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +25 -0
- package/vscode-dts/vscode.proposed.ipc.d.ts +37 -0
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +42 -0
- package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +52 -0
- package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +17 -0
- package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +16 -0
- package/vscode-dts/vscode.proposed.notebookExecution.d.ts +39 -0
- package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +46 -0
- package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +21 -0
- package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +68 -0
- package/vscode-dts/vscode.proposed.notebookMime.d.ts +33 -0
- package/vscode-dts/vscode.proposed.portsAttributes.d.ts +100 -0
- package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +19 -0
- package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +17 -0
- package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +16 -0
- package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +16 -0
- package/vscode-dts/vscode.proposed.readonlyMessage.d.ts +14 -0
- package/vscode-dts/vscode.proposed.resolvers.d.ts +371 -0
- package/vscode-dts/vscode.proposed.saveEditor.d.ts +35 -0
- package/vscode-dts/vscode.proposed.scmActionButton.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +77 -0
- package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +22 -0
- package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmValidation.d.ts +60 -0
- package/vscode-dts/vscode.proposed.shareProvider.d.ts +74 -0
- package/vscode-dts/vscode.proposed.showLocal.d.ts +19 -0
- package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +25 -0
- package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +16 -0
- package/vscode-dts/vscode.proposed.telemetry.d.ts +36 -0
- package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +32 -0
- package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +39 -0
- package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +46 -0
- package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +83 -0
- package/vscode-dts/vscode.proposed.terminalSelection.d.ts +16 -0
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +198 -0
- package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +45 -0
- package/vscode-dts/vscode.proposed.testObserver.d.ts +184 -0
- package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +281 -0
- package/vscode-dts/vscode.proposed.timeline.d.ts +163 -0
- package/vscode-dts/vscode.proposed.tokenInformation.d.ts +26 -0
- package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +30 -0
- package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +28 -0
- package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +13 -0
- package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +44 -0
- package/vscode-dts/vscode.proposed.tunnels.d.ts +64 -0
- package/vscode-dts/vscode.proposed.windowActivity.d.ts +17 -0
- package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +30 -0
- package/vscode/src/vs/base/common/ternarySearchTree.d.ts +0 -46
- package/vscode/src/vs/base/common/uriIpc.d.ts +0 -10
- package/vscode/src/vs/platform/workspace/common/editSessions.d.ts +0 -7
- package/vscode/src/vs/workbench/services/extensions/common/proxyIdentifier.d.ts +0 -44
- package/vscode/src/vs/workbench/services/search/common/search.d.ts +0 -52
- package/vscode.proposed.d.ts +0 -4787
|
@@ -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
|
+
}
|
|
@@ -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 SlashCommandContext {
|
|
9
|
+
|
|
10
|
+
// messages so far
|
|
11
|
+
history: ChatMessage[];
|
|
12
|
+
|
|
13
|
+
// TODO: access to embeddings
|
|
14
|
+
// embeddings: {};
|
|
15
|
+
|
|
16
|
+
// TODO: access to "InputSourceId"
|
|
17
|
+
// DebugConsoleOutput
|
|
18
|
+
// Terminal
|
|
19
|
+
// CorrespondingTestFile
|
|
20
|
+
// CorrespondingImplementationFile
|
|
21
|
+
// ExtensionApi
|
|
22
|
+
// VSCode
|
|
23
|
+
// Workspace
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface SlashResponse {
|
|
27
|
+
message: MarkdownString | InteractiveProgressFileTree;
|
|
28
|
+
// edits?: TextEdit[] | WorkspaceEdit;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface SlashResult {
|
|
32
|
+
followUp?: InteractiveSessionFollowup[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface SlashCommandMetadata {
|
|
36
|
+
description: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface SlashCommand {
|
|
40
|
+
|
|
41
|
+
(prompt: ChatMessage, context: SlashCommandContext, progress: Progress<SlashResponse>, token: CancellationToken): Thenable<SlashResult | void>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export namespace chat {
|
|
45
|
+
export function registerSlashCommand(name: string, command: SlashCommand, metadata: SlashCommandMetadata): Disposable;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 InteractiveRequest {
|
|
9
|
+
variables: Record<string, ChatVariableValue[]>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum ChatVariableLevel {
|
|
13
|
+
Short = 1,
|
|
14
|
+
Medium = 2,
|
|
15
|
+
Full = 3
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ChatVariableValue {
|
|
19
|
+
level: ChatVariableLevel;
|
|
20
|
+
value: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ChatVariableContext {
|
|
25
|
+
message: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ChatVariableResolver {
|
|
29
|
+
resolve(name: string, context: ChatVariableContext, token: CancellationToken): ProviderResult<ChatVariableValue[]>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export namespace chat {
|
|
33
|
+
export function registerVariable(name: string, description: string, resolver: ChatVariableResolver): Disposable;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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/135591 @alexr00
|
|
9
|
+
|
|
10
|
+
// export interface FileDecorationProvider {
|
|
11
|
+
// provideFileDecoration(uri: Uri, token: CancellationToken): ProviderResult<FileDecoration | FileDecoration1>;
|
|
12
|
+
// }
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A file decoration represents metadata that can be rendered with a file.
|
|
16
|
+
*/
|
|
17
|
+
export class FileDecoration2 {
|
|
18
|
+
/**
|
|
19
|
+
* A very short string that represents this decoration.
|
|
20
|
+
*/
|
|
21
|
+
badge?: string | ThemeIcon;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A human-readable tooltip for this decoration.
|
|
25
|
+
*/
|
|
26
|
+
tooltip?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The color of this decoration.
|
|
30
|
+
*/
|
|
31
|
+
color?: ThemeColor;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A flag expressing that this decoration should be
|
|
35
|
+
* propagated to its parents.
|
|
36
|
+
*/
|
|
37
|
+
propagate?: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Creates a new decoration.
|
|
41
|
+
*
|
|
42
|
+
* @param badge A letter that represents the decoration.
|
|
43
|
+
* @param tooltip The tooltip of the decoration.
|
|
44
|
+
* @param color The color of the decoration.
|
|
45
|
+
*/
|
|
46
|
+
constructor(badge?: string | ThemeIcon, tooltip?: string, color?: ThemeColor);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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/171166
|
|
9
|
+
|
|
10
|
+
export enum CommentState {
|
|
11
|
+
Published = 0,
|
|
12
|
+
Draft = 1
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Comment {
|
|
16
|
+
state?: CommentState;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
// empty placeholder declaration for the `comments/comment/editorActions` menu
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
// empty placeholder for comment peek context menus
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/151533 @alexr00
|
|
9
|
+
|
|
10
|
+
|