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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/api.js +1 -1
  2. package/contributions.js +36 -0
  3. package/extensions.d.ts +83 -4
  4. package/extensions.js +9 -14
  5. package/lifecycle.js +4 -1
  6. package/localExtensionHost.js +207 -0
  7. package/missing-services.js +27 -9
  8. package/monaco-editor-treemending.patch +3376 -3365
  9. package/monaco.js +4 -36
  10. package/package.json +10 -6
  11. package/service-override/tools/editor.d.ts +6 -6
  12. package/service-override/tools/editor.js +4 -4
  13. package/services.d.ts +18 -18
  14. package/services.js +1 -0
  15. package/vscode/src/vs/base/common/errors.d.ts +1 -8
  16. package/vscode/src/vs/base/common/uri.d.ts +1 -7
  17. package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -27
  18. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +39 -1
  19. package/vscode/src/vs/platform/workspace/common/workspace.d.ts +1 -44
  20. package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +160 -2
  21. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +1 -0
  22. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +10 -0
  23. package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +2 -37
  24. package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +2 -73
  25. package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +1 -5
  26. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +174 -0
  27. package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +49 -0
  28. package/vscode-dts/vscode.proposed.authGetSessions.d.ts +62 -0
  29. package/vscode-dts/vscode.proposed.authSession.d.ts +13 -0
  30. package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +47 -0
  31. package/vscode-dts/vscode.proposed.chat.d.ts +25 -0
  32. package/vscode-dts/vscode.proposed.chatAgents.d.ts +39 -0
  33. package/vscode-dts/vscode.proposed.chatProvider.d.ts +38 -0
  34. package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +47 -0
  35. package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +47 -0
  36. package/vscode-dts/vscode.proposed.chatVariables.d.ts +35 -0
  37. package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +48 -0
  38. package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +18 -0
  39. package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +6 -0
  40. package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +10 -0
  41. package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +8 -0
  42. package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +8 -0
  43. package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +6 -0
  44. package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +6 -0
  45. package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +6 -0
  46. package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +6 -0
  47. package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +6 -0
  48. package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +6 -0
  49. package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +7 -0
  50. package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +8 -0
  51. package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +6 -0
  52. package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +6 -0
  53. package/vscode-dts/vscode.proposed.customEditorMove.d.ts +29 -0
  54. package/vscode-dts/vscode.proposed.debugFocus.d.ts +74 -0
  55. package/vscode-dts/vscode.proposed.diffCommand.d.ts +38 -0
  56. package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +16 -0
  57. package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +13 -0
  58. package/vscode-dts/vscode.proposed.documentPaste.d.ts +111 -0
  59. package/vscode-dts/vscode.proposed.dropMetadata.d.ts +60 -0
  60. package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +71 -0
  61. package/vscode-dts/vscode.proposed.editorInsets.d.ts +22 -0
  62. package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +24 -0
  63. package/vscode-dts/vscode.proposed.extensionsAny.d.ts +40 -0
  64. package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +163 -0
  65. package/vscode-dts/vscode.proposed.fileComments.d.ts +85 -0
  66. package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +67 -0
  67. package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +104 -0
  68. package/vscode-dts/vscode.proposed.fsChunks.d.ts +16 -0
  69. package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +31 -0
  70. package/vscode-dts/vscode.proposed.idToken.d.ts +16 -0
  71. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +71 -0
  72. package/vscode-dts/vscode.proposed.interactive.d.ts +227 -0
  73. package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +70 -0
  74. package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +25 -0
  75. package/vscode-dts/vscode.proposed.ipc.d.ts +37 -0
  76. package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +42 -0
  77. package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +52 -0
  78. package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +17 -0
  79. package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +16 -0
  80. package/vscode-dts/vscode.proposed.notebookExecution.d.ts +39 -0
  81. package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +46 -0
  82. package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +21 -0
  83. package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +68 -0
  84. package/vscode-dts/vscode.proposed.notebookMime.d.ts +33 -0
  85. package/vscode-dts/vscode.proposed.portsAttributes.d.ts +100 -0
  86. package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +19 -0
  87. package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +17 -0
  88. package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +16 -0
  89. package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +16 -0
  90. package/vscode-dts/vscode.proposed.readonlyMessage.d.ts +14 -0
  91. package/vscode-dts/vscode.proposed.resolvers.d.ts +371 -0
  92. package/vscode-dts/vscode.proposed.saveEditor.d.ts +35 -0
  93. package/vscode-dts/vscode.proposed.scmActionButton.d.ts +19 -0
  94. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +77 -0
  95. package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +22 -0
  96. package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +19 -0
  97. package/vscode-dts/vscode.proposed.scmValidation.d.ts +60 -0
  98. package/vscode-dts/vscode.proposed.shareProvider.d.ts +74 -0
  99. package/vscode-dts/vscode.proposed.showLocal.d.ts +19 -0
  100. package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +25 -0
  101. package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +16 -0
  102. package/vscode-dts/vscode.proposed.telemetry.d.ts +36 -0
  103. package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +32 -0
  104. package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +39 -0
  105. package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +46 -0
  106. package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +83 -0
  107. package/vscode-dts/vscode.proposed.terminalSelection.d.ts +16 -0
  108. package/vscode-dts/vscode.proposed.testCoverage.d.ts +198 -0
  109. package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +45 -0
  110. package/vscode-dts/vscode.proposed.testObserver.d.ts +184 -0
  111. package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +281 -0
  112. package/vscode-dts/vscode.proposed.timeline.d.ts +163 -0
  113. package/vscode-dts/vscode.proposed.tokenInformation.d.ts +26 -0
  114. package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +30 -0
  115. package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +28 -0
  116. package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +13 -0
  117. package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +44 -0
  118. package/vscode-dts/vscode.proposed.tunnels.d.ts +64 -0
  119. package/vscode-dts/vscode.proposed.windowActivity.d.ts +17 -0
  120. package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +30 -0
  121. package/vscode/src/vs/base/common/ternarySearchTree.d.ts +0 -46
  122. package/vscode/src/vs/base/common/uriIpc.d.ts +0 -10
  123. package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +0 -42
  124. package/vscode/src/vs/platform/workspace/common/editSessions.d.ts +0 -7
  125. package/vscode/src/vs/workbench/services/extensions/common/proxyIdentifier.d.ts +0 -44
  126. package/vscode/src/vs/workbench/services/search/common/search.d.ts +0 -52
  127. package/vscode.proposed.d.ts +0 -4787
@@ -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/157734
9
+
10
+ export namespace workspace {
11
+ /**
12
+ * An event that is emitted when an edit session identity is about to be requested.
13
+ */
14
+ export const onWillCreateEditSessionIdentity: Event<EditSessionIdentityWillCreateEvent>;
15
+
16
+ /**
17
+ *
18
+ * @param scheme The URI scheme that this provider can provide edit session identities for.
19
+ * @param provider A provider which can convert URIs for workspace folders of scheme @param scheme to
20
+ * an edit session identifier which is stable across machines. This enables edit sessions to be resolved.
21
+ */
22
+ export function registerEditSessionIdentityProvider(scheme: string, provider: EditSessionIdentityProvider): Disposable;
23
+ }
24
+
25
+ export interface EditSessionIdentityProvider {
26
+ /**
27
+ *
28
+ * @param workspaceFolder The workspace folder to provide an edit session identity for.
29
+ * @param token A cancellation token for the request.
30
+ * @returns A string representing the edit session identity for the requested workspace folder.
31
+ */
32
+ provideEditSessionIdentity(workspaceFolder: WorkspaceFolder, token: CancellationToken): ProviderResult<string>;
33
+
34
+ /**
35
+ *
36
+ * @param identity1 An edit session identity.
37
+ * @param identity2 A second edit session identity to compare to @param identity1.
38
+ * @param token A cancellation token for the request.
39
+ * @returns An {@link EditSessionIdentityMatch} representing the edit session identity match confidence for the provided identities.
40
+ */
41
+ provideEditSessionIdentityMatch(identity1: string, identity2: string, token: CancellationToken): ProviderResult<EditSessionIdentityMatch>;
42
+ }
43
+
44
+ export enum EditSessionIdentityMatch {
45
+ Complete = 100,
46
+ Partial = 50,
47
+ None = 0
48
+ }
49
+
50
+ export interface EditSessionIdentityWillCreateEvent {
51
+
52
+ /**
53
+ * A cancellation token.
54
+ */
55
+ readonly token: CancellationToken;
56
+
57
+ /**
58
+ * The workspace folder to create an edit session identity for.
59
+ */
60
+ readonly workspaceFolder: WorkspaceFolder;
61
+
62
+ /**
63
+ * Allows to pause the event until the provided thenable resolves.
64
+ *
65
+ * *Note:* This function can only be called during event dispatch.
66
+ *
67
+ * @param thenable A thenable that delays saving.
68
+ */
69
+ waitUntil(thenable: Thenable<any>): void;
70
+ }
71
+ }
@@ -0,0 +1,22 @@
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
+ // https://github.com/microsoft/vscode/issues/85682
7
+
8
+ declare module 'vscode' {
9
+
10
+ export interface WebviewEditorInset {
11
+ readonly editor: TextEditor;
12
+ readonly line: number;
13
+ readonly height: number;
14
+ readonly webview: Webview;
15
+ readonly onDidDispose: Event<void>;
16
+ dispose(): void;
17
+ }
18
+
19
+ export namespace window {
20
+ export function createWebviewTextEditorInset(editor: TextEditor, line: number, height: number, options?: WebviewOptions): WebviewEditorInset;
21
+ }
22
+ }
@@ -0,0 +1,24 @@
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/104436
9
+
10
+ export enum ExtensionRuntime {
11
+ /**
12
+ * The extension is running in a NodeJS extension host. Runtime access to NodeJS APIs is available.
13
+ */
14
+ Node = 1,
15
+ /**
16
+ * The extension is running in a Webworker extension host. Runtime access is limited to Webworker APIs.
17
+ */
18
+ Webworker = 2
19
+ }
20
+
21
+ export interface ExtensionContext {
22
+ readonly extensionRuntime: ExtensionRuntime;
23
+ }
24
+ }
@@ -0,0 +1,40 @@
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/145307 @alexdima
9
+
10
+ export interface Extension<T> {
11
+
12
+ /**
13
+ * `true` when the extension is associated to another extension host.
14
+ *
15
+ * *Note* that an extension from another extension host cannot export
16
+ * API, e.g {@link Extension.exports its exports} are always `undefined`.
17
+ */
18
+ readonly isFromDifferentExtensionHost: boolean;
19
+ }
20
+
21
+ export namespace extensions {
22
+
23
+ /**
24
+ * Get an extension by its full identifier in the form of: `publisher.name`.
25
+ *
26
+ * @param extensionId An extension identifier.
27
+ * @param includeDifferentExtensionHosts Include extensions from different extension host
28
+ * @return An extension or `undefined`.
29
+ */
30
+ export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: boolean): Extension<T> | undefined;
31
+
32
+ /**
33
+ * All extensions across all extension hosts.
34
+ *
35
+ * @see {@link Extension.isFromDifferentExtensionHost}
36
+ */
37
+ export const allAcrossExtensionHosts: readonly Extension<void>[];
38
+
39
+ }
40
+ }
@@ -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
+ }