@codingame/monaco-vscode-api 1.79.1 → 1.79.2-next.1

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 (467) hide show
  1. package/README.md +11 -2
  2. package/dist/api.js +10 -8
  3. package/dist/composite.d.ts +65 -0
  4. package/dist/configurationRegistry.d.ts +212 -0
  5. package/dist/contextkey.d.ts +1 -1
  6. package/dist/default-extensions/json.js +1 -0
  7. package/dist/default-extensions/theme-defaults.js +2 -2
  8. package/dist/editorBrowser.d.ts +272 -3
  9. package/dist/event.d.ts +6 -1
  10. package/dist/{extension-tools-0c4c1ad7.js → extension-tools-3c2bf0a4.js} +698 -507
  11. package/dist/extensions.d.ts +3 -2
  12. package/dist/extensions.d2.ts +6 -17
  13. package/dist/extensionsRegistry.d.ts +15 -9
  14. package/dist/files.d.ts +71 -7
  15. package/dist/jsonSchema.d.ts +1 -1
  16. package/dist/keybinding.d.ts +2 -2
  17. package/dist/languageFeatures.d.ts +703 -61
  18. package/dist/monaco.d.ts +5 -4
  19. package/dist/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +2 -0
  20. package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditor.js +2 -0
  21. package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2 -0
  22. package/dist/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -1
  23. package/dist/platform.d.ts +11 -0
  24. package/dist/rollup-extension-directory-plugin.js +1 -1
  25. package/dist/rollup-vsix-plugin.js +2 -2
  26. package/dist/service-override/configuration.d.ts +5 -206
  27. package/dist/service-override/dialogs.js +16 -1
  28. package/dist/service-override/files.d.ts +2 -2
  29. package/dist/service-override/files.js +1 -1
  30. package/dist/service-override/markers.d.ts +7 -0
  31. package/dist/service-override/markers.js +6 -0
  32. package/dist/service-override/output.d.ts +7 -0
  33. package/dist/service-override/output.js +22 -0
  34. package/dist/service-override/preferences.js +7 -1
  35. package/dist/service-override/quickaccess.js +0 -9
  36. package/dist/service-override/search.d.ts +7 -0
  37. package/dist/service-override/search.js +19 -0
  38. package/dist/service-override/terminal.d.ts +607 -0
  39. package/dist/service-override/terminal.js +98 -0
  40. package/dist/service-override/tools/editor.js +1 -1
  41. package/dist/service-override/views.d.ts +561 -335
  42. package/dist/service-override/views.js +51 -11
  43. package/dist/services.d.ts +2627 -108
  44. package/dist/services.js +3 -0
  45. package/dist/severity.d.ts +16 -0
  46. package/dist/uri.d.ts +22 -11
  47. package/dist/views.d.ts +270 -0
  48. package/dist/vscode/vs/base/common/processes.js +24 -0
  49. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/decorations.js +20 -0
  50. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js +106 -0
  51. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js +59 -0
  52. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution.js +41 -0
  53. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js +369 -0
  54. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffModel.js +247 -0
  55. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/lineAlignment.js +179 -0
  56. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/overviewRulerPart.js +121 -0
  57. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/style.css.js +4 -0
  58. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/unchangedRanges.js +184 -0
  59. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/utils.js +88 -0
  60. package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +38 -1
  61. package/dist/vscode/vs/platform/extensionManagement/common/extensionManagementUtil.js +5 -1
  62. package/dist/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +13 -5
  63. package/dist/vscode/vs/platform/files/common/fileService.js +43 -5
  64. package/dist/vscode/vs/platform/files/common/files.js +3 -1
  65. package/dist/vscode/vs/platform/languagePacks/common/languagePacks.js +4 -1
  66. package/dist/vscode/vs/platform/log/common/bufferLog.js +34 -0
  67. package/dist/vscode/vs/platform/log/common/fileLog.js +105 -0
  68. package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +1 -1
  69. package/dist/vscode/vs/platform/remote/common/remoteAuthorityResolver.js +20 -1
  70. package/dist/vscode/vs/platform/request/browser/requestService.js +1 -1
  71. package/dist/vscode/vs/platform/request/common/request.js +3 -3
  72. package/dist/vscode/vs/platform/storage/common/storage.js +3 -0
  73. package/dist/vscode/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +39 -0
  74. package/dist/vscode/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +565 -0
  75. package/dist/vscode/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +27 -0
  76. package/dist/vscode/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +22 -0
  77. package/dist/vscode/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +46 -0
  78. package/dist/vscode/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +80 -0
  79. package/dist/vscode/vs/platform/terminal/common/environmentVariable.js +7 -0
  80. package/dist/vscode/vs/platform/terminal/common/environmentVariableCollection.js +196 -0
  81. package/dist/vscode/vs/platform/terminal/common/environmentVariableShared.js +23 -0
  82. package/dist/vscode/vs/platform/terminal/common/terminal.js +21 -1
  83. package/dist/vscode/vs/platform/terminal/common/terminalDataBuffering.js +45 -0
  84. package/dist/vscode/vs/platform/terminal/common/terminalEnvironment.js +37 -0
  85. package/dist/vscode/vs/platform/terminal/common/terminalPlatformConfiguration.js +622 -0
  86. package/dist/vscode/vs/platform/terminal/common/terminalProfiles.js +107 -0
  87. package/dist/vscode/vs/platform/terminal/common/terminalRecorder.js +66 -0
  88. package/dist/vscode/vs/platform/terminal/common/terminalStrings.js +16 -0
  89. package/dist/vscode/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +321 -0
  90. package/dist/vscode/vs/platform/userDataSync/common/settingsMerge.js +39 -1
  91. package/dist/vscode/vs/platform/userDataSync/common/userDataSync.js +19 -0
  92. package/dist/vscode/vs/platform/window/common/window.js +7 -1
  93. package/dist/vscode/vs/platform/workspace/common/canonicalUri.js +3 -0
  94. package/dist/vscode/vs/platform/workspace/common/virtualWorkspace.js +4 -1
  95. package/dist/vscode/vs/platform/workspaces/common/workspaces.js +2 -2
  96. package/dist/vscode/vs/workbench/api/browser/mainThreadCommands.js +2 -3
  97. package/dist/vscode/vs/workbench/api/browser/mainThreadEditorTabs.js +473 -0
  98. package/dist/vscode/vs/workbench/api/browser/mainThreadLanguageFeatures.js +45 -38
  99. package/dist/vscode/vs/workbench/api/browser/mainThreadSearch.js +146 -0
  100. package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +33 -52
  101. package/dist/vscode/vs/workbench/api/browser/mainThreadTerminalService.js +395 -0
  102. package/dist/vscode/vs/workbench/api/browser/mainThreadTheming.js +22 -0
  103. package/dist/vscode/vs/workbench/api/browser/mainThreadTreeViews.js +10 -5
  104. package/dist/vscode/vs/workbench/api/browser/mainThreadWindow.js +11 -4
  105. package/dist/vscode/vs/workbench/api/browser/mainThreadWorkspace.js +34 -11
  106. package/dist/vscode/vs/workbench/api/browser/statusBarExtensionPoint.js +81 -0
  107. package/dist/vscode/vs/workbench/api/common/extHost.protocol.js +7 -2
  108. package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +4 -13
  109. package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +30 -15
  110. package/dist/vscode/vs/workbench/api/common/extHostFileSystemConsumer.js +20 -6
  111. package/dist/vscode/vs/workbench/api/common/extHostLanguageFeatures.js +41 -8
  112. package/dist/vscode/vs/workbench/api/common/extHostManagedSockets.js +3 -0
  113. package/dist/vscode/vs/workbench/api/common/extHostSearch.js +109 -0
  114. package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +33 -6
  115. package/dist/vscode/vs/workbench/api/common/extHostTerminalService.js +879 -1
  116. package/dist/vscode/vs/workbench/api/common/extHostTheming.js +38 -0
  117. package/dist/vscode/vs/workbench/api/common/extHostTreeViews.js +8 -5
  118. package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +15 -17
  119. package/dist/vscode/vs/workbench/api/common/extHostTypes.js +117 -4
  120. package/dist/vscode/vs/workbench/api/common/extHostWindow.js +28 -6
  121. package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +28 -0
  122. package/dist/vscode/vs/workbench/api/common/shared/dataTransferCache.js +11 -14
  123. package/dist/vscode/vs/workbench/api/node/extHostTerminalService.js +22 -0
  124. package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +2 -1
  125. package/dist/vscode/vs/workbench/browser/actions/windowActions.js +2 -2
  126. package/dist/vscode/vs/workbench/browser/dnd.js +56 -2
  127. package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
  128. package/dist/vscode/vs/workbench/browser/parts/dialogs/dialogHandler.js +2 -2
  129. package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +1 -0
  130. package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +1 -0
  131. package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +9 -10
  132. package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +15 -9
  133. package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +13 -17
  134. package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1 -1
  135. package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +2 -2
  136. package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +1 -1
  137. package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +1 -1
  138. package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +3 -1
  139. package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +60 -11
  140. package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -10
  141. package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +1 -1
  142. package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +1 -1
  143. package/dist/vscode/vs/workbench/browser/parts/views/checkbox.js +10 -0
  144. package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +78 -14
  145. package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
  146. package/dist/vscode/vs/workbench/browser/workbench.contribution.js +65 -6
  147. package/dist/vscode/vs/workbench/common/configuration.js +8 -1
  148. package/dist/vscode/vs/workbench/common/contextkeys.js +9 -1
  149. package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +5 -1
  150. package/dist/vscode/vs/workbench/common/editor/resourceEditorInput.js +6 -3
  151. package/dist/vscode/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
  152. package/dist/vscode/vs/workbench/common/editor.js +1 -5
  153. package/dist/vscode/vs/workbench/common/resources.js +111 -34
  154. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +1 -1
  155. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +1 -1
  156. package/dist/vscode/vs/workbench/contrib/chat/browser/chat.js +3 -0
  157. package/dist/vscode/vs/workbench/contrib/chat/common/chatService.js +3 -0
  158. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +6 -4
  159. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +4 -0
  160. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +250 -0
  161. package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput.js +290 -0
  162. package/dist/vscode/vs/workbench/contrib/customEditor/common/customEditor.js +3 -0
  163. package/dist/vscode/vs/workbench/contrib/debug/browser/debugActionViewItems.js +1 -0
  164. package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +2 -1
  165. package/dist/vscode/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +20 -20
  166. package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorActions.js +5 -3
  167. package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +5 -2
  168. package/dist/vscode/vs/workbench/contrib/debug/browser/debugHover.js +33 -6
  169. package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +1 -1
  170. package/dist/vscode/vs/workbench/contrib/debug/browser/debugTaskRunner.js +1 -1
  171. package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +3 -3
  172. package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +29 -17
  173. package/dist/vscode/vs/workbench/contrib/debug/common/debugStorage.js +11 -10
  174. package/dist/vscode/vs/workbench/contrib/debug/common/debugger.js +10 -6
  175. package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsActions.js +2514 -0
  176. package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons.js +82 -0
  177. package/dist/vscode/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +4 -0
  178. package/dist/vscode/vs/workbench/contrib/extensions/common/extensions.js +6 -1
  179. package/dist/vscode/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +16 -0
  180. package/dist/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +2 -3
  181. package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +2 -0
  182. package/dist/vscode/vs/workbench/contrib/files/browser/explorerService.js +10 -6
  183. package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +3 -18
  184. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +37 -2
  185. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +65 -3
  186. package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +3 -3
  187. package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +3 -1
  188. package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +41 -6
  189. package/dist/vscode/vs/workbench/contrib/files/browser/files.js +1 -0
  190. package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerView.js +3 -3
  191. package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerViewer.js +6 -2
  192. package/dist/vscode/vs/workbench/contrib/files/common/explorerModel.js +16 -9
  193. package/dist/vscode/vs/workbench/contrib/files/common/files.js +1 -6
  194. package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveDocumentService.js +3 -0
  195. package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +200 -0
  196. package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +3 -0
  197. package/dist/vscode/vs/workbench/contrib/markers/browser/markers.contribution.js +586 -0
  198. package/dist/vscode/vs/workbench/contrib/markers/browser/markersFilterOptions.js +75 -0
  199. package/dist/vscode/vs/workbench/contrib/markers/browser/markersModel.js +201 -0
  200. package/dist/vscode/vs/workbench/contrib/markers/browser/markersTable.js +451 -0
  201. package/dist/vscode/vs/workbench/contrib/markers/browser/markersTreeViewer.js +670 -0
  202. package/dist/vscode/vs/workbench/contrib/markers/browser/markersView.js +857 -0
  203. package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.css.js +4 -0
  204. package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.js +132 -0
  205. package/dist/vscode/vs/workbench/contrib/markers/browser/media/markers.css.js +4 -0
  206. package/dist/vscode/vs/workbench/contrib/markers/browser/messages.js +171 -0
  207. package/dist/vscode/vs/workbench/contrib/markers/common/markers.js +15 -1
  208. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +135 -0
  209. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +421 -0
  210. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
  211. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +55 -0
  212. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
  213. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
  214. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +334 -0
  215. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +606 -0
  216. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
  217. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +36 -0
  218. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
  219. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
  220. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/utils.js +68 -0
  221. package/dist/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +2 -0
  222. package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
  223. package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
  224. package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +158 -0
  225. package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +6 -1
  226. package/dist/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.js +3 -0
  227. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -1
  228. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +3 -0
  229. package/dist/vscode/vs/workbench/contrib/output/browser/logViewer.js +64 -0
  230. package/dist/vscode/vs/workbench/contrib/output/browser/output.contribution.js +378 -0
  231. package/dist/vscode/vs/workbench/contrib/output/browser/outputServices.js +39 -3
  232. package/dist/vscode/vs/workbench/contrib/output/browser/outputView.js +220 -0
  233. package/dist/vscode/vs/workbench/contrib/output/common/outputChannelModel.js +12 -3
  234. package/dist/vscode/vs/workbench/contrib/output/common/outputLinkComputer.js +129 -0
  235. package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +270 -0
  236. package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingsEditor.js +1080 -0
  237. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +4 -0
  238. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css.js +4 -0
  239. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/preferences.css.js +4 -0
  240. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css.js +4 -0
  241. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css.js +4 -0
  242. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferences.contribution.js +1154 -0
  243. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesActions.js +94 -0
  244. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesEditor.js +47 -0
  245. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesIcons.js +37 -0
  246. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesRenderers.js +731 -0
  247. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesSearch.js +271 -0
  248. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +479 -0
  249. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditor2.js +1465 -0
  250. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.js +506 -0
  251. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsLayout.js +296 -0
  252. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsSearchMenu.js +79 -0
  253. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTree.js +1984 -0
  254. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +759 -0
  255. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsWidgets.js +1008 -0
  256. package/dist/vscode/vs/workbench/contrib/preferences/browser/tocTree.js +196 -0
  257. package/dist/vscode/vs/workbench/contrib/preferences/common/preferences.js +68 -0
  258. package/dist/vscode/vs/workbench/contrib/preferences/common/preferencesContribution.js +157 -0
  259. package/dist/vscode/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +67 -0
  260. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +16 -16
  261. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +1 -2
  262. package/dist/vscode/vs/workbench/contrib/remote/browser/remoteExplorer.js +23 -2
  263. package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +5 -5
  264. package/dist/vscode/vs/workbench/contrib/search/browser/media/searchview.css.js +4 -0
  265. package/dist/vscode/vs/workbench/contrib/search/browser/patternInputWidget.js +217 -0
  266. package/dist/vscode/vs/workbench/contrib/search/browser/replace.js +3 -0
  267. package/dist/vscode/vs/workbench/contrib/search/browser/replaceContributions.js +7 -0
  268. package/dist/vscode/vs/workbench/contrib/search/browser/replaceService.js +222 -0
  269. package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +54 -15
  270. package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsBase.js +17 -0
  271. package/dist/vscode/vs/workbench/contrib/search/browser/searchFindInput.js +41 -0
  272. package/dist/vscode/vs/workbench/contrib/search/browser/searchIcons.js +35 -0
  273. package/dist/vscode/vs/workbench/contrib/search/browser/searchMessage.js +58 -0
  274. package/dist/vscode/vs/workbench/contrib/search/browser/searchModel.js +1842 -0
  275. package/dist/vscode/vs/workbench/contrib/search/browser/searchNotebookHelpers.js +49 -0
  276. package/dist/vscode/vs/workbench/contrib/search/browser/searchResultsView.js +379 -0
  277. package/dist/vscode/vs/workbench/contrib/search/browser/searchView.js +1867 -0
  278. package/dist/vscode/vs/workbench/contrib/search/browser/searchWidget.js +628 -0
  279. package/dist/vscode/vs/workbench/contrib/search/common/constants.js +30 -1
  280. package/dist/vscode/vs/workbench/contrib/search/common/search.js +9 -1
  281. package/dist/vscode/vs/workbench/contrib/search/common/searchHistoryService.js +42 -0
  282. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
  283. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +4 -0
  284. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +477 -0
  285. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.js +697 -0
  286. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +188 -0
  287. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +295 -0
  288. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +135 -0
  289. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +268 -0
  290. package/dist/vscode/vs/workbench/contrib/snippets/browser/tabCompletion.js +2 -2
  291. package/dist/vscode/vs/workbench/contrib/tasks/common/taskService.js +16 -1
  292. package/dist/vscode/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +119 -0
  293. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/scrollbar.css.js +4 -0
  294. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/terminal.css.js +4 -0
  295. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/widgets.css.js +4 -0
  296. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/xterm.css.js +4 -0
  297. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.contribution.js +238 -0
  298. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
  299. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalActions.js +1930 -0
  300. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalCommands.js +22 -0
  301. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalConfigHelper.js +213 -0
  302. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +17 -0
  303. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditor.js +186 -0
  304. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +199 -0
  305. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorService.js +239 -0
  306. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalExtensions.js +22 -0
  307. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroup.js +482 -0
  308. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroupService.js +372 -0
  309. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +60 -1
  310. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcons.js +37 -0
  311. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstance.js +2123 -0
  312. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstanceService.js +79 -0
  313. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMainContribution.js +82 -0
  314. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMenus.js +850 -0
  315. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +142 -0
  316. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +618 -0
  317. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.js +278 -0
  318. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.js +417 -0
  319. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileService.js +213 -0
  320. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +144 -0
  321. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +267 -0
  322. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalService.js +1063 -0
  323. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalStatusList.js +108 -0
  324. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabbedView.js +417 -0
  325. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabsList.js +680 -0
  326. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTooltip.js +72 -0
  327. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalUri.js +39 -0
  328. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalView.js +535 -0
  329. package/dist/vscode/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
  330. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +469 -0
  331. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +97 -0
  332. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +56 -0
  333. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +416 -0
  334. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
  335. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +587 -0
  336. package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariable.js +3 -0
  337. package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariableService.js +94 -0
  338. package/dist/vscode/vs/workbench/contrib/terminal/common/history.js +356 -0
  339. package/dist/vscode/vs/workbench/contrib/terminal/common/terminal.js +266 -0
  340. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -16
  341. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalConfiguration.js +965 -0
  342. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalContextKey.js +157 -0
  343. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment.js +272 -0
  344. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalExtensionPoints.js +27 -0
  345. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalStrings.js +86 -0
  346. package/dist/vscode/vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService.js +46 -0
  347. package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/links.js +3 -0
  348. package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.js +26 -0
  349. package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.js +3 -0
  350. package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService.js +143 -0
  351. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +85 -0
  352. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.js +52 -0
  353. package/dist/vscode/vs/workbench/services/actions/common/menusExtensionPoint.js +14 -6
  354. package/dist/vscode/vs/workbench/services/assignment/common/assignmentService.js +3 -0
  355. package/dist/vscode/vs/workbench/services/configuration/browser/configurationService.js +13 -13
  356. package/dist/vscode/vs/workbench/services/configuration/common/configuration.js +2 -1
  357. package/dist/vscode/vs/workbench/services/configuration/common/configurationEditing.js +2 -2
  358. package/dist/vscode/vs/workbench/services/configuration/common/jsonEditingService.js +2 -2
  359. package/dist/vscode/vs/workbench/services/dialogs/browser/abstractFileDialogService.js +302 -0
  360. package/dist/vscode/vs/workbench/services/dialogs/browser/simpleFileDialog.js +971 -0
  361. package/dist/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.js +3 -2
  362. package/dist/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +4 -0
  363. package/dist/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +2 -0
  364. package/dist/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.js +3 -0
  365. package/dist/vscode/vs/workbench/services/extensions/common/extensions.js +14 -2
  366. package/dist/vscode/vs/workbench/services/extensions/common/extensionsApiProposals.js +10 -1
  367. package/dist/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +70 -3
  368. package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
  369. package/dist/vscode/vs/workbench/services/hover/browser/hoverWidget.js +2 -1
  370. package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +1 -1
  371. package/dist/vscode/vs/workbench/services/keybinding/common/keybindingEditing.js +275 -0
  372. package/dist/vscode/vs/workbench/services/localization/common/locale.js +3 -0
  373. package/dist/vscode/vs/workbench/services/log/common/logConstants.js +2 -0
  374. package/dist/vscode/vs/workbench/services/output/common/output.js +4 -1
  375. package/dist/vscode/vs/workbench/services/preferences/common/preferences.js +22 -1
  376. package/dist/vscode/vs/workbench/services/preferences/common/preferencesModels.js +6 -0
  377. package/dist/vscode/vs/workbench/services/preferences/common/preferencesValidation.js +37 -1
  378. package/dist/vscode/vs/workbench/services/remote/common/remoteAgentService.js +69 -0
  379. package/dist/vscode/vs/workbench/services/remote/common/remoteExplorerService.js +66 -27
  380. package/dist/vscode/vs/workbench/services/search/common/fileSearchManager.js +265 -0
  381. package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +6 -0
  382. package/dist/vscode/vs/workbench/services/search/common/replace.js +203 -0
  383. package/dist/vscode/vs/workbench/services/search/common/search.js +227 -1
  384. package/dist/vscode/vs/workbench/services/search/common/searchExtTypes.js +6 -0
  385. package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +72 -0
  386. package/dist/vscode/vs/workbench/services/search/common/searchService.js +355 -0
  387. package/dist/vscode/vs/workbench/services/search/common/textSearchManager.js +309 -0
  388. package/dist/vscode/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
  389. package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
  390. package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
  391. package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +399 -0
  392. package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
  393. package/dist/vscode/vs/workbench/services/terminal/common/embedderTerminalService.js +3 -0
  394. package/dist/vscode/vs/workbench/services/textfile/browser/textFileService.js +1 -1
  395. package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModel.js +10 -3
  396. package/dist/vscode/vs/workbench/services/themes/browser/fileIconThemeData.js +3 -3
  397. package/dist/vscode/vs/workbench/services/themes/browser/productIconThemeData.js +3 -3
  398. package/dist/vscode/vs/workbench/services/themes/common/colorThemeData.js +3 -3
  399. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput.js +6 -4
  400. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel.js +3 -0
  401. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -0
  402. package/dist/vscode/vs/workbench/services/userActivity/common/userActivityRegistry.js +15 -0
  403. package/dist/vscode/vs/workbench/services/userActivity/common/userActivityService.js +37 -0
  404. package/dist/vscode/vs/workbench/services/userDataSync/common/userDataSync.js +7 -0
  405. package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.js +40 -0
  406. package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyService.js +12 -0
  407. package/dist/vscode/vs/workbench/services/workspaces/common/canonicalUriService.js +19 -0
  408. package/dist/vscode-default-extensions/css/syntaxes/css.tmLanguage.json.extensionResource.js +1 -1
  409. package/dist/vscode-default-extensions/json/package.json.js +1 -1
  410. package/dist/vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.extensionResource.js +1 -1
  411. package/dist/vscode-default-extensions/json/syntaxes/JSONL.tmLanguage.json.extensionResource.js +2 -0
  412. package/dist/vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.extensionResource.js +1 -1
  413. package/dist/vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.extensionResource.js +1 -1
  414. package/dist/vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.extensionResource.js +1 -1
  415. package/dist/vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.extensionResource.js +1 -1
  416. package/dist/vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.extensionResource.js +1 -1
  417. package/dist/vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.extensionResource.js +1 -1
  418. package/dist/vscode-default-extensions/perl/package.json.js +1 -1
  419. package/dist/vscode-default-extensions/php/snippets/php.code-snippets.extensionResource.js +1 -1
  420. package/dist/vscode-default-extensions/sql/language-configuration.json.extensionResource.js +1 -1
  421. package/dist/vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.extensionResource.js +1 -1
  422. package/dist/vscode-default-extensions/theme-defaults/package.json.js +1 -1
  423. package/dist/vscode-default-extensions/theme-defaults/themes/dark_modern.json.extensionResource.js +2 -0
  424. package/dist/vscode-default-extensions/theme-defaults/themes/dark_vs.json.extensionResource.js +1 -1
  425. package/dist/vscode-default-extensions/theme-defaults/themes/hc_black.json.extensionResource.js +1 -1
  426. package/dist/vscode-default-extensions/theme-defaults/themes/hc_light.json.extensionResource.js +1 -1
  427. package/dist/vscode-default-extensions/theme-defaults/themes/light_modern.json.extensionResource.js +2 -0
  428. package/dist/vscode-default-extensions/theme-defaults/themes/light_vs.json.extensionResource.js +1 -1
  429. package/dist/vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.extensionResource.js +1 -1
  430. package/dist/vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.extensionResource.js +1 -1
  431. package/dist/vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.extensionResource.js +1 -1
  432. package/dist/vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.extensionResource.js +1 -1
  433. package/dist/vscode-default-extensions/theme-red/themes/Red-color-theme.json.extensionResource.js +1 -1
  434. package/dist/vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.extensionResource.js +1 -1
  435. package/dist/vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.extensionResource.js +1 -1
  436. package/dist/vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.extensionResource.js +1 -1
  437. package/dist/vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.extensionResource.js +1 -1
  438. package/dist/vscode-default-extensions/vb/language-configuration.json.extensionResource.js +1 -1
  439. package/dist/vscode-services/env.js +4 -2
  440. package/dist/vscode-services/extHost.js +32 -48
  441. package/dist/vscode-services/missing-services.js +407 -29
  442. package/dist/vscode-services/window.js +59 -65
  443. package/dist/vscode-services/workspace.js +19 -5
  444. package/dist/workers/outputLinkComputer.worker.d.ts +2 -0
  445. package/dist/workers/outputLinkComputer.worker.js +3 -0
  446. package/dist/workspace.d.ts +1 -1
  447. package/monaco-editor-treemending.patch +1305 -1184
  448. package/package.json +65 -19
  449. package/dist/activity.d.ts +0 -2802
  450. package/dist/collections.d.ts +0 -7
  451. package/dist/colorRegistry.d.ts +0 -710
  452. package/dist/vscode/vs/platform/product/common/product.js +0 -48
  453. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionFollowups.js +0 -30
  454. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +0 -196
  455. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionListRenderer.js +0 -622
  456. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionOptions.js +0 -77
  457. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +0 -311
  458. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +0 -4
  459. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +0 -56
  460. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +0 -305
  461. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +0 -13
  462. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +0 -379
  463. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionViewModel.js +0 -207
  464. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWidgetHistoryService.js +0 -3
  465. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWordCounter.js +0 -25
  466. package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.extensionResource.js +0 -2
  467. package/dist/vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.extensionResource.js +0 -2
@@ -0,0 +1,587 @@
1
+ import { __decorate, __param } from '../../../../../../../node_modules/tslib/tslib.es6.js';
2
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
3
+ import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import { isSafari } from 'monaco-editor/esm/vs/base/browser/browser.js';
5
+ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
6
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
7
+ import { Severity, INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
8
+ import { MarkNavigationAddon } from './markNavigationAddon.js';
9
+ import { localize } from 'monaco-editor/esm/vs/nls.js';
10
+ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
11
+ import { PANEL_BACKGROUND } from '../../../../common/theme.js';
12
+ import { TERMINAL_BACKGROUND_COLOR, TERMINAL_FIND_MATCH_BACKGROUND_COLOR, TERMINAL_FIND_MATCH_BORDER_COLOR, TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR, TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR, TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR, TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR, TERMINAL_FOREGROUND_COLOR, TERMINAL_CURSOR_FOREGROUND_COLOR, TERMINAL_CURSOR_BACKGROUND_COLOR, TERMINAL_SELECTION_BACKGROUND_COLOR, TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR, TERMINAL_SELECTION_FOREGROUND_COLOR, ansiColorIdentifiers } from '../../common/terminalColorRegistry.js';
13
+ import { ShellIntegrationAddon } from '../../../../../platform/terminal/common/xterm/shellIntegrationAddon.js';
14
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
15
+ import { DecorationAddon } from './decorationAddon.js';
16
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
17
+ import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
18
+ import { SuggestAddon } from './suggestAddon.js';
19
+ let CanvasAddon;
20
+ let ImageAddon;
21
+ let SearchAddon;
22
+ let SerializeAddon;
23
+ let Unicode11Addon;
24
+ let WebglAddon;
25
+ function getFullBufferLineAsString(lineIndex, buffer) {
26
+ let line = buffer.getLine(lineIndex);
27
+ if (!line) {
28
+ return { lineData: undefined, lineIndex };
29
+ }
30
+ let lineData = line.translateToString(true);
31
+ while (lineIndex > 0 && line.isWrapped) {
32
+ line = buffer.getLine(--lineIndex);
33
+ if (!line) {
34
+ break;
35
+ }
36
+ lineData = line.translateToString(false) + lineData;
37
+ }
38
+ return { lineData, lineIndex };
39
+ }
40
+ let XtermTerminal = class XtermTerminal extends DisposableStore {
41
+ *getBufferReverseIterator() {
42
+ for (let i = this.raw.buffer.active.length; i >= 0; i--) {
43
+ const { lineData, lineIndex } = getFullBufferLineAsString(i, this.raw.buffer.active);
44
+ if (lineData) {
45
+ i = lineIndex;
46
+ yield lineData;
47
+ }
48
+ }
49
+ }
50
+ get findResult() { return this._lastFindResult; }
51
+ get isStdinDisabled() { return !!this.raw.options.disableStdin; }
52
+ get markTracker() { return this._markNavigationAddon; }
53
+ get shellIntegration() { return this._shellIntegrationAddon; }
54
+ get suggestController() { return this._suggestAddon; }
55
+ get textureAtlas() {
56
+ const canvas = this._webglAddon?.textureAtlas || this._canvasAddon?.textureAtlas;
57
+ if (!canvas) {
58
+ return undefined;
59
+ }
60
+ return createImageBitmap(canvas);
61
+ }
62
+ constructor(xtermCtor, _configHelper, cols, rows, _backgroundColorProvider, _capabilities, shellIntegrationNonce, _terminalSuggestWidgetVisibleContextKey, disableShellIntegrationReporting, _configurationService, _instantiationService, _logService, _notificationService, _storageService, _themeService, _telemetryService) {
63
+ super();
64
+ this._configHelper = _configHelper;
65
+ this._backgroundColorProvider = _backgroundColorProvider;
66
+ this._capabilities = _capabilities;
67
+ this._terminalSuggestWidgetVisibleContextKey = _terminalSuggestWidgetVisibleContextKey;
68
+ this._configurationService = _configurationService;
69
+ this._instantiationService = _instantiationService;
70
+ this._logService = _logService;
71
+ this._notificationService = _notificationService;
72
+ this._storageService = _storageService;
73
+ this._themeService = _themeService;
74
+ this._telemetryService = _telemetryService;
75
+ this._onDidRequestRunCommand = ( new Emitter());
76
+ this.onDidRequestRunCommand = this._onDidRequestRunCommand.event;
77
+ this._onDidRequestFocus = ( new Emitter());
78
+ this.onDidRequestFocus = this._onDidRequestFocus.event;
79
+ this._onDidRequestSendText = ( new Emitter());
80
+ this.onDidRequestSendText = this._onDidRequestSendText.event;
81
+ this._onDidRequestFreePort = ( new Emitter());
82
+ this.onDidRequestFreePort = this._onDidRequestFreePort.event;
83
+ this._onDidChangeFindResults = ( new Emitter());
84
+ this.onDidChangeFindResults = this._onDidChangeFindResults.event;
85
+ this._onDidChangeSelection = ( new Emitter());
86
+ this.onDidChangeSelection = this._onDidChangeSelection.event;
87
+ const font = this._configHelper.getFont(undefined, true);
88
+ const config = this._configHelper.config;
89
+ const editorOptions = this._configurationService.getValue('editor');
90
+ this.raw = this.add(( new xtermCtor({
91
+ allowProposedApi: true,
92
+ cols,
93
+ rows,
94
+ altClickMovesCursor: config.altClickMovesCursor && editorOptions.multiCursorModifier === 'alt',
95
+ scrollback: config.scrollback,
96
+ theme: this._getXtermTheme(),
97
+ drawBoldTextInBrightColors: config.drawBoldTextInBrightColors,
98
+ fontFamily: font.fontFamily,
99
+ fontWeight: config.fontWeight,
100
+ fontWeightBold: config.fontWeightBold,
101
+ fontSize: font.fontSize,
102
+ letterSpacing: font.letterSpacing,
103
+ lineHeight: font.lineHeight,
104
+ minimumContrastRatio: config.minimumContrastRatio,
105
+ tabStopWidth: config.tabStopWidth,
106
+ cursorBlink: config.cursorBlinking,
107
+ cursorStyle: config.cursorStyle === 'line' ? 'bar' : config.cursorStyle,
108
+ cursorWidth: config.cursorWidth,
109
+ macOptionIsMeta: config.macOptionIsMeta,
110
+ macOptionClickForcesSelection: config.macOptionClickForcesSelection,
111
+ rightClickSelectsWord: config.rightClickBehavior === 'selectWord',
112
+ fastScrollModifier: 'alt',
113
+ fastScrollSensitivity: config.fastScrollSensitivity,
114
+ scrollSensitivity: config.mouseWheelScrollSensitivity,
115
+ wordSeparator: config.wordSeparators,
116
+ overviewRulerWidth: 10,
117
+ smoothScrollDuration: config.smoothScrolling ? 125 : 0
118
+ })));
119
+ this._core = this.raw._core;
120
+ this.add(this._configurationService.onDidChangeConfiguration(async (e) => {
121
+ if (e.affectsConfiguration("terminal.integrated.gpuAcceleration" )) {
122
+ XtermTerminal._suggestedRendererType = undefined;
123
+ }
124
+ if (e.affectsConfiguration('terminal.integrated') || e.affectsConfiguration('editor.fastScrollSensitivity') || e.affectsConfiguration('editor.mouseWheelScrollSensitivity') || e.affectsConfiguration('editor.multiCursorModifier')) {
125
+ this.updateConfig();
126
+ }
127
+ if (e.affectsConfiguration("terminal.integrated.unicodeVersion" )) {
128
+ this._updateUnicodeVersion();
129
+ }
130
+ }));
131
+ this.add(this._themeService.onDidColorThemeChange(theme => this._updateTheme(theme)));
132
+ this.add(this.raw.onSelectionChange(() => this._onDidChangeSelection.fire()));
133
+ this._updateUnicodeVersion();
134
+ this._refreshImageAddon();
135
+ this._markNavigationAddon = this._instantiationService.createInstance(MarkNavigationAddon, _capabilities);
136
+ this.raw.loadAddon(this._markNavigationAddon);
137
+ this._decorationAddon = this._instantiationService.createInstance(DecorationAddon, this._capabilities);
138
+ this._decorationAddon.onDidRequestRunCommand(e => this._onDidRequestRunCommand.fire(e));
139
+ this.raw.loadAddon(this._decorationAddon);
140
+ this._shellIntegrationAddon = this._instantiationService.createInstance(ShellIntegrationAddon, shellIntegrationNonce, disableShellIntegrationReporting, this._telemetryService);
141
+ this.raw.loadAddon(this._shellIntegrationAddon);
142
+ this._suggestAddon = this._instantiationService.createInstance(SuggestAddon, this._terminalSuggestWidgetVisibleContextKey);
143
+ this.raw.loadAddon(this._suggestAddon);
144
+ this._suggestAddon.onAcceptedCompletion(async (text) => {
145
+ this._onDidRequestFocus.fire();
146
+ this._onDidRequestSendText.fire(text);
147
+ });
148
+ }
149
+ async getSelectionAsHtml(command) {
150
+ if (!this._serializeAddon) {
151
+ const Addon = await this._getSerializeAddonConstructor();
152
+ this._serializeAddon = ( new Addon());
153
+ this.raw.loadAddon(this._serializeAddon);
154
+ }
155
+ if (command) {
156
+ const length = command.getOutput()?.length;
157
+ const row = command.marker?.line;
158
+ if (!length || !row) {
159
+ throw new Error(`No row ${row} or output length ${length} for command ${command}`);
160
+ }
161
+ this.raw.select(0, row + 1, length - Math.floor(length / this.raw.cols));
162
+ }
163
+ const result = this._serializeAddon.serializeAsHTML({ onlySelection: true });
164
+ if (command) {
165
+ this.raw.clearSelection();
166
+ }
167
+ return result;
168
+ }
169
+ attachToElement(container) {
170
+ if (!this._container) {
171
+ this.raw.open(container);
172
+ }
173
+ if (this._shouldLoadWebgl()) {
174
+ this._enableWebglRenderer();
175
+ }
176
+ else if (this._shouldLoadCanvas()) {
177
+ this._enableCanvasRenderer();
178
+ }
179
+ this._suggestAddon.setContainer(container);
180
+ this._container = container;
181
+ return this._container.querySelector('.xterm-screen');
182
+ }
183
+ updateConfig() {
184
+ const config = this._configHelper.config;
185
+ this.raw.options.altClickMovesCursor = config.altClickMovesCursor;
186
+ this._setCursorBlink(config.cursorBlinking);
187
+ this._setCursorStyle(config.cursorStyle);
188
+ this._setCursorWidth(config.cursorWidth);
189
+ this.raw.options.scrollback = config.scrollback;
190
+ this.raw.options.drawBoldTextInBrightColors = config.drawBoldTextInBrightColors;
191
+ this.raw.options.minimumContrastRatio = config.minimumContrastRatio;
192
+ this.raw.options.tabStopWidth = config.tabStopWidth;
193
+ this.raw.options.fastScrollSensitivity = config.fastScrollSensitivity;
194
+ this.raw.options.scrollSensitivity = config.mouseWheelScrollSensitivity;
195
+ this.raw.options.macOptionIsMeta = config.macOptionIsMeta;
196
+ const editorOptions = this._configurationService.getValue('editor');
197
+ this.raw.options.altClickMovesCursor = config.altClickMovesCursor && editorOptions.multiCursorModifier === 'alt';
198
+ this.raw.options.macOptionClickForcesSelection = config.macOptionClickForcesSelection;
199
+ this.raw.options.rightClickSelectsWord = config.rightClickBehavior === 'selectWord';
200
+ this.raw.options.wordSeparator = config.wordSeparators;
201
+ this.raw.options.customGlyphs = config.customGlyphs;
202
+ this.raw.options.smoothScrollDuration = config.smoothScrolling ? 125 : 0;
203
+ if (this._shouldLoadWebgl()) {
204
+ this._enableWebglRenderer();
205
+ }
206
+ else {
207
+ this._disposeOfWebglRenderer();
208
+ if (this._shouldLoadCanvas()) {
209
+ this._enableCanvasRenderer();
210
+ }
211
+ else {
212
+ this._disposeOfCanvasRenderer();
213
+ }
214
+ }
215
+ this._refreshImageAddon();
216
+ }
217
+ _shouldLoadWebgl() {
218
+ return !isSafari && (this._configHelper.config.gpuAcceleration === 'auto' && XtermTerminal._suggestedRendererType === undefined) || this._configHelper.config.gpuAcceleration === 'on';
219
+ }
220
+ _shouldLoadCanvas() {
221
+ return (this._configHelper.config.gpuAcceleration === 'auto' && (XtermTerminal._suggestedRendererType === undefined || XtermTerminal._suggestedRendererType === 'canvas')) || this._configHelper.config.gpuAcceleration === 'canvas';
222
+ }
223
+ forceRedraw() {
224
+ this.raw.clearTextureAtlas();
225
+ }
226
+ clearDecorations() {
227
+ this._decorationAddon?.clearDecorations();
228
+ }
229
+ forceRefresh() {
230
+ this._core.viewport?._innerRefresh();
231
+ }
232
+ forceUnpause() {
233
+ if (!!this._canvasAddon) {
234
+ this._core._renderService?._handleIntersectionChange({ intersectionRatio: 1 });
235
+ this.raw.refresh(0, this.raw.rows - 1);
236
+ }
237
+ }
238
+ async findNext(term, searchOptions) {
239
+ this._updateFindColors(searchOptions);
240
+ return (await this._getSearchAddon()).findNext(term, searchOptions);
241
+ }
242
+ async findPrevious(term, searchOptions) {
243
+ this._updateFindColors(searchOptions);
244
+ return (await this._getSearchAddon()).findPrevious(term, searchOptions);
245
+ }
246
+ _updateFindColors(searchOptions) {
247
+ const theme = this._themeService.getColorTheme();
248
+ const terminalBackground = theme.getColor(TERMINAL_BACKGROUND_COLOR) || theme.getColor(PANEL_BACKGROUND);
249
+ const findMatchBackground = theme.getColor(TERMINAL_FIND_MATCH_BACKGROUND_COLOR);
250
+ const findMatchBorder = theme.getColor(TERMINAL_FIND_MATCH_BORDER_COLOR);
251
+ const findMatchOverviewRuler = theme.getColor(TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR);
252
+ const findMatchHighlightBackground = theme.getColor(TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR);
253
+ const findMatchHighlightBorder = theme.getColor(TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR);
254
+ const findMatchHighlightOverviewRuler = theme.getColor(TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR);
255
+ searchOptions.decorations = {
256
+ activeMatchBackground: findMatchBackground?.toString(),
257
+ activeMatchBorder: findMatchBorder?.toString() || 'transparent',
258
+ activeMatchColorOverviewRuler: findMatchOverviewRuler?.toString() || 'transparent',
259
+ matchBackground: terminalBackground ? findMatchHighlightBackground?.blend(terminalBackground).toString() : undefined,
260
+ matchBorder: findMatchHighlightBorder?.toString() || 'transparent',
261
+ matchOverviewRuler: findMatchHighlightOverviewRuler?.toString() || 'transparent'
262
+ };
263
+ }
264
+ async _getSearchAddon() {
265
+ if (this._searchAddon) {
266
+ return this._searchAddon;
267
+ }
268
+ const AddonCtor = await this._getSearchAddonConstructor();
269
+ this._searchAddon = ( new AddonCtor({ highlightLimit: 1000 }));
270
+ this.raw.loadAddon(this._searchAddon);
271
+ this._searchAddon.onDidChangeResults((results) => {
272
+ this._lastFindResult = results;
273
+ this._onDidChangeFindResults.fire(results);
274
+ });
275
+ return this._searchAddon;
276
+ }
277
+ clearSearchDecorations() {
278
+ this._searchAddon?.clearDecorations();
279
+ }
280
+ clearActiveSearchDecoration() {
281
+ this._searchAddon?.clearActiveDecoration();
282
+ }
283
+ getFont() {
284
+ return this._configHelper.getFont(this._core);
285
+ }
286
+ getLongestViewportWrappedLineLength() {
287
+ let maxLineLength = 0;
288
+ for (let i = this.raw.buffer.active.length - 1; i >= this.raw.buffer.active.viewportY; i--) {
289
+ const lineInfo = this._getWrappedLineCount(i, this.raw.buffer.active);
290
+ maxLineLength = Math.max(maxLineLength, ((lineInfo.lineCount * this.raw.cols) - lineInfo.endSpaces) || 0);
291
+ i = lineInfo.currentIndex;
292
+ }
293
+ return maxLineLength;
294
+ }
295
+ _getWrappedLineCount(index, buffer) {
296
+ let line = buffer.getLine(index);
297
+ if (!line) {
298
+ throw new Error('Could not get line');
299
+ }
300
+ let currentIndex = index;
301
+ let endSpaces = 0;
302
+ for (let i = Math.min(line.length, this.raw.cols) - 1; i >= 0; i--) {
303
+ if (!line?.getCell(i)?.getChars()) {
304
+ endSpaces++;
305
+ }
306
+ else {
307
+ break;
308
+ }
309
+ }
310
+ while (line?.isWrapped && currentIndex > 0) {
311
+ currentIndex--;
312
+ line = buffer.getLine(currentIndex);
313
+ }
314
+ return { lineCount: index - currentIndex + 1, currentIndex, endSpaces };
315
+ }
316
+ scrollDownLine() {
317
+ this.raw.scrollLines(1);
318
+ }
319
+ scrollDownPage() {
320
+ this.raw.scrollPages(1);
321
+ }
322
+ scrollToBottom() {
323
+ this.raw.scrollToBottom();
324
+ }
325
+ scrollUpLine() {
326
+ this.raw.scrollLines(-1);
327
+ }
328
+ scrollUpPage() {
329
+ this.raw.scrollPages(-1);
330
+ }
331
+ scrollToTop() {
332
+ this.raw.scrollToTop();
333
+ }
334
+ clearBuffer() {
335
+ this.raw.clear();
336
+ this._capabilities.get(2 )?.handlePromptStart();
337
+ this._capabilities.get(2 )?.handleCommandStart();
338
+ }
339
+ _setCursorBlink(blink) {
340
+ if (this.raw.options.cursorBlink !== blink) {
341
+ this.raw.options.cursorBlink = blink;
342
+ this.raw.refresh(0, this.raw.rows - 1);
343
+ }
344
+ }
345
+ _setCursorStyle(style) {
346
+ if (this.raw.options.cursorStyle !== style) {
347
+ this.raw.options.cursorStyle = (style === 'line') ? 'bar' : style;
348
+ }
349
+ }
350
+ _setCursorWidth(width) {
351
+ if (this.raw.options.cursorWidth !== width) {
352
+ this.raw.options.cursorWidth = width;
353
+ }
354
+ }
355
+ async _enableWebglRenderer() {
356
+ if (!this.raw.element || this._webglAddon) {
357
+ return;
358
+ }
359
+ const Addon = await this._getWebglAddonConstructor();
360
+ this._webglAddon = ( new Addon());
361
+ this._disposeOfCanvasRenderer();
362
+ try {
363
+ this.raw.loadAddon(this._webglAddon);
364
+ this._logService.trace('Webgl was loaded');
365
+ this._webglAddon.onContextLoss(() => {
366
+ this._logService.info(`Webgl lost context, disposing of webgl renderer`);
367
+ this._disposeOfWebglRenderer();
368
+ });
369
+ }
370
+ catch (e) {
371
+ this._logService.warn(`Webgl could not be loaded. Falling back to the canvas renderer type.`, e);
372
+ const neverMeasureRenderTime = this._storageService.getBoolean("terminal.integrated.neverMeasureRenderTime" , -1 , false);
373
+ if (!neverMeasureRenderTime && this._configHelper.config.gpuAcceleration !== 'off') {
374
+ this._measureRenderTime();
375
+ }
376
+ XtermTerminal._suggestedRendererType = 'canvas';
377
+ this._disposeOfWebglRenderer();
378
+ this._enableCanvasRenderer();
379
+ }
380
+ }
381
+ async _enableCanvasRenderer() {
382
+ if (!this.raw.element || this._canvasAddon) {
383
+ return;
384
+ }
385
+ const Addon = await this._getCanvasAddonConstructor();
386
+ this._canvasAddon = ( new Addon());
387
+ this._disposeOfWebglRenderer();
388
+ try {
389
+ this.raw.loadAddon(this._canvasAddon);
390
+ this._logService.trace('Canvas renderer was loaded');
391
+ }
392
+ catch (e) {
393
+ this._logService.warn(`Canvas renderer could not be loaded, falling back to dom renderer`, e);
394
+ const neverMeasureRenderTime = this._storageService.getBoolean("terminal.integrated.neverMeasureRenderTime" , -1 , false);
395
+ if (!neverMeasureRenderTime && this._configHelper.config.gpuAcceleration !== 'off') {
396
+ this._measureRenderTime();
397
+ }
398
+ XtermTerminal._suggestedRendererType = 'dom';
399
+ this._disposeOfCanvasRenderer();
400
+ }
401
+ }
402
+ async _getCanvasAddonConstructor() {
403
+ if (!CanvasAddon) {
404
+ CanvasAddon = (await import('xterm-addon-canvas').then(module => module.default ?? module)).CanvasAddon;
405
+ }
406
+ return CanvasAddon;
407
+ }
408
+ async _refreshImageAddon() {
409
+ if (this._configHelper.config.experimentalImageSupport) {
410
+ if (!this._imageAddon) {
411
+ const AddonCtor = await this._getImageAddonConstructor();
412
+ this._imageAddon = ( new AddonCtor());
413
+ this.raw.loadAddon(this._imageAddon);
414
+ }
415
+ }
416
+ else {
417
+ try {
418
+ this._imageAddon?.dispose();
419
+ }
420
+ catch {
421
+ }
422
+ this._imageAddon = undefined;
423
+ }
424
+ }
425
+ async _getImageAddonConstructor() {
426
+ if (!ImageAddon) {
427
+ ImageAddon = (await import('xterm-addon-image').then(module => module.default ?? module)).ImageAddon;
428
+ }
429
+ return ImageAddon;
430
+ }
431
+ async _getSearchAddonConstructor() {
432
+ if (!SearchAddon) {
433
+ SearchAddon = (await import('xterm-addon-search').then(module => module.default ?? module)).SearchAddon;
434
+ }
435
+ return SearchAddon;
436
+ }
437
+ async _getUnicode11Constructor() {
438
+ if (!Unicode11Addon) {
439
+ Unicode11Addon = (await import('xterm-addon-unicode11').then(module => module.default ?? module)).Unicode11Addon;
440
+ }
441
+ return Unicode11Addon;
442
+ }
443
+ async _getWebglAddonConstructor() {
444
+ if (!WebglAddon) {
445
+ WebglAddon = (await import('xterm-addon-webgl').then(module => module.default ?? module)).WebglAddon;
446
+ }
447
+ return WebglAddon;
448
+ }
449
+ async _getSerializeAddonConstructor() {
450
+ if (!SerializeAddon) {
451
+ SerializeAddon = (await import('xterm-addon-serialize').then(module => module.default ?? module)).SerializeAddon;
452
+ }
453
+ return SerializeAddon;
454
+ }
455
+ _disposeOfCanvasRenderer() {
456
+ try {
457
+ this._canvasAddon?.dispose();
458
+ }
459
+ catch {
460
+ }
461
+ this._canvasAddon = undefined;
462
+ }
463
+ _disposeOfWebglRenderer() {
464
+ try {
465
+ this._webglAddon?.dispose();
466
+ }
467
+ catch {
468
+ }
469
+ this._webglAddon = undefined;
470
+ }
471
+ async _measureRenderTime() {
472
+ const frameTimes = [];
473
+ if (!this._core._renderService?._renderer._renderLayers) {
474
+ return;
475
+ }
476
+ const textRenderLayer = this._core._renderService._renderer._renderLayers[0];
477
+ const originalOnGridChanged = textRenderLayer?.onGridChanged;
478
+ const evaluateCanvasRenderer = () => {
479
+ frameTimes.shift();
480
+ const medianTime = frameTimes.sort((a, b) => a - b)[Math.floor(frameTimes.length / 2)];
481
+ if (medianTime > 50 ) {
482
+ if (this._configHelper.config.gpuAcceleration === 'auto') {
483
+ XtermTerminal._suggestedRendererType = 'dom';
484
+ this.updateConfig();
485
+ }
486
+ else {
487
+ const promptChoices = [
488
+ {
489
+ label: ( localize('yes', "Yes")),
490
+ run: () => this._configurationService.updateValue("terminal.integrated.gpuAcceleration" , 'off', 2 )
491
+ },
492
+ {
493
+ label: ( localize('no', "No")),
494
+ run: () => { }
495
+ },
496
+ {
497
+ label: ( localize('dontShowAgain', "Don't Show Again")),
498
+ isSecondary: true,
499
+ run: () => this._storageService.store("terminal.integrated.neverMeasureRenderTime" , true, -1 , 1 )
500
+ }
501
+ ];
502
+ this._notificationService.prompt(Severity.Warning, ( localize(
503
+ 'terminal.slowRendering',
504
+ 'Terminal GPU acceleration appears to be slow on your computer. Would you like to switch to disable it which may improve performance? [Read more about terminal settings](https://code.visualstudio.com/docs/editor/integrated-terminal#_changing-how-the-terminal-is-rendered).'
505
+ )), promptChoices);
506
+ }
507
+ }
508
+ };
509
+ textRenderLayer.onGridChanged = (terminal, firstRow, lastRow) => {
510
+ const startTime = performance.now();
511
+ originalOnGridChanged.call(textRenderLayer, terminal, firstRow, lastRow);
512
+ frameTimes.push(performance.now() - startTime);
513
+ if (frameTimes.length === 20 ) {
514
+ evaluateCanvasRenderer();
515
+ textRenderLayer.onGridChanged = originalOnGridChanged;
516
+ }
517
+ };
518
+ }
519
+ _getXtermTheme(theme) {
520
+ if (!theme) {
521
+ theme = this._themeService.getColorTheme();
522
+ }
523
+ const foregroundColor = theme.getColor(TERMINAL_FOREGROUND_COLOR);
524
+ const backgroundColor = this._backgroundColorProvider.getBackgroundColor(theme);
525
+ const cursorColor = theme.getColor(TERMINAL_CURSOR_FOREGROUND_COLOR) || foregroundColor;
526
+ const cursorAccentColor = theme.getColor(TERMINAL_CURSOR_BACKGROUND_COLOR) || backgroundColor;
527
+ const selectionBackgroundColor = theme.getColor(TERMINAL_SELECTION_BACKGROUND_COLOR);
528
+ const selectionInactiveBackgroundColor = theme.getColor(TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR);
529
+ const selectionForegroundColor = theme.getColor(TERMINAL_SELECTION_FOREGROUND_COLOR) || undefined;
530
+ return {
531
+ background: backgroundColor?.toString(),
532
+ foreground: foregroundColor?.toString(),
533
+ cursor: cursorColor?.toString(),
534
+ cursorAccent: cursorAccentColor?.toString(),
535
+ selectionBackground: selectionBackgroundColor?.toString(),
536
+ selectionInactiveBackground: selectionInactiveBackgroundColor?.toString(),
537
+ selectionForeground: selectionForegroundColor?.toString(),
538
+ black: theme.getColor(ansiColorIdentifiers[0])?.toString(),
539
+ red: theme.getColor(ansiColorIdentifiers[1])?.toString(),
540
+ green: theme.getColor(ansiColorIdentifiers[2])?.toString(),
541
+ yellow: theme.getColor(ansiColorIdentifiers[3])?.toString(),
542
+ blue: theme.getColor(ansiColorIdentifiers[4])?.toString(),
543
+ magenta: theme.getColor(ansiColorIdentifiers[5])?.toString(),
544
+ cyan: theme.getColor(ansiColorIdentifiers[6])?.toString(),
545
+ white: theme.getColor(ansiColorIdentifiers[7])?.toString(),
546
+ brightBlack: theme.getColor(ansiColorIdentifiers[8])?.toString(),
547
+ brightRed: theme.getColor(ansiColorIdentifiers[9])?.toString(),
548
+ brightGreen: theme.getColor(ansiColorIdentifiers[10])?.toString(),
549
+ brightYellow: theme.getColor(ansiColorIdentifiers[11])?.toString(),
550
+ brightBlue: theme.getColor(ansiColorIdentifiers[12])?.toString(),
551
+ brightMagenta: theme.getColor(ansiColorIdentifiers[13])?.toString(),
552
+ brightCyan: theme.getColor(ansiColorIdentifiers[14])?.toString(),
553
+ brightWhite: theme.getColor(ansiColorIdentifiers[15])?.toString()
554
+ };
555
+ }
556
+ _updateTheme(theme) {
557
+ this.raw.options.theme = this._getXtermTheme(theme);
558
+ }
559
+ refresh() {
560
+ this._updateTheme();
561
+ this._decorationAddon.refreshLayouts();
562
+ }
563
+ async _updateUnicodeVersion() {
564
+ if (!this._unicode11Addon && this._configHelper.config.unicodeVersion === '11') {
565
+ const Addon = await this._getUnicode11Constructor();
566
+ this._unicode11Addon = ( new Addon());
567
+ this.raw.loadAddon(this._unicode11Addon);
568
+ }
569
+ if (this.raw.unicode.activeVersion !== this._configHelper.config.unicodeVersion) {
570
+ this.raw.unicode.activeVersion = this._configHelper.config.unicodeVersion;
571
+ }
572
+ }
573
+ _writeText(data) {
574
+ this.raw.write(data);
575
+ }
576
+ };
577
+ XtermTerminal._suggestedRendererType = undefined;
578
+ XtermTerminal = ( __decorate([
579
+ ( __param(9, IConfigurationService)),
580
+ ( __param(10, IInstantiationService)),
581
+ ( __param(11, ILogService)),
582
+ ( __param(12, INotificationService)),
583
+ ( __param(13, IStorageService)),
584
+ ( __param(14, IThemeService)),
585
+ ( __param(15, ITelemetryService))
586
+ ], XtermTerminal));
587
+ export { XtermTerminal };
@@ -0,0 +1,3 @@
1
+ import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
2
+ const IEnvironmentVariableService = ( createDecorator('environmentVariableService'));
3
+ export { IEnvironmentVariableService };
@@ -0,0 +1,94 @@
1
+ import { __decorate, __param } from '../../../../../../node_modules/tslib/tslib.es6.js';
2
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
3
+ import { throttle, debounce } from 'monaco-editor/esm/vs/base/common/decorators.js';
4
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
5
+ import { IExtensionService } from '../../../services/extensions/common/extensions.js';
6
+ import { MergedEnvironmentVariableCollection } from '../../../../platform/terminal/common/environmentVariableCollection.js';
7
+ import { deserializeEnvironmentVariableCollection, deserializeEnvironmentDescriptionMap, serializeEnvironmentVariableCollection, serializeEnvironmentDescriptionMap } from '../../../../platform/terminal/common/environmentVariableShared.js';
8
+ let EnvironmentVariableService = class EnvironmentVariableService {
9
+ get onDidChangeCollections() { return this._onDidChangeCollections.event; }
10
+ constructor(_extensionService, _storageService) {
11
+ this._extensionService = _extensionService;
12
+ this._storageService = _storageService;
13
+ this.collections = ( new Map());
14
+ this._onDidChangeCollections = ( new Emitter());
15
+ this._storageService.remove("terminal.integrated.environmentVariableCollections" , 1 );
16
+ const serializedPersistedCollections = this._storageService.get("terminal.integrated.environmentVariableCollectionsV2" , 1 );
17
+ if (serializedPersistedCollections) {
18
+ const collectionsJson = JSON.parse(serializedPersistedCollections);
19
+ collectionsJson.forEach(c => this.collections.set(c.extensionIdentifier, {
20
+ persistent: true,
21
+ map: deserializeEnvironmentVariableCollection(c.collection),
22
+ descriptionMap: deserializeEnvironmentDescriptionMap(c.description)
23
+ }));
24
+ this._invalidateExtensionCollections();
25
+ }
26
+ this.mergedCollection = this._resolveMergedCollection();
27
+ this._extensionService.onDidChangeExtensions(() => this._invalidateExtensionCollections());
28
+ }
29
+ set(extensionIdentifier, collection) {
30
+ this.collections.set(extensionIdentifier, collection);
31
+ this._updateCollections();
32
+ }
33
+ delete(extensionIdentifier) {
34
+ this.collections.delete(extensionIdentifier);
35
+ this._updateCollections();
36
+ }
37
+ _updateCollections() {
38
+ this._persistCollectionsEventually();
39
+ this.mergedCollection = this._resolveMergedCollection();
40
+ this._notifyCollectionUpdatesEventually();
41
+ }
42
+ _persistCollectionsEventually() {
43
+ this._persistCollections();
44
+ }
45
+ _persistCollections() {
46
+ const collectionsJson = [];
47
+ this.collections.forEach((collection, extensionIdentifier) => {
48
+ if (collection.persistent) {
49
+ collectionsJson.push({
50
+ extensionIdentifier,
51
+ collection: serializeEnvironmentVariableCollection(this.collections.get(extensionIdentifier).map),
52
+ description: serializeEnvironmentDescriptionMap(collection.descriptionMap)
53
+ });
54
+ }
55
+ });
56
+ const stringifiedJson = JSON.stringify(collectionsJson);
57
+ this._storageService.store("terminal.integrated.environmentVariableCollectionsV2" , stringifiedJson, 1 , 1 );
58
+ }
59
+ _notifyCollectionUpdatesEventually() {
60
+ this._notifyCollectionUpdates();
61
+ }
62
+ _notifyCollectionUpdates() {
63
+ this._onDidChangeCollections.fire(this.mergedCollection);
64
+ }
65
+ _resolveMergedCollection() {
66
+ return ( new MergedEnvironmentVariableCollection(this.collections));
67
+ }
68
+ async _invalidateExtensionCollections() {
69
+ await this._extensionService.whenInstalledExtensionsRegistered();
70
+ const registeredExtensions = this._extensionService.extensions;
71
+ let changes = false;
72
+ this.collections.forEach((_, extensionIdentifier) => {
73
+ const isExtensionRegistered = ( registeredExtensions.some(r => r.identifier.value === extensionIdentifier));
74
+ if (!isExtensionRegistered) {
75
+ this.collections.delete(extensionIdentifier);
76
+ changes = true;
77
+ }
78
+ });
79
+ if (changes) {
80
+ this._updateCollections();
81
+ }
82
+ }
83
+ };
84
+ EnvironmentVariableService.__decorator = ( __decorate([
85
+ throttle(1000)
86
+ ], EnvironmentVariableService.prototype, "_persistCollectionsEventually", null));
87
+ EnvironmentVariableService.__decorator = ( __decorate([
88
+ debounce(1000)
89
+ ], EnvironmentVariableService.prototype, "_notifyCollectionUpdatesEventually", null));
90
+ EnvironmentVariableService = ( __decorate([
91
+ ( __param(0, IExtensionService)),
92
+ ( __param(1, IStorageService))
93
+ ], EnvironmentVariableService));
94
+ export { EnvironmentVariableService };