@codingame/monaco-vscode-api 1.83.8 → 1.83.9

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