@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
@@ -0,0 +1,540 @@
1
+ import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
2
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
3
+ import { Separator } from 'monaco-editor/esm/vs/base/common/actions.js';
4
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
5
+ import { Disposable, toDisposable, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
6
+ import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
7
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
8
+ import { AudioCue, IAudioCueService } from 'monaco-editor/esm/vs/platform/audioCues/browser/audioCueService.js';
9
+ import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
10
+ import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
11
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
12
+ import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
13
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
14
+ import { Severity, INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
15
+ import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
16
+ import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
17
+ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
18
+ import { terminalDecorationMark, terminalDecorationIncomplete, terminalDecorationError, terminalDecorationSuccess } from '../terminalIcons.js';
19
+ import { TerminalDecorationHoverManager, updateLayout } from './decorationStyles.js';
20
+ import { TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR, TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR, TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR } from '../../common/terminalColorRegistry.js';
21
+ import { ILifecycleService } from '../../../../services/lifecycle/common/lifecycle.js';
22
+ let DecorationAddon = class DecorationAddon extends Disposable {
23
+ constructor(_capabilities, _clipboardService, _contextMenuService, _configurationService, _themeService, _openerService, _quickInputService, lifecycleService, _commandService, instantiationService, _audioCueService, _notificationService) {
24
+ super();
25
+ this._capabilities = _capabilities;
26
+ this._clipboardService = _clipboardService;
27
+ this._contextMenuService = _contextMenuService;
28
+ this._configurationService = _configurationService;
29
+ this._themeService = _themeService;
30
+ this._openerService = _openerService;
31
+ this._quickInputService = _quickInputService;
32
+ this._commandService = _commandService;
33
+ this._audioCueService = _audioCueService;
34
+ this._notificationService = _notificationService;
35
+ this._capabilityDisposables = ( new Map());
36
+ this._decorations = ( new Map());
37
+ this._onDidRequestRunCommand = this._register(( new Emitter()));
38
+ this.onDidRequestRunCommand = this._onDidRequestRunCommand.event;
39
+ this._register(toDisposable(() => this._dispose()));
40
+ this._register(this._configurationService.onDidChangeConfiguration(e => {
41
+ if (e.affectsConfiguration("terminal.integrated.fontSize" ) || e.affectsConfiguration("terminal.integrated.lineHeight" )) {
42
+ this.refreshLayouts();
43
+ }
44
+ else if (e.affectsConfiguration('workbench.colorCustomizations')) {
45
+ this._refreshStyles(true);
46
+ }
47
+ else if (e.affectsConfiguration("terminal.integrated.shellIntegration.decorationsEnabled" )) {
48
+ this._removeCapabilityDisposables(2 );
49
+ this._updateDecorationVisibility();
50
+ }
51
+ }));
52
+ this._register(this._themeService.onDidColorThemeChange(() => this._refreshStyles(true)));
53
+ this._updateDecorationVisibility();
54
+ this._register(this._capabilities.onDidAddCapabilityType(c => this._createCapabilityDisposables(c)));
55
+ this._register(this._capabilities.onDidRemoveCapabilityType(c => this._removeCapabilityDisposables(c)));
56
+ this._register(lifecycleService.onWillShutdown(() => this._disposeAllDecorations()));
57
+ this._terminalDecorationHoverService = instantiationService.createInstance(TerminalDecorationHoverManager);
58
+ }
59
+ _removeCapabilityDisposables(c) {
60
+ const disposables = this._capabilityDisposables.get(c);
61
+ if (disposables) {
62
+ dispose(disposables);
63
+ }
64
+ this._capabilityDisposables.delete(c);
65
+ }
66
+ _createCapabilityDisposables(c) {
67
+ let disposables = [];
68
+ const capability = this._capabilities.get(c);
69
+ if (!capability || ( this._capabilityDisposables.has(c))) {
70
+ return;
71
+ }
72
+ switch (capability.type) {
73
+ case 4 :
74
+ disposables = [capability.onMarkAdded(mark => this.registerMarkDecoration(mark))];
75
+ break;
76
+ case 2 :
77
+ disposables = this._getCommandDetectionListeners(capability);
78
+ break;
79
+ }
80
+ this._capabilityDisposables.set(c, disposables);
81
+ }
82
+ registerMarkDecoration(mark) {
83
+ if (!this._terminal || (!this._showGutterDecorations && !this._showOverviewRulerDecorations)) {
84
+ return undefined;
85
+ }
86
+ if (mark.hidden) {
87
+ return undefined;
88
+ }
89
+ return this.registerCommandDecoration(undefined, undefined, mark);
90
+ }
91
+ _updateDecorationVisibility() {
92
+ const showDecorations = this._configurationService.getValue("terminal.integrated.shellIntegration.decorationsEnabled" );
93
+ this._showGutterDecorations = (showDecorations === 'both' || showDecorations === 'gutter');
94
+ this._showOverviewRulerDecorations = (showDecorations === 'both' || showDecorations === 'overviewRuler');
95
+ this._disposeAllDecorations();
96
+ if (this._showGutterDecorations || this._showOverviewRulerDecorations) {
97
+ this._attachToCommandCapability();
98
+ this._updateGutterDecorationVisibility();
99
+ }
100
+ const currentCommand = this._capabilities.get(2 )?.executingCommandObject;
101
+ if (currentCommand) {
102
+ this.registerCommandDecoration(currentCommand, true);
103
+ }
104
+ }
105
+ _disposeAllDecorations() {
106
+ this._placeholderDecoration?.dispose();
107
+ for (const value of ( this._decorations.values())) {
108
+ value.decoration.dispose();
109
+ dispose(value.disposables);
110
+ }
111
+ }
112
+ _updateGutterDecorationVisibility() {
113
+ const commandDecorationElements = this._terminal?.element?.querySelectorAll("terminal-command-decoration" );
114
+ if (commandDecorationElements) {
115
+ for (const commandDecorationElement of commandDecorationElements) {
116
+ this._updateCommandDecorationVisibility(commandDecorationElement);
117
+ }
118
+ }
119
+ }
120
+ _updateCommandDecorationVisibility(commandDecorationElement) {
121
+ if (this._showGutterDecorations) {
122
+ commandDecorationElement.classList.remove("hide" );
123
+ }
124
+ else {
125
+ commandDecorationElement.classList.add("hide" );
126
+ }
127
+ }
128
+ refreshLayouts() {
129
+ updateLayout(this._configurationService, this._placeholderDecoration?.element);
130
+ for (const decoration of this._decorations) {
131
+ updateLayout(this._configurationService, decoration[1].decoration.element);
132
+ }
133
+ }
134
+ _refreshStyles(refreshOverviewRulerColors) {
135
+ if (refreshOverviewRulerColors) {
136
+ for (const decoration of ( this._decorations.values())) {
137
+ const color = this._getDecorationCssColor(decoration)?.toString() ?? '';
138
+ if (decoration.decoration.options?.overviewRulerOptions) {
139
+ decoration.decoration.options.overviewRulerOptions.color = color;
140
+ }
141
+ else if (decoration.decoration.options) {
142
+ decoration.decoration.options.overviewRulerOptions = { color };
143
+ }
144
+ }
145
+ }
146
+ this._updateClasses(this._placeholderDecoration?.element);
147
+ for (const decoration of ( this._decorations.values())) {
148
+ this._updateClasses(decoration.decoration.element, decoration.exitCode, decoration.markProperties);
149
+ }
150
+ }
151
+ _dispose() {
152
+ this._terminalDecorationHoverService.dispose();
153
+ for (const disposable of ( this._capabilityDisposables.values())) {
154
+ dispose(disposable);
155
+ }
156
+ this.clearDecorations();
157
+ }
158
+ _clearPlaceholder() {
159
+ this._placeholderDecoration?.dispose();
160
+ this._placeholderDecoration = undefined;
161
+ }
162
+ clearDecorations() {
163
+ this._placeholderDecoration?.marker.dispose();
164
+ this._clearPlaceholder();
165
+ this._disposeAllDecorations();
166
+ this._decorations.clear();
167
+ }
168
+ _attachToCommandCapability() {
169
+ if (( this._capabilities.has(2 ))) {
170
+ this._getCommandDetectionListeners(this._capabilities.get(2 ));
171
+ }
172
+ }
173
+ _getCommandDetectionListeners(capability) {
174
+ if (( this._capabilityDisposables.has(2 ))) {
175
+ const disposables = this._capabilityDisposables.get(2 );
176
+ dispose(disposables);
177
+ this._capabilityDisposables.delete(capability.type);
178
+ }
179
+ const commandDetectionListeners = [];
180
+ if (capability.executingCommandObject?.marker) {
181
+ this.registerCommandDecoration(capability.executingCommandObject, true);
182
+ }
183
+ commandDetectionListeners.push(capability.onCommandStarted(command => this.registerCommandDecoration(command, true)));
184
+ for (const command of capability.commands) {
185
+ this.registerCommandDecoration(command);
186
+ }
187
+ commandDetectionListeners.push(capability.onCommandFinished(command => {
188
+ this.registerCommandDecoration(command);
189
+ if (command.exitCode) {
190
+ this._audioCueService.playAudioCue(AudioCue.terminalCommandFailed);
191
+ }
192
+ }));
193
+ commandDetectionListeners.push(capability.onCommandInvalidated(commands => {
194
+ for (const command of commands) {
195
+ const id = command.marker?.id;
196
+ if (id) {
197
+ const match = this._decorations.get(id);
198
+ if (match) {
199
+ match.decoration.dispose();
200
+ dispose(match.disposables);
201
+ }
202
+ }
203
+ }
204
+ }));
205
+ commandDetectionListeners.push(capability.onCurrentCommandInvalidated((request) => {
206
+ if (request.reason === "noProblemsReported" ) {
207
+ const lastDecoration = Array.from(this._decorations.entries())[this._decorations.size - 1];
208
+ lastDecoration?.[1].decoration.dispose();
209
+ }
210
+ else if (request.reason === "windows" ) {
211
+ this._clearPlaceholder();
212
+ }
213
+ }));
214
+ return commandDetectionListeners;
215
+ }
216
+ activate(terminal) {
217
+ this._terminal = terminal;
218
+ this._attachToCommandCapability();
219
+ }
220
+ registerCommandDecoration(command, beforeCommandExecution, markProperties) {
221
+ if (!this._terminal || (beforeCommandExecution && !command) || (!this._showGutterDecorations && !this._showOverviewRulerDecorations)) {
222
+ return undefined;
223
+ }
224
+ const marker = command?.marker || markProperties?.marker;
225
+ if (!marker) {
226
+ throw new Error(`cannot add a decoration for a command ${JSON.stringify(command)} with no marker`);
227
+ }
228
+ this._clearPlaceholder();
229
+ const color = this._getDecorationCssColor(command)?.toString() ?? '';
230
+ const decoration = this._terminal.registerDecoration({
231
+ marker,
232
+ overviewRulerOptions: this._showOverviewRulerDecorations ? (beforeCommandExecution
233
+ ? { color, position: 'left' }
234
+ : { color, position: command?.exitCode ? 'right' : 'left' }) : undefined
235
+ });
236
+ if (!decoration) {
237
+ return undefined;
238
+ }
239
+ if (beforeCommandExecution) {
240
+ this._placeholderDecoration = decoration;
241
+ }
242
+ decoration.onRender(element => {
243
+ if (element.classList.contains(".xterm-decoration-overview-ruler" )) {
244
+ return;
245
+ }
246
+ if (!this._decorations.get(decoration.marker.id)) {
247
+ decoration.onDispose(() => this._decorations.delete(decoration.marker.id));
248
+ this._decorations.set(decoration.marker.id, {
249
+ decoration,
250
+ disposables: this._createDisposables(element, command, markProperties),
251
+ exitCode: command?.exitCode,
252
+ markProperties: command?.markProperties
253
+ });
254
+ }
255
+ if (!element.classList.contains("codicon" ) || command?.marker?.line === 0) {
256
+ updateLayout(this._configurationService, element);
257
+ this._updateClasses(element, command?.exitCode, command?.markProperties || markProperties);
258
+ }
259
+ });
260
+ return decoration;
261
+ }
262
+ _createDisposables(element, command, markProperties) {
263
+ if (command?.exitCode === undefined && !command?.markProperties) {
264
+ return [];
265
+ }
266
+ else if (command?.markProperties || markProperties) {
267
+ return [this._terminalDecorationHoverService.createHover(element, command || markProperties, markProperties?.hoverMessage)];
268
+ }
269
+ return [this._createContextMenu(element, command), this._terminalDecorationHoverService.createHover(element, command)];
270
+ }
271
+ _updateClasses(element, exitCode, markProperties) {
272
+ if (!element) {
273
+ return;
274
+ }
275
+ for (const classes of element.classList) {
276
+ element.classList.remove(classes);
277
+ }
278
+ element.classList.add("terminal-command-decoration" , "codicon" , "xterm-decoration" );
279
+ if (markProperties) {
280
+ element.classList.add("default-color" , ...ThemeIcon.asClassNameArray(terminalDecorationMark));
281
+ if (!markProperties.hoverMessage) {
282
+ element.classList.add("default" );
283
+ }
284
+ }
285
+ else {
286
+ this._updateCommandDecorationVisibility(element);
287
+ if (exitCode === undefined) {
288
+ element.classList.add("default-color" , "default" );
289
+ element.classList.add(...ThemeIcon.asClassNameArray(terminalDecorationIncomplete));
290
+ }
291
+ else if (exitCode) {
292
+ element.classList.add("error" );
293
+ element.classList.add(...ThemeIcon.asClassNameArray(terminalDecorationError));
294
+ }
295
+ else {
296
+ element.classList.add(...ThemeIcon.asClassNameArray(terminalDecorationSuccess));
297
+ }
298
+ }
299
+ }
300
+ _createContextMenu(element, command) {
301
+ return dom.addDisposableListener(element, dom.EventType.CLICK, async () => {
302
+ this._terminalDecorationHoverService.hideHover();
303
+ const actions = await this._getCommandActions(command);
304
+ this._contextMenuService.showContextMenu({ getAnchor: () => element, getActions: () => actions });
305
+ });
306
+ }
307
+ async _getCommandActions(command) {
308
+ const actions = [];
309
+ if (command.command !== '') {
310
+ const labelRun = ( localizeWithPath(
311
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
312
+ "terminal.rerunCommand",
313
+ 'Rerun Command'
314
+ ));
315
+ actions.push({
316
+ class: undefined, tooltip: labelRun, id: 'terminal.rerunCommand', label: labelRun, enabled: true,
317
+ run: async () => {
318
+ if (command.command === '') {
319
+ return;
320
+ }
321
+ if (!command.isTrusted) {
322
+ const shouldRun = await ( new Promise(r => {
323
+ this._notificationService.prompt(Severity.Info, ( localizeWithPath(
324
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
325
+ 'rerun',
326
+ 'Do you want to run the command: {0}',
327
+ command.command
328
+ )), [{
329
+ label: ( localizeWithPath(
330
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
331
+ 'yes',
332
+ 'Yes'
333
+ )),
334
+ run: () => r(true)
335
+ }, {
336
+ label: ( localizeWithPath('vs/workbench/contrib/terminal/browser/xterm/decorationAddon', 'no', 'No')),
337
+ run: () => r(false)
338
+ }]);
339
+ }));
340
+ if (!shouldRun) {
341
+ return;
342
+ }
343
+ }
344
+ this._onDidRequestRunCommand.fire({ command });
345
+ }
346
+ });
347
+ actions.push(( new Separator()));
348
+ const labelCopy = ( localizeWithPath(
349
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
350
+ "terminal.copyCommand",
351
+ 'Copy Command'
352
+ ));
353
+ actions.push({
354
+ class: undefined, tooltip: labelCopy, id: 'terminal.copyCommand', label: labelCopy, enabled: true,
355
+ run: () => this._clipboardService.writeText(command.command)
356
+ });
357
+ }
358
+ if (command.hasOutput()) {
359
+ const labelCopyCommandAndOutput = ( localizeWithPath(
360
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
361
+ "terminal.copyCommandAndOutput",
362
+ 'Copy Command and Output'
363
+ ));
364
+ actions.push({
365
+ class: undefined, tooltip: labelCopyCommandAndOutput, id: 'terminal.copyCommandAndOutput', label: labelCopyCommandAndOutput, enabled: true,
366
+ run: () => {
367
+ const output = command.getOutput();
368
+ if (typeof output === 'string') {
369
+ this._clipboardService.writeText(`${command.command !== '' ? command.command + '\n' : ''}${output}`);
370
+ }
371
+ }
372
+ });
373
+ const labelText = ( localizeWithPath(
374
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
375
+ "terminal.copyOutput",
376
+ 'Copy Output'
377
+ ));
378
+ actions.push({
379
+ class: undefined, tooltip: labelText, id: 'terminal.copyOutput', label: labelText, enabled: true,
380
+ run: () => {
381
+ const text = command.getOutput();
382
+ if (typeof text === 'string') {
383
+ this._clipboardService.writeText(text);
384
+ }
385
+ }
386
+ });
387
+ const labelHtml = ( localizeWithPath(
388
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
389
+ "terminal.copyOutputAsHtml",
390
+ 'Copy Output as HTML'
391
+ ));
392
+ actions.push({
393
+ class: undefined, tooltip: labelHtml, id: 'terminal.copyOutputAsHtml', label: labelHtml, enabled: true,
394
+ run: () => this._onDidRequestRunCommand.fire({ command, copyAsHtml: true })
395
+ });
396
+ }
397
+ if (actions.length > 0) {
398
+ actions.push(( new Separator()));
399
+ }
400
+ const labelRunRecent = ( localizeWithPath(
401
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
402
+ 'workbench.action.terminal.runRecentCommand',
403
+ "Run Recent Command"
404
+ ));
405
+ actions.push({
406
+ class: undefined, tooltip: labelRunRecent, id: 'workbench.action.terminal.runRecentCommand', label: labelRunRecent, enabled: true,
407
+ run: () => this._commandService.executeCommand('workbench.action.terminal.runRecentCommand')
408
+ });
409
+ const labelGoToRecent = ( localizeWithPath(
410
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
411
+ 'workbench.action.terminal.goToRecentDirectory',
412
+ "Go To Recent Directory"
413
+ ));
414
+ actions.push({
415
+ class: undefined, tooltip: labelRunRecent, id: 'workbench.action.terminal.goToRecentDirectory', label: labelGoToRecent, enabled: true,
416
+ run: () => this._commandService.executeCommand('workbench.action.terminal.goToRecentDirectory')
417
+ });
418
+ actions.push(( new Separator()));
419
+ const labelConfigure = ( localizeWithPath(
420
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
421
+ "terminal.configureCommandDecorations",
422
+ 'Configure Command Decorations'
423
+ ));
424
+ actions.push({
425
+ class: undefined, tooltip: labelConfigure, id: 'terminal.configureCommandDecorations', label: labelConfigure, enabled: true,
426
+ run: () => this._showConfigureCommandDecorationsQuickPick()
427
+ });
428
+ const labelAbout = ( localizeWithPath(
429
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
430
+ "terminal.learnShellIntegration",
431
+ 'Learn About Shell Integration'
432
+ ));
433
+ actions.push({
434
+ class: undefined, tooltip: labelAbout, id: 'terminal.learnShellIntegration', label: labelAbout, enabled: true,
435
+ run: () => this._openerService.open('https://code.visualstudio.com/docs/terminal/shell-integration')
436
+ });
437
+ return actions;
438
+ }
439
+ async _showConfigureCommandDecorationsQuickPick() {
440
+ const quickPick = this._quickInputService.createQuickPick();
441
+ quickPick.items = [
442
+ { id: 'a', label: ( localizeWithPath(
443
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
444
+ 'toggleVisibility',
445
+ 'Toggle visibility'
446
+ )) },
447
+ ];
448
+ quickPick.canSelectMany = false;
449
+ quickPick.onDidAccept(async (e) => {
450
+ quickPick.hide();
451
+ const result = quickPick.activeItems[0];
452
+ switch (result.id) {
453
+ case 'a':
454
+ this._showToggleVisibilityQuickPick();
455
+ break;
456
+ }
457
+ });
458
+ quickPick.show();
459
+ }
460
+ _showToggleVisibilityQuickPick() {
461
+ const quickPick = this._quickInputService.createQuickPick();
462
+ quickPick.hideInput = true;
463
+ quickPick.hideCheckAll = true;
464
+ quickPick.canSelectMany = true;
465
+ quickPick.title = ( localizeWithPath(
466
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
467
+ 'toggleVisibility',
468
+ 'Toggle visibility'
469
+ ));
470
+ const configValue = this._configurationService.getValue("terminal.integrated.shellIntegration.decorationsEnabled" );
471
+ const gutterIcon = {
472
+ label: ( localizeWithPath(
473
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
474
+ 'gutter',
475
+ 'Gutter command decorations'
476
+ )),
477
+ picked: configValue !== 'never' && configValue !== 'overviewRuler'
478
+ };
479
+ const overviewRulerIcon = {
480
+ label: ( localizeWithPath(
481
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationAddon',
482
+ 'overviewRuler',
483
+ 'Overview ruler command decorations'
484
+ )),
485
+ picked: configValue !== 'never' && configValue !== 'gutter'
486
+ };
487
+ quickPick.items = [gutterIcon, overviewRulerIcon];
488
+ const selectedItems = [];
489
+ if (configValue !== 'never') {
490
+ if (configValue !== 'gutter') {
491
+ selectedItems.push(gutterIcon);
492
+ }
493
+ if (configValue !== 'overviewRuler') {
494
+ selectedItems.push(overviewRulerIcon);
495
+ }
496
+ }
497
+ quickPick.selectedItems = selectedItems;
498
+ quickPick.onDidChangeSelection(async (e) => {
499
+ let newValue = 'never';
500
+ if (e.includes(gutterIcon)) {
501
+ if (e.includes(overviewRulerIcon)) {
502
+ newValue = 'both';
503
+ }
504
+ else {
505
+ newValue = 'gutter';
506
+ }
507
+ }
508
+ else if (e.includes(overviewRulerIcon)) {
509
+ newValue = 'overviewRuler';
510
+ }
511
+ await this._configurationService.updateValue("terminal.integrated.shellIntegration.decorationsEnabled" , newValue);
512
+ });
513
+ quickPick.ok = false;
514
+ quickPick.show();
515
+ }
516
+ _getDecorationCssColor(decorationOrCommand) {
517
+ let colorId;
518
+ if (decorationOrCommand?.exitCode === undefined) {
519
+ colorId = TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR;
520
+ }
521
+ else {
522
+ colorId = decorationOrCommand.exitCode ? TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR : TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR;
523
+ }
524
+ return this._themeService.getColorTheme().getColor(colorId)?.toString();
525
+ }
526
+ };
527
+ DecorationAddon = ( __decorate([
528
+ ( __param(1, IClipboardService)),
529
+ ( __param(2, IContextMenuService)),
530
+ ( __param(3, IConfigurationService)),
531
+ ( __param(4, IThemeService)),
532
+ ( __param(5, IOpenerService)),
533
+ ( __param(6, IQuickInputService)),
534
+ ( __param(7, ILifecycleService)),
535
+ ( __param(8, ICommandService)),
536
+ ( __param(9, IInstantiationService)),
537
+ ( __param(10, IAudioCueService)),
538
+ ( __param(11, INotificationService))
539
+ ], DecorationAddon));
540
+ export { DecorationAddon };
@@ -0,0 +1,104 @@
1
+ import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
2
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
3
+ import { Delayer } from 'monaco-editor/esm/vs/base/common/async.js';
4
+ import { fromNow } from '../../../../../base/common/date.js';
5
+ import { MarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
6
+ import { Disposable, combinedDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
7
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
8
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
9
+ import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
10
+ import { IHoverService } from '../../../../services/hover/browser/hover.js';
11
+ let TerminalDecorationHoverManager = class TerminalDecorationHoverManager extends Disposable {
12
+ constructor(_hoverService, configurationService, contextMenuService) {
13
+ super();
14
+ this._hoverService = _hoverService;
15
+ this._contextMenuVisible = false;
16
+ this._register(contextMenuService.onDidShowContextMenu(() => this._contextMenuVisible = true));
17
+ this._register(contextMenuService.onDidHideContextMenu(() => this._contextMenuVisible = false));
18
+ this._hoverDelayer = this._register(( new Delayer(configurationService.getValue('workbench.hover.delay'))));
19
+ }
20
+ hideHover() {
21
+ this._hoverDelayer.cancel();
22
+ this._hoverService.hideHover();
23
+ }
24
+ createHover(element, command, hoverMessage) {
25
+ return combinedDisposable(dom.addDisposableListener(element, dom.EventType.MOUSE_ENTER, () => {
26
+ if (this._contextMenuVisible) {
27
+ return;
28
+ }
29
+ this._hoverDelayer.trigger(() => {
30
+ let hoverContent = `${( localizeWithPath(
31
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationStyles',
32
+ 'terminalPromptContextMenu',
33
+ "Show Command Actions"
34
+ ))}`;
35
+ hoverContent += '\n\n---\n\n';
36
+ if (!command) {
37
+ if (hoverMessage) {
38
+ hoverContent = hoverMessage;
39
+ }
40
+ else {
41
+ return;
42
+ }
43
+ }
44
+ else if (command.markProperties || hoverMessage) {
45
+ if (command.markProperties?.hoverMessage || hoverMessage) {
46
+ hoverContent = command.markProperties?.hoverMessage || hoverMessage || '';
47
+ }
48
+ else {
49
+ return;
50
+ }
51
+ }
52
+ else if (command.exitCode) {
53
+ if (command.exitCode === -1) {
54
+ hoverContent += ( localizeWithPath(
55
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationStyles',
56
+ 'terminalPromptCommandFailed',
57
+ 'Command executed {0} and failed',
58
+ fromNow(command.timestamp, true)
59
+ ));
60
+ }
61
+ else {
62
+ hoverContent += ( localizeWithPath(
63
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationStyles',
64
+ 'terminalPromptCommandFailedWithExitCode',
65
+ 'Command executed {0} and failed (Exit Code {1})',
66
+ fromNow(command.timestamp, true),
67
+ command.exitCode
68
+ ));
69
+ }
70
+ }
71
+ else {
72
+ hoverContent += ( localizeWithPath(
73
+ 'vs/workbench/contrib/terminal/browser/xterm/decorationStyles',
74
+ 'terminalPromptCommandSuccess',
75
+ 'Command executed {0}',
76
+ fromNow(command.timestamp, true)
77
+ ));
78
+ }
79
+ this._hoverService.showHover({ content: ( new MarkdownString(hoverContent)), target: element });
80
+ });
81
+ }), dom.addDisposableListener(element, dom.EventType.MOUSE_LEAVE, () => this.hideHover()), dom.addDisposableListener(element, dom.EventType.MOUSE_OUT, () => this.hideHover()));
82
+ }
83
+ };
84
+ TerminalDecorationHoverManager = ( __decorate([
85
+ ( __param(0, IHoverService)),
86
+ ( __param(1, IConfigurationService)),
87
+ ( __param(2, IContextMenuService))
88
+ ], TerminalDecorationHoverManager));
89
+ function updateLayout(configurationService, element) {
90
+ if (!element) {
91
+ return;
92
+ }
93
+ const fontSize = configurationService.inspect("terminal.integrated.fontSize" ).value;
94
+ const defaultFontSize = configurationService.inspect("terminal.integrated.fontSize" ).defaultValue;
95
+ const lineHeight = configurationService.inspect("terminal.integrated.lineHeight" ).value;
96
+ if (typeof fontSize === 'number' && typeof defaultFontSize === 'number' && typeof lineHeight === 'number') {
97
+ const scalar = (fontSize / defaultFontSize) <= 1 ? (fontSize / defaultFontSize) : 1;
98
+ element.style.width = `${scalar * 16 }px`;
99
+ element.style.height = `${scalar * 16 * lineHeight}px`;
100
+ element.style.fontSize = `${scalar * 16 }px`;
101
+ element.style.marginLeft = `${scalar * -17 }px`;
102
+ }
103
+ }
104
+ export { TerminalDecorationHoverManager, updateLayout };