@codingame/monaco-vscode-api 1.82.4-next.1 → 1.82.5-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 (567) hide show
  1. package/extensions.d.ts +3 -3
  2. package/external/xterm/typings/xterm.d.ts +1729 -0
  3. package/external/xterm-addon-canvas/typings/xterm-addon-canvas.d.ts +38 -0
  4. package/external/xterm-addon-image/typings/xterm-addon-image.d.ts +115 -0
  5. package/external/xterm-addon-search/typings/xterm-addon-search.d.ts +141 -0
  6. package/external/xterm-addon-serialize/typings/xterm-addon-serialize.d.ts +83 -0
  7. package/external/xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts +9 -0
  8. package/external/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts +43 -0
  9. package/external/xterm-headless/typings/xterm-headless.d.ts +49 -0
  10. package/missing-services.js +0 -1
  11. package/monaco-editor-treemending.patch +551 -551
  12. package/package.json +21 -1
  13. package/service-override/bulkEdit.js +0 -1
  14. package/service-override/environment.js +0 -1
  15. package/service-override/extensions.js +1 -1
  16. package/service-override/files.js +0 -1
  17. package/service-override/keybindings.js +1 -6
  18. package/service-override/layout.js +0 -1
  19. package/service-override/output.js +0 -1
  20. package/service-override/quickaccess.js +0 -1
  21. package/services.js +10 -0
  22. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.d.ts +1 -1
  23. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +1 -1
  24. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +7 -7
  25. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +1 -1
  26. package/README.md +0 -392
  27. package/override/vs/workbench/contrib/notebook/browser/notebookEditor.js +0 -2
  28. package/service-override/accessibility.d.ts +0 -5
  29. package/service-override/accessibility.js +0 -11
  30. package/service-override/audioCue.d.ts +0 -5
  31. package/service-override/audioCue.js +0 -13
  32. package/service-override/bulkEdit.d.ts +0 -5
  33. package/service-override/configuration.d.ts +0 -17
  34. package/service-override/configuration.js +0 -117
  35. package/service-override/debug.d.ts +0 -5
  36. package/service-override/debug.js +0 -23
  37. package/service-override/dialogs.d.ts +0 -5
  38. package/service-override/dialogs.js +0 -57
  39. package/service-override/editor.d.ts +0 -10
  40. package/service-override/editor.js +0 -37
  41. package/service-override/environment.d.ts +0 -6
  42. package/service-override/extensions.d.ts +0 -50
  43. package/service-override/files.d.ts +0 -103
  44. package/service-override/keybindings.d.ts +0 -10
  45. package/service-override/languageDetectionWorker.d.ts +0 -5
  46. package/service-override/languageDetectionWorker.js +0 -15
  47. package/service-override/languages.d.ts +0 -11
  48. package/service-override/languages.js +0 -27
  49. package/service-override/layout.d.ts +0 -71
  50. package/service-override/lifecycle.d.ts +0 -5
  51. package/service-override/lifecycle.js +0 -10
  52. package/service-override/markers.d.ts +0 -5
  53. package/service-override/markers.js +0 -6
  54. package/service-override/model.d.ts +0 -5
  55. package/service-override/model.js +0 -10
  56. package/service-override/notifications.d.ts +0 -5
  57. package/service-override/notifications.js +0 -34
  58. package/service-override/output.d.ts +0 -6
  59. package/service-override/preferences.d.ts +0 -5
  60. package/service-override/preferences.js +0 -16
  61. package/service-override/quickaccess.d.ts +0 -10
  62. package/service-override/remoteAgent.d.ts +0 -6
  63. package/service-override/remoteAgent.js +0 -42
  64. package/service-override/search.d.ts +0 -5
  65. package/service-override/search.js +0 -19
  66. package/service-override/snippets.d.ts +0 -9
  67. package/service-override/snippets.js +0 -21
  68. package/service-override/storage.d.ts +0 -40
  69. package/service-override/storage.js +0 -116
  70. package/service-override/terminal.d.ts +0 -69
  71. package/service-override/terminal.js +0 -117
  72. package/service-override/textmate.d.ts +0 -6
  73. package/service-override/textmate.js +0 -41
  74. package/service-override/theme.d.ts +0 -7
  75. package/service-override/theme.js +0 -26
  76. package/service-override/viewBanner.d.ts +0 -6
  77. package/service-override/viewBanner.js +0 -10
  78. package/service-override/viewStatusBar.d.ts +0 -6
  79. package/service-override/viewStatusBar.js +0 -10
  80. package/service-override/viewTitleBar.d.ts +0 -6
  81. package/service-override/viewTitleBar.js +0 -10
  82. package/service-override/views.d.ts +0 -74
  83. package/service-override/views.js +0 -511
  84. package/service-override/workspaceTrust.d.ts +0 -5
  85. package/service-override/workspaceTrust.js +0 -13
  86. package/vscode/src/vs/base/browser/broadcast.js +0 -52
  87. package/vscode/src/vs/base/browser/indexedDB.d.ts +0 -17
  88. package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +0 -178
  89. package/vscode/src/vs/base/browser/ui/grid/grid.js +0 -465
  90. package/vscode/src/vs/base/browser/ui/grid/gridview.css.js +0 -4
  91. package/vscode/src/vs/base/browser/ui/grid/gridview.js +0 -977
  92. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +0 -60
  93. package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +0 -14
  94. package/vscode/src/vs/base/common/codicons.d.ts +0 -556
  95. package/vscode/src/vs/base/common/processes.js +0 -24
  96. package/vscode/src/vs/editor/common/services/languageFeaturesService.js +0 -42
  97. package/vscode/src/vs/editor/common/services/modelUndoRedoParticipant.js +0 -56
  98. package/vscode/src/vs/editor/common/services/textResourceConfigurationService.js +0 -116
  99. package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +0 -67
  100. package/vscode/src/vs/platform/audioCues/browser/media/all.mp3.js +0 -20
  101. package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +0 -10
  102. package/vscode/src/vs/platform/download/common/downloadIpc.js +0 -16
  103. package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.d.ts +0 -43
  104. package/vscode/src/vs/platform/files/common/diskFileSystemProviderClient.js +0 -136
  105. package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.d.ts +0 -50
  106. package/vscode/src/vs/platform/log/common/logIpc.js +0 -24
  107. package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +0 -94
  108. package/vscode/src/vs/platform/remote/browser/browserSocketFactory.js +0 -193
  109. package/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.js +0 -107
  110. package/vscode/src/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +0 -41
  111. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +0 -566
  112. package/vscode/src/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +0 -29
  113. package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +0 -22
  114. package/vscode/src/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +0 -46
  115. package/vscode/src/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +0 -94
  116. package/vscode/src/vs/platform/terminal/common/environmentVariable.js +0 -7
  117. package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.js +0 -196
  118. package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +0 -37
  119. package/vscode/src/vs/platform/terminal/common/terminalLogService.js +0 -42
  120. package/vscode/src/vs/platform/terminal/common/terminalPlatformConfiguration.js +0 -467
  121. package/vscode/src/vs/platform/terminal/common/terminalProfiles.js +0 -107
  122. package/vscode/src/vs/platform/terminal/common/terminalRecorder.js +0 -66
  123. package/vscode/src/vs/platform/terminal/common/terminalStrings.js +0 -16
  124. package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +0 -319
  125. package/vscode/src/vs/platform/userDataSync/common/settingsMerge.js +0 -40
  126. package/vscode/src/vs/platform/webview/common/mimeTypes.js +0 -22
  127. package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +0 -62
  128. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +0 -699
  129. package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +0 -450
  130. package/vscode/src/vs/workbench/api/common/extHost.api.impl.d.ts +0 -14
  131. package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +0 -236
  132. package/vscode/src/vs/workbench/api/common/extHostConfiguration.d.ts +0 -43
  133. package/vscode/src/vs/workbench/api/common/extHostExtensionActivator.d.ts +0 -33
  134. package/vscode/src/vs/workbench/api/common/extHostExtensionService.d.ts +0 -138
  135. package/vscode/src/vs/workbench/api/common/extHostFileSystemInfo.d.ts +0 -21
  136. package/vscode/src/vs/workbench/api/common/extHostInitDataService.d.ts +0 -9
  137. package/vscode/src/vs/workbench/api/common/extHostLocalizationService.d.ts +0 -29
  138. package/vscode/src/vs/workbench/api/common/extHostManagedSockets.d.ts +0 -11
  139. package/vscode/src/vs/workbench/api/common/extHostRpcService.d.ts +0 -9
  140. package/vscode/src/vs/workbench/api/common/extHostStoragePaths.d.ts +0 -14
  141. package/vscode/src/vs/workbench/api/common/extHostTerminalService.d.ts +0 -53
  142. package/vscode/src/vs/workbench/api/common/extHostTunnelService.d.ts +0 -19
  143. package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +0 -12
  144. package/vscode/src/vs/workbench/api/common/extHostUriTransformerService.d.ts +0 -9
  145. package/vscode/src/vs/workbench/api/common/extHostWorkspace.d.ts +0 -91
  146. package/vscode/src/vs/workbench/api/worker/extHostExtensionService.d.ts +0 -21
  147. package/vscode/src/vs/workbench/browser/actions/listCommands.js +0 -605
  148. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarActions.js +0 -597
  149. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.d.ts +0 -116
  150. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +0 -783
  151. package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +0 -4
  152. package/vscode/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css.js +0 -4
  153. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +0 -88
  154. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +0 -4
  155. package/vscode/src/vs/workbench/browser/parts/banner/bannerPart.js +0 -228
  156. package/vscode/src/vs/workbench/browser/parts/banner/media/bannerpart.css.js +0 -4
  157. package/vscode/src/vs/workbench/browser/parts/compositeBar.js +0 -691
  158. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.d.ts +0 -7
  159. package/vscode/src/vs/workbench/browser/parts/compositePart.d.ts +0 -84
  160. package/vscode/src/vs/workbench/browser/parts/compositePart.js +0 -318
  161. package/vscode/src/vs/workbench/browser/parts/dialogs/dialog.web.contribution.js +0 -69
  162. package/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.js +0 -127
  163. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +0 -692
  164. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsModel.js +0 -141
  165. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +0 -414
  166. package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +0 -507
  167. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +0 -1233
  168. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +0 -133
  169. package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +0 -306
  170. package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +0 -850
  171. package/vscode/src/vs/workbench/browser/parts/editor/media/breadcrumbscontrol.css.js +0 -4
  172. package/vscode/src/vs/workbench/browser/parts/editor/media/editordroptarget.css.js +0 -4
  173. package/vscode/src/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +0 -4
  174. package/vscode/src/vs/workbench/browser/parts/editor/media/notabstitlecontrol.css.js +0 -4
  175. package/vscode/src/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +0 -4
  176. package/vscode/src/vs/workbench/browser/parts/editor/media/titlecontrol.css.js +0 -4
  177. package/vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.js +0 -247
  178. package/vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.js +0 -1569
  179. package/vscode/src/vs/workbench/browser/parts/editor/titleControl.js +0 -292
  180. package/vscode/src/vs/workbench/browser/parts/media/compositepart.css.js +0 -4
  181. package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsActions.css.js +0 -4
  182. package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsCenter.css.js +0 -4
  183. package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsList.css.js +0 -4
  184. package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsToasts.css.js +0 -4
  185. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.js +0 -124
  186. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsAlerts.js +0 -58
  187. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +0 -227
  188. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsList.js +0 -212
  189. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +0 -419
  190. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +0 -398
  191. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +0 -78
  192. package/vscode/src/vs/workbench/browser/parts/panel/media/basepanelpart.css.js +0 -4
  193. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.d.ts +0 -134
  194. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +0 -756
  195. package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +0 -4
  196. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.d.ts +0 -59
  197. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +0 -217
  198. package/vscode/src/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +0 -4
  199. package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarActions.js +0 -109
  200. package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarItem.js +0 -234
  201. package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarModel.js +0 -249
  202. package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js +0 -439
  203. package/vscode/src/vs/workbench/browser/parts/titlebar/commandCenterControl.js +0 -134
  204. package/vscode/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css.js +0 -4
  205. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.d.ts +0 -115
  206. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +0 -77
  207. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.js +0 -365
  208. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +0 -216
  209. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +0 -104
  210. package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +0 -4
  211. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +0 -1589
  212. package/vscode/src/vs/workbench/common/activity.js +0 -3
  213. package/vscode/src/vs/workbench/common/dialogs.js +0 -31
  214. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibility.contribution.js +0 -13
  215. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +0 -312
  216. package/vscode/src/vs/workbench/contrib/accessibility/browser/unfocusedViewDimmingContribution.js +0 -63
  217. package/vscode/src/vs/workbench/contrib/audioCues/browser/audioCueDebuggerContribution.js +0 -45
  218. package/vscode/src/vs/workbench/contrib/audioCues/browser/audioCueLineFeatureContribution.js +0 -170
  219. package/vscode/src/vs/workbench/contrib/audioCues/browser/audioCues.contribution.js +0 -181
  220. package/vscode/src/vs/workbench/contrib/audioCues/browser/commands.js +0 -49
  221. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +0 -262
  222. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +0 -339
  223. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +0 -119
  224. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +0 -4
  225. package/vscode/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.css.js +0 -4
  226. package/vscode/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.js +0 -35
  227. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +0 -4
  228. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +0 -345
  229. package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.js +0 -362
  230. package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.css.js +0 -4
  231. package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.js +0 -255
  232. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +0 -4
  233. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +0 -249
  234. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +0 -14
  235. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +0 -137
  236. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +0 -212
  237. package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +0 -4
  238. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +0 -72
  239. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +0 -61
  240. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +0 -106
  241. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +0 -198
  242. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +0 -783
  243. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +0 -397
  244. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +0 -1296
  245. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +0 -176
  246. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +0 -958
  247. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +0 -496
  248. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -345
  249. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +0 -297
  250. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +0 -398
  251. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -825
  252. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +0 -619
  253. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +0 -58
  254. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +0 -525
  255. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +0 -679
  256. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +0 -354
  257. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +0 -204
  258. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +0 -80
  259. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +0 -141
  260. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +0 -1172
  261. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +0 -1142
  262. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -104
  263. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +0 -66
  264. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +0 -273
  265. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +0 -312
  266. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +0 -166
  267. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +0 -661
  268. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +0 -103
  269. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +0 -229
  270. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +0 -629
  271. package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +0 -4
  272. package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +0 -4
  273. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +0 -4
  274. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +0 -4
  275. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +0 -4
  276. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +0 -4
  277. package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +0 -4
  278. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +0 -4
  279. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +0 -693
  280. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +0 -951
  281. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +0 -46
  282. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +0 -334
  283. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +0 -96
  284. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +0 -573
  285. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +0 -413
  286. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +0 -100
  287. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +0 -19
  288. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +0 -15
  289. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +0 -98
  290. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +0 -57
  291. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +0 -1480
  292. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +0 -344
  293. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +0 -121
  294. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +0 -173
  295. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +0 -34
  296. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +0 -115
  297. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +0 -258
  298. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +0 -25
  299. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -81
  300. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +0 -281
  301. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +0 -2414
  302. package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +0 -4
  303. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +0 -16
  304. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +0 -5
  305. package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +0 -73
  306. package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorHandler.js +0 -36
  307. package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +0 -325
  308. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +0 -230
  309. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditorTracker.js +0 -97
  310. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +0 -352
  311. package/vscode/src/vs/workbench/contrib/files/browser/explorerService.js +0 -426
  312. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +0 -508
  313. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +0 -615
  314. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution2.js +0 -94
  315. package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +0 -144
  316. package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +0 -53
  317. package/vscode/src/vs/workbench/contrib/languageDetection/browser/languageDetection.contribution.js +0 -134
  318. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +0 -353
  319. package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +0 -4
  320. package/vscode/src/vs/workbench/contrib/markers/browser/markers.contribution.js +0 -586
  321. package/vscode/src/vs/workbench/contrib/markers/browser/markersFilterOptions.js +0 -75
  322. package/vscode/src/vs/workbench/contrib/markers/browser/markersModel.js +0 -200
  323. package/vscode/src/vs/workbench/contrib/markers/browser/markersTable.js +0 -455
  324. package/vscode/src/vs/workbench/contrib/markers/browser/markersTreeViewer.js +0 -670
  325. package/vscode/src/vs/workbench/contrib/markers/browser/markersView.js +0 -873
  326. package/vscode/src/vs/workbench/contrib/markers/browser/markersViewActions.css.js +0 -4
  327. package/vscode/src/vs/workbench/contrib/markers/browser/markersViewActions.js +0 -132
  328. package/vscode/src/vs/workbench/contrib/markers/browser/media/markers.css.js +0 -4
  329. package/vscode/src/vs/workbench/contrib/markers/browser/messages.js +0 -170
  330. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +0 -70
  331. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +0 -4
  332. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +0 -158
  333. package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +0 -3
  334. package/vscode/src/vs/workbench/contrib/outline/browser/outline.contribution.js +0 -261
  335. package/vscode/src/vs/workbench/contrib/outline/browser/outline.js +0 -10
  336. package/vscode/src/vs/workbench/contrib/outline/browser/outlinePane.css.js +0 -4
  337. package/vscode/src/vs/workbench/contrib/outline/browser/outlinePane.js +0 -290
  338. package/vscode/src/vs/workbench/contrib/outline/browser/outlineViewState.js +0 -66
  339. package/vscode/src/vs/workbench/contrib/output/common/outputLinkComputer.js +0 -129
  340. package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +0 -272
  341. package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.js +0 -1102
  342. package/vscode/src/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +0 -4
  343. package/vscode/src/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css.js +0 -4
  344. package/vscode/src/vs/workbench/contrib/preferences/browser/media/preferences.css.js +0 -4
  345. package/vscode/src/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css.js +0 -4
  346. package/vscode/src/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css.js +0 -4
  347. package/vscode/src/vs/workbench/contrib/preferences/browser/preferences.contribution.js +0 -1213
  348. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesActions.js +0 -94
  349. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesEditor.js +0 -47
  350. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +0 -37
  351. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.js +0 -747
  352. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesSearch.js +0 -349
  353. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +0 -468
  354. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsEditor2.js +0 -1477
  355. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.js +0 -504
  356. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +0 -296
  357. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsSearchMenu.js +0 -79
  358. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTree.js +0 -2041
  359. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +0 -771
  360. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsWidgets.js +0 -1004
  361. package/vscode/src/vs/workbench/contrib/preferences/browser/tocTree.js +0 -196
  362. package/vscode/src/vs/workbench/contrib/preferences/common/preferencesContribution.js +0 -151
  363. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +0 -67
  364. package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +0 -4
  365. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +0 -207
  366. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +0 -27
  367. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +0 -1666
  368. package/vscode/src/vs/workbench/contrib/remote/common/remote.contribution.js +0 -481
  369. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +0 -759
  370. package/vscode/src/vs/workbench/contrib/search/browser/media/anythingQuickAccess.css.js +0 -4
  371. package/vscode/src/vs/workbench/contrib/search/browser/media/searchview.css.js +0 -4
  372. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearchContributions.js +0 -7
  373. package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +0 -220
  374. package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +0 -232
  375. package/vscode/src/vs/workbench/contrib/search/browser/replaceContributions.js +0 -7
  376. package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +0 -224
  377. package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +0 -513
  378. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +0 -46
  379. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +0 -204
  380. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +0 -354
  381. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.js +0 -459
  382. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +0 -365
  383. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.js +0 -35
  384. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +0 -23
  385. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +0 -308
  386. package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +0 -41
  387. package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +0 -39
  388. package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +0 -58
  389. package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +0 -383
  390. package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +0 -1916
  391. package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +0 -636
  392. package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +0 -220
  393. package/vscode/src/vs/workbench/contrib/search/common/cacheState.js +0 -85
  394. package/vscode/src/vs/workbench/contrib/search/common/constants.js +0 -66
  395. package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +0 -11
  396. package/vscode/src/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +0 -4
  397. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +0 -477
  398. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +0 -700
  399. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +0 -187
  400. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +0 -298
  401. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +0 -135
  402. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +0 -268
  403. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +0 -20
  404. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/configureSnippets.js +0 -264
  405. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +0 -87
  406. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/insertSnippet.js +0 -126
  407. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/surroundWithSnippet.js +0 -56
  408. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCodeActionProvider.js +0 -136
  409. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetPicker.js +0 -83
  410. package/vscode/src/vs/workbench/contrib/snippets/browser/snippets.contribution.js +0 -113
  411. package/vscode/src/vs/workbench/contrib/terminal/browser/baseTerminalBackend.js +0 -101
  412. package/vscode/src/vs/workbench/contrib/terminal/browser/detachedTerminal.js +0 -54
  413. package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +0 -119
  414. package/vscode/src/vs/workbench/contrib/terminal/browser/media/scrollbar.css.js +0 -4
  415. package/vscode/src/vs/workbench/contrib/terminal/browser/media/terminal.css.js +0 -4
  416. package/vscode/src/vs/workbench/contrib/terminal/browser/media/widgets.css.js +0 -4
  417. package/vscode/src/vs/workbench/contrib/terminal/browser/media/xterm.css.js +0 -4
  418. package/vscode/src/vs/workbench/contrib/terminal/browser/remotePty.js +0 -175
  419. package/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.js +0 -311
  420. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.contribution.js +0 -240
  421. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +0 -1964
  422. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalCommands.js +0 -22
  423. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.js +0 -215
  424. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +0 -16
  425. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditor.js +0 -186
  426. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorService.js +0 -239
  427. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEvents.js +0 -47
  428. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalExtensions.js +0 -25
  429. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalGroup.js +0 -482
  430. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalGroupService.js +0 -367
  431. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +0 -37
  432. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +0 -2101
  433. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstanceService.js +0 -82
  434. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMainContribution.js +0 -82
  435. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +0 -762
  436. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +0 -617
  437. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.js +0 -278
  438. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.js +0 -316
  439. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProfileService.js +0 -218
  440. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +0 -146
  441. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +0 -269
  442. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalService.js +0 -1134
  443. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.js +0 -108
  444. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabbedView.js +0 -420
  445. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +0 -676
  446. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +0 -72
  447. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.js +0 -39
  448. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalView.js +0 -598
  449. package/vscode/src/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +0 -36
  450. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +0 -469
  451. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +0 -97
  452. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +0 -56
  453. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +0 -416
  454. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +0 -390
  455. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +0 -793
  456. package/vscode/src/vs/workbench/contrib/terminal/common/environmentVariableService.js +0 -96
  457. package/vscode/src/vs/workbench/contrib/terminal/common/history.js +0 -356
  458. package/vscode/src/vs/workbench/contrib/terminal/common/remote/remoteTerminalChannel.js +0 -253
  459. package/vscode/src/vs/workbench/contrib/terminal/common/terminalConfiguration.js +0 -1016
  460. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +0 -272
  461. package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +0 -93
  462. package/vscode/src/vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService.js +0 -42
  463. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/bufferContentTracker.js +0 -110
  464. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/terminal.accessibility.contribution.js +0 -232
  465. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibilityHelp.js +0 -138
  466. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleBuffer.js +0 -226
  467. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleWidget.js +0 -142
  468. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/textAreaSyncAddon.js +0 -98
  469. package/vscode/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.js +0 -26
  470. package/vscode/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService.js +0 -155
  471. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +0 -4
  472. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +0 -247
  473. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +0 -334
  474. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +0 -117
  475. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +0 -288
  476. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +0 -94
  477. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +0 -86
  478. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +0 -640
  479. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +0 -63
  480. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +0 -57
  481. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +0 -120
  482. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +0 -119
  483. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +0 -61
  484. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +0 -232
  485. package/vscode/src/vs/workbench/contrib/workspace/browser/media/workspaceTrustEditor.css.js +0 -4
  486. package/vscode/src/vs/workbench/contrib/workspace/browser/workspace.contribution.js +0 -842
  487. package/vscode/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.js +0 -1047
  488. package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +0 -14
  489. package/vscode/src/vs/workbench/services/activity/browser/activityService.js +0 -94
  490. package/vscode/src/vs/workbench/services/configuration/browser/configuration.js +0 -878
  491. package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +0 -1170
  492. package/vscode/src/vs/workbench/services/configuration/common/configurationCache.js +0 -80
  493. package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +0 -589
  494. package/vscode/src/vs/workbench/services/configuration/common/configurationModels.js +0 -119
  495. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +0 -303
  496. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +0 -26
  497. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +0 -174
  498. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +0 -10
  499. package/vscode/src/vs/workbench/services/dialogs/browser/abstractFileDialogService.js +0 -320
  500. package/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.js +0 -989
  501. package/vscode/src/vs/workbench/services/dialogs/common/dialogService.js +0 -66
  502. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +0 -622
  503. package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +0 -4
  504. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +0 -2
  505. package/vscode/src/vs/workbench/services/history/browser/historyService.js +0 -1454
  506. package/vscode/src/vs/workbench/services/hover/browser/hoverService.js +0 -162
  507. package/vscode/src/vs/workbench/services/hover/browser/hoverWidget.js +0 -523
  508. package/vscode/src/vs/workbench/services/hover/browser/media/hover.css.js +0 -4
  509. package/vscode/src/vs/workbench/services/label/common/labelService.js +0 -412
  510. package/vscode/src/vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker.js +0 -173
  511. package/vscode/src/vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl.js +0 -259
  512. package/vscode/src/vs/workbench/services/lifecycle/browser/lifecycleService.js +0 -121
  513. package/vscode/src/vs/workbench/services/localization/common/locale.js +0 -3
  514. package/vscode/src/vs/workbench/services/notification/common/notificationService.js +0 -188
  515. package/vscode/src/vs/workbench/services/outline/browser/outlineService.js +0 -35
  516. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +0 -37
  517. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +0 -556
  518. package/vscode/src/vs/workbench/services/preferences/browser/preferencesService.js +0 -547
  519. package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +0 -39
  520. package/vscode/src/vs/workbench/services/preferences/common/preferencesModels.js +0 -1039
  521. package/vscode/src/vs/workbench/services/preferences/common/preferencesValidation.js +0 -393
  522. package/vscode/src/vs/workbench/services/remote/browser/remoteAgentService.js +0 -71
  523. package/vscode/src/vs/workbench/services/remote/common/abstractRemoteAgentService.js +0 -177
  524. package/vscode/src/vs/workbench/services/remote/common/remoteAgentEnvironmentChannel.js +0 -51
  525. package/vscode/src/vs/workbench/services/remote/common/remoteFileSystemProviderClient.js +0 -38
  526. package/vscode/src/vs/workbench/services/search/common/queryBuilder.d.ts +0 -35
  527. package/vscode/src/vs/workbench/services/search/common/searchService.js +0 -370
  528. package/vscode/src/vs/workbench/services/storage/browser/storageService.d.ts +0 -40
  529. package/vscode/src/vs/workbench/services/storage/browser/storageService.js +0 -280
  530. package/vscode/src/vs/workbench/services/suggest/browser/media/suggest.css.js +0 -4
  531. package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +0 -10
  532. package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +0 -98
  533. package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +0 -399
  534. package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +0 -83
  535. package/vscode/src/vs/workbench/services/textMate/browser/arrayOperation.js +0 -62
  536. package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.js +0 -157
  537. package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/threadedBackgroundTokenizerFactory.js +0 -200
  538. package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker.js +0 -87
  539. package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateWorkerTokenizer.js +0 -140
  540. package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeature.d.ts +0 -11
  541. package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js +0 -459
  542. package/vscode/src/vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport.js +0 -72
  543. package/vscode/src/vs/workbench/services/textMate/browser/tokenizationSupport/tokenizationSupportWithLineLimit.js +0 -36
  544. package/vscode/src/vs/workbench/services/textMate/common/TMGrammarFactory.js +0 -118
  545. package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +0 -93
  546. package/vscode/src/vs/workbench/services/textMate/common/TMScopeRegistry.js +0 -24
  547. package/vscode/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.js +0 -187
  548. package/vscode/src/vs/workbench/services/themes/browser/fileIconThemeData.js +0 -353
  549. package/vscode/src/vs/workbench/services/themes/browser/productIconThemeData.js +0 -290
  550. package/vscode/src/vs/workbench/services/themes/browser/workbenchThemeService.js +0 -742
  551. package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +0 -864
  552. package/vscode/src/vs/workbench/services/themes/common/colorThemeSchema.js +0 -265
  553. package/vscode/src/vs/workbench/services/themes/common/fileIconThemeSchema.js +0 -303
  554. package/vscode/src/vs/workbench/services/themes/common/plistParser.js +0 -439
  555. package/vscode/src/vs/workbench/services/themes/common/productIconThemeSchema.js +0 -94
  556. package/vscode/src/vs/workbench/services/themes/common/textMateScopeMatcher.js +0 -120
  557. package/vscode/src/vs/workbench/services/themes/common/themeCompatibility.js +0 -66
  558. package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.js +0 -372
  559. package/vscode/src/vs/workbench/services/themes/common/themeExtensionPoints.js +0 -254
  560. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +0 -689
  561. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +0 -612
  562. package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +0 -322
  563. package/vscode/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.js +0 -27
  564. package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.js +0 -151
  565. package/workers/languageDetection.worker.js +0 -8
  566. package/workers/outputLinkComputer.worker.js +0 -3
  567. package/workers/textmate.worker.js +0 -3
@@ -1,2101 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { isFirefox } from 'monaco-editor/esm/vs/base/browser/browser.js';
3
- import { BrowserFeatures } from 'monaco-editor/esm/vs/base/browser/canIUse.js';
4
- import { DataTransfers } from 'monaco-editor/esm/vs/base/browser/dnd.js';
5
- import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
6
- import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
7
- import { DomScrollableElement } from 'monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js';
8
- import { AutoOpenBarrier, Promises, timeout } from 'monaco-editor/esm/vs/base/common/async.js';
9
- import { Codicon, getAllCodicons } from 'monaco-editor/esm/vs/base/common/codicons.js';
10
- import { debounce } from 'monaco-editor/esm/vs/base/common/decorators.js';
11
- import { onUnexpectedError, ErrorNoTelemetry } from 'monaco-editor/esm/vs/base/common/errors.js';
12
- import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
13
- import { template } from 'monaco-editor/esm/vs/base/common/labels.js';
14
- import { Disposable, MutableDisposable, toDisposable, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
15
- import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
16
- import * as path from 'monaco-editor/esm/vs/base/common/path.js';
17
- import { OS, isMacintosh, isWindows } from 'monaco-editor/esm/vs/base/common/platform.js';
18
- import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
19
- import { TabFocus } from 'monaco-editor/esm/vs/editor/browser/config/tabFocus.js';
20
- import * as nls from 'monaco-editor/esm/vs/nls.js';
21
- import { IAccessibilityService } from 'monaco-editor/esm/vs/platform/accessibility/common/accessibility.js';
22
- import { AudioCue, IAudioCueService } from 'monaco-editor/esm/vs/platform/audioCues/browser/audioCueService.js';
23
- import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
24
- import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
25
- import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
26
- import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
27
- import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
28
- import { containsDragType, CodeDataTransfers } from 'monaco-editor/esm/vs/platform/dnd/browser/dnd.js';
29
- import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
30
- import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
31
- import { ServiceCollection } from 'monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js';
32
- import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
33
- import { Severity, INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
34
- import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
35
- import { IProductService } from 'monaco-editor/esm/vs/platform/product/common/productService.js';
36
- import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
37
- import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
38
- import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
39
- import { TerminalCapabilityStoreMultiplexer } from '../../../../platform/terminal/common/capabilities/terminalCapabilityStore.js';
40
- import { deserializeEnvironmentVariableCollections } from '../../../../platform/terminal/common/environmentVariableShared.js';
41
- import { TitleEventSource, TerminalLocation, TerminalExitReason, ITerminalLogService } from '../../../../platform/terminal/common/terminal.js';
42
- import { formatMessageForTerminal } from '../../../../platform/terminal/common/terminalStrings.js';
43
- import { editorBackground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
44
- import { getIconRegistry } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
45
- import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
46
- import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
47
- import { IWorkspaceTrustRequestService } from 'monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js';
48
- import { PANEL_BACKGROUND, SIDE_BAR_BACKGROUND } from '../../../common/theme.js';
49
- import { IViewsService, IViewDescriptorService } from '../../../common/views.js';
50
- import { TerminalLaunchHelpAction } from './terminalActions.js';
51
- import { TerminalEditorInput } from './terminalEditorInput.js';
52
- import { TerminalExtensionsRegistry } from './terminalExtensions.js';
53
- import { getStandardColors, getColorStyleElement, getColorClass } from './terminalIcon.js';
54
- import { TerminalProcessManager } from './terminalProcessManager.js';
55
- import { showRunRecentQuickPick } from './terminalRunRecentQuickPick.js';
56
- import { TerminalStatusList } from './terminalStatusList.js';
57
- import { getTerminalUri, getTerminalResourcesFromDragEvent } from './terminalUri.js';
58
- import { TerminalWidgetManager } from './widgets/widgetManager.js';
59
- import { LineDataEventAddon } from './xterm/lineDataEventAddon.js';
60
- import { XtermTerminal, getXtermScaledDimensions } from './xterm/xtermTerminal.js';
61
- import { getDirectoryHistory, getCommandHistory } from '../common/history.js';
62
- import { TERMINAL_VIEW_ID, TERMINAL_CREATION_COMMANDS, DEFAULT_COMMANDS_TO_SKIP_SHELL, ITerminalProfileResolverService } from '../common/terminal.js';
63
- import { TERMINAL_BACKGROUND_COLOR } from '../common/terminalColorRegistry.js';
64
- import { TerminalContextKeys } from '../common/terminalContextKey.js';
65
- import { preparePathForShell, getWorkspaceForTerminal } from '../common/terminalEnvironment.js';
66
- import { IEditorService } from '../../../services/editor/common/editorService.js';
67
- import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
68
- import { IHistoryService } from '../../../services/history/common/history.js';
69
- import { IWorkbenchLayoutService } from '../../../services/layout/browser/layoutService.js';
70
- import { IPathService } from '../../../services/path/common/pathService.js';
71
- import { IPreferencesService } from '../../../services/preferences/common/preferences.js';
72
- import { Terminal } from 'xterm';
73
- import { IDialogService } from '../../../../platform/dialogs/common/dialogs.js';
74
- var TerminalInstance_1;
75
- let xtermConstructor;
76
- const shellIntegrationSupportedShellTypes = [
77
- "bash" ,
78
- "zsh" ,
79
- "pwsh" ,
80
- "pwsh"
81
- ];
82
- let TerminalInstance = class TerminalInstance extends Disposable {
83
- static { TerminalInstance_1 = this; }
84
- static { this._instanceIdCounter = 1; }
85
- get domElement() { return this._wrapperElement; }
86
- get usedShellIntegrationInjection() { return this._usedShellIntegrationInjection; }
87
- get extEnvironmentVariableCollection() { return this._processManager.extEnvironmentVariableCollection; }
88
- get waitOnExit() { return this._shellLaunchConfig.attachPersistentProcess?.waitOnExit || this._shellLaunchConfig.waitOnExit; }
89
- set waitOnExit(value) {
90
- this._shellLaunchConfig.waitOnExit = value;
91
- }
92
- get target() { return this._target; }
93
- set target(value) { this._target = value; }
94
- get instanceId() { return this._instanceId; }
95
- get resource() { return this._resource; }
96
- get cols() {
97
- if (this._fixedCols !== undefined) {
98
- return this._fixedCols;
99
- }
100
- if (this._dimensionsOverride && this._dimensionsOverride.cols) {
101
- if (this._dimensionsOverride.forceExactSize) {
102
- return this._dimensionsOverride.cols;
103
- }
104
- return Math.min(Math.max(this._dimensionsOverride.cols, 2), this._cols);
105
- }
106
- return this._cols;
107
- }
108
- get rows() {
109
- if (this._fixedRows !== undefined) {
110
- return this._fixedRows;
111
- }
112
- if (this._dimensionsOverride && this._dimensionsOverride.rows) {
113
- if (this._dimensionsOverride.forceExactSize) {
114
- return this._dimensionsOverride.rows;
115
- }
116
- return Math.min(Math.max(this._dimensionsOverride.rows, 2), this._rows);
117
- }
118
- return this._rows;
119
- }
120
- get isDisposed() { return this._isDisposed; }
121
- get fixedCols() { return this._fixedCols; }
122
- get fixedRows() { return this._fixedRows; }
123
- get maxCols() { return this._cols; }
124
- get maxRows() { return this._rows; }
125
- get processId() { return this._processManager.shellProcessId; }
126
- get processReady() { return this._processManager.ptyProcessReady; }
127
- get hasChildProcesses() { return this.shellLaunchConfig.attachPersistentProcess?.hasChildProcesses || this._processManager.hasChildProcesses; }
128
- get reconnectionProperties() { return this.shellLaunchConfig.attachPersistentProcess?.reconnectionProperties || this.shellLaunchConfig.reconnectionProperties; }
129
- get areLinksReady() { return this._areLinksReady; }
130
- get initialDataEvents() { return this._initialDataEvents; }
131
- get exitCode() { return this._exitCode; }
132
- get exitReason() { return this._exitReason; }
133
- get hadFocusOnExit() { return this._hadFocusOnExit; }
134
- get isTitleSetByProcess() { return !!this._messageTitleDisposable.value; }
135
- get shellLaunchConfig() { return this._shellLaunchConfig; }
136
- get shellType() { return this._shellType; }
137
- get os() { return this._processManager.os; }
138
- get isRemote() { return this._processManager.remoteAuthority !== undefined; }
139
- get remoteAuthority() { return this._processManager.remoteAuthority; }
140
- get hasFocus() { return this._wrapperElement.contains(document.activeElement) ?? false; }
141
- get title() { return this._title; }
142
- get titleSource() { return this._titleSource; }
143
- get icon() { return this._getIcon(); }
144
- get color() { return this._getColor(); }
145
- get processName() { return this._processName; }
146
- get sequence() { return this._sequence; }
147
- get staticTitle() { return this._staticTitle; }
148
- get workspaceFolder() { return this._workspaceFolder; }
149
- get cwd() { return this._cwd; }
150
- get initialCwd() { return this._initialCwd; }
151
- get description() {
152
- if (this._description) {
153
- return this._description;
154
- }
155
- const type = this.shellLaunchConfig.attachPersistentProcess?.type || this.shellLaunchConfig.type;
156
- if (type) {
157
- if (type === 'Task') {
158
- return ( nls.localize('terminalTypeTask', "Task"));
159
- }
160
- return ( nls.localize('terminalTypeLocal', "Local"));
161
- }
162
- return undefined;
163
- }
164
- get userHome() { return this._userHome; }
165
- get shellIntegrationNonce() { return this._processManager.shellIntegrationNonce; }
166
- get injectedArgs() { return this._injectedArgs; }
167
- constructor(_terminalShellTypeContextKey, _terminalInRunCommandPicker, _terminalSuggestWidgetVisibleContextKey, _configHelper, _shellLaunchConfig, _contextKeyService, instantiationService, _terminalProfileResolverService, _pathService, _keybindingService, _notificationService, _preferencesService, _viewsService, _clipboardService, _themeService, _configurationService, _logService, _dialogService, _storageService, _accessibilityService, _productService, _quickInputService, workbenchEnvironmentService, _workspaceContextService, _editorService, _workspaceTrustRequestService, _historyService, _telemetryService, _openerService, _commandService, _audioCueService, _viewDescriptorService) {
168
- super();
169
- this._terminalShellTypeContextKey = _terminalShellTypeContextKey;
170
- this._terminalInRunCommandPicker = _terminalInRunCommandPicker;
171
- this._terminalSuggestWidgetVisibleContextKey = _terminalSuggestWidgetVisibleContextKey;
172
- this._configHelper = _configHelper;
173
- this._shellLaunchConfig = _shellLaunchConfig;
174
- this._contextKeyService = _contextKeyService;
175
- this._terminalProfileResolverService = _terminalProfileResolverService;
176
- this._pathService = _pathService;
177
- this._keybindingService = _keybindingService;
178
- this._notificationService = _notificationService;
179
- this._preferencesService = _preferencesService;
180
- this._viewsService = _viewsService;
181
- this._clipboardService = _clipboardService;
182
- this._themeService = _themeService;
183
- this._configurationService = _configurationService;
184
- this._logService = _logService;
185
- this._dialogService = _dialogService;
186
- this._storageService = _storageService;
187
- this._accessibilityService = _accessibilityService;
188
- this._productService = _productService;
189
- this._quickInputService = _quickInputService;
190
- this._workspaceContextService = _workspaceContextService;
191
- this._editorService = _editorService;
192
- this._workspaceTrustRequestService = _workspaceTrustRequestService;
193
- this._historyService = _historyService;
194
- this._telemetryService = _telemetryService;
195
- this._openerService = _openerService;
196
- this._commandService = _commandService;
197
- this._audioCueService = _audioCueService;
198
- this._viewDescriptorService = _viewDescriptorService;
199
- this._contributions = ( new Map());
200
- this._latestXtermWriteData = 0;
201
- this._latestXtermParseData = 0;
202
- this._title = '';
203
- this._titleSource = TitleEventSource.Process;
204
- this._cols = 0;
205
- this._rows = 0;
206
- this._cwd = undefined;
207
- this._initialCwd = undefined;
208
- this._injectedArgs = undefined;
209
- this._layoutSettingsChanged = true;
210
- this._areLinksReady = false;
211
- this._initialDataEvents = [];
212
- this._messageTitleDisposable = this._register(( new MutableDisposable()));
213
- this._widgetManager = ( new TerminalWidgetManager());
214
- this._dndObserver = this._register(( new MutableDisposable()));
215
- this._processName = '';
216
- this._usedShellIntegrationInjection = false;
217
- this.capabilities = ( new TerminalCapabilityStoreMultiplexer());
218
- this.disableLayout = false;
219
- this._onExit = ( new Emitter());
220
- this.onExit = this._onExit.event;
221
- this._onDisposed = this._register(( new Emitter()));
222
- this.onDisposed = this._onDisposed.event;
223
- this._onProcessIdReady = this._register(( new Emitter()));
224
- this.onProcessIdReady = this._onProcessIdReady.event;
225
- this._onProcessReplayComplete = this._register(( new Emitter()));
226
- this.onProcessReplayComplete = this._onProcessReplayComplete.event;
227
- this._onTitleChanged = this._register(( new Emitter()));
228
- this.onTitleChanged = this._onTitleChanged.event;
229
- this._onIconChanged = this._register(( new Emitter()));
230
- this.onIconChanged = this._onIconChanged.event;
231
- this._onData = this._register(( new Emitter()));
232
- this.onData = this._onData.event;
233
- this._onBinary = this._register(( new Emitter()));
234
- this.onBinary = this._onBinary.event;
235
- this._onLineData = this._register(( new Emitter({
236
- onDidAddFirstListener: () => this._onLineDataSetup()
237
- })));
238
- this.onLineData = this._onLineData.event;
239
- this._onRequestExtHostProcess = this._register(( new Emitter()));
240
- this.onRequestExtHostProcess = this._onRequestExtHostProcess.event;
241
- this._onDimensionsChanged = this._register(( new Emitter()));
242
- this.onDimensionsChanged = this._onDimensionsChanged.event;
243
- this._onMaximumDimensionsChanged = this._register(( new Emitter()));
244
- this.onMaximumDimensionsChanged = this._onMaximumDimensionsChanged.event;
245
- this._onDidFocus = this._register(( new Emitter()));
246
- this.onDidFocus = this._onDidFocus.event;
247
- this._onDidRequestFocus = this._register(( new Emitter()));
248
- this.onDidRequestFocus = this._onDidRequestFocus.event;
249
- this._onDidBlur = this._register(( new Emitter()));
250
- this.onDidBlur = this._onDidBlur.event;
251
- this._onDidInputData = this._register(( new Emitter()));
252
- this.onDidInputData = this._onDidInputData.event;
253
- this._onDidChangeSelection = this._register(( new Emitter()));
254
- this.onDidChangeSelection = this._onDidChangeSelection.event;
255
- this._onRequestAddInstanceToGroup = this._register(( new Emitter()));
256
- this.onRequestAddInstanceToGroup = this._onRequestAddInstanceToGroup.event;
257
- this._onDidChangeHasChildProcesses = this._register(( new Emitter()));
258
- this.onDidChangeHasChildProcesses = this._onDidChangeHasChildProcesses.event;
259
- this._onDidRunText = this._register(( new Emitter()));
260
- this.onDidRunText = this._onDidRunText.event;
261
- this._wrapperElement = document.createElement('div');
262
- this._wrapperElement.classList.add('terminal-wrapper');
263
- this._skipTerminalCommands = [];
264
- this._isExiting = false;
265
- this._hadFocusOnExit = false;
266
- this._isVisible = false;
267
- this._isDisposed = false;
268
- this._instanceId = TerminalInstance_1._instanceIdCounter++;
269
- this._hasHadInput = false;
270
- this._fixedRows = _shellLaunchConfig.attachPersistentProcess?.fixedDimensions?.rows;
271
- this._fixedCols = _shellLaunchConfig.attachPersistentProcess?.fixedDimensions?.cols;
272
- this._resource = getTerminalUri(this._workspaceContextService.getWorkspace().id, this.instanceId, this.title);
273
- if (this._shellLaunchConfig.attachPersistentProcess?.hideFromUser) {
274
- this._shellLaunchConfig.hideFromUser = this._shellLaunchConfig.attachPersistentProcess.hideFromUser;
275
- }
276
- if (this._shellLaunchConfig.attachPersistentProcess?.isFeatureTerminal) {
277
- this._shellLaunchConfig.isFeatureTerminal = this._shellLaunchConfig.attachPersistentProcess.isFeatureTerminal;
278
- }
279
- if (this._shellLaunchConfig.attachPersistentProcess?.type) {
280
- this._shellLaunchConfig.type = this._shellLaunchConfig.attachPersistentProcess.type;
281
- }
282
- if (this.shellLaunchConfig.cwd) {
283
- const cwdUri = typeof this._shellLaunchConfig.cwd === 'string' ? ( URI.from({
284
- scheme: Schemas.file,
285
- path: this._shellLaunchConfig.cwd
286
- })) : this._shellLaunchConfig.cwd;
287
- if (cwdUri) {
288
- this._workspaceFolder = this._workspaceContextService.getWorkspaceFolder(cwdUri) ?? undefined;
289
- }
290
- }
291
- if (!this._workspaceFolder) {
292
- const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot();
293
- this._workspaceFolder = activeWorkspaceRootUri ? this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri) ?? undefined : undefined;
294
- }
295
- const scopedContextKeyService = this._register(_contextKeyService.createScoped(this._wrapperElement));
296
- this._scopedInstantiationService = instantiationService.createChild(( new ServiceCollection([IContextKeyService, scopedContextKeyService])));
297
- this._terminalFocusContextKey = TerminalContextKeys.focus.bindTo(scopedContextKeyService);
298
- this._terminalHasFixedWidth = TerminalContextKeys.terminalHasFixedWidth.bindTo(scopedContextKeyService);
299
- this._terminalHasTextContextKey = TerminalContextKeys.textSelected.bindTo(scopedContextKeyService);
300
- this._terminalAltBufferActiveContextKey = TerminalContextKeys.altBufferActive.bindTo(scopedContextKeyService);
301
- this._terminalShellIntegrationEnabledContextKey = TerminalContextKeys.terminalShellIntegrationEnabled.bindTo(scopedContextKeyService);
302
- this._logService.trace(`terminalInstance#ctor (instanceId: ${this.instanceId})`, this._shellLaunchConfig);
303
- this._register(this.capabilities.onDidAddCapabilityType(e => {
304
- this._logService.debug('terminalInstance added capability', e);
305
- if (e === 0 ) {
306
- this.capabilities.get(0 )?.onDidChangeCwd(e => {
307
- this._cwd = e;
308
- this._setTitle(this.title, TitleEventSource.Config);
309
- this._scopedInstantiationService.invokeFunction(getDirectoryHistory)?.add(e, { remoteAuthority: this.remoteAuthority });
310
- });
311
- }
312
- else if (e === 2 ) {
313
- const commandCapability = this.capabilities.get(2 );
314
- commandCapability?.onCommandFinished(e => {
315
- if (e.command.trim().length > 0) {
316
- this._scopedInstantiationService.invokeFunction(getCommandHistory)?.add(e.command, { shellType: this._shellType });
317
- }
318
- });
319
- }
320
- }));
321
- this._register(this.capabilities.onDidRemoveCapabilityType(e => this._logService.debug('terminalInstance removed capability', e)));
322
- if (!this.shellLaunchConfig.executable && !workbenchEnvironmentService.remoteAuthority) {
323
- this._terminalProfileResolverService.resolveIcon(this._shellLaunchConfig, OS);
324
- }
325
- this._icon = _shellLaunchConfig.attachPersistentProcess?.icon || _shellLaunchConfig.icon;
326
- if (this.shellLaunchConfig.customPtyImplementation) {
327
- this._setTitle(this._shellLaunchConfig.name, TitleEventSource.Api);
328
- }
329
- this.statusList = this._scopedInstantiationService.createInstance(TerminalStatusList);
330
- this._initDimensions();
331
- this._processManager = this._createProcessManager();
332
- this._containerReadyBarrier = ( new AutoOpenBarrier(100 ));
333
- this._attachBarrier = ( new AutoOpenBarrier(1000));
334
- this._xtermReadyPromise = this._createXterm();
335
- this._xtermReadyPromise.then(async () => {
336
- await this._containerReadyBarrier.wait();
337
- if (!this.shellLaunchConfig.customPtyImplementation && this._configHelper.config.shellIntegration?.enabled && !this.shellLaunchConfig.executable) {
338
- const os = await this._processManager.getBackendOS();
339
- const defaultProfile = (await this._terminalProfileResolverService.getDefaultProfile({ remoteAuthority: this.remoteAuthority, os }));
340
- this.shellLaunchConfig.executable = defaultProfile.path;
341
- this.shellLaunchConfig.args = defaultProfile.args;
342
- if (this.shellLaunchConfig.isExtensionOwnedTerminal) {
343
- this.shellLaunchConfig.icon ??= defaultProfile.icon;
344
- this.shellLaunchConfig.color ??= defaultProfile.color;
345
- }
346
- else {
347
- this.shellLaunchConfig.icon = defaultProfile.icon;
348
- this.shellLaunchConfig.color = defaultProfile.color;
349
- }
350
- }
351
- await this._createProcess();
352
- if (this.shellLaunchConfig.attachPersistentProcess) {
353
- this._cwd = this.shellLaunchConfig.attachPersistentProcess.cwd;
354
- this._setTitle(this.shellLaunchConfig.attachPersistentProcess.title, this.shellLaunchConfig.attachPersistentProcess.titleSource);
355
- this.setShellType(this.shellType);
356
- }
357
- if (this._fixedCols) {
358
- await this._addScrollbar();
359
- }
360
- }).catch((err) => {
361
- if (!this._isDisposed) {
362
- throw err;
363
- }
364
- });
365
- this._register(this._configurationService.onDidChangeConfiguration(async (e) => {
366
- if (e.affectsConfiguration("accessibility.verbosity.terminal" )) {
367
- this._setAriaLabel(this.xterm?.raw, this._instanceId, this.title);
368
- }
369
- if (e.affectsConfiguration('terminal.integrated')) {
370
- this.updateConfig();
371
- this.setVisible(this._isVisible);
372
- }
373
- const layoutSettings = [
374
- "terminal.integrated.fontSize" ,
375
- "terminal.integrated.fontFamily" ,
376
- "terminal.integrated.fontWeight" ,
377
- "terminal.integrated.fontWeightBold" ,
378
- "terminal.integrated.letterSpacing" ,
379
- "terminal.integrated.lineHeight" ,
380
- 'editor.fontFamily'
381
- ];
382
- if (( layoutSettings.some(id => e.affectsConfiguration(id)))) {
383
- this._layoutSettingsChanged = true;
384
- await this._resize();
385
- }
386
- if (e.affectsConfiguration("terminal.integrated.unicodeVersion" )) {
387
- this._updateUnicodeVersion();
388
- }
389
- if (e.affectsConfiguration('editor.accessibilitySupport')) {
390
- this.updateAccessibilitySupport();
391
- }
392
- if (e.affectsConfiguration("terminal.integrated.tabs.title" ) ||
393
- e.affectsConfiguration("terminal.integrated.tabs.separator" ) ||
394
- e.affectsConfiguration("terminal.integrated.tabs.description" )) {
395
- this._labelComputer?.refreshLabel(this);
396
- }
397
- }));
398
- this._register(this._workspaceContextService.onDidChangeWorkspaceFolders(() => this._labelComputer?.refreshLabel(this)));
399
- this._register(this.onDidBlur(() => this.xterm?.suggestController?.hideSuggestWidget()));
400
- let initialDataEventsTimeout = window.setTimeout(() => {
401
- initialDataEventsTimeout = undefined;
402
- this._initialDataEvents = undefined;
403
- }, 10000);
404
- this._register(toDisposable(() => {
405
- if (initialDataEventsTimeout) {
406
- window.clearTimeout(initialDataEventsTimeout);
407
- }
408
- }));
409
- const contributionDescs = TerminalExtensionsRegistry.getTerminalContributions();
410
- for (const desc of contributionDescs) {
411
- if (( this._contributions.has(desc.id))) {
412
- onUnexpectedError(( new Error(`Cannot have two terminal contributions with the same id ${desc.id}`)));
413
- continue;
414
- }
415
- let contribution;
416
- try {
417
- contribution = this._scopedInstantiationService.createInstance(desc.ctor, this, this._processManager, this._widgetManager);
418
- this._contributions.set(desc.id, contribution);
419
- }
420
- catch (err) {
421
- onUnexpectedError(err);
422
- }
423
- this._xtermReadyPromise.then(xterm => {
424
- contribution.xtermReady?.(xterm);
425
- });
426
- this.onDisposed(() => {
427
- contribution.dispose();
428
- this._contributions.delete(desc.id);
429
- if ('instance' in contribution) {
430
- delete contribution.instance;
431
- }
432
- if ('_instance' in contribution) {
433
- delete contribution._instance;
434
- }
435
- });
436
- }
437
- }
438
- getContribution(id) {
439
- return this._contributions.get(id);
440
- }
441
- _getIcon() {
442
- if (!this._icon) {
443
- this._icon = this._processManager.processState >= 2
444
- ? getIconRegistry().getIcon(this._configurationService.getValue("terminal.integrated.tabs.defaultIcon" ))
445
- : undefined;
446
- }
447
- return this._icon;
448
- }
449
- _getColor() {
450
- if (this.shellLaunchConfig.color) {
451
- return this.shellLaunchConfig.color;
452
- }
453
- if (this.shellLaunchConfig?.attachPersistentProcess?.color) {
454
- return this.shellLaunchConfig.attachPersistentProcess.color;
455
- }
456
- if (this._processManager.processState >= 2 ) {
457
- return undefined;
458
- }
459
- return undefined;
460
- }
461
- _initDimensions() {
462
- if (!this._container) {
463
- this._cols = 80 ;
464
- this._rows = 30 ;
465
- return;
466
- }
467
- const computedStyle = window.getComputedStyle(this._container);
468
- const width = parseInt(computedStyle.width);
469
- const height = parseInt(computedStyle.height);
470
- this._evaluateColsAndRows(width, height);
471
- }
472
- _evaluateColsAndRows(width, height) {
473
- if (!width || !height) {
474
- this._setLastKnownColsAndRows();
475
- return null;
476
- }
477
- const dimension = this._getDimension(width, height);
478
- if (!dimension) {
479
- this._setLastKnownColsAndRows();
480
- return null;
481
- }
482
- const font = this.xterm ? this.xterm.getFont() : this._configHelper.getFont();
483
- const newRC = getXtermScaledDimensions(font, dimension.width, dimension.height);
484
- if (!newRC) {
485
- this._setLastKnownColsAndRows();
486
- return null;
487
- }
488
- if (this._cols !== newRC.cols || this._rows !== newRC.rows) {
489
- this._cols = newRC.cols;
490
- this._rows = newRC.rows;
491
- this._fireMaximumDimensionsChanged();
492
- }
493
- return dimension.width;
494
- }
495
- _setLastKnownColsAndRows() {
496
- if (TerminalInstance_1._lastKnownGridDimensions) {
497
- this._cols = TerminalInstance_1._lastKnownGridDimensions.cols;
498
- this._rows = TerminalInstance_1._lastKnownGridDimensions.rows;
499
- }
500
- }
501
- _fireMaximumDimensionsChanged() {
502
- this._onMaximumDimensionsChanged.fire();
503
- }
504
- _getDimension(width, height) {
505
- const font = this.xterm ? this.xterm.getFont() : this._configHelper.getFont();
506
- if (!font || !font.charWidth || !font.charHeight) {
507
- return undefined;
508
- }
509
- if (!this.xterm?.raw.element) {
510
- return undefined;
511
- }
512
- const computedStyle = window.getComputedStyle(this.xterm.raw.element);
513
- const horizontalPadding = parseInt(computedStyle.paddingLeft) + parseInt(computedStyle.paddingRight);
514
- const verticalPadding = parseInt(computedStyle.paddingTop) + parseInt(computedStyle.paddingBottom);
515
- TerminalInstance_1._lastKnownCanvasDimensions = new dom.Dimension(Math.min(8000 , width - horizontalPadding), height + (this._hasScrollBar && !this._horizontalScrollbar ? -5 : 0) - 2 - verticalPadding);
516
- return TerminalInstance_1._lastKnownCanvasDimensions;
517
- }
518
- get persistentProcessId() { return this._processManager.persistentProcessId; }
519
- get shouldPersist() { return this._processManager.shouldPersist && !this.shellLaunchConfig.isTransient && (!this.reconnectionProperties || this._configurationService.getValue('task.reconnection') === true); }
520
- static getXtermConstructor(keybindingService, contextKeyService) {
521
- const keybinding = keybindingService.lookupKeybinding("workbench.action.terminal.focusAccessibleBuffer" , contextKeyService);
522
- if (xtermConstructor) {
523
- return xtermConstructor;
524
- }
525
- xtermConstructor = Promises.withAsyncBody(async (resolve) => {
526
- Terminal.strings.promptLabel = ( nls.localize('terminal.integrated.a11yPromptLabel', 'Terminal input'));
527
- Terminal.strings.tooMuchOutput = keybinding ? ( nls.localize(
528
- 'terminal.integrated.useAccessibleBuffer',
529
- 'Use the accessible buffer {0} to manually review output',
530
- keybinding.getLabel()
531
- )) : ( nls.localize(
532
- 'terminal.integrated.useAccessibleBufferNoKb',
533
- 'Use the Terminal: Focus Accessible Buffer command to manually review output'
534
- ));
535
- resolve(Terminal);
536
- });
537
- return xtermConstructor;
538
- }
539
- async _createXterm() {
540
- const Terminal = await TerminalInstance_1.getXtermConstructor(this._keybindingService, this._contextKeyService);
541
- if (this._isDisposed) {
542
- throw new ErrorNoTelemetry('Terminal disposed of during xterm.js creation');
543
- }
544
- const disableShellIntegrationReporting = (this.shellLaunchConfig.hideFromUser || this.shellLaunchConfig.executable === undefined || this.shellType === undefined) || !shellIntegrationSupportedShellTypes.includes(this.shellType);
545
- const xterm = this._scopedInstantiationService.createInstance(XtermTerminal, Terminal, this._configHelper, this._cols, this._rows, {
546
- getBackgroundColor: (theme) => {
547
- const terminalBackground = theme.getColor(TERMINAL_BACKGROUND_COLOR);
548
- if (terminalBackground) {
549
- return terminalBackground;
550
- }
551
- if (this.target === TerminalLocation.Editor) {
552
- return theme.getColor(editorBackground);
553
- }
554
- const location = this._viewDescriptorService.getViewLocationById(TERMINAL_VIEW_ID);
555
- if (location === 1 ) {
556
- return theme.getColor(PANEL_BACKGROUND);
557
- }
558
- return theme.getColor(SIDE_BAR_BACKGROUND);
559
- }
560
- }, this.capabilities, this._processManager.shellIntegrationNonce, this._terminalSuggestWidgetVisibleContextKey, disableShellIntegrationReporting);
561
- this.xterm = xterm;
562
- this.updateAccessibilitySupport();
563
- this.xterm.onDidRequestRunCommand(e => {
564
- if (e.copyAsHtml) {
565
- this.copySelection(true, e.command);
566
- }
567
- else {
568
- this.sendText(e.command.command, e.noNewLine ? false : true);
569
- }
570
- });
571
- this.xterm.onDidRequestFocus(() => this.focus());
572
- this.xterm.onDidRequestSendText(e => this.sendText(e, false));
573
- const initialTextWrittenPromise = this._shellLaunchConfig.initialText ? ( new Promise(r => this._writeInitialText(xterm, r))) : undefined;
574
- const lineDataEventAddon = this._register(( new LineDataEventAddon(initialTextWrittenPromise)));
575
- lineDataEventAddon.onLineData(e => this._onLineData.fire(e));
576
- this._lineDataEventAddon = lineDataEventAddon;
577
- setTimeout(() => {
578
- this._register(xterm.raw.onBell(() => {
579
- if (this._configHelper.config.enableBell) {
580
- this.statusList.add({
581
- id: "bell" ,
582
- severity: Severity.Warning,
583
- icon: Codicon.bell,
584
- tooltip: ( nls.localize('bellStatus', "Bell"))
585
- }, this._configHelper.config.bellDuration);
586
- this._audioCueService.playSound(AudioCue.terminalBell.sound.getSound());
587
- }
588
- }));
589
- }, 1000);
590
- this._register(xterm.raw.onSelectionChange(async () => this._onSelectionChange()));
591
- this._register(xterm.raw.buffer.onBufferChange(() => this._refreshAltBufferContextKey()));
592
- this._processManager.onProcessData(e => this._onProcessData(e));
593
- this._register(xterm.raw.onData(async (data) => {
594
- await this._processManager.write(data);
595
- this._onDidInputData.fire(this);
596
- }));
597
- this._register(xterm.raw.onBinary(data => this._processManager.processBinary(data)));
598
- this._processManager.onProcessReady(async (processTraits) => {
599
- if (this._processManager.os) {
600
- lineDataEventAddon.setOperatingSystem(this._processManager.os);
601
- }
602
- xterm.raw.options.windowsPty = processTraits.windowsPty;
603
- });
604
- this._processManager.onRestoreCommands(e => this.xterm?.shellIntegration.deserialize(e));
605
- this._register(this._viewDescriptorService.onDidChangeLocation(({ views }) => {
606
- if (( views.some(v => v.id === TERMINAL_VIEW_ID))) {
607
- xterm.refresh();
608
- }
609
- }));
610
- if (!( this.capabilities.has(0 ))) {
611
- let onKeyListener = xterm.raw.onKey(e => {
612
- const event = ( new StandardKeyboardEvent(e.domEvent));
613
- if (event.equals(3 )) {
614
- this._updateProcessCwd();
615
- }
616
- });
617
- this._register(this.capabilities.onDidAddCapabilityType(e => {
618
- if (e === 0 ) {
619
- onKeyListener?.dispose();
620
- onKeyListener = undefined;
621
- }
622
- }));
623
- }
624
- this._pathService.userHome().then(userHome => {
625
- this._userHome = userHome.fsPath;
626
- });
627
- if (this._isVisible) {
628
- this._open();
629
- }
630
- return xterm;
631
- }
632
- async _onLineDataSetup() {
633
- const xterm = this.xterm || (await this._xtermReadyPromise);
634
- xterm.raw.loadAddon(this._lineDataEventAddon);
635
- }
636
- async runCommand(commandLine, addNewLine) {
637
- if (this.capabilities.get(2 )?.hasInput !== false) {
638
- await this.sendText('\x03', false);
639
- await timeout(100);
640
- }
641
- await this.sendText(commandLine, addNewLine, !addNewLine);
642
- }
643
- async runRecent(type, filterMode, value) {
644
- return this._scopedInstantiationService.invokeFunction(showRunRecentQuickPick, this, this._terminalInRunCommandPicker, type, filterMode, value);
645
- }
646
- detachFromElement() {
647
- this._wrapperElement.remove();
648
- this._container = undefined;
649
- }
650
- attachToElement(container) {
651
- if (this._container === container) {
652
- return;
653
- }
654
- this._attachBarrier.open();
655
- this._container = container;
656
- this._container.appendChild(this._wrapperElement);
657
- this.xterm?.refresh();
658
- setTimeout(() => this._initDragAndDrop(container));
659
- }
660
- _open() {
661
- if (!this.xterm || this.xterm.raw.element) {
662
- return;
663
- }
664
- if (!this._container || !this._container.isConnected) {
665
- throw new Error('A container element needs to be set with `attachToElement` and be part of the DOM before calling `_open`');
666
- }
667
- const xtermElement = document.createElement('div');
668
- this._wrapperElement.appendChild(xtermElement);
669
- this._container.appendChild(this._wrapperElement);
670
- const xterm = this.xterm;
671
- this._wrapperElement.xterm = xterm.raw;
672
- const screenElement = xterm.attachToElement(xtermElement);
673
- this._register(xterm.shellIntegration.onDidChangeStatus(() => {
674
- if (this.hasFocus) {
675
- this._setShellIntegrationContextKey();
676
- }
677
- else {
678
- this._terminalShellIntegrationEnabledContextKey.reset();
679
- }
680
- }));
681
- if (!xterm.raw.element || !xterm.raw.textarea) {
682
- throw new Error('xterm elements not set after open');
683
- }
684
- this._setAriaLabel(xterm.raw, this._instanceId, this._title);
685
- xterm.raw.attachCustomKeyEventHandler((event) => {
686
- if (this._isExiting) {
687
- return false;
688
- }
689
- const standardKeyboardEvent = ( new StandardKeyboardEvent(event));
690
- const resolveResult = this._keybindingService.softDispatch(standardKeyboardEvent, standardKeyboardEvent.target);
691
- const isValidChord = resolveResult.kind === 1 && this._configHelper.config.allowChords && event.key !== 'Escape';
692
- if (this._keybindingService.inChordMode || isValidChord) {
693
- event.preventDefault();
694
- return false;
695
- }
696
- const SHOW_TERMINAL_CONFIG_PROMPT_KEY = 'terminal.integrated.showTerminalConfigPrompt';
697
- const EXCLUDED_KEYS = ['RightArrow', 'LeftArrow', 'UpArrow', 'DownArrow', 'Space', 'Meta', 'Control', 'Shift', 'Alt', '', 'Delete', 'Backspace', 'Tab'];
698
- if (this._storageService.getBoolean(SHOW_TERMINAL_CONFIG_PROMPT_KEY, -1 , true) &&
699
- !EXCLUDED_KEYS.includes(event.key) &&
700
- !event.ctrlKey &&
701
- !event.shiftKey &&
702
- !event.altKey) {
703
- this._hasHadInput = true;
704
- }
705
- if (resolveResult.kind === 2 && resolveResult.commandId && ( this._skipTerminalCommands.some(k => k === resolveResult.commandId)) && !this._configHelper.config.sendKeybindingsToShell) {
706
- if (this._storageService.getBoolean(SHOW_TERMINAL_CONFIG_PROMPT_KEY, -1 , true) &&
707
- this._hasHadInput &&
708
- !TERMINAL_CREATION_COMMANDS.includes(resolveResult.commandId)) {
709
- this._notificationService.prompt(Severity.Info, ( nls.localize(
710
- 'keybindingHandling',
711
- "Some keybindings don't go to the terminal by default and are handled by {0} instead.",
712
- this._productService.nameLong
713
- )), [
714
- {
715
- label: ( nls.localize('configureTerminalSettings', "Configure Terminal Settings")),
716
- run: () => {
717
- this._preferencesService.openSettings({ jsonEditor: false, query: `@id:${"terminal.integrated.commandsToSkipShell" },${"terminal.integrated.sendKeybindingsToShell" },${"terminal.integrated.allowChords" }` });
718
- }
719
- }
720
- ]);
721
- this._storageService.store(SHOW_TERMINAL_CONFIG_PROMPT_KEY, false, -1 , 0 );
722
- }
723
- event.preventDefault();
724
- return false;
725
- }
726
- if (this._configHelper.config.allowMnemonics && !isMacintosh && event.altKey) {
727
- return false;
728
- }
729
- if (TabFocus.getTabFocusMode("terminalFocus" ) && event.key === 'Tab') {
730
- return false;
731
- }
732
- if (event.key === 'Tab' && event.shiftKey) {
733
- event.preventDefault();
734
- return true;
735
- }
736
- if (isWindows && event.altKey && event.key === 'F4' && !event.ctrlKey) {
737
- return false;
738
- }
739
- if (!BrowserFeatures.clipboard.readText && event.key === 'v' && event.ctrlKey) {
740
- return false;
741
- }
742
- return true;
743
- });
744
- this._register(dom.addDisposableListener(xterm.raw.element, 'mousedown', () => {
745
- const listener = dom.addDisposableListener(document, 'mouseup', () => {
746
- setTimeout(() => this._refreshSelectionContextKey(), 0);
747
- listener.dispose();
748
- });
749
- }));
750
- this._register(dom.addDisposableListener(xterm.raw.element, 'touchstart', () => {
751
- xterm.raw.focus();
752
- }));
753
- this._register(dom.addDisposableListener(xterm.raw.element, 'keyup', () => {
754
- setTimeout(() => this._refreshSelectionContextKey(), 0);
755
- }));
756
- this._register(dom.addDisposableListener(xterm.raw.textarea, 'focus', () => this._setFocus(true)));
757
- this._register(dom.addDisposableListener(xterm.raw.textarea, 'blur', () => this._setFocus(false)));
758
- this._register(dom.addDisposableListener(xterm.raw.textarea, 'focusout', () => this._setFocus(false)));
759
- this._initDragAndDrop(this._container);
760
- this._widgetManager.attachToElement(screenElement);
761
- if (this._lastLayoutDimensions) {
762
- this.layout(this._lastLayoutDimensions);
763
- }
764
- this.updateConfig();
765
- if (xterm.raw.options.disableStdin) {
766
- this._attachPressAnyKeyToCloseListener(xterm.raw);
767
- }
768
- }
769
- _setFocus(focused) {
770
- if (focused) {
771
- this._terminalFocusContextKey.set(true);
772
- this._setShellIntegrationContextKey();
773
- this._onDidFocus.fire(this);
774
- }
775
- else {
776
- this.resetFocusContextKey();
777
- this._onDidBlur.fire(this);
778
- this._refreshSelectionContextKey();
779
- }
780
- }
781
- _setShellIntegrationContextKey() {
782
- if (this.xterm) {
783
- this._terminalShellIntegrationEnabledContextKey.set(this.xterm.shellIntegration.status === 2 );
784
- }
785
- }
786
- resetFocusContextKey() {
787
- this._terminalFocusContextKey.reset();
788
- this._terminalShellIntegrationEnabledContextKey.reset();
789
- }
790
- _initDragAndDrop(container) {
791
- const dndController = this._register(this._scopedInstantiationService.createInstance(TerminalInstanceDragAndDropController, container));
792
- dndController.onDropTerminal(e => this._onRequestAddInstanceToGroup.fire(e));
793
- dndController.onDropFile(async (path) => {
794
- this.focus();
795
- await this.sendPath(path, false);
796
- });
797
- this._dndObserver.value = new dom.DragAndDropObserver(container, dndController);
798
- }
799
- hasSelection() {
800
- return this.xterm ? this.xterm.raw.hasSelection() : false;
801
- }
802
- async copySelection(asHtml, command) {
803
- const xterm = await this._xtermReadyPromise;
804
- await xterm.copySelection(asHtml, command);
805
- }
806
- get selection() {
807
- return this.xterm && this.hasSelection() ? this.xterm.raw.getSelection() : undefined;
808
- }
809
- clearSelection() {
810
- this.xterm?.raw.clearSelection();
811
- }
812
- _refreshAltBufferContextKey() {
813
- this._terminalAltBufferActiveContextKey.set(!!(this.xterm && this.xterm.raw.buffer.active === this.xterm.raw.buffer.alternate));
814
- }
815
- async _shouldPasteText(text) {
816
- if (this.xterm?.raw.modes.bracketedPasteMode) {
817
- return true;
818
- }
819
- const textForLines = text.split(/\r?\n/);
820
- if (textForLines.length === 2 && textForLines[1].trim().length === 0) {
821
- return true;
822
- }
823
- if (textForLines.length === 1 || !this._configurationService.getValue("terminal.integrated.enableMultiLinePasteWarning" )) {
824
- return true;
825
- }
826
- const displayItemsCount = 3;
827
- const maxPreviewLineLength = 30;
828
- let detail = ( nls.localize('preview', "Preview:"));
829
- for (let i = 0; i < Math.min(textForLines.length, displayItemsCount); i++) {
830
- const line = textForLines[i];
831
- const cleanedLine = line.length > maxPreviewLineLength ? `${line.slice(0, maxPreviewLineLength)}…` : line;
832
- detail += `\n${cleanedLine}`;
833
- }
834
- if (textForLines.length > displayItemsCount) {
835
- detail += `\n…`;
836
- }
837
- const { confirmed, checkboxChecked } = await this._dialogService.confirm({
838
- message: ( nls.localize(
839
- 'confirmMoveTrashMessageFilesAndDirectories',
840
- "Are you sure you want to paste {0} lines of text into the terminal?",
841
- textForLines.length
842
- )),
843
- detail,
844
- primaryButton: ( nls.localize(
845
- { key: 'multiLinePasteButton', comment: ['&& denotes a mnemonic'] },
846
- "&&Paste"
847
- )),
848
- checkbox: {
849
- label: ( nls.localize('doNotAskAgain', "Do not ask me again"))
850
- }
851
- });
852
- if (confirmed && checkboxChecked) {
853
- await this._configurationService.updateValue("terminal.integrated.enableMultiLinePasteWarning" , false);
854
- }
855
- return confirmed;
856
- }
857
- dispose(reason) {
858
- if (this._isDisposed) {
859
- return;
860
- }
861
- this._isDisposed = true;
862
- this._logService.trace(`terminalInstance#dispose (instanceId: ${this.instanceId})`);
863
- dispose(this._widgetManager);
864
- if (this.xterm?.raw.element) {
865
- this._hadFocusOnExit = this.hasFocus;
866
- }
867
- if (this._wrapperElement.xterm) {
868
- this._wrapperElement.xterm = undefined;
869
- }
870
- if (this._horizontalScrollbar) {
871
- this._horizontalScrollbar.dispose();
872
- this._horizontalScrollbar = undefined;
873
- }
874
- try {
875
- this.xterm?.dispose();
876
- }
877
- catch (err) {
878
- this._logService.error('Exception occurred during xterm disposal', err);
879
- }
880
- if (isFirefox) {
881
- this.resetFocusContextKey();
882
- this._terminalHasTextContextKey.reset();
883
- this._onDidBlur.fire(this);
884
- }
885
- if (this._pressAnyKeyToCloseListener) {
886
- this._pressAnyKeyToCloseListener.dispose();
887
- this._pressAnyKeyToCloseListener = undefined;
888
- }
889
- if (this._exitReason === undefined) {
890
- this._exitReason = reason ?? TerminalExitReason.Unknown;
891
- }
892
- this._processManager.dispose();
893
- this._onProcessExit(undefined);
894
- this._onDisposed.fire(this);
895
- super.dispose();
896
- }
897
- async detachProcessAndDispose(reason) {
898
- await this._processManager.detachFromProcess(reason === TerminalExitReason.User);
899
- this.dispose(reason);
900
- }
901
- focus(force) {
902
- this._refreshAltBufferContextKey();
903
- if (!this.xterm) {
904
- return;
905
- }
906
- if (force || !window.getSelection()?.toString()) {
907
- this.xterm.raw.focus();
908
- this._onDidRequestFocus.fire();
909
- }
910
- }
911
- async focusWhenReady(force) {
912
- await this._xtermReadyPromise;
913
- await this._attachBarrier.wait();
914
- this.focus(force);
915
- }
916
- async paste() {
917
- if (!this.xterm) {
918
- return;
919
- }
920
- const currentText = await this._clipboardService.readText();
921
- if (!(await this._shouldPasteText(currentText))) {
922
- return;
923
- }
924
- this.focus();
925
- this.xterm.raw.paste(currentText);
926
- }
927
- async pasteSelection() {
928
- if (!this.xterm) {
929
- return;
930
- }
931
- const currentText = await this._clipboardService.readText('selection');
932
- if (!(await this._shouldPasteText(currentText))) {
933
- return;
934
- }
935
- this.focus();
936
- this.xterm.raw.paste(currentText);
937
- }
938
- async sendText(text, addNewLine, bracketedPasteMode) {
939
- if (bracketedPasteMode && this.xterm?.raw.modes.bracketedPasteMode) {
940
- text = `\x1b[200~${text}\x1b[201~`;
941
- }
942
- text = text.replace(/\r?\n/g, '\r');
943
- if (addNewLine && !text.endsWith('\r')) {
944
- text += '\r';
945
- }
946
- await this._processManager.write(text);
947
- this._onDidInputData.fire(this);
948
- this.xterm?.suggestController?.handleNonXtermData(text);
949
- this.xterm?.scrollToBottom();
950
- this._onDidRunText.fire();
951
- }
952
- async sendPath(originalPath, addNewLine) {
953
- return this.sendText(await this.preparePathForShell(originalPath), addNewLine);
954
- }
955
- async preparePathForShell(originalPath) {
956
- await this.processReady;
957
- return preparePathForShell(originalPath, this.shellLaunchConfig.executable, this.title, this.shellType, this._processManager.backend, this._processManager.os);
958
- }
959
- setVisible(visible) {
960
- this._isVisible = visible;
961
- this._wrapperElement.classList.toggle('active', visible);
962
- if (visible && this.xterm) {
963
- this._open();
964
- this._resize();
965
- setTimeout(() => this.xterm.forceRefresh(), 0);
966
- }
967
- }
968
- scrollDownLine() {
969
- this.xterm?.scrollDownLine();
970
- }
971
- scrollDownPage() {
972
- this.xterm?.scrollDownPage();
973
- }
974
- scrollToBottom() {
975
- this.xterm?.scrollToBottom();
976
- }
977
- scrollUpLine() {
978
- this.xterm?.scrollUpLine();
979
- }
980
- scrollUpPage() {
981
- this.xterm?.scrollUpPage();
982
- }
983
- scrollToTop() {
984
- this.xterm?.scrollToTop();
985
- }
986
- clearBuffer() {
987
- this._processManager.clearBuffer();
988
- this.xterm?.clearBuffer();
989
- }
990
- _refreshSelectionContextKey() {
991
- const isActive = !!this._viewsService.getActiveViewWithId(TERMINAL_VIEW_ID);
992
- let isEditorActive = false;
993
- const editor = this._editorService.activeEditor;
994
- if (editor) {
995
- isEditorActive = editor instanceof TerminalEditorInput;
996
- }
997
- this._terminalHasTextContextKey.set((isActive || isEditorActive) && this.hasSelection());
998
- }
999
- _createProcessManager() {
1000
- let deserializedCollections;
1001
- if (this.shellLaunchConfig.attachPersistentProcess?.environmentVariableCollections) {
1002
- deserializedCollections = deserializeEnvironmentVariableCollections(this.shellLaunchConfig.attachPersistentProcess.environmentVariableCollections);
1003
- }
1004
- const processManager = this._scopedInstantiationService.createInstance(TerminalProcessManager, this._instanceId, this._configHelper, this.shellLaunchConfig?.cwd, deserializedCollections, this.shellLaunchConfig.attachPersistentProcess?.shellIntegrationNonce);
1005
- this.capabilities.add(processManager.capabilities);
1006
- processManager.onProcessReady(async (e) => {
1007
- this._onProcessIdReady.fire(this);
1008
- this._initialCwd = await this.getInitialCwd();
1009
- if (!this._labelComputer) {
1010
- this._labelComputer = this._register(this._scopedInstantiationService.createInstance(TerminalLabelComputer, this._configHelper));
1011
- this._register(this._labelComputer.onDidChangeLabel(e => {
1012
- this._title = e.title;
1013
- this._description = e.description;
1014
- this._onTitleChanged.fire(this);
1015
- }));
1016
- }
1017
- if (this._shellLaunchConfig.name) {
1018
- this._setTitle(this._shellLaunchConfig.name, TitleEventSource.Api);
1019
- }
1020
- else {
1021
- setTimeout(() => {
1022
- this._xtermReadyPromise.then(xterm => {
1023
- this._messageTitleDisposable.value = xterm.raw.onTitleChange(e => this._onTitleChange(e));
1024
- });
1025
- });
1026
- this._setTitle(this._shellLaunchConfig.executable, TitleEventSource.Process);
1027
- }
1028
- });
1029
- processManager.onProcessExit(exitCode => this._onProcessExit(exitCode));
1030
- processManager.onDidChangeProperty(({ type, value }) => {
1031
- switch (type) {
1032
- case "cwd" :
1033
- this._cwd = value;
1034
- this._labelComputer?.refreshLabel(this);
1035
- break;
1036
- case "initialCwd" :
1037
- this._initialCwd = value;
1038
- this._cwd = this._initialCwd;
1039
- this._setTitle(this.title, TitleEventSource.Config);
1040
- this._icon = this._shellLaunchConfig.attachPersistentProcess?.icon || this._shellLaunchConfig.icon;
1041
- this._onIconChanged.fire({ instance: this, userInitiated: false });
1042
- break;
1043
- case "title" :
1044
- this._setTitle(value ?? '', TitleEventSource.Process);
1045
- break;
1046
- case "overrideDimensions" :
1047
- this.setOverrideDimensions(value, true);
1048
- break;
1049
- case "resolvedShellLaunchConfig" :
1050
- this._setResolvedShellLaunchConfig(value);
1051
- break;
1052
- case "shellType" :
1053
- this.setShellType(value);
1054
- break;
1055
- case "hasChildProcesses" :
1056
- this._onDidChangeHasChildProcesses.fire(value);
1057
- break;
1058
- case "usedShellIntegrationInjection" :
1059
- this._usedShellIntegrationInjection = true;
1060
- break;
1061
- }
1062
- });
1063
- processManager.onProcessData(ev => {
1064
- this._initialDataEvents?.push(ev.data);
1065
- this._onData.fire(ev.data);
1066
- });
1067
- processManager.onProcessReplayComplete(() => this._onProcessReplayComplete.fire());
1068
- processManager.onEnvironmentVariableInfoChanged(e => this._onEnvironmentVariableInfoChanged(e));
1069
- processManager.onPtyDisconnect(() => {
1070
- if (this.xterm) {
1071
- this.xterm.raw.options.disableStdin = true;
1072
- }
1073
- this.statusList.add({
1074
- id: "disconnected" ,
1075
- severity: Severity.Error,
1076
- icon: Codicon.debugDisconnect,
1077
- tooltip: ( nls.localize('disconnectStatus', "Lost connection to process"))
1078
- });
1079
- });
1080
- processManager.onPtyReconnect(() => {
1081
- if (this.xterm) {
1082
- this.xterm.raw.options.disableStdin = false;
1083
- }
1084
- this.statusList.remove("disconnected" );
1085
- });
1086
- return processManager;
1087
- }
1088
- async _createProcess() {
1089
- if (this._isDisposed) {
1090
- return;
1091
- }
1092
- const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(Schemas.file);
1093
- if (activeWorkspaceRootUri) {
1094
- const trusted = await this._trust();
1095
- if (!trusted) {
1096
- this._onProcessExit({ message: ( nls.localize(
1097
- 'workspaceNotTrustedCreateTerminal',
1098
- "Cannot launch a terminal process in an untrusted workspace"
1099
- )) });
1100
- }
1101
- }
1102
- else if (this._cwd && this._userHome && this._cwd !== this._userHome) {
1103
- this._onProcessExit({
1104
- message: ( nls.localize(
1105
- 'workspaceNotTrustedCreateTerminalCwd',
1106
- "Cannot launch a terminal process in an untrusted workspace with cwd {0} and userHome {1}",
1107
- this._cwd,
1108
- this._userHome
1109
- ))
1110
- });
1111
- }
1112
- if (this._container && this._cols === 0 && this._rows === 0) {
1113
- this._initDimensions();
1114
- this.xterm?.raw.resize(this._cols || 80 , this._rows || 30 );
1115
- }
1116
- const originalIcon = this.shellLaunchConfig.icon;
1117
- await this._processManager.createProcess(this._shellLaunchConfig, this._cols || 80 , this._rows || 30 ).then(result => {
1118
- if (result) {
1119
- if ('message' in result) {
1120
- this._onProcessExit(result);
1121
- }
1122
- else if ('injectedArgs' in result) {
1123
- this._injectedArgs = result.injectedArgs;
1124
- }
1125
- }
1126
- });
1127
- if (this.xterm?.shellIntegration) {
1128
- this.capabilities.add(this.xterm.shellIntegration.capabilities);
1129
- }
1130
- if (originalIcon !== this.shellLaunchConfig.icon || this.shellLaunchConfig.color) {
1131
- this._icon = this._shellLaunchConfig.attachPersistentProcess?.icon || this._shellLaunchConfig.icon;
1132
- this._onIconChanged.fire({ instance: this, userInitiated: false });
1133
- }
1134
- }
1135
- registerMarker() {
1136
- return this.xterm?.raw.registerMarker();
1137
- }
1138
- addBufferMarker(properties) {
1139
- this.capabilities.get(4 )?.addMark(properties);
1140
- }
1141
- scrollToMark(startMarkId, endMarkId, highlight) {
1142
- this.xterm?.markTracker.scrollToClosestMarker(startMarkId, endMarkId, highlight);
1143
- }
1144
- async freePortKillProcess(port, command) {
1145
- await this._processManager?.freePortKillProcess(port);
1146
- this.runCommand(command, false);
1147
- }
1148
- _onProcessData(ev) {
1149
- const messageId = ++this._latestXtermWriteData;
1150
- if (ev.trackCommit) {
1151
- ev.writePromise = ( new Promise(r => {
1152
- this.xterm?.raw.write(ev.data, () => {
1153
- this._latestXtermParseData = messageId;
1154
- this._processManager.acknowledgeDataEvent(ev.data.length);
1155
- r();
1156
- });
1157
- }));
1158
- }
1159
- else {
1160
- this.xterm?.raw.write(ev.data, () => {
1161
- this._latestXtermParseData = messageId;
1162
- this._processManager.acknowledgeDataEvent(ev.data.length);
1163
- });
1164
- }
1165
- }
1166
- async _onProcessExit(exitCodeOrError) {
1167
- if (this._isExiting) {
1168
- return;
1169
- }
1170
- const parsedExitResult = parseExitResult(exitCodeOrError, this.shellLaunchConfig, this._processManager.processState, this._initialCwd);
1171
- if (this._usedShellIntegrationInjection && this._processManager.processState === 4 && parsedExitResult?.code !== 0) {
1172
- this._relaunchWithShellIntegrationDisabled(parsedExitResult?.message);
1173
- this._onExit.fire(exitCodeOrError);
1174
- return;
1175
- }
1176
- this._isExiting = true;
1177
- await this._flushXtermData();
1178
- this._exitCode = parsedExitResult?.code;
1179
- const exitMessage = parsedExitResult?.message;
1180
- this._logService.debug('Terminal process exit', 'instanceId', this.instanceId, 'code', this._exitCode, 'processState', this._processManager.processState);
1181
- const waitOnExit = this.waitOnExit;
1182
- if (waitOnExit && this._processManager.processState !== 5 ) {
1183
- this._xtermReadyPromise.then(xterm => {
1184
- if (exitMessage) {
1185
- xterm.raw.write(formatMessageForTerminal(exitMessage));
1186
- }
1187
- switch (typeof waitOnExit) {
1188
- case 'string':
1189
- xterm.raw.write(formatMessageForTerminal(waitOnExit, { excludeLeadingNewLine: true }));
1190
- break;
1191
- case 'function':
1192
- if (this.exitCode !== undefined) {
1193
- xterm.raw.write(formatMessageForTerminal(waitOnExit(this.exitCode), { excludeLeadingNewLine: true }));
1194
- }
1195
- break;
1196
- }
1197
- xterm.raw.options.disableStdin = true;
1198
- if (xterm.raw.textarea) {
1199
- this._attachPressAnyKeyToCloseListener(xterm.raw);
1200
- }
1201
- });
1202
- }
1203
- else {
1204
- this.dispose(TerminalExitReason.Process);
1205
- if (exitMessage) {
1206
- const failedDuringLaunch = this._processManager.processState === 4 ;
1207
- if (failedDuringLaunch || this._configHelper.config.showExitAlert) {
1208
- this._notificationService.notify({
1209
- message: exitMessage,
1210
- severity: Severity.Error,
1211
- actions: { primary: [this._scopedInstantiationService.createInstance(TerminalLaunchHelpAction)] }
1212
- });
1213
- }
1214
- else {
1215
- this._logService.warn(exitMessage);
1216
- }
1217
- }
1218
- }
1219
- this._onExit.fire(exitCodeOrError);
1220
- if (this._isDisposed) {
1221
- this._onExit.dispose();
1222
- }
1223
- }
1224
- _relaunchWithShellIntegrationDisabled(exitMessage) {
1225
- this._shellLaunchConfig.ignoreShellIntegration = true;
1226
- this.relaunch();
1227
- this.statusList.add({
1228
- id: "shell-integration-attention-needed" ,
1229
- severity: Severity.Warning,
1230
- icon: Codicon.warning,
1231
- tooltip: (`${exitMessage} ` ?? '') + ( nls.localize(
1232
- 'launchFailed.exitCodeOnlyShellIntegration',
1233
- 'Disabling shell integration in user settings might help.'
1234
- )),
1235
- hoverActions: [{
1236
- commandId: "workbench.action.terminal.learnMore" ,
1237
- label: ( nls.localize('shellIntegration.learnMore', "Learn more about shell integration")),
1238
- run: () => {
1239
- this._openerService.open('https://code.visualstudio.com/docs/editor/integrated-terminal#_shell-integration');
1240
- }
1241
- }, {
1242
- commandId: 'workbench.action.openSettings',
1243
- label: ( nls.localize('shellIntegration.openSettings', "Open user settings")),
1244
- run: () => {
1245
- this._commandService.executeCommand('workbench.action.openSettings', 'terminal.integrated.shellIntegration.enabled');
1246
- }
1247
- }]
1248
- });
1249
- this._telemetryService.publicLog2('terminal/shellIntegrationFailureProcessExit');
1250
- }
1251
- _flushXtermData() {
1252
- if (this._latestXtermWriteData === this._latestXtermParseData) {
1253
- return Promise.resolve();
1254
- }
1255
- let retries = 0;
1256
- return ( new Promise(r => {
1257
- const interval = setInterval(() => {
1258
- if (this._latestXtermWriteData === this._latestXtermParseData || ++retries === 5) {
1259
- clearInterval(interval);
1260
- r();
1261
- }
1262
- }, 20);
1263
- }));
1264
- }
1265
- _attachPressAnyKeyToCloseListener(xterm) {
1266
- if (xterm.textarea && !this._pressAnyKeyToCloseListener) {
1267
- this._pressAnyKeyToCloseListener = dom.addDisposableListener(xterm.textarea, 'keypress', (event) => {
1268
- if (this._pressAnyKeyToCloseListener) {
1269
- this._pressAnyKeyToCloseListener.dispose();
1270
- this._pressAnyKeyToCloseListener = undefined;
1271
- this.dispose(TerminalExitReason.Process);
1272
- event.preventDefault();
1273
- }
1274
- });
1275
- }
1276
- }
1277
- _writeInitialText(xterm, callback) {
1278
- if (!this._shellLaunchConfig.initialText) {
1279
- callback?.();
1280
- return;
1281
- }
1282
- const text = typeof this._shellLaunchConfig.initialText === 'string'
1283
- ? this._shellLaunchConfig.initialText
1284
- : this._shellLaunchConfig.initialText?.text;
1285
- if (typeof this._shellLaunchConfig.initialText === 'string') {
1286
- xterm.raw.writeln(text, callback);
1287
- }
1288
- else {
1289
- if (this._shellLaunchConfig.initialText.trailingNewLine) {
1290
- xterm.raw.writeln(text, callback);
1291
- }
1292
- else {
1293
- xterm.raw.write(text, callback);
1294
- }
1295
- }
1296
- }
1297
- async reuseTerminal(shell, reset = false) {
1298
- this._pressAnyKeyToCloseListener?.dispose();
1299
- this._pressAnyKeyToCloseListener = undefined;
1300
- const xterm = this.xterm;
1301
- if (xterm) {
1302
- if (!reset) {
1303
- await ( new Promise(r => xterm.raw.write('\n\x1b[G', r)));
1304
- }
1305
- if (shell.initialText) {
1306
- this._shellLaunchConfig.initialText = shell.initialText;
1307
- await ( new Promise(r => this._writeInitialText(xterm, r)));
1308
- }
1309
- if (this._isExiting && this._shellLaunchConfig.waitOnExit) {
1310
- xterm.raw.options.disableStdin = false;
1311
- this._isExiting = false;
1312
- }
1313
- if (reset) {
1314
- xterm.clearDecorations();
1315
- }
1316
- }
1317
- this.statusList.remove("relaunch-needed" );
1318
- if (!reset) {
1319
- shell.initialText = ' ';
1320
- }
1321
- this._shellLaunchConfig = shell;
1322
- await this._processManager.relaunch(this._shellLaunchConfig, this._cols || 80 , this._rows || 30 , reset).then(result => {
1323
- if (result) {
1324
- if ('message' in result) {
1325
- this._onProcessExit(result);
1326
- }
1327
- else if ('injectedArgs' in result) {
1328
- this._injectedArgs = result.injectedArgs;
1329
- }
1330
- }
1331
- });
1332
- }
1333
- relaunch() {
1334
- this.reuseTerminal(this._shellLaunchConfig, true);
1335
- }
1336
- _onTitleChange(title) {
1337
- if (this.isTitleSetByProcess) {
1338
- this._setTitle(title, TitleEventSource.Sequence);
1339
- }
1340
- }
1341
- async _trust() {
1342
- return (await this._workspaceTrustRequestService.requestWorkspaceTrust({
1343
- message: ( nls.localize(
1344
- 'terminal.requestTrust',
1345
- "Creating a terminal process requires executing code"
1346
- ))
1347
- })) === true;
1348
- }
1349
- async _onSelectionChange() {
1350
- this._onDidChangeSelection.fire(this);
1351
- if (this._configurationService.getValue("terminal.integrated.copyOnSelection" )) {
1352
- if (this.hasSelection()) {
1353
- await this.copySelection();
1354
- }
1355
- }
1356
- }
1357
- async _updateProcessCwd() {
1358
- if (this._isDisposed || this.shellLaunchConfig.customPtyImplementation) {
1359
- return;
1360
- }
1361
- try {
1362
- const cwd = await this._refreshProperty("cwd" );
1363
- if (typeof cwd !== 'string') {
1364
- throw new Error(`cwd is not a string ${cwd}`);
1365
- }
1366
- }
1367
- catch (e) {
1368
- if (e instanceof Error && e.message === 'Cannot refresh property when process is not set') {
1369
- return;
1370
- }
1371
- throw e;
1372
- }
1373
- }
1374
- updateConfig() {
1375
- this._setCommandsToSkipShell(this._configHelper.config.commandsToSkipShell);
1376
- this._refreshEnvironmentVariableInfoWidgetState(this._processManager.environmentVariableInfo);
1377
- }
1378
- async _updateUnicodeVersion() {
1379
- this._processManager.setUnicodeVersion(this._configHelper.config.unicodeVersion);
1380
- }
1381
- updateAccessibilitySupport() {
1382
- this.xterm.raw.options.screenReaderMode = this._accessibilityService.isScreenReaderOptimized();
1383
- }
1384
- _setCommandsToSkipShell(commands) {
1385
- const excludeCommands = ( commands.filter(command => command[0] === '-').map(command => command.slice(1)));
1386
- this._skipTerminalCommands = DEFAULT_COMMANDS_TO_SKIP_SHELL.filter(defaultCommand => {
1387
- return !excludeCommands.includes(defaultCommand);
1388
- }).concat(commands);
1389
- }
1390
- layout(dimension) {
1391
- this._lastLayoutDimensions = dimension;
1392
- if (this.disableLayout) {
1393
- return;
1394
- }
1395
- if (dimension.width <= 0 || dimension.height <= 0) {
1396
- return;
1397
- }
1398
- const terminalWidth = this._evaluateColsAndRows(dimension.width, dimension.height);
1399
- if (!terminalWidth) {
1400
- return;
1401
- }
1402
- this._resize();
1403
- this._containerReadyBarrier.open();
1404
- for (const contribution of ( this._contributions.values())) {
1405
- if (!this.xterm) {
1406
- this._xtermReadyPromise.then(xterm => contribution.layout?.(xterm, dimension));
1407
- }
1408
- else {
1409
- contribution.layout?.(this.xterm, dimension);
1410
- }
1411
- }
1412
- }
1413
- async _resize() {
1414
- this._resizeNow(false);
1415
- }
1416
- async _resizeNow(immediate) {
1417
- let cols = this.cols;
1418
- let rows = this.rows;
1419
- if (this.xterm) {
1420
- if (this._isVisible && this._layoutSettingsChanged) {
1421
- const font = this.xterm.getFont();
1422
- const config = this._configHelper.config;
1423
- this.xterm.raw.options.letterSpacing = font.letterSpacing;
1424
- this.xterm.raw.options.lineHeight = font.lineHeight;
1425
- this.xterm.raw.options.fontSize = font.fontSize;
1426
- this.xterm.raw.options.fontFamily = font.fontFamily;
1427
- this.xterm.raw.options.fontWeight = config.fontWeight;
1428
- this.xterm.raw.options.fontWeightBold = config.fontWeightBold;
1429
- this._initDimensions();
1430
- cols = this.cols;
1431
- rows = this.rows;
1432
- this._layoutSettingsChanged = false;
1433
- }
1434
- if (isNaN(cols) || isNaN(rows)) {
1435
- return;
1436
- }
1437
- if (cols !== this.xterm.raw.cols || rows !== this.xterm.raw.rows) {
1438
- if (this._fixedRows || this._fixedCols) {
1439
- await this._updateProperty("fixedDimensions" , { cols: this._fixedCols, rows: this._fixedRows });
1440
- }
1441
- this._onDimensionsChanged.fire();
1442
- }
1443
- this.xterm.raw.resize(cols, rows);
1444
- TerminalInstance_1._lastKnownGridDimensions = { cols, rows };
1445
- if (this._isVisible) {
1446
- this.xterm.forceUnpause();
1447
- }
1448
- }
1449
- if (immediate) {
1450
- this._processManager.setDimensions(cols, rows, true);
1451
- }
1452
- else {
1453
- await this._processManager.setDimensions(cols, rows);
1454
- }
1455
- }
1456
- setShellType(shellType) {
1457
- this._shellType = shellType;
1458
- if (shellType) {
1459
- this._terminalShellTypeContextKey.set(shellType?.toString());
1460
- }
1461
- }
1462
- _setAriaLabel(xterm, terminalId, title) {
1463
- const labelParts = [];
1464
- if (xterm && xterm.textarea) {
1465
- if (title && title.length > 0) {
1466
- labelParts.push(( nls.localize(
1467
- 'terminalTextBoxAriaLabelNumberAndTitle',
1468
- "Terminal {0}, {1}",
1469
- terminalId,
1470
- title
1471
- )));
1472
- }
1473
- else {
1474
- labelParts.push(( nls.localize('terminalTextBoxAriaLabel', "Terminal {0}", terminalId)));
1475
- }
1476
- const screenReaderOptimized = this._accessibilityService.isScreenReaderOptimized();
1477
- if (!screenReaderOptimized) {
1478
- labelParts.push(( nls.localize(
1479
- 'terminalScreenReaderMode',
1480
- "Run the command: Toggle Screen Reader Accessibility Mode for an optimized screen reader experience"
1481
- )));
1482
- }
1483
- const accessibilityHelpKeybinding = this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp" )?.getLabel();
1484
- if (this._configurationService.getValue("accessibility.verbosity.terminal" ) && accessibilityHelpKeybinding) {
1485
- labelParts.push(( nls.localize(
1486
- 'terminalHelpAriaLabel',
1487
- "Use {0} for terminal accessibility help",
1488
- accessibilityHelpKeybinding
1489
- )));
1490
- }
1491
- xterm.textarea.setAttribute('aria-label', labelParts.join('\n'));
1492
- }
1493
- }
1494
- _updateTitleProperties(title, eventSource) {
1495
- if (!title) {
1496
- return this._processName;
1497
- }
1498
- switch (eventSource) {
1499
- case TitleEventSource.Process:
1500
- if (this._processManager.os === 1 ) {
1501
- title = path.win32.parse(title).name;
1502
- }
1503
- else {
1504
- const firstSpaceIndex = title.indexOf(' ');
1505
- if (title.startsWith('/')) {
1506
- title = path.basename(title);
1507
- }
1508
- else if (firstSpaceIndex > -1) {
1509
- title = title.substring(0, firstSpaceIndex);
1510
- }
1511
- }
1512
- this._processName = title;
1513
- break;
1514
- case TitleEventSource.Api:
1515
- this._staticTitle = title;
1516
- this._messageTitleDisposable.value = undefined;
1517
- break;
1518
- case TitleEventSource.Sequence:
1519
- this._sequence = title;
1520
- if (this._processManager.os === 1 ) {
1521
- if (title.match(/^[a-zA-Z]:\\.+\.[a-zA-Z]{1,3}/)) {
1522
- title = path.win32.parse(title).name;
1523
- this._sequence = title;
1524
- }
1525
- else {
1526
- this._sequence = undefined;
1527
- }
1528
- }
1529
- break;
1530
- }
1531
- this._titleSource = eventSource;
1532
- return title;
1533
- }
1534
- setOverrideDimensions(dimensions, immediate = false) {
1535
- if (this._dimensionsOverride && this._dimensionsOverride.forceExactSize && !dimensions && this._rows === 0 && this._cols === 0) {
1536
- this._cols = this._dimensionsOverride.cols;
1537
- this._rows = this._dimensionsOverride.rows;
1538
- }
1539
- this._dimensionsOverride = dimensions;
1540
- if (immediate) {
1541
- this._resizeNow(true);
1542
- }
1543
- else {
1544
- this._resize();
1545
- }
1546
- }
1547
- async setFixedDimensions() {
1548
- const cols = await this._quickInputService.input({
1549
- title: ( nls.localize('setTerminalDimensionsColumn', "Set Fixed Dimensions: Column")),
1550
- placeHolder: 'Enter a number of columns or leave empty for automatic width',
1551
- validateInput: async (text) => text.length > 0 && !text.match(/^\d+$/) ? { content: 'Enter a number or leave empty size automatically', severity: Severity.Error } : undefined
1552
- });
1553
- if (cols === undefined) {
1554
- return;
1555
- }
1556
- this._fixedCols = this._parseFixedDimension(cols);
1557
- this._labelComputer?.refreshLabel(this);
1558
- this._terminalHasFixedWidth.set(!!this._fixedCols);
1559
- const rows = await this._quickInputService.input({
1560
- title: ( nls.localize('setTerminalDimensionsRow', "Set Fixed Dimensions: Row")),
1561
- placeHolder: 'Enter a number of rows or leave empty for automatic height',
1562
- validateInput: async (text) => text.length > 0 && !text.match(/^\d+$/) ? { content: 'Enter a number or leave empty size automatically', severity: Severity.Error } : undefined
1563
- });
1564
- if (rows === undefined) {
1565
- return;
1566
- }
1567
- this._fixedRows = this._parseFixedDimension(rows);
1568
- this._labelComputer?.refreshLabel(this);
1569
- await this._refreshScrollbar();
1570
- this._resize();
1571
- this.focus();
1572
- }
1573
- _parseFixedDimension(value) {
1574
- if (value === '') {
1575
- return undefined;
1576
- }
1577
- const parsed = parseInt(value);
1578
- if (parsed <= 0) {
1579
- throw new Error(`Could not parse dimension "${value}"`);
1580
- }
1581
- return parsed;
1582
- }
1583
- async toggleSizeToContentWidth() {
1584
- if (!this.xterm?.raw.buffer.active) {
1585
- return;
1586
- }
1587
- if (this._hasScrollBar) {
1588
- this._terminalHasFixedWidth.set(false);
1589
- this._fixedCols = undefined;
1590
- this._fixedRows = undefined;
1591
- this._hasScrollBar = false;
1592
- this._initDimensions();
1593
- await this._resize();
1594
- }
1595
- else {
1596
- const proposedCols = Math.max(this.maxCols, Math.min(this.xterm.getLongestViewportWrappedLineLength(), 5000 ));
1597
- if (proposedCols > this.xterm.raw.cols) {
1598
- this._fixedCols = proposedCols;
1599
- }
1600
- }
1601
- await this._refreshScrollbar();
1602
- this._labelComputer?.refreshLabel(this);
1603
- this.focus();
1604
- }
1605
- _refreshScrollbar() {
1606
- if (this._fixedCols || this._fixedRows) {
1607
- return this._addScrollbar();
1608
- }
1609
- return this._removeScrollbar();
1610
- }
1611
- async _addScrollbar() {
1612
- const charWidth = (this.xterm ? this.xterm.getFont() : this._configHelper.getFont()).charWidth;
1613
- if (!this.xterm?.raw.element || !this._container || !charWidth || !this._fixedCols) {
1614
- return;
1615
- }
1616
- this._wrapperElement.classList.add('fixed-dims');
1617
- this._hasScrollBar = true;
1618
- this._initDimensions();
1619
- this._fixedRows = this._rows - 1;
1620
- await this._resize();
1621
- this._terminalHasFixedWidth.set(true);
1622
- if (!this._horizontalScrollbar) {
1623
- this._horizontalScrollbar = this._register(( new DomScrollableElement(this._wrapperElement, {
1624
- vertical: 2 ,
1625
- horizontal: 1 ,
1626
- useShadows: false,
1627
- scrollYToX: false,
1628
- consumeMouseWheelIfScrollbarIsNeeded: false
1629
- })));
1630
- this._container.appendChild(this._horizontalScrollbar.getDomNode());
1631
- }
1632
- this._horizontalScrollbar.setScrollDimensions({
1633
- width: this.xterm.raw.element.clientWidth,
1634
- scrollWidth: this._fixedCols * charWidth + 40
1635
- });
1636
- this._horizontalScrollbar.getDomNode().style.paddingBottom = '16px';
1637
- if (isWindows) {
1638
- for (let i = this.xterm.raw.buffer.active.viewportY; i < this.xterm.raw.buffer.active.length; i++) {
1639
- const line = this.xterm.raw.buffer.active.getLine(i);
1640
- line._line.isWrapped = false;
1641
- }
1642
- }
1643
- }
1644
- async _removeScrollbar() {
1645
- if (!this._container || !this._horizontalScrollbar) {
1646
- return;
1647
- }
1648
- this._horizontalScrollbar.getDomNode().remove();
1649
- this._horizontalScrollbar.dispose();
1650
- this._horizontalScrollbar = undefined;
1651
- this._wrapperElement.remove();
1652
- this._wrapperElement.classList.remove('fixed-dims');
1653
- this._container.appendChild(this._wrapperElement);
1654
- }
1655
- _setResolvedShellLaunchConfig(shellLaunchConfig) {
1656
- this._shellLaunchConfig.args = shellLaunchConfig.args;
1657
- this._shellLaunchConfig.cwd = shellLaunchConfig.cwd;
1658
- this._shellLaunchConfig.executable = shellLaunchConfig.executable;
1659
- this._shellLaunchConfig.env = shellLaunchConfig.env;
1660
- }
1661
- _onEnvironmentVariableInfoChanged(info) {
1662
- if (info.requiresAction) {
1663
- this.xterm?.raw.textarea?.setAttribute('aria-label', ( nls.localize(
1664
- 'terminalStaleTextBoxAriaLabel',
1665
- "Terminal {0} environment is stale, run the 'Show Environment Information' command for more information",
1666
- this._instanceId
1667
- )));
1668
- }
1669
- this._refreshEnvironmentVariableInfoWidgetState(info);
1670
- }
1671
- async _refreshEnvironmentVariableInfoWidgetState(info) {
1672
- if (!info) {
1673
- this.statusList.remove("relaunch-needed" );
1674
- this.statusList.remove("env-var-info-changes-active" );
1675
- return;
1676
- }
1677
- if (
1678
- info.requiresAction &&
1679
- this._configHelper.config.environmentChangesRelaunch &&
1680
- !this._processManager.hasWrittenData &&
1681
- (!this._shellLaunchConfig.isFeatureTerminal || (this.reconnectionProperties && this._configurationService.getValue('task.reconnection') === true)) &&
1682
- !this._shellLaunchConfig.customPtyImplementation &&
1683
- !this._shellLaunchConfig.isExtensionOwnedTerminal &&
1684
- !this._shellLaunchConfig.attachPersistentProcess &&
1685
- !((this._processManager.remoteAuthority && this._configHelper.config.windowsEnableConpty && (await this._processManager.getBackendOS()) === 1) )) {
1686
- this.relaunch();
1687
- return;
1688
- }
1689
- const workspaceFolder = getWorkspaceForTerminal(this.shellLaunchConfig.cwd, this._workspaceContextService, this._historyService);
1690
- this.statusList.add(info.getStatus({ workspaceFolder }));
1691
- }
1692
- async getInitialCwd() {
1693
- if (!this._initialCwd) {
1694
- this._initialCwd = this._processManager.initialCwd;
1695
- }
1696
- return this._initialCwd;
1697
- }
1698
- async getCwd() {
1699
- if (( this.capabilities.has(0 ))) {
1700
- return this.capabilities.get(0 ).getCwd();
1701
- }
1702
- else if (( this.capabilities.has(1 ))) {
1703
- return this.capabilities.get(1 ).getCwd();
1704
- }
1705
- return this._processManager.initialCwd;
1706
- }
1707
- async _refreshProperty(type) {
1708
- await this.processReady;
1709
- return this._processManager.refreshProperty(type);
1710
- }
1711
- async _updateProperty(type, value) {
1712
- return this._processManager.updateProperty(type, value);
1713
- }
1714
- async rename(title) {
1715
- this._setTitle(title, TitleEventSource.Api);
1716
- }
1717
- _setTitle(title, eventSource) {
1718
- const reset = !title;
1719
- title = this._updateTitleProperties(title, eventSource);
1720
- const titleChanged = title !== this._title;
1721
- this._title = title;
1722
- this._labelComputer?.refreshLabel(this, reset);
1723
- this._setAriaLabel(this.xterm?.raw, this._instanceId, this._title);
1724
- if (titleChanged) {
1725
- this._onTitleChanged.fire(this);
1726
- }
1727
- }
1728
- async changeIcon() {
1729
- const items = [];
1730
- for (const icon of getAllCodicons()) {
1731
- items.push({ label: `$(${icon.id})`, description: `${icon.id}`, icon });
1732
- }
1733
- const result = await this._quickInputService.pick(items, {
1734
- matchOnDescription: true
1735
- });
1736
- if (result) {
1737
- this._icon = result.icon;
1738
- this._onIconChanged.fire({ instance: this, userInitiated: true });
1739
- }
1740
- }
1741
- async changeColor() {
1742
- const icon = this._getIcon();
1743
- if (!icon) {
1744
- return;
1745
- }
1746
- const colorTheme = this._themeService.getColorTheme();
1747
- const standardColors = getStandardColors(colorTheme);
1748
- const styleElement = getColorStyleElement(colorTheme);
1749
- const items = [];
1750
- for (const colorKey of standardColors) {
1751
- const colorClass = getColorClass(colorKey);
1752
- items.push({
1753
- label: `$(${Codicon.circleFilled.id}) ${colorKey.replace('terminal.ansi', '')}`, id: colorKey, description: colorKey, iconClasses: [colorClass]
1754
- });
1755
- }
1756
- items.push({ type: 'separator' });
1757
- const showAllColorsItem = { label: 'Reset to default' };
1758
- items.push(showAllColorsItem);
1759
- document.body.appendChild(styleElement);
1760
- const quickPick = this._quickInputService.createQuickPick();
1761
- quickPick.items = items;
1762
- quickPick.matchOnDescription = true;
1763
- quickPick.show();
1764
- const disposables = [];
1765
- const result = await ( new Promise(r => {
1766
- disposables.push(quickPick.onDidHide(() => r(undefined)));
1767
- disposables.push(quickPick.onDidAccept(() => r(quickPick.selectedItems[0])));
1768
- }));
1769
- dispose(disposables);
1770
- if (result) {
1771
- this.shellLaunchConfig.color = result.id;
1772
- this._onIconChanged.fire({ instance: this, userInitiated: true });
1773
- }
1774
- quickPick.hide();
1775
- document.body.removeChild(styleElement);
1776
- }
1777
- selectPreviousSuggestion() {
1778
- this.xterm?.suggestController?.selectPreviousSuggestion();
1779
- }
1780
- selectPreviousPageSuggestion() {
1781
- this.xterm?.suggestController?.selectPreviousPageSuggestion();
1782
- }
1783
- selectNextSuggestion() {
1784
- this.xterm?.suggestController?.selectNextSuggestion();
1785
- }
1786
- selectNextPageSuggestion() {
1787
- this.xterm?.suggestController?.selectNextPageSuggestion();
1788
- }
1789
- async acceptSelectedSuggestion(suggestion) {
1790
- this.xterm?.suggestController?.acceptSelectedSuggestion(suggestion);
1791
- }
1792
- hideSuggestWidget() {
1793
- this.xterm?.suggestController?.hideSuggestWidget();
1794
- }
1795
- forceScrollbarVisibility() {
1796
- this._wrapperElement.classList.add('force-scrollbar');
1797
- }
1798
- resetScrollbarVisibility() {
1799
- this._wrapperElement.classList.remove('force-scrollbar');
1800
- }
1801
- };
1802
- TerminalInstance.__decorator = ( __decorate([
1803
- debounce(50)
1804
- ], TerminalInstance.prototype, "_fireMaximumDimensionsChanged", null));
1805
- TerminalInstance.__decorator = ( __decorate([
1806
- debounce(1000)
1807
- ], TerminalInstance.prototype, "relaunch", null));
1808
- TerminalInstance.__decorator = ( __decorate([
1809
- debounce(2000)
1810
- ], TerminalInstance.prototype, "_updateProcessCwd", null));
1811
- TerminalInstance.__decorator = ( __decorate([
1812
- debounce(50)
1813
- ], TerminalInstance.prototype, "_resize", null));
1814
- TerminalInstance = TerminalInstance_1 = ( __decorate([
1815
- ( __param(5, IContextKeyService)),
1816
- ( __param(6, IInstantiationService)),
1817
- ( __param(7, ITerminalProfileResolverService)),
1818
- ( __param(8, IPathService)),
1819
- ( __param(9, IKeybindingService)),
1820
- ( __param(10, INotificationService)),
1821
- ( __param(11, IPreferencesService)),
1822
- ( __param(12, IViewsService)),
1823
- ( __param(13, IClipboardService)),
1824
- ( __param(14, IThemeService)),
1825
- ( __param(15, IConfigurationService)),
1826
- ( __param(16, ITerminalLogService)),
1827
- ( __param(17, IDialogService)),
1828
- ( __param(18, IStorageService)),
1829
- ( __param(19, IAccessibilityService)),
1830
- ( __param(20, IProductService)),
1831
- ( __param(21, IQuickInputService)),
1832
- ( __param(22, IWorkbenchEnvironmentService)),
1833
- ( __param(23, IWorkspaceContextService)),
1834
- ( __param(24, IEditorService)),
1835
- ( __param(25, IWorkspaceTrustRequestService)),
1836
- ( __param(26, IHistoryService)),
1837
- ( __param(27, ITelemetryService)),
1838
- ( __param(28, IOpenerService)),
1839
- ( __param(29, ICommandService)),
1840
- ( __param(30, IAudioCueService)),
1841
- ( __param(31, IViewDescriptorService))
1842
- ], TerminalInstance));
1843
- let TerminalInstanceDragAndDropController = class TerminalInstanceDragAndDropController extends Disposable {
1844
- get onDropFile() { return this._onDropFile.event; }
1845
- get onDropTerminal() { return this._onDropTerminal.event; }
1846
- constructor(_container, _layoutService, _viewDescriptorService) {
1847
- super();
1848
- this._container = _container;
1849
- this._layoutService = _layoutService;
1850
- this._viewDescriptorService = _viewDescriptorService;
1851
- this._onDropFile = this._register(( new Emitter()));
1852
- this._onDropTerminal = this._register(( new Emitter()));
1853
- this._register(toDisposable(() => this._clearDropOverlay()));
1854
- }
1855
- _clearDropOverlay() {
1856
- if (this._dropOverlay && this._dropOverlay.parentElement) {
1857
- this._dropOverlay.parentElement.removeChild(this._dropOverlay);
1858
- }
1859
- this._dropOverlay = undefined;
1860
- }
1861
- onDragEnter(e) {
1862
- if (!containsDragType(e, DataTransfers.FILES, DataTransfers.RESOURCES, "Terminals" , CodeDataTransfers.FILES)) {
1863
- return;
1864
- }
1865
- if (!this._dropOverlay) {
1866
- this._dropOverlay = document.createElement('div');
1867
- this._dropOverlay.classList.add('terminal-drop-overlay');
1868
- }
1869
- if (containsDragType(e, "Terminals" )) {
1870
- const side = this._getDropSide(e);
1871
- this._dropOverlay.classList.toggle('drop-before', side === 'before');
1872
- this._dropOverlay.classList.toggle('drop-after', side === 'after');
1873
- }
1874
- if (!this._dropOverlay.parentElement) {
1875
- this._container.appendChild(this._dropOverlay);
1876
- }
1877
- }
1878
- onDragLeave(e) {
1879
- this._clearDropOverlay();
1880
- }
1881
- onDragEnd(e) {
1882
- this._clearDropOverlay();
1883
- }
1884
- onDragOver(e) {
1885
- if (!e.dataTransfer || !this._dropOverlay) {
1886
- return;
1887
- }
1888
- if (containsDragType(e, "Terminals" )) {
1889
- const side = this._getDropSide(e);
1890
- this._dropOverlay.classList.toggle('drop-before', side === 'before');
1891
- this._dropOverlay.classList.toggle('drop-after', side === 'after');
1892
- }
1893
- this._dropOverlay.style.opacity = '1';
1894
- }
1895
- async onDrop(e) {
1896
- this._clearDropOverlay();
1897
- if (!e.dataTransfer) {
1898
- return;
1899
- }
1900
- const terminalResources = getTerminalResourcesFromDragEvent(e);
1901
- if (terminalResources) {
1902
- for (const uri of terminalResources) {
1903
- const side = this._getDropSide(e);
1904
- this._onDropTerminal.fire({ uri, side });
1905
- }
1906
- return;
1907
- }
1908
- let path;
1909
- const rawResources = e.dataTransfer.getData(DataTransfers.RESOURCES);
1910
- if (rawResources) {
1911
- path = ( URI.parse(JSON.parse(rawResources)[0]));
1912
- }
1913
- const rawCodeFiles = e.dataTransfer.getData(CodeDataTransfers.FILES);
1914
- if (!path && rawCodeFiles) {
1915
- path = URI.file(JSON.parse(rawCodeFiles)[0]);
1916
- }
1917
- if (!path && e.dataTransfer.files.length > 0 && e.dataTransfer.files[0].path ) {
1918
- path = URI.file(e.dataTransfer.files[0].path);
1919
- }
1920
- if (!path) {
1921
- return;
1922
- }
1923
- this._onDropFile.fire(path);
1924
- }
1925
- _getDropSide(e) {
1926
- const target = this._container;
1927
- if (!target) {
1928
- return 'after';
1929
- }
1930
- const rect = target.getBoundingClientRect();
1931
- return this._getViewOrientation() === 1
1932
- ? (e.clientX - rect.left < rect.width / 2 ? 'before' : 'after')
1933
- : (e.clientY - rect.top < rect.height / 2 ? 'before' : 'after');
1934
- }
1935
- _getViewOrientation() {
1936
- const panelPosition = this._layoutService.getPanelPosition();
1937
- const terminalLocation = this._viewDescriptorService.getViewLocationById(TERMINAL_VIEW_ID);
1938
- return terminalLocation === 1 && panelPosition === 2
1939
- ? 1
1940
- : 0 ;
1941
- }
1942
- };
1943
- TerminalInstanceDragAndDropController = ( __decorate([
1944
- ( __param(1, IWorkbenchLayoutService)),
1945
- ( __param(2, IViewDescriptorService))
1946
- ], TerminalInstanceDragAndDropController));
1947
- let TerminalLabelComputer = class TerminalLabelComputer extends Disposable {
1948
- get title() { return this._title; }
1949
- get description() { return this._description; }
1950
- constructor(_configHelper, _fileService, _workspaceContextService) {
1951
- super();
1952
- this._configHelper = _configHelper;
1953
- this._fileService = _fileService;
1954
- this._workspaceContextService = _workspaceContextService;
1955
- this._title = '';
1956
- this._description = '';
1957
- this._onDidChangeLabel = this._register(( new Emitter()));
1958
- this.onDidChangeLabel = this._onDidChangeLabel.event;
1959
- }
1960
- refreshLabel(instance, reset) {
1961
- this._title = this.computeLabel(instance, this._configHelper.config.tabs.title, "title" , reset);
1962
- this._description = this.computeLabel(instance, this._configHelper.config.tabs.description, "description" );
1963
- if (this._title !== instance.title || this._description !== instance.description || reset) {
1964
- this._onDidChangeLabel.fire({ title: this._title, description: this._description });
1965
- }
1966
- }
1967
- computeLabel(instance, labelTemplate, labelType, reset) {
1968
- const type = instance.shellLaunchConfig.attachPersistentProcess?.type || instance.shellLaunchConfig.type;
1969
- const templateProperties = {
1970
- cwd: instance.cwd || instance.initialCwd || '',
1971
- cwdFolder: '',
1972
- workspaceFolder: instance.workspaceFolder ? path.basename(instance.workspaceFolder.uri.fsPath) : undefined,
1973
- local: type === 'Local' ? type : undefined,
1974
- process: instance.processName,
1975
- sequence: instance.sequence,
1976
- task: type === 'Task' ? type : undefined,
1977
- fixedDimensions: instance.fixedCols
1978
- ? (instance.fixedRows ? `\u2194${instance.fixedCols} \u2195${instance.fixedRows}` : `\u2194${instance.fixedCols}`)
1979
- : (instance.fixedRows ? `\u2195${instance.fixedRows}` : ''),
1980
- separator: { label: this._configHelper.config.tabs.separator }
1981
- };
1982
- labelTemplate = labelTemplate.trim();
1983
- if (!labelTemplate) {
1984
- return labelType === "title" ? (instance.processName || '') : '';
1985
- }
1986
- if (!reset && instance.staticTitle && labelType === "title" ) {
1987
- return instance.staticTitle.replace(/[\n\r\t]/g, '') || templateProperties.process?.replace(/[\n\r\t]/g, '') || '';
1988
- }
1989
- const detection = ( instance.capabilities.has(0 )) || ( instance.capabilities.has(1 ));
1990
- const folders = this._workspaceContextService.getWorkspace().folders;
1991
- const multiRootWorkspace = folders.length > 1;
1992
- if (templateProperties.cwd && detection && ((!instance.shellLaunchConfig.isFeatureTerminal || labelType === "title") )) {
1993
- const cwdUri = ( URI.from({
1994
- scheme: instance.workspaceFolder?.uri.scheme || Schemas.file,
1995
- path: instance.cwd ? path.resolve(instance.cwd) : undefined
1996
- }));
1997
- let showCwd = false;
1998
- if (multiRootWorkspace) {
1999
- showCwd = true;
2000
- }
2001
- else if (instance.workspaceFolder?.uri) {
2002
- const caseSensitive = this._fileService.hasCapability(instance.workspaceFolder.uri, 1024 );
2003
- showCwd = cwdUri.fsPath.localeCompare(instance.workspaceFolder.uri.fsPath, undefined, { sensitivity: caseSensitive ? 'case' : 'base' }) !== 0;
2004
- }
2005
- if (showCwd) {
2006
- templateProperties.cwdFolder = path.basename(templateProperties.cwd);
2007
- }
2008
- }
2009
- const label = template(labelTemplate, templateProperties).replace(/[\n\r\t]/g, '').trim();
2010
- return label === '' && labelType === "title" ? (instance.processName || '') : label;
2011
- }
2012
- };
2013
- TerminalLabelComputer = ( __decorate([
2014
- ( __param(1, IFileService)),
2015
- ( __param(2, IWorkspaceContextService))
2016
- ], TerminalLabelComputer));
2017
- function parseExitResult(exitCodeOrError, shellLaunchConfig, processState, initialCwd) {
2018
- if (exitCodeOrError === undefined || exitCodeOrError === 0) {
2019
- return { code: exitCodeOrError, message: undefined };
2020
- }
2021
- const code = typeof exitCodeOrError === 'number' ? exitCodeOrError : exitCodeOrError.code;
2022
- let message = undefined;
2023
- switch (typeof exitCodeOrError) {
2024
- case 'number': {
2025
- let commandLine = undefined;
2026
- if (shellLaunchConfig.executable) {
2027
- commandLine = shellLaunchConfig.executable;
2028
- if (typeof shellLaunchConfig.args === 'string') {
2029
- commandLine += ` ${shellLaunchConfig.args}`;
2030
- }
2031
- else if (shellLaunchConfig.args && shellLaunchConfig.args.length) {
2032
- commandLine += ( shellLaunchConfig.args.map(a => ` '${a}'`)).join();
2033
- }
2034
- }
2035
- if (processState === 4 ) {
2036
- if (commandLine) {
2037
- message = ( nls.localize(
2038
- 'launchFailed.exitCodeAndCommandLine',
2039
- "The terminal process \"{0}\" failed to launch (exit code: {1}).",
2040
- commandLine,
2041
- code
2042
- ));
2043
- }
2044
- else {
2045
- message = ( nls.localize(
2046
- 'launchFailed.exitCodeOnly',
2047
- "The terminal process failed to launch (exit code: {0}).",
2048
- code
2049
- ));
2050
- }
2051
- }
2052
- else {
2053
- if (commandLine) {
2054
- message = ( nls.localize(
2055
- 'terminated.exitCodeAndCommandLine',
2056
- "The terminal process \"{0}\" terminated with exit code: {1}.",
2057
- commandLine,
2058
- code
2059
- ));
2060
- }
2061
- else {
2062
- message = ( nls.localize(
2063
- 'terminated.exitCodeOnly',
2064
- "The terminal process terminated with exit code: {0}.",
2065
- code
2066
- ));
2067
- }
2068
- }
2069
- break;
2070
- }
2071
- case 'object': {
2072
- if (( exitCodeOrError.message.toString()).includes('Could not find pty with id')) {
2073
- break;
2074
- }
2075
- let innerMessage = exitCodeOrError.message;
2076
- const conptyError = exitCodeOrError.message.match(/.*error code:\s*(\d+).*$/);
2077
- if (conptyError) {
2078
- const errorCode = conptyError.length > 1 ? parseInt(conptyError[1]) : undefined;
2079
- switch (errorCode) {
2080
- case 5:
2081
- innerMessage = `Access was denied to the path containing your executable "${shellLaunchConfig.executable}". Manage and change your permissions to get this to work`;
2082
- break;
2083
- case 267:
2084
- innerMessage = `Invalid starting directory "${initialCwd}", review your terminal.integrated.cwd setting`;
2085
- break;
2086
- case 1260:
2087
- innerMessage = `Windows cannot open this program because it has been prevented by a software restriction policy. For more information, open Event Viewer or contact your system Administrator`;
2088
- break;
2089
- }
2090
- }
2091
- message = ( nls.localize(
2092
- 'launchFailed.errorMessage',
2093
- "The terminal process failed to launch: {0}.",
2094
- innerMessage
2095
- ));
2096
- break;
2097
- }
2098
- }
2099
- return { code, message };
2100
- }
2101
- export { TerminalInstance, TerminalLabelComputer, parseExitResult };