@codingame/monaco-vscode-api 1.83.14 → 1.83.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +1 -1
- package/contributions.js +36 -0
- package/extensions.d.ts +83 -4
- package/extensions.js +9 -14
- package/lifecycle.js +4 -1
- package/localExtensionHost.js +207 -0
- package/missing-services.js +15 -3
- package/monaco-editor-treemending.patch +966 -955
- package/monaco.js +4 -36
- package/package.json +10 -6
- package/service-override/tools/editor.d.ts +6 -6
- package/services.d.ts +18 -18
- package/services.js +1 -0
- package/vscode/src/vs/base/common/errors.d.ts +1 -8
- package/vscode/src/vs/base/common/uri.d.ts +1 -7
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -27
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +39 -1
- package/vscode/src/vs/platform/workspace/common/workspace.d.ts +1 -44
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +160 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +564 -11
- package/vscode/src/vs/workbench/contrib/scm/common/scm.js +9 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +1 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +594 -2
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +307 -1
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +10 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +2 -37
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +2 -73
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +1 -5
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.js +6 -2
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +174 -0
- package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +49 -0
- package/vscode-dts/vscode.proposed.authGetSessions.d.ts +62 -0
- package/vscode-dts/vscode.proposed.authSession.d.ts +13 -0
- package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chat.d.ts +25 -0
- package/vscode-dts/vscode.proposed.chatAgents.d.ts +39 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +38 -0
- package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chatVariables.d.ts +35 -0
- package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +48 -0
- package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +18 -0
- package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +10 -0
- package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +7 -0
- package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +6 -0
- package/vscode-dts/vscode.proposed.customEditorMove.d.ts +29 -0
- package/vscode-dts/vscode.proposed.debugFocus.d.ts +74 -0
- package/vscode-dts/vscode.proposed.diffCommand.d.ts +38 -0
- package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +16 -0
- package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +13 -0
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +111 -0
- package/vscode-dts/vscode.proposed.dropMetadata.d.ts +60 -0
- package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +71 -0
- package/vscode-dts/vscode.proposed.editorInsets.d.ts +22 -0
- package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +24 -0
- package/vscode-dts/vscode.proposed.extensionsAny.d.ts +40 -0
- package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +163 -0
- package/vscode-dts/vscode.proposed.fileComments.d.ts +85 -0
- package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +67 -0
- package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +104 -0
- package/vscode-dts/vscode.proposed.fsChunks.d.ts +16 -0
- package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +31 -0
- package/vscode-dts/vscode.proposed.idToken.d.ts +16 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +71 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +227 -0
- package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +70 -0
- package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +25 -0
- package/vscode-dts/vscode.proposed.ipc.d.ts +37 -0
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +42 -0
- package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +52 -0
- package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +17 -0
- package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +16 -0
- package/vscode-dts/vscode.proposed.notebookExecution.d.ts +39 -0
- package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +46 -0
- package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +21 -0
- package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +68 -0
- package/vscode-dts/vscode.proposed.notebookMime.d.ts +33 -0
- package/vscode-dts/vscode.proposed.portsAttributes.d.ts +100 -0
- package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +19 -0
- package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +17 -0
- package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +16 -0
- package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +16 -0
- package/vscode-dts/vscode.proposed.readonlyMessage.d.ts +14 -0
- package/vscode-dts/vscode.proposed.resolvers.d.ts +371 -0
- package/vscode-dts/vscode.proposed.saveEditor.d.ts +35 -0
- package/vscode-dts/vscode.proposed.scmActionButton.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +77 -0
- package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +22 -0
- package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmValidation.d.ts +60 -0
- package/vscode-dts/vscode.proposed.shareProvider.d.ts +74 -0
- package/vscode-dts/vscode.proposed.showLocal.d.ts +19 -0
- package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +25 -0
- package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +16 -0
- package/vscode-dts/vscode.proposed.telemetry.d.ts +36 -0
- package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +32 -0
- package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +39 -0
- package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +46 -0
- package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +83 -0
- package/vscode-dts/vscode.proposed.terminalSelection.d.ts +16 -0
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +198 -0
- package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +45 -0
- package/vscode-dts/vscode.proposed.testObserver.d.ts +184 -0
- package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +281 -0
- package/vscode-dts/vscode.proposed.timeline.d.ts +163 -0
- package/vscode-dts/vscode.proposed.tokenInformation.d.ts +26 -0
- package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +30 -0
- package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +28 -0
- package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +13 -0
- package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +44 -0
- package/vscode-dts/vscode.proposed.tunnels.d.ts +64 -0
- package/vscode-dts/vscode.proposed.windowActivity.d.ts +17 -0
- package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +30 -0
- package/vscode/src/vs/base/common/ternarySearchTree.d.ts +0 -46
- package/vscode/src/vs/base/common/uriIpc.d.ts +0 -10
- package/vscode/src/vs/platform/workspace/common/editSessions.d.ts +0 -7
- package/vscode/src/vs/workbench/services/extensions/common/proxyIdentifier.d.ts +0 -44
- package/vscode/src/vs/workbench/services/search/common/search.d.ts +0 -52
- package/vscode.proposed.d.ts +0 -4787
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/109277
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Details if an `ExternalUriOpener` can open a uri.
|
|
12
|
+
*
|
|
13
|
+
* The priority is also used to rank multiple openers against each other and determine
|
|
14
|
+
* if an opener should be selected automatically or if the user should be prompted to
|
|
15
|
+
* select an opener.
|
|
16
|
+
*
|
|
17
|
+
* The editor will try to use the best available opener, as sorted by `ExternalUriOpenerPriority`.
|
|
18
|
+
* If there are multiple potential "best" openers for a URI, then the user will be prompted
|
|
19
|
+
* to select an opener.
|
|
20
|
+
*/
|
|
21
|
+
export enum ExternalUriOpenerPriority {
|
|
22
|
+
/**
|
|
23
|
+
* The opener is disabled and will never be shown to users.
|
|
24
|
+
*
|
|
25
|
+
* Note that the opener can still be used if the user specifically
|
|
26
|
+
* configures it in their settings.
|
|
27
|
+
*/
|
|
28
|
+
None = 0,
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The opener can open the uri but will not cause a prompt on its own
|
|
32
|
+
* since the editor always contributes a built-in `Default` opener.
|
|
33
|
+
*/
|
|
34
|
+
Option = 1,
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The opener can open the uri.
|
|
38
|
+
*
|
|
39
|
+
* The editor's built-in opener has `Default` priority. This means that any additional `Default`
|
|
40
|
+
* openers will cause the user to be prompted to select from a list of all potential openers.
|
|
41
|
+
*/
|
|
42
|
+
Default = 2,
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The opener can open the uri and should be automatically selected over any
|
|
46
|
+
* default openers, include the built-in one from the editor.
|
|
47
|
+
*
|
|
48
|
+
* A preferred opener will be automatically selected if no other preferred openers
|
|
49
|
+
* are available. If multiple preferred openers are available, then the user
|
|
50
|
+
* is shown a prompt with all potential openers (not just preferred openers).
|
|
51
|
+
*/
|
|
52
|
+
Preferred = 3,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Handles opening uris to external resources, such as http(s) links.
|
|
57
|
+
*
|
|
58
|
+
* Extensions can implement an `ExternalUriOpener` to open `http` links to a webserver
|
|
59
|
+
* inside of the editor instead of having the link be opened by the web browser.
|
|
60
|
+
*
|
|
61
|
+
* Currently openers may only be registered for `http` and `https` uris.
|
|
62
|
+
*/
|
|
63
|
+
export interface ExternalUriOpener {
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Check if the opener can open a uri.
|
|
67
|
+
*
|
|
68
|
+
* @param uri The uri being opened. This is the uri that the user clicked on. It has
|
|
69
|
+
* not yet gone through port forwarding.
|
|
70
|
+
* @param token Cancellation token indicating that the result is no longer needed.
|
|
71
|
+
*
|
|
72
|
+
* @return Priority indicating if the opener can open the external uri.
|
|
73
|
+
*/
|
|
74
|
+
canOpenExternalUri(uri: Uri, token: CancellationToken): ExternalUriOpenerPriority | Thenable<ExternalUriOpenerPriority>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Open a uri.
|
|
78
|
+
*
|
|
79
|
+
* This is invoked when:
|
|
80
|
+
*
|
|
81
|
+
* - The user clicks a link which does not have an assigned opener. In this case, first `canOpenExternalUri`
|
|
82
|
+
* is called and if the user selects this opener, then `openExternalUri` is called.
|
|
83
|
+
* - The user sets the default opener for a link in their settings and then visits a link.
|
|
84
|
+
*
|
|
85
|
+
* @param resolvedUri The uri to open. This uri may have been transformed by port forwarding, so it
|
|
86
|
+
* may not match the original uri passed to `canOpenExternalUri`. Use `ctx.originalUri` to check the
|
|
87
|
+
* original uri.
|
|
88
|
+
* @param ctx Additional information about the uri being opened.
|
|
89
|
+
* @param token Cancellation token indicating that opening has been canceled.
|
|
90
|
+
*
|
|
91
|
+
* @return Thenable indicating that the opening has completed.
|
|
92
|
+
*/
|
|
93
|
+
openExternalUri(resolvedUri: Uri, ctx: OpenExternalUriContext, token: CancellationToken): Thenable<void> | void;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Additional information about the uri being opened.
|
|
98
|
+
*/
|
|
99
|
+
interface OpenExternalUriContext {
|
|
100
|
+
/**
|
|
101
|
+
* The uri that triggered the open.
|
|
102
|
+
*
|
|
103
|
+
* This is the original uri that the user clicked on or that was passed to `openExternal.`
|
|
104
|
+
* Due to port forwarding, this may not match the `resolvedUri` passed to `openExternalUri`.
|
|
105
|
+
*/
|
|
106
|
+
readonly sourceUri: Uri;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Additional metadata about a registered `ExternalUriOpener`.
|
|
111
|
+
*/
|
|
112
|
+
interface ExternalUriOpenerMetadata {
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* List of uri schemes the opener is triggered for.
|
|
116
|
+
*
|
|
117
|
+
* Currently only `http` and `https` are supported.
|
|
118
|
+
*/
|
|
119
|
+
readonly schemes: readonly string[];
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Text displayed to the user that explains what the opener does.
|
|
123
|
+
*
|
|
124
|
+
* For example, 'Open in browser preview'
|
|
125
|
+
*/
|
|
126
|
+
readonly label: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
namespace window {
|
|
130
|
+
/**
|
|
131
|
+
* Register a new `ExternalUriOpener`.
|
|
132
|
+
*
|
|
133
|
+
* When a uri is about to be opened, an `onOpenExternalUri:SCHEME` activation event is fired.
|
|
134
|
+
*
|
|
135
|
+
* @param id Unique id of the opener, such as `myExtension.browserPreview`. This is used in settings
|
|
136
|
+
* and commands to identify the opener.
|
|
137
|
+
* @param opener Opener to register.
|
|
138
|
+
* @param metadata Additional information about the opener.
|
|
139
|
+
*
|
|
140
|
+
* @returns Disposable that unregisters the opener.
|
|
141
|
+
*/
|
|
142
|
+
export function registerExternalUriOpener(id: string, opener: ExternalUriOpener, metadata: ExternalUriOpenerMetadata): Disposable;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
interface OpenExternalOptions {
|
|
146
|
+
/**
|
|
147
|
+
* Allows using openers contributed by extensions through `registerExternalUriOpener`
|
|
148
|
+
* when opening the resource.
|
|
149
|
+
*
|
|
150
|
+
* If `true`, the editor will check if any contributed openers can handle the
|
|
151
|
+
* uri, and fallback to the default opener behavior.
|
|
152
|
+
*
|
|
153
|
+
* If it is string, this specifies the id of the `ExternalUriOpener`
|
|
154
|
+
* that should be used if it is available. Use `'default'` to force the editor's
|
|
155
|
+
* standard external opener to be used.
|
|
156
|
+
*/
|
|
157
|
+
readonly allowContributedOpeners?: boolean | string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
namespace env {
|
|
161
|
+
export function openExternal(target: Uri, options?: OpenExternalOptions): Thenable<boolean>;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
export interface CommentThread2 {
|
|
9
|
+
/**
|
|
10
|
+
* The uri of the document the thread has been created on.
|
|
11
|
+
*/
|
|
12
|
+
readonly uri: Uri;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The range the comment thread is located within the document. The thread icon will be shown
|
|
16
|
+
* at the last line of the range.
|
|
17
|
+
*/
|
|
18
|
+
range: Range | undefined;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The ordered comments of the thread.
|
|
22
|
+
*/
|
|
23
|
+
comments: readonly Comment[];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Whether the thread should be collapsed or expanded when opening the document.
|
|
27
|
+
* Defaults to Collapsed.
|
|
28
|
+
*/
|
|
29
|
+
collapsibleState: CommentThreadCollapsibleState;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Whether the thread supports reply.
|
|
33
|
+
* Defaults to true.
|
|
34
|
+
*/
|
|
35
|
+
canReply: boolean;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Context value of the comment thread. This can be used to contribute thread specific actions.
|
|
39
|
+
* For example, a comment thread is given a context value as `editable`. When contributing actions to `comments/commentThread/title`
|
|
40
|
+
* using `menus` extension point, you can specify context value for key `commentThread` in `when` expression like `commentThread == editable`.
|
|
41
|
+
* ```json
|
|
42
|
+
* "contributes": {
|
|
43
|
+
* "menus": {
|
|
44
|
+
* "comments/commentThread/title": [
|
|
45
|
+
* {
|
|
46
|
+
* "command": "extension.deleteCommentThread",
|
|
47
|
+
* "when": "commentThread == editable"
|
|
48
|
+
* }
|
|
49
|
+
* ]
|
|
50
|
+
* }
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
* This will show action `extension.deleteCommentThread` only for comment threads with `contextValue` is `editable`.
|
|
54
|
+
*/
|
|
55
|
+
contextValue?: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The optional human-readable label describing the {@link CommentThread Comment Thread}
|
|
59
|
+
*/
|
|
60
|
+
label?: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The optional state of a comment thread, which may affect how the comment is displayed.
|
|
64
|
+
*/
|
|
65
|
+
state?: CommentThreadState;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Dispose this comment thread.
|
|
69
|
+
*
|
|
70
|
+
* Once disposed, this comment thread will be removed from visible editors and Comment Panel when appropriate.
|
|
71
|
+
*/
|
|
72
|
+
dispose(): void;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface CommentController {
|
|
76
|
+
createCommentThread(uri: Uri, range: Range | undefined, comments: readonly Comment[]): CommentThread | CommentThread2;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface CommentingRangeProvider2 {
|
|
80
|
+
/**
|
|
81
|
+
* Provide a list of ranges which allow new comment threads creation or null for a given document
|
|
82
|
+
*/
|
|
83
|
+
provideCommentingRanges(document: TextDocument, token: CancellationToken): ProviderResult<Range[] | { fileComments: boolean; ranges?: Range[] }>;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/73524
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The parameters of a query for file search.
|
|
12
|
+
*/
|
|
13
|
+
export interface FileSearchQuery {
|
|
14
|
+
/**
|
|
15
|
+
* The search pattern to match against file paths.
|
|
16
|
+
*/
|
|
17
|
+
pattern: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Options that apply to file search.
|
|
22
|
+
*/
|
|
23
|
+
export interface FileSearchOptions extends SearchOptions {
|
|
24
|
+
/**
|
|
25
|
+
* The maximum number of results to be returned.
|
|
26
|
+
*/
|
|
27
|
+
maxResults?: number;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 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,
|
|
31
|
+
* 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.
|
|
32
|
+
*/
|
|
33
|
+
session?: CancellationToken;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 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.
|
|
38
|
+
*
|
|
39
|
+
* 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
|
|
40
|
+
* all files that match the user's query.
|
|
41
|
+
*
|
|
42
|
+
* The FileSearchProvider will be invoked on every keypress in quickopen. When `workspace.findFiles` is called, it will be invoked with an empty query string,
|
|
43
|
+
* and in that case, every file in the folder should be returned.
|
|
44
|
+
*/
|
|
45
|
+
export interface FileSearchProvider {
|
|
46
|
+
/**
|
|
47
|
+
* Provide the set of files that match a certain file path pattern.
|
|
48
|
+
* @param query The parameters for this query.
|
|
49
|
+
* @param options A set of options to consider while searching files.
|
|
50
|
+
* @param token A cancellation token.
|
|
51
|
+
*/
|
|
52
|
+
provideFileSearchResults(query: FileSearchQuery, options: FileSearchOptions, token: CancellationToken): ProviderResult<Uri[]>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export namespace workspace {
|
|
56
|
+
/**
|
|
57
|
+
* Register a search provider.
|
|
58
|
+
*
|
|
59
|
+
* Only one provider can be registered per scheme.
|
|
60
|
+
*
|
|
61
|
+
* @param scheme The provider will be invoked for workspace folders that have this file scheme.
|
|
62
|
+
* @param provider The provider.
|
|
63
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
64
|
+
*/
|
|
65
|
+
export function registerFileSearchProvider(scheme: string, provider: FileSearchProvider): Disposable;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/59924
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Options that can be set on a findTextInFiles search.
|
|
12
|
+
*/
|
|
13
|
+
export interface FindTextInFilesOptions {
|
|
14
|
+
/**
|
|
15
|
+
* A {@link GlobPattern glob pattern} that defines the files to search for. The glob pattern
|
|
16
|
+
* will be matched against the file paths of files relative to their workspace. Use a {@link RelativePattern relative pattern}
|
|
17
|
+
* to restrict the search results to a {@link WorkspaceFolder workspace folder}.
|
|
18
|
+
*/
|
|
19
|
+
include?: GlobPattern;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A {@link GlobPattern glob pattern} that defines files and folders to exclude. The glob pattern
|
|
23
|
+
* will be matched against the file paths of resulting matches relative to their workspace. When `undefined`, default excludes will
|
|
24
|
+
* apply.
|
|
25
|
+
*/
|
|
26
|
+
exclude?: GlobPattern;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Whether to use the default and user-configured excludes. Defaults to true.
|
|
30
|
+
*/
|
|
31
|
+
useDefaultExcludes?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The maximum number of results to search for
|
|
35
|
+
*/
|
|
36
|
+
maxResults?: number;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Whether external files that exclude files, like .gitignore, should be respected.
|
|
40
|
+
* See the vscode setting `"search.useIgnoreFiles"`.
|
|
41
|
+
*/
|
|
42
|
+
useIgnoreFiles?: boolean;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Whether global files that exclude files, like .gitignore, should be respected.
|
|
46
|
+
* See the vscode setting `"search.useGlobalIgnoreFiles"`.
|
|
47
|
+
*/
|
|
48
|
+
useGlobalIgnoreFiles?: boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Whether files in parent directories that exclude files, like .gitignore, should be respected.
|
|
52
|
+
* See the vscode setting `"search.useParentIgnoreFiles"`.
|
|
53
|
+
*/
|
|
54
|
+
useParentIgnoreFiles?: boolean;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Whether symlinks should be followed while searching.
|
|
58
|
+
* See the vscode setting `"search.followSymlinks"`.
|
|
59
|
+
*/
|
|
60
|
+
followSymlinks?: boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Interpret files using this encoding.
|
|
64
|
+
* See the vscode setting `"files.encoding"`
|
|
65
|
+
*/
|
|
66
|
+
encoding?: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Options to specify the size of the result text preview.
|
|
70
|
+
*/
|
|
71
|
+
previewOptions?: TextSearchPreviewOptions;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Number of lines of context to include before each match.
|
|
75
|
+
*/
|
|
76
|
+
beforeContext?: number;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Number of lines of context to include after each match.
|
|
80
|
+
*/
|
|
81
|
+
afterContext?: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export namespace workspace {
|
|
85
|
+
/**
|
|
86
|
+
* Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
|
|
87
|
+
* @param query The query parameters for the search - the search string, whether it's case-sensitive, or a regex, or matches whole words.
|
|
88
|
+
* @param callback A callback, called for each result
|
|
89
|
+
* @param token A token that can be used to signal cancellation to the underlying search engine.
|
|
90
|
+
* @return A thenable that resolves when the search is complete.
|
|
91
|
+
*/
|
|
92
|
+
export function findTextInFiles(query: TextSearchQuery, callback: (result: TextSearchResult) => void, token?: CancellationToken): Thenable<TextSearchComplete>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
|
|
96
|
+
* @param query The query parameters for the search - the search string, whether it's case-sensitive, or a regex, or matches whole words.
|
|
97
|
+
* @param options An optional set of query options. Include and exclude patterns, maxResults, etc.
|
|
98
|
+
* @param callback A callback, called for each result
|
|
99
|
+
* @param token A token that can be used to signal cancellation to the underlying search engine.
|
|
100
|
+
* @return A thenable that resolves when the search is complete.
|
|
101
|
+
*/
|
|
102
|
+
export function findTextInFiles(query: TextSearchQuery, options: FindTextInFilesOptions, callback: (result: TextSearchResult) => void, token?: CancellationToken): Thenable<TextSearchComplete>;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/84515
|
|
9
|
+
|
|
10
|
+
export interface FileSystemProvider {
|
|
11
|
+
open?(resource: Uri, options: { create: boolean }): number | Thenable<number>;
|
|
12
|
+
close?(fd: number): void | Thenable<void>;
|
|
13
|
+
read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
|
|
14
|
+
write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/46726
|
|
9
|
+
|
|
10
|
+
export interface IssueUriRequestHandler {
|
|
11
|
+
/**
|
|
12
|
+
*Handle the request by the issue reporter for the Uri you want to direct the user to.
|
|
13
|
+
*/
|
|
14
|
+
handleIssueUrlRequest(): ProviderResult<Uri>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export namespace env {
|
|
18
|
+
/**
|
|
19
|
+
* Register an {@link IssueUriRequestHandler}. By registering an issue uri request handler,
|
|
20
|
+
* you can direct the built-in issue reporter to your issue reporting web experience of choice.
|
|
21
|
+
* The Uri that the handler returns will be opened in the user's browser.
|
|
22
|
+
*
|
|
23
|
+
* Examples of this include:
|
|
24
|
+
* - Using GitHub Issue Forms or GitHub Discussions you can pre-fill the issue creation with relevant information from the current workspace using query parameters
|
|
25
|
+
* - Directing to a different web form that isn't on GitHub for reporting issues
|
|
26
|
+
*
|
|
27
|
+
* @param handler the issue uri request handler to register for this extension.
|
|
28
|
+
*/
|
|
29
|
+
export function registerIssueUriRequestHandler(handler: IssueUriRequestHandler): Disposable;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
/**
|
|
8
|
+
* Represents a session of a currently logged in user.
|
|
9
|
+
*/
|
|
10
|
+
export interface AuthenticationSession {
|
|
11
|
+
/**
|
|
12
|
+
* An optional ID token that may be included in the session.
|
|
13
|
+
*/
|
|
14
|
+
readonly idToken?: string;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/124024 @hediet
|
|
9
|
+
|
|
10
|
+
export namespace languages {
|
|
11
|
+
/**
|
|
12
|
+
* Registers an inline completion provider.
|
|
13
|
+
*
|
|
14
|
+
* Multiple providers can be registered for a language. In that case providers are asked in
|
|
15
|
+
* parallel and the results are merged. A failing provider (rejected promise or exception) will
|
|
16
|
+
* not cause a failure of the whole operation.
|
|
17
|
+
*
|
|
18
|
+
* @param selector A selector that defines the documents this provider is applicable to.
|
|
19
|
+
* @param provider An inline completion provider.
|
|
20
|
+
* @param metadata Metadata about the provider.
|
|
21
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
22
|
+
*/
|
|
23
|
+
export function registerInlineCompletionItemProvider(selector: DocumentSelector, provider: InlineCompletionItemProvider, metadata: InlineCompletionItemProviderMetadata): Disposable;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface InlineCompletionItem {
|
|
27
|
+
/**
|
|
28
|
+
* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
|
|
29
|
+
* Defaults to `false`.
|
|
30
|
+
*/
|
|
31
|
+
completeBracketPairs?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface InlineCompletionItemProviderMetadata {
|
|
35
|
+
/**
|
|
36
|
+
* Specifies a list of extension ids that this provider yields to if they return a result.
|
|
37
|
+
* If some inline completion provider registered by such an extension returns a result, this provider is not asked.
|
|
38
|
+
*/
|
|
39
|
+
yieldTo: string[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface InlineCompletionItemProvider {
|
|
43
|
+
/**
|
|
44
|
+
* @param completionItem The completion item that was shown.
|
|
45
|
+
* @param updatedInsertText The actual insert text (after brackets were fixed).
|
|
46
|
+
*/
|
|
47
|
+
// eslint-disable-next-line local/vscode-dts-provider-naming
|
|
48
|
+
handleDidShowCompletionItem?(completionItem: InlineCompletionItem, updatedInsertText: string): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Is called when an inline completion item was accepted partially.
|
|
52
|
+
* @param acceptedLength The length of the substring of the inline completion that was accepted already.
|
|
53
|
+
*/
|
|
54
|
+
// eslint-disable-next-line local/vscode-dts-provider-naming
|
|
55
|
+
handleDidPartiallyAcceptCompletionItem?(completionItem: InlineCompletionItem, acceptedLength: number): void;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// When finalizing `commands`, make sure to add a corresponding constructor parameter.
|
|
59
|
+
export interface InlineCompletionList {
|
|
60
|
+
/**
|
|
61
|
+
* A list of commands associated with the inline completions of this list.
|
|
62
|
+
*/
|
|
63
|
+
commands?: Command[];
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
|
|
67
|
+
* Defaults to false (might change).
|
|
68
|
+
*/
|
|
69
|
+
enableForwardStability?: boolean;
|
|
70
|
+
}
|
|
71
|
+
}
|