@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,4 +1,4 @@
1
- import { IBufferCell } from '../../../../../../../external/xterm/typings/xterm.js';
1
+ import { IBufferCell } from '../../../../../../../external/@xterm/xterm/typings/xterm.js';
2
2
 
3
3
  /*---------------------------------------------------------------------------------------------
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -11,6 +11,7 @@ type XtermAttributes = Omit<IBufferCell, 'getWidth' | 'getChars' | 'getCode'> &
11
11
 
12
12
  interface IXtermCore {
13
13
  viewport?: {
14
+ readonly scrollBarWidth: number;
14
15
  _innerRefresh(): void;
15
16
  };
16
17
  _onData: IEventEmitter<string>;
@@ -39,7 +40,9 @@ interface IXtermCore {
39
40
  }
40
41
  },
41
42
  _renderer: {
42
- _renderLayers?: any[];
43
+ value?: {
44
+ _renderLayers?: any[];
45
+ }
43
46
  };
44
47
  _handleIntersectionChange: any;
45
48
  };
@@ -6,7 +6,7 @@ import { ThemeIcon } from '../../../../base/common/themables.js';
6
6
  import { URI } from '../../../../base/common/uri.js';
7
7
  import { ITerminalCapabilityStore } from '../../../../platform/terminal/common/capabilities/capabilities.js';
8
8
  import { IMergedEnvironmentVariableCollection } from '../../../../platform/terminal/common/environmentVariable.js';
9
- import { IShellLaunchConfig, TitleEventSource, IFixedTerminalDimensions, IProcessProperty, IProcessReadyWindowsPty, ITerminalLaunchError, TerminalLocationString, ITerminalBackend, ITerminalProfileObject } from '../../../../platform/terminal/common/terminal.js';
9
+ import { TitleEventSource, IFixedTerminalDimensions, IProcessProperty, IProcessReadyWindowsPty, ITerminalLaunchError, TerminalLocationString, ITerminalBackend, ITerminalProfileObject } from '../../../../platform/terminal/common/terminal.js';
10
10
  import { IEnvironmentVariableInfo } from './environmentVariable.js';
11
11
 
12
12
  type FontWeight = 'normal' | 'bold' | number;
@@ -126,12 +126,6 @@ interface ITerminalConfiguration {
126
126
  smoothScrolling: boolean;
127
127
  ignoreBracketedPasteMode: boolean;
128
128
  }
129
- interface ITerminalConfigHelper {
130
- config: ITerminalConfiguration;
131
- configFontIsMonospace(): boolean;
132
- getFont(): ITerminalFont;
133
- showRecommendations(shellLaunchConfig: IShellLaunchConfig): void;
134
- }
135
129
  interface ITerminalFont {
136
130
  fontFamily: string;
137
131
  fontSize: number;
@@ -240,4 +234,4 @@ interface ITerminalStatusHoverAction {
240
234
  run: () => void;
241
235
  }
242
236
 
243
- export { type ConfirmOnExit, type ConfirmOnKill, type FontWeight, type IRemoteTerminalAttachTarget, type IStartExtensionTerminalRequest, type ITerminalConfigHelper, type ITerminalConfiguration, type ITerminalFont, type ITerminalProcessExtHostProxy, type ITerminalProcessInfo, type ITerminalProfiles, type ITerminalStatus, type ITerminalStatusHoverAction, ProcessState };
237
+ export { type ConfirmOnExit, type ConfirmOnKill, type FontWeight, type IRemoteTerminalAttachTarget, type IStartExtensionTerminalRequest, type ITerminalConfiguration, type ITerminalFont, type ITerminalProcessExtHostProxy, type ITerminalProcessInfo, type ITerminalProfiles, type ITerminalStatus, type ITerminalStatusHoverAction, ProcessState };
@@ -20,7 +20,9 @@ const DEFAULT_COMMANDS_TO_SKIP_SHELL = [
20
20
  "workbench.action.terminal.copyAndClearSelection" ,
21
21
  "workbench.action.terminal.copySelection" ,
22
22
  "workbench.action.terminal.copySelectionAsHtml" ,
23
+ "workbench.action.terminal.copyLastCommand" ,
23
24
  "workbench.action.terminal.copyLastCommandOutput" ,
25
+ "workbench.action.terminal.copyLastCommandAndLastCommandOutput" ,
24
26
  "workbench.action.terminal.deleteToLineStart" ,
25
27
  "workbench.action.terminal.deleteWordLeft" ,
26
28
  "workbench.action.terminal.deleteWordRight" ,
@@ -0,0 +1,101 @@
1
+ import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
2
+ import { statePriority, maxPriority, makeEmptyCounts } from './testingStates.js';
3
+ const isDurationAccessor = (accessor) => 'getOwnDuration' in accessor;
4
+ const getComputedState = (accessor, node, force = false) => {
5
+ let computed = accessor.getCurrentComputedState(node);
6
+ if (computed === undefined || force) {
7
+ computed = accessor.getOwnState(node) ?? 0 ;
8
+ let childrenCount = 0;
9
+ const stateMap = makeEmptyCounts();
10
+ for (const child of accessor.getChildren(node)) {
11
+ const childComputed = getComputedState(accessor, child);
12
+ childrenCount++;
13
+ stateMap[childComputed]++;
14
+ computed = childComputed === 5 && computed === 0
15
+ ? 5 : maxPriority(computed, childComputed);
16
+ }
17
+ if (childrenCount > LARGE_NODE_THRESHOLD) {
18
+ largeNodeChildrenStates.set(node, stateMap);
19
+ }
20
+ accessor.setComputedState(node, computed);
21
+ }
22
+ return computed;
23
+ };
24
+ const getComputedDuration = (accessor, node, force = false) => {
25
+ let computed = accessor.getCurrentComputedDuration(node);
26
+ if (computed === undefined || force) {
27
+ const own = accessor.getOwnDuration(node);
28
+ if (own !== undefined) {
29
+ computed = own;
30
+ }
31
+ else {
32
+ computed = undefined;
33
+ for (const child of accessor.getChildren(node)) {
34
+ const d = getComputedDuration(accessor, child);
35
+ if (d !== undefined) {
36
+ computed = (computed || 0) + d;
37
+ }
38
+ }
39
+ }
40
+ accessor.setComputedDuration(node, computed);
41
+ }
42
+ return computed;
43
+ };
44
+ const LARGE_NODE_THRESHOLD = 64;
45
+ const largeNodeChildrenStates = ( new WeakMap());
46
+ const refreshComputedState = (accessor, node, explicitNewComputedState, refreshDuration = true) => {
47
+ const oldState = accessor.getCurrentComputedState(node);
48
+ const oldPriority = statePriority[oldState];
49
+ const newState = explicitNewComputedState ?? getComputedState(accessor, node, true);
50
+ const newPriority = statePriority[newState];
51
+ const toUpdate = ( new Set());
52
+ if (newPriority !== oldPriority) {
53
+ accessor.setComputedState(node, newState);
54
+ toUpdate.add(node);
55
+ let moveFromState = oldState;
56
+ let moveToState = newState;
57
+ for (const parent of accessor.getParents(node)) {
58
+ const lnm = largeNodeChildrenStates.get(parent);
59
+ if (lnm) {
60
+ lnm[moveFromState]--;
61
+ lnm[moveToState]++;
62
+ }
63
+ const prev = accessor.getCurrentComputedState(parent);
64
+ if (newPriority > oldPriority) {
65
+ if (prev !== undefined && statePriority[prev] >= newPriority) {
66
+ break;
67
+ }
68
+ if (lnm && lnm[moveToState] > 1) {
69
+ break;
70
+ }
71
+ accessor.setComputedState(parent, newState);
72
+ toUpdate.add(parent);
73
+ }
74
+ else {
75
+ if (prev === undefined || statePriority[prev] > oldPriority) {
76
+ break;
77
+ }
78
+ if (lnm && lnm[moveFromState] > 0) {
79
+ break;
80
+ }
81
+ moveToState = getComputedState(accessor, parent, true);
82
+ accessor.setComputedState(parent, moveToState);
83
+ toUpdate.add(parent);
84
+ }
85
+ moveFromState = prev;
86
+ }
87
+ }
88
+ if (isDurationAccessor(accessor) && refreshDuration) {
89
+ for (const parent of Iterable.concat(Iterable.single(node), accessor.getParents(node))) {
90
+ const oldDuration = accessor.getCurrentComputedDuration(parent);
91
+ const newDuration = getComputedDuration(accessor, parent, true);
92
+ if (oldDuration === newDuration) {
93
+ break;
94
+ }
95
+ accessor.setComputedDuration(parent, newDuration);
96
+ toUpdate.add(parent);
97
+ }
98
+ }
99
+ return toUpdate;
100
+ };
101
+ export { refreshComputedState };
@@ -0,0 +1,30 @@
1
+ import { Event, Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
2
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
+ const staticObservableValue = (value) => ({
4
+ onDidChange: Event.None,
5
+ value,
6
+ });
7
+ class MutableObservableValue extends Disposable {
8
+ get value() {
9
+ return this._value;
10
+ }
11
+ set value(v) {
12
+ if (v !== this._value) {
13
+ this._value = v;
14
+ this.changeEmitter.fire(v);
15
+ }
16
+ }
17
+ static stored(stored, defaultValue) {
18
+ const o = ( new MutableObservableValue(stored.get(defaultValue)));
19
+ o._register(stored);
20
+ o._register(o.onDidChange(value => stored.store(value)));
21
+ return o;
22
+ }
23
+ constructor(_value) {
24
+ super();
25
+ this._value = _value;
26
+ this.changeEmitter = this._register(( new Emitter()));
27
+ this.onDidChange = this.changeEmitter.event;
28
+ }
29
+ }
30
+ export { MutableObservableValue, staticObservableValue };
@@ -0,0 +1,36 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { Disposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
4
+ const defaultSerialization = {
5
+ deserialize: d => JSON.parse(d),
6
+ serialize: d => JSON.stringify(d),
7
+ };
8
+ let StoredValue = class StoredValue extends Disposable {
9
+ constructor(options, storage) {
10
+ super();
11
+ this.storage = storage;
12
+ this.key = options.key;
13
+ this.scope = options.scope;
14
+ this.target = options.target;
15
+ this.serialization = options.serialization ?? defaultSerialization;
16
+ this.onDidChange = this.storage.onDidChangeValue(this.scope, this.key, this._register(( new DisposableStore())));
17
+ }
18
+ get(defaultValue) {
19
+ if (this.value === undefined) {
20
+ const value = this.storage.get(this.key, this.scope);
21
+ this.value = value === undefined ? defaultValue : this.serialization.deserialize(value);
22
+ }
23
+ return this.value;
24
+ }
25
+ store(value) {
26
+ this.value = value;
27
+ this.storage.store(this.key, this.serialization.serialize(value), this.scope, this.target);
28
+ }
29
+ delete() {
30
+ this.storage.remove(this.key, this.scope);
31
+ }
32
+ };
33
+ StoredValue = ( __decorate([
34
+ ( __param(1, IStorageService))
35
+ ], StoredValue));
36
+ export { StoredValue };
@@ -0,0 +1,115 @@
1
+ import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
2
+ import { ResourceMap } from 'monaco-editor/esm/vs/base/common/map.js';
3
+ import { WellDefinedPrefixTree } from '../../../../base/common/prefixTree.js';
4
+ import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
5
+ import { ICoveredCount } from './testTypes.js';
6
+ class TestCoverage {
7
+ static async load(taskId, accessor, token) {
8
+ const files = await accessor.provideFileCoverage(token);
9
+ const map = ( new ResourceMap());
10
+ for (const [i, file] of files.entries()) {
11
+ map.set(file.uri, ( new FileCoverage(file, i, accessor)));
12
+ }
13
+ return ( new TestCoverage(taskId, map));
14
+ }
15
+ get tree() {
16
+ return this._tree ??= this.buildCoverageTree();
17
+ }
18
+ constructor(fromTaskId, fileCoverage) {
19
+ this.fromTaskId = fromTaskId;
20
+ this.fileCoverage = fileCoverage;
21
+ }
22
+ getAllFiles() {
23
+ return this.fileCoverage;
24
+ }
25
+ getUri(uri) {
26
+ return this.fileCoverage.get(uri);
27
+ }
28
+ getComputedForUri(uri) {
29
+ return this.tree.find(this.treePathForUri(uri));
30
+ }
31
+ buildCoverageTree() {
32
+ const tree = ( new WellDefinedPrefixTree());
33
+ for (const file of ( this.fileCoverage.values())) {
34
+ tree.insert(this.treePathForUri(file.uri), file);
35
+ }
36
+ const calculateComputed = (path, node) => {
37
+ if (node.value) {
38
+ return node.value;
39
+ }
40
+ const fileCoverage = {
41
+ uri: this.treePathToUri(path),
42
+ statement: ICoveredCount.empty(),
43
+ };
44
+ if (node.children) {
45
+ for (const [prefix, child] of node.children) {
46
+ path.push(prefix);
47
+ const v = calculateComputed(path, child);
48
+ path.pop();
49
+ ICoveredCount.sum(fileCoverage.statement, v.statement);
50
+ if (v.branch) {
51
+ ICoveredCount.sum(fileCoverage.branch ??= ICoveredCount.empty(), v.branch);
52
+ }
53
+ if (v.function) {
54
+ ICoveredCount.sum(fileCoverage.function ??= ICoveredCount.empty(), v.function);
55
+ }
56
+ }
57
+ }
58
+ return node.value = ( new ComputedFileCoverage(fileCoverage));
59
+ };
60
+ for (const node of tree.nodes) {
61
+ calculateComputed([], node);
62
+ }
63
+ return tree;
64
+ }
65
+ *treePathForUri(uri) {
66
+ yield uri.scheme;
67
+ yield uri.authority;
68
+ yield* uri.path.split('/');
69
+ }
70
+ treePathToUri(path) {
71
+ return ( URI.from({ scheme: path[0], authority: path[1], path: path.slice(2).join('/') }));
72
+ }
73
+ }
74
+ class AbstractFileCoverage {
75
+ get tpc() {
76
+ let numerator = this.statement.covered;
77
+ let denominator = this.statement.total;
78
+ if (this.branch) {
79
+ numerator += this.branch.covered;
80
+ denominator += this.branch.total;
81
+ }
82
+ if (this.function) {
83
+ numerator += this.function.covered;
84
+ denominator += this.function.total;
85
+ }
86
+ return denominator === 0 ? 1 : numerator / denominator;
87
+ }
88
+ constructor(coverage) {
89
+ this.uri = URI.revive(coverage.uri);
90
+ this.statement = coverage.statement;
91
+ this.branch = coverage.branch;
92
+ this.function = coverage.function;
93
+ }
94
+ }
95
+ class ComputedFileCoverage extends AbstractFileCoverage {
96
+ }
97
+ class FileCoverage extends AbstractFileCoverage {
98
+ constructor(coverage, index, accessor) {
99
+ super(coverage);
100
+ this.index = index;
101
+ this.accessor = accessor;
102
+ this._details = coverage.details;
103
+ }
104
+ async details(token = CancellationToken.None) {
105
+ this._details ??= this.accessor.resolveFileCoverage(this.index, token);
106
+ try {
107
+ return await this._details;
108
+ }
109
+ catch (e) {
110
+ this._details = undefined;
111
+ throw e;
112
+ }
113
+ }
114
+ }
115
+ export { AbstractFileCoverage, ComputedFileCoverage, FileCoverage, TestCoverage };
@@ -0,0 +1,74 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { CancellationTokenSource } from 'monaco-editor/esm/vs/base/common/cancellation.js';
3
+ import { Disposable, MutableDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import { observableValue } from 'monaco-editor/esm/vs/base/common/observable.js';
5
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
6
+ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
7
+ import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
8
+ import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
9
+ import { IViewsService } from '../../../common/views.js';
10
+ import { ITestResultService } from './testResultService.js';
11
+ import { TestingContextKeys } from './testingContextKeys.js';
12
+ const ITestCoverageService = ( createDecorator('testCoverageService'));
13
+ let TestCoverageService = class TestCoverageService extends Disposable {
14
+ constructor(contextKeyService, resultService, viewsService, notificationService) {
15
+ super();
16
+ this.viewsService = viewsService;
17
+ this.notificationService = notificationService;
18
+ this.lastOpenCts = this._register(( new MutableDisposable()));
19
+ this.selected = observableValue('testCoverage', undefined);
20
+ this._isOpenKey = TestingContextKeys.isTestCoverageOpen.bindTo(contextKeyService);
21
+ this._register(resultService.onResultsChanged(evt => {
22
+ if ('completed' in evt) {
23
+ const coverage = evt.completed.tasks.find(t => t.coverage.get());
24
+ if (coverage) {
25
+ this.openCoverage(coverage, false);
26
+ }
27
+ }
28
+ else if ('removed' in evt && this.selected.get()) {
29
+ const taskId = this.selected.get()?.fromTaskId;
30
+ if (( evt.removed.some(e => ( e.tasks.some(t => t.id === taskId))))) {
31
+ this.closeCoverage();
32
+ }
33
+ }
34
+ }));
35
+ }
36
+ async openCoverage(task, focus = true) {
37
+ this.lastOpenCts.value?.cancel();
38
+ const cts = this.lastOpenCts.value = ( new CancellationTokenSource());
39
+ const getCoverage = task.coverage.get();
40
+ if (!getCoverage) {
41
+ return;
42
+ }
43
+ try {
44
+ const coverage = await getCoverage(cts.token);
45
+ this.selected.set(coverage, undefined);
46
+ this._isOpenKey.set(true);
47
+ }
48
+ catch (e) {
49
+ if (!cts.token.isCancellationRequested) {
50
+ this.notificationService.error(( localizeWithPath(
51
+ 'vs/workbench/contrib/testing/common/testCoverageService',
52
+ 'testCoverageError',
53
+ 'Failed to load test coverage: {}',
54
+ String(e)
55
+ )));
56
+ }
57
+ return;
58
+ }
59
+ if (focus && !cts.token.isCancellationRequested) {
60
+ this.viewsService.openView("workbench.view.testCoverage" , true);
61
+ }
62
+ }
63
+ closeCoverage() {
64
+ this._isOpenKey.set(false);
65
+ this.selected.set(undefined, undefined);
66
+ }
67
+ };
68
+ TestCoverageService = ( __decorate([
69
+ ( __param(0, IContextKeyService)),
70
+ ( __param(1, ITestResultService)),
71
+ ( __param(2, IViewsService)),
72
+ ( __param(3, INotificationService))
73
+ ], TestCoverageService));
74
+ export { ITestCoverageService, TestCoverageService };
@@ -0,0 +1,116 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
3
+ import { splitGlobAware } from 'monaco-editor/esm/vs/base/common/glob.js';
4
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
5
+ import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
6
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
7
+ import { MutableObservableValue } from './observableValue.js';
8
+ import { StoredValue } from './storedValue.js';
9
+ import { namespaceTestTag } from './testTypes.js';
10
+ const ITestExplorerFilterState = ( createDecorator('testingFilterState'));
11
+ const tagRe = /!?@([^ ,:]+)/g;
12
+ const trimExtraWhitespace = (str) => str.replace(/\s\s+/g, ' ').trim();
13
+ let TestExplorerFilterState = class TestExplorerFilterState extends Disposable {
14
+ constructor(storageService) {
15
+ super();
16
+ this.storageService = storageService;
17
+ this.focusEmitter = ( new Emitter());
18
+ this.termFilterState = {};
19
+ this.globList = [];
20
+ this.includeTags = ( new Set());
21
+ this.excludeTags = ( new Set());
22
+ this.text = this._register(( new MutableObservableValue('')));
23
+ this.fuzzy = this._register(MutableObservableValue.stored(( new StoredValue({
24
+ key: 'testHistoryFuzzy',
25
+ scope: 0 ,
26
+ target: 0 ,
27
+ }, this.storageService)), false));
28
+ this.reveal = this._register(( new MutableObservableValue(undefined)));
29
+ this.onDidRequestInputFocus = this.focusEmitter.event;
30
+ }
31
+ focusInput() {
32
+ this.focusEmitter.fire();
33
+ }
34
+ setText(text) {
35
+ if (text === this.text.value) {
36
+ return;
37
+ }
38
+ this.termFilterState = {};
39
+ this.globList = [];
40
+ this.includeTags.clear();
41
+ this.excludeTags.clear();
42
+ let globText = '';
43
+ let lastIndex = 0;
44
+ for (const match of text.matchAll(tagRe)) {
45
+ let nextIndex = match.index + match[0].length;
46
+ const tag = match[0];
47
+ if (allTestFilterTerms.includes(tag)) {
48
+ this.termFilterState[tag] = true;
49
+ }
50
+ if (text[nextIndex] === ':') {
51
+ nextIndex++;
52
+ let delimiter = text[nextIndex];
53
+ if (delimiter !== `"` && delimiter !== `'`) {
54
+ delimiter = ' ';
55
+ }
56
+ else {
57
+ nextIndex++;
58
+ }
59
+ let tagId = '';
60
+ while (nextIndex < text.length && text[nextIndex] !== delimiter) {
61
+ if (text[nextIndex] === '\\') {
62
+ tagId += text[nextIndex + 1];
63
+ nextIndex += 2;
64
+ }
65
+ else {
66
+ tagId += text[nextIndex];
67
+ nextIndex++;
68
+ }
69
+ }
70
+ if (match[0].startsWith('!')) {
71
+ this.excludeTags.add(namespaceTestTag(match[1], tagId));
72
+ }
73
+ else {
74
+ this.includeTags.add(namespaceTestTag(match[1], tagId));
75
+ }
76
+ nextIndex++;
77
+ }
78
+ globText += text.slice(lastIndex, match.index);
79
+ lastIndex = nextIndex;
80
+ }
81
+ globText += text.slice(lastIndex).trim();
82
+ if (globText.length) {
83
+ for (const filter of ( splitGlobAware(globText, ',').map(s => s.trim())).filter(s => !!s.length)) {
84
+ if (filter.startsWith('!')) {
85
+ this.globList.push({ include: false, text: filter.slice(1).toLowerCase() });
86
+ }
87
+ else {
88
+ this.globList.push({ include: true, text: filter.toLowerCase() });
89
+ }
90
+ }
91
+ }
92
+ this.text.value = text;
93
+ }
94
+ isFilteringFor(term) {
95
+ return !!this.termFilterState[term];
96
+ }
97
+ toggleFilteringFor(term, shouldFilter) {
98
+ const text = this.text.value.trim();
99
+ if (shouldFilter !== false && !this.termFilterState[term]) {
100
+ this.setText(text ? `${text} ${term}` : term);
101
+ }
102
+ else if (shouldFilter !== true && this.termFilterState[term]) {
103
+ this.setText(trimExtraWhitespace(text.replace(term, '')));
104
+ }
105
+ }
106
+ };
107
+ TestExplorerFilterState = ( __decorate([
108
+ ( __param(0, IStorageService))
109
+ ], TestExplorerFilterState));
110
+ const allTestFilterTerms = [
111
+ "@failed" ,
112
+ "@executed" ,
113
+ "@doc" ,
114
+ "@hidden" ,
115
+ ];
116
+ export { ITestExplorerFilterState, TestExplorerFilterState };