@codingame/monaco-vscode-extensions-service-override 1.83.8 → 1.83.9
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/assets/webWorkerExtensionHostIframe.html +123 -0
- package/extensions.d.ts +12 -13
- package/extensions.js +456 -0
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/override/vs/platform/dialogs/common/dialogs.js +8 -0
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +8 -0
- package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +3 -0
- package/package.json +5 -3
- package/tools/url.js +10 -0
- package/tools.js +5 -0
- package/vscode/src/vs/base/common/console.js +59 -0
- package/vscode/src/vs/base/common/prefixTree.js +131 -0
- package/vscode/src/vs/platform/files/common/watcher.js +71 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +27 -0
- package/vscode/src/vs/platform/log/browser/log.js +26 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +98 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +31 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +330 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +174 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents.js +52 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +61 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSlashCommands.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +31 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +107 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +94 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +541 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +80 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +578 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +387 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +102 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +69 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +75 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +249 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +370 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +41 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +411 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +475 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +227 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +317 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +280 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +283 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +33 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +947 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +93 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +118 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +158 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +123 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +188 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +129 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +131 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +341 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +48 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +76 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProfilContentHandlers.js +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +185 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +30 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +463 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +148 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +70 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +50 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +72 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +731 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +412 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +182 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +55 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +313 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +223 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +110 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +61 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +283 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +100 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +135 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +273 -0
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHost.api.impl.d.ts +2 -2
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostConfiguration.d.ts +3 -3
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostExtensionService.d.ts +3 -4
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostManagedSockets.d.ts +2 -2
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTerminalService.d.ts +19 -20
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTunnelService.d.ts +7 -8
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostWorkspace.d.ts +25 -26
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +217 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +57 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +51 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +92 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +648 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +297 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +62 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +109 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadRangeDecorator.js +109 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +331 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +380 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.js +5 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +1196 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsFilterOptions.js +19 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +334 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +543 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +178 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +101 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +57 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +145 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +3 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +73 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +83 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +179 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +5 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +144 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +482 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +6 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +85 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +56 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +110 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +260 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +616 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +309 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +38 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +167 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +80 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +70 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +108 -0
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +506 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +132 -0
- package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +103 -0
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +28 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +25 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +336 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +46 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +283 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +273 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +52 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +1093 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +41 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +25 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +643 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +274 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +58 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +80 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +64 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +49 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +220 -0
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +5 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +79 -0
- package/vscode-proposed.d.ts +0 -3872
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHost.protocol.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostExtensionActivator.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostFileSystemInfo.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostInitDataService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostLocalizationService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostRpcService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostStoragePaths.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTypes.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostUriTransformerService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/worker/extHostExtensionService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/services/search/common/queryBuilder.d.ts +0 -0
package/vscode-proposed.d.ts
DELETED
|
@@ -1,3872 +0,0 @@
|
|
|
1
|
-
import * as vscode from 'vscode';
|
|
2
|
-
import { CancellationToken, ProviderResult, Disposable, Uri, MarkdownString, Progress, ThemeIcon, ThemeColor, TextDocument, WebviewPanel, DebugSession, Event, Range, DataTransfer, SnippetString, WorkspaceEdit, WorkspaceFolder, TextEditor, Webview, CommentThreadCollapsibleState, CommentThreadState, CommentThread, GlobPattern, Command, Selection, TextEdit, CompletionItemKind, DocumentSelector, NotebookDocument, NotebookControllerAffinity, NotebookEditor, QuickInput, FileStat, TabInputText, TabInputTextDiff, TabInputCustom, TabInputWebview, TabInputNotebook, TabInputNotebookDiff, TabInputTerminal, TerminalDimensions, WebviewOptions, Position, TestMessage, TestRunRequest, TestItem, AccessibilityInformation, DocumentDropEditProvider, TreeViewExpansionEvent, TreeViewSelectionChangeEvent, TreeViewVisibilityChangeEvent, TreeCheckboxChangeEvent, ViewBadge, NotebookSerializer } from 'vscode';
|
|
3
|
-
export * from 'vscode';
|
|
4
|
-
|
|
5
|
-
// https://github.com/microsoft/vscode/issues/190909
|
|
6
|
-
|
|
7
|
-
declare enum RelatedInformationType {
|
|
8
|
-
SymbolInformation = 1,
|
|
9
|
-
CommandInformation = 2,
|
|
10
|
-
SearchInformation = 3,
|
|
11
|
-
SettingInformation = 4
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface RelatedInformationBaseResult {
|
|
15
|
-
type: RelatedInformationType;
|
|
16
|
-
weight: number;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// TODO: Symbols and Search
|
|
20
|
-
|
|
21
|
-
interface CommandInformationResult extends RelatedInformationBaseResult {
|
|
22
|
-
type: RelatedInformationType.CommandInformation;
|
|
23
|
-
command: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
interface SettingInformationResult extends RelatedInformationBaseResult {
|
|
27
|
-
type: RelatedInformationType.SettingInformation;
|
|
28
|
-
setting: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
type RelatedInformationResult = CommandInformationResult | SettingInformationResult;
|
|
32
|
-
|
|
33
|
-
interface RelatedInformationProvider {
|
|
34
|
-
provideRelatedInformation(query: string, token: CancellationToken): ProviderResult<RelatedInformationResult[]>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
interface EmbeddingVectorProvider {
|
|
38
|
-
provideEmbeddingVector(strings: string[], token: CancellationToken): ProviderResult<number[][]>;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
declare namespace ai {
|
|
42
|
-
export function getRelatedInformation(query: string, types: RelatedInformationType[], token: CancellationToken): Thenable<RelatedInformationResult[]>;
|
|
43
|
-
export function registerRelatedInformationProvider(type: RelatedInformationType, provider: RelatedInformationProvider): Disposable;
|
|
44
|
-
export function registerEmbeddingVectorProvider(model: string, provider: EmbeddingVectorProvider): Disposable;
|
|
45
|
-
}
|
|
46
|
-
// https://github.com/microsoft/vscode/issues/152399
|
|
47
|
-
|
|
48
|
-
interface AuthenticationForceNewSessionOptions {
|
|
49
|
-
/**
|
|
50
|
-
* The session that you are asking to be recreated. The Auth Provider can use this to
|
|
51
|
-
* help guide the user to log in to the correct account.
|
|
52
|
-
*/
|
|
53
|
-
sessionToRecreate?: AuthenticationSession;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The options passed in to the provider when creating a session.
|
|
58
|
-
*/
|
|
59
|
-
interface AuthenticationProviderCreateSessionOptions {
|
|
60
|
-
/**
|
|
61
|
-
* The session that is being asked to be recreated. If this is passed in, the provider should
|
|
62
|
-
* attempt to recreate the session based on the information in this session.
|
|
63
|
-
*/
|
|
64
|
-
sessionToRecreate?: AuthenticationSession;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
interface AuthenticationProvider {
|
|
68
|
-
/**
|
|
69
|
-
* Prompts a user to login.
|
|
70
|
-
*
|
|
71
|
-
* If login is successful, the onDidChangeSessions event should be fired.
|
|
72
|
-
*
|
|
73
|
-
* If login fails, a rejected promise should be returned.
|
|
74
|
-
*
|
|
75
|
-
* If the provider has specified that it does not support multiple accounts,
|
|
76
|
-
* then this should never be called if there is already an existing session matching these
|
|
77
|
-
* scopes.
|
|
78
|
-
* @param scopes A list of scopes, permissions, that the new session should be created with.
|
|
79
|
-
* @param options Additional options for creating a session.
|
|
80
|
-
* @returns A promise that resolves to an authentication session.
|
|
81
|
-
*/
|
|
82
|
-
createSession(scopes: readonly string[], options: AuthenticationProviderCreateSessionOptions): Thenable<AuthenticationSession>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
declare namespace authentication {
|
|
86
|
-
/**
|
|
87
|
-
* Get all authentication sessions matching the desired scopes that this extension has access to. In order to request access,
|
|
88
|
-
* use {@link getSession}. To request an additional account, specify {@link AuthenticationGetSessionOptions.clearSessionPreference}
|
|
89
|
-
* and {@link AuthenticationGetSessionOptions.createIfNone} together.
|
|
90
|
-
*
|
|
91
|
-
* Currently, there are only two authentication providers that are contributed from built in extensions
|
|
92
|
-
* to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
|
|
93
|
-
*
|
|
94
|
-
* @param providerId The id of the provider to use
|
|
95
|
-
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
|
|
96
|
-
* @returns A thenable that resolves to a readonly array of authentication sessions.
|
|
97
|
-
*/
|
|
98
|
-
export function getSessions(providerId: string, scopes: readonly string[]): Thenable<readonly AuthenticationSession[]>;
|
|
99
|
-
}
|
|
100
|
-
declare namespace authentication {
|
|
101
|
-
/**
|
|
102
|
-
* @deprecated Use {@link getSession()} {@link AuthenticationGetSessionOptions.silent} instead.
|
|
103
|
-
*/
|
|
104
|
-
export function hasSession(providerId: string, scopes: readonly string[]): Thenable<boolean>;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
interface CanonicalUriProvider {
|
|
108
|
-
/**
|
|
109
|
-
*
|
|
110
|
-
* @param uri The URI to provide a canonical URI for.
|
|
111
|
-
* @param options Options that the provider should honor in the URI it returns.
|
|
112
|
-
* @param token A cancellation token for the request.
|
|
113
|
-
* @returns The canonical URI for the requested URI or undefined if no canonical URI can be provided.
|
|
114
|
-
*/
|
|
115
|
-
provideCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
interface CanonicalUriRequestOptions {
|
|
119
|
-
/**
|
|
120
|
-
*
|
|
121
|
-
* The desired scheme of the canonical URI.
|
|
122
|
-
*/
|
|
123
|
-
targetScheme: string;
|
|
124
|
-
}
|
|
125
|
-
// ChatML
|
|
126
|
-
declare enum ChatMessageRole {
|
|
127
|
-
System = 0,
|
|
128
|
-
User = 1,
|
|
129
|
-
Assistant = 2,
|
|
130
|
-
Function = 3,
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// ChatML
|
|
134
|
-
declare class ChatMessage {
|
|
135
|
-
role: ChatMessageRole;
|
|
136
|
-
content: string;
|
|
137
|
-
name?: string;
|
|
138
|
-
|
|
139
|
-
constructor(role: ChatMessageRole, content: string);
|
|
140
|
-
}
|
|
141
|
-
interface ChatAgentContext {
|
|
142
|
-
history: ChatMessage[];
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
interface ChatAgentResponse {
|
|
146
|
-
message: MarkdownString | InteractiveProgressFileTree;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
interface ChatAgentResult {
|
|
150
|
-
followUp?: InteractiveSessionFollowup[];
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
interface ChatAgentCommand {
|
|
154
|
-
name: string;
|
|
155
|
-
description: string;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
interface ChatAgentMetadata {
|
|
159
|
-
description: string;
|
|
160
|
-
fullName?: string;
|
|
161
|
-
icon?: Uri;
|
|
162
|
-
subCommands: ChatAgentCommand[];
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
interface ChatAgent {
|
|
166
|
-
(prompt: ChatMessage, context: ChatAgentContext, progress: Progress<ChatAgentResponse>, token: CancellationToken): Thenable<ChatAgentResult | void>;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Represents a large language model that accepts ChatML messages and produces a streaming response
|
|
171
|
-
*/
|
|
172
|
-
interface ChatResponseProvider {
|
|
173
|
-
provideChatResponse(messages: ChatMessage[], options: { [name: string]: any }, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
interface ChatResponseProviderMetadata {
|
|
177
|
-
// TODO: add way to compute token count
|
|
178
|
-
name: string;
|
|
179
|
-
}
|
|
180
|
-
interface ChatResponseFragment {
|
|
181
|
-
index: number;
|
|
182
|
-
part: string;
|
|
183
|
-
}
|
|
184
|
-
interface ChatResponseFragment {
|
|
185
|
-
index: number;
|
|
186
|
-
part: string;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Represents access to using a chat provider (LLM). Access is granted and temporary, usually only valid
|
|
191
|
-
* for the duration of an user interaction.
|
|
192
|
-
*/
|
|
193
|
-
interface ChatAccess {
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Whether the access to chat has been revoked. This happens when the user interaction that allowed for
|
|
197
|
-
* chat access is finished.
|
|
198
|
-
*/
|
|
199
|
-
isRevoked: boolean;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* TODO: return an AsyncIterable instead of asking to pass Progress<...>?
|
|
203
|
-
*
|
|
204
|
-
* @param messages
|
|
205
|
-
* @param options
|
|
206
|
-
* @param progress
|
|
207
|
-
* @param token
|
|
208
|
-
*/
|
|
209
|
-
makeRequest(messages: ChatMessage[], options: { [name: string]: any }, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
|
|
210
|
-
}
|
|
211
|
-
interface SlashCommandContext {
|
|
212
|
-
|
|
213
|
-
// messages so far
|
|
214
|
-
history: ChatMessage[];
|
|
215
|
-
|
|
216
|
-
// TODO: access to embeddings
|
|
217
|
-
// embeddings: {};
|
|
218
|
-
|
|
219
|
-
// TODO: access to "InputSourceId"
|
|
220
|
-
// DebugConsoleOutput
|
|
221
|
-
// Terminal
|
|
222
|
-
// CorrespondingTestFile
|
|
223
|
-
// CorrespondingImplementationFile
|
|
224
|
-
// ExtensionApi
|
|
225
|
-
// VSCode
|
|
226
|
-
// Workspace
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
interface SlashResponse {
|
|
230
|
-
message: MarkdownString | InteractiveProgressFileTree;
|
|
231
|
-
// edits?: TextEdit[] | WorkspaceEdit;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
interface SlashResult {
|
|
235
|
-
followUp?: InteractiveSessionFollowup[];
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
interface SlashCommandMetadata {
|
|
239
|
-
description: string;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
interface SlashCommand {
|
|
243
|
-
|
|
244
|
-
(prompt: ChatMessage, context: SlashCommandContext, progress: Progress<SlashResponse>, token: CancellationToken): Thenable<SlashResult | void>;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
declare enum ChatVariableLevel {
|
|
248
|
-
Short = 1,
|
|
249
|
-
Medium = 2,
|
|
250
|
-
Full = 3
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
interface ChatVariableValue {
|
|
254
|
-
level: ChatVariableLevel;
|
|
255
|
-
value: string;
|
|
256
|
-
description?: string;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
interface ChatVariableContext {
|
|
260
|
-
message: string;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
interface ChatVariableResolver {
|
|
264
|
-
resolve(name: string, context: ChatVariableContext, token: CancellationToken): ProviderResult<ChatVariableValue[]>;
|
|
265
|
-
}
|
|
266
|
-
// https://github.com/microsoft/vscode/issues/135591 @alexr00
|
|
267
|
-
|
|
268
|
-
// export interface FileDecorationProvider {
|
|
269
|
-
// provideFileDecoration(uri: Uri, token: CancellationToken): ProviderResult<FileDecoration | FileDecoration1>;
|
|
270
|
-
// }
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* A file decoration represents metadata that can be rendered with a file.
|
|
274
|
-
*/
|
|
275
|
-
declare class FileDecoration2 {
|
|
276
|
-
/**
|
|
277
|
-
* A very short string that represents this decoration.
|
|
278
|
-
*/
|
|
279
|
-
badge?: string | ThemeIcon;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* A human-readable tooltip for this decoration.
|
|
283
|
-
*/
|
|
284
|
-
tooltip?: string;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* The color of this decoration.
|
|
288
|
-
*/
|
|
289
|
-
color?: ThemeColor;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* A flag expressing that this decoration should be
|
|
293
|
-
* propagated to its parents.
|
|
294
|
-
*/
|
|
295
|
-
propagate?: boolean;
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Creates a new decoration.
|
|
299
|
-
*
|
|
300
|
-
* @param badge A letter that represents the decoration.
|
|
301
|
-
* @param tooltip The tooltip of the decoration.
|
|
302
|
-
* @param color The color of the decoration.
|
|
303
|
-
*/
|
|
304
|
-
constructor(badge?: string | ThemeIcon, tooltip?: string, color?: ThemeColor);
|
|
305
|
-
}
|
|
306
|
-
// https://github.com/microsoft/vscode/issues/171166
|
|
307
|
-
|
|
308
|
-
declare enum CommentState {
|
|
309
|
-
Published = 0,
|
|
310
|
-
Draft = 1
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
interface Comment {
|
|
314
|
-
state?: CommentState;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
// https://github.com/microsoft/vscode/issues/86146
|
|
331
|
-
|
|
332
|
-
// TODO: Also for custom editor
|
|
333
|
-
|
|
334
|
-
interface CustomTextEditorProvider {
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Handle when the underlying resource for a custom editor is renamed.
|
|
338
|
-
*
|
|
339
|
-
* This allows the webview for the editor be preserved throughout the rename. If this method is not implemented,
|
|
340
|
-
* the editor will destroy the previous custom editor and create a replacement one.
|
|
341
|
-
*
|
|
342
|
-
* @param newDocument New text document to use for the custom editor.
|
|
343
|
-
* @param existingWebviewPanel Webview panel for the custom editor.
|
|
344
|
-
* @param token A cancellation token that indicates the result is no longer needed.
|
|
345
|
-
*
|
|
346
|
-
* @return Thenable indicating that the webview editor has been moved.
|
|
347
|
-
*/
|
|
348
|
-
// eslint-disable-next-line local/vscode-dts-provider-naming
|
|
349
|
-
moveCustomTextEditor?(newDocument: TextDocument, existingWebviewPanel: WebviewPanel, token: CancellationToken): Thenable<void>;
|
|
350
|
-
}
|
|
351
|
-
// See https://github.com/microsoft/vscode/issues/63943
|
|
352
|
-
|
|
353
|
-
declare class ThreadFocus {
|
|
354
|
-
/**
|
|
355
|
-
* Create a ThreadFocus
|
|
356
|
-
* @param session
|
|
357
|
-
* @param threadId
|
|
358
|
-
* @param frameId
|
|
359
|
-
*/
|
|
360
|
-
constructor(
|
|
361
|
-
session: DebugSession,
|
|
362
|
-
threadId?: number);
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Debug session for thread.
|
|
367
|
-
*/
|
|
368
|
-
readonly session: DebugSession;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Id of the associated thread (DAP id). May be undefined if thread has become unselected.
|
|
372
|
-
*/
|
|
373
|
-
readonly threadId: number | undefined;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
declare class StackFrameFocus {
|
|
377
|
-
/**
|
|
378
|
-
* Create a StackFrameFocus
|
|
379
|
-
* @param session
|
|
380
|
-
* @param threadId
|
|
381
|
-
* @param frameId
|
|
382
|
-
*/
|
|
383
|
-
constructor(
|
|
384
|
-
session: DebugSession,
|
|
385
|
-
threadId?: number,
|
|
386
|
-
frameId?: number);
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Debug session for thread.
|
|
391
|
-
*/
|
|
392
|
-
readonly session: DebugSession;
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* Id of the associated thread (DAP id). May be undefined if a frame is unselected.
|
|
396
|
-
*/
|
|
397
|
-
readonly threadId: number | undefined;
|
|
398
|
-
/**
|
|
399
|
-
* Id of the stack frame (DAP id). May be undefined if a frame is unselected.
|
|
400
|
-
*/
|
|
401
|
-
readonly frameId: number | undefined;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
declare namespace debug {
|
|
406
|
-
/**
|
|
407
|
-
* The currently focused thread or stack frame id, or `undefined` if this has not been set. (e.g. not in debug mode).
|
|
408
|
-
*/
|
|
409
|
-
export let stackFrameFocus: ThreadFocus | StackFrameFocus | undefined;
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* An {@link Event} which fires when the {@link debug.stackFrameFocus} changes. Provides a sessionId. threadId is not undefined
|
|
413
|
-
* when a thread of frame has gained focus. frameId is defined when a stackFrame has gained focus.
|
|
414
|
-
*/
|
|
415
|
-
export const onDidChangeStackFrameFocus: Event<ThreadFocus | StackFrameFocus | undefined>;
|
|
416
|
-
}
|
|
417
|
-
// https://github.com/microsoft/vscode/issues/84899
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* The contiguous set of modified lines in a diff.
|
|
421
|
-
*/
|
|
422
|
-
interface LineChange {
|
|
423
|
-
readonly originalStartLineNumber: number;
|
|
424
|
-
readonly originalEndLineNumber: number;
|
|
425
|
-
readonly modifiedStartLineNumber: number;
|
|
426
|
-
readonly modifiedEndLineNumber: number;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
declare namespace commands {
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* Registers a diff information command that can be invoked via a keyboard shortcut,
|
|
433
|
-
* a menu item, an action, or directly.
|
|
434
|
-
*
|
|
435
|
-
* Diff information commands are different from ordinary {@link commands.registerCommand commands} as
|
|
436
|
-
* they only execute when there is an active diff editor when the command is called, and the diff
|
|
437
|
-
* information has been computed. Also, the command handler of an editor command has access to
|
|
438
|
-
* the diff information.
|
|
439
|
-
*
|
|
440
|
-
* @param command A unique identifier for the command.
|
|
441
|
-
* @param callback A command handler function with access to the {@link LineChange diff information}.
|
|
442
|
-
* @param thisArg The `this` context used when invoking the handler function.
|
|
443
|
-
* @return Disposable which unregisters this command on disposal.
|
|
444
|
-
*/
|
|
445
|
-
export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
|
|
446
|
-
}
|
|
447
|
-
// TODO@rebornix: add github issue link
|
|
448
|
-
|
|
449
|
-
interface NotebookDocumentContentOptions {
|
|
450
|
-
/**
|
|
451
|
-
* Controls if a cell metadata property should be reverted when the cell content
|
|
452
|
-
* is reverted in notebook diff editor.
|
|
453
|
-
*/
|
|
454
|
-
cellContentMetadata?: { [key: string]: boolean | undefined };
|
|
455
|
-
}
|
|
456
|
-
// todo@jrieken add issue reference
|
|
457
|
-
|
|
458
|
-
interface DocumentFilter {
|
|
459
|
-
readonly exclusive?: boolean;
|
|
460
|
-
}
|
|
461
|
-
// https://github.com/microsoft/vscode/issues/30066/
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Provider invoked when the user copies and pastes code.
|
|
465
|
-
*/
|
|
466
|
-
interface DocumentPasteEditProvider {
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Optional method invoked after the user copies text in a file.
|
|
470
|
-
*
|
|
471
|
-
* During {@link prepareDocumentPaste}, an extension can compute metadata that is attached to
|
|
472
|
-
* a {@link DataTransfer} and is passed back to the provider in {@link provideDocumentPasteEdits}.
|
|
473
|
-
*
|
|
474
|
-
* @param document Document where the copy took place.
|
|
475
|
-
* @param ranges Ranges being copied in the `document`.
|
|
476
|
-
* @param dataTransfer The data transfer associated with the copy. You can store additional values on this for later use in {@link provideDocumentPasteEdits}.
|
|
477
|
-
* @param token A cancellation token.
|
|
478
|
-
*/
|
|
479
|
-
prepareDocumentPaste?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): void | Thenable<void>;
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* Invoked before the user pastes into a document.
|
|
483
|
-
*
|
|
484
|
-
* In this method, extensions can return a workspace edit that replaces the standard pasting behavior.
|
|
485
|
-
*
|
|
486
|
-
* @param document Document being pasted into
|
|
487
|
-
* @param ranges Currently selected ranges in the document.
|
|
488
|
-
* @param dataTransfer The data transfer associated with the paste.
|
|
489
|
-
* @param token A cancellation token.
|
|
490
|
-
*
|
|
491
|
-
* @return Optional workspace edit that applies the paste. Return undefined to use standard pasting.
|
|
492
|
-
*/
|
|
493
|
-
provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* An operation applied on paste
|
|
498
|
-
*/
|
|
499
|
-
declare class DocumentPasteEdit {
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Human readable label that describes the edit.
|
|
503
|
-
*/
|
|
504
|
-
label: string;
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
|
|
508
|
-
*/
|
|
509
|
-
yieldTo?: ReadonlyArray<
|
|
510
|
-
| { readonly extensionId: string; readonly providerId: string }
|
|
511
|
-
| { readonly mimeType: string }
|
|
512
|
-
>;
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* The text or snippet to insert at the pasted locations.
|
|
516
|
-
*/
|
|
517
|
-
insertText: string | SnippetString;
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* An optional additional edit to apply on paste.
|
|
521
|
-
*/
|
|
522
|
-
additionalEdit?: WorkspaceEdit;
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* @param insertText The text or snippet to insert at the pasted locations.
|
|
526
|
-
*
|
|
527
|
-
* TODO: Reverse args, but this will break existing consumers :(
|
|
528
|
-
*/
|
|
529
|
-
constructor(insertText: string | SnippetString, label: string);
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
interface DocumentPasteProviderMetadata {
|
|
533
|
-
/**
|
|
534
|
-
* Identifies the provider.
|
|
535
|
-
*
|
|
536
|
-
* This id is used when users configure the default provider for paste.
|
|
537
|
-
*
|
|
538
|
-
* This id should be unique within the extension but does not need to be unique across extensions.
|
|
539
|
-
*/
|
|
540
|
-
readonly id: string;
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
|
|
544
|
-
*/
|
|
545
|
-
readonly copyMimeTypes?: readonly string[];
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* Mime types that {@link DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits} should be invoked for.
|
|
549
|
-
*
|
|
550
|
-
* This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
|
|
551
|
-
*
|
|
552
|
-
* Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
|
|
553
|
-
*
|
|
554
|
-
* Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
|
|
555
|
-
* Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
|
|
556
|
-
* from the operating system.
|
|
557
|
-
*/
|
|
558
|
-
readonly pasteMimeTypes?: readonly string[];
|
|
559
|
-
}
|
|
560
|
-
// https://github.com/microsoft/vscode/issues/179430
|
|
561
|
-
|
|
562
|
-
interface DocumentDropEdit {
|
|
563
|
-
/**
|
|
564
|
-
* Human readable label that describes the edit.
|
|
565
|
-
*/
|
|
566
|
-
label?: string;
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* The mime type from the {@link DataTransfer} that this edit applies.
|
|
570
|
-
*
|
|
571
|
-
* TODO: Should this be taken from `dropMimeTypes` instead?
|
|
572
|
-
*/
|
|
573
|
-
handledMimeType?: string;
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
|
|
577
|
-
*/
|
|
578
|
-
yieldTo?: ReadonlyArray<
|
|
579
|
-
// TODO: what about built-in providers?
|
|
580
|
-
| { readonly extensionId: string; readonly providerId: string }
|
|
581
|
-
| { readonly mimeType: string }
|
|
582
|
-
>;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
interface DocumentDropEditProviderMetadata {
|
|
586
|
-
/**
|
|
587
|
-
* Identifies the provider.
|
|
588
|
-
*
|
|
589
|
-
* This id is used when users configure the default provider for drop.
|
|
590
|
-
*
|
|
591
|
-
* This id should be unique within the extension but does not need to be unique across extensions.
|
|
592
|
-
*/
|
|
593
|
-
readonly id: string;
|
|
594
|
-
|
|
595
|
-
/**
|
|
596
|
-
* List of {@link DataTransfer} mime types that the provider can handle.
|
|
597
|
-
*
|
|
598
|
-
* This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
|
|
599
|
-
*
|
|
600
|
-
* Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
|
|
601
|
-
*
|
|
602
|
-
* Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
|
|
603
|
-
* Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
|
|
604
|
-
* from the operating system.
|
|
605
|
-
*/
|
|
606
|
-
readonly dropMimeTypes: readonly string[];
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
interface EditSessionIdentityProvider {
|
|
610
|
-
/**
|
|
611
|
-
*
|
|
612
|
-
* @param workspaceFolder The workspace folder to provide an edit session identity for.
|
|
613
|
-
* @param token A cancellation token for the request.
|
|
614
|
-
* @returns A string representing the edit session identity for the requested workspace folder.
|
|
615
|
-
*/
|
|
616
|
-
provideEditSessionIdentity(workspaceFolder: WorkspaceFolder, token: CancellationToken): ProviderResult<string>;
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
*
|
|
620
|
-
* @param identity1 An edit session identity.
|
|
621
|
-
* @param identity2 A second edit session identity to compare to @param identity1.
|
|
622
|
-
* @param token A cancellation token for the request.
|
|
623
|
-
* @returns An {@link EditSessionIdentityMatch} representing the edit session identity match confidence for the provided identities.
|
|
624
|
-
*/
|
|
625
|
-
provideEditSessionIdentityMatch(identity1: string, identity2: string, token: CancellationToken): ProviderResult<EditSessionIdentityMatch>;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
declare enum EditSessionIdentityMatch {
|
|
629
|
-
Complete = 100,
|
|
630
|
-
Partial = 50,
|
|
631
|
-
None = 0
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
interface EditSessionIdentityWillCreateEvent {
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* A cancellation token.
|
|
638
|
-
*/
|
|
639
|
-
readonly token: CancellationToken;
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* The workspace folder to create an edit session identity for.
|
|
643
|
-
*/
|
|
644
|
-
readonly workspaceFolder: WorkspaceFolder;
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* Allows to pause the event until the provided thenable resolves.
|
|
648
|
-
*
|
|
649
|
-
* *Note:* This function can only be called during event dispatch.
|
|
650
|
-
*
|
|
651
|
-
* @param thenable A thenable that delays saving.
|
|
652
|
-
*/
|
|
653
|
-
waitUntil(thenable: Thenable<any>): void;
|
|
654
|
-
}
|
|
655
|
-
interface WebviewEditorInset {
|
|
656
|
-
readonly editor: TextEditor;
|
|
657
|
-
readonly line: number;
|
|
658
|
-
readonly height: number;
|
|
659
|
-
readonly webview: Webview;
|
|
660
|
-
readonly onDidDispose: Event<void>;
|
|
661
|
-
dispose(): void;
|
|
662
|
-
}
|
|
663
|
-
// https://github.com/microsoft/vscode/issues/104436
|
|
664
|
-
|
|
665
|
-
declare enum ExtensionRuntime {
|
|
666
|
-
/**
|
|
667
|
-
* The extension is running in a NodeJS extension host. Runtime access to NodeJS APIs is available.
|
|
668
|
-
*/
|
|
669
|
-
Node = 1,
|
|
670
|
-
/**
|
|
671
|
-
* The extension is running in a Webworker extension host. Runtime access is limited to Webworker APIs.
|
|
672
|
-
*/
|
|
673
|
-
Webworker = 2
|
|
674
|
-
}
|
|
675
|
-
// https://github.com/microsoft/vscode/issues/145307 @alexdima
|
|
676
|
-
|
|
677
|
-
interface Extension<T> {
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* `true` when the extension is associated to another extension host.
|
|
681
|
-
*
|
|
682
|
-
* *Note* that an extension from another extension host cannot export
|
|
683
|
-
* API, e.g {@link Extension.exports its exports} are always `undefined`.
|
|
684
|
-
*/
|
|
685
|
-
readonly isFromDifferentExtensionHost: boolean;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
declare namespace extensions {
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* Get an extension by its full identifier in the form of: `publisher.name`.
|
|
692
|
-
*
|
|
693
|
-
* @param extensionId An extension identifier.
|
|
694
|
-
* @param includeDifferentExtensionHosts Include extensions from different extension host
|
|
695
|
-
* @return An extension or `undefined`.
|
|
696
|
-
*/
|
|
697
|
-
export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: boolean): Extension<T> | undefined;
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
* All extensions across all extension hosts.
|
|
701
|
-
*
|
|
702
|
-
* @see {@link Extension.isFromDifferentExtensionHost}
|
|
703
|
-
*/
|
|
704
|
-
export const allAcrossExtensionHosts: readonly Extension<void>[];
|
|
705
|
-
|
|
706
|
-
}
|
|
707
|
-
// https://github.com/microsoft/vscode/issues/109277
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* Details if an `ExternalUriOpener` can open a uri.
|
|
711
|
-
*
|
|
712
|
-
* The priority is also used to rank multiple openers against each other and determine
|
|
713
|
-
* if an opener should be selected automatically or if the user should be prompted to
|
|
714
|
-
* select an opener.
|
|
715
|
-
*
|
|
716
|
-
* The editor will try to use the best available opener, as sorted by `ExternalUriOpenerPriority`.
|
|
717
|
-
* If there are multiple potential "best" openers for a URI, then the user will be prompted
|
|
718
|
-
* to select an opener.
|
|
719
|
-
*/
|
|
720
|
-
declare enum ExternalUriOpenerPriority {
|
|
721
|
-
/**
|
|
722
|
-
* The opener is disabled and will never be shown to users.
|
|
723
|
-
*
|
|
724
|
-
* Note that the opener can still be used if the user specifically
|
|
725
|
-
* configures it in their settings.
|
|
726
|
-
*/
|
|
727
|
-
None = 0,
|
|
728
|
-
|
|
729
|
-
/**
|
|
730
|
-
* The opener can open the uri but will not cause a prompt on its own
|
|
731
|
-
* since the editor always contributes a built-in `Default` opener.
|
|
732
|
-
*/
|
|
733
|
-
Option = 1,
|
|
734
|
-
|
|
735
|
-
/**
|
|
736
|
-
* The opener can open the uri.
|
|
737
|
-
*
|
|
738
|
-
* The editor's built-in opener has `Default` priority. This means that any additional `Default`
|
|
739
|
-
* openers will cause the user to be prompted to select from a list of all potential openers.
|
|
740
|
-
*/
|
|
741
|
-
Default = 2,
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* The opener can open the uri and should be automatically selected over any
|
|
745
|
-
* default openers, include the built-in one from the editor.
|
|
746
|
-
*
|
|
747
|
-
* A preferred opener will be automatically selected if no other preferred openers
|
|
748
|
-
* are available. If multiple preferred openers are available, then the user
|
|
749
|
-
* is shown a prompt with all potential openers (not just preferred openers).
|
|
750
|
-
*/
|
|
751
|
-
Preferred = 3,
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* Handles opening uris to external resources, such as http(s) links.
|
|
756
|
-
*
|
|
757
|
-
* Extensions can implement an `ExternalUriOpener` to open `http` links to a webserver
|
|
758
|
-
* inside of the editor instead of having the link be opened by the web browser.
|
|
759
|
-
*
|
|
760
|
-
* Currently openers may only be registered for `http` and `https` uris.
|
|
761
|
-
*/
|
|
762
|
-
interface ExternalUriOpener {
|
|
763
|
-
|
|
764
|
-
/**
|
|
765
|
-
* Check if the opener can open a uri.
|
|
766
|
-
*
|
|
767
|
-
* @param uri The uri being opened. This is the uri that the user clicked on. It has
|
|
768
|
-
* not yet gone through port forwarding.
|
|
769
|
-
* @param token Cancellation token indicating that the result is no longer needed.
|
|
770
|
-
*
|
|
771
|
-
* @return Priority indicating if the opener can open the external uri.
|
|
772
|
-
*/
|
|
773
|
-
canOpenExternalUri(uri: Uri, token: CancellationToken): ExternalUriOpenerPriority | Thenable<ExternalUriOpenerPriority>;
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* Open a uri.
|
|
777
|
-
*
|
|
778
|
-
* This is invoked when:
|
|
779
|
-
*
|
|
780
|
-
* - The user clicks a link which does not have an assigned opener. In this case, first `canOpenExternalUri`
|
|
781
|
-
* is called and if the user selects this opener, then `openExternalUri` is called.
|
|
782
|
-
* - The user sets the default opener for a link in their settings and then visits a link.
|
|
783
|
-
*
|
|
784
|
-
* @param resolvedUri The uri to open. This uri may have been transformed by port forwarding, so it
|
|
785
|
-
* may not match the original uri passed to `canOpenExternalUri`. Use `ctx.originalUri` to check the
|
|
786
|
-
* original uri.
|
|
787
|
-
* @param ctx Additional information about the uri being opened.
|
|
788
|
-
* @param token Cancellation token indicating that opening has been canceled.
|
|
789
|
-
*
|
|
790
|
-
* @return Thenable indicating that the opening has completed.
|
|
791
|
-
*/
|
|
792
|
-
openExternalUri(resolvedUri: Uri, ctx: OpenExternalUriContext, token: CancellationToken): Thenable<void> | void;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
* Additional information about the uri being opened.
|
|
797
|
-
*/
|
|
798
|
-
interface OpenExternalUriContext {
|
|
799
|
-
/**
|
|
800
|
-
* The uri that triggered the open.
|
|
801
|
-
*
|
|
802
|
-
* This is the original uri that the user clicked on or that was passed to `openExternal.`
|
|
803
|
-
* Due to port forwarding, this may not match the `resolvedUri` passed to `openExternalUri`.
|
|
804
|
-
*/
|
|
805
|
-
readonly sourceUri: Uri;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
/**
|
|
809
|
-
* Additional metadata about a registered `ExternalUriOpener`.
|
|
810
|
-
*/
|
|
811
|
-
interface ExternalUriOpenerMetadata {
|
|
812
|
-
|
|
813
|
-
/**
|
|
814
|
-
* List of uri schemes the opener is triggered for.
|
|
815
|
-
*
|
|
816
|
-
* Currently only `http` and `https` are supported.
|
|
817
|
-
*/
|
|
818
|
-
readonly schemes: readonly string[];
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Text displayed to the user that explains what the opener does.
|
|
822
|
-
*
|
|
823
|
-
* For example, 'Open in browser preview'
|
|
824
|
-
*/
|
|
825
|
-
readonly label: string;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
interface OpenExternalOptions {
|
|
829
|
-
/**
|
|
830
|
-
* Allows using openers contributed by extensions through `registerExternalUriOpener`
|
|
831
|
-
* when opening the resource.
|
|
832
|
-
*
|
|
833
|
-
* If `true`, the editor will check if any contributed openers can handle the
|
|
834
|
-
* uri, and fallback to the default opener behavior.
|
|
835
|
-
*
|
|
836
|
-
* If it is string, this specifies the id of the `ExternalUriOpener`
|
|
837
|
-
* that should be used if it is available. Use `'default'` to force the editor's
|
|
838
|
-
* standard external opener to be used.
|
|
839
|
-
*/
|
|
840
|
-
readonly allowContributedOpeners?: boolean | string;
|
|
841
|
-
}
|
|
842
|
-
interface CommentThread2 {
|
|
843
|
-
/**
|
|
844
|
-
* The uri of the document the thread has been created on.
|
|
845
|
-
*/
|
|
846
|
-
readonly uri: Uri;
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
* The range the comment thread is located within the document. The thread icon will be shown
|
|
850
|
-
* at the last line of the range.
|
|
851
|
-
*/
|
|
852
|
-
range: Range | undefined;
|
|
853
|
-
|
|
854
|
-
/**
|
|
855
|
-
* The ordered comments of the thread.
|
|
856
|
-
*/
|
|
857
|
-
comments: readonly Comment[];
|
|
858
|
-
|
|
859
|
-
/**
|
|
860
|
-
* Whether the thread should be collapsed or expanded when opening the document.
|
|
861
|
-
* Defaults to Collapsed.
|
|
862
|
-
*/
|
|
863
|
-
collapsibleState: CommentThreadCollapsibleState;
|
|
864
|
-
|
|
865
|
-
/**
|
|
866
|
-
* Whether the thread supports reply.
|
|
867
|
-
* Defaults to true.
|
|
868
|
-
*/
|
|
869
|
-
canReply: boolean;
|
|
870
|
-
|
|
871
|
-
/**
|
|
872
|
-
* Context value of the comment thread. This can be used to contribute thread specific actions.
|
|
873
|
-
* For example, a comment thread is given a context value as `editable`. When contributing actions to `comments/commentThread/title`
|
|
874
|
-
* using `menus` extension point, you can specify context value for key `commentThread` in `when` expression like `commentThread == editable`.
|
|
875
|
-
* ```json
|
|
876
|
-
* "contributes": {
|
|
877
|
-
* "menus": {
|
|
878
|
-
* "comments/commentThread/title": [
|
|
879
|
-
* {
|
|
880
|
-
* "command": "extension.deleteCommentThread",
|
|
881
|
-
* "when": "commentThread == editable"
|
|
882
|
-
* }
|
|
883
|
-
* ]
|
|
884
|
-
* }
|
|
885
|
-
* }
|
|
886
|
-
* ```
|
|
887
|
-
* This will show action `extension.deleteCommentThread` only for comment threads with `contextValue` is `editable`.
|
|
888
|
-
*/
|
|
889
|
-
contextValue?: string;
|
|
890
|
-
|
|
891
|
-
/**
|
|
892
|
-
* The optional human-readable label describing the {@link CommentThread Comment Thread}
|
|
893
|
-
*/
|
|
894
|
-
label?: string;
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* The optional state of a comment thread, which may affect how the comment is displayed.
|
|
898
|
-
*/
|
|
899
|
-
state?: CommentThreadState;
|
|
900
|
-
|
|
901
|
-
/**
|
|
902
|
-
* Dispose this comment thread.
|
|
903
|
-
*
|
|
904
|
-
* Once disposed, this comment thread will be removed from visible editors and Comment Panel when appropriate.
|
|
905
|
-
*/
|
|
906
|
-
dispose(): void;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
interface CommentController {
|
|
910
|
-
createCommentThread(uri: Uri, range: Range | undefined, comments: readonly Comment[]): CommentThread | CommentThread2;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
interface CommentingRangeProvider2 {
|
|
914
|
-
/**
|
|
915
|
-
* Provide a list of ranges which allow new comment threads creation or null for a given document
|
|
916
|
-
*/
|
|
917
|
-
provideCommentingRanges(document: TextDocument, token: CancellationToken): ProviderResult<Range[] | { fileComments: boolean; ranges?: Range[] }>;
|
|
918
|
-
}
|
|
919
|
-
// https://github.com/microsoft/vscode/issues/73524
|
|
920
|
-
|
|
921
|
-
/**
|
|
922
|
-
* The parameters of a query for file search.
|
|
923
|
-
*/
|
|
924
|
-
interface FileSearchQuery {
|
|
925
|
-
/**
|
|
926
|
-
* The search pattern to match against file paths.
|
|
927
|
-
*/
|
|
928
|
-
pattern: string;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
/**
|
|
932
|
-
* Options that apply to file search.
|
|
933
|
-
*/
|
|
934
|
-
interface FileSearchOptions extends SearchOptions {
|
|
935
|
-
/**
|
|
936
|
-
* The maximum number of results to be returned.
|
|
937
|
-
*/
|
|
938
|
-
maxResults?: number;
|
|
939
|
-
|
|
940
|
-
/**
|
|
941
|
-
* A CancellationToken that represents the session for this search query. If the provider chooses to, this object can be used as the key for a cache,
|
|
942
|
-
* and searches with the same session object can search the same cache. When the token is cancelled, the session is complete and the cache can be cleared.
|
|
943
|
-
*/
|
|
944
|
-
session?: CancellationToken;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* A FileSearchProvider provides search results for files in the given folder that match a query string. It can be invoked by quickopen or other extensions.
|
|
949
|
-
*
|
|
950
|
-
* A FileSearchProvider is the more powerful of two ways to implement file search in the editor. Use a FileSearchProvider if you wish to search within a folder for
|
|
951
|
-
* all files that match the user's query.
|
|
952
|
-
*
|
|
953
|
-
* The FileSearchProvider will be invoked on every keypress in quickopen. When `workspace.findFiles` is called, it will be invoked with an empty query string,
|
|
954
|
-
* and in that case, every file in the folder should be returned.
|
|
955
|
-
*/
|
|
956
|
-
interface FileSearchProvider {
|
|
957
|
-
/**
|
|
958
|
-
* Provide the set of files that match a certain file path pattern.
|
|
959
|
-
* @param query The parameters for this query.
|
|
960
|
-
* @param options A set of options to consider while searching files.
|
|
961
|
-
* @param token A cancellation token.
|
|
962
|
-
*/
|
|
963
|
-
provideFileSearchResults(query: FileSearchQuery, options: FileSearchOptions, token: CancellationToken): ProviderResult<Uri[]>;
|
|
964
|
-
}
|
|
965
|
-
// https://github.com/microsoft/vscode/issues/59924
|
|
966
|
-
|
|
967
|
-
/**
|
|
968
|
-
* Options that can be set on a findTextInFiles search.
|
|
969
|
-
*/
|
|
970
|
-
interface FindTextInFilesOptions {
|
|
971
|
-
/**
|
|
972
|
-
* A {@link GlobPattern glob pattern} that defines the files to search for. The glob pattern
|
|
973
|
-
* will be matched against the file paths of files relative to their workspace. Use a {@link RelativePattern relative pattern}
|
|
974
|
-
* to restrict the search results to a {@link WorkspaceFolder workspace folder}.
|
|
975
|
-
*/
|
|
976
|
-
include?: GlobPattern;
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* A {@link GlobPattern glob pattern} that defines files and folders to exclude. The glob pattern
|
|
980
|
-
* will be matched against the file paths of resulting matches relative to their workspace. When `undefined`, default excludes will
|
|
981
|
-
* apply.
|
|
982
|
-
*/
|
|
983
|
-
exclude?: GlobPattern;
|
|
984
|
-
|
|
985
|
-
/**
|
|
986
|
-
* Whether to use the default and user-configured excludes. Defaults to true.
|
|
987
|
-
*/
|
|
988
|
-
useDefaultExcludes?: boolean;
|
|
989
|
-
|
|
990
|
-
/**
|
|
991
|
-
* The maximum number of results to search for
|
|
992
|
-
*/
|
|
993
|
-
maxResults?: number;
|
|
994
|
-
|
|
995
|
-
/**
|
|
996
|
-
* Whether external files that exclude files, like .gitignore, should be respected.
|
|
997
|
-
* See the vscode setting `"search.useIgnoreFiles"`.
|
|
998
|
-
*/
|
|
999
|
-
useIgnoreFiles?: boolean;
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* Whether global files that exclude files, like .gitignore, should be respected.
|
|
1003
|
-
* See the vscode setting `"search.useGlobalIgnoreFiles"`.
|
|
1004
|
-
*/
|
|
1005
|
-
useGlobalIgnoreFiles?: boolean;
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* Whether files in parent directories that exclude files, like .gitignore, should be respected.
|
|
1009
|
-
* See the vscode setting `"search.useParentIgnoreFiles"`.
|
|
1010
|
-
*/
|
|
1011
|
-
useParentIgnoreFiles?: boolean;
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* Whether symlinks should be followed while searching.
|
|
1015
|
-
* See the vscode setting `"search.followSymlinks"`.
|
|
1016
|
-
*/
|
|
1017
|
-
followSymlinks?: boolean;
|
|
1018
|
-
|
|
1019
|
-
/**
|
|
1020
|
-
* Interpret files using this encoding.
|
|
1021
|
-
* See the vscode setting `"files.encoding"`
|
|
1022
|
-
*/
|
|
1023
|
-
encoding?: string;
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* Options to specify the size of the result text preview.
|
|
1027
|
-
*/
|
|
1028
|
-
previewOptions?: TextSearchPreviewOptions;
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* Number of lines of context to include before each match.
|
|
1032
|
-
*/
|
|
1033
|
-
beforeContext?: number;
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* Number of lines of context to include after each match.
|
|
1037
|
-
*/
|
|
1038
|
-
afterContext?: number;
|
|
1039
|
-
}
|
|
1040
|
-
// https://github.com/microsoft/vscode/issues/84515
|
|
1041
|
-
|
|
1042
|
-
interface FileSystemProvider {
|
|
1043
|
-
open?(resource: Uri, options: { create: boolean }): number | Thenable<number>;
|
|
1044
|
-
close?(fd: number): void | Thenable<void>;
|
|
1045
|
-
read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
|
|
1046
|
-
write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
|
|
1047
|
-
}
|
|
1048
|
-
// https://github.com/microsoft/vscode/issues/46726
|
|
1049
|
-
|
|
1050
|
-
interface IssueUriRequestHandler {
|
|
1051
|
-
/**
|
|
1052
|
-
*Handle the request by the issue reporter for the Uri you want to direct the user to.
|
|
1053
|
-
*/
|
|
1054
|
-
handleIssueUrlRequest(): ProviderResult<Uri>;
|
|
1055
|
-
}
|
|
1056
|
-
/**
|
|
1057
|
-
* Represents a session of a currently logged in user.
|
|
1058
|
-
*/
|
|
1059
|
-
interface AuthenticationSession {
|
|
1060
|
-
/**
|
|
1061
|
-
* An optional ID token that may be included in the session.
|
|
1062
|
-
*/
|
|
1063
|
-
readonly idToken?: string;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
interface InlineCompletionItem {
|
|
1067
|
-
/**
|
|
1068
|
-
* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
|
|
1069
|
-
* Defaults to `false`.
|
|
1070
|
-
*/
|
|
1071
|
-
completeBracketPairs?: boolean;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
interface InlineCompletionItemProviderMetadata {
|
|
1075
|
-
/**
|
|
1076
|
-
* Specifies a list of extension ids that this provider yields to if they return a result.
|
|
1077
|
-
* If some inline completion provider registered by such an extension returns a result, this provider is not asked.
|
|
1078
|
-
*/
|
|
1079
|
-
yieldTo: string[];
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
interface InlineCompletionItemProvider {
|
|
1083
|
-
/**
|
|
1084
|
-
* @param completionItem The completion item that was shown.
|
|
1085
|
-
* @param updatedInsertText The actual insert text (after brackets were fixed).
|
|
1086
|
-
*/
|
|
1087
|
-
// eslint-disable-next-line local/vscode-dts-provider-naming
|
|
1088
|
-
handleDidShowCompletionItem?(completionItem: InlineCompletionItem, updatedInsertText: string): void;
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* Is called when an inline completion item was accepted partially.
|
|
1092
|
-
* @param acceptedLength The length of the substring of the inline completion that was accepted already.
|
|
1093
|
-
*/
|
|
1094
|
-
// eslint-disable-next-line local/vscode-dts-provider-naming
|
|
1095
|
-
handleDidPartiallyAcceptCompletionItem?(completionItem: InlineCompletionItem, acceptedLength: number): void;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
// When finalizing `commands`, make sure to add a corresponding constructor parameter.
|
|
1099
|
-
interface InlineCompletionList {
|
|
1100
|
-
/**
|
|
1101
|
-
* A list of commands associated with the inline completions of this list.
|
|
1102
|
-
*/
|
|
1103
|
-
commands?: Command[];
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
|
|
1107
|
-
* Defaults to false (might change).
|
|
1108
|
-
*/
|
|
1109
|
-
enableForwardStability?: boolean;
|
|
1110
|
-
}
|
|
1111
|
-
interface InteractiveEditorSlashCommand {
|
|
1112
|
-
command: string;
|
|
1113
|
-
detail?: string;
|
|
1114
|
-
refer?: boolean;
|
|
1115
|
-
/**
|
|
1116
|
-
* Whether the command should execute as soon
|
|
1117
|
-
* as it is entered. Defaults to `false`.
|
|
1118
|
-
*/
|
|
1119
|
-
executeImmediately?: boolean;
|
|
1120
|
-
// kind: CompletionItemKind;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
// todo@API make classes
|
|
1124
|
-
interface InteractiveEditorSession {
|
|
1125
|
-
placeholder?: string;
|
|
1126
|
-
slashCommands?: InteractiveEditorSlashCommand[];
|
|
1127
|
-
wholeRange?: Range;
|
|
1128
|
-
message?: string;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
// todo@API make classes
|
|
1132
|
-
interface InteractiveEditorRequest {
|
|
1133
|
-
prompt: string;
|
|
1134
|
-
selection: Selection;
|
|
1135
|
-
wholeRange: Range;
|
|
1136
|
-
attempt: number;
|
|
1137
|
-
live: boolean;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
// todo@API make classes
|
|
1141
|
-
interface InteractiveEditorResponse {
|
|
1142
|
-
edits: TextEdit[] | WorkspaceEdit;
|
|
1143
|
-
placeholder?: string;
|
|
1144
|
-
wholeRange?: Range;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
// todo@API make classes
|
|
1148
|
-
interface InteractiveEditorMessageResponse {
|
|
1149
|
-
contents: MarkdownString;
|
|
1150
|
-
placeholder?: string;
|
|
1151
|
-
wholeRange?: Range;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
declare enum InteractiveEditorResponseFeedbackKind {
|
|
1155
|
-
Unhelpful = 0,
|
|
1156
|
-
Helpful = 1,
|
|
1157
|
-
Undone = 2,
|
|
1158
|
-
Accepted = 3
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
interface TextDocumentContext {
|
|
1162
|
-
document: TextDocument;
|
|
1163
|
-
selection: Selection;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
interface InteractiveEditorSessionProviderMetadata {
|
|
1167
|
-
label: string;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
interface InteractiveEditorSessionProvider<S extends InteractiveEditorSession = InteractiveEditorSession, R extends InteractiveEditorResponse | InteractiveEditorMessageResponse = InteractiveEditorResponse | InteractiveEditorMessageResponse> {
|
|
1171
|
-
|
|
1172
|
-
// Create a session. The lifetime of this session is the duration of the editing session with the input mode widget.
|
|
1173
|
-
prepareInteractiveEditorSession(context: TextDocumentContext, token: CancellationToken): ProviderResult<S>;
|
|
1174
|
-
|
|
1175
|
-
provideInteractiveEditorResponse(session: S, request: InteractiveEditorRequest, progress: Progress<{ message: string; edits: TextEdit[] }>, token: CancellationToken): ProviderResult<R>;
|
|
1176
|
-
|
|
1177
|
-
// eslint-disable-next-line local/vscode-dts-provider-naming
|
|
1178
|
-
handleInteractiveEditorResponseFeedback?(session: S, response: R, kind: InteractiveEditorResponseFeedbackKind): void;
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
interface InteractiveSessionState { }
|
|
1183
|
-
|
|
1184
|
-
interface InteractiveSessionParticipantInformation {
|
|
1185
|
-
name: string;
|
|
1186
|
-
|
|
1187
|
-
/**
|
|
1188
|
-
* A full URI for the icon of the participant.
|
|
1189
|
-
*/
|
|
1190
|
-
icon?: Uri;
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
interface InteractiveSession {
|
|
1194
|
-
requester: InteractiveSessionParticipantInformation;
|
|
1195
|
-
responder: InteractiveSessionParticipantInformation;
|
|
1196
|
-
inputPlaceholder?: string;
|
|
1197
|
-
|
|
1198
|
-
saveState?(): InteractiveSessionState;
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
interface InteractiveSessionRequestArgs {
|
|
1202
|
-
command: string;
|
|
1203
|
-
args: any;
|
|
1204
|
-
}
|
|
1205
|
-
interface InteractiveRequest {
|
|
1206
|
-
variables: Record<string, ChatVariableValue[]>;
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
interface InteractiveRequest {
|
|
1210
|
-
session: InteractiveSession;
|
|
1211
|
-
message: string | InteractiveSessionReplyFollowup;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
interface InteractiveResponseErrorDetails {
|
|
1215
|
-
message: string;
|
|
1216
|
-
responseIsIncomplete?: boolean;
|
|
1217
|
-
responseIsFiltered?: boolean;
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
interface InteractiveResponseForProgress {
|
|
1221
|
-
errorDetails?: InteractiveResponseErrorDetails;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
interface InteractiveProgressContent {
|
|
1225
|
-
content: string | MarkdownString;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
interface InteractiveProgressId {
|
|
1229
|
-
responseId: string;
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
interface InteractiveProgressTask {
|
|
1233
|
-
placeholder: string;
|
|
1234
|
-
resolvedContent: Thenable<InteractiveProgressContent | InteractiveProgressFileTree>;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
interface FileTreeData {
|
|
1238
|
-
label: string;
|
|
1239
|
-
uri: Uri;
|
|
1240
|
-
children?: FileTreeData[];
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
interface InteractiveProgressFileTree {
|
|
1244
|
-
treeData: FileTreeData;
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
interface DocumentContext {
|
|
1248
|
-
uri: Uri;
|
|
1249
|
-
version: number;
|
|
1250
|
-
ranges: Range[];
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
interface InteractiveProgressUsedContext {
|
|
1254
|
-
documents: DocumentContext[];
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
type InteractiveProgress =
|
|
1258
|
-
| InteractiveProgressContent
|
|
1259
|
-
| InteractiveProgressId
|
|
1260
|
-
| InteractiveProgressTask
|
|
1261
|
-
| InteractiveProgressFileTree
|
|
1262
|
-
| InteractiveProgressUsedContext;
|
|
1263
|
-
|
|
1264
|
-
interface InteractiveResponseCommand {
|
|
1265
|
-
commandId: string;
|
|
1266
|
-
args?: any[];
|
|
1267
|
-
title: string; // supports codicon strings
|
|
1268
|
-
when?: string;
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
interface InteractiveSessionSlashCommand {
|
|
1272
|
-
command: string;
|
|
1273
|
-
kind: CompletionItemKind;
|
|
1274
|
-
detail?: string;
|
|
1275
|
-
shouldRepopulate?: boolean;
|
|
1276
|
-
followupPlaceholder?: string;
|
|
1277
|
-
executeImmediately?: boolean;
|
|
1278
|
-
yieldTo?: ReadonlyArray<{ readonly command: string }>;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
interface InteractiveSessionReplyFollowup {
|
|
1282
|
-
message: string;
|
|
1283
|
-
tooltip?: string;
|
|
1284
|
-
title?: string;
|
|
1285
|
-
|
|
1286
|
-
// Extensions can put any serializable data here, such as an ID/version
|
|
1287
|
-
metadata?: any;
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
type InteractiveSessionFollowup = InteractiveSessionReplyFollowup | InteractiveResponseCommand;
|
|
1291
|
-
|
|
1292
|
-
type InteractiveWelcomeMessageContent = string | InteractiveSessionReplyFollowup[];
|
|
1293
|
-
|
|
1294
|
-
interface InteractiveSessionProvider<S extends InteractiveSession = InteractiveSession> {
|
|
1295
|
-
provideWelcomeMessage?(token: CancellationToken): ProviderResult<InteractiveWelcomeMessageContent[]>;
|
|
1296
|
-
provideFollowups?(session: S, token: CancellationToken): ProviderResult<(string | InteractiveSessionFollowup)[]>;
|
|
1297
|
-
provideSlashCommands?(session: S, token: CancellationToken): ProviderResult<InteractiveSessionSlashCommand[]>;
|
|
1298
|
-
|
|
1299
|
-
prepareSession(initialState: InteractiveSessionState | undefined, token: CancellationToken): ProviderResult<S>;
|
|
1300
|
-
resolveRequest(session: S, context: InteractiveSessionRequestArgs | string, token: CancellationToken): ProviderResult<InteractiveRequest>;
|
|
1301
|
-
provideResponseWithProgress(request: InteractiveRequest, progress: Progress<InteractiveProgress>, token: CancellationToken): ProviderResult<InteractiveResponseForProgress>;
|
|
1302
|
-
|
|
1303
|
-
// eslint-disable-next-line local/vscode-dts-provider-naming
|
|
1304
|
-
removeRequest(session: S, requestId: string): void;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
interface InteractiveSessionDynamicRequest {
|
|
1308
|
-
/**
|
|
1309
|
-
* The message that will be displayed in the UI
|
|
1310
|
-
*/
|
|
1311
|
-
message: string;
|
|
1312
|
-
|
|
1313
|
-
/**
|
|
1314
|
-
* Any extra metadata/context that will go to the provider.
|
|
1315
|
-
* NOTE not actually used yet.
|
|
1316
|
-
*/
|
|
1317
|
-
metadata?: any;
|
|
1318
|
-
}
|
|
1319
|
-
declare enum InteractiveSessionVoteDirection {
|
|
1320
|
-
Up = 1,
|
|
1321
|
-
Down = 2
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
interface InteractiveSessionVoteAction {
|
|
1325
|
-
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
1326
|
-
kind: 'vote';
|
|
1327
|
-
responseId: string;
|
|
1328
|
-
direction: InteractiveSessionVoteDirection;
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
declare enum InteractiveSessionCopyKind {
|
|
1332
|
-
// Keyboard shortcut or context menu
|
|
1333
|
-
Action = 1,
|
|
1334
|
-
Toolbar = 2
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
interface InteractiveSessionCopyAction {
|
|
1338
|
-
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
1339
|
-
kind: 'copy';
|
|
1340
|
-
responseId: string;
|
|
1341
|
-
codeBlockIndex: number;
|
|
1342
|
-
copyType: InteractiveSessionCopyKind;
|
|
1343
|
-
copiedCharacters: number;
|
|
1344
|
-
totalCharacters: number;
|
|
1345
|
-
copiedText: string;
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
interface InteractiveSessionInsertAction {
|
|
1349
|
-
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
1350
|
-
kind: 'insert';
|
|
1351
|
-
responseId: string;
|
|
1352
|
-
codeBlockIndex: number;
|
|
1353
|
-
totalCharacters: number;
|
|
1354
|
-
newFile?: boolean;
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
interface InteractiveSessionTerminalAction {
|
|
1358
|
-
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
1359
|
-
kind: 'runInTerminal';
|
|
1360
|
-
responseId: string;
|
|
1361
|
-
codeBlockIndex: number;
|
|
1362
|
-
languageId?: string;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
interface InteractiveSessionCommandAction {
|
|
1366
|
-
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
1367
|
-
kind: 'command';
|
|
1368
|
-
command: InteractiveResponseCommand;
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
type InteractiveSessionUserAction = InteractiveSessionVoteAction | InteractiveSessionCopyAction | InteractiveSessionInsertAction | InteractiveSessionTerminalAction | InteractiveSessionCommandAction;
|
|
1372
|
-
|
|
1373
|
-
interface InteractiveSessionUserActionEvent {
|
|
1374
|
-
action: InteractiveSessionUserAction;
|
|
1375
|
-
providerId: string;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
declare namespace interactive {
|
|
1379
|
-
// current version of the proposal.
|
|
1380
|
-
export const _version: 1 | number;
|
|
1381
|
-
|
|
1382
|
-
export function registerInteractiveSessionProvider(id: string, provider: InteractiveSessionProvider): Disposable;
|
|
1383
|
-
export function addInteractiveRequest(context: InteractiveSessionRequestArgs): void;
|
|
1384
|
-
|
|
1385
|
-
export function sendInteractiveRequestToProvider(providerId: string, message: InteractiveSessionDynamicRequest): void;
|
|
1386
|
-
|
|
1387
|
-
export function registerInteractiveEditorSessionProvider(provider: InteractiveEditorSessionProvider, metadata?: InteractiveEditorSessionProviderMetadata): Disposable;
|
|
1388
|
-
|
|
1389
|
-
export function transferChatSession(session: InteractiveSession, toWorkspace: Uri): void;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
declare namespace interactive {
|
|
1393
|
-
export const onDidPerformUserAction: Event<InteractiveSessionUserActionEvent>;
|
|
1394
|
-
}
|
|
1395
|
-
/**
|
|
1396
|
-
* The tab represents an interactive window.
|
|
1397
|
-
*/
|
|
1398
|
-
declare class TabInputInteractiveWindow {
|
|
1399
|
-
/**
|
|
1400
|
-
* The uri of the history notebook in the interactive window.
|
|
1401
|
-
*/
|
|
1402
|
-
readonly uri: Uri;
|
|
1403
|
-
/**
|
|
1404
|
-
* The uri of the input box in the interactive window.
|
|
1405
|
-
*/
|
|
1406
|
-
readonly inputBoxUri: Uri;
|
|
1407
|
-
private constructor(uri: Uri, inputBoxUri: Uri);
|
|
1408
|
-
}
|
|
1409
|
-
/**
|
|
1410
|
-
* A message passing protocol, which enables sending and receiving messages
|
|
1411
|
-
* between two parties.
|
|
1412
|
-
*/
|
|
1413
|
-
interface MessagePassingProtocol {
|
|
1414
|
-
|
|
1415
|
-
/**
|
|
1416
|
-
* Fired when a message is received from the other party.
|
|
1417
|
-
*/
|
|
1418
|
-
readonly onDidReceiveMessage: Event<any>;
|
|
1419
|
-
|
|
1420
|
-
/**
|
|
1421
|
-
* Post a message to the other party.
|
|
1422
|
-
*
|
|
1423
|
-
* @param message Body of the message. This must be a JSON serializable object.
|
|
1424
|
-
* @param transfer A collection of `ArrayBuffer` instances which can be transferred
|
|
1425
|
-
* to the other party, saving costly memory copy operations.
|
|
1426
|
-
*/
|
|
1427
|
-
postMessage(message: any, transfer?: ArrayBuffer[]): void;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
interface ExtensionContext {
|
|
1431
|
-
readonly extensionRuntime: ExtensionRuntime;
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
interface ExtensionContext {
|
|
1435
|
-
|
|
1436
|
-
/**
|
|
1437
|
-
* When not `undefined`, this is an instance of {@link MessagePassingProtocol} in
|
|
1438
|
-
* which the other party is owned by the web embedder.
|
|
1439
|
-
*/
|
|
1440
|
-
readonly messagePassingProtocol: MessagePassingProtocol | undefined;
|
|
1441
|
-
}
|
|
1442
|
-
interface DocumentContextItem {
|
|
1443
|
-
readonly uri: Uri;
|
|
1444
|
-
readonly version: number;
|
|
1445
|
-
readonly ranges: Range[];
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
interface MappedEditsContext {
|
|
1449
|
-
documents: DocumentContextItem[][];
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
/**
|
|
1453
|
-
* Interface for providing mapped edits for a given document.
|
|
1454
|
-
*/
|
|
1455
|
-
interface MappedEditsProvider {
|
|
1456
|
-
/**
|
|
1457
|
-
* Provide mapped edits for a given document.
|
|
1458
|
-
* @param document The document to provide mapped edits for.
|
|
1459
|
-
* @param codeBlocks Code blocks that come from an LLM's reply.
|
|
1460
|
-
* "Insert at cursor" in the panel chat only sends one edit that the user clicks on, but inline chat can send multiple blocks and let the lang server decide what to do with them.
|
|
1461
|
-
* @param context The context for providing mapped edits.
|
|
1462
|
-
* @param token A cancellation token.
|
|
1463
|
-
* @returns A provider result of text edits.
|
|
1464
|
-
*/
|
|
1465
|
-
provideMappedEdits(
|
|
1466
|
-
document: TextDocument,
|
|
1467
|
-
codeBlocks: string[],
|
|
1468
|
-
context: MappedEditsContext,
|
|
1469
|
-
token: CancellationToken
|
|
1470
|
-
): ProviderResult<WorkspaceEdit | null>;
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
declare namespace chat {
|
|
1474
|
-
export function registerAgent(id: string, agent: ChatAgent, metadata: ChatAgentMetadata): Disposable;
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
declare namespace chat {
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* Register a LLM as chat response provider to the editor.
|
|
1481
|
-
*
|
|
1482
|
-
*
|
|
1483
|
-
* @param id
|
|
1484
|
-
* @param provider
|
|
1485
|
-
* @param metadata
|
|
1486
|
-
*/
|
|
1487
|
-
export function registerChatResponseProvider(id: string, provider: ChatResponseProvider, metadata: ChatResponseProviderMetadata): Disposable;
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
declare namespace chat {
|
|
1491
|
-
|
|
1492
|
-
/**
|
|
1493
|
-
* Request access to chat.
|
|
1494
|
-
*
|
|
1495
|
-
* *Note* that this function will throw an error unless an user interaction is currently active.
|
|
1496
|
-
*
|
|
1497
|
-
* @param id The id of the chat provider, e.g `copilot`
|
|
1498
|
-
*/
|
|
1499
|
-
export function requestChatAccess(id: string): Thenable<ChatAccess>;
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
declare namespace chat {
|
|
1503
|
-
export function registerSlashCommand(name: string, command: SlashCommand, metadata: SlashCommandMetadata): Disposable;
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
declare namespace chat {
|
|
1507
|
-
export function registerVariable(name: string, description: string, resolver: ChatVariableResolver): Disposable;
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
declare namespace chat {
|
|
1511
|
-
export function registerMappedEditsProvider(documentSelector: DocumentSelector, provider: MappedEditsProvider): Disposable;
|
|
1512
|
-
}
|
|
1513
|
-
// https://github.com/microsoft/vscode/issues/124970
|
|
1514
|
-
|
|
1515
|
-
/**
|
|
1516
|
-
* The execution state of a notebook cell.
|
|
1517
|
-
*/
|
|
1518
|
-
declare enum NotebookCellExecutionState {
|
|
1519
|
-
/**
|
|
1520
|
-
* The cell is idle.
|
|
1521
|
-
*/
|
|
1522
|
-
Idle = 1,
|
|
1523
|
-
/**
|
|
1524
|
-
* Execution for the cell is pending.
|
|
1525
|
-
*/
|
|
1526
|
-
Pending = 2,
|
|
1527
|
-
/**
|
|
1528
|
-
* The cell is currently executing.
|
|
1529
|
-
*/
|
|
1530
|
-
Executing = 3,
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
/**
|
|
1534
|
-
* An event describing a cell execution state change.
|
|
1535
|
-
*/
|
|
1536
|
-
interface NotebookCellExecutionStateChangeEvent {
|
|
1537
|
-
/**
|
|
1538
|
-
* The {@link NotebookCell cell} for which the execution state has changed.
|
|
1539
|
-
*/
|
|
1540
|
-
readonly cell: NotebookCell;
|
|
1541
|
-
|
|
1542
|
-
/**
|
|
1543
|
-
* The new execution state of the cell.
|
|
1544
|
-
*/
|
|
1545
|
-
readonly state: NotebookCellExecutionState;
|
|
1546
|
-
}
|
|
1547
|
-
// https://github.com/microsoft/vscode/issues/161144
|
|
1548
|
-
declare enum NotebookControllerAffinity2 {
|
|
1549
|
-
Default = 1,
|
|
1550
|
-
Preferred = 2,
|
|
1551
|
-
Hidden = -1
|
|
1552
|
-
}
|
|
1553
|
-
// https://github.com/microsoft/vscode/issues/106744
|
|
1554
|
-
|
|
1555
|
-
interface NotebookCellOutput {
|
|
1556
|
-
/**
|
|
1557
|
-
* @deprecated
|
|
1558
|
-
*/
|
|
1559
|
-
id: string;
|
|
1560
|
-
}
|
|
1561
|
-
/**
|
|
1562
|
-
* A NotebookExecution is how {@link NotebookController notebook controller} can indicate whether the notebook controller is busy or not.
|
|
1563
|
-
*
|
|
1564
|
-
* When {@linkcode NotebookExecution.start start()} is called on the execution task, it causes the Notebook to enter a executing state .
|
|
1565
|
-
* When {@linkcode NotebookExecution.end end()} is called, it enters the idle state.
|
|
1566
|
-
*/
|
|
1567
|
-
interface NotebookExecution {
|
|
1568
|
-
/**
|
|
1569
|
-
* Signal that the execution has begun.
|
|
1570
|
-
*/
|
|
1571
|
-
start(): void;
|
|
1572
|
-
|
|
1573
|
-
/**
|
|
1574
|
-
* Signal that execution has ended.
|
|
1575
|
-
*/
|
|
1576
|
-
end(): void;
|
|
1577
|
-
}
|
|
1578
|
-
interface NotebookControllerDetectionTask {
|
|
1579
|
-
/**
|
|
1580
|
-
* Dispose and remove the detection task.
|
|
1581
|
-
*/
|
|
1582
|
-
dispose(): void;
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
declare class NotebookKernelSourceAction {
|
|
1586
|
-
readonly label: string;
|
|
1587
|
-
readonly description?: string;
|
|
1588
|
-
readonly detail?: string;
|
|
1589
|
-
readonly command: string | Command;
|
|
1590
|
-
readonly documentation?: Uri;
|
|
1591
|
-
|
|
1592
|
-
constructor(label: string);
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
interface NotebookKernelSourceActionProvider {
|
|
1596
|
-
/**
|
|
1597
|
-
* An optional event to signal that the kernel source actions have changed.
|
|
1598
|
-
*/
|
|
1599
|
-
onDidChangeNotebookKernelSourceActions?: Event<void>;
|
|
1600
|
-
/**
|
|
1601
|
-
* Provide kernel source actions
|
|
1602
|
-
*/
|
|
1603
|
-
provideNotebookKernelSourceActions(token: CancellationToken): ProviderResult<NotebookKernelSourceAction[]>;
|
|
1604
|
-
}
|
|
1605
|
-
// https://github.com/microsoft/vscode/issues/106744
|
|
1606
|
-
|
|
1607
|
-
interface NotebookRegistrationData {
|
|
1608
|
-
readonly displayName: string;
|
|
1609
|
-
readonly filenamePattern: ReadonlyArray<(GlobPattern | { readonly include: GlobPattern; readonly exclude: GlobPattern })>;
|
|
1610
|
-
readonly exclusive?: boolean;
|
|
1611
|
-
}
|
|
1612
|
-
// https://github.com/microsoft/vscode/issues/123601
|
|
1613
|
-
|
|
1614
|
-
/**
|
|
1615
|
-
* Represents a script that is loaded into the notebook renderer before rendering output. This allows
|
|
1616
|
-
* to provide and share functionality for notebook markup and notebook output renderers.
|
|
1617
|
-
*/
|
|
1618
|
-
declare class NotebookRendererScript {
|
|
1619
|
-
|
|
1620
|
-
/**
|
|
1621
|
-
* APIs that the preload provides to the renderer. These are matched
|
|
1622
|
-
* against the `dependencies` and `optionalDependencies` arrays in the
|
|
1623
|
-
* notebook renderer contribution point.
|
|
1624
|
-
*/
|
|
1625
|
-
provides: readonly string[];
|
|
1626
|
-
|
|
1627
|
-
/**
|
|
1628
|
-
* URI of the JavaScript module to preload.
|
|
1629
|
-
*
|
|
1630
|
-
* This module must export an `activate` function that takes a context object that contains the notebook API.
|
|
1631
|
-
*/
|
|
1632
|
-
uri: Uri;
|
|
1633
|
-
|
|
1634
|
-
/**
|
|
1635
|
-
* @param uri URI of the JavaScript module to preload
|
|
1636
|
-
* @param provides Value for the `provides` property
|
|
1637
|
-
*/
|
|
1638
|
-
constructor(uri: Uri, provides?: string | readonly string[]);
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
interface NotebookController {
|
|
1642
|
-
updateNotebookAffinity(notebook: NotebookDocument, affinity: NotebookControllerAffinity | NotebookControllerAffinity2): void;
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
interface NotebookController {
|
|
1646
|
-
/**
|
|
1647
|
-
* Create an execution task.
|
|
1648
|
-
*
|
|
1649
|
-
* _Note_ that there can only be one execution per Notebook, that also includes NotebookCellExecutions and t an error is thrown if
|
|
1650
|
-
* a cell execution or another NotebookExecution is created while another is still active.
|
|
1651
|
-
*
|
|
1652
|
-
* This should be used to indicate the {@link NotebookController notebook controller} is busy even though user may not have executed any cell though the UI.
|
|
1653
|
-
* @param {NotebookDocument} notebook
|
|
1654
|
-
* @returns A notebook execution.
|
|
1655
|
-
*/
|
|
1656
|
-
createNotebookExecution(notebook: NotebookDocument): NotebookExecution;
|
|
1657
|
-
}
|
|
1658
|
-
|
|
1659
|
-
interface NotebookController {
|
|
1660
|
-
|
|
1661
|
-
// todo@API allow add, not remove
|
|
1662
|
-
readonly rendererScripts: NotebookRendererScript[];
|
|
1663
|
-
|
|
1664
|
-
/**
|
|
1665
|
-
* An event that fires when a {@link NotebookController.rendererScripts renderer script} has send a message to
|
|
1666
|
-
* the controller.
|
|
1667
|
-
*/
|
|
1668
|
-
readonly onDidReceiveMessage: Event<{ readonly editor: NotebookEditor; readonly message: any }>;
|
|
1669
|
-
|
|
1670
|
-
/**
|
|
1671
|
-
* Send a message to the renderer of notebook editors.
|
|
1672
|
-
*
|
|
1673
|
-
* Note that only editors showing documents that are bound to this controller
|
|
1674
|
-
* are receiving the message.
|
|
1675
|
-
*
|
|
1676
|
-
* @param message The message to send.
|
|
1677
|
-
* @param editor A specific editor to send the message to. When `undefined` all applicable editors are receiving the message.
|
|
1678
|
-
* @returns A promise that resolves to a boolean indicating if the message has been send or not.
|
|
1679
|
-
*/
|
|
1680
|
-
postMessage(message: any, editor?: NotebookEditor): Thenable<boolean>;
|
|
1681
|
-
|
|
1682
|
-
//todo@API validate this works
|
|
1683
|
-
asWebviewUri(localResource: Uri): Uri;
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
declare namespace notebooks {
|
|
1687
|
-
|
|
1688
|
-
/**
|
|
1689
|
-
* An {@link Event} which fires when the execution state of a cell has changed.
|
|
1690
|
-
*/
|
|
1691
|
-
// todo@API this is an event that is fired for a property that cells don't have and that makes me wonder
|
|
1692
|
-
// how a correct consumer works, e.g the consumer could have been late and missed an event?
|
|
1693
|
-
export const onDidChangeNotebookCellExecutionState: Event<NotebookCellExecutionStateChangeEvent>;
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
declare namespace notebooks {
|
|
1697
|
-
/**
|
|
1698
|
-
* Create notebook controller detection task
|
|
1699
|
-
*/
|
|
1700
|
-
export function createNotebookControllerDetectionTask(notebookType: string): NotebookControllerDetectionTask;
|
|
1701
|
-
|
|
1702
|
-
/**
|
|
1703
|
-
* Register a notebook kernel source action provider
|
|
1704
|
-
*/
|
|
1705
|
-
export function registerKernelSourceActionProvider(notebookType: string, provider: NotebookKernelSourceActionProvider): Disposable;
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
declare namespace notebooks {
|
|
1709
|
-
|
|
1710
|
-
export function createNotebookController(id: string, viewType: string, label: string, handler?: (cells: NotebookCell[], notebook: NotebookDocument, controller: NotebookController) => void | Thenable<void>, rendererScripts?: NotebookRendererScript[]): NotebookController;
|
|
1711
|
-
}
|
|
1712
|
-
// https://github.com/microsoft/vscode/issues/126280 @mjbvz
|
|
1713
|
-
|
|
1714
|
-
interface NotebookCellData {
|
|
1715
|
-
/**
|
|
1716
|
-
* Mime type determines how the cell's `value` is interpreted.
|
|
1717
|
-
*
|
|
1718
|
-
* The mime selects which notebook renders is used to render the cell.
|
|
1719
|
-
*
|
|
1720
|
-
* If not set, internally the cell is treated as having a mime type of `text/plain`.
|
|
1721
|
-
* Cells that set `language` to `markdown` instead are treated as `text/markdown`.
|
|
1722
|
-
*/
|
|
1723
|
-
mime?: string;
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
interface NotebookCell {
|
|
1727
|
-
/**
|
|
1728
|
-
* Mime type determines how the markup cell's `value` is interpreted.
|
|
1729
|
-
*
|
|
1730
|
-
* The mime selects which notebook renders is used to render the cell.
|
|
1731
|
-
*
|
|
1732
|
-
* If not set, internally the cell is treated as having a mime type of `text/plain`.
|
|
1733
|
-
* Cells that set `language` to `markdown` instead are treated as `text/markdown`.
|
|
1734
|
-
*/
|
|
1735
|
-
mime: string | undefined;
|
|
1736
|
-
}
|
|
1737
|
-
// https://github.com/microsoft/vscode/issues/115616 @alexr00
|
|
1738
|
-
|
|
1739
|
-
/**
|
|
1740
|
-
* The action that should be taken when a port is discovered through automatic port forwarding discovery.
|
|
1741
|
-
*/
|
|
1742
|
-
declare enum PortAutoForwardAction {
|
|
1743
|
-
/**
|
|
1744
|
-
* Notify the user that the port is being forwarded. This is the default action.
|
|
1745
|
-
*/
|
|
1746
|
-
Notify = 1,
|
|
1747
|
-
/**
|
|
1748
|
-
* Once the port is forwarded, open the user's web browser to the forwarded port.
|
|
1749
|
-
*/
|
|
1750
|
-
OpenBrowser = 2,
|
|
1751
|
-
/**
|
|
1752
|
-
* Once the port is forwarded, open the preview browser to the forwarded port.
|
|
1753
|
-
*/
|
|
1754
|
-
OpenPreview = 3,
|
|
1755
|
-
/**
|
|
1756
|
-
* Forward the port silently.
|
|
1757
|
-
*/
|
|
1758
|
-
Silent = 4,
|
|
1759
|
-
/**
|
|
1760
|
-
* Do not forward the port.
|
|
1761
|
-
*/
|
|
1762
|
-
Ignore = 5
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
/**
|
|
1766
|
-
* The attributes that a forwarded port can have.
|
|
1767
|
-
*/
|
|
1768
|
-
declare class PortAttributes {
|
|
1769
|
-
/**
|
|
1770
|
-
* The action to be taken when this port is detected for auto forwarding.
|
|
1771
|
-
*/
|
|
1772
|
-
autoForwardAction: PortAutoForwardAction;
|
|
1773
|
-
|
|
1774
|
-
/**
|
|
1775
|
-
* Creates a new PortAttributes object
|
|
1776
|
-
* @param port the port number
|
|
1777
|
-
* @param autoForwardAction the action to take when this port is detected
|
|
1778
|
-
*/
|
|
1779
|
-
constructor(autoForwardAction: PortAutoForwardAction);
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
/**
|
|
1783
|
-
* A provider of port attributes. Port attributes are used to determine what action should be taken when a port is discovered.
|
|
1784
|
-
*/
|
|
1785
|
-
interface PortAttributesProvider {
|
|
1786
|
-
/**
|
|
1787
|
-
* Provides attributes for the given port. For ports that your extension doesn't know about, simply
|
|
1788
|
-
* return undefined. For example, if `providePortAttributes` is called with ports 3000 but your
|
|
1789
|
-
* extension doesn't know anything about 3000 you should return undefined.
|
|
1790
|
-
* @param port The port number of the port that attributes are being requested for.
|
|
1791
|
-
* @param pid The pid of the process that is listening on the port. If the pid is unknown, undefined will be passed.
|
|
1792
|
-
* @param commandLine The command line of the process that is listening on the port. If the command line is unknown, undefined will be passed.
|
|
1793
|
-
* @param token A cancellation token that indicates the result is no longer needed.
|
|
1794
|
-
*/
|
|
1795
|
-
providePortAttributes(attributes: { port: number; pid?: number; commandLine?: string }, token: CancellationToken): ProviderResult<PortAttributes>;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
/**
|
|
1799
|
-
* A selector that will be used to filter which {@link PortAttributesProvider} should be called for each port.
|
|
1800
|
-
*/
|
|
1801
|
-
interface PortAttributesSelector {
|
|
1802
|
-
/**
|
|
1803
|
-
* Specifying a port range will cause your provider to only be called for ports within the range.
|
|
1804
|
-
* The start is inclusive and the end is exclusive.
|
|
1805
|
-
*/
|
|
1806
|
-
portRange?: [number, number] | number;
|
|
1807
|
-
|
|
1808
|
-
/**
|
|
1809
|
-
* Specifying a command pattern will cause your provider to only be called for processes whose command line matches the pattern.
|
|
1810
|
-
*/
|
|
1811
|
-
commandPattern?: RegExp;
|
|
1812
|
-
}
|
|
1813
|
-
interface ProfileContentHandler {
|
|
1814
|
-
readonly name: string;
|
|
1815
|
-
readonly description?: string;
|
|
1816
|
-
saveProfile(name: string, content: string, token: CancellationToken): Thenable<{ readonly id: string; readonly link: Uri } | null>;
|
|
1817
|
-
readProfile(idOrUri: string | Uri, token: CancellationToken): Thenable<string | null>;
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
interface QuickDiffProvider {
|
|
1821
|
-
label?: string;
|
|
1822
|
-
}
|
|
1823
|
-
// https://github.com/microsoft/vscode/issues/175662
|
|
1824
|
-
|
|
1825
|
-
interface QuickPickItem {
|
|
1826
|
-
/**
|
|
1827
|
-
* A tooltip that is rendered when hovering over the item.
|
|
1828
|
-
*/
|
|
1829
|
-
tooltip?: string | MarkdownString;
|
|
1830
|
-
}
|
|
1831
|
-
// https://github.com/microsoft/vscode/issues/73904
|
|
1832
|
-
|
|
1833
|
-
interface QuickPick<T extends QuickPickItem> extends QuickInput {
|
|
1834
|
-
/**
|
|
1835
|
-
* An optional flag to sort the final results by index of first query match in label. Defaults to true.
|
|
1836
|
-
*/
|
|
1837
|
-
sortByLabel: boolean;
|
|
1838
|
-
}
|
|
1839
|
-
//resolvers: @alexdima
|
|
1840
|
-
|
|
1841
|
-
interface MessageOptions {
|
|
1842
|
-
/**
|
|
1843
|
-
* Do not render a native message box.
|
|
1844
|
-
*/
|
|
1845
|
-
useCustom?: boolean;
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
interface RemoteAuthorityResolverContext {
|
|
1849
|
-
resolveAttempt: number;
|
|
1850
|
-
/**
|
|
1851
|
-
* Exec server from a recursively-resolved remote authority. If the
|
|
1852
|
-
* remote authority includes nested authorities delimited by `@`, it is
|
|
1853
|
-
* resolved from outer to inner authorities with ExecServer passed down
|
|
1854
|
-
* to each resolver in the chain.
|
|
1855
|
-
*/
|
|
1856
|
-
execServer?: ExecServer;
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
|
-
declare class ResolvedAuthority {
|
|
1860
|
-
readonly host: string;
|
|
1861
|
-
readonly port: number;
|
|
1862
|
-
readonly connectionToken: string | undefined;
|
|
1863
|
-
|
|
1864
|
-
constructor(host: string, port: number, connectionToken?: string);
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
interface ManagedMessagePassing {
|
|
1868
|
-
onDidReceiveMessage: Event<Uint8Array>;
|
|
1869
|
-
onDidClose: Event<Error | undefined>;
|
|
1870
|
-
onDidEnd: Event<void>;
|
|
1871
|
-
|
|
1872
|
-
send: (data: Uint8Array) => void;
|
|
1873
|
-
end: () => void;
|
|
1874
|
-
drain?: () => Thenable<void>;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
declare class ManagedResolvedAuthority {
|
|
1878
|
-
readonly makeConnection: () => Thenable<ManagedMessagePassing>;
|
|
1879
|
-
readonly connectionToken: string | undefined;
|
|
1880
|
-
|
|
1881
|
-
constructor(makeConnection: () => Thenable<ManagedMessagePassing>, connectionToken?: string);
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
interface ResolvedOptions {
|
|
1885
|
-
extensionHostEnv?: { [key: string]: string | null };
|
|
1886
|
-
|
|
1887
|
-
isTrusted?: boolean;
|
|
1888
|
-
|
|
1889
|
-
/**
|
|
1890
|
-
* When provided, remote server will be initialized with the extensions synced using the given user account.
|
|
1891
|
-
*/
|
|
1892
|
-
authenticationSessionForInitializingExtensions?: AuthenticationSession & { providerId: string };
|
|
1893
|
-
}
|
|
1894
|
-
|
|
1895
|
-
interface TunnelPrivacy {
|
|
1896
|
-
themeIcon: string;
|
|
1897
|
-
id: string;
|
|
1898
|
-
label: string;
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
interface TunnelCreationOptions {
|
|
1902
|
-
/**
|
|
1903
|
-
* True when the local operating system will require elevation to use the requested local port.
|
|
1904
|
-
*/
|
|
1905
|
-
elevationRequired?: boolean;
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
declare enum CandidatePortSource {
|
|
1909
|
-
None = 0,
|
|
1910
|
-
Process = 1,
|
|
1911
|
-
Output = 2
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
type ResolverResult = (ResolvedAuthority | ManagedResolvedAuthority) & ResolvedOptions & TunnelInformation;
|
|
1915
|
-
|
|
1916
|
-
declare class RemoteAuthorityResolverError extends Error {
|
|
1917
|
-
static NotAvailable(message?: string, handled?: boolean): RemoteAuthorityResolverError;
|
|
1918
|
-
static TemporarilyNotAvailable(message?: string): RemoteAuthorityResolverError;
|
|
1919
|
-
|
|
1920
|
-
constructor(message?: string);
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
/**
|
|
1924
|
-
* An ExecServer allows spawning processes on a remote machine. An ExecServer is provided by resolvers. It can be
|
|
1925
|
-
* acquired by `workspace.getRemoteExecServer` or from the context when in a resolver (`RemoteAuthorityResolverContext.execServer`).
|
|
1926
|
-
*/
|
|
1927
|
-
interface ExecServer {
|
|
1928
|
-
/**
|
|
1929
|
-
* Spawns a given subprocess with the given command and arguments.
|
|
1930
|
-
* @param command The command to execute.
|
|
1931
|
-
* @param args The arguments to pass to the command.
|
|
1932
|
-
* @param options Additional options for the spawned process.
|
|
1933
|
-
* @returns A promise that gives access to the process' stdin, stdout and stderr streams, as well as the process' exit code.
|
|
1934
|
-
*/
|
|
1935
|
-
spawn(command: string, args: string[], options?: ExecServerSpawnOptions): Thenable<SpawnedCommand>;
|
|
1936
|
-
|
|
1937
|
-
/**
|
|
1938
|
-
* Spawns an connector that allows to start a remote server. It is assumed the command starts a Code CLI. Additional
|
|
1939
|
-
* arguments will be passed to the connector.
|
|
1940
|
-
* @param command The command to execute. It is assumed the command spawns a Code CLI executable.
|
|
1941
|
-
* @param args The arguments to pass to the connector
|
|
1942
|
-
* @param options Additional options for the spawned process.
|
|
1943
|
-
* @returns A promise that gives access to the spawned {@link RemoteServerConnector}. It also provides a stream to which standard
|
|
1944
|
-
* log messages are written.
|
|
1945
|
-
*/
|
|
1946
|
-
spawnRemoteServerConnector?(command: string, args: string[], options?: ExecServerSpawnOptions): Thenable<RemoteServerConnector>;
|
|
1947
|
-
|
|
1948
|
-
/**
|
|
1949
|
-
* Downloads the CLI executable of the desired platform and quality and pipes it to the
|
|
1950
|
-
* provided process' stdin.
|
|
1951
|
-
* @param buildTarget The CLI build target to download.
|
|
1952
|
-
* @param command The command to execute. The downloaded bits will be piped to the command's stdin.
|
|
1953
|
-
* @param args The arguments to pass to the command.
|
|
1954
|
-
* @param options Additional options for the spawned process.
|
|
1955
|
-
* @returns A promise that resolves when the process exits with a {@link ProcessExit} object.
|
|
1956
|
-
*/
|
|
1957
|
-
downloadCliExecutable?(buildTarget: CliBuild, command: string, args: string[], options?: ExecServerSpawnOptions): Thenable<ProcessExit>;
|
|
1958
|
-
|
|
1959
|
-
/**
|
|
1960
|
-
* Gets the environment where the exec server is running.
|
|
1961
|
-
* @returns A promise that resolves to an {@link ExecEnvironment} object.
|
|
1962
|
-
*/
|
|
1963
|
-
env(): Thenable<ExecEnvironment>;
|
|
1964
|
-
|
|
1965
|
-
/**
|
|
1966
|
-
* Access to the file system of the remote.
|
|
1967
|
-
*/
|
|
1968
|
-
readonly fs: RemoteFileSystem;
|
|
1969
|
-
}
|
|
1970
|
-
|
|
1971
|
-
type ProcessEnv = Record<string, string>;
|
|
1972
|
-
|
|
1973
|
-
interface ExecServerSpawnOptions {
|
|
1974
|
-
readonly env?: ProcessEnv;
|
|
1975
|
-
readonly cwd?: string;
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
interface SpawnedCommand {
|
|
1979
|
-
readonly stdin: WriteStream;
|
|
1980
|
-
readonly stdout: ReadStream;
|
|
1981
|
-
readonly stderr: ReadStream;
|
|
1982
|
-
readonly onExit: Thenable<ProcessExit>;
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
interface RemoteServerConnector {
|
|
1986
|
-
readonly logs: ReadStream;
|
|
1987
|
-
readonly onExit: Thenable<ProcessExit>;
|
|
1988
|
-
/**
|
|
1989
|
-
* Connect to a new code server, returning a stream that can be used to communicate with it.
|
|
1990
|
-
* @param params The parameters for the code server.
|
|
1991
|
-
* @returns A promise that resolves to a {@link ManagedMessagePassing} object that can be used with a resolver
|
|
1992
|
-
*/
|
|
1993
|
-
connect(params: ServeParams): Thenable<ManagedMessagePassing>;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
interface ProcessExit {
|
|
1997
|
-
readonly status: number;
|
|
1998
|
-
readonly message?: string;
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
interface ReadStream {
|
|
2002
|
-
readonly onDidReceiveMessage: Event<Uint8Array>;
|
|
2003
|
-
readonly onEnd: Thenable<void>;
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
interface WriteStream {
|
|
2007
|
-
write(data: Uint8Array): void;
|
|
2008
|
-
end(): void;
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
interface ServeParams {
|
|
2012
|
-
readonly socketId: number;
|
|
2013
|
-
readonly commit?: string;
|
|
2014
|
-
readonly quality: string;
|
|
2015
|
-
readonly extensions: string[];
|
|
2016
|
-
/** Whether server traffic should be compressed. */
|
|
2017
|
-
readonly compress?: boolean;
|
|
2018
|
-
/** Optional explicit connection token for the server. */
|
|
2019
|
-
readonly connectionToken?: string;
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
interface CliBuild {
|
|
2023
|
-
readonly quality: string;
|
|
2024
|
-
/** 'LinuxAlpineX64' | 'LinuxX64' | 'LinuxARM64' | 'LinuxARM32' | 'DarwinX64' | 'DarwinARM64' | 'WindowsX64' | 'WindowsX86' | 'WindowsARM64' */
|
|
2025
|
-
readonly buildTarget: string;
|
|
2026
|
-
readonly commit: string;
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
interface ExecEnvironment {
|
|
2030
|
-
readonly env: ProcessEnv;
|
|
2031
|
-
/** 'darwin' | 'linux' | 'win32' */
|
|
2032
|
-
readonly osPlatform: string;
|
|
2033
|
-
/** uname.version or windows version number, undefined if it could not be read. */
|
|
2034
|
-
readonly osRelease?: string;
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
interface RemoteFileSystem {
|
|
2038
|
-
/**
|
|
2039
|
-
* Retrieve metadata about a file.
|
|
2040
|
-
*
|
|
2041
|
-
* @param path The path of the file to retrieve metadata about.
|
|
2042
|
-
* @returns The file metadata about the file.
|
|
2043
|
-
* @throws an exception when `path` doesn't exist.
|
|
2044
|
-
*/
|
|
2045
|
-
stat(path: string): Thenable<FileStat>;
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
|
-
interface RemoteAuthorityResolver {
|
|
2049
|
-
/**
|
|
2050
|
-
* Resolve the authority part of the current opened `vscode-remote://` URI.
|
|
2051
|
-
*
|
|
2052
|
-
* This method will be invoked once during the startup of the editor and again each time
|
|
2053
|
-
* the editor detects a disconnection.
|
|
2054
|
-
*
|
|
2055
|
-
* @param authority The authority part of the current opened `vscode-remote://` URI.
|
|
2056
|
-
* @param context A context indicating if this is the first call or a subsequent call.
|
|
2057
|
-
*/
|
|
2058
|
-
resolve(authority: string, context: RemoteAuthorityResolverContext): ResolverResult | Thenable<ResolverResult>;
|
|
2059
|
-
|
|
2060
|
-
/**
|
|
2061
|
-
* Resolves an exec server interface for the authority. Called if an
|
|
2062
|
-
* authority is a midpoint in a transit to the desired remote.
|
|
2063
|
-
*
|
|
2064
|
-
* @param authority The authority part of the current opened `vscode-remote://` URI.
|
|
2065
|
-
* @returns The exec server interface, as defined in a contract between extensions.
|
|
2066
|
-
*/
|
|
2067
|
-
resolveExecServer?(remoteAuthority: string, context: RemoteAuthorityResolverContext): ExecServer | Thenable<ExecServer>;
|
|
2068
|
-
|
|
2069
|
-
/**
|
|
2070
|
-
* Get the canonical URI (if applicable) for a `vscode-remote://` URI.
|
|
2071
|
-
*
|
|
2072
|
-
* @returns The canonical URI or undefined if the uri is already canonical.
|
|
2073
|
-
*/
|
|
2074
|
-
getCanonicalURI?(uri: Uri): ProviderResult<Uri>;
|
|
2075
|
-
|
|
2076
|
-
/**
|
|
2077
|
-
* Can be optionally implemented if the extension can forward ports better than the core.
|
|
2078
|
-
* When not implemented, the core will use its default forwarding logic.
|
|
2079
|
-
* When implemented, the core will use this to forward ports.
|
|
2080
|
-
*
|
|
2081
|
-
* To enable the "Change Local Port" action on forwarded ports, make sure to set the `localAddress` of
|
|
2082
|
-
* the returned `Tunnel` to a `{ port: number, host: string; }` and not a string.
|
|
2083
|
-
*/
|
|
2084
|
-
tunnelFactory?: (tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions) => Thenable<Tunnel> | undefined;
|
|
2085
|
-
|
|
2086
|
-
/**p
|
|
2087
|
-
* Provides filtering for candidate ports.
|
|
2088
|
-
*/
|
|
2089
|
-
showCandidatePort?: (host: string, port: number, detail: string) => Thenable<boolean>;
|
|
2090
|
-
|
|
2091
|
-
/**
|
|
2092
|
-
* @deprecated Return tunnelFeatures as part of the resolver result in tunnelInformation.
|
|
2093
|
-
*/
|
|
2094
|
-
tunnelFeatures?: {
|
|
2095
|
-
elevation: boolean;
|
|
2096
|
-
public: boolean;
|
|
2097
|
-
privacyOptions: TunnelPrivacy[];
|
|
2098
|
-
};
|
|
2099
|
-
|
|
2100
|
-
candidatePortSource?: CandidatePortSource;
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
interface ResourceLabelFormatter {
|
|
2104
|
-
scheme: string;
|
|
2105
|
-
authority?: string;
|
|
2106
|
-
formatting: ResourceLabelFormatting;
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
|
-
interface ResourceLabelFormatting {
|
|
2110
|
-
label: string; // myLabel:/${path}
|
|
2111
|
-
// For historic reasons we use an or string here. Once we finalize this API we should start using enums instead and adopt it in extensions.
|
|
2112
|
-
// eslint-disable-next-line local/vscode-dts-literal-or-types, local/vscode-dts-string-type-literals
|
|
2113
|
-
separator: '/' | '\\' | '';
|
|
2114
|
-
tildify?: boolean;
|
|
2115
|
-
normalizeDriveLetter?: boolean;
|
|
2116
|
-
workspaceSuffix?: string;
|
|
2117
|
-
workspaceTooltip?: string;
|
|
2118
|
-
authorityPrefix?: string;
|
|
2119
|
-
stripPathStartingSeparator?: boolean;
|
|
2120
|
-
}
|
|
2121
|
-
// https://github.com/microsoft/vscode/issues/133935
|
|
2122
|
-
|
|
2123
|
-
interface SourceControlActionButton {
|
|
2124
|
-
command: Command;
|
|
2125
|
-
secondaryCommands?: Command[][];
|
|
2126
|
-
description?: string;
|
|
2127
|
-
enabled: boolean;
|
|
2128
|
-
}
|
|
2129
|
-
|
|
2130
|
-
interface SourceControlHistoryProvider {
|
|
2131
|
-
actionButton?: SourceControlActionButton;
|
|
2132
|
-
currentHistoryItemGroup?: SourceControlHistoryItemGroup;
|
|
2133
|
-
|
|
2134
|
-
/**
|
|
2135
|
-
* Fires when the action button changes
|
|
2136
|
-
*/
|
|
2137
|
-
onDidChangeActionButton: Event<void>;
|
|
2138
|
-
|
|
2139
|
-
/**
|
|
2140
|
-
* Fires when the current history item group changes (ex: checkout)
|
|
2141
|
-
*/
|
|
2142
|
-
onDidChangeCurrentHistoryItemGroup: Event<void>;
|
|
2143
|
-
|
|
2144
|
-
/**
|
|
2145
|
-
* Fires when the history item groups change (ex: commit, push, fetch)
|
|
2146
|
-
*/
|
|
2147
|
-
// onDidChangeHistoryItemGroups: Event<SourceControlHistoryChangeEvent>;
|
|
2148
|
-
|
|
2149
|
-
provideHistoryItems(historyItemGroupId: string, options: SourceControlHistoryOptions, token: CancellationToken): ProviderResult<SourceControlHistoryItem[]>;
|
|
2150
|
-
provideHistoryItemChanges(historyItemId: string, token: CancellationToken): ProviderResult<SourceControlHistoryItemChange[]>;
|
|
2151
|
-
|
|
2152
|
-
resolveHistoryItemGroupBase(historyItemGroupId: string, token: CancellationToken): ProviderResult<SourceControlHistoryItemGroup | undefined>;
|
|
2153
|
-
resolveHistoryItemGroupCommonAncestor(historyItemGroupId1: string, historyItemGroupId: string, token: CancellationToken): ProviderResult<{ id: string; ahead: number; behind: number }>;
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
interface SourceControlHistoryOptions {
|
|
2157
|
-
readonly cursor?: string;
|
|
2158
|
-
readonly limit?: number | { id?: string };
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
interface SourceControlHistoryItemGroup {
|
|
2162
|
-
readonly id: string;
|
|
2163
|
-
readonly label: string;
|
|
2164
|
-
readonly upstream?: SourceControlRemoteHistoryItemGroup;
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
interface SourceControlRemoteHistoryItemGroup {
|
|
2168
|
-
readonly id: string;
|
|
2169
|
-
readonly label: string;
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
interface SourceControlHistoryItem {
|
|
2173
|
-
readonly id: string;
|
|
2174
|
-
readonly parentIds: string[];
|
|
2175
|
-
readonly label: string;
|
|
2176
|
-
readonly description?: string;
|
|
2177
|
-
readonly icon?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
|
|
2178
|
-
readonly timestamp?: number;
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
interface SourceControlHistoryItemChange {
|
|
2182
|
-
readonly uri: Uri;
|
|
2183
|
-
readonly originalUri: Uri | undefined;
|
|
2184
|
-
readonly modifiedUri: Uri | undefined;
|
|
2185
|
-
readonly renameUri: Uri | undefined;
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
interface SourceControl {
|
|
2189
|
-
actionButton?: SourceControlActionButton;
|
|
2190
|
-
}
|
|
2191
|
-
// https://github.com/microsoft/vscode/issues/185269
|
|
2192
|
-
|
|
2193
|
-
interface SourceControl {
|
|
2194
|
-
historyProvider?: SourceControlHistoryProvider;
|
|
2195
|
-
}
|
|
2196
|
-
// todo@joaomoreno add issue reference
|
|
2197
|
-
|
|
2198
|
-
interface SourceControl {
|
|
2199
|
-
|
|
2200
|
-
/**
|
|
2201
|
-
* Whether the source control is selected.
|
|
2202
|
-
*/
|
|
2203
|
-
readonly selected: boolean;
|
|
2204
|
-
|
|
2205
|
-
/**
|
|
2206
|
-
* An event signaling when the selection state changes.
|
|
2207
|
-
*/
|
|
2208
|
-
readonly onDidChangeSelection: Event<boolean>;
|
|
2209
|
-
}
|
|
2210
|
-
// todo@joaomoreno add issue reference
|
|
2211
|
-
|
|
2212
|
-
/**
|
|
2213
|
-
* Represents the validation type of the Source Control input.
|
|
2214
|
-
*/
|
|
2215
|
-
declare enum SourceControlInputBoxValidationType {
|
|
2216
|
-
|
|
2217
|
-
/**
|
|
2218
|
-
* Something not allowed by the rules of a language or other means.
|
|
2219
|
-
*/
|
|
2220
|
-
Error = 0,
|
|
2221
|
-
|
|
2222
|
-
/**
|
|
2223
|
-
* Something suspicious but allowed.
|
|
2224
|
-
*/
|
|
2225
|
-
Warning = 1,
|
|
2226
|
-
|
|
2227
|
-
/**
|
|
2228
|
-
* Something to inform about but not a problem.
|
|
2229
|
-
*/
|
|
2230
|
-
Information = 2
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
|
-
interface SourceControlInputBoxValidation {
|
|
2234
|
-
|
|
2235
|
-
/**
|
|
2236
|
-
* The validation message to display.
|
|
2237
|
-
*/
|
|
2238
|
-
readonly message: string | MarkdownString;
|
|
2239
|
-
|
|
2240
|
-
/**
|
|
2241
|
-
* The validation type.
|
|
2242
|
-
*/
|
|
2243
|
-
readonly type: SourceControlInputBoxValidationType;
|
|
2244
|
-
}
|
|
2245
|
-
// https://github.com/microsoft/vscode/issues/166615
|
|
2246
|
-
|
|
2247
|
-
/**
|
|
2248
|
-
* Represents the input box in the Source Control viewlet.
|
|
2249
|
-
*/
|
|
2250
|
-
interface SourceControlInputBox {
|
|
2251
|
-
|
|
2252
|
-
/**
|
|
2253
|
-
* The {@link TextDocument text} of the input box.
|
|
2254
|
-
*/
|
|
2255
|
-
readonly document: TextDocument;
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
|
-
/**
|
|
2259
|
-
* Represents the input box in the Source Control viewlet.
|
|
2260
|
-
*/
|
|
2261
|
-
interface SourceControlInputBox {
|
|
2262
|
-
|
|
2263
|
-
/**
|
|
2264
|
-
* Shows a transient contextual message on the input.
|
|
2265
|
-
*/
|
|
2266
|
-
showValidationMessage(message: string | MarkdownString, type: SourceControlInputBoxValidationType): void;
|
|
2267
|
-
|
|
2268
|
-
/**
|
|
2269
|
-
* A validation function for the input box. It's possible to change
|
|
2270
|
-
* the validation provider simply by setting this property to a different function.
|
|
2271
|
-
*/
|
|
2272
|
-
validateInput?(value: string, cursorPosition: number): ProviderResult<SourceControlInputBoxValidation>;
|
|
2273
|
-
}
|
|
2274
|
-
/**
|
|
2275
|
-
* Data about an item which can be shared.
|
|
2276
|
-
*/
|
|
2277
|
-
interface ShareableItem {
|
|
2278
|
-
/**
|
|
2279
|
-
* A resource in the workspace that can be shared.
|
|
2280
|
-
*/
|
|
2281
|
-
resourceUri: Uri;
|
|
2282
|
-
|
|
2283
|
-
/**
|
|
2284
|
-
* If present, a selection within the `resourceUri`.
|
|
2285
|
-
*/
|
|
2286
|
-
selection?: Range;
|
|
2287
|
-
}
|
|
2288
|
-
|
|
2289
|
-
/**
|
|
2290
|
-
* A provider which generates share links for resources in the editor.
|
|
2291
|
-
*/
|
|
2292
|
-
interface ShareProvider {
|
|
2293
|
-
|
|
2294
|
-
/**
|
|
2295
|
-
* A unique ID for the provider.
|
|
2296
|
-
* This will be used to activate specific extensions contributing share providers if necessary.
|
|
2297
|
-
*/
|
|
2298
|
-
readonly id: string;
|
|
2299
|
-
|
|
2300
|
-
/**
|
|
2301
|
-
* A label which will be used to present this provider's options in the UI.
|
|
2302
|
-
*/
|
|
2303
|
-
readonly label: string;
|
|
2304
|
-
|
|
2305
|
-
/**
|
|
2306
|
-
* The order in which the provider should be listed in the UI when there are multiple providers.
|
|
2307
|
-
*/
|
|
2308
|
-
readonly priority: number;
|
|
2309
|
-
|
|
2310
|
-
/**
|
|
2311
|
-
*
|
|
2312
|
-
* @param item Data about an item which can be shared.
|
|
2313
|
-
* @param token A cancellation token.
|
|
2314
|
-
* @returns A {@link Uri} representing an external link or sharing text. The provider result
|
|
2315
|
-
* will be copied to the user's clipboard and presented in a confirmation dialog.
|
|
2316
|
-
*/
|
|
2317
|
-
provideShare(item: ShareableItem, token: CancellationToken): ProviderResult<Uri | string>;
|
|
2318
|
-
}
|
|
2319
|
-
|
|
2320
|
-
interface TreeItem {
|
|
2321
|
-
|
|
2322
|
-
/**
|
|
2323
|
-
* An optional property which, when set, inlines a `Share` option in the context menu for this tree item.
|
|
2324
|
-
*/
|
|
2325
|
-
shareableItem?: ShareableItem;
|
|
2326
|
-
}
|
|
2327
|
-
interface OpenDialogOptions {
|
|
2328
|
-
/**
|
|
2329
|
-
* Controls whether the dialog allows users to select local files via the "Show Local" button.
|
|
2330
|
-
* Extensions that set this to `true` should check the scheme of the selected file.
|
|
2331
|
-
* Resources with the `file` scheme come from the same extension host as the extension.
|
|
2332
|
-
* Resources with the `vscode-local` scheme come from an extension host running in the same place as the UI.
|
|
2333
|
-
*/
|
|
2334
|
-
allowUIResources?: boolean;
|
|
2335
|
-
}
|
|
2336
|
-
declare class TabInputTextMerge {
|
|
2337
|
-
|
|
2338
|
-
readonly base: Uri;
|
|
2339
|
-
readonly input1: Uri;
|
|
2340
|
-
readonly input2: Uri;
|
|
2341
|
-
readonly result: Uri;
|
|
2342
|
-
|
|
2343
|
-
constructor(base: Uri, input1: Uri, input2: Uri, result: Uri);
|
|
2344
|
-
}
|
|
2345
|
-
|
|
2346
|
-
interface Tab {
|
|
2347
|
-
readonly input: TabInputText | TabInputTextDiff | TabInputCustom | TabInputWebview | TabInputNotebook | TabInputNotebookDiff | TabInputTerminal | TabInputInteractiveWindow | unknown;
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
interface Tab {
|
|
2351
|
-
|
|
2352
|
-
readonly input: TabInputText | TabInputTextDiff | TabInputTextMerge | TabInputCustom | TabInputWebview | TabInputNotebook | TabInputNotebookDiff | TabInputTerminal | unknown;
|
|
2353
|
-
|
|
2354
|
-
}
|
|
2355
|
-
// https://github.com/microsoft/vscode/issues/47265
|
|
2356
|
-
|
|
2357
|
-
interface TaskPresentationOptions {
|
|
2358
|
-
/**
|
|
2359
|
-
* Controls whether the task is executed in a specific terminal group using split panes.
|
|
2360
|
-
*/
|
|
2361
|
-
group?: string;
|
|
2362
|
-
}
|
|
2363
|
-
interface TelemetryConfiguration {
|
|
2364
|
-
/**
|
|
2365
|
-
* Whether or not usage telemetry collection is allowed
|
|
2366
|
-
*/
|
|
2367
|
-
readonly isUsageEnabled: boolean;
|
|
2368
|
-
/**
|
|
2369
|
-
* Whether or not crash error telemetry collection is allowed
|
|
2370
|
-
*/
|
|
2371
|
-
readonly isErrorsEnabled: boolean;
|
|
2372
|
-
/**
|
|
2373
|
-
* Whether or not crash report collection is allowed
|
|
2374
|
-
*/
|
|
2375
|
-
readonly isCrashEnabled: boolean;
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
|
-
declare namespace env {
|
|
2379
|
-
export function openExternal(target: Uri, options?: OpenExternalOptions): Thenable<boolean>;
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
|
-
declare namespace env {
|
|
2383
|
-
/**
|
|
2384
|
-
* Register an {@link IssueUriRequestHandler}. By registering an issue uri request handler,
|
|
2385
|
-
* you can direct the built-in issue reporter to your issue reporting web experience of choice.
|
|
2386
|
-
* The Uri that the handler returns will be opened in the user's browser.
|
|
2387
|
-
*
|
|
2388
|
-
* Examples of this include:
|
|
2389
|
-
* - Using GitHub Issue Forms or GitHub Discussions you can pre-fill the issue creation with relevant information from the current workspace using query parameters
|
|
2390
|
-
* - Directing to a different web form that isn't on GitHub for reporting issues
|
|
2391
|
-
*
|
|
2392
|
-
* @param handler the issue uri request handler to register for this extension.
|
|
2393
|
-
*/
|
|
2394
|
-
export function registerIssueUriRequestHandler(handler: IssueUriRequestHandler): Disposable;
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
declare namespace env {
|
|
2398
|
-
/** Quality of the application. May be undefined if running from sources. */
|
|
2399
|
-
export const appQuality: string | undefined;
|
|
2400
|
-
/** Commit of the application. May be undefined if running from sources. */
|
|
2401
|
-
export const appCommit: string | undefined;
|
|
2402
|
-
}
|
|
2403
|
-
|
|
2404
|
-
declare namespace env {
|
|
2405
|
-
|
|
2406
|
-
/**
|
|
2407
|
-
* The authority part of the current opened `vscode-remote://` URI.
|
|
2408
|
-
* Defined by extensions, e.g. `ssh-remote+${host}` for remotes using a secure shell.
|
|
2409
|
-
*
|
|
2410
|
-
* *Note* that the value is `undefined` when there is no remote extension host but that the
|
|
2411
|
-
* value is defined in all extension hosts (local and remote) in case a remote extension host
|
|
2412
|
-
* exists. Use {@link Extension.extensionKind} to know if
|
|
2413
|
-
* a specific extension runs remote or not.
|
|
2414
|
-
*/
|
|
2415
|
-
export const remoteAuthority: string | undefined;
|
|
2416
|
-
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
declare namespace env {
|
|
2420
|
-
/**
|
|
2421
|
-
* Indicates what telemetry is enabled / disabled
|
|
2422
|
-
* Can be observed to determine what telemetry the extension is allowed to send
|
|
2423
|
-
*/
|
|
2424
|
-
export const telemetryConfiguration: TelemetryConfiguration;
|
|
2425
|
-
|
|
2426
|
-
/**
|
|
2427
|
-
* An {@link Event} which fires when the collectable state of telemetry changes
|
|
2428
|
-
* Returns a {@link TelemetryConfiguration} object
|
|
2429
|
-
*/
|
|
2430
|
-
export const onDidChangeTelemetryConfiguration: Event<TelemetryConfiguration | undefined>;
|
|
2431
|
-
}
|
|
2432
|
-
// https://github.com/microsoft/vscode/issues/78502
|
|
2433
|
-
//
|
|
2434
|
-
// This API is still proposed but we don't intent on promoting it to stable due to problems
|
|
2435
|
-
// around performance. See #145234 for a more likely API to get stabilized.
|
|
2436
|
-
|
|
2437
|
-
interface TerminalDataWriteEvent {
|
|
2438
|
-
/**
|
|
2439
|
-
* The {@link Terminal} for which the data was written.
|
|
2440
|
-
*/
|
|
2441
|
-
readonly terminal: Terminal;
|
|
2442
|
-
/**
|
|
2443
|
-
* The data being written.
|
|
2444
|
-
*/
|
|
2445
|
-
readonly data: string;
|
|
2446
|
-
}
|
|
2447
|
-
// https://github.com/microsoft/vscode/issues/55718
|
|
2448
|
-
|
|
2449
|
-
/**
|
|
2450
|
-
* An {@link Event} which fires when a {@link Terminal}'s dimensions change.
|
|
2451
|
-
*/
|
|
2452
|
-
interface TerminalDimensionsChangeEvent {
|
|
2453
|
-
/**
|
|
2454
|
-
* The {@link Terminal} for which the dimensions have changed.
|
|
2455
|
-
*/
|
|
2456
|
-
readonly terminal: Terminal;
|
|
2457
|
-
/**
|
|
2458
|
-
* The new value for the {@link Terminal.dimensions terminal's dimensions}.
|
|
2459
|
-
*/
|
|
2460
|
-
readonly dimensions: TerminalDimensions;
|
|
2461
|
-
}
|
|
2462
|
-
// https://github.com/microsoft/vscode/issues/145234
|
|
2463
|
-
|
|
2464
|
-
interface TerminalExecutedCommand {
|
|
2465
|
-
/**
|
|
2466
|
-
* The {@link Terminal} the command was executed in.
|
|
2467
|
-
*/
|
|
2468
|
-
terminal: Terminal;
|
|
2469
|
-
/**
|
|
2470
|
-
* The full command line that was executed, including both the command and the arguments.
|
|
2471
|
-
*/
|
|
2472
|
-
commandLine: string | undefined;
|
|
2473
|
-
/**
|
|
2474
|
-
* The current working directory that was reported by the shell. This will be a {@link Uri}
|
|
2475
|
-
* if the string reported by the shell can reliably be mapped to the connected machine.
|
|
2476
|
-
*/
|
|
2477
|
-
cwd: Uri | string | undefined;
|
|
2478
|
-
/**
|
|
2479
|
-
* The exit code reported by the shell.
|
|
2480
|
-
*/
|
|
2481
|
-
exitCode: number | undefined;
|
|
2482
|
-
/**
|
|
2483
|
-
* The output of the command when it has finished executing. This is the plain text shown in
|
|
2484
|
-
* the terminal buffer and does not include raw escape sequences. Depending on the shell
|
|
2485
|
-
* setup, this may include the command line as part of the output.
|
|
2486
|
-
*/
|
|
2487
|
-
output: string | undefined;
|
|
2488
|
-
}
|
|
2489
|
-
// https://github.com/microsoft/vscode/issues/162950
|
|
2490
|
-
|
|
2491
|
-
type SingleOrMany<T> = T[] | T;
|
|
2492
|
-
|
|
2493
|
-
interface TerminalQuickFixProvider {
|
|
2494
|
-
/**
|
|
2495
|
-
* Provides terminal quick fixes
|
|
2496
|
-
* @param commandMatchResult The command match result for which to provide quick fixes
|
|
2497
|
-
* @param token A cancellation token indicating the result is no longer needed
|
|
2498
|
-
* @return Terminal quick fix(es) if any
|
|
2499
|
-
*/
|
|
2500
|
-
provideTerminalQuickFixes(commandMatchResult: TerminalCommandMatchResult, token: CancellationToken): ProviderResult<SingleOrMany<TerminalQuickFixExecuteTerminalCommand | TerminalQuickFixOpener | Command>>;
|
|
2501
|
-
}
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
interface TerminalCommandMatchResult {
|
|
2505
|
-
commandLine: string;
|
|
2506
|
-
commandLineMatch: RegExpMatchArray;
|
|
2507
|
-
outputMatch?: {
|
|
2508
|
-
regexMatch: RegExpMatchArray;
|
|
2509
|
-
outputLines: string[];
|
|
2510
|
-
};
|
|
2511
|
-
}
|
|
2512
|
-
|
|
2513
|
-
declare namespace window {
|
|
2514
|
-
export function createWebviewTextEditorInset(editor: TextEditor, line: number, height: number, options?: WebviewOptions): WebviewEditorInset;
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
|
-
declare namespace window {
|
|
2518
|
-
/**
|
|
2519
|
-
* Register a new `ExternalUriOpener`.
|
|
2520
|
-
*
|
|
2521
|
-
* When a uri is about to be opened, an `onOpenExternalUri:SCHEME` activation event is fired.
|
|
2522
|
-
*
|
|
2523
|
-
* @param id Unique id of the opener, such as `myExtension.browserPreview`. This is used in settings
|
|
2524
|
-
* and commands to identify the opener.
|
|
2525
|
-
* @param opener Opener to register.
|
|
2526
|
-
* @param metadata Additional information about the opener.
|
|
2527
|
-
*
|
|
2528
|
-
* @returns Disposable that unregisters the opener.
|
|
2529
|
-
*/
|
|
2530
|
-
export function registerExternalUriOpener(id: string, opener: ExternalUriOpener, metadata: ExternalUriOpenerMetadata): Disposable;
|
|
2531
|
-
}
|
|
2532
|
-
|
|
2533
|
-
declare namespace window {
|
|
2534
|
-
export function registerProfileContentHandler(id: string, profileContentHandler: ProfileContentHandler): Disposable;
|
|
2535
|
-
}
|
|
2536
|
-
// https://github.com/microsoft/vscode/issues/169012
|
|
2537
|
-
|
|
2538
|
-
declare namespace window {
|
|
2539
|
-
export function registerQuickDiffProvider(selector: DocumentSelector, quickDiffProvider: QuickDiffProvider, label: string, rootUri?: Uri): Disposable;
|
|
2540
|
-
}
|
|
2541
|
-
|
|
2542
|
-
declare namespace window {
|
|
2543
|
-
|
|
2544
|
-
/**
|
|
2545
|
-
* Register a share provider. An extension may register multiple share providers.
|
|
2546
|
-
* There may be multiple share providers for the same {@link ShareableItem}.
|
|
2547
|
-
* @param selector A document selector to filter whether the provider should be shown for a {@link ShareableItem}.
|
|
2548
|
-
* @param provider A share provider.
|
|
2549
|
-
*/
|
|
2550
|
-
export function registerShareProvider(selector: DocumentSelector, provider: ShareProvider): Disposable;
|
|
2551
|
-
}
|
|
2552
|
-
|
|
2553
|
-
declare namespace window {
|
|
2554
|
-
/**
|
|
2555
|
-
* An event which fires when the terminal's child pseudo-device is written to (the shell).
|
|
2556
|
-
* In other words, this provides access to the raw data stream from the process running
|
|
2557
|
-
* within the terminal, including VT sequences.
|
|
2558
|
-
*/
|
|
2559
|
-
export const onDidWriteTerminalData: Event<TerminalDataWriteEvent>;
|
|
2560
|
-
}
|
|
2561
|
-
|
|
2562
|
-
declare namespace window {
|
|
2563
|
-
/**
|
|
2564
|
-
* An event which fires when the {@link Terminal.dimensions dimensions} of the terminal change.
|
|
2565
|
-
*/
|
|
2566
|
-
export const onDidChangeTerminalDimensions: Event<TerminalDimensionsChangeEvent>;
|
|
2567
|
-
}
|
|
2568
|
-
|
|
2569
|
-
declare namespace window {
|
|
2570
|
-
/**
|
|
2571
|
-
* An event that is emitted when a terminal with shell integration activated has completed
|
|
2572
|
-
* executing a command.
|
|
2573
|
-
*
|
|
2574
|
-
* Note that this event will not fire if the executed command exits the shell, listen to
|
|
2575
|
-
* {@link onDidCloseTerminal} to handle that case.
|
|
2576
|
-
*/
|
|
2577
|
-
export const onDidExecuteTerminalCommand: Event<TerminalExecutedCommand>;
|
|
2578
|
-
}
|
|
2579
|
-
|
|
2580
|
-
declare namespace window {
|
|
2581
|
-
/**
|
|
2582
|
-
* @param provider A terminal quick fix provider
|
|
2583
|
-
* @return A {@link Disposable} that unregisters the provider when being disposed
|
|
2584
|
-
*/
|
|
2585
|
-
export function registerTerminalQuickFixProvider(id: string, provider: TerminalQuickFixProvider): Disposable;
|
|
2586
|
-
}
|
|
2587
|
-
|
|
2588
|
-
declare class TerminalQuickFixExecuteTerminalCommand {
|
|
2589
|
-
/**
|
|
2590
|
-
* The terminal command to run
|
|
2591
|
-
*/
|
|
2592
|
-
terminalCommand: string;
|
|
2593
|
-
constructor(terminalCommand: string);
|
|
2594
|
-
}
|
|
2595
|
-
declare class TerminalQuickFixOpener {
|
|
2596
|
-
/**
|
|
2597
|
-
* The uri to open
|
|
2598
|
-
*/
|
|
2599
|
-
uri: Uri;
|
|
2600
|
-
constructor(uri: Uri);
|
|
2601
|
-
}
|
|
2602
|
-
|
|
2603
|
-
/**
|
|
2604
|
-
* A matcher that runs on a sub-section of a terminal command's output
|
|
2605
|
-
*/
|
|
2606
|
-
interface TerminalOutputMatcher {
|
|
2607
|
-
/**
|
|
2608
|
-
* A string or regex to match against the unwrapped line. If this is a regex with the multiline
|
|
2609
|
-
* flag, it will scan an amount of lines equal to `\n` instances in the regex + 1.
|
|
2610
|
-
*/
|
|
2611
|
-
lineMatcher: string | RegExp;
|
|
2612
|
-
/**
|
|
2613
|
-
* Which side of the output to anchor the {@link offset} and {@link length} against.
|
|
2614
|
-
*/
|
|
2615
|
-
anchor: TerminalOutputAnchor;
|
|
2616
|
-
/**
|
|
2617
|
-
* The number of rows above or below the {@link anchor} to start matching against.
|
|
2618
|
-
*/
|
|
2619
|
-
offset: number;
|
|
2620
|
-
/**
|
|
2621
|
-
* The number of wrapped lines to match against, this should be as small as possible for performance
|
|
2622
|
-
* reasons. This is capped at 40.
|
|
2623
|
-
*/
|
|
2624
|
-
length: number;
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
|
-
declare enum TerminalOutputAnchor {
|
|
2628
|
-
Top = 0,
|
|
2629
|
-
Bottom = 1
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
interface Terminal {
|
|
2633
|
-
/**
|
|
2634
|
-
* The current dimensions of the terminal. This will be `undefined` immediately after the
|
|
2635
|
-
* terminal is created as the dimensions are not known until shortly after the terminal is
|
|
2636
|
-
* created.
|
|
2637
|
-
*/
|
|
2638
|
-
readonly dimensions: TerminalDimensions | undefined;
|
|
2639
|
-
}
|
|
2640
|
-
// https://github.com/microsoft/vscode/issues/188173
|
|
2641
|
-
|
|
2642
|
-
interface Terminal {
|
|
2643
|
-
/**
|
|
2644
|
-
* The selected text of the terminal or undefined if there is no selection.
|
|
2645
|
-
*/
|
|
2646
|
-
readonly selection: string | undefined;
|
|
2647
|
-
}
|
|
2648
|
-
// https://github.com/microsoft/vscode/issues/123713
|
|
2649
|
-
|
|
2650
|
-
interface TestRun {
|
|
2651
|
-
/**
|
|
2652
|
-
* Test coverage provider for this result. An extension can defer setting
|
|
2653
|
-
* this until after a run is complete and coverage is available.
|
|
2654
|
-
*/
|
|
2655
|
-
coverageProvider?: TestCoverageProvider;
|
|
2656
|
-
// ...
|
|
2657
|
-
}
|
|
2658
|
-
|
|
2659
|
-
/**
|
|
2660
|
-
* Provides information about test coverage for a test result.
|
|
2661
|
-
* Methods on the provider will not be called until the test run is complete
|
|
2662
|
-
*/
|
|
2663
|
-
interface TestCoverageProvider<T extends FileCoverage = FileCoverage> {
|
|
2664
|
-
/**
|
|
2665
|
-
* Returns coverage information for all files involved in the test run.
|
|
2666
|
-
* @param token A cancellation token.
|
|
2667
|
-
* @return Coverage metadata for all files involved in the test.
|
|
2668
|
-
*/
|
|
2669
|
-
provideFileCoverage(token: CancellationToken): ProviderResult<T[]>;
|
|
2670
|
-
|
|
2671
|
-
/**
|
|
2672
|
-
* Give a FileCoverage to fill in more data, namely {@link FileCoverage.detailedCoverage}.
|
|
2673
|
-
* The editor will only resolve a FileCoverage once, and only if detailedCoverage
|
|
2674
|
-
* is undefined.
|
|
2675
|
-
*
|
|
2676
|
-
* @param coverage A coverage object obtained from {@link provideFileCoverage}
|
|
2677
|
-
* @param token A cancellation token.
|
|
2678
|
-
* @return The resolved file coverage, or a thenable that resolves to one. It
|
|
2679
|
-
* is OK to return the given `coverage`. When no result is returned, the
|
|
2680
|
-
* given `coverage` will be used.
|
|
2681
|
-
*/
|
|
2682
|
-
resolveFileCoverage?(coverage: T, token: CancellationToken): ProviderResult<T>;
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
/**
|
|
2686
|
-
* A class that contains information about a covered resource. A count can
|
|
2687
|
-
* be give for lines, branches, and functions in a file.
|
|
2688
|
-
*/
|
|
2689
|
-
declare class CoveredCount {
|
|
2690
|
-
/**
|
|
2691
|
-
* Number of items covered in the file.
|
|
2692
|
-
*/
|
|
2693
|
-
covered: number;
|
|
2694
|
-
/**
|
|
2695
|
-
* Total number of covered items in the file.
|
|
2696
|
-
*/
|
|
2697
|
-
total: number;
|
|
2698
|
-
|
|
2699
|
-
/**
|
|
2700
|
-
* @param covered Value for {@link CovereredCount.covered}
|
|
2701
|
-
* @param total Value for {@link CovereredCount.total}
|
|
2702
|
-
*/
|
|
2703
|
-
constructor(covered: number, total: number);
|
|
2704
|
-
}
|
|
2705
|
-
|
|
2706
|
-
/**
|
|
2707
|
-
* Contains coverage metadata for a file.
|
|
2708
|
-
*/
|
|
2709
|
-
declare class FileCoverage {
|
|
2710
|
-
/**
|
|
2711
|
-
* File URI.
|
|
2712
|
-
*/
|
|
2713
|
-
readonly uri: Uri;
|
|
2714
|
-
|
|
2715
|
-
/**
|
|
2716
|
-
* Statement coverage information. If the reporter does not provide statement
|
|
2717
|
-
* coverage information, this can instead be used to represent line coverage.
|
|
2718
|
-
*/
|
|
2719
|
-
statementCoverage: CoveredCount;
|
|
2720
|
-
|
|
2721
|
-
/**
|
|
2722
|
-
* Branch coverage information.
|
|
2723
|
-
*/
|
|
2724
|
-
branchCoverage?: CoveredCount;
|
|
2725
|
-
|
|
2726
|
-
/**
|
|
2727
|
-
* Function coverage information.
|
|
2728
|
-
*/
|
|
2729
|
-
functionCoverage?: CoveredCount;
|
|
2730
|
-
|
|
2731
|
-
/**
|
|
2732
|
-
* Detailed, per-statement coverage. If this is undefined, the editor will
|
|
2733
|
-
* call {@link TestCoverageProvider.resolveFileCoverage} when necessary.
|
|
2734
|
-
*/
|
|
2735
|
-
detailedCoverage?: DetailedCoverage[];
|
|
2736
|
-
|
|
2737
|
-
/**
|
|
2738
|
-
* Creates a {@link FileCoverage} instance with counts filled in from
|
|
2739
|
-
* the coverage details.
|
|
2740
|
-
* @param uri Covered file URI
|
|
2741
|
-
* @param detailed Detailed coverage information
|
|
2742
|
-
*/
|
|
2743
|
-
static fromDetails(uri: Uri, details: readonly DetailedCoverage[]): FileCoverage;
|
|
2744
|
-
|
|
2745
|
-
/**
|
|
2746
|
-
* @param uri Covered file URI
|
|
2747
|
-
* @param statementCoverage Statement coverage information. If the reporter
|
|
2748
|
-
* does not provide statement coverage information, this can instead be
|
|
2749
|
-
* used to represent line coverage.
|
|
2750
|
-
* @param branchCoverage Branch coverage information
|
|
2751
|
-
* @param functionCoverage Function coverage information
|
|
2752
|
-
*/
|
|
2753
|
-
constructor(
|
|
2754
|
-
uri: Uri,
|
|
2755
|
-
statementCoverage: CoveredCount,
|
|
2756
|
-
branchCoverage?: CoveredCount,
|
|
2757
|
-
functionCoverage?: CoveredCount,
|
|
2758
|
-
);
|
|
2759
|
-
}
|
|
2760
|
-
|
|
2761
|
-
/**
|
|
2762
|
-
* Contains coverage information for a single statement or line.
|
|
2763
|
-
*/
|
|
2764
|
-
declare class StatementCoverage {
|
|
2765
|
-
/**
|
|
2766
|
-
* The number of times this statement was executed. If zero, the
|
|
2767
|
-
* statement will be marked as un-covered.
|
|
2768
|
-
*/
|
|
2769
|
-
executionCount: number;
|
|
2770
|
-
|
|
2771
|
-
/**
|
|
2772
|
-
* Statement location.
|
|
2773
|
-
*/
|
|
2774
|
-
location: Position | Range;
|
|
2775
|
-
|
|
2776
|
-
/**
|
|
2777
|
-
* Coverage from branches of this line or statement. If it's not a
|
|
2778
|
-
* conditional, this will be empty.
|
|
2779
|
-
*/
|
|
2780
|
-
branches: BranchCoverage[];
|
|
2781
|
-
|
|
2782
|
-
/**
|
|
2783
|
-
* @param location The statement position.
|
|
2784
|
-
* @param executionCount The number of times this statement was
|
|
2785
|
-
* executed. If zero, the statement will be marked as un-covered.
|
|
2786
|
-
* @param branches Coverage from branches of this line. If it's not a
|
|
2787
|
-
* conditional, this should be omitted.
|
|
2788
|
-
*/
|
|
2789
|
-
constructor(executionCount: number, location: Position | Range, branches?: BranchCoverage[]);
|
|
2790
|
-
}
|
|
2791
|
-
|
|
2792
|
-
/**
|
|
2793
|
-
* Contains coverage information for a branch of a {@link StatementCoverage}.
|
|
2794
|
-
*/
|
|
2795
|
-
declare class BranchCoverage {
|
|
2796
|
-
/**
|
|
2797
|
-
* The number of times this branch was executed. If zero, the
|
|
2798
|
-
* branch will be marked as un-covered.
|
|
2799
|
-
*/
|
|
2800
|
-
executionCount: number;
|
|
2801
|
-
|
|
2802
|
-
/**
|
|
2803
|
-
* Branch location.
|
|
2804
|
-
*/
|
|
2805
|
-
location?: Position | Range;
|
|
2806
|
-
|
|
2807
|
-
/**
|
|
2808
|
-
* @param executionCount The number of times this branch was executed.
|
|
2809
|
-
* @param location The branch position.
|
|
2810
|
-
*/
|
|
2811
|
-
constructor(executionCount: number, location?: Position | Range);
|
|
2812
|
-
}
|
|
2813
|
-
|
|
2814
|
-
/**
|
|
2815
|
-
* Contains coverage information for a function or method.
|
|
2816
|
-
*/
|
|
2817
|
-
declare class FunctionCoverage {
|
|
2818
|
-
/**
|
|
2819
|
-
* The number of times this function was executed. If zero, the
|
|
2820
|
-
* function will be marked as un-covered.
|
|
2821
|
-
*/
|
|
2822
|
-
executionCount: number;
|
|
2823
|
-
|
|
2824
|
-
/**
|
|
2825
|
-
* Function location.
|
|
2826
|
-
*/
|
|
2827
|
-
location: Position | Range;
|
|
2828
|
-
|
|
2829
|
-
/**
|
|
2830
|
-
* @param executionCount The number of times this function was executed.
|
|
2831
|
-
* @param location The function position.
|
|
2832
|
-
*/
|
|
2833
|
-
constructor(executionCount: number, location: Position | Range);
|
|
2834
|
-
}
|
|
2835
|
-
|
|
2836
|
-
type DetailedCoverage = StatementCoverage | FunctionCoverage;
|
|
2837
|
-
// https://github.com/microsoft/vscode/issues/190277
|
|
2838
|
-
|
|
2839
|
-
declare class TestMessage2 extends TestMessage {
|
|
2840
|
-
|
|
2841
|
-
/**
|
|
2842
|
-
* Context value of the test item. This can be used to contribute message-
|
|
2843
|
-
* specific actions to the test peek view. The value set here can be found
|
|
2844
|
-
* in the `testMessage` property of the following `menus` contribution points:
|
|
2845
|
-
*
|
|
2846
|
-
* - `testing/message/context` - context menu for the message in the results tree
|
|
2847
|
-
* - `testing/message/content` - a prominent button overlaying editor content where
|
|
2848
|
-
* the message is displayed.
|
|
2849
|
-
*
|
|
2850
|
-
* For example:
|
|
2851
|
-
*
|
|
2852
|
-
* ```json
|
|
2853
|
-
* "contributes": {
|
|
2854
|
-
* "menus": {
|
|
2855
|
-
* "testing/message/content": [
|
|
2856
|
-
* {
|
|
2857
|
-
* "command": "extension.deleteCommentThread",
|
|
2858
|
-
* "when": "testMessage == canApplyRichDiff"
|
|
2859
|
-
* }
|
|
2860
|
-
* ]
|
|
2861
|
-
* }
|
|
2862
|
-
* }
|
|
2863
|
-
* ```
|
|
2864
|
-
*
|
|
2865
|
-
* The command will be called with an object containing:
|
|
2866
|
-
* - `test`: the {@link TestItem} the message is associated with, *if* it
|
|
2867
|
-
* is still present in the {@link TestController.items} collection.
|
|
2868
|
-
* - `message`: the {@link TestMessage} instance.
|
|
2869
|
-
*/
|
|
2870
|
-
contextValue?: string;
|
|
2871
|
-
|
|
2872
|
-
// ...
|
|
2873
|
-
}
|
|
2874
|
-
// https://github.com/microsoft/vscode/issues/107467
|
|
2875
|
-
|
|
2876
|
-
declare namespace tests {
|
|
2877
|
-
/**
|
|
2878
|
-
* Requests that tests be run by their controller.
|
|
2879
|
-
* @param run Run options to use.
|
|
2880
|
-
* @param token Cancellation token for the test run
|
|
2881
|
-
*/
|
|
2882
|
-
export function runTests(run: TestRunRequest, token?: CancellationToken): Thenable<void>;
|
|
2883
|
-
|
|
2884
|
-
/**
|
|
2885
|
-
* Returns an observer that watches and can request tests.
|
|
2886
|
-
*/
|
|
2887
|
-
export function createTestObserver(): TestObserver;
|
|
2888
|
-
/**
|
|
2889
|
-
* List of test results stored by the editor, sorted in descending
|
|
2890
|
-
* order by their `completedAt` time.
|
|
2891
|
-
*/
|
|
2892
|
-
export const testResults: ReadonlyArray<TestRunResult>;
|
|
2893
|
-
|
|
2894
|
-
/**
|
|
2895
|
-
* Event that fires when the {@link testResults} array is updated.
|
|
2896
|
-
*/
|
|
2897
|
-
export const onDidChangeTestResults: Event<void>;
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
interface TestObserver {
|
|
2901
|
-
/**
|
|
2902
|
-
* List of tests returned by test provider for files in the workspace.
|
|
2903
|
-
*/
|
|
2904
|
-
readonly tests: ReadonlyArray<TestItem>;
|
|
2905
|
-
|
|
2906
|
-
/**
|
|
2907
|
-
* An event that fires when an existing test in the collection changes, or
|
|
2908
|
-
* null if a top-level test was added or removed. When fired, the consumer
|
|
2909
|
-
* should check the test item and all its children for changes.
|
|
2910
|
-
*/
|
|
2911
|
-
readonly onDidChangeTest: Event<TestsChangeEvent>;
|
|
2912
|
-
|
|
2913
|
-
/**
|
|
2914
|
-
* Dispose of the observer, allowing the editor to eventually tell test
|
|
2915
|
-
* providers that they no longer need to update tests.
|
|
2916
|
-
*/
|
|
2917
|
-
dispose(): void;
|
|
2918
|
-
}
|
|
2919
|
-
|
|
2920
|
-
interface TestsChangeEvent {
|
|
2921
|
-
/**
|
|
2922
|
-
* List of all tests that are newly added.
|
|
2923
|
-
*/
|
|
2924
|
-
readonly added: ReadonlyArray<TestItem>;
|
|
2925
|
-
|
|
2926
|
-
/**
|
|
2927
|
-
* List of existing tests that have updated.
|
|
2928
|
-
*/
|
|
2929
|
-
readonly updated: ReadonlyArray<TestItem>;
|
|
2930
|
-
|
|
2931
|
-
/**
|
|
2932
|
-
* List of existing tests that have been removed.
|
|
2933
|
-
*/
|
|
2934
|
-
readonly removed: ReadonlyArray<TestItem>;
|
|
2935
|
-
}
|
|
2936
|
-
|
|
2937
|
-
/**
|
|
2938
|
-
* TestResults can be provided to the editor in {@link tests.publishTestResult},
|
|
2939
|
-
* or read from it in {@link tests.testResults}.
|
|
2940
|
-
*
|
|
2941
|
-
* The results contain a 'snapshot' of the tests at the point when the test
|
|
2942
|
-
* run is complete. Therefore, information such as its {@link Range} may be
|
|
2943
|
-
* out of date. If the test still exists in the workspace, consumers can use
|
|
2944
|
-
* its `id` to correlate the result instance with the living test.
|
|
2945
|
-
*/
|
|
2946
|
-
interface TestRunResult {
|
|
2947
|
-
/**
|
|
2948
|
-
* Unix milliseconds timestamp at which the test run was completed.
|
|
2949
|
-
*/
|
|
2950
|
-
readonly completedAt: number;
|
|
2951
|
-
|
|
2952
|
-
/**
|
|
2953
|
-
* Optional raw output from the test run.
|
|
2954
|
-
*/
|
|
2955
|
-
readonly output?: string;
|
|
2956
|
-
|
|
2957
|
-
/**
|
|
2958
|
-
* List of test results. The items in this array are the items that
|
|
2959
|
-
* were passed in the {@link tests.runTests} method.
|
|
2960
|
-
*/
|
|
2961
|
-
readonly results: ReadonlyArray<Readonly<TestResultSnapshot>>;
|
|
2962
|
-
}
|
|
2963
|
-
|
|
2964
|
-
/**
|
|
2965
|
-
* A {@link TestItem}-like interface with an associated result, which appear
|
|
2966
|
-
* or can be provided in {@link TestResult} interfaces.
|
|
2967
|
-
*/
|
|
2968
|
-
interface TestResultSnapshot {
|
|
2969
|
-
/**
|
|
2970
|
-
* Unique identifier that matches that of the associated TestItem.
|
|
2971
|
-
* This is used to correlate test results and tests in the document with
|
|
2972
|
-
* those in the workspace (test explorer).
|
|
2973
|
-
*/
|
|
2974
|
-
readonly id: string;
|
|
2975
|
-
|
|
2976
|
-
/**
|
|
2977
|
-
* Parent of this item.
|
|
2978
|
-
*/
|
|
2979
|
-
readonly parent?: TestResultSnapshot;
|
|
2980
|
-
|
|
2981
|
-
/**
|
|
2982
|
-
* URI this TestItem is associated with. May be a file or file.
|
|
2983
|
-
*/
|
|
2984
|
-
readonly uri?: Uri;
|
|
2985
|
-
|
|
2986
|
-
/**
|
|
2987
|
-
* Display name describing the test case.
|
|
2988
|
-
*/
|
|
2989
|
-
readonly label: string;
|
|
2990
|
-
|
|
2991
|
-
/**
|
|
2992
|
-
* Optional description that appears next to the label.
|
|
2993
|
-
*/
|
|
2994
|
-
readonly description?: string;
|
|
2995
|
-
|
|
2996
|
-
/**
|
|
2997
|
-
* Location of the test item in its `uri`. This is only meaningful if the
|
|
2998
|
-
* `uri` points to a file.
|
|
2999
|
-
*/
|
|
3000
|
-
readonly range?: Range;
|
|
3001
|
-
|
|
3002
|
-
/**
|
|
3003
|
-
* State of the test in each task. In the common case, a test will only
|
|
3004
|
-
* be executed in a single task and the length of this array will be 1.
|
|
3005
|
-
*/
|
|
3006
|
-
readonly taskStates: ReadonlyArray<TestSnapshotTaskState>;
|
|
3007
|
-
|
|
3008
|
-
/**
|
|
3009
|
-
* Optional list of nested tests for this item.
|
|
3010
|
-
*/
|
|
3011
|
-
readonly children: Readonly<TestResultSnapshot>[];
|
|
3012
|
-
}
|
|
3013
|
-
|
|
3014
|
-
interface TestSnapshotTaskState {
|
|
3015
|
-
/**
|
|
3016
|
-
* Current result of the test.
|
|
3017
|
-
*/
|
|
3018
|
-
readonly state: TestResultState;
|
|
3019
|
-
|
|
3020
|
-
/**
|
|
3021
|
-
* The number of milliseconds the test took to run. This is set once the
|
|
3022
|
-
* `state` is `Passed`, `Failed`, or `Errored`.
|
|
3023
|
-
*/
|
|
3024
|
-
readonly duration?: number;
|
|
3025
|
-
|
|
3026
|
-
/**
|
|
3027
|
-
* Associated test run message. Can, for example, contain assertion
|
|
3028
|
-
* failure information if the test fails.
|
|
3029
|
-
*/
|
|
3030
|
-
readonly messages: ReadonlyArray<TestMessage>;
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
/**
|
|
3034
|
-
* Possible states of tests in a test run.
|
|
3035
|
-
*/
|
|
3036
|
-
declare enum TestResultState {
|
|
3037
|
-
// Test will be run, but is not currently running.
|
|
3038
|
-
Queued = 1,
|
|
3039
|
-
// Test is currently running
|
|
3040
|
-
Running = 2,
|
|
3041
|
-
// Test run has passed
|
|
3042
|
-
Passed = 3,
|
|
3043
|
-
// Test run has failed (on an assertion)
|
|
3044
|
-
Failed = 4,
|
|
3045
|
-
// Test run has been skipped
|
|
3046
|
-
Skipped = 5,
|
|
3047
|
-
// Test run failed for some other reason (compilation error, timeout, etc)
|
|
3048
|
-
Errored = 6
|
|
3049
|
-
}
|
|
3050
|
-
// https://github.com/microsoft/vscode/issues/59921
|
|
3051
|
-
|
|
3052
|
-
/**
|
|
3053
|
-
* The parameters of a query for text search.
|
|
3054
|
-
*/
|
|
3055
|
-
interface TextSearchQuery {
|
|
3056
|
-
/**
|
|
3057
|
-
* The text pattern to search for.
|
|
3058
|
-
*/
|
|
3059
|
-
pattern: string;
|
|
3060
|
-
|
|
3061
|
-
/**
|
|
3062
|
-
* Whether or not `pattern` should match multiple lines of text.
|
|
3063
|
-
*/
|
|
3064
|
-
isMultiline?: boolean;
|
|
3065
|
-
|
|
3066
|
-
/**
|
|
3067
|
-
* Whether or not `pattern` should be interpreted as a regular expression.
|
|
3068
|
-
*/
|
|
3069
|
-
isRegExp?: boolean;
|
|
3070
|
-
|
|
3071
|
-
/**
|
|
3072
|
-
* Whether or not the search should be case-sensitive.
|
|
3073
|
-
*/
|
|
3074
|
-
isCaseSensitive?: boolean;
|
|
3075
|
-
|
|
3076
|
-
/**
|
|
3077
|
-
* Whether or not to search for whole word matches only.
|
|
3078
|
-
*/
|
|
3079
|
-
isWordMatch?: boolean;
|
|
3080
|
-
}
|
|
3081
|
-
|
|
3082
|
-
/**
|
|
3083
|
-
* A file glob pattern to match file paths against.
|
|
3084
|
-
* TODO@roblourens merge this with the GlobPattern docs/definition in vscode.d.ts.
|
|
3085
|
-
* @see {@link GlobPattern}
|
|
3086
|
-
*/
|
|
3087
|
-
type GlobString = string;
|
|
3088
|
-
|
|
3089
|
-
/**
|
|
3090
|
-
* Options common to file and text search
|
|
3091
|
-
*/
|
|
3092
|
-
interface SearchOptions {
|
|
3093
|
-
/**
|
|
3094
|
-
* The root folder to search within.
|
|
3095
|
-
*/
|
|
3096
|
-
folder: Uri;
|
|
3097
|
-
|
|
3098
|
-
/**
|
|
3099
|
-
* Files that match an `includes` glob pattern should be included in the search.
|
|
3100
|
-
*/
|
|
3101
|
-
includes: GlobString[];
|
|
3102
|
-
|
|
3103
|
-
/**
|
|
3104
|
-
* Files that match an `excludes` glob pattern should be excluded from the search.
|
|
3105
|
-
*/
|
|
3106
|
-
excludes: GlobString[];
|
|
3107
|
-
|
|
3108
|
-
/**
|
|
3109
|
-
* Whether external files that exclude files, like .gitignore, should be respected.
|
|
3110
|
-
* See the vscode setting `"search.useIgnoreFiles"`.
|
|
3111
|
-
*/
|
|
3112
|
-
useIgnoreFiles: boolean;
|
|
3113
|
-
|
|
3114
|
-
/**
|
|
3115
|
-
* Whether symlinks should be followed while searching.
|
|
3116
|
-
* See the vscode setting `"search.followSymlinks"`.
|
|
3117
|
-
*/
|
|
3118
|
-
followSymlinks: boolean;
|
|
3119
|
-
|
|
3120
|
-
/**
|
|
3121
|
-
* Whether global files that exclude files, like .gitignore, should be respected.
|
|
3122
|
-
* See the vscode setting `"search.useGlobalIgnoreFiles"`.
|
|
3123
|
-
*/
|
|
3124
|
-
useGlobalIgnoreFiles: boolean;
|
|
3125
|
-
|
|
3126
|
-
/**
|
|
3127
|
-
* Whether files in parent directories that exclude files, like .gitignore, should be respected.
|
|
3128
|
-
* See the vscode setting `"search.useParentIgnoreFiles"`.
|
|
3129
|
-
*/
|
|
3130
|
-
useParentIgnoreFiles: boolean;
|
|
3131
|
-
}
|
|
3132
|
-
|
|
3133
|
-
/**
|
|
3134
|
-
* Options to specify the size of the result text preview.
|
|
3135
|
-
* These options don't affect the size of the match itself, just the amount of preview text.
|
|
3136
|
-
*/
|
|
3137
|
-
interface TextSearchPreviewOptions {
|
|
3138
|
-
/**
|
|
3139
|
-
* The maximum number of lines in the preview.
|
|
3140
|
-
* Only search providers that support multiline search will ever return more than one line in the match.
|
|
3141
|
-
*/
|
|
3142
|
-
matchLines: number;
|
|
3143
|
-
|
|
3144
|
-
/**
|
|
3145
|
-
* The maximum number of characters included per line.
|
|
3146
|
-
*/
|
|
3147
|
-
charsPerLine: number;
|
|
3148
|
-
}
|
|
3149
|
-
|
|
3150
|
-
/**
|
|
3151
|
-
* Options that apply to text search.
|
|
3152
|
-
*/
|
|
3153
|
-
interface TextSearchOptions extends SearchOptions {
|
|
3154
|
-
/**
|
|
3155
|
-
* The maximum number of results to be returned.
|
|
3156
|
-
*/
|
|
3157
|
-
maxResults: number;
|
|
3158
|
-
|
|
3159
|
-
/**
|
|
3160
|
-
* Options to specify the size of the result text preview.
|
|
3161
|
-
*/
|
|
3162
|
-
previewOptions?: TextSearchPreviewOptions;
|
|
3163
|
-
|
|
3164
|
-
/**
|
|
3165
|
-
* Exclude files larger than `maxFileSize` in bytes.
|
|
3166
|
-
*/
|
|
3167
|
-
maxFileSize?: number;
|
|
3168
|
-
|
|
3169
|
-
/**
|
|
3170
|
-
* Interpret files using this encoding.
|
|
3171
|
-
* See the vscode setting `"files.encoding"`
|
|
3172
|
-
*/
|
|
3173
|
-
encoding?: string;
|
|
3174
|
-
|
|
3175
|
-
/**
|
|
3176
|
-
* Number of lines of context to include before each match.
|
|
3177
|
-
*/
|
|
3178
|
-
beforeContext?: number;
|
|
3179
|
-
|
|
3180
|
-
/**
|
|
3181
|
-
* Number of lines of context to include after each match.
|
|
3182
|
-
*/
|
|
3183
|
-
afterContext?: number;
|
|
3184
|
-
}
|
|
3185
|
-
|
|
3186
|
-
/**
|
|
3187
|
-
* Represents the severity of a TextSearchComplete message.
|
|
3188
|
-
*/
|
|
3189
|
-
declare enum TextSearchCompleteMessageType {
|
|
3190
|
-
Information = 1,
|
|
3191
|
-
Warning = 2,
|
|
3192
|
-
}
|
|
3193
|
-
|
|
3194
|
-
/**
|
|
3195
|
-
* A message regarding a completed search.
|
|
3196
|
-
*/
|
|
3197
|
-
interface TextSearchCompleteMessage {
|
|
3198
|
-
/**
|
|
3199
|
-
* Markdown text of the message.
|
|
3200
|
-
*/
|
|
3201
|
-
text: string;
|
|
3202
|
-
/**
|
|
3203
|
-
* Whether the source of the message is trusted, command links are disabled for untrusted message sources.
|
|
3204
|
-
* Messaged are untrusted by default.
|
|
3205
|
-
*/
|
|
3206
|
-
trusted?: boolean;
|
|
3207
|
-
/**
|
|
3208
|
-
* The message type, this affects how the message will be rendered.
|
|
3209
|
-
*/
|
|
3210
|
-
type: TextSearchCompleteMessageType;
|
|
3211
|
-
}
|
|
3212
|
-
|
|
3213
|
-
/**
|
|
3214
|
-
* Information collected when text search is complete.
|
|
3215
|
-
*/
|
|
3216
|
-
interface TextSearchComplete {
|
|
3217
|
-
/**
|
|
3218
|
-
* Whether the search hit the limit on the maximum number of search results.
|
|
3219
|
-
* `maxResults` on {@linkcode TextSearchOptions} specifies the max number of results.
|
|
3220
|
-
* - If exactly that number of matches exist, this should be false.
|
|
3221
|
-
* - If `maxResults` matches are returned and more exist, this should be true.
|
|
3222
|
-
* - If search hits an internal limit which is less than `maxResults`, this should be true.
|
|
3223
|
-
*/
|
|
3224
|
-
limitHit?: boolean;
|
|
3225
|
-
|
|
3226
|
-
/**
|
|
3227
|
-
* Additional information regarding the state of the completed search.
|
|
3228
|
-
*
|
|
3229
|
-
* Messages with "Information" style support links in markdown syntax:
|
|
3230
|
-
* - Click to [run a command](command:workbench.action.OpenQuickPick)
|
|
3231
|
-
* - Click to [open a website](https://aka.ms)
|
|
3232
|
-
*
|
|
3233
|
-
* Commands may optionally return { triggerSearch: true } to signal to the editor that the original search should run be again.
|
|
3234
|
-
*/
|
|
3235
|
-
message?: TextSearchCompleteMessage | TextSearchCompleteMessage[];
|
|
3236
|
-
}
|
|
3237
|
-
|
|
3238
|
-
/**
|
|
3239
|
-
* A preview of the text result.
|
|
3240
|
-
*/
|
|
3241
|
-
interface TextSearchMatchPreview {
|
|
3242
|
-
/**
|
|
3243
|
-
* The matching lines of text, or a portion of the matching line that contains the match.
|
|
3244
|
-
*/
|
|
3245
|
-
text: string;
|
|
3246
|
-
|
|
3247
|
-
/**
|
|
3248
|
-
* The Range within `text` corresponding to the text of the match.
|
|
3249
|
-
* The number of matches must match the TextSearchMatch's range property.
|
|
3250
|
-
*/
|
|
3251
|
-
matches: Range | Range[];
|
|
3252
|
-
}
|
|
3253
|
-
|
|
3254
|
-
/**
|
|
3255
|
-
* A match from a text search
|
|
3256
|
-
*/
|
|
3257
|
-
interface TextSearchMatch {
|
|
3258
|
-
/**
|
|
3259
|
-
* The uri for the matching document.
|
|
3260
|
-
*/
|
|
3261
|
-
uri: Uri;
|
|
3262
|
-
|
|
3263
|
-
/**
|
|
3264
|
-
* The range of the match within the document, or multiple ranges for multiple matches.
|
|
3265
|
-
*/
|
|
3266
|
-
ranges: Range | Range[];
|
|
3267
|
-
|
|
3268
|
-
/**
|
|
3269
|
-
* A preview of the text match.
|
|
3270
|
-
*/
|
|
3271
|
-
preview: TextSearchMatchPreview;
|
|
3272
|
-
}
|
|
3273
|
-
|
|
3274
|
-
/**
|
|
3275
|
-
* A line of context surrounding a TextSearchMatch.
|
|
3276
|
-
*/
|
|
3277
|
-
interface TextSearchContext {
|
|
3278
|
-
/**
|
|
3279
|
-
* The uri for the matching document.
|
|
3280
|
-
*/
|
|
3281
|
-
uri: Uri;
|
|
3282
|
-
|
|
3283
|
-
/**
|
|
3284
|
-
* One line of text.
|
|
3285
|
-
* previewOptions.charsPerLine applies to this
|
|
3286
|
-
*/
|
|
3287
|
-
text: string;
|
|
3288
|
-
|
|
3289
|
-
/**
|
|
3290
|
-
* The line number of this line of context.
|
|
3291
|
-
*/
|
|
3292
|
-
lineNumber: number;
|
|
3293
|
-
}
|
|
3294
|
-
|
|
3295
|
-
type TextSearchResult = TextSearchMatch | TextSearchContext;
|
|
3296
|
-
|
|
3297
|
-
/**
|
|
3298
|
-
* A TextSearchProvider provides search results for text results inside files in the workspace.
|
|
3299
|
-
*/
|
|
3300
|
-
interface TextSearchProvider {
|
|
3301
|
-
/**
|
|
3302
|
-
* Provide results that match the given text pattern.
|
|
3303
|
-
* @param query The parameters for this query.
|
|
3304
|
-
* @param options A set of options to consider while searching.
|
|
3305
|
-
* @param progress A progress callback that must be invoked for all results.
|
|
3306
|
-
* @param token A cancellation token.
|
|
3307
|
-
*/
|
|
3308
|
-
provideTextSearchResults(query: TextSearchQuery, options: TextSearchOptions, progress: Progress<TextSearchResult>, token: CancellationToken): ProviderResult<TextSearchComplete>;
|
|
3309
|
-
}
|
|
3310
|
-
// https://github.com/microsoft/vscode/issues/84297
|
|
3311
|
-
|
|
3312
|
-
declare class TimelineItem {
|
|
3313
|
-
/**
|
|
3314
|
-
* A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred.
|
|
3315
|
-
*/
|
|
3316
|
-
timestamp: number;
|
|
3317
|
-
|
|
3318
|
-
/**
|
|
3319
|
-
* A human-readable string describing the timeline item.
|
|
3320
|
-
*/
|
|
3321
|
-
label: string;
|
|
3322
|
-
|
|
3323
|
-
/**
|
|
3324
|
-
* Optional id for the timeline item. It must be unique across all the timeline items provided by this source.
|
|
3325
|
-
*
|
|
3326
|
-
* If not provided, an id is generated using the timeline item's timestamp.
|
|
3327
|
-
*/
|
|
3328
|
-
id?: string;
|
|
3329
|
-
|
|
3330
|
-
/**
|
|
3331
|
-
* The icon path or {@link ThemeIcon} for the timeline item.
|
|
3332
|
-
*/
|
|
3333
|
-
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
|
|
3334
|
-
|
|
3335
|
-
/**
|
|
3336
|
-
* A human readable string describing less prominent details of the timeline item.
|
|
3337
|
-
*/
|
|
3338
|
-
description?: string;
|
|
3339
|
-
|
|
3340
|
-
/**
|
|
3341
|
-
* The tooltip text when you hover over the timeline item.
|
|
3342
|
-
*/
|
|
3343
|
-
tooltip?: string | MarkdownString | undefined;
|
|
3344
|
-
|
|
3345
|
-
/**
|
|
3346
|
-
* The {@link Command} that should be executed when the timeline item is selected.
|
|
3347
|
-
*/
|
|
3348
|
-
command?: Command;
|
|
3349
|
-
|
|
3350
|
-
/**
|
|
3351
|
-
* Context value of the timeline item. This can be used to contribute specific actions to the item.
|
|
3352
|
-
* For example, a timeline item is given a context value as `commit`. When contributing actions to `timeline/item/context`
|
|
3353
|
-
* using `menus` extension point, you can specify context value for key `timelineItem` in `when` expression like `timelineItem == commit`.
|
|
3354
|
-
* ```
|
|
3355
|
-
* "contributes": {
|
|
3356
|
-
* "menus": {
|
|
3357
|
-
* "timeline/item/context": [
|
|
3358
|
-
* {
|
|
3359
|
-
* "command": "extension.copyCommitId",
|
|
3360
|
-
* "when": "timelineItem == commit"
|
|
3361
|
-
* }
|
|
3362
|
-
* ]
|
|
3363
|
-
* }
|
|
3364
|
-
* }
|
|
3365
|
-
* ```
|
|
3366
|
-
* This will show the `extension.copyCommitId` action only for items where `contextValue` is `commit`.
|
|
3367
|
-
*/
|
|
3368
|
-
contextValue?: string;
|
|
3369
|
-
|
|
3370
|
-
/**
|
|
3371
|
-
* Accessibility information used when screen reader interacts with this timeline item.
|
|
3372
|
-
*/
|
|
3373
|
-
accessibilityInformation?: AccessibilityInformation;
|
|
3374
|
-
|
|
3375
|
-
/**
|
|
3376
|
-
* @param label A human-readable string describing the timeline item
|
|
3377
|
-
* @param timestamp A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred
|
|
3378
|
-
*/
|
|
3379
|
-
constructor(label: string, timestamp: number);
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3382
|
-
interface TimelineChangeEvent {
|
|
3383
|
-
/**
|
|
3384
|
-
* The {@link Uri} of the resource for which the timeline changed.
|
|
3385
|
-
*/
|
|
3386
|
-
uri: Uri;
|
|
3387
|
-
|
|
3388
|
-
/**
|
|
3389
|
-
* A flag which indicates whether the entire timeline should be reset.
|
|
3390
|
-
*/
|
|
3391
|
-
reset?: boolean;
|
|
3392
|
-
}
|
|
3393
|
-
|
|
3394
|
-
interface Timeline {
|
|
3395
|
-
readonly paging?: {
|
|
3396
|
-
/**
|
|
3397
|
-
* A provider-defined cursor specifying the starting point of timeline items which are after the ones returned.
|
|
3398
|
-
* Use `undefined` to signal that there are no more items to be returned.
|
|
3399
|
-
*/
|
|
3400
|
-
readonly cursor: string | undefined;
|
|
3401
|
-
};
|
|
3402
|
-
|
|
3403
|
-
/**
|
|
3404
|
-
* An array of {@link TimelineItem timeline items}.
|
|
3405
|
-
*/
|
|
3406
|
-
readonly items: readonly TimelineItem[];
|
|
3407
|
-
}
|
|
3408
|
-
|
|
3409
|
-
interface TimelineOptions {
|
|
3410
|
-
/**
|
|
3411
|
-
* A provider-defined cursor specifying the starting point of the timeline items that should be returned.
|
|
3412
|
-
*/
|
|
3413
|
-
cursor?: string;
|
|
3414
|
-
|
|
3415
|
-
/**
|
|
3416
|
-
* An optional maximum number timeline items or the all timeline items newer (inclusive) than the timestamp or id that should be returned.
|
|
3417
|
-
* If `undefined` all timeline items should be returned.
|
|
3418
|
-
*/
|
|
3419
|
-
limit?: number | { timestamp: number; id?: string };
|
|
3420
|
-
}
|
|
3421
|
-
|
|
3422
|
-
interface TimelineProvider {
|
|
3423
|
-
/**
|
|
3424
|
-
* An optional event to signal that the timeline for a source has changed.
|
|
3425
|
-
* To signal that the timeline for all resources (uris) has changed, do not pass any argument or pass `undefined`.
|
|
3426
|
-
*/
|
|
3427
|
-
onDidChange?: Event<TimelineChangeEvent | undefined>;
|
|
3428
|
-
|
|
3429
|
-
/**
|
|
3430
|
-
* An identifier of the source of the timeline items. This can be used to filter sources.
|
|
3431
|
-
*/
|
|
3432
|
-
readonly id: string;
|
|
3433
|
-
|
|
3434
|
-
/**
|
|
3435
|
-
* A human-readable string describing the source of the timeline items. This can be used as the display label when filtering sources.
|
|
3436
|
-
*/
|
|
3437
|
-
readonly label: string;
|
|
3438
|
-
|
|
3439
|
-
/**
|
|
3440
|
-
* Provide {@link TimelineItem timeline items} for a {@link Uri}.
|
|
3441
|
-
*
|
|
3442
|
-
* @param uri The {@link Uri} of the file to provide the timeline for.
|
|
3443
|
-
* @param options A set of options to determine how results should be returned.
|
|
3444
|
-
* @param token A cancellation token.
|
|
3445
|
-
* @return The {@link TimelineResult timeline result} or a thenable that resolves to such. The lack of a result
|
|
3446
|
-
* can be signaled by returning `undefined`, `null`, or an empty array.
|
|
3447
|
-
*/
|
|
3448
|
-
provideTimeline(uri: Uri, options: TimelineOptions, token: CancellationToken): ProviderResult<Timeline>;
|
|
3449
|
-
}
|
|
3450
|
-
// https://github.com/microsoft/vscode/issues/91555
|
|
3451
|
-
|
|
3452
|
-
declare enum StandardTokenType {
|
|
3453
|
-
Other = 0,
|
|
3454
|
-
Comment = 1,
|
|
3455
|
-
String = 2,
|
|
3456
|
-
RegEx = 3
|
|
3457
|
-
}
|
|
3458
|
-
|
|
3459
|
-
interface TokenInformation {
|
|
3460
|
-
type: StandardTokenType;
|
|
3461
|
-
range: Range;
|
|
3462
|
-
}
|
|
3463
|
-
|
|
3464
|
-
declare namespace languages {
|
|
3465
|
-
export function registerDocumentPasteEditProvider(selector: DocumentSelector, provider: DocumentPasteEditProvider, metadata: DocumentPasteProviderMetadata): Disposable;
|
|
3466
|
-
}
|
|
3467
|
-
|
|
3468
|
-
declare namespace languages {
|
|
3469
|
-
export function registerDocumentDropEditProvider(selector: DocumentSelector, provider: DocumentDropEditProvider, metadata?: DocumentDropEditProviderMetadata): Disposable;
|
|
3470
|
-
}
|
|
3471
|
-
// https://github.com/microsoft/vscode/issues/124024 @hediet
|
|
3472
|
-
|
|
3473
|
-
declare namespace languages {
|
|
3474
|
-
/**
|
|
3475
|
-
* Registers an inline completion provider.
|
|
3476
|
-
*
|
|
3477
|
-
* Multiple providers can be registered for a language. In that case providers are asked in
|
|
3478
|
-
* parallel and the results are merged. A failing provider (rejected promise or exception) will
|
|
3479
|
-
* not cause a failure of the whole operation.
|
|
3480
|
-
*
|
|
3481
|
-
* @param selector A selector that defines the documents this provider is applicable to.
|
|
3482
|
-
* @param provider An inline completion provider.
|
|
3483
|
-
* @param metadata Metadata about the provider.
|
|
3484
|
-
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
3485
|
-
*/
|
|
3486
|
-
export function registerInlineCompletionItemProvider(selector: DocumentSelector, provider: InlineCompletionItemProvider, metadata: InlineCompletionItemProviderMetadata): Disposable;
|
|
3487
|
-
}
|
|
3488
|
-
|
|
3489
|
-
declare namespace languages {
|
|
3490
|
-
/** @deprecated */
|
|
3491
|
-
export function getTokenInformationAtPosition(document: TextDocument, position: Position): Thenable<TokenInformation>;
|
|
3492
|
-
}
|
|
3493
|
-
|
|
3494
|
-
/**
|
|
3495
|
-
* The event that is fired when there is a change in {@link TreeView.activeItem tree view's active item}
|
|
3496
|
-
*/
|
|
3497
|
-
interface TreeViewActiveItemChangeEvent<T> {
|
|
3498
|
-
/**
|
|
3499
|
-
* Active item.
|
|
3500
|
-
*/
|
|
3501
|
-
readonly activeItem: T | undefined;
|
|
3502
|
-
}
|
|
3503
|
-
interface TreeView2<T> extends Disposable {
|
|
3504
|
-
readonly onDidExpandElement: Event<TreeViewExpansionEvent<T>>;
|
|
3505
|
-
readonly onDidCollapseElement: Event<TreeViewExpansionEvent<T>>;
|
|
3506
|
-
readonly selection: readonly T[];
|
|
3507
|
-
readonly onDidChangeSelection: Event<TreeViewSelectionChangeEvent<T>>;
|
|
3508
|
-
readonly visible: boolean;
|
|
3509
|
-
readonly onDidChangeVisibility: Event<TreeViewVisibilityChangeEvent>;
|
|
3510
|
-
readonly onDidChangeCheckboxState: Event<TreeCheckboxChangeEvent<T>>;
|
|
3511
|
-
title?: string;
|
|
3512
|
-
description?: string;
|
|
3513
|
-
badge?: ViewBadge | undefined;
|
|
3514
|
-
reveal(element: T, options?: { select?: boolean; focus?: boolean; expand?: boolean | number }): Thenable<void>;
|
|
3515
|
-
|
|
3516
|
-
/**
|
|
3517
|
-
* An optional human-readable message that will be rendered in the view.
|
|
3518
|
-
* Only a subset of markdown is supported.
|
|
3519
|
-
* Setting the message to null, undefined, or empty string will remove the message from the view.
|
|
3520
|
-
*/
|
|
3521
|
-
message?: string | MarkdownString;
|
|
3522
|
-
}
|
|
3523
|
-
// https://github.com/microsoft/vscode/issues/170248
|
|
3524
|
-
|
|
3525
|
-
interface TreeView<T> extends Disposable {
|
|
3526
|
-
/**
|
|
3527
|
-
* Currently active item.
|
|
3528
|
-
*/
|
|
3529
|
-
readonly activeItem: T | undefined;
|
|
3530
|
-
/**
|
|
3531
|
-
* Event that is fired when the {@link TreeView.activeItem active item} has changed
|
|
3532
|
-
*/
|
|
3533
|
-
readonly onDidChangeActiveItem: Event<TreeViewActiveItemChangeEvent<T>>;
|
|
3534
|
-
}
|
|
3535
|
-
// https://github.com/microsoft/vscode/issues/61313 @alexr00
|
|
3536
|
-
|
|
3537
|
-
interface TreeView<T> extends Disposable {
|
|
3538
|
-
reveal(element: T | undefined, options?: { select?: boolean; focus?: boolean; expand?: boolean | number }): Thenable<void>;
|
|
3539
|
-
}
|
|
3540
|
-
|
|
3541
|
-
/**
|
|
3542
|
-
* Used as part of the ResolverResult if the extension has any candidate,
|
|
3543
|
-
* published, or forwarded ports.
|
|
3544
|
-
*/
|
|
3545
|
-
interface TunnelInformation {
|
|
3546
|
-
/**
|
|
3547
|
-
* Tunnels that are detected by the extension. The remotePort is used for display purposes.
|
|
3548
|
-
* The localAddress should be the complete local address (ex. localhost:1234) for connecting to the port. Tunnels provided through
|
|
3549
|
-
* detected are read-only from the forwarded ports UI.
|
|
3550
|
-
*/
|
|
3551
|
-
environmentTunnels?: TunnelDescription[];
|
|
3552
|
-
|
|
3553
|
-
tunnelFeatures?: {
|
|
3554
|
-
elevation: boolean;
|
|
3555
|
-
/**
|
|
3556
|
-
* One of the the options must have the ID "private".
|
|
3557
|
-
*/
|
|
3558
|
-
privacyOptions: TunnelPrivacy[];
|
|
3559
|
-
};
|
|
3560
|
-
}
|
|
3561
|
-
/**
|
|
3562
|
-
* Used as part of the ResolverResult if the extension has any candidate,
|
|
3563
|
-
* published, or forwarded ports.
|
|
3564
|
-
*/
|
|
3565
|
-
interface TunnelInformation {
|
|
3566
|
-
/**
|
|
3567
|
-
* Tunnels that are detected by the extension. The remotePort is used for display purposes.
|
|
3568
|
-
* The localAddress should be the complete local address (ex. localhost:1234) for connecting to the port. Tunnels provided through
|
|
3569
|
-
* environmentTunnels are read-only from the forwarded ports UI.
|
|
3570
|
-
*/
|
|
3571
|
-
environmentTunnels?: TunnelDescription[];
|
|
3572
|
-
|
|
3573
|
-
tunnelFeatures?: {
|
|
3574
|
-
elevation: boolean;
|
|
3575
|
-
/**
|
|
3576
|
-
* One of the the options must have the ID "private".
|
|
3577
|
-
*/
|
|
3578
|
-
privacyOptions: TunnelPrivacy[];
|
|
3579
|
-
};
|
|
3580
|
-
}
|
|
3581
|
-
|
|
3582
|
-
interface TunnelProvider {
|
|
3583
|
-
/**
|
|
3584
|
-
* Provides port forwarding capabilities. If there is a resolver that already provids tunnels, then the resolver's provider will
|
|
3585
|
-
* be used. If multiple providers are registered, then only the first will be used.
|
|
3586
|
-
*/
|
|
3587
|
-
provideTunnel(tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions, token: CancellationToken): ProviderResult<Tunnel>;
|
|
3588
|
-
}
|
|
3589
|
-
|
|
3590
|
-
interface TunnelOptions {
|
|
3591
|
-
remoteAddress: { port: number; host: string };
|
|
3592
|
-
// The desired local port. If this port can't be used, then another will be chosen.
|
|
3593
|
-
localAddressPort?: number;
|
|
3594
|
-
label?: string;
|
|
3595
|
-
/**
|
|
3596
|
-
* @deprecated Use privacy instead
|
|
3597
|
-
*/
|
|
3598
|
-
public?: boolean;
|
|
3599
|
-
privacy?: string;
|
|
3600
|
-
protocol?: string;
|
|
3601
|
-
}
|
|
3602
|
-
// tunnels @alexr00
|
|
3603
|
-
|
|
3604
|
-
interface TunnelOptions {
|
|
3605
|
-
remoteAddress: { port: number; host: string };
|
|
3606
|
-
// The desired local port. If this port can't be used, then another will be chosen.
|
|
3607
|
-
localAddressPort?: number;
|
|
3608
|
-
label?: string;
|
|
3609
|
-
/**
|
|
3610
|
-
* @deprecated Use privacy instead
|
|
3611
|
-
*/
|
|
3612
|
-
public?: boolean;
|
|
3613
|
-
privacy?: string;
|
|
3614
|
-
protocol?: string;
|
|
3615
|
-
}
|
|
3616
|
-
|
|
3617
|
-
interface TunnelDescription {
|
|
3618
|
-
remoteAddress: { port: number; host: string };
|
|
3619
|
-
//The complete local address(ex. localhost:1234)
|
|
3620
|
-
localAddress: { port: number; host: string } | string;
|
|
3621
|
-
/**
|
|
3622
|
-
* @deprecated Use privacy instead
|
|
3623
|
-
*/
|
|
3624
|
-
public?: boolean;
|
|
3625
|
-
privacy?: string;
|
|
3626
|
-
// If protocol is not provided it is assumed to be http, regardless of the localAddress.
|
|
3627
|
-
protocol?: string;
|
|
3628
|
-
}
|
|
3629
|
-
|
|
3630
|
-
interface TunnelDescription {
|
|
3631
|
-
remoteAddress: { port: number; host: string };
|
|
3632
|
-
//The complete local address(ex. localhost:1234)
|
|
3633
|
-
localAddress: { port: number; host: string } | string;
|
|
3634
|
-
/**
|
|
3635
|
-
* @deprecated Use privacy instead
|
|
3636
|
-
*/
|
|
3637
|
-
public?: boolean;
|
|
3638
|
-
privacy?: string;
|
|
3639
|
-
// If protocol is not provided it is assumed to be http, regardless of the localAddress.
|
|
3640
|
-
protocol?: string;
|
|
3641
|
-
}
|
|
3642
|
-
|
|
3643
|
-
interface Tunnel extends TunnelDescription {
|
|
3644
|
-
// Implementers of Tunnel should fire onDidDispose when dispose is called.
|
|
3645
|
-
onDidDispose: Event<void>;
|
|
3646
|
-
dispose(): void | Thenable<void>;
|
|
3647
|
-
}
|
|
3648
|
-
|
|
3649
|
-
interface Tunnel extends TunnelDescription {
|
|
3650
|
-
// Implementers of Tunnel should fire onDidDispose when dispose is called.
|
|
3651
|
-
onDidDispose: Event<void>;
|
|
3652
|
-
dispose(): void | Thenable<void>;
|
|
3653
|
-
}
|
|
3654
|
-
// https://github.com/microsoft/vscode/issues/181569 @connor4312
|
|
3655
|
-
|
|
3656
|
-
interface WindowState {
|
|
3657
|
-
/**
|
|
3658
|
-
* Indicates whether the window has been interacted with recently. This will
|
|
3659
|
-
* change immediately on activity, or after a short time of user inactivity.
|
|
3660
|
-
*/
|
|
3661
|
-
readonly active: boolean;
|
|
3662
|
-
}
|
|
3663
|
-
// https://github.com/microsoft/vscode/issues/120173
|
|
3664
|
-
|
|
3665
|
-
/**
|
|
3666
|
-
* The object describing the properties of the workspace trust request
|
|
3667
|
-
*/
|
|
3668
|
-
interface WorkspaceTrustRequestOptions {
|
|
3669
|
-
/**
|
|
3670
|
-
* Custom message describing the user action that requires workspace
|
|
3671
|
-
* trust. If omitted, a generic message will be displayed in the workspace
|
|
3672
|
-
* trust request dialog.
|
|
3673
|
-
*/
|
|
3674
|
-
readonly message?: string;
|
|
3675
|
-
}
|
|
3676
|
-
// https://github.com/microsoft/vscode/issues/180582
|
|
3677
|
-
|
|
3678
|
-
declare namespace workspace {
|
|
3679
|
-
/**
|
|
3680
|
-
*
|
|
3681
|
-
* @param scheme The URI scheme that this provider can provide canonical URIs for.
|
|
3682
|
-
* A canonical URI represents the conversion of a resource's alias into a source of truth URI.
|
|
3683
|
-
* Multiple aliases may convert to the same source of truth URI.
|
|
3684
|
-
* @param provider A provider which can convert URIs of scheme @param scheme to
|
|
3685
|
-
* a canonical URI which is stable across machines.
|
|
3686
|
-
*/
|
|
3687
|
-
export function registerCanonicalUriProvider(scheme: string, provider: CanonicalUriProvider): Disposable;
|
|
3688
|
-
|
|
3689
|
-
/**
|
|
3690
|
-
*
|
|
3691
|
-
* @param uri The URI to provide a canonical URI for.
|
|
3692
|
-
* @param token A cancellation token for the request.
|
|
3693
|
-
*/
|
|
3694
|
-
export function getCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
|
|
3695
|
-
}
|
|
3696
|
-
// https://github.com/microsoft/vscode/issues/157734
|
|
3697
|
-
|
|
3698
|
-
declare namespace workspace {
|
|
3699
|
-
/**
|
|
3700
|
-
* An event that is emitted when an edit session identity is about to be requested.
|
|
3701
|
-
*/
|
|
3702
|
-
export const onWillCreateEditSessionIdentity: Event<EditSessionIdentityWillCreateEvent>;
|
|
3703
|
-
|
|
3704
|
-
/**
|
|
3705
|
-
*
|
|
3706
|
-
* @param scheme The URI scheme that this provider can provide edit session identities for.
|
|
3707
|
-
* @param provider A provider which can convert URIs for workspace folders of scheme @param scheme to
|
|
3708
|
-
* an edit session identifier which is stable across machines. This enables edit sessions to be resolved.
|
|
3709
|
-
*/
|
|
3710
|
-
export function registerEditSessionIdentityProvider(scheme: string, provider: EditSessionIdentityProvider): Disposable;
|
|
3711
|
-
}
|
|
3712
|
-
|
|
3713
|
-
declare namespace workspace {
|
|
3714
|
-
/**
|
|
3715
|
-
* Register a search provider.
|
|
3716
|
-
*
|
|
3717
|
-
* Only one provider can be registered per scheme.
|
|
3718
|
-
*
|
|
3719
|
-
* @param scheme The provider will be invoked for workspace folders that have this file scheme.
|
|
3720
|
-
* @param provider The provider.
|
|
3721
|
-
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
3722
|
-
*/
|
|
3723
|
-
export function registerFileSearchProvider(scheme: string, provider: FileSearchProvider): Disposable;
|
|
3724
|
-
}
|
|
3725
|
-
|
|
3726
|
-
declare namespace workspace {
|
|
3727
|
-
/**
|
|
3728
|
-
* Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
|
|
3729
|
-
* @param query The query parameters for the search - the search string, whether it's case-sensitive, or a regex, or matches whole words.
|
|
3730
|
-
* @param callback A callback, called for each result
|
|
3731
|
-
* @param token A token that can be used to signal cancellation to the underlying search engine.
|
|
3732
|
-
* @return A thenable that resolves when the search is complete.
|
|
3733
|
-
*/
|
|
3734
|
-
export function findTextInFiles(query: TextSearchQuery, callback: (result: TextSearchResult) => void, token?: CancellationToken): Thenable<TextSearchComplete>;
|
|
3735
|
-
|
|
3736
|
-
/**
|
|
3737
|
-
* Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
|
|
3738
|
-
* @param query The query parameters for the search - the search string, whether it's case-sensitive, or a regex, or matches whole words.
|
|
3739
|
-
* @param options An optional set of query options. Include and exclude patterns, maxResults, etc.
|
|
3740
|
-
* @param callback A callback, called for each result
|
|
3741
|
-
* @param token A token that can be used to signal cancellation to the underlying search engine.
|
|
3742
|
-
* @return A thenable that resolves when the search is complete.
|
|
3743
|
-
*/
|
|
3744
|
-
export function findTextInFiles(query: TextSearchQuery, options: FindTextInFilesOptions, callback: (result: TextSearchResult) => void, token?: CancellationToken): Thenable<TextSearchComplete>;
|
|
3745
|
-
}
|
|
3746
|
-
|
|
3747
|
-
declare namespace workspace {
|
|
3748
|
-
|
|
3749
|
-
// SPECIAL overload with NotebookRegistrationData
|
|
3750
|
-
export function registerNotebookSerializer(notebookType: string, serializer: NotebookSerializer, options?: NotebookDocumentContentOptions, registration?: NotebookRegistrationData): Disposable;
|
|
3751
|
-
}
|
|
3752
|
-
|
|
3753
|
-
declare namespace workspace {
|
|
3754
|
-
/**
|
|
3755
|
-
* If your extension listens on ports, consider registering a PortAttributesProvider to provide information
|
|
3756
|
-
* about the ports. For example, a debug extension may know about debug ports in it's debuggee. By providing
|
|
3757
|
-
* this information with a PortAttributesProvider the extension can tell the editor that these ports should be
|
|
3758
|
-
* ignored, since they don't need to be user facing.
|
|
3759
|
-
*
|
|
3760
|
-
* The results of the PortAttributesProvider are merged with the user setting `remote.portsAttributes`. If the values conflict, the user setting takes precedence.
|
|
3761
|
-
*
|
|
3762
|
-
* @param portSelector It is best practice to specify a port selector to avoid unnecessary calls to your provider.
|
|
3763
|
-
* If you don't specify a port selector your provider will be called for every port, which will result in slower port forwarding for the user.
|
|
3764
|
-
* @param provider The {@link PortAttributesProvider PortAttributesProvider}.
|
|
3765
|
-
*/
|
|
3766
|
-
export function registerPortAttributesProvider(portSelector: PortAttributesSelector, provider: PortAttributesProvider): Disposable;
|
|
3767
|
-
}
|
|
3768
|
-
declare namespace workspace {
|
|
3769
|
-
|
|
3770
|
-
export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean; readonly isReadonly?: boolean | MarkdownString }): Disposable;
|
|
3771
|
-
}
|
|
3772
|
-
|
|
3773
|
-
declare namespace workspace {
|
|
3774
|
-
export function registerRemoteAuthorityResolver(authorityPrefix: string, resolver: RemoteAuthorityResolver): Disposable;
|
|
3775
|
-
export function registerResourceLabelFormatter(formatter: ResourceLabelFormatter): Disposable;
|
|
3776
|
-
export function getRemoteExecServer(authority: string): Thenable<ExecServer | undefined>;
|
|
3777
|
-
}
|
|
3778
|
-
declare namespace workspace {
|
|
3779
|
-
|
|
3780
|
-
/**
|
|
3781
|
-
* Saves the editor identified by the given resource and returns the resulting resource or `undefined`
|
|
3782
|
-
* if save was not successful or no editor with the given resource was found.
|
|
3783
|
-
*
|
|
3784
|
-
* **Note** that an editor with the provided resource must be opened in order to be saved.
|
|
3785
|
-
*
|
|
3786
|
-
* @param uri the associated uri for the opened editor to save.
|
|
3787
|
-
* @return A thenable that resolves when the save operation has finished.
|
|
3788
|
-
*/
|
|
3789
|
-
export function save(uri: Uri): Thenable<Uri | undefined>;
|
|
3790
|
-
|
|
3791
|
-
/**
|
|
3792
|
-
* Saves the editor identified by the given resource to a new file name as provided by the user and
|
|
3793
|
-
* returns the resulting resource or `undefined` if save was not successful or cancelled or no editor
|
|
3794
|
-
* with the given resource was found.
|
|
3795
|
-
*
|
|
3796
|
-
* **Note** that an editor with the provided resource must be opened in order to be saved as.
|
|
3797
|
-
*
|
|
3798
|
-
* @param uri the associated uri for the opened editor to save as.
|
|
3799
|
-
* @return A thenable that resolves when the save-as operation has finished.
|
|
3800
|
-
*/
|
|
3801
|
-
export function saveAs(uri: Uri): Thenable<Uri | undefined>;
|
|
3802
|
-
}
|
|
3803
|
-
|
|
3804
|
-
declare namespace workspace {
|
|
3805
|
-
/**
|
|
3806
|
-
* Register a text search provider.
|
|
3807
|
-
*
|
|
3808
|
-
* Only one provider can be registered per scheme.
|
|
3809
|
-
*
|
|
3810
|
-
* @param scheme The provider will be invoked for workspace folders that have this file scheme.
|
|
3811
|
-
* @param provider The provider.
|
|
3812
|
-
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
3813
|
-
*/
|
|
3814
|
-
export function registerTextSearchProvider(scheme: string, provider: TextSearchProvider): Disposable;
|
|
3815
|
-
}
|
|
3816
|
-
|
|
3817
|
-
declare namespace workspace {
|
|
3818
|
-
/**
|
|
3819
|
-
* Register a timeline provider.
|
|
3820
|
-
*
|
|
3821
|
-
* Multiple providers can be registered. In that case, providers are asked in
|
|
3822
|
-
* parallel and the results are merged. A failing provider (rejected promise or exception) will
|
|
3823
|
-
* not cause a failure of the whole operation.
|
|
3824
|
-
*
|
|
3825
|
-
* @param scheme A scheme or schemes that defines which documents this provider is applicable to. Can be `*` to target all documents.
|
|
3826
|
-
* @param provider A timeline provider.
|
|
3827
|
-
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
3828
|
-
*/
|
|
3829
|
-
export function registerTimelineProvider(scheme: string | string[], provider: TimelineProvider): Disposable;
|
|
3830
|
-
}
|
|
3831
|
-
|
|
3832
|
-
declare namespace workspace {
|
|
3833
|
-
/**
|
|
3834
|
-
* Registering a tunnel provider enables port forwarding. This will cause the Ports view to show.
|
|
3835
|
-
* @param provider
|
|
3836
|
-
*/
|
|
3837
|
-
export function registerTunnelProvider(provider: TunnelProvider, information: TunnelInformation): Thenable<Disposable>;
|
|
3838
|
-
}
|
|
3839
|
-
|
|
3840
|
-
declare namespace workspace {
|
|
3841
|
-
/**
|
|
3842
|
-
* Forwards a port. If the current resolver implements RemoteAuthorityResolver:forwardPort then that will be used to make the tunnel.
|
|
3843
|
-
* By default, openTunnel only support localhost; however, RemoteAuthorityResolver:tunnelFactory can be used to support other ips.
|
|
3844
|
-
*
|
|
3845
|
-
* @throws When run in an environment without a remote.
|
|
3846
|
-
*
|
|
3847
|
-
* @param tunnelOptions The `localPort` is a suggestion only. If that port is not available another will be chosen.
|
|
3848
|
-
*/
|
|
3849
|
-
export function openTunnel(tunnelOptions: TunnelOptions): Thenable<Tunnel>;
|
|
3850
|
-
|
|
3851
|
-
/**
|
|
3852
|
-
* Gets an array of the currently available tunnels. This does not include environment tunnels, only tunnels that have been created by the user.
|
|
3853
|
-
* Note that these are of type TunnelDescription and cannot be disposed.
|
|
3854
|
-
*/
|
|
3855
|
-
export let tunnels: Thenable<TunnelDescription[]>;
|
|
3856
|
-
|
|
3857
|
-
/**
|
|
3858
|
-
* Fired when the list of tunnels has changed.
|
|
3859
|
-
*/
|
|
3860
|
-
export const onDidChangeTunnels: Event<void>;
|
|
3861
|
-
}
|
|
3862
|
-
|
|
3863
|
-
declare namespace workspace {
|
|
3864
|
-
/**
|
|
3865
|
-
* Prompt the user to chose whether to trust the current workspace
|
|
3866
|
-
* @param options Optional object describing the properties of the
|
|
3867
|
-
* workspace trust request.
|
|
3868
|
-
*/
|
|
3869
|
-
export function requestWorkspaceTrust(options?: WorkspaceTrustRequestOptions): Thenable<boolean | undefined>;
|
|
3870
|
-
}
|
|
3871
|
-
|
|
3872
|
-
export { type AuthenticationForceNewSessionOptions, type AuthenticationProvider, type AuthenticationProviderCreateSessionOptions, type AuthenticationSession, BranchCoverage, CandidatePortSource, type CanonicalUriProvider, type CanonicalUriRequestOptions, type ChatAccess, type ChatAgent, type ChatAgentCommand, type ChatAgentContext, type ChatAgentMetadata, type ChatAgentResponse, type ChatAgentResult, ChatMessage, ChatMessageRole, type ChatResponseFragment, type ChatResponseProvider, type ChatResponseProviderMetadata, type ChatVariableContext, ChatVariableLevel, type ChatVariableResolver, type ChatVariableValue, type CliBuild, type CommandInformationResult, type Comment, type CommentController, CommentState, type CommentThread2, type CommentingRangeProvider2, CoveredCount, type CustomTextEditorProvider, type DetailedCoverage, type DocumentContext, type DocumentContextItem, type DocumentDropEdit, type DocumentDropEditProviderMetadata, type DocumentFilter, DocumentPasteEdit, type DocumentPasteEditProvider, type DocumentPasteProviderMetadata, EditSessionIdentityMatch, type EditSessionIdentityProvider, type EditSessionIdentityWillCreateEvent, type EmbeddingVectorProvider, type ExecEnvironment, type ExecServer, type ExecServerSpawnOptions, type Extension, type ExtensionContext, ExtensionRuntime, type ExternalUriOpener, type ExternalUriOpenerMetadata, ExternalUriOpenerPriority, FileCoverage, FileDecoration2, type FileSearchOptions, type FileSearchProvider, type FileSearchQuery, type FileSystemProvider, type FileTreeData, type FindTextInFilesOptions, FunctionCoverage, type GlobString, type InlineCompletionItem, type InlineCompletionItemProvider, type InlineCompletionItemProviderMetadata, type InlineCompletionList, type InteractiveEditorMessageResponse, type InteractiveEditorRequest, type InteractiveEditorResponse, InteractiveEditorResponseFeedbackKind, type InteractiveEditorSession, type InteractiveEditorSessionProvider, type InteractiveEditorSessionProviderMetadata, type InteractiveEditorSlashCommand, type InteractiveProgress, type InteractiveProgressContent, type InteractiveProgressFileTree, type InteractiveProgressId, type InteractiveProgressTask, type InteractiveProgressUsedContext, type InteractiveRequest, type InteractiveResponseCommand, type InteractiveResponseErrorDetails, type InteractiveResponseForProgress, type InteractiveSession, type InteractiveSessionCommandAction, type InteractiveSessionCopyAction, InteractiveSessionCopyKind, type InteractiveSessionDynamicRequest, type InteractiveSessionFollowup, type InteractiveSessionInsertAction, type InteractiveSessionParticipantInformation, type InteractiveSessionProvider, type InteractiveSessionReplyFollowup, type InteractiveSessionRequestArgs, type InteractiveSessionSlashCommand, type InteractiveSessionState, type InteractiveSessionTerminalAction, type InteractiveSessionUserAction, type InteractiveSessionUserActionEvent, type InteractiveSessionVoteAction, InteractiveSessionVoteDirection, type InteractiveWelcomeMessageContent, type IssueUriRequestHandler, type LineChange, type ManagedMessagePassing, ManagedResolvedAuthority, type MappedEditsContext, type MappedEditsProvider, type MessageOptions, type MessagePassingProtocol, type NotebookCell, type NotebookCellData, NotebookCellExecutionState, type NotebookCellExecutionStateChangeEvent, type NotebookCellOutput, type NotebookController, NotebookControllerAffinity2, type NotebookControllerDetectionTask, type NotebookDocumentContentOptions, type NotebookExecution, NotebookKernelSourceAction, type NotebookKernelSourceActionProvider, type NotebookRegistrationData, NotebookRendererScript, type OpenDialogOptions, type OpenExternalOptions, type OpenExternalUriContext, PortAttributes, type PortAttributesProvider, type PortAttributesSelector, PortAutoForwardAction, type ProcessEnv, type ProcessExit, type ProfileContentHandler, type QuickDiffProvider, type QuickPick, type QuickPickItem, type ReadStream, type RelatedInformationBaseResult, type RelatedInformationProvider, type RelatedInformationResult, RelatedInformationType, type RemoteAuthorityResolver, type RemoteAuthorityResolverContext, RemoteAuthorityResolverError, type RemoteFileSystem, type RemoteServerConnector, ResolvedAuthority, type ResolvedOptions, type ResolverResult, type ResourceLabelFormatter, type ResourceLabelFormatting, type SearchOptions, type ServeParams, type SettingInformationResult, type ShareProvider, type ShareableItem, type SingleOrMany, type SlashCommand, type SlashCommandContext, type SlashCommandMetadata, type SlashResponse, type SlashResult, type SourceControl, type SourceControlActionButton, type SourceControlHistoryItem, type SourceControlHistoryItemChange, type SourceControlHistoryItemGroup, type SourceControlHistoryOptions, type SourceControlHistoryProvider, type SourceControlInputBox, type SourceControlInputBoxValidation, SourceControlInputBoxValidationType, type SourceControlRemoteHistoryItemGroup, type SpawnedCommand, StackFrameFocus, StandardTokenType, StatementCoverage, type Tab, TabInputInteractiveWindow, TabInputTextMerge, type TaskPresentationOptions, type TelemetryConfiguration, type Terminal, type TerminalCommandMatchResult, type TerminalDataWriteEvent, type TerminalDimensionsChangeEvent, type TerminalExecutedCommand, TerminalOutputAnchor, type TerminalOutputMatcher, TerminalQuickFixExecuteTerminalCommand, TerminalQuickFixOpener, type TerminalQuickFixProvider, type TestCoverageProvider, TestMessage2, type TestObserver, type TestResultSnapshot, TestResultState, type TestRun, type TestRunResult, type TestSnapshotTaskState, type TestsChangeEvent, type TextDocumentContext, type TextSearchComplete, type TextSearchCompleteMessage, TextSearchCompleteMessageType, type TextSearchContext, type TextSearchMatch, type TextSearchMatchPreview, type TextSearchOptions, type TextSearchPreviewOptions, type TextSearchProvider, type TextSearchQuery, type TextSearchResult, ThreadFocus, type Timeline, type TimelineChangeEvent, TimelineItem, type TimelineOptions, type TimelineProvider, type TokenInformation, type TreeItem, type TreeView, type TreeView2, type TreeViewActiveItemChangeEvent, type Tunnel, type TunnelCreationOptions, type TunnelDescription, type TunnelInformation, type TunnelOptions, type TunnelPrivacy, type TunnelProvider, type WebviewEditorInset, type WindowState, type WorkspaceTrustRequestOptions, type WriteStream, ai, authentication, chat, commands, debug, env, extensions, interactive, languages, notebooks, tests, window, workspace };
|