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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/README.md +430 -0
  2. package/api.js +13 -7
  3. package/assets/clear.mp3 +0 -0
  4. package/assets/format.mp3 +0 -0
  5. package/assets/save.mp3 +0 -0
  6. package/contributions.js +3 -0
  7. package/extensions.d.ts +13 -3
  8. package/external/{xterm-addon-image/typings/xterm-addon-image.d.ts → @xterm/addon-image/typings/addon-image.d.ts} +1 -1
  9. package/external/{xterm → @xterm/xterm}/typings/xterm.d.ts +13 -1
  10. package/lifecycle.js +2 -2
  11. package/localExtensionHost.js +6 -3
  12. package/missing-services.js +170 -22
  13. package/monaco-editor-treemending.patch +6884 -18018
  14. package/monaco-treemending.js +2 -2
  15. package/package.json +7 -7
  16. package/service-override/tools/editor.d.ts +8 -8
  17. package/service-override/tools/editor.js +44 -19
  18. package/services.d.ts +2 -2
  19. package/services.js +3 -3
  20. package/vscode/src/vs/base/browser/broadcast.js +6 -5
  21. package/vscode/src/vs/base/browser/dnd.d.ts +6 -0
  22. package/vscode/src/vs/base/browser/mouseEvent.d.ts +1 -1
  23. package/vscode/src/vs/base/browser/touch.d.ts +10 -0
  24. package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +1 -0
  25. package/vscode/src/vs/base/browser/ui/iconLabel/iconHoverDelegate.d.ts +22 -15
  26. package/vscode/src/vs/base/browser/ui/menu/menubar.js +4 -3
  27. package/vscode/src/vs/base/browser/ui/splitview/paneview.css.js +1 -1
  28. package/vscode/src/vs/base/browser/ui/splitview/paneview.d.ts +3 -0
  29. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +34 -11
  30. package/vscode/src/vs/base/common/actions.d.ts +1 -15
  31. package/vscode/src/vs/base/common/async.d.ts +1 -31
  32. package/vscode/src/vs/base/common/event.d.ts +2 -1
  33. package/vscode/src/vs/base/common/observableInternal/base.d.ts +23 -10
  34. package/vscode/src/vs/base/common/prefixTree.js +140 -0
  35. package/vscode/src/vs/base/common/product.d.ts +16 -2
  36. package/vscode/src/vs/base/common/resourceTree.js +135 -0
  37. package/vscode/src/vs/base/common/skipList.js +1 -0
  38. package/vscode/src/vs/base/common/tfIdf.js +137 -0
  39. package/vscode/src/vs/base/common/types.d.ts +13 -1
  40. package/vscode/src/vs/base/common/verifier.js +62 -0
  41. package/vscode/src/vs/editor/browser/editorBrowser.d.ts +4 -2
  42. package/vscode/src/vs/editor/common/config/editorOptions.d.ts +23 -4
  43. package/vscode/src/vs/editor/common/core/lineRange.d.ts +1 -0
  44. package/vscode/src/vs/editor/common/core/offsetRange.d.ts +3 -0
  45. package/vscode/src/vs/editor/common/core/position.d.ts +1 -0
  46. package/vscode/src/vs/editor/common/editorCommon.d.ts +2 -1
  47. package/vscode/src/vs/editor/common/languages.d.ts +23 -1
  48. package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +2 -1
  49. package/vscode/src/vs/editor/common/services/resolverService.d.ts +11 -2
  50. package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +16 -1
  51. package/vscode/src/vs/platform/action/common/action.d.ts +8 -0
  52. package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +4 -0
  53. package/vscode/src/vs/platform/actions/browser/floatingMenu.js +26 -2
  54. package/vscode/src/vs/platform/actions/common/actions.d.ts +8 -0
  55. package/vscode/src/vs/platform/audioCues/browser/audioCueService.d.ts +6 -0
  56. package/vscode/src/vs/platform/commands/common/commands.d.ts +13 -5
  57. package/vscode/src/vs/platform/dialogs/common/dialogs.d.ts +9 -3
  58. package/vscode/src/vs/platform/dialogs/common/dialogs.js +5 -2
  59. package/vscode/src/vs/platform/editor/common/editor.d.ts +3 -15
  60. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +1 -0
  61. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -15
  62. package/vscode/src/vs/platform/extensionManagement/common/implicitActivationEvents.js +5 -0
  63. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +0 -1
  64. package/vscode/src/vs/platform/files/common/files.d.ts +72 -8
  65. package/vscode/src/vs/platform/files/common/watcher.js +77 -0
  66. package/vscode/src/vs/platform/keybinding/common/keybindingsRegistry.d.ts +2 -2
  67. package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +52 -21
  68. package/vscode/src/vs/platform/request/browser/requestService.js +3 -0
  69. package/vscode/src/vs/platform/request/common/requestIpc.js +17 -0
  70. package/vscode/src/vs/platform/storage/common/storage.js +2 -2
  71. package/vscode/src/vs/platform/telemetry/common/telemetry.d.ts +1 -0
  72. package/vscode/src/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +41 -0
  73. package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +12 -7
  74. package/vscode/src/vs/platform/terminal/common/capabilities/{commandDetectionCapability.d.ts → commandDetection/terminalCommand.d.ts} +3 -2
  75. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/terminalCommand.js +257 -0
  76. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +651 -0
  77. package/vscode/src/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +29 -0
  78. package/vscode/src/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +48 -0
  79. package/vscode/src/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +94 -0
  80. package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +37 -0
  81. package/vscode/src/vs/platform/terminal/common/terminalStrings.js +16 -0
  82. package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +319 -0
  83. package/vscode/src/vs/platform/window/common/window.d.ts +9 -2
  84. package/vscode/src/vs/platform/window/common/window.js +6 -1
  85. package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +2 -43
  86. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +113 -81
  87. package/vscode/src/vs/workbench/api/common/extHost.protocol.js +5 -4
  88. package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +25 -3
  89. package/vscode/src/vs/workbench/api/common/extHostChat.js +13 -163
  90. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +412 -0
  91. package/vscode/src/vs/workbench/api/common/extHostChatProvider.js +79 -11
  92. package/vscode/src/vs/workbench/api/common/extHostCommands.js +13 -12
  93. package/vscode/src/vs/workbench/api/common/extHostComments.js +1 -1
  94. package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +8 -6
  95. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +1 -1
  96. package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +36 -19
  97. package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +52 -31
  98. package/vscode/src/vs/workbench/api/common/extHostIssueReporter.js +38 -0
  99. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +28 -3
  100. package/vscode/src/vs/workbench/api/common/extHostLanguages.js +10 -0
  101. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +117 -2
  102. package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +32 -4
  103. package/vscode/src/vs/workbench/api/common/extHostSCM.js +85 -23
  104. package/vscode/src/vs/workbench/api/common/extHostSearch.js +3 -0
  105. package/vscode/src/vs/workbench/api/common/extHostSpeech.js +42 -0
  106. package/vscode/src/vs/workbench/api/common/extHostTask.js +2 -1
  107. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -0
  108. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +3 -3
  109. package/vscode/src/vs/workbench/api/common/extHostTesting.js +97 -47
  110. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +115 -16
  111. package/vscode/src/vs/workbench/api/common/extHostTypes.js +66 -36
  112. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +6 -1
  113. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +182 -75
  114. package/vscode/src/vs/workbench/browser/actions/windowActions.js +176 -4
  115. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +143 -2
  116. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +237 -0
  117. package/vscode/src/vs/workbench/browser/composite.d.ts +0 -4
  118. package/vscode/src/vs/workbench/browser/composite.js +5 -4
  119. package/vscode/src/vs/workbench/browser/dnd.js +72 -23
  120. package/vscode/src/vs/workbench/browser/labels.js +7 -3
  121. package/vscode/src/vs/workbench/browser/media/part.css.js +1 -1
  122. package/vscode/src/vs/workbench/browser/panecomposite.d.ts +2 -2
  123. package/vscode/src/vs/workbench/browser/panecomposite.js +2 -0
  124. package/vscode/src/vs/workbench/browser/part.js +33 -2
  125. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +99 -117
  126. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +173 -33
  127. package/vscode/src/vs/workbench/browser/parts/editor/editor.js +102 -6
  128. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +256 -17
  129. package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +4 -0
  130. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +68 -35
  131. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +5 -5
  132. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +35 -16
  133. package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +348 -0
  134. package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +43 -31
  135. package/vscode/src/vs/workbench/browser/parts/editor/media/editortabscontrol.css.js +4 -0
  136. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -0
  137. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +1 -0
  138. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +14 -2
  139. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +4 -4
  140. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +277 -0
  141. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +5 -2
  142. package/vscode/src/vs/workbench/browser/parts/panel/media/panelpart.css.js +1 -1
  143. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +3 -38
  144. package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.d.ts +54 -52
  145. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +2 -1
  146. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +25 -0
  147. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +258 -0
  148. package/vscode/src/vs/workbench/browser/parts/views/media/paneviewlet.css.js +1 -1
  149. package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +2 -5
  150. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +157 -117
  151. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +50 -23
  152. package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +26 -11
  153. package/vscode/src/vs/workbench/browser/parts/views/viewsViewlet.js +10 -6
  154. package/vscode/src/vs/workbench/browser/style.js +2 -1
  155. package/vscode/src/vs/workbench/browser/web.api.d.ts +39 -2
  156. package/vscode/src/vs/workbench/browser/window.js +55 -0
  157. package/vscode/src/vs/workbench/browser/workbench.contribution.js +220 -40
  158. package/vscode/src/vs/workbench/common/activity.js +3 -0
  159. package/vscode/src/vs/workbench/common/contextkeys.js +35 -5
  160. package/vscode/src/vs/workbench/common/contributions.js +4 -3
  161. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +14 -4
  162. package/vscode/src/vs/workbench/common/editor/diffEditorModel.js +1 -1
  163. package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +22 -19
  164. package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +4 -3
  165. package/vscode/src/vs/workbench/common/editor/editorModel.d.ts +1 -2
  166. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +22 -4
  167. package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +3 -3
  168. package/vscode/src/vs/workbench/common/editor.d.ts +60 -30
  169. package/vscode/src/vs/workbench/common/editor.js +11 -3
  170. package/vscode/src/vs/workbench/common/theme.js +2 -2
  171. package/vscode/src/vs/workbench/common/views.d.ts +4 -4
  172. package/vscode/src/vs/workbench/common/views.js +3 -1
  173. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +97 -8
  174. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +17 -99
  175. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +103 -37
  176. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +2 -3
  177. package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +127 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +71 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +2 -1
  180. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +33 -110
  181. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +64 -0
  182. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +94 -0
  183. package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +6 -1
  184. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +1 -88
  185. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +4 -4
  186. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -2
  187. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +3 -1
  188. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +15 -16
  189. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +91 -1
  190. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +9 -3
  191. package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +3 -1
  192. package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +2 -3
  193. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +1 -0
  194. package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +9 -1
  195. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +10 -1
  196. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +114 -22
  197. package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +1 -1
  198. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +4 -1
  199. package/vscode/src/vs/workbench/contrib/files/browser/explorerFileContrib.js +19 -0
  200. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +10 -8
  201. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +62 -10
  202. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +2 -1
  203. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +9 -8
  204. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +10 -1
  205. package/vscode/src/vs/workbench/contrib/files/browser/files.d.ts +1 -0
  206. package/vscode/src/vs/workbench/contrib/files/browser/files.js +7 -3
  207. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +4 -4
  208. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +64 -36
  209. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +42 -17
  210. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +145 -25
  211. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +423 -0
  212. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +82 -0
  213. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  214. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +36 -0
  215. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +3 -1
  216. package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +24 -3
  217. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +11 -6
  218. package/vscode/src/vs/workbench/contrib/scm/common/scm.js +1 -2
  219. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers.js +31 -0
  220. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +61 -41
  221. package/vscode/src/vs/workbench/contrib/search/{browser/searchNotebookHelpers.js → common/cellSearchModel.js} +4 -63
  222. package/vscode/src/vs/workbench/contrib/search/common/searchNotebookHelpers.js +40 -0
  223. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +2 -2
  224. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +3 -0
  225. package/vscode/src/vs/workbench/contrib/terminal/browser/detachedTerminal.js +92 -0
  226. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +100 -79
  227. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.d.ts +3 -3
  228. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +1 -1
  229. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalExtensions.js +25 -0
  230. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcon.js +7 -4
  231. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +64 -0
  232. package/vscode/src/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
  233. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +540 -0
  234. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +104 -0
  235. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +518 -0
  236. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
  237. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +17 -11
  238. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +814 -0
  239. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +5 -2
  240. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +2 -8
  241. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -0
  242. package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +101 -0
  243. package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +30 -0
  244. package/vscode/src/vs/workbench/contrib/testing/common/storedValue.js +36 -0
  245. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +115 -0
  246. package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +74 -0
  247. package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.js +116 -0
  248. package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.js +172 -1
  249. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +384 -0
  250. package/vscode/src/vs/workbench/contrib/testing/common/testResultService.js +156 -1
  251. package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.js +156 -0
  252. package/vscode/src/vs/workbench/contrib/testing/common/testService.js +75 -1
  253. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +72 -1
  254. package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +188 -0
  255. package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +102 -0
  256. package/vscode/src/vs/workbench/contrib/testing/common/testingDecorations.js +29 -0
  257. package/vscode/src/vs/workbench/{services/editor/browser/editorDropService.js → contrib/testing/common/testingPeekOpener.js} +2 -2
  258. package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +47 -0
  259. package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +4 -3
  260. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +8 -9
  261. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +1 -1
  262. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +5 -2
  263. package/vscode/src/vs/workbench/services/activity/browser/activityService.d.ts +16 -10
  264. package/vscode/src/vs/workbench/services/activity/common/activity.d.ts +14 -1
  265. package/vscode/src/vs/workbench/services/activity/common/activity.js +1 -7
  266. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +9 -28
  267. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +273 -0
  268. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
  269. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +2 -0
  270. package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +2 -3
  271. package/vscode/src/vs/workbench/services/editor/browser/editorService.d.ts +7 -5
  272. package/vscode/src/vs/workbench/services/editor/browser/editorService.js +59 -37
  273. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +193 -94
  274. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.js +2 -2
  275. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.d.ts +8 -2
  276. package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +8 -1
  277. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +62 -16
  278. package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +5 -3
  279. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +3 -2
  280. package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +4 -9
  281. package/vscode/src/vs/workbench/services/extensions/common/{extensionHostManager.d.ts → extensionHostManagers.d.ts} +2 -0
  282. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +1 -1
  283. package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +9 -0
  284. package/vscode/src/vs/workbench/services/extensions/common/extensions.js +22 -0
  285. package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +14 -3
  286. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +9 -0
  287. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +3 -3
  288. package/vscode/src/vs/workbench/services/history/common/history.d.ts +2 -2
  289. package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +49 -18
  290. package/vscode/src/vs/workbench/services/host/browser/host.d.ts +29 -7
  291. package/vscode/src/vs/workbench/services/hover/browser/hover.d.ts +51 -28
  292. package/vscode/src/vs/workbench/services/hover/browser/hoverService.d.ts +5 -2
  293. package/vscode/src/vs/workbench/services/keybinding/browser/unboundCommands.js +2 -2
  294. package/vscode/src/vs/workbench/services/languageStatus/common/languageStatusService.d.ts +4 -1
  295. package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +40 -36
  296. package/vscode/src/vs/workbench/services/panecomposite/browser/panecomposite.d.ts +0 -6
  297. package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +3 -0
  298. package/vscode/src/vs/workbench/services/progress/browser/progressIndicator.js +2 -2
  299. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +16 -1
  300. package/vscode/src/vs/workbench/services/request/browser/requestService.js +48 -0
  301. package/vscode/src/vs/workbench/services/search/common/searchHelpers.js +4 -4
  302. package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +10 -51
  303. package/vscode/src/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
  304. package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
  305. package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
  306. package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +428 -0
  307. package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
  308. package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +32 -1
  309. package/vscode/src/vs/workbench/services/textfile/common/textEditorService.js +1 -5
  310. package/vscode/src/vs/workbench/services/themes/browser/browserHostColorSchemeService.js +4 -3
  311. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +9 -3
  312. package/vscode/src/vs/workbench/services/title/browser/titleService.d.ts +18 -0
  313. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +18 -3
  314. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorModel.js +16 -7
  315. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +6 -0
  316. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +13 -0
  317. package/vscode/src/vs/workbench/services/url/browser/urlService.js +2 -1
  318. package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +2 -2
  319. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +9 -0
  320. package/vscode-dts/vscode.proposed.chatAgents2.d.ts +375 -0
  321. package/vscode-dts/vscode.proposed.chatAgents2Additions.d.ts +80 -0
  322. package/vscode-dts/vscode.proposed.chatProvider.d.ts +5 -1
  323. package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +68 -10
  324. package/vscode-dts/vscode.proposed.chatTab.d.ts +21 -0
  325. package/vscode-dts/vscode.proposed.chatVariables.d.ts +5 -1
  326. package/vscode-dts/vscode.proposed.codeActionAI.d.ts +16 -0
  327. package/vscode-dts/vscode.proposed.contribSourceControlInputBoxMenu.d.ts +7 -0
  328. package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +51 -0
  329. package/vscode-dts/vscode.proposed.defaultChatAgent.d.ts +30 -0
  330. package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +26 -0
  331. package/vscode-dts/vscode.proposed.interactive.d.ts +26 -100
  332. package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +14 -7
  333. package/vscode-dts/vscode.proposed.languageStatusText.d.ts +12 -0
  334. package/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts +63 -0
  335. package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +43 -0
  336. package/vscode-dts/vscode.proposed.resolvers.d.ts +100 -1
  337. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +9 -1
  338. package/vscode-dts/vscode.proposed.scmInputBoxActionButton.d.ts +19 -0
  339. package/vscode-dts/vscode.proposed.scmInputBoxValueProvider.d.ts +25 -0
  340. package/vscode-dts/vscode.proposed.speech.d.ts +35 -0
  341. package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +11 -7
  342. package/vscode-dts/vscode.proposed.testCoverage.d.ts +6 -1
  343. package/vscode-dts/vscode.proposed.testingActiveProfile.d.ts +21 -0
  344. package/external/xterm-headless/typings/xterm-headless.d.ts +0 -49
  345. package/vscode/src/vs/platform/backup/common/backup.d.ts +0 -14
  346. package/vscode/src/vs/platform/update/common/update.d.ts +0 -112
  347. package/vscode/src/vs/workbench/api/common/extHostChatAgents.js +0 -62
  348. package/vscode/src/vs/workbench/api/common/extHostChatSlashCommand.js +0 -62
  349. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +0 -56
  350. package/vscode/src/vs/workbench/services/files/common/files.js +0 -4
  351. package/vscode/src/vs/workbench/services/host/browser/browserHostService.d.ts +0 -41
  352. package/vscode/src/vs/workbench/services/title/common/titleService.d.ts +0 -31
  353. package/vscode-dts/vscode.proposed.chatAgents.d.ts +0 -39
  354. package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +0 -47
  355. package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +0 -45
  356. /package/external/{xterm-addon-canvas/typings/xterm-addon-canvas.d.ts → @xterm/addon-canvas/typings/addon-canvas.d.ts} +0 -0
  357. /package/external/{xterm-addon-search/typings/xterm-addon-search.d.ts → @xterm/addon-search/typings/addon-search.d.ts} +0 -0
  358. /package/external/{xterm-addon-serialize/typings/xterm-addon-serialize.d.ts → @xterm/addon-serialize/typings/addon-serialize.d.ts} +0 -0
  359. /package/external/{xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts → @xterm/addon-unicode11/typings/addon-unicode11.d.ts} +0 -0
  360. /package/external/{xterm-addon-webgl/typings/xterm-addon-webgl.d.ts → @xterm/addon-webgl/typings/addon-webgl.d.ts} +0 -0
  361. /package/vscode/src/vs/workbench/services/title/{common → browser}/titleService.js +0 -0
@@ -1,3 +1,158 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { findFirstIdxMonotonousOrArrLen } from 'monaco-editor/esm/vs/base/common/arraysFind.js';
3
+ import { RunOnceScheduler } from 'monaco-editor/esm/vs/base/common/async.js';
4
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
5
+ import { createSingleCallFunction } from 'monaco-editor/esm/vs/base/common/functional.js';
6
+ import { Disposable, toDisposable, dispose, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
7
+ import { generateUuid } from 'monaco-editor/esm/vs/base/common/uuid.js';
8
+ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
1
9
  import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
10
+ import { TestingContextKeys } from './testingContextKeys.js';
11
+ import { ITestProfileService } from './testProfileService.js';
12
+ import { LiveTestResult } from './testResult.js';
13
+ import { RETAIN_MAX_RESULTS, ITestResultStorage } from './testResultStorage.js';
14
+ const isRunningTests = (service) => service.results.length > 0 && service.results[0].completedAt === undefined;
2
15
  const ITestResultService = ( createDecorator('testResultService'));
3
- export { ITestResultService };
16
+ let TestResultService = class TestResultService extends Disposable {
17
+ get results() {
18
+ this.loadResults();
19
+ return this._results;
20
+ }
21
+ constructor(contextKeyService, storage, testProfiles) {
22
+ super();
23
+ this.storage = storage;
24
+ this.testProfiles = testProfiles;
25
+ this.changeResultEmitter = this._register(( new Emitter()));
26
+ this._results = [];
27
+ this._resultsDisposables = [];
28
+ this.testChangeEmitter = this._register(( new Emitter()));
29
+ this.onResultsChanged = this.changeResultEmitter.event;
30
+ this.onTestChanged = this.testChangeEmitter.event;
31
+ this.loadResults = createSingleCallFunction(() => this.storage.read().then(loaded => {
32
+ for (let i = loaded.length - 1; i >= 0; i--) {
33
+ this.push(loaded[i]);
34
+ }
35
+ }));
36
+ this.persistScheduler = ( new RunOnceScheduler(() => this.persistImmediately(), 500));
37
+ this._register(toDisposable(() => dispose(this._resultsDisposables)));
38
+ this.isRunning = TestingContextKeys.isRunning.bindTo(contextKeyService);
39
+ this.hasAnyResults = TestingContextKeys.hasAnyResults.bindTo(contextKeyService);
40
+ }
41
+ getStateById(extId) {
42
+ for (const result of this.results) {
43
+ const lookup = result.getStateById(extId);
44
+ if (lookup && lookup.computedState !== 0 ) {
45
+ return [result, lookup];
46
+ }
47
+ }
48
+ return undefined;
49
+ }
50
+ createLiveResult(req) {
51
+ if ('targets' in req) {
52
+ const id = generateUuid();
53
+ return this.push(( new LiveTestResult(id, true, req)));
54
+ }
55
+ let profile;
56
+ if (req.profile) {
57
+ const profiles = this.testProfiles.getControllerProfiles(req.controllerId);
58
+ profile = profiles.find(c => c.profileId === req.profile.id);
59
+ }
60
+ const resolved = {
61
+ isUiTriggered: false,
62
+ targets: [],
63
+ exclude: req.exclude,
64
+ continuous: req.continuous,
65
+ };
66
+ if (profile) {
67
+ resolved.targets.push({
68
+ profileGroup: profile.group,
69
+ profileId: profile.profileId,
70
+ controllerId: req.controllerId,
71
+ testIds: req.include,
72
+ });
73
+ }
74
+ return this.push(( new LiveTestResult(req.id, req.persist, resolved)));
75
+ }
76
+ push(result) {
77
+ if (result.completedAt === undefined) {
78
+ this.results.unshift(result);
79
+ }
80
+ else {
81
+ const index = findFirstIdxMonotonousOrArrLen(this.results, r => r.completedAt !== undefined && r.completedAt <= result.completedAt);
82
+ this.results.splice(index, 0, result);
83
+ this.persistScheduler.schedule();
84
+ }
85
+ this.hasAnyResults.set(true);
86
+ if (this.results.length > RETAIN_MAX_RESULTS) {
87
+ this.results.pop();
88
+ this._resultsDisposables.pop()?.dispose();
89
+ }
90
+ const ds = ( new DisposableStore());
91
+ this._resultsDisposables.push(ds);
92
+ if (result instanceof LiveTestResult) {
93
+ ds.add(result);
94
+ ds.add(result.onComplete(() => this.onComplete(result)));
95
+ ds.add(result.onChange(this.testChangeEmitter.fire, this.testChangeEmitter));
96
+ this.isRunning.set(true);
97
+ this.changeResultEmitter.fire({ started: result });
98
+ }
99
+ else {
100
+ this.changeResultEmitter.fire({ inserted: result });
101
+ for (const item of result.tests) {
102
+ for (const otherResult of this.results) {
103
+ if (otherResult === result) {
104
+ this.testChangeEmitter.fire({ item, result, reason: 0 });
105
+ break;
106
+ }
107
+ else if (otherResult.getStateById(item.item.extId) !== undefined) {
108
+ break;
109
+ }
110
+ }
111
+ }
112
+ }
113
+ return result;
114
+ }
115
+ getResult(id) {
116
+ return this.results.find(r => r.id === id);
117
+ }
118
+ clear() {
119
+ const keep = [];
120
+ const removed = [];
121
+ for (const result of this.results) {
122
+ if (result.completedAt !== undefined) {
123
+ removed.push(result);
124
+ }
125
+ else {
126
+ keep.push(result);
127
+ }
128
+ }
129
+ this._results = keep;
130
+ this.persistScheduler.schedule();
131
+ if (keep.length === 0) {
132
+ this.hasAnyResults.set(false);
133
+ }
134
+ this.changeResultEmitter.fire({ removed });
135
+ }
136
+ onComplete(result) {
137
+ this.resort();
138
+ this.updateIsRunning();
139
+ this.persistScheduler.schedule();
140
+ this.changeResultEmitter.fire({ completed: result });
141
+ }
142
+ resort() {
143
+ this.results.sort((a, b) => (b.completedAt ?? Number.MAX_SAFE_INTEGER) - (a.completedAt ?? Number.MAX_SAFE_INTEGER));
144
+ }
145
+ updateIsRunning() {
146
+ this.isRunning.set(isRunningTests(this));
147
+ }
148
+ async persistImmediately() {
149
+ await this.loadResults();
150
+ this.storage.persist(this.results);
151
+ }
152
+ };
153
+ TestResultService = ( __decorate([
154
+ ( __param(0, IContextKeyService)),
155
+ ( __param(1, ITestResultStorage)),
156
+ ( __param(2, ITestProfileService))
157
+ ], TestResultService));
158
+ export { ITestResultService, TestResultService };
@@ -0,0 +1,156 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { VSBuffer, bufferToStream, newWriteableBufferStream } from 'monaco-editor/esm/vs/base/common/buffer.js';
3
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import { isDefined } from 'monaco-editor/esm/vs/base/common/types.js';
5
+ import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
6
+ import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
7
+ import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
8
+ import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
9
+ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
10
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
11
+ import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
12
+ import { StoredValue } from './storedValue.js';
13
+ import { HydratedTestResult } from './testResult.js';
14
+ const RETAIN_MAX_RESULTS = 128;
15
+ const RETAIN_MIN_RESULTS = 16;
16
+ const RETAIN_MAX_BYTES = 1024 * 128;
17
+ const CLEANUP_PROBABILITY = 0.2;
18
+ const ITestResultStorage = ( createDecorator('ITestResultStorage'));
19
+ const currentRevision = 1;
20
+ let BaseTestResultStorage = class BaseTestResultStorage extends Disposable {
21
+ constructor(storageService, logService) {
22
+ super();
23
+ this.storageService = storageService;
24
+ this.logService = logService;
25
+ this.stored = this._register(( new StoredValue({
26
+ key: 'storedTestResults',
27
+ scope: 1 ,
28
+ target: 1
29
+ }, this.storageService)));
30
+ }
31
+ async read() {
32
+ const results = await Promise.all(( this.stored.get([]).map(async ({ id, rev }) => {
33
+ if (rev !== currentRevision) {
34
+ return undefined;
35
+ }
36
+ try {
37
+ const contents = await this.readForResultId(id);
38
+ if (!contents) {
39
+ return undefined;
40
+ }
41
+ return ( new HydratedTestResult(contents));
42
+ }
43
+ catch (e) {
44
+ this.logService.warn(`Error deserializing stored test result ${id}`, e);
45
+ return undefined;
46
+ }
47
+ })));
48
+ return results.filter(isDefined);
49
+ }
50
+ getResultOutputWriter(resultId) {
51
+ const stream = newWriteableBufferStream();
52
+ this.storeOutputForResultId(resultId, stream);
53
+ return stream;
54
+ }
55
+ async persist(results) {
56
+ const toDelete = ( new Map(( this.stored.get([]).map(({ id, bytes }) => [id, bytes]))));
57
+ const toStore = [];
58
+ const todo = [];
59
+ let budget = RETAIN_MAX_BYTES;
60
+ for (let i = 0; i < results.length && i < RETAIN_MAX_RESULTS && (budget > 0 || toStore.length < RETAIN_MIN_RESULTS); i++) {
61
+ const result = results[i];
62
+ const existingBytes = toDelete.get(result.id);
63
+ if (existingBytes !== undefined) {
64
+ toDelete.delete(result.id);
65
+ toStore.push({ id: result.id, rev: currentRevision, bytes: existingBytes });
66
+ budget -= existingBytes;
67
+ continue;
68
+ }
69
+ const obj = result.toJSON();
70
+ if (!obj) {
71
+ continue;
72
+ }
73
+ const contents = VSBuffer.fromString(JSON.stringify(obj));
74
+ todo.push(this.storeForResultId(result.id, obj));
75
+ toStore.push({ id: result.id, rev: currentRevision, bytes: contents.byteLength });
76
+ budget -= contents.byteLength;
77
+ }
78
+ for (const id of ( toDelete.keys())) {
79
+ todo.push(this.deleteForResultId(id).catch(() => undefined));
80
+ }
81
+ this.stored.store(toStore);
82
+ await Promise.all(todo);
83
+ }
84
+ };
85
+ BaseTestResultStorage = ( __decorate([
86
+ ( __param(0, IStorageService)),
87
+ ( __param(1, ILogService))
88
+ ], BaseTestResultStorage));
89
+ let TestResultStorage = class TestResultStorage extends BaseTestResultStorage {
90
+ constructor(storageService, logService, workspaceContext, fileService, environmentService) {
91
+ super(storageService, logService);
92
+ this.fileService = fileService;
93
+ this.directory = URI.joinPath(environmentService.workspaceStorageHome, workspaceContext.getWorkspace().id, 'testResults');
94
+ }
95
+ async readForResultId(id) {
96
+ const contents = await this.fileService.readFile(this.getResultJsonPath(id));
97
+ return JSON.parse(( contents.value.toString()));
98
+ }
99
+ storeForResultId(id, contents) {
100
+ return this.fileService.writeFile(this.getResultJsonPath(id), VSBuffer.fromString(JSON.stringify(contents)));
101
+ }
102
+ deleteForResultId(id) {
103
+ return this.fileService.del(this.getResultJsonPath(id)).catch(() => undefined);
104
+ }
105
+ async readOutputRangeForResultId(id, offset, length) {
106
+ try {
107
+ const { value } = await this.fileService.readFile(this.getResultOutputPath(id), { position: offset, length });
108
+ return value;
109
+ }
110
+ catch {
111
+ return VSBuffer.alloc(0);
112
+ }
113
+ }
114
+ async readOutputForResultId(id) {
115
+ try {
116
+ const { value } = await this.fileService.readFileStream(this.getResultOutputPath(id));
117
+ return value;
118
+ }
119
+ catch {
120
+ return bufferToStream(VSBuffer.alloc(0));
121
+ }
122
+ }
123
+ async storeOutputForResultId(id, input) {
124
+ await this.fileService.createFile(this.getResultOutputPath(id), input);
125
+ }
126
+ async persist(results) {
127
+ await super.persist(results);
128
+ if (Math.random() < CLEANUP_PROBABILITY) {
129
+ await this.cleanupDereferenced();
130
+ }
131
+ }
132
+ async cleanupDereferenced() {
133
+ const { children } = await this.fileService.resolve(this.directory);
134
+ if (!children) {
135
+ return;
136
+ }
137
+ const stored = ( new Set(( this.stored.get([]).filter(s => s.rev === currentRevision).map(s => s.id))));
138
+ await Promise.all(( children
139
+ .filter(child => !( stored.has(child.name.replace(/\.[a-z]+$/, ''))))
140
+ .map(child => this.fileService.del(child.resource).catch(() => undefined))));
141
+ }
142
+ getResultJsonPath(id) {
143
+ return URI.joinPath(this.directory, `${id}.json`);
144
+ }
145
+ getResultOutputPath(id) {
146
+ return URI.joinPath(this.directory, `${id}.output`);
147
+ }
148
+ };
149
+ TestResultStorage = ( __decorate([
150
+ ( __param(0, IStorageService)),
151
+ ( __param(1, ILogService)),
152
+ ( __param(2, IWorkspaceContextService)),
153
+ ( __param(3, IFileService)),
154
+ ( __param(4, IEnvironmentService))
155
+ ], TestResultStorage));
156
+ export { BaseTestResultStorage, ITestResultStorage, RETAIN_MAX_RESULTS, TestResultStorage };
@@ -1,3 +1,77 @@
1
+ import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
2
+ import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
1
3
  import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
4
+ import { TestId } from './testId.js';
2
5
  const ITestService = ( createDecorator('testService'));
3
- export { ITestService };
6
+ const testCollectionIsEmpty = (collection) => !( Iterable.some(collection.rootItems, r => r.children.size > 0));
7
+ const getContextForTestItem = (collection, id) => {
8
+ if (typeof id === 'string') {
9
+ id = TestId.fromString(id);
10
+ }
11
+ if (id.isRoot) {
12
+ return { controller: ( id.toString()) };
13
+ }
14
+ const context = { $mid: 16 , tests: [] };
15
+ for (const i of id.idsFromRoot()) {
16
+ if (!i.isRoot) {
17
+ const test = collection.getNodeById(( i.toString()));
18
+ if (test) {
19
+ context.tests.push(test);
20
+ }
21
+ }
22
+ }
23
+ return context;
24
+ };
25
+ const expandAndGetTestById = async (collection, id, ct = CancellationToken.None) => {
26
+ const idPath = [...TestId.fromString(id).idsFromRoot()];
27
+ let expandToLevel = 0;
28
+ for (let i = idPath.length - 1; !ct.isCancellationRequested && i >= expandToLevel;) {
29
+ const id = ( idPath[i].toString());
30
+ const existing = collection.getNodeById(id);
31
+ if (!existing) {
32
+ i--;
33
+ continue;
34
+ }
35
+ if (i === idPath.length - 1) {
36
+ return existing;
37
+ }
38
+ if (!( existing.children.has(( idPath[i + 1].toString())))) {
39
+ await collection.expand(id, 0);
40
+ }
41
+ expandToLevel = i + 1;
42
+ i = idPath.length - 1;
43
+ }
44
+ return undefined;
45
+ };
46
+ const waitForTestToBeIdle = (testService, test) => {
47
+ if (!test.item.busy) {
48
+ return;
49
+ }
50
+ return ( new Promise(resolve => {
51
+ const l = testService.onDidProcessDiff(() => {
52
+ if (testService.collection.getNodeById(test.item.extId)?.item.busy !== true) {
53
+ resolve();
54
+ l.dispose();
55
+ }
56
+ });
57
+ }));
58
+ };
59
+ const testsInFile = async function* (testService, ident, uri, waitForIdle = true) {
60
+ for (const test of testService.collection.all) {
61
+ if (!test.item.uri) {
62
+ continue;
63
+ }
64
+ if (ident.extUri.isEqual(uri, test.item.uri)) {
65
+ yield test;
66
+ }
67
+ if (ident.extUri.isEqualOrParent(uri, test.item.uri)) {
68
+ if (test.expand === 1 ) {
69
+ await testService.collection.expand(test.item.extId, 1);
70
+ }
71
+ if (waitForIdle) {
72
+ await waitForTestToBeIdle(testService, test);
73
+ }
74
+ }
75
+ }
76
+ };
77
+ export { ITestService, expandAndGetTestById, getContextForTestItem, testCollectionIsEmpty, testsInFile };
@@ -1,6 +1,15 @@
1
1
  import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
2
+ import { Position } from 'monaco-editor/esm/vs/editor/common/core/position.js';
2
3
  import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
3
4
  import { TestId } from './testId.js';
5
+ const testRunProfileBitsetList = [
6
+ 2 ,
7
+ 4 ,
8
+ 8 ,
9
+ 16 ,
10
+ 32 ,
11
+ 64 ,
12
+ ];
4
13
  const isStartControllerTests = (t) => 'runId' in t;
5
14
  var IRichLocation;
6
15
  ( (function(IRichLocation) {
@@ -210,6 +219,68 @@ var TestResultItem;
210
219
  retired: true,
211
220
  });
212
221
  })(TestResultItem || (TestResultItem = {})));
222
+ var ICoveredCount;
223
+ ( (function(ICoveredCount) {
224
+ ICoveredCount.empty = () => ({ covered: 0, total: 0 });
225
+ ICoveredCount.sum = (target, src) => {
226
+ target.covered += src.covered;
227
+ target.total += src.total;
228
+ };
229
+ })(ICoveredCount || (ICoveredCount = {})));
230
+ var IFileCoverage;
231
+ ( (function(IFileCoverage) {
232
+ IFileCoverage.serialize = (original) => ({
233
+ statement: original.statement,
234
+ branch: original.branch,
235
+ function: original.function,
236
+ details: original.details?.map(CoverageDetails.serialize),
237
+ uri: original.uri.toJSON(),
238
+ });
239
+ IFileCoverage.deserialize = (serialized) => ({
240
+ statement: serialized.statement,
241
+ branch: serialized.branch,
242
+ function: serialized.function,
243
+ details: serialized.details?.map(CoverageDetails.deserialize),
244
+ uri: ( URI.from(serialized.uri)),
245
+ });
246
+ })(IFileCoverage || (IFileCoverage = {})));
247
+ function serializeThingWithLocation(serialized) {
248
+ return {
249
+ ...serialized,
250
+ location: serialized.location?.toJSON(),
251
+ };
252
+ }
253
+ function deserializeThingWithLocation(serialized) {
254
+ serialized.location = serialized.location ? (Position.isIPosition(serialized.location) ? Position.lift(serialized.location) : Range.lift(serialized.location)) : undefined;
255
+ return serialized;
256
+ }
257
+ const KEEP_N_LAST_COVERAGE_REPORTS = 3;
258
+ var CoverageDetails;
259
+ ( (function(CoverageDetails) {
260
+ CoverageDetails.serialize = (original) => original.type === 0 ? IFunctionCoverage.serialize(original) : IStatementCoverage.serialize(original);
261
+ CoverageDetails.deserialize = (serialized) => serialized.type === 0 ? IFunctionCoverage.deserialize(serialized) : IStatementCoverage.deserialize(serialized);
262
+ })(CoverageDetails || (CoverageDetails = {})));
263
+ var IBranchCoverage;
264
+ ( (function(IBranchCoverage) {
265
+ IBranchCoverage.serialize = serializeThingWithLocation;
266
+ IBranchCoverage.deserialize = deserializeThingWithLocation;
267
+ })(IBranchCoverage || (IBranchCoverage = {})));
268
+ var IFunctionCoverage;
269
+ ( (function(IFunctionCoverage) {
270
+ IFunctionCoverage.serialize = serializeThingWithLocation;
271
+ IFunctionCoverage.deserialize = deserializeThingWithLocation;
272
+ })(IFunctionCoverage || (IFunctionCoverage = {})));
273
+ var IStatementCoverage;
274
+ ( (function(IStatementCoverage) {
275
+ IStatementCoverage.serialize = (original) => ({
276
+ ...serializeThingWithLocation(original),
277
+ branches: original.branches?.map(IBranchCoverage.serialize),
278
+ });
279
+ IStatementCoverage.deserialize = (serialized) => ({
280
+ ...deserializeThingWithLocation(serialized),
281
+ branches: serialized.branches?.map(IBranchCoverage.deserialize),
282
+ });
283
+ })(IStatementCoverage || (IStatementCoverage = {})));
213
284
  var TestsDiffOp;
214
285
  ( (function(TestsDiffOp) {
215
286
  TestsDiffOp.deserialize = (u) => {
@@ -354,4 +425,4 @@ class AbstractIncrementalTestCollection {
354
425
  return {};
355
426
  }
356
427
  }
357
- export { AbstractIncrementalTestCollection, IRichLocation, ITestErrorMessage, ITestItem, ITestItemUpdate, ITestMessage, ITestOutputMessage, ITestTaskState, InternalTestItem, TestResultItem, TestsDiffOp, applyTestItemUpdate, denamespaceTestTag, getMarkId, isStartControllerTests, namespaceTestTag };
428
+ export { AbstractIncrementalTestCollection, CoverageDetails, IBranchCoverage, ICoveredCount, IFileCoverage, IFunctionCoverage, IRichLocation, IStatementCoverage, ITestErrorMessage, ITestItem, ITestItemUpdate, ITestMessage, ITestOutputMessage, ITestTaskState, InternalTestItem, KEEP_N_LAST_COVERAGE_REPORTS, TestResultItem, TestsDiffOp, applyTestItemUpdate, denamespaceTestTag, getMarkId, isStartControllerTests, namespaceTestTag, testRunProfileBitsetList };
@@ -0,0 +1,188 @@
1
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
2
+ import { RawContextKey } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
3
+ var TestingContextKeys;
4
+ ( (function(TestingContextKeys) {
5
+ TestingContextKeys.providerCount = ( new RawContextKey('testing.providerCount', 0));
6
+ TestingContextKeys.canRefreshTests = ( new RawContextKey(
7
+ 'testing.canRefresh',
8
+ false,
9
+ { type: 'boolean', description: ( localizeWithPath(
10
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
11
+ 'testing.canRefresh',
12
+ 'Indicates whether any test controller has an attached refresh handler.'
13
+ )) }
14
+ ));
15
+ TestingContextKeys.isRefreshingTests = ( new RawContextKey(
16
+ 'testing.isRefreshing',
17
+ false,
18
+ { type: 'boolean', description: ( localizeWithPath(
19
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
20
+ 'testing.isRefreshing',
21
+ 'Indicates whether any test controller is currently refreshing tests.'
22
+ )) }
23
+ ));
24
+ TestingContextKeys.isContinuousModeOn = ( new RawContextKey(
25
+ 'testing.isContinuousModeOn',
26
+ false,
27
+ { type: 'boolean', description: ( localizeWithPath(
28
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
29
+ 'testing.isContinuousModeOn',
30
+ 'Indicates whether continuous test mode is on.'
31
+ )) }
32
+ ));
33
+ TestingContextKeys.hasDebuggableTests = ( new RawContextKey(
34
+ 'testing.hasDebuggableTests',
35
+ false,
36
+ { type: 'boolean', description: ( localizeWithPath(
37
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
38
+ 'testing.hasDebuggableTests',
39
+ 'Indicates whether any test controller has registered a debug configuration'
40
+ )) }
41
+ ));
42
+ TestingContextKeys.hasRunnableTests = ( new RawContextKey(
43
+ 'testing.hasRunnableTests',
44
+ false,
45
+ { type: 'boolean', description: ( localizeWithPath(
46
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
47
+ 'testing.hasRunnableTests',
48
+ 'Indicates whether any test controller has registered a run configuration'
49
+ )) }
50
+ ));
51
+ TestingContextKeys.hasCoverableTests = ( new RawContextKey(
52
+ 'testing.hasCoverableTests',
53
+ false,
54
+ { type: 'boolean', description: ( localizeWithPath(
55
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
56
+ 'testing.hasCoverableTests',
57
+ 'Indicates whether any test controller has registered a coverage configuration'
58
+ )) }
59
+ ));
60
+ TestingContextKeys.hasNonDefaultProfile = ( new RawContextKey(
61
+ 'testing.hasNonDefaultProfile',
62
+ false,
63
+ { type: 'boolean', description: ( localizeWithPath(
64
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
65
+ 'testing.hasNonDefaultConfig',
66
+ 'Indicates whether any test controller has registered a non-default configuration'
67
+ )) }
68
+ ));
69
+ TestingContextKeys.hasConfigurableProfile = ( new RawContextKey(
70
+ 'testing.hasConfigurableProfile',
71
+ false,
72
+ { type: 'boolean', description: ( localizeWithPath(
73
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
74
+ 'testing.hasConfigurableConfig',
75
+ 'Indicates whether any test configuration can be configured'
76
+ )) }
77
+ ));
78
+ TestingContextKeys.supportsContinuousRun = ( new RawContextKey(
79
+ 'testing.supportsContinuousRun',
80
+ false,
81
+ { type: 'boolean', description: ( localizeWithPath(
82
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
83
+ 'testing.supportsContinuousRun',
84
+ 'Indicates whether continous test running is supported'
85
+ )) }
86
+ ));
87
+ TestingContextKeys.isParentRunningContinuously = ( new RawContextKey(
88
+ 'testing.isParentRunningContinuously',
89
+ false,
90
+ { type: 'boolean', description: ( localizeWithPath(
91
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
92
+ 'testing.isParentRunningContinuously',
93
+ 'Indicates whether the parent of a test is continuously running, set in the menu context of test items'
94
+ )) }
95
+ ));
96
+ TestingContextKeys.activeEditorHasTests = ( new RawContextKey(
97
+ 'testing.activeEditorHasTests',
98
+ false,
99
+ { type: 'boolean', description: ( localizeWithPath(
100
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
101
+ 'testing.activeEditorHasTests',
102
+ 'Indicates whether any tests are present in the current editor'
103
+ )) }
104
+ ));
105
+ TestingContextKeys.isTestCoverageOpen = ( new RawContextKey(
106
+ 'testing.isTestCoverageOpen',
107
+ false,
108
+ { type: 'boolean', description: ( localizeWithPath(
109
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
110
+ 'testing.isTestCoverageOpen',
111
+ 'Indicates whether a test coverage report is open'
112
+ )) }
113
+ ));
114
+ TestingContextKeys.capabilityToContextKey = {
115
+ [2 ]: TestingContextKeys.hasRunnableTests,
116
+ [8 ]: TestingContextKeys.hasCoverableTests,
117
+ [4 ]: TestingContextKeys.hasDebuggableTests,
118
+ [16 ]: TestingContextKeys.hasNonDefaultProfile,
119
+ [32 ]: TestingContextKeys.hasConfigurableProfile,
120
+ [64 ]: TestingContextKeys.supportsContinuousRun,
121
+ };
122
+ TestingContextKeys.hasAnyResults = ( new RawContextKey('testing.hasAnyResults', false));
123
+ TestingContextKeys.viewMode = ( new RawContextKey('testing.explorerViewMode', "list" ));
124
+ TestingContextKeys.viewSorting = ( new RawContextKey(
125
+ 'testing.explorerViewSorting',
126
+ "location"
127
+ ));
128
+ TestingContextKeys.isRunning = ( new RawContextKey('testing.isRunning', false));
129
+ TestingContextKeys.isInPeek = ( new RawContextKey('testing.isInPeek', false));
130
+ TestingContextKeys.isPeekVisible = ( new RawContextKey('testing.isPeekVisible', false));
131
+ TestingContextKeys.peekItemType = ( new RawContextKey('peekItemType', undefined, {
132
+ type: 'string',
133
+ description: ( localizeWithPath(
134
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
135
+ 'testing.peekItemType',
136
+ 'Type of the item in the output peek view. Either a "test", "message", "task", or "result".'
137
+ )),
138
+ }));
139
+ TestingContextKeys.controllerId = ( new RawContextKey('controllerId', undefined, {
140
+ type: 'string',
141
+ description: ( localizeWithPath(
142
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
143
+ 'testing.controllerId',
144
+ 'Controller ID of the current test item'
145
+ ))
146
+ }));
147
+ TestingContextKeys.testItemExtId = ( new RawContextKey('testId', undefined, {
148
+ type: 'string',
149
+ description: ( localizeWithPath(
150
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
151
+ 'testing.testId',
152
+ 'ID of the current test item, set when creating or opening menus on test items'
153
+ ))
154
+ }));
155
+ TestingContextKeys.testItemHasUri = ( new RawContextKey('testing.testItemHasUri', false, {
156
+ type: 'boolean',
157
+ description: ( localizeWithPath(
158
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
159
+ 'testing.testItemHasUri',
160
+ 'Boolean indicating whether the test item has a URI defined'
161
+ ))
162
+ }));
163
+ TestingContextKeys.testItemIsHidden = ( new RawContextKey('testing.testItemIsHidden', false, {
164
+ type: 'boolean',
165
+ description: ( localizeWithPath(
166
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
167
+ 'testing.testItemIsHidden',
168
+ 'Boolean indicating whether the test item is hidden'
169
+ ))
170
+ }));
171
+ TestingContextKeys.testMessageContext = ( new RawContextKey('testMessage', undefined, {
172
+ type: 'string',
173
+ description: ( localizeWithPath(
174
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
175
+ 'testing.testMessage',
176
+ 'Value set in `testMessage.contextValue`, available in editor/content and testing/message/context'
177
+ ))
178
+ }));
179
+ TestingContextKeys.testResultOutdated = ( new RawContextKey('testResultOutdated', undefined, {
180
+ type: 'boolean',
181
+ description: ( localizeWithPath(
182
+ 'vs/workbench/contrib/testing/common/testingContextKeys',
183
+ 'testing.testResultOutdated',
184
+ 'Value available in editor/content and testing/message/context when the result is outdated'
185
+ ))
186
+ }));
187
+ })(TestingContextKeys || (TestingContextKeys = {})));
188
+ export { TestingContextKeys };