@codingame/monaco-vscode-api 1.79.1 → 1.79.2-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 (463) 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 +1 -1
  26. package/dist/service-override/configuration.d.ts +5 -206
  27. package/dist/service-override/files.d.ts +2 -2
  28. package/dist/service-override/files.js +1 -1
  29. package/dist/service-override/markers.d.ts +7 -0
  30. package/dist/service-override/markers.js +6 -0
  31. package/dist/service-override/output.d.ts +7 -0
  32. package/dist/service-override/output.js +22 -0
  33. package/dist/service-override/preferences.js +7 -1
  34. package/dist/service-override/quickaccess.js +0 -9
  35. package/dist/service-override/search.d.ts +7 -0
  36. package/dist/service-override/search.js +19 -0
  37. package/dist/service-override/terminal.d.ts +607 -0
  38. package/dist/service-override/terminal.js +98 -0
  39. package/dist/service-override/tools/editor.js +1 -1
  40. package/dist/service-override/views.d.ts +561 -335
  41. package/dist/service-override/views.js +51 -11
  42. package/dist/services.d.ts +2627 -108
  43. package/dist/services.js +3 -0
  44. package/dist/severity.d.ts +16 -0
  45. package/dist/uri.d.ts +22 -11
  46. package/dist/views.d.ts +270 -0
  47. package/dist/vscode/vs/base/common/processes.js +24 -0
  48. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/decorations.js +20 -0
  49. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js +106 -0
  50. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js +59 -0
  51. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution.js +41 -0
  52. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js +369 -0
  53. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffModel.js +247 -0
  54. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/lineAlignment.js +179 -0
  55. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/overviewRulerPart.js +121 -0
  56. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/style.css.js +4 -0
  57. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/unchangedRanges.js +184 -0
  58. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/utils.js +88 -0
  59. package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +38 -1
  60. package/dist/vscode/vs/platform/extensionManagement/common/extensionManagementUtil.js +5 -1
  61. package/dist/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +13 -5
  62. package/dist/vscode/vs/platform/files/common/fileService.js +43 -5
  63. package/dist/vscode/vs/platform/files/common/files.js +3 -1
  64. package/dist/vscode/vs/platform/languagePacks/common/languagePacks.js +4 -1
  65. package/dist/vscode/vs/platform/log/common/bufferLog.js +34 -0
  66. package/dist/vscode/vs/platform/log/common/fileLog.js +105 -0
  67. package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +1 -1
  68. package/dist/vscode/vs/platform/remote/common/remoteAuthorityResolver.js +20 -1
  69. package/dist/vscode/vs/platform/request/browser/requestService.js +1 -1
  70. package/dist/vscode/vs/platform/request/common/request.js +3 -3
  71. package/dist/vscode/vs/platform/storage/common/storage.js +3 -0
  72. package/dist/vscode/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +39 -0
  73. package/dist/vscode/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +565 -0
  74. package/dist/vscode/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +27 -0
  75. package/dist/vscode/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +22 -0
  76. package/dist/vscode/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +46 -0
  77. package/dist/vscode/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +80 -0
  78. package/dist/vscode/vs/platform/terminal/common/environmentVariable.js +7 -0
  79. package/dist/vscode/vs/platform/terminal/common/environmentVariableCollection.js +196 -0
  80. package/dist/vscode/vs/platform/terminal/common/environmentVariableShared.js +23 -0
  81. package/dist/vscode/vs/platform/terminal/common/terminal.js +21 -1
  82. package/dist/vscode/vs/platform/terminal/common/terminalDataBuffering.js +45 -0
  83. package/dist/vscode/vs/platform/terminal/common/terminalEnvironment.js +37 -0
  84. package/dist/vscode/vs/platform/terminal/common/terminalPlatformConfiguration.js +622 -0
  85. package/dist/vscode/vs/platform/terminal/common/terminalProfiles.js +107 -0
  86. package/dist/vscode/vs/platform/terminal/common/terminalRecorder.js +66 -0
  87. package/dist/vscode/vs/platform/terminal/common/terminalStrings.js +16 -0
  88. package/dist/vscode/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +321 -0
  89. package/dist/vscode/vs/platform/userDataSync/common/settingsMerge.js +39 -1
  90. package/dist/vscode/vs/platform/userDataSync/common/userDataSync.js +19 -0
  91. package/dist/vscode/vs/platform/workspace/common/canonicalUri.js +3 -0
  92. package/dist/vscode/vs/platform/workspace/common/virtualWorkspace.js +4 -1
  93. package/dist/vscode/vs/platform/workspaces/common/workspaces.js +2 -2
  94. package/dist/vscode/vs/workbench/api/browser/mainThreadCommands.js +2 -3
  95. package/dist/vscode/vs/workbench/api/browser/mainThreadEditorTabs.js +473 -0
  96. package/dist/vscode/vs/workbench/api/browser/mainThreadLanguageFeatures.js +45 -38
  97. package/dist/vscode/vs/workbench/api/browser/mainThreadSearch.js +146 -0
  98. package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +33 -52
  99. package/dist/vscode/vs/workbench/api/browser/mainThreadTerminalService.js +395 -0
  100. package/dist/vscode/vs/workbench/api/browser/mainThreadTheming.js +22 -0
  101. package/dist/vscode/vs/workbench/api/browser/mainThreadTreeViews.js +10 -5
  102. package/dist/vscode/vs/workbench/api/browser/mainThreadWindow.js +11 -4
  103. package/dist/vscode/vs/workbench/api/browser/mainThreadWorkspace.js +34 -11
  104. package/dist/vscode/vs/workbench/api/browser/statusBarExtensionPoint.js +81 -0
  105. package/dist/vscode/vs/workbench/api/common/extHost.protocol.js +7 -2
  106. package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +4 -13
  107. package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +30 -15
  108. package/dist/vscode/vs/workbench/api/common/extHostFileSystemConsumer.js +20 -6
  109. package/dist/vscode/vs/workbench/api/common/extHostLanguageFeatures.js +41 -8
  110. package/dist/vscode/vs/workbench/api/common/extHostManagedSockets.js +3 -0
  111. package/dist/vscode/vs/workbench/api/common/extHostSearch.js +109 -0
  112. package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +33 -6
  113. package/dist/vscode/vs/workbench/api/common/extHostTerminalService.js +879 -1
  114. package/dist/vscode/vs/workbench/api/common/extHostTheming.js +38 -0
  115. package/dist/vscode/vs/workbench/api/common/extHostTreeViews.js +8 -5
  116. package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +15 -17
  117. package/dist/vscode/vs/workbench/api/common/extHostTypes.js +117 -4
  118. package/dist/vscode/vs/workbench/api/common/extHostWindow.js +28 -6
  119. package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +28 -0
  120. package/dist/vscode/vs/workbench/api/common/shared/dataTransferCache.js +11 -14
  121. package/dist/vscode/vs/workbench/api/node/extHostTerminalService.js +22 -0
  122. package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +2 -1
  123. package/dist/vscode/vs/workbench/browser/actions/windowActions.js +2 -2
  124. package/dist/vscode/vs/workbench/browser/dnd.js +56 -2
  125. package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
  126. package/dist/vscode/vs/workbench/browser/parts/dialogs/dialogHandler.js +2 -2
  127. package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +1 -0
  128. package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +1 -0
  129. package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +9 -10
  130. package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +15 -9
  131. package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +13 -17
  132. package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1 -1
  133. package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +2 -2
  134. package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +1 -1
  135. package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +1 -1
  136. package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +3 -1
  137. package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +60 -11
  138. package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -10
  139. package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +1 -1
  140. package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +1 -1
  141. package/dist/vscode/vs/workbench/browser/parts/views/checkbox.js +10 -0
  142. package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +78 -14
  143. package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
  144. package/dist/vscode/vs/workbench/browser/workbench.contribution.js +65 -6
  145. package/dist/vscode/vs/workbench/common/configuration.js +8 -1
  146. package/dist/vscode/vs/workbench/common/contextkeys.js +9 -1
  147. package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +5 -1
  148. package/dist/vscode/vs/workbench/common/editor/resourceEditorInput.js +6 -3
  149. package/dist/vscode/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
  150. package/dist/vscode/vs/workbench/common/editor.js +1 -5
  151. package/dist/vscode/vs/workbench/common/resources.js +111 -34
  152. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +1 -1
  153. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +1 -1
  154. package/dist/vscode/vs/workbench/contrib/chat/browser/chat.js +3 -0
  155. package/dist/vscode/vs/workbench/contrib/chat/common/chatService.js +3 -0
  156. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +6 -4
  157. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +4 -0
  158. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +250 -0
  159. package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput.js +290 -0
  160. package/dist/vscode/vs/workbench/contrib/customEditor/common/customEditor.js +3 -0
  161. package/dist/vscode/vs/workbench/contrib/debug/browser/debugActionViewItems.js +1 -0
  162. package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +2 -1
  163. package/dist/vscode/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +20 -20
  164. package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorActions.js +5 -3
  165. package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +5 -2
  166. package/dist/vscode/vs/workbench/contrib/debug/browser/debugHover.js +33 -6
  167. package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +1 -1
  168. package/dist/vscode/vs/workbench/contrib/debug/browser/debugTaskRunner.js +1 -1
  169. package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +3 -3
  170. package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +29 -17
  171. package/dist/vscode/vs/workbench/contrib/debug/common/debugStorage.js +11 -10
  172. package/dist/vscode/vs/workbench/contrib/debug/common/debugger.js +10 -6
  173. package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsActions.js +2514 -0
  174. package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons.js +82 -0
  175. package/dist/vscode/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +4 -0
  176. package/dist/vscode/vs/workbench/contrib/extensions/common/extensions.js +6 -1
  177. package/dist/vscode/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +16 -0
  178. package/dist/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +2 -3
  179. package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +2 -0
  180. package/dist/vscode/vs/workbench/contrib/files/browser/explorerService.js +10 -6
  181. package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +3 -18
  182. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +37 -2
  183. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +65 -3
  184. package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +3 -3
  185. package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +3 -1
  186. package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +41 -6
  187. package/dist/vscode/vs/workbench/contrib/files/browser/files.js +1 -0
  188. package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerView.js +3 -3
  189. package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerViewer.js +6 -2
  190. package/dist/vscode/vs/workbench/contrib/files/common/explorerModel.js +16 -9
  191. package/dist/vscode/vs/workbench/contrib/files/common/files.js +1 -6
  192. package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveDocumentService.js +3 -0
  193. package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +200 -0
  194. package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +3 -0
  195. package/dist/vscode/vs/workbench/contrib/markers/browser/markers.contribution.js +586 -0
  196. package/dist/vscode/vs/workbench/contrib/markers/browser/markersFilterOptions.js +75 -0
  197. package/dist/vscode/vs/workbench/contrib/markers/browser/markersModel.js +201 -0
  198. package/dist/vscode/vs/workbench/contrib/markers/browser/markersTable.js +451 -0
  199. package/dist/vscode/vs/workbench/contrib/markers/browser/markersTreeViewer.js +670 -0
  200. package/dist/vscode/vs/workbench/contrib/markers/browser/markersView.js +857 -0
  201. package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.css.js +4 -0
  202. package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.js +132 -0
  203. package/dist/vscode/vs/workbench/contrib/markers/browser/media/markers.css.js +4 -0
  204. package/dist/vscode/vs/workbench/contrib/markers/browser/messages.js +171 -0
  205. package/dist/vscode/vs/workbench/contrib/markers/common/markers.js +15 -1
  206. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +135 -0
  207. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +421 -0
  208. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
  209. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +55 -0
  210. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
  211. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
  212. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +334 -0
  213. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +606 -0
  214. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
  215. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +36 -0
  216. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
  217. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
  218. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/utils.js +68 -0
  219. package/dist/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +2 -0
  220. package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
  221. package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
  222. package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +158 -0
  223. package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +6 -1
  224. package/dist/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.js +3 -0
  225. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -1
  226. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +3 -0
  227. package/dist/vscode/vs/workbench/contrib/output/browser/logViewer.js +64 -0
  228. package/dist/vscode/vs/workbench/contrib/output/browser/output.contribution.js +378 -0
  229. package/dist/vscode/vs/workbench/contrib/output/browser/outputServices.js +39 -3
  230. package/dist/vscode/vs/workbench/contrib/output/browser/outputView.js +220 -0
  231. package/dist/vscode/vs/workbench/contrib/output/common/outputChannelModel.js +12 -3
  232. package/dist/vscode/vs/workbench/contrib/output/common/outputLinkComputer.js +129 -0
  233. package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +270 -0
  234. package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingsEditor.js +1080 -0
  235. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +4 -0
  236. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css.js +4 -0
  237. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/preferences.css.js +4 -0
  238. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css.js +4 -0
  239. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css.js +4 -0
  240. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferences.contribution.js +1154 -0
  241. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesActions.js +94 -0
  242. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesEditor.js +47 -0
  243. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesIcons.js +37 -0
  244. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesRenderers.js +731 -0
  245. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesSearch.js +271 -0
  246. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +479 -0
  247. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditor2.js +1465 -0
  248. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.js +506 -0
  249. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsLayout.js +296 -0
  250. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsSearchMenu.js +79 -0
  251. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTree.js +1984 -0
  252. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +759 -0
  253. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsWidgets.js +1008 -0
  254. package/dist/vscode/vs/workbench/contrib/preferences/browser/tocTree.js +196 -0
  255. package/dist/vscode/vs/workbench/contrib/preferences/common/preferences.js +68 -0
  256. package/dist/vscode/vs/workbench/contrib/preferences/common/preferencesContribution.js +157 -0
  257. package/dist/vscode/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +67 -0
  258. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +16 -16
  259. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +1 -2
  260. package/dist/vscode/vs/workbench/contrib/remote/browser/remoteExplorer.js +23 -2
  261. package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +5 -5
  262. package/dist/vscode/vs/workbench/contrib/search/browser/media/searchview.css.js +4 -0
  263. package/dist/vscode/vs/workbench/contrib/search/browser/patternInputWidget.js +217 -0
  264. package/dist/vscode/vs/workbench/contrib/search/browser/replace.js +3 -0
  265. package/dist/vscode/vs/workbench/contrib/search/browser/replaceContributions.js +7 -0
  266. package/dist/vscode/vs/workbench/contrib/search/browser/replaceService.js +222 -0
  267. package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +54 -15
  268. package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsBase.js +17 -0
  269. package/dist/vscode/vs/workbench/contrib/search/browser/searchFindInput.js +41 -0
  270. package/dist/vscode/vs/workbench/contrib/search/browser/searchIcons.js +35 -0
  271. package/dist/vscode/vs/workbench/contrib/search/browser/searchMessage.js +58 -0
  272. package/dist/vscode/vs/workbench/contrib/search/browser/searchModel.js +1842 -0
  273. package/dist/vscode/vs/workbench/contrib/search/browser/searchNotebookHelpers.js +49 -0
  274. package/dist/vscode/vs/workbench/contrib/search/browser/searchResultsView.js +379 -0
  275. package/dist/vscode/vs/workbench/contrib/search/browser/searchView.js +1867 -0
  276. package/dist/vscode/vs/workbench/contrib/search/browser/searchWidget.js +628 -0
  277. package/dist/vscode/vs/workbench/contrib/search/common/constants.js +30 -1
  278. package/dist/vscode/vs/workbench/contrib/search/common/search.js +9 -1
  279. package/dist/vscode/vs/workbench/contrib/search/common/searchHistoryService.js +42 -0
  280. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
  281. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +4 -0
  282. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +477 -0
  283. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.js +697 -0
  284. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +188 -0
  285. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +295 -0
  286. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +135 -0
  287. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +268 -0
  288. package/dist/vscode/vs/workbench/contrib/snippets/browser/tabCompletion.js +2 -2
  289. package/dist/vscode/vs/workbench/contrib/tasks/common/taskService.js +16 -1
  290. package/dist/vscode/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +119 -0
  291. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/scrollbar.css.js +4 -0
  292. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/terminal.css.js +4 -0
  293. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/widgets.css.js +4 -0
  294. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/xterm.css.js +4 -0
  295. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.contribution.js +238 -0
  296. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
  297. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalActions.js +1930 -0
  298. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalCommands.js +22 -0
  299. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalConfigHelper.js +213 -0
  300. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +17 -0
  301. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditor.js +186 -0
  302. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +199 -0
  303. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorService.js +239 -0
  304. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalExtensions.js +22 -0
  305. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroup.js +482 -0
  306. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroupService.js +372 -0
  307. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +60 -1
  308. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcons.js +37 -0
  309. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstance.js +2123 -0
  310. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstanceService.js +79 -0
  311. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMainContribution.js +82 -0
  312. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMenus.js +850 -0
  313. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +142 -0
  314. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +618 -0
  315. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.js +278 -0
  316. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.js +417 -0
  317. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileService.js +213 -0
  318. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +144 -0
  319. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +267 -0
  320. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalService.js +1063 -0
  321. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalStatusList.js +108 -0
  322. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabbedView.js +417 -0
  323. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabsList.js +680 -0
  324. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTooltip.js +72 -0
  325. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalUri.js +39 -0
  326. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalView.js +535 -0
  327. package/dist/vscode/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
  328. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +469 -0
  329. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +97 -0
  330. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +56 -0
  331. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +416 -0
  332. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
  333. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +587 -0
  334. package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariable.js +3 -0
  335. package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariableService.js +94 -0
  336. package/dist/vscode/vs/workbench/contrib/terminal/common/history.js +356 -0
  337. package/dist/vscode/vs/workbench/contrib/terminal/common/terminal.js +266 -0
  338. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -16
  339. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalConfiguration.js +965 -0
  340. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalContextKey.js +157 -0
  341. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment.js +272 -0
  342. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalExtensionPoints.js +27 -0
  343. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalStrings.js +86 -0
  344. package/dist/vscode/vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService.js +46 -0
  345. package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/links.js +3 -0
  346. package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.js +26 -0
  347. package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.js +3 -0
  348. package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService.js +143 -0
  349. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +85 -0
  350. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.js +52 -0
  351. package/dist/vscode/vs/workbench/services/actions/common/menusExtensionPoint.js +14 -6
  352. package/dist/vscode/vs/workbench/services/assignment/common/assignmentService.js +3 -0
  353. package/dist/vscode/vs/workbench/services/configuration/browser/configurationService.js +13 -13
  354. package/dist/vscode/vs/workbench/services/configuration/common/configuration.js +2 -1
  355. package/dist/vscode/vs/workbench/services/configuration/common/configurationEditing.js +2 -2
  356. package/dist/vscode/vs/workbench/services/configuration/common/jsonEditingService.js +2 -2
  357. package/dist/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.js +3 -2
  358. package/dist/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +4 -0
  359. package/dist/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +2 -0
  360. package/dist/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.js +3 -0
  361. package/dist/vscode/vs/workbench/services/extensions/common/extensions.js +14 -2
  362. package/dist/vscode/vs/workbench/services/extensions/common/extensionsApiProposals.js +10 -1
  363. package/dist/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +70 -3
  364. package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
  365. package/dist/vscode/vs/workbench/services/hover/browser/hoverWidget.js +2 -1
  366. package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +1 -1
  367. package/dist/vscode/vs/workbench/services/keybinding/common/keybindingEditing.js +275 -0
  368. package/dist/vscode/vs/workbench/services/localization/common/locale.js +3 -0
  369. package/dist/vscode/vs/workbench/services/log/common/logConstants.js +2 -0
  370. package/dist/vscode/vs/workbench/services/output/common/output.js +4 -1
  371. package/dist/vscode/vs/workbench/services/preferences/common/preferences.js +22 -1
  372. package/dist/vscode/vs/workbench/services/preferences/common/preferencesModels.js +6 -0
  373. package/dist/vscode/vs/workbench/services/preferences/common/preferencesValidation.js +37 -1
  374. package/dist/vscode/vs/workbench/services/remote/common/remoteAgentService.js +69 -0
  375. package/dist/vscode/vs/workbench/services/remote/common/remoteExplorerService.js +66 -27
  376. package/dist/vscode/vs/workbench/services/search/common/fileSearchManager.js +265 -0
  377. package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +6 -0
  378. package/dist/vscode/vs/workbench/services/search/common/replace.js +203 -0
  379. package/dist/vscode/vs/workbench/services/search/common/search.js +227 -1
  380. package/dist/vscode/vs/workbench/services/search/common/searchExtTypes.js +6 -0
  381. package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +72 -0
  382. package/dist/vscode/vs/workbench/services/search/common/searchService.js +355 -0
  383. package/dist/vscode/vs/workbench/services/search/common/textSearchManager.js +309 -0
  384. package/dist/vscode/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
  385. package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
  386. package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
  387. package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +399 -0
  388. package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
  389. package/dist/vscode/vs/workbench/services/terminal/common/embedderTerminalService.js +3 -0
  390. package/dist/vscode/vs/workbench/services/textfile/browser/textFileService.js +1 -1
  391. package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModel.js +10 -3
  392. package/dist/vscode/vs/workbench/services/themes/browser/fileIconThemeData.js +3 -3
  393. package/dist/vscode/vs/workbench/services/themes/browser/productIconThemeData.js +3 -3
  394. package/dist/vscode/vs/workbench/services/themes/common/colorThemeData.js +3 -3
  395. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput.js +6 -4
  396. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel.js +3 -0
  397. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -0
  398. package/dist/vscode/vs/workbench/services/userActivity/common/userActivityRegistry.js +15 -0
  399. package/dist/vscode/vs/workbench/services/userActivity/common/userActivityService.js +37 -0
  400. package/dist/vscode/vs/workbench/services/userDataSync/common/userDataSync.js +7 -0
  401. package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.js +40 -0
  402. package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyService.js +12 -0
  403. package/dist/vscode/vs/workbench/services/workspaces/common/canonicalUriService.js +19 -0
  404. package/dist/vscode-default-extensions/css/syntaxes/css.tmLanguage.json.extensionResource.js +1 -1
  405. package/dist/vscode-default-extensions/json/package.json.js +1 -1
  406. package/dist/vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.extensionResource.js +1 -1
  407. package/dist/vscode-default-extensions/json/syntaxes/JSONL.tmLanguage.json.extensionResource.js +2 -0
  408. package/dist/vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.extensionResource.js +1 -1
  409. package/dist/vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.extensionResource.js +1 -1
  410. package/dist/vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.extensionResource.js +1 -1
  411. package/dist/vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.extensionResource.js +1 -1
  412. package/dist/vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.extensionResource.js +1 -1
  413. package/dist/vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.extensionResource.js +1 -1
  414. package/dist/vscode-default-extensions/perl/package.json.js +1 -1
  415. package/dist/vscode-default-extensions/php/snippets/php.code-snippets.extensionResource.js +1 -1
  416. package/dist/vscode-default-extensions/sql/language-configuration.json.extensionResource.js +1 -1
  417. package/dist/vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.extensionResource.js +1 -1
  418. package/dist/vscode-default-extensions/theme-defaults/package.json.js +1 -1
  419. package/dist/vscode-default-extensions/theme-defaults/themes/dark_modern.json.extensionResource.js +2 -0
  420. package/dist/vscode-default-extensions/theme-defaults/themes/dark_vs.json.extensionResource.js +1 -1
  421. package/dist/vscode-default-extensions/theme-defaults/themes/hc_black.json.extensionResource.js +1 -1
  422. package/dist/vscode-default-extensions/theme-defaults/themes/hc_light.json.extensionResource.js +1 -1
  423. package/dist/vscode-default-extensions/theme-defaults/themes/light_modern.json.extensionResource.js +2 -0
  424. package/dist/vscode-default-extensions/theme-defaults/themes/light_vs.json.extensionResource.js +1 -1
  425. package/dist/vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.extensionResource.js +1 -1
  426. package/dist/vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.extensionResource.js +1 -1
  427. package/dist/vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.extensionResource.js +1 -1
  428. package/dist/vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.extensionResource.js +1 -1
  429. package/dist/vscode-default-extensions/theme-red/themes/Red-color-theme.json.extensionResource.js +1 -1
  430. package/dist/vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.extensionResource.js +1 -1
  431. package/dist/vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.extensionResource.js +1 -1
  432. package/dist/vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.extensionResource.js +1 -1
  433. package/dist/vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.extensionResource.js +1 -1
  434. package/dist/vscode-default-extensions/vb/language-configuration.json.extensionResource.js +1 -1
  435. package/dist/vscode-services/env.js +4 -2
  436. package/dist/vscode-services/extHost.js +32 -48
  437. package/dist/vscode-services/missing-services.js +407 -29
  438. package/dist/vscode-services/window.js +59 -65
  439. package/dist/vscode-services/workspace.js +19 -5
  440. package/dist/workers/outputLinkComputer.worker.d.ts +2 -0
  441. package/dist/workers/outputLinkComputer.worker.js +3 -0
  442. package/dist/workspace.d.ts +1 -1
  443. package/monaco-editor-treemending.patch +1305 -1184
  444. package/package.json +65 -19
  445. package/dist/activity.d.ts +0 -2802
  446. package/dist/collections.d.ts +0 -7
  447. package/dist/colorRegistry.d.ts +0 -710
  448. package/dist/vscode/vs/platform/product/common/product.js +0 -48
  449. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionFollowups.js +0 -30
  450. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +0 -196
  451. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionListRenderer.js +0 -622
  452. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionOptions.js +0 -77
  453. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +0 -311
  454. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +0 -4
  455. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +0 -56
  456. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +0 -305
  457. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +0 -13
  458. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +0 -379
  459. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionViewModel.js +0 -207
  460. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWidgetHistoryService.js +0 -3
  461. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWordCounter.js +0 -25
  462. package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.extensionResource.js +0 -2
  463. package/dist/vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.extensionResource.js +0 -2
@@ -0,0 +1,618 @@
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 { Disposable, dispose, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
5
+ import { OS, isWindows, isMacintosh } from 'monaco-editor/esm/vs/base/common/platform.js';
6
+ import { localize } from 'monaco-editor/esm/vs/nls.js';
7
+ import { formatMessageForTerminal } from '../../../../platform/terminal/common/terminalStrings.js';
8
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
9
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
10
+ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
11
+ import { IProductService } from 'monaco-editor/esm/vs/platform/product/common/productService.js';
12
+ import { getRemoteAuthority } from 'monaco-editor/esm/vs/platform/remote/common/remoteHosts.js';
13
+ import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
14
+ import { NaiveCwdDetectionCapability } from '../../../../platform/terminal/common/capabilities/naiveCwdDetectionCapability.js';
15
+ import { TerminalCapabilityStore } from '../../../../platform/terminal/common/capabilities/terminalCapabilityStore.js';
16
+ import { TerminalRecorder } from '../../../../platform/terminal/common/terminalRecorder.js';
17
+ import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
18
+ import { EnvironmentVariableInfoChangesActive, EnvironmentVariableInfoStale } from './environmentVariableInfo.js';
19
+ import { ITerminalInstanceService } from './terminal.js';
20
+ import { IEnvironmentVariableService } from '../common/environmentVariable.js';
21
+ import { MergedEnvironmentVariableCollection } from '../../../../platform/terminal/common/environmentVariableCollection.js';
22
+ import { serializeEnvironmentVariableCollections } from '../../../../platform/terminal/common/environmentVariableShared.js';
23
+ import { ITerminalProfileResolverService } from '../common/terminal.js';
24
+ import { getWorkspaceForTerminal, createVariableResolver, createTerminalEnvironment, getCwd } from '../common/terminalEnvironment.js';
25
+ import { IConfigurationResolverService } from '../../../services/configurationResolver/common/configurationResolver.js';
26
+ import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
27
+ import { IHistoryService } from '../../../services/history/common/history.js';
28
+ import { IPathService } from '../../../services/path/common/pathService.js';
29
+ import { IRemoteAgentService } from '../../../services/remote/common/remoteAgentService.js';
30
+ import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
31
+ import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
32
+ import { generateUuid } from 'monaco-editor/esm/vs/base/common/uuid.js';
33
+ let TerminalProcessManager = class TerminalProcessManager extends Disposable {
34
+ get persistentProcessId() { return this._process?.id; }
35
+ get shouldPersist() { return !!this.reconnectionProperties || (this._process ? this._process.shouldPersist : false); }
36
+ get hasWrittenData() { return this._hasWrittenData; }
37
+ get hasChildProcesses() { return this._hasChildProcesses; }
38
+ get reconnectionProperties() { return this._shellLaunchConfig?.attachPersistentProcess?.reconnectionProperties || this._shellLaunchConfig?.reconnectionProperties || undefined; }
39
+ get extEnvironmentVariableCollection() { return this._extEnvironmentVariableCollection; }
40
+ constructor(_instanceId, _configHelper, cwd, environmentVariableCollections, shellIntegrationNonce, _historyService, _instantiationService, _logService, _workspaceContextService, _configurationResolverService, _workbenchEnvironmentService, _productService, _remoteAgentService, _pathService, _environmentVariableService, _terminalProfileResolverService, _configurationService, _terminalInstanceService, _telemetryService, _notificationService) {
41
+ super();
42
+ this._instanceId = _instanceId;
43
+ this._configHelper = _configHelper;
44
+ this._historyService = _historyService;
45
+ this._instantiationService = _instantiationService;
46
+ this._logService = _logService;
47
+ this._workspaceContextService = _workspaceContextService;
48
+ this._configurationResolverService = _configurationResolverService;
49
+ this._workbenchEnvironmentService = _workbenchEnvironmentService;
50
+ this._productService = _productService;
51
+ this._remoteAgentService = _remoteAgentService;
52
+ this._pathService = _pathService;
53
+ this._environmentVariableService = _environmentVariableService;
54
+ this._terminalProfileResolverService = _terminalProfileResolverService;
55
+ this._configurationService = _configurationService;
56
+ this._terminalInstanceService = _terminalInstanceService;
57
+ this._telemetryService = _telemetryService;
58
+ this._notificationService = _notificationService;
59
+ this.processState = 1 ;
60
+ this.capabilities = ( new TerminalCapabilityStore());
61
+ this._isDisposed = false;
62
+ this._process = null;
63
+ this._processType = 0 ;
64
+ this._preLaunchInputQueue = [];
65
+ this._latency = -1;
66
+ this._latencyLastMeasured = 0;
67
+ this._hasWrittenData = false;
68
+ this._hasChildProcesses = false;
69
+ this._ptyListenersAttached = false;
70
+ this._isDisconnected = false;
71
+ this._dimensions = { cols: 0, rows: 0 };
72
+ this._onPtyDisconnect = this._register(( new Emitter()));
73
+ this.onPtyDisconnect = this._onPtyDisconnect.event;
74
+ this._onPtyReconnect = this._register(( new Emitter()));
75
+ this.onPtyReconnect = this._onPtyReconnect.event;
76
+ this._onProcessReady = this._register(( new Emitter()));
77
+ this.onProcessReady = this._onProcessReady.event;
78
+ this._onProcessStateChange = this._register(( new Emitter()));
79
+ this.onProcessStateChange = this._onProcessStateChange.event;
80
+ this._onBeforeProcessData = this._register(( new Emitter()));
81
+ this.onBeforeProcessData = this._onBeforeProcessData.event;
82
+ this._onProcessData = this._register(( new Emitter()));
83
+ this.onProcessData = this._onProcessData.event;
84
+ this._onDidChangeProperty = this._register(( new Emitter()));
85
+ this.onDidChangeProperty = this._onDidChangeProperty.event;
86
+ this._onEnvironmentVariableInfoChange = this._register(( new Emitter()));
87
+ this.onEnvironmentVariableInfoChanged = this._onEnvironmentVariableInfoChange.event;
88
+ this._onProcessExit = this._register(( new Emitter()));
89
+ this.onProcessExit = this._onProcessExit.event;
90
+ this._onRestoreCommands = this._register(( new Emitter()));
91
+ this.onRestoreCommands = this._onRestoreCommands.event;
92
+ this._cwdWorkspaceFolder = getWorkspaceForTerminal(cwd, this._workspaceContextService, this._historyService);
93
+ this.ptyProcessReady = this._createPtyProcessReadyPromise();
94
+ this.getLatency();
95
+ this._ackDataBufferer = ( new AckDataBufferer(e => this._process?.acknowledgeDataEvent(e)));
96
+ this._dataFilter = this._instantiationService.createInstance(SeamlessRelaunchDataFilter);
97
+ this._dataFilter.onProcessData(ev => {
98
+ const data = (typeof ev === 'string' ? ev : ev.data);
99
+ const beforeProcessDataEvent = { data };
100
+ this._onBeforeProcessData.fire(beforeProcessDataEvent);
101
+ if (beforeProcessDataEvent.data && beforeProcessDataEvent.data.length > 0) {
102
+ if (typeof ev !== 'string') {
103
+ ev.data = beforeProcessDataEvent.data;
104
+ }
105
+ this._onProcessData.fire(typeof ev !== 'string' ? ev : { data: beforeProcessDataEvent.data, trackCommit: false });
106
+ }
107
+ });
108
+ if (cwd && typeof cwd === 'object') {
109
+ this.remoteAuthority = getRemoteAuthority(cwd);
110
+ }
111
+ else {
112
+ this.remoteAuthority = this._workbenchEnvironmentService.remoteAuthority;
113
+ }
114
+ if (environmentVariableCollections) {
115
+ this._extEnvironmentVariableCollection = ( new MergedEnvironmentVariableCollection(environmentVariableCollections));
116
+ this._register(this._environmentVariableService.onDidChangeCollections(newCollection => this._onEnvironmentVariableCollectionChange(newCollection)));
117
+ this.environmentVariableInfo = this._instantiationService.createInstance(EnvironmentVariableInfoChangesActive, this._extEnvironmentVariableCollection);
118
+ this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo);
119
+ }
120
+ this.shellIntegrationNonce = shellIntegrationNonce ?? generateUuid();
121
+ }
122
+ async freePortKillProcess(port) {
123
+ try {
124
+ if (this._process?.freePortKillProcess) {
125
+ await this._process?.freePortKillProcess(port);
126
+ }
127
+ }
128
+ catch (e) {
129
+ this._notificationService.notify({ message: ( localize(
130
+ 'killportfailure',
131
+ 'Could not kill process listening on port {0}, command exited with error {1}',
132
+ port,
133
+ e
134
+ )), severity: Severity.Warning });
135
+ }
136
+ }
137
+ dispose(immediate = false) {
138
+ this._isDisposed = true;
139
+ if (this._process) {
140
+ this._setProcessState(5 );
141
+ this._process.shutdown(immediate);
142
+ this._process = null;
143
+ }
144
+ super.dispose();
145
+ }
146
+ _createPtyProcessReadyPromise() {
147
+ return ( new Promise(c => {
148
+ const listener = this.onProcessReady(() => {
149
+ this._logService.debug(`Terminal process ready (shellProcessId: ${this.shellProcessId})`);
150
+ listener.dispose();
151
+ c(undefined);
152
+ });
153
+ }));
154
+ }
155
+ async detachFromProcess(forcePersist) {
156
+ await this._process?.detach?.(forcePersist);
157
+ this._process = null;
158
+ }
159
+ async createProcess(shellLaunchConfig, cols, rows, reset = true) {
160
+ this._shellLaunchConfig = shellLaunchConfig;
161
+ this._dimensions.cols = cols;
162
+ this._dimensions.rows = rows;
163
+ let newProcess;
164
+ if (shellLaunchConfig.customPtyImplementation) {
165
+ this._processType = 1 ;
166
+ newProcess = shellLaunchConfig.customPtyImplementation(this._instanceId, cols, rows);
167
+ }
168
+ else {
169
+ const backend = await this._terminalInstanceService.getBackend(this.remoteAuthority);
170
+ if (!backend) {
171
+ throw new Error(`No terminal backend registered for remote authority '${this.remoteAuthority}'`);
172
+ }
173
+ this.backend = backend;
174
+ const variableResolver = createVariableResolver(this._cwdWorkspaceFolder, await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority), this._configurationResolverService);
175
+ this.userHome = this._pathService.resolvedUserHome?.fsPath;
176
+ this.os = OS;
177
+ if (!!this.remoteAuthority) {
178
+ const userHomeUri = await this._pathService.userHome();
179
+ this.userHome = userHomeUri.path;
180
+ const remoteEnv = await this._remoteAgentService.getEnvironment();
181
+ if (!remoteEnv) {
182
+ throw new Error(`Failed to get remote environment for remote authority "${this.remoteAuthority}"`);
183
+ }
184
+ this.userHome = remoteEnv.userHome.path;
185
+ this.os = remoteEnv.os;
186
+ const env = await this._resolveEnvironment(backend, variableResolver, shellLaunchConfig);
187
+ const shouldPersist = ((this._configurationService.getValue("task.reconnection" ) && shellLaunchConfig.reconnectionProperties) || !shellLaunchConfig.isFeatureTerminal) && this._configHelper.config.enablePersistentSessions && !shellLaunchConfig.isTransient;
188
+ if (shellLaunchConfig.attachPersistentProcess) {
189
+ const result = await backend.attachToProcess(shellLaunchConfig.attachPersistentProcess.id);
190
+ if (result) {
191
+ newProcess = result;
192
+ }
193
+ else {
194
+ this._logService.warn(`Attach to process failed for terminal`, shellLaunchConfig.attachPersistentProcess);
195
+ shellLaunchConfig.attachPersistentProcess = undefined;
196
+ }
197
+ }
198
+ if (!newProcess) {
199
+ await this._terminalProfileResolverService.resolveShellLaunchConfig(shellLaunchConfig, {
200
+ remoteAuthority: this.remoteAuthority,
201
+ os: this.os
202
+ });
203
+ const options = {
204
+ shellIntegration: {
205
+ enabled: this._configurationService.getValue("terminal.integrated.shellIntegration.enabled" ),
206
+ suggestEnabled: this._configurationService.getValue("terminal.integrated.shellIntegration.suggestEnabled" ),
207
+ nonce: this.shellIntegrationNonce
208
+ },
209
+ windowsEnableConpty: this._configHelper.config.windowsEnableConpty,
210
+ environmentVariableCollections: this._extEnvironmentVariableCollection?.collections ? serializeEnvironmentVariableCollections(this._extEnvironmentVariableCollection.collections) : undefined,
211
+ workspaceFolder: this._cwdWorkspaceFolder,
212
+ };
213
+ try {
214
+ newProcess = await backend.createProcess(shellLaunchConfig, '',
215
+ cols, rows, this._configHelper.config.unicodeVersion, env,
216
+ options, shouldPersist);
217
+ }
218
+ catch (e) {
219
+ if (e?.message === 'Could not fetch remote environment') {
220
+ this._logService.trace(`Could not fetch remote environment, silently failing`);
221
+ return undefined;
222
+ }
223
+ throw e;
224
+ }
225
+ }
226
+ if (!this._isDisposed) {
227
+ this._setupPtyHostListeners(backend);
228
+ }
229
+ }
230
+ else {
231
+ if (shellLaunchConfig.attachPersistentProcess) {
232
+ const result = shellLaunchConfig.attachPersistentProcess.findRevivedId ? await backend.attachToRevivedProcess(shellLaunchConfig.attachPersistentProcess.id) : await backend.attachToProcess(shellLaunchConfig.attachPersistentProcess.id);
233
+ if (result) {
234
+ newProcess = result;
235
+ }
236
+ else {
237
+ this._logService.warn(`Attach to process failed for terminal`, shellLaunchConfig.attachPersistentProcess);
238
+ shellLaunchConfig.attachPersistentProcess = undefined;
239
+ }
240
+ }
241
+ if (!newProcess) {
242
+ newProcess = await this._launchLocalProcess(backend, shellLaunchConfig, cols, rows, this.userHome, variableResolver);
243
+ }
244
+ if (!this._isDisposed) {
245
+ this._setupPtyHostListeners(backend);
246
+ }
247
+ }
248
+ }
249
+ if (this._isDisposed) {
250
+ newProcess.shutdown(false);
251
+ return undefined;
252
+ }
253
+ this._process = newProcess;
254
+ this._setProcessState(2 );
255
+ if (this.os === 3 || this.os === 2 ) {
256
+ this.capabilities.add(1 , ( new NaiveCwdDetectionCapability(this._process)));
257
+ }
258
+ this._dataFilter.newProcess(this._process, reset);
259
+ if (this._processListeners) {
260
+ dispose(this._processListeners);
261
+ }
262
+ this._processListeners = [
263
+ newProcess.onProcessReady((e) => {
264
+ this.shellProcessId = e.pid;
265
+ this._initialCwd = e.cwd;
266
+ this._onDidChangeProperty.fire({ type: "initialCwd" , value: this._initialCwd });
267
+ this._onProcessReady.fire(e);
268
+ if (this._preLaunchInputQueue.length > 0 && this._process) {
269
+ newProcess.input(this._preLaunchInputQueue.join(''));
270
+ this._preLaunchInputQueue.length = 0;
271
+ }
272
+ }),
273
+ newProcess.onProcessExit(exitCode => this._onExit(exitCode)),
274
+ newProcess.onDidChangeProperty(({ type, value }) => {
275
+ switch (type) {
276
+ case "hasChildProcesses" :
277
+ this._hasChildProcesses = value;
278
+ break;
279
+ case "failedShellIntegrationActivation" :
280
+ this._telemetryService?.publicLog2('terminal/shellIntegrationActivationFailureCustomArgs');
281
+ break;
282
+ }
283
+ this._onDidChangeProperty.fire({ type, value });
284
+ })
285
+ ];
286
+ if (newProcess.onRestoreCommands) {
287
+ this._processListeners.push(newProcess.onRestoreCommands(e => {
288
+ this._onRestoreCommands.fire(e);
289
+ }));
290
+ }
291
+ setTimeout(() => {
292
+ if (this.processState === 2 ) {
293
+ this._setProcessState(3 );
294
+ }
295
+ }, 500 );
296
+ const result = await newProcess.start();
297
+ if (result) {
298
+ return result;
299
+ }
300
+ return undefined;
301
+ }
302
+ async relaunch(shellLaunchConfig, cols, rows, reset) {
303
+ this.ptyProcessReady = this._createPtyProcessReadyPromise();
304
+ this._logService.trace(`Relaunching terminal instance ${this._instanceId}`);
305
+ if (this._isDisconnected) {
306
+ this._isDisconnected = false;
307
+ this._onPtyReconnect.fire();
308
+ }
309
+ this._hasWrittenData = false;
310
+ return this.createProcess(shellLaunchConfig, cols, rows, reset);
311
+ }
312
+ async _resolveEnvironment(backend, variableResolver, shellLaunchConfig) {
313
+ const workspaceFolder = getWorkspaceForTerminal(shellLaunchConfig.cwd, this._workspaceContextService, this._historyService);
314
+ const platformKey = isWindows ? 'windows' : (isMacintosh ? 'osx' : 'linux');
315
+ const envFromConfigValue = this._configurationService.getValue(`terminal.integrated.env.${platformKey}`);
316
+ this._configHelper.showRecommendations(shellLaunchConfig);
317
+ let baseEnv;
318
+ if (shellLaunchConfig.useShellEnvironment) {
319
+ baseEnv = await backend.getShellEnvironment();
320
+ }
321
+ else {
322
+ baseEnv = await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority);
323
+ }
324
+ const env = await createTerminalEnvironment(shellLaunchConfig, envFromConfigValue, variableResolver, this._productService.version, this._configHelper.config.detectLocale, baseEnv);
325
+ if (!this._isDisposed && !shellLaunchConfig.strictEnv && !shellLaunchConfig.hideFromUser) {
326
+ this._extEnvironmentVariableCollection = this._environmentVariableService.mergedCollection;
327
+ this._register(this._environmentVariableService.onDidChangeCollections(newCollection => this._onEnvironmentVariableCollectionChange(newCollection)));
328
+ await this._extEnvironmentVariableCollection.applyToProcessEnvironment(env, { workspaceFolder }, variableResolver);
329
+ if (this._extEnvironmentVariableCollection.getVariableMap({ workspaceFolder }).size) {
330
+ this.environmentVariableInfo = this._instantiationService.createInstance(EnvironmentVariableInfoChangesActive, this._extEnvironmentVariableCollection);
331
+ this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo);
332
+ }
333
+ }
334
+ return env;
335
+ }
336
+ async _launchLocalProcess(backend, shellLaunchConfig, cols, rows, userHome, variableResolver) {
337
+ await this._terminalProfileResolverService.resolveShellLaunchConfig(shellLaunchConfig, {
338
+ remoteAuthority: undefined,
339
+ os: OS
340
+ });
341
+ const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(Schemas.file);
342
+ const initialCwd = await getCwd(shellLaunchConfig, userHome, variableResolver, activeWorkspaceRootUri, this._configHelper.config.cwd, this._logService);
343
+ const env = await this._resolveEnvironment(backend, variableResolver, shellLaunchConfig);
344
+ const options = {
345
+ shellIntegration: {
346
+ enabled: this._configurationService.getValue("terminal.integrated.shellIntegration.enabled" ),
347
+ suggestEnabled: this._configurationService.getValue("terminal.integrated.shellIntegration.suggestEnabled" ),
348
+ nonce: this.shellIntegrationNonce
349
+ },
350
+ windowsEnableConpty: this._configHelper.config.windowsEnableConpty,
351
+ environmentVariableCollections: this._extEnvironmentVariableCollection ? serializeEnvironmentVariableCollections(this._extEnvironmentVariableCollection.collections) : undefined,
352
+ workspaceFolder: this._cwdWorkspaceFolder,
353
+ };
354
+ const shouldPersist = ((this._configurationService.getValue("task.reconnection" ) && shellLaunchConfig.reconnectionProperties) || !shellLaunchConfig.isFeatureTerminal) && this._configHelper.config.enablePersistentSessions && !shellLaunchConfig.isTransient;
355
+ return await backend.createProcess(shellLaunchConfig, initialCwd, cols, rows, this._configHelper.config.unicodeVersion, env, options, shouldPersist);
356
+ }
357
+ _setupPtyHostListeners(backend) {
358
+ if (this._ptyListenersAttached) {
359
+ return;
360
+ }
361
+ this._ptyListenersAttached = true;
362
+ this._register(backend.onPtyHostUnresponsive(() => {
363
+ this._isDisconnected = true;
364
+ this._onPtyDisconnect.fire();
365
+ }));
366
+ this._ptyResponsiveListener = backend.onPtyHostResponsive(() => {
367
+ this._isDisconnected = false;
368
+ this._onPtyReconnect.fire();
369
+ });
370
+ this._register(toDisposable(() => this._ptyResponsiveListener?.dispose()));
371
+ this._register(backend.onPtyHostRestart(async () => {
372
+ if (!this._isDisconnected) {
373
+ this._isDisconnected = true;
374
+ this._onPtyDisconnect.fire();
375
+ }
376
+ this._ptyResponsiveListener?.dispose();
377
+ this._ptyResponsiveListener = undefined;
378
+ if (this._shellLaunchConfig) {
379
+ if (this._shellLaunchConfig.isFeatureTerminal && !this.reconnectionProperties) {
380
+ this._onExit(-1);
381
+ }
382
+ else {
383
+ const message = ( localize(
384
+ 'ptyHostRelaunch',
385
+ "Restarting the terminal because the connection to the shell process was lost..."
386
+ ));
387
+ this._onProcessData.fire({ data: formatMessageForTerminal(message, { loudFormatting: true }), trackCommit: false });
388
+ await this.relaunch(this._shellLaunchConfig, this._dimensions.cols, this._dimensions.rows, false);
389
+ }
390
+ }
391
+ }));
392
+ }
393
+ async getBackendOS() {
394
+ let os = OS;
395
+ if (!!this.remoteAuthority) {
396
+ const remoteEnv = await this._remoteAgentService.getEnvironment();
397
+ if (!remoteEnv) {
398
+ throw new Error(`Failed to get remote environment for remote authority "${this.remoteAuthority}"`);
399
+ }
400
+ os = remoteEnv.os;
401
+ }
402
+ return os;
403
+ }
404
+ setDimensions(cols, rows, sync) {
405
+ if (sync) {
406
+ this._resize(cols, rows);
407
+ return;
408
+ }
409
+ return this.ptyProcessReady.then(() => this._resize(cols, rows));
410
+ }
411
+ async setUnicodeVersion(version) {
412
+ return this._process?.setUnicodeVersion(version);
413
+ }
414
+ _resize(cols, rows) {
415
+ if (!this._process) {
416
+ return;
417
+ }
418
+ try {
419
+ this._process.resize(cols, rows);
420
+ }
421
+ catch (error) {
422
+ if (error.code !== 'EPIPE' && error.code !== 'ERR_IPC_CHANNEL_CLOSED') {
423
+ throw (error);
424
+ }
425
+ }
426
+ this._dimensions.cols = cols;
427
+ this._dimensions.rows = rows;
428
+ }
429
+ async write(data) {
430
+ await this.ptyProcessReady;
431
+ this._dataFilter.disableSeamlessRelaunch();
432
+ this._hasWrittenData = true;
433
+ if (this.shellProcessId || this._processType === 1 ) {
434
+ if (this._process) {
435
+ this._process.input(data);
436
+ }
437
+ }
438
+ else {
439
+ this._preLaunchInputQueue.push(data);
440
+ }
441
+ }
442
+ async processBinary(data) {
443
+ await this.ptyProcessReady;
444
+ this._dataFilter.disableSeamlessRelaunch();
445
+ this._hasWrittenData = true;
446
+ this._process?.processBinary(data);
447
+ }
448
+ get initialCwd() {
449
+ return this._initialCwd ?? '';
450
+ }
451
+ async getLatency() {
452
+ await this.ptyProcessReady;
453
+ if (!this._process) {
454
+ return Promise.resolve(0);
455
+ }
456
+ if (this._latencyLastMeasured === 0 || this._latencyLastMeasured + 1000 < Date.now()) {
457
+ const latencyRequest = this._process.getLatency();
458
+ this._latency = await latencyRequest;
459
+ this._latencyLastMeasured = Date.now();
460
+ }
461
+ return Promise.resolve(this._latency);
462
+ }
463
+ async refreshProperty(type) {
464
+ if (!this._process) {
465
+ throw new Error('Cannot refresh property when process is not set');
466
+ }
467
+ return this._process.refreshProperty(type);
468
+ }
469
+ async updateProperty(type, value) {
470
+ return this._process?.updateProperty(type, value);
471
+ }
472
+ acknowledgeDataEvent(charCount) {
473
+ this._ackDataBufferer.ack(charCount);
474
+ }
475
+ _onExit(exitCode) {
476
+ this._process = null;
477
+ if (this.processState === 2 ) {
478
+ this._setProcessState(4 );
479
+ }
480
+ if (this.processState === 3 ) {
481
+ this._setProcessState(6 );
482
+ }
483
+ this._onProcessExit.fire(exitCode);
484
+ }
485
+ _setProcessState(state) {
486
+ this.processState = state;
487
+ this._onProcessStateChange.fire();
488
+ }
489
+ _onEnvironmentVariableCollectionChange(newCollection) {
490
+ const diff = this._extEnvironmentVariableCollection.diff(newCollection, { workspaceFolder: this._cwdWorkspaceFolder });
491
+ if (diff === undefined) {
492
+ if (this.environmentVariableInfo instanceof EnvironmentVariableInfoStale) {
493
+ this.environmentVariableInfo = this._instantiationService.createInstance(EnvironmentVariableInfoChangesActive, this._extEnvironmentVariableCollection);
494
+ this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo);
495
+ }
496
+ return;
497
+ }
498
+ this.environmentVariableInfo = this._instantiationService.createInstance(EnvironmentVariableInfoStale, diff, this._instanceId, newCollection);
499
+ this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo);
500
+ }
501
+ };
502
+ TerminalProcessManager = ( __decorate([
503
+ ( __param(5, IHistoryService)),
504
+ ( __param(6, IInstantiationService)),
505
+ ( __param(7, ILogService)),
506
+ ( __param(8, IWorkspaceContextService)),
507
+ ( __param(9, IConfigurationResolverService)),
508
+ ( __param(10, IWorkbenchEnvironmentService)),
509
+ ( __param(11, IProductService)),
510
+ ( __param(12, IRemoteAgentService)),
511
+ ( __param(13, IPathService)),
512
+ ( __param(14, IEnvironmentVariableService)),
513
+ ( __param(15, ITerminalProfileResolverService)),
514
+ ( __param(16, IConfigurationService)),
515
+ ( __param(17, ITerminalInstanceService)),
516
+ ( __param(18, ITelemetryService)),
517
+ ( __param(19, INotificationService))
518
+ ], TerminalProcessManager));
519
+ class AckDataBufferer {
520
+ constructor(_callback) {
521
+ this._callback = _callback;
522
+ this._unsentCharCount = 0;
523
+ }
524
+ ack(charCount) {
525
+ this._unsentCharCount += charCount;
526
+ while (this._unsentCharCount > 5000 ) {
527
+ this._unsentCharCount -= 5000 ;
528
+ this._callback(5000 );
529
+ }
530
+ }
531
+ }
532
+ let SeamlessRelaunchDataFilter = class SeamlessRelaunchDataFilter extends Disposable {
533
+ get onProcessData() { return this._onProcessData.event; }
534
+ constructor(_logService) {
535
+ super();
536
+ this._logService = _logService;
537
+ this._disableSeamlessRelaunch = false;
538
+ this._onProcessData = this._register(( new Emitter()));
539
+ }
540
+ newProcess(process, reset) {
541
+ this._dataListener?.dispose();
542
+ this._activeProcess?.shutdown(false);
543
+ this._activeProcess = process;
544
+ if (!this._firstRecorder || !reset || this._disableSeamlessRelaunch) {
545
+ this._firstDisposable?.dispose();
546
+ [this._firstRecorder, this._firstDisposable] = this._createRecorder(process);
547
+ if (this._disableSeamlessRelaunch && reset) {
548
+ this._onProcessData.fire('\x1bc');
549
+ }
550
+ this._dataListener = process.onProcessData(e => this._onProcessData.fire(e));
551
+ this._disableSeamlessRelaunch = false;
552
+ return;
553
+ }
554
+ if (this._secondRecorder) {
555
+ this.triggerSwap();
556
+ }
557
+ this._swapTimeout = window.setTimeout(() => this.triggerSwap(), 3000 );
558
+ this._dataListener?.dispose();
559
+ this._firstDisposable?.dispose();
560
+ const recorder = this._createRecorder(process);
561
+ [this._secondRecorder, this._secondDisposable] = recorder;
562
+ }
563
+ disableSeamlessRelaunch() {
564
+ this._disableSeamlessRelaunch = true;
565
+ this._stopRecording();
566
+ this.triggerSwap();
567
+ }
568
+ triggerSwap() {
569
+ if (this._swapTimeout) {
570
+ window.clearTimeout(this._swapTimeout);
571
+ this._swapTimeout = undefined;
572
+ }
573
+ if (!this._firstRecorder) {
574
+ return;
575
+ }
576
+ if (!this._secondRecorder) {
577
+ this._firstRecorder = undefined;
578
+ this._firstDisposable?.dispose();
579
+ return;
580
+ }
581
+ const firstData = this._getDataFromRecorder(this._firstRecorder);
582
+ const secondData = this._getDataFromRecorder(this._secondRecorder);
583
+ if (firstData === secondData) {
584
+ this._logService.trace(`Seamless terminal relaunch - identical content`);
585
+ }
586
+ else {
587
+ this._logService.trace(`Seamless terminal relaunch - resetting content`);
588
+ this._onProcessData.fire({ data: `\x1bc${secondData}`, trackCommit: false });
589
+ }
590
+ this._dataListener?.dispose();
591
+ this._dataListener = this._activeProcess.onProcessData(e => this._onProcessData.fire(e));
592
+ this._firstRecorder = this._secondRecorder;
593
+ this._firstDisposable?.dispose();
594
+ this._firstDisposable = this._secondDisposable;
595
+ this._secondRecorder = undefined;
596
+ }
597
+ _stopRecording() {
598
+ if (this._swapTimeout) {
599
+ return;
600
+ }
601
+ this._firstRecorder = undefined;
602
+ this._firstDisposable?.dispose();
603
+ this._secondRecorder = undefined;
604
+ this._secondDisposable?.dispose();
605
+ }
606
+ _createRecorder(process) {
607
+ const recorder = ( new TerminalRecorder(0, 0));
608
+ const disposable = process.onProcessData(e => recorder.handleData(typeof e === 'string' ? e : e.data));
609
+ return [recorder, disposable];
610
+ }
611
+ _getDataFromRecorder(recorder) {
612
+ return ( recorder.generateReplayEventSync().events.filter(e => !!e.data).map(e => e.data)).join('');
613
+ }
614
+ };
615
+ SeamlessRelaunchDataFilter = ( __decorate([
616
+ ( __param(0, ILogService))
617
+ ], SeamlessRelaunchDataFilter));
618
+ export { TerminalProcessManager };