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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/api.js +1 -1
  2. package/contributions.js +36 -0
  3. package/extensions.d.ts +83 -4
  4. package/extensions.js +9 -14
  5. package/lifecycle.js +4 -1
  6. package/localExtensionHost.js +207 -0
  7. package/missing-services.js +15 -3
  8. package/monaco-editor-treemending.patch +3376 -3365
  9. package/monaco.js +4 -36
  10. package/package.json +10 -6
  11. package/service-override/tools/editor.d.ts +6 -6
  12. package/services.d.ts +18 -18
  13. package/services.js +1 -0
  14. package/vscode/src/vs/base/common/errors.d.ts +1 -8
  15. package/vscode/src/vs/base/common/uri.d.ts +1 -7
  16. package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -27
  17. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +39 -1
  18. package/vscode/src/vs/platform/workspace/common/workspace.d.ts +1 -44
  19. package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +160 -2
  20. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +1 -0
  21. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +10 -0
  22. package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +2 -37
  23. package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +2 -73
  24. package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +1 -5
  25. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +174 -0
  26. package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +49 -0
  27. package/vscode-dts/vscode.proposed.authGetSessions.d.ts +62 -0
  28. package/vscode-dts/vscode.proposed.authSession.d.ts +13 -0
  29. package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +47 -0
  30. package/vscode-dts/vscode.proposed.chat.d.ts +25 -0
  31. package/vscode-dts/vscode.proposed.chatAgents.d.ts +39 -0
  32. package/vscode-dts/vscode.proposed.chatProvider.d.ts +38 -0
  33. package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +47 -0
  34. package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +47 -0
  35. package/vscode-dts/vscode.proposed.chatVariables.d.ts +35 -0
  36. package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +48 -0
  37. package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +18 -0
  38. package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +6 -0
  39. package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +10 -0
  40. package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +8 -0
  41. package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +8 -0
  42. package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +6 -0
  43. package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +6 -0
  44. package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +6 -0
  45. package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +6 -0
  46. package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +6 -0
  47. package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +6 -0
  48. package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +7 -0
  49. package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +8 -0
  50. package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +6 -0
  51. package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +6 -0
  52. package/vscode-dts/vscode.proposed.customEditorMove.d.ts +29 -0
  53. package/vscode-dts/vscode.proposed.debugFocus.d.ts +74 -0
  54. package/vscode-dts/vscode.proposed.diffCommand.d.ts +38 -0
  55. package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +16 -0
  56. package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +13 -0
  57. package/vscode-dts/vscode.proposed.documentPaste.d.ts +111 -0
  58. package/vscode-dts/vscode.proposed.dropMetadata.d.ts +60 -0
  59. package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +71 -0
  60. package/vscode-dts/vscode.proposed.editorInsets.d.ts +22 -0
  61. package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +24 -0
  62. package/vscode-dts/vscode.proposed.extensionsAny.d.ts +40 -0
  63. package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +163 -0
  64. package/vscode-dts/vscode.proposed.fileComments.d.ts +85 -0
  65. package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +67 -0
  66. package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +104 -0
  67. package/vscode-dts/vscode.proposed.fsChunks.d.ts +16 -0
  68. package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +31 -0
  69. package/vscode-dts/vscode.proposed.idToken.d.ts +16 -0
  70. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +71 -0
  71. package/vscode-dts/vscode.proposed.interactive.d.ts +227 -0
  72. package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +70 -0
  73. package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +25 -0
  74. package/vscode-dts/vscode.proposed.ipc.d.ts +37 -0
  75. package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +42 -0
  76. package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +52 -0
  77. package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +17 -0
  78. package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +16 -0
  79. package/vscode-dts/vscode.proposed.notebookExecution.d.ts +39 -0
  80. package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +46 -0
  81. package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +21 -0
  82. package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +68 -0
  83. package/vscode-dts/vscode.proposed.notebookMime.d.ts +33 -0
  84. package/vscode-dts/vscode.proposed.portsAttributes.d.ts +100 -0
  85. package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +19 -0
  86. package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +17 -0
  87. package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +16 -0
  88. package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +16 -0
  89. package/vscode-dts/vscode.proposed.readonlyMessage.d.ts +14 -0
  90. package/vscode-dts/vscode.proposed.resolvers.d.ts +371 -0
  91. package/vscode-dts/vscode.proposed.saveEditor.d.ts +35 -0
  92. package/vscode-dts/vscode.proposed.scmActionButton.d.ts +19 -0
  93. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +77 -0
  94. package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +22 -0
  95. package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +19 -0
  96. package/vscode-dts/vscode.proposed.scmValidation.d.ts +60 -0
  97. package/vscode-dts/vscode.proposed.shareProvider.d.ts +74 -0
  98. package/vscode-dts/vscode.proposed.showLocal.d.ts +19 -0
  99. package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +25 -0
  100. package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +16 -0
  101. package/vscode-dts/vscode.proposed.telemetry.d.ts +36 -0
  102. package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +32 -0
  103. package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +39 -0
  104. package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +46 -0
  105. package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +83 -0
  106. package/vscode-dts/vscode.proposed.terminalSelection.d.ts +16 -0
  107. package/vscode-dts/vscode.proposed.testCoverage.d.ts +198 -0
  108. package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +45 -0
  109. package/vscode-dts/vscode.proposed.testObserver.d.ts +184 -0
  110. package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +281 -0
  111. package/vscode-dts/vscode.proposed.timeline.d.ts +163 -0
  112. package/vscode-dts/vscode.proposed.tokenInformation.d.ts +26 -0
  113. package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +30 -0
  114. package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +28 -0
  115. package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +13 -0
  116. package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +44 -0
  117. package/vscode-dts/vscode.proposed.tunnels.d.ts +64 -0
  118. package/vscode-dts/vscode.proposed.windowActivity.d.ts +17 -0
  119. package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +30 -0
  120. package/vscode/src/vs/base/common/ternarySearchTree.d.ts +0 -46
  121. package/vscode/src/vs/base/common/uriIpc.d.ts +0 -10
  122. package/vscode/src/vs/platform/workspace/common/editSessions.d.ts +0 -7
  123. package/vscode/src/vs/workbench/services/extensions/common/proxyIdentifier.d.ts +0 -44
  124. package/vscode/src/vs/workbench/services/search/common/search.d.ts +0 -52
  125. package/vscode.proposed.d.ts +0 -4787
@@ -0,0 +1,47 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ export interface SlashCommandContext {
9
+
10
+ // messages so far
11
+ history: ChatMessage[];
12
+
13
+ // TODO: access to embeddings
14
+ // embeddings: {};
15
+
16
+ // TODO: access to "InputSourceId"
17
+ // DebugConsoleOutput
18
+ // Terminal
19
+ // CorrespondingTestFile
20
+ // CorrespondingImplementationFile
21
+ // ExtensionApi
22
+ // VSCode
23
+ // Workspace
24
+ }
25
+
26
+ export interface SlashResponse {
27
+ message: MarkdownString | InteractiveProgressFileTree;
28
+ // edits?: TextEdit[] | WorkspaceEdit;
29
+ }
30
+
31
+ export interface SlashResult {
32
+ followUp?: InteractiveSessionFollowup[];
33
+ }
34
+
35
+ export interface SlashCommandMetadata {
36
+ description: string;
37
+ }
38
+
39
+ export interface SlashCommand {
40
+
41
+ (prompt: ChatMessage, context: SlashCommandContext, progress: Progress<SlashResponse>, token: CancellationToken): Thenable<SlashResult | void>;
42
+ }
43
+
44
+ export namespace chat {
45
+ export function registerSlashCommand(name: string, command: SlashCommand, metadata: SlashCommandMetadata): Disposable;
46
+ }
47
+ }
@@ -0,0 +1,35 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ export interface InteractiveRequest {
9
+ variables: Record<string, ChatVariableValue[]>;
10
+ }
11
+
12
+ export enum ChatVariableLevel {
13
+ Short = 1,
14
+ Medium = 2,
15
+ Full = 3
16
+ }
17
+
18
+ export interface ChatVariableValue {
19
+ level: ChatVariableLevel;
20
+ value: string;
21
+ description?: string;
22
+ }
23
+
24
+ export interface ChatVariableContext {
25
+ message: string;
26
+ }
27
+
28
+ export interface ChatVariableResolver {
29
+ resolve(name: string, context: ChatVariableContext, token: CancellationToken): ProviderResult<ChatVariableValue[]>;
30
+ }
31
+
32
+ export namespace chat {
33
+ export function registerVariable(name: string, description: string, resolver: ChatVariableResolver): Disposable;
34
+ }
35
+ }
@@ -0,0 +1,48 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/135591 @alexr00
9
+
10
+ // export interface FileDecorationProvider {
11
+ // provideFileDecoration(uri: Uri, token: CancellationToken): ProviderResult<FileDecoration | FileDecoration1>;
12
+ // }
13
+
14
+ /**
15
+ * A file decoration represents metadata that can be rendered with a file.
16
+ */
17
+ export class FileDecoration2 {
18
+ /**
19
+ * A very short string that represents this decoration.
20
+ */
21
+ badge?: string | ThemeIcon;
22
+
23
+ /**
24
+ * A human-readable tooltip for this decoration.
25
+ */
26
+ tooltip?: string;
27
+
28
+ /**
29
+ * The color of this decoration.
30
+ */
31
+ color?: ThemeColor;
32
+
33
+ /**
34
+ * A flag expressing that this decoration should be
35
+ * propagated to its parents.
36
+ */
37
+ propagate?: boolean;
38
+
39
+ /**
40
+ * Creates a new decoration.
41
+ *
42
+ * @param badge A letter that represents the decoration.
43
+ * @param tooltip The tooltip of the decoration.
44
+ * @param color The color of the decoration.
45
+ */
46
+ constructor(badge?: string | ThemeIcon, tooltip?: string, color?: ThemeColor);
47
+ }
48
+ }
@@ -0,0 +1,18 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/171166
9
+
10
+ export enum CommentState {
11
+ Published = 0,
12
+ Draft = 1
13
+ }
14
+
15
+ export interface Comment {
16
+ state?: CommentState;
17
+ }
18
+ }
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for the `comments/comment/editorActions` menu
@@ -0,0 +1,10 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder for comment peek context menus
7
+
8
+ // https://github.com/microsoft/vscode/issues/151533 @alexr00
9
+
10
+
@@ -0,0 +1,8 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder for comment thread additional menus
7
+
8
+ // https://github.com/microsoft/vscode/issues/163281
@@ -0,0 +1,8 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder for edit sessions contribution point from core
7
+
8
+ // https://github.com/microsoft/vscode/issues/157734 @joyceerhl
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for the `editor/content` menu
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for the `workspaceTooltip`-property of the `resourceLabelFormatters` contribution poain
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for the `menuBar/home` menu
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for `mergeEditor/*` menus
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for the `notebookPreload` contribution point
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for the `remoteHelp`-contribution point
@@ -0,0 +1,7 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for the `file/share`-submenu contribution point
7
+ // https://github.com/microsoft/vscode/issues/176316
@@ -0,0 +1,8 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder for status bar items contribution
7
+
8
+ // https://github.com/microsoft/vscode/issues/167874 @jrieken
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for the `remote`-property of the `views`-contribution
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // empty placeholder declaration for the `viewsWelcome`-contribution point
@@ -0,0 +1,29 @@
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/86146
9
+
10
+ // TODO: Also for custom editor
11
+
12
+ export interface CustomTextEditorProvider {
13
+
14
+ /**
15
+ * Handle when the underlying resource for a custom editor is renamed.
16
+ *
17
+ * This allows the webview for the editor be preserved throughout the rename. If this method is not implemented,
18
+ * the editor will destroy the previous custom editor and create a replacement one.
19
+ *
20
+ * @param newDocument New text document to use for the custom editor.
21
+ * @param existingWebviewPanel Webview panel for the custom editor.
22
+ * @param token A cancellation token that indicates the result is no longer needed.
23
+ *
24
+ * @return Thenable indicating that the webview editor has been moved.
25
+ */
26
+ // eslint-disable-next-line local/vscode-dts-provider-naming
27
+ moveCustomTextEditor?(newDocument: TextDocument, existingWebviewPanel: WebviewPanel, token: CancellationToken): Thenable<void>;
28
+ }
29
+ }
@@ -0,0 +1,74 @@
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
+ // See https://github.com/microsoft/vscode/issues/63943
9
+
10
+ export class ThreadFocus {
11
+ /**
12
+ * Create a ThreadFocus
13
+ * @param session
14
+ * @param threadId
15
+ * @param frameId
16
+ */
17
+ constructor(
18
+ session: DebugSession,
19
+ threadId?: number);
20
+
21
+
22
+ /**
23
+ * Debug session for thread.
24
+ */
25
+ readonly session: DebugSession;
26
+
27
+ /**
28
+ * Id of the associated thread (DAP id). May be undefined if thread has become unselected.
29
+ */
30
+ readonly threadId: number | undefined;
31
+ }
32
+
33
+ export class StackFrameFocus {
34
+ /**
35
+ * Create a StackFrameFocus
36
+ * @param session
37
+ * @param threadId
38
+ * @param frameId
39
+ */
40
+ constructor(
41
+ session: DebugSession,
42
+ threadId?: number,
43
+ frameId?: number);
44
+
45
+
46
+ /**
47
+ * Debug session for thread.
48
+ */
49
+ readonly session: DebugSession;
50
+
51
+ /**
52
+ * Id of the associated thread (DAP id). May be undefined if a frame is unselected.
53
+ */
54
+ readonly threadId: number | undefined;
55
+ /**
56
+ * Id of the stack frame (DAP id). May be undefined if a frame is unselected.
57
+ */
58
+ readonly frameId: number | undefined;
59
+ }
60
+
61
+
62
+ export namespace debug {
63
+ /**
64
+ * The currently focused thread or stack frame id, or `undefined` if this has not been set. (e.g. not in debug mode).
65
+ */
66
+ export let stackFrameFocus: ThreadFocus | StackFrameFocus | undefined;
67
+
68
+ /**
69
+ * An {@link Event} which fires when the {@link debug.stackFrameFocus} changes. Provides a sessionId. threadId is not undefined
70
+ * when a thread of frame has gained focus. frameId is defined when a stackFrame has gained focus.
71
+ */
72
+ export const onDidChangeStackFrameFocus: Event<ThreadFocus | StackFrameFocus | undefined>;
73
+ }
74
+ }
@@ -0,0 +1,38 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/84899
9
+
10
+ /**
11
+ * The contiguous set of modified lines in a diff.
12
+ */
13
+ export interface LineChange {
14
+ readonly originalStartLineNumber: number;
15
+ readonly originalEndLineNumber: number;
16
+ readonly modifiedStartLineNumber: number;
17
+ readonly modifiedEndLineNumber: number;
18
+ }
19
+
20
+ export namespace commands {
21
+
22
+ /**
23
+ * Registers a diff information command that can be invoked via a keyboard shortcut,
24
+ * a menu item, an action, or directly.
25
+ *
26
+ * Diff information commands are different from ordinary {@link commands.registerCommand commands} as
27
+ * they only execute when there is an active diff editor when the command is called, and the diff
28
+ * information has been computed. Also, the command handler of an editor command has access to
29
+ * the diff information.
30
+ *
31
+ * @param command A unique identifier for the command.
32
+ * @param callback A command handler function with access to the {@link LineChange diff information}.
33
+ * @param thisArg The `this` context used when invoking the handler function.
34
+ * @return Disposable which unregisters this command on disposal.
35
+ */
36
+ export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
37
+ }
38
+ }
@@ -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
+ // TODO@rebornix: add github issue link
8
+
9
+ export interface NotebookDocumentContentOptions {
10
+ /**
11
+ * Controls if a cell metadata property should be reverted when the cell content
12
+ * is reverted in notebook diff editor.
13
+ */
14
+ cellContentMetadata?: { [key: string]: boolean | undefined };
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // todo@jrieken add issue reference
9
+
10
+ export interface DocumentFilter {
11
+ readonly exclusive?: boolean;
12
+ }
13
+ }
@@ -0,0 +1,111 @@
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/30066/
9
+
10
+ /**
11
+ * Provider invoked when the user copies and pastes code.
12
+ */
13
+ interface DocumentPasteEditProvider {
14
+
15
+ /**
16
+ * Optional method invoked after the user copies text in a file.
17
+ *
18
+ * During {@link prepareDocumentPaste}, an extension can compute metadata that is attached to
19
+ * a {@link DataTransfer} and is passed back to the provider in {@link provideDocumentPasteEdits}.
20
+ *
21
+ * @param document Document where the copy took place.
22
+ * @param ranges Ranges being copied in the `document`.
23
+ * @param dataTransfer The data transfer associated with the copy. You can store additional values on this for later use in {@link provideDocumentPasteEdits}.
24
+ * @param token A cancellation token.
25
+ */
26
+ prepareDocumentPaste?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): void | Thenable<void>;
27
+
28
+ /**
29
+ * Invoked before the user pastes into a document.
30
+ *
31
+ * In this method, extensions can return a workspace edit that replaces the standard pasting behavior.
32
+ *
33
+ * @param document Document being pasted into
34
+ * @param ranges Currently selected ranges in the document.
35
+ * @param dataTransfer The data transfer associated with the paste.
36
+ * @param token A cancellation token.
37
+ *
38
+ * @return Optional workspace edit that applies the paste. Return undefined to use standard pasting.
39
+ */
40
+ provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
41
+ }
42
+
43
+ /**
44
+ * An operation applied on paste
45
+ */
46
+ class DocumentPasteEdit {
47
+
48
+ /**
49
+ * Human readable label that describes the edit.
50
+ */
51
+ label: string;
52
+
53
+ /**
54
+ * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
55
+ */
56
+ yieldTo?: ReadonlyArray<
57
+ | { readonly extensionId: string; readonly providerId: string }
58
+ | { readonly mimeType: string }
59
+ >;
60
+
61
+ /**
62
+ * The text or snippet to insert at the pasted locations.
63
+ */
64
+ insertText: string | SnippetString;
65
+
66
+ /**
67
+ * An optional additional edit to apply on paste.
68
+ */
69
+ additionalEdit?: WorkspaceEdit;
70
+
71
+ /**
72
+ * @param insertText The text or snippet to insert at the pasted locations.
73
+ *
74
+ * TODO: Reverse args, but this will break existing consumers :(
75
+ */
76
+ constructor(insertText: string | SnippetString, label: string);
77
+ }
78
+
79
+ interface DocumentPasteProviderMetadata {
80
+ /**
81
+ * Identifies the provider.
82
+ *
83
+ * This id is used when users configure the default provider for paste.
84
+ *
85
+ * This id should be unique within the extension but does not need to be unique across extensions.
86
+ */
87
+ readonly id: string;
88
+
89
+ /**
90
+ * Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
91
+ */
92
+ readonly copyMimeTypes?: readonly string[];
93
+
94
+ /**
95
+ * Mime types that {@link DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits} should be invoked for.
96
+ *
97
+ * This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
98
+ *
99
+ * Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
100
+ *
101
+ * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
102
+ * Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
103
+ * from the operating system.
104
+ */
105
+ readonly pasteMimeTypes?: readonly string[];
106
+ }
107
+
108
+ namespace languages {
109
+ export function registerDocumentPasteEditProvider(selector: DocumentSelector, provider: DocumentPasteEditProvider, metadata: DocumentPasteProviderMetadata): Disposable;
110
+ }
111
+ }
@@ -0,0 +1,60 @@
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/179430
9
+
10
+ export interface DocumentDropEdit {
11
+ /**
12
+ * Human readable label that describes the edit.
13
+ */
14
+ label?: string;
15
+
16
+ /**
17
+ * The mime type from the {@link DataTransfer} that this edit applies.
18
+ *
19
+ * TODO: Should this be taken from `dropMimeTypes` instead?
20
+ */
21
+ handledMimeType?: string;
22
+
23
+ /**
24
+ * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
25
+ */
26
+ yieldTo?: ReadonlyArray<
27
+ // TODO: what about built-in providers?
28
+ | { readonly extensionId: string; readonly providerId: string }
29
+ | { readonly mimeType: string }
30
+ >;
31
+ }
32
+
33
+ export interface DocumentDropEditProviderMetadata {
34
+ /**
35
+ * Identifies the provider.
36
+ *
37
+ * This id is used when users configure the default provider for drop.
38
+ *
39
+ * This id should be unique within the extension but does not need to be unique across extensions.
40
+ */
41
+ readonly id: string;
42
+
43
+ /**
44
+ * List of {@link DataTransfer} mime types that the provider can handle.
45
+ *
46
+ * This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
47
+ *
48
+ * Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
49
+ *
50
+ * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
51
+ * Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
52
+ * from the operating system.
53
+ */
54
+ readonly dropMimeTypes: readonly string[];
55
+ }
56
+
57
+ export namespace languages {
58
+ export function registerDocumentDropEditProvider(selector: DocumentSelector, provider: DocumentDropEditProvider, metadata?: DocumentDropEditProviderMetadata): Disposable;
59
+ }
60
+ }