@codingame/monaco-vscode-api 9.0.2 → 10.0.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 (1271) hide show
  1. package/README.md +2 -0
  2. package/_virtual/semver.js +3 -2
  3. package/_virtual/semver2.js +2 -0
  4. package/api.js +7 -6
  5. package/debugProtocol.d.ts +10 -1
  6. package/extensions.d.ts +0 -2
  7. package/extensions.js +1 -1
  8. package/external/vscode-semver/semver.js +988 -983
  9. package/lifecycle.js +4 -7
  10. package/localExtensionHost.js +11 -7
  11. package/missing-services.js +126 -42
  12. package/monaco.js +42 -10
  13. package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +1 -1
  14. package/package.json +15 -8
  15. package/service-override/textmate.d.ts +1 -0
  16. package/service-override/tools/editor.js +60 -22
  17. package/service-override/tools/views.js +34 -19
  18. package/service-override/treesitter.d.ts +5 -0
  19. package/services.js +4 -5
  20. package/tools/injection.js +4 -1
  21. package/tools.js +4 -2
  22. package/vscode/src/vs/base/browser/browser.js +1 -2
  23. package/vscode/src/vs/base/browser/canIUse.js +4 -10
  24. package/vscode/src/vs/base/browser/dom.js +8 -10
  25. package/vscode/src/vs/base/browser/domObservable.js +3 -2
  26. package/vscode/src/vs/base/browser/formattedTextRenderer.js +24 -36
  27. package/vscode/src/vs/base/browser/keyboardEvent.js +24 -24
  28. package/vscode/src/vs/base/browser/markdownRenderer.js +8 -12
  29. package/vscode/src/vs/base/browser/performance.js +18 -24
  30. package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +1 -1
  31. package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +14 -20
  32. package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.d.ts +2 -2
  33. package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.js +2 -3
  34. package/vscode/src/vs/base/browser/ui/button/button.js +5 -6
  35. package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
  36. package/vscode/src/vs/base/browser/ui/contextview/contextview.js +15 -41
  37. package/vscode/src/vs/base/browser/ui/dialog/dialog.js +12 -13
  38. package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +2 -4
  39. package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +3 -4
  40. package/vscode/src/vs/base/browser/ui/findinput/findInput.js +5 -6
  41. package/vscode/src/vs/base/browser/ui/findinput/findInputToggles.js +3 -3
  42. package/vscode/src/vs/base/browser/ui/findinput/replaceInput.js +6 -7
  43. package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +8 -12
  44. package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.js +3 -4
  45. package/vscode/src/vs/base/browser/ui/inputbox/inputBox.css.js +1 -1
  46. package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +15 -23
  47. package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +1 -1
  48. package/vscode/src/vs/base/browser/ui/list/list.js +1 -12
  49. package/vscode/src/vs/base/browser/ui/list/listView.js +9 -17
  50. package/vscode/src/vs/base/browser/ui/list/listWidget.js +26 -30
  51. package/vscode/src/vs/base/browser/ui/menu/menu.js +15 -17
  52. package/vscode/src/vs/base/browser/ui/menu/menubar.js +13 -13
  53. package/vscode/src/vs/base/browser/ui/resizable/resizable.js +9 -9
  54. package/vscode/src/vs/base/browser/ui/sash/sash.js +16 -28
  55. package/vscode/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.js +4 -5
  56. package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +3 -3
  57. package/vscode/src/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js +2 -3
  58. package/vscode/src/vs/base/browser/ui/scrollbar/verticalScrollbar.js +2 -3
  59. package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +21 -23
  60. package/vscode/src/vs/base/browser/ui/selectBox/selectBoxNative.js +2 -3
  61. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +23 -25
  62. package/vscode/src/vs/base/browser/ui/splitview/splitview.js +27 -33
  63. package/vscode/src/vs/base/browser/ui/table/tableWidget.js +3 -5
  64. package/vscode/src/vs/base/browser/ui/toggle/toggle.js +1 -2
  65. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +3 -3
  66. package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +307 -210
  67. package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +395 -22
  68. package/vscode/src/vs/base/browser/ui/tree/compressedObjectTreeModel.js +25 -32
  69. package/vscode/src/vs/base/browser/ui/tree/dataTree.js +2 -2
  70. package/vscode/src/vs/base/browser/ui/tree/indexTreeModel.js +25 -31
  71. package/vscode/src/vs/base/browser/ui/tree/objectTree.js +9 -5
  72. package/vscode/src/vs/base/browser/ui/tree/objectTreeModel.js +4 -7
  73. package/vscode/src/vs/base/browser/ui/tree/tree.js +1 -13
  74. package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +1 -1
  75. package/vscode/src/vs/base/common/actions.js +1 -1
  76. package/vscode/src/vs/base/common/amd.js +10 -27
  77. package/vscode/src/vs/base/common/arrays.js +1 -7
  78. package/vscode/src/vs/base/common/async.js +14 -25
  79. package/vscode/src/vs/base/common/codicons.d.ts +7 -0
  80. package/vscode/src/vs/base/common/color.d.ts +28 -0
  81. package/vscode/src/vs/base/common/color.js +71 -24
  82. package/vscode/src/vs/base/common/date.js +61 -61
  83. package/vscode/src/vs/base/common/diff/diff.js +10 -15
  84. package/vscode/src/vs/base/common/errorMessage.js +6 -6
  85. package/vscode/src/vs/base/common/errors.js +5 -1
  86. package/vscode/src/vs/base/common/event.d.ts +2 -2
  87. package/vscode/src/vs/base/common/event.js +23 -1
  88. package/vscode/src/vs/base/common/extpath.js +8 -9
  89. package/vscode/src/vs/base/common/filters.js +31 -39
  90. package/vscode/src/vs/base/common/fuzzyScorer.js +9 -10
  91. package/vscode/src/vs/base/common/glob.js +1 -2
  92. package/vscode/src/vs/base/common/hash.js +10 -15
  93. package/vscode/src/vs/base/common/hotReloadHelpers.js +9 -17
  94. package/vscode/src/vs/base/common/htmlContent.js +3 -8
  95. package/vscode/src/vs/base/common/json.js +149 -323
  96. package/vscode/src/vs/base/common/jsonErrorMessages.js +9 -10
  97. package/vscode/src/vs/base/common/jsonFormatter.js +30 -30
  98. package/vscode/src/vs/base/common/keyCodes.js +249 -591
  99. package/vscode/src/vs/base/common/keybindingLabels.js +23 -24
  100. package/vscode/src/vs/base/common/keybindings.js +17 -30
  101. package/vscode/src/vs/base/common/labels.js +11 -12
  102. package/vscode/src/vs/base/common/map.js +67 -20
  103. package/vscode/src/vs/base/common/marshalling.js +4 -5
  104. package/vscode/src/vs/base/common/naturalLanguage/korean.js +129 -213
  105. package/vscode/src/vs/base/common/network.js +2 -2
  106. package/vscode/src/vs/base/common/observableInternal/api.js +3 -1
  107. package/vscode/src/vs/base/common/observableInternal/autorun.js +46 -35
  108. package/vscode/src/vs/base/common/observableInternal/base.js +3 -1
  109. package/vscode/src/vs/base/common/observableInternal/derived.js +55 -40
  110. package/vscode/src/vs/base/common/observableInternal/promise.js +1 -55
  111. package/vscode/src/vs/base/common/observableInternal/utils.js +41 -5
  112. package/vscode/src/vs/base/common/observableInternal/utilsCancellation.js +79 -0
  113. package/vscode/src/vs/base/common/performance.js +1 -3
  114. package/vscode/src/vs/base/common/platform.js +10 -23
  115. package/vscode/src/vs/base/common/processes.js +1 -8
  116. package/vscode/src/vs/base/common/product.d.ts +2 -0
  117. package/vscode/src/vs/base/common/resources.js +3 -4
  118. package/vscode/src/vs/base/common/scrollable.js +1 -7
  119. package/vscode/src/vs/base/common/strings.js +47 -66
  120. package/vscode/src/vs/base/common/ternarySearchTree.js +39 -54
  121. package/vscode/src/vs/base/common/uint.js +5 -14
  122. package/vscode/src/vs/base/common/uri.js +39 -41
  123. package/vscode/src/vs/base/common/uriIpc.js +1 -2
  124. package/vscode/src/vs/base/common/worker/simpleWorker.js +13 -22
  125. package/vscode/src/vs/base/parts/ipc/common/ipc.js +55 -77
  126. package/vscode/src/vs/base/parts/ipc/common/ipc.net.js +51 -108
  127. package/vscode/src/vs/editor/browser/config/charWidthReader.js +4 -10
  128. package/vscode/src/vs/editor/browser/config/editorConfiguration.js +3 -4
  129. package/vscode/src/vs/editor/browser/config/fontMeasurements.js +21 -21
  130. package/vscode/src/vs/editor/browser/controller/editContext/clipboardUtils.js +45 -0
  131. package/vscode/src/vs/editor/browser/controller/editContext/editContextUtils.js +4 -0
  132. package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css.js +4 -0
  133. package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.js +315 -0
  134. package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +35 -0
  135. package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +131 -0
  136. package/vscode/src/vs/editor/browser/controller/editContext/screenReaderUtils.js +107 -0
  137. package/vscode/src/vs/editor/browser/controller/{textAreaHandler.css.js → editContext/textArea/textAreaEditContext.css.js} +1 -1
  138. package/vscode/src/vs/editor/browser/controller/{textAreaHandler.js → editContext/textArea/textAreaEditContext.js} +86 -147
  139. package/vscode/src/vs/editor/browser/controller/{textAreaInput.js → editContext/textArea/textAreaEditContextInput.js} +23 -43
  140. package/vscode/src/vs/editor/browser/controller/{textAreaState.js → editContext/textArea/textAreaEditContextState.js} +8 -54
  141. package/vscode/src/vs/editor/browser/controller/mouseHandler.js +25 -28
  142. package/vscode/src/vs/editor/browser/controller/mouseTarget.js +51 -69
  143. package/vscode/src/vs/editor/browser/controller/pointerHandler.js +4 -6
  144. package/vscode/src/vs/editor/browser/coreCommands.js +203 -220
  145. package/vscode/src/vs/editor/browser/editorBrowser.js +1 -30
  146. package/vscode/src/vs/editor/browser/editorExtensions.js +15 -16
  147. package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlas.js +109 -0
  148. package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlasPage.js +86 -0
  149. package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlasShelfAllocator.js +107 -0
  150. package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.js +258 -0
  151. package/vscode/src/vs/editor/browser/gpu/bufferDirtyTracker.js +32 -0
  152. package/vscode/src/vs/editor/browser/gpu/fullFileRenderStrategy.js +160 -0
  153. package/vscode/src/vs/editor/browser/gpu/fullFileRenderStrategy.wgsl.js +88 -0
  154. package/vscode/src/vs/editor/browser/gpu/gpuDisposable.js +42 -0
  155. package/vscode/src/vs/editor/browser/gpu/gpuUtils.js +44 -0
  156. package/vscode/src/vs/editor/browser/gpu/objectCollectionBuffer.js +117 -0
  157. package/vscode/src/vs/editor/browser/gpu/raster/glyphRasterizer.js +152 -0
  158. package/vscode/src/vs/editor/browser/gpu/rectangleRenderer.js +186 -0
  159. package/vscode/src/vs/editor/browser/gpu/rectangleRenderer.wgsl.js +63 -0
  160. package/vscode/src/vs/editor/browser/gpu/taskQueue.js +69 -0
  161. package/vscode/src/vs/editor/browser/gpu/viewGpuContext.js +86 -0
  162. package/vscode/src/vs/editor/browser/observableCodeEditor.js +7 -39
  163. package/vscode/src/vs/editor/browser/services/abstractCodeEditorService.js +18 -28
  164. package/vscode/src/vs/editor/browser/services/editorWorkerService.js +1 -2
  165. package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +5 -7
  166. package/vscode/src/vs/editor/browser/services/hoverService/hoverWidget.js +61 -69
  167. package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +2 -3
  168. package/vscode/src/vs/editor/browser/services/markerDecorations.js +2 -2
  169. package/vscode/src/vs/editor/browser/stableEditorScroll.js +2 -3
  170. package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.js +21 -27
  171. package/vscode/src/vs/editor/browser/view/renderingContext.js +4 -3
  172. package/vscode/src/vs/editor/browser/view/viewController.js +4 -5
  173. package/vscode/src/vs/editor/browser/view/viewLayer.js +1 -2
  174. package/vscode/src/vs/editor/browser/view/viewOverlays.js +8 -9
  175. package/vscode/src/vs/editor/browser/view/viewPart.js +2 -15
  176. package/vscode/src/vs/editor/browser/view/viewUserInputEvents.js +1 -2
  177. package/vscode/src/vs/editor/browser/view.js +74 -26
  178. package/vscode/src/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -2
  179. package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +17 -20
  180. package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -7
  181. package/vscode/src/vs/editor/browser/viewParts/decorations/decorations.js +2 -3
  182. package/vscode/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +17 -19
  183. package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +10 -16
  184. package/vscode/src/vs/editor/browser/viewParts/indentGuides/indentGuides.js +6 -7
  185. package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +8 -9
  186. package/vscode/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -3
  187. package/vscode/src/vs/editor/browser/viewParts/margin/margin.js +4 -5
  188. package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +28 -34
  189. package/vscode/src/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js +9 -9
  190. package/vscode/src/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js +22 -22
  191. package/vscode/src/vs/editor/browser/viewParts/minimap/minimapCharSheet.js +7 -20
  192. package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +12 -14
  193. package/vscode/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +19 -37
  194. package/vscode/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +6 -7
  195. package/vscode/src/vs/editor/browser/viewParts/rulers/rulers.js +4 -5
  196. package/vscode/src/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +57 -0
  197. package/vscode/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -4
  198. package/vscode/src/vs/editor/browser/viewParts/selections/selections.js +26 -33
  199. package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.js +9 -9
  200. package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursors.js +24 -23
  201. package/vscode/src/vs/editor/browser/viewParts/{lines → viewLines}/rangeUtil.js +3 -4
  202. package/vscode/src/vs/editor/browser/viewParts/{lines → viewLines}/viewLine.js +23 -59
  203. package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +40 -0
  204. package/vscode/src/vs/editor/browser/viewParts/{lines → viewLines}/viewLines.js +33 -36
  205. package/vscode/src/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +299 -0
  206. package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +5 -6
  207. package/vscode/src/vs/editor/browser/viewParts/whitespace/whitespace.js +16 -18
  208. package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorContributions.js +11 -12
  209. package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +105 -113
  210. package/vscode/src/vs/editor/browser/widget/codeEditor/editor.css.js +1 -1
  211. package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +17 -19
  212. package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +40 -40
  213. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +3 -2
  214. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +3 -3
  215. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorSash.js +7 -6
  216. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +15 -17
  217. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +13 -16
  218. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +10 -10
  219. package/vscode/src/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js +18 -19
  220. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
  221. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +13 -12
  222. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +14 -18
  223. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +29 -30
  224. package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +2 -2
  225. package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +52 -53
  226. package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +25 -27
  227. package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +7 -6
  228. package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +4 -4
  229. package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +5 -4
  230. package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
  231. package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +4 -3
  232. package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +3 -2
  233. package/vscode/src/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +5 -3
  234. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
  235. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +8 -7
  236. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.js +16 -8
  237. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget.js +9 -10
  238. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +26 -15
  239. package/vscode/src/vs/editor/common/commands/replaceCommand.js +2 -2
  240. package/vscode/src/vs/editor/common/commands/shiftCommand.js +5 -6
  241. package/vscode/src/vs/editor/common/commands/trimTrailingWhitespaceCommand.js +1 -2
  242. package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +64 -52
  243. package/vscode/src/vs/editor/common/config/editorOptions.d.ts +15 -0
  244. package/vscode/src/vs/editor/common/config/editorOptions.js +619 -732
  245. package/vscode/src/vs/editor/common/config/fontInfo.js +8 -8
  246. package/vscode/src/vs/editor/common/core/characterClassifier.js +3 -8
  247. package/vscode/src/vs/editor/common/core/cursorColumns.js +4 -5
  248. package/vscode/src/vs/editor/common/core/editorColorRegistry.js +72 -72
  249. package/vscode/src/vs/editor/common/core/eolCounter.js +8 -16
  250. package/vscode/src/vs/editor/common/core/offsetEdit.js +248 -0
  251. package/vscode/src/vs/editor/common/core/offsetRange.d.ts +2 -0
  252. package/vscode/src/vs/editor/common/core/offsetRange.js +8 -0
  253. package/vscode/src/vs/editor/common/core/selection.js +7 -12
  254. package/vscode/src/vs/editor/common/core/textEdit.d.ts +22 -1
  255. package/vscode/src/vs/editor/common/core/textEdit.js +49 -3
  256. package/vscode/src/vs/editor/common/core/textLength.d.ts +2 -0
  257. package/vscode/src/vs/editor/common/core/textLength.js +6 -0
  258. package/vscode/src/vs/editor/common/core/wordCharacterClassifier.js +5 -12
  259. package/vscode/src/vs/editor/common/cursor/cursor.js +31 -34
  260. package/vscode/src/vs/editor/common/cursor/cursorAtomicMoveOperations.js +10 -17
  261. package/vscode/src/vs/editor/common/cursor/cursorColumnSelection.js +3 -3
  262. package/vscode/src/vs/editor/common/cursor/cursorDeleteOperations.js +4 -4
  263. package/vscode/src/vs/editor/common/cursor/cursorMoveCommands.js +50 -52
  264. package/vscode/src/vs/editor/common/cursor/cursorMoveOperations.js +12 -14
  265. package/vscode/src/vs/editor/common/cursor/cursorTypeEditOperations.js +32 -34
  266. package/vscode/src/vs/editor/common/cursor/cursorTypeOperations.js +2 -2
  267. package/vscode/src/vs/editor/common/cursor/cursorWordOperations.js +65 -79
  268. package/vscode/src/vs/editor/common/cursor/oneCursor.js +6 -7
  269. package/vscode/src/vs/editor/common/cursorCommon.js +38 -54
  270. package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.js +0 -1
  271. package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +8 -58
  272. package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/lineSequence.js +1 -2
  273. package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.js +30 -43
  274. package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/utils.js +1 -2
  275. package/vscode/src/vs/editor/common/diff/legacyLinesDiffComputer.js +4 -5
  276. package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +5 -1
  277. package/vscode/src/vs/editor/common/diff/rangeMapping.js +80 -1
  278. package/vscode/src/vs/editor/common/editorCommon.js +1 -16
  279. package/vscode/src/vs/editor/common/editorContextKeys.js +46 -47
  280. package/vscode/src/vs/editor/common/encodedTokenAttributes.js +19 -71
  281. package/vscode/src/vs/editor/common/languages/autoIndent.js +6 -8
  282. package/vscode/src/vs/editor/common/languages/languageConfiguration.js +7 -9
  283. package/vscode/src/vs/editor/common/languages/languageConfigurationRegistry.js +2 -2
  284. package/vscode/src/vs/editor/common/languages/linkComputer.js +69 -94
  285. package/vscode/src/vs/editor/common/languages/modesRegistry.js +1 -1
  286. package/vscode/src/vs/editor/common/languages/nullTokenize.js +5 -6
  287. package/vscode/src/vs/editor/common/languages/supports/indentRules.js +5 -12
  288. package/vscode/src/vs/editor/common/languages/supports/indentationLineProcessor.js +3 -4
  289. package/vscode/src/vs/editor/common/languages/supports/onEnter.js +3 -4
  290. package/vscode/src/vs/editor/common/languages/supports/tokenization.js +24 -25
  291. package/vscode/src/vs/editor/common/languages/supports.js +1 -6
  292. package/vscode/src/vs/editor/common/languages/textToHtmlTokenizer.js +12 -14
  293. package/vscode/src/vs/editor/common/languages.d.ts +23 -3
  294. package/vscode/src/vs/editor/common/languages.js +119 -205
  295. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast.js +10 -18
  296. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.js +16 -18
  297. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets.js +4 -4
  298. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees.js +3 -3
  299. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser.js +7 -8
  300. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer.js +33 -15
  301. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/fixBrackets.js +4 -5
  302. package/vscode/src/vs/editor/common/model/editStack.js +5 -7
  303. package/vscode/src/vs/editor/common/model/indentationGuesser.js +6 -7
  304. package/vscode/src/vs/editor/common/model/intervalTree.js +71 -119
  305. package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js +16 -17
  306. package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js +11 -11
  307. package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js +3 -5
  308. package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js +41 -46
  309. package/vscode/src/vs/editor/common/model/textModel.js +27 -35
  310. package/vscode/src/vs/editor/common/model/textModelSearch.js +14 -15
  311. package/vscode/src/vs/editor/common/model/textModelText.js +3 -0
  312. package/vscode/src/vs/editor/common/model/textModelTokens.js +18 -16
  313. package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +10 -14
  314. package/vscode/src/vs/editor/common/model/tokens.js +1 -2
  315. package/vscode/src/vs/editor/common/model/treeSitterTokens.js +10 -4
  316. package/vscode/src/vs/editor/common/model/utils.js +2 -3
  317. package/vscode/src/vs/editor/common/model.d.ts +5 -0
  318. package/vscode/src/vs/editor/common/model.js +1 -46
  319. package/vscode/src/vs/editor/common/modelLineProjectionData.js +10 -10
  320. package/vscode/src/vs/editor/common/services/editorBaseApi.js +5 -5
  321. package/vscode/src/vs/editor/common/services/languageFeatureDebounce.js +2 -2
  322. package/vscode/src/vs/editor/common/services/languageFeaturesService.js +2 -2
  323. package/vscode/src/vs/editor/common/services/languageService.js +4 -4
  324. package/vscode/src/vs/editor/common/services/languagesRegistry.js +3 -4
  325. package/vscode/src/vs/editor/common/services/markerDecorationsService.js +18 -19
  326. package/vscode/src/vs/editor/common/services/modelService.js +8 -9
  327. package/vscode/src/vs/editor/common/services/semanticTokensDto.js +3 -8
  328. package/vscode/src/vs/editor/common/services/semanticTokensProviderStyling.js +15 -27
  329. package/vscode/src/vs/editor/common/services/semanticTokensStylingService.js +2 -2
  330. package/vscode/src/vs/editor/common/services/treeSitterParserService.js +2 -1
  331. package/vscode/src/vs/editor/common/services/treeViewsDndService.js +2 -2
  332. package/vscode/src/vs/editor/common/services/unicodeTextModelHighlighter.js +18 -31
  333. package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +116 -114
  334. package/vscode/src/vs/editor/common/standaloneStrings.js +32 -32
  335. package/vscode/src/vs/editor/common/textModelEvents.js +6 -14
  336. package/vscode/src/vs/editor/common/tokenizationRegistry.js +2 -3
  337. package/vscode/src/vs/editor/common/tokenizationTextModelPart.js +13 -6
  338. package/vscode/src/vs/editor/common/tokens/contiguousTokensStore.js +7 -7
  339. package/vscode/src/vs/editor/common/tokens/lineTokens.d.ts +10 -7
  340. package/vscode/src/vs/editor/common/tokens/lineTokens.js +48 -33
  341. package/vscode/src/vs/editor/common/tokens/sparseMultilineTokens.js +4 -5
  342. package/vscode/src/vs/editor/common/tokens/sparseTokensStore.js +6 -7
  343. package/vscode/src/vs/editor/common/tokens/tokenArray.d.ts +25 -0
  344. package/vscode/src/vs/editor/common/tokens/tokenArray.js +53 -0
  345. package/vscode/src/vs/editor/common/viewEventHandler.js +18 -19
  346. package/vscode/src/vs/editor/common/viewEvents.js +19 -50
  347. package/vscode/src/vs/editor/common/viewLayout/lineDecorations.js +6 -9
  348. package/vscode/src/vs/editor/common/viewLayout/linePart.js +3 -12
  349. package/vscode/src/vs/editor/common/viewLayout/viewLayout.js +23 -25
  350. package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +74 -99
  351. package/vscode/src/vs/editor/common/viewModel/minimapTokensColorTracker.js +2 -3
  352. package/vscode/src/vs/editor/common/viewModel/modelLineProjection.js +23 -7
  353. package/vscode/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +19 -30
  354. package/vscode/src/vs/editor/common/viewModel/overviewZoneManager.js +1 -5
  355. package/vscode/src/vs/editor/common/viewModel/viewModelDecorations.js +9 -11
  356. package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +41 -45
  357. package/vscode/src/vs/editor/common/viewModel/viewModelLines.js +8 -15
  358. package/vscode/src/vs/editor/common/viewModel.js +2 -9
  359. package/vscode/src/vs/editor/common/viewModelEventDispatcher.js +14 -30
  360. package/vscode/src/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +16 -18
  361. package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +18 -21
  362. package/vscode/src/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  363. package/vscode/src/vs/editor/contrib/caretOperations/browser/transpose.js +3 -5
  364. package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +47 -44
  365. package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +3 -4
  366. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +45 -47
  367. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionContributions.js +10 -10
  368. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +14 -16
  369. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver.js +2 -2
  370. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +11 -12
  371. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +18 -20
  372. package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +28 -31
  373. package/vscode/src/vs/editor/contrib/codeAction/common/types.js +4 -10
  374. package/vscode/src/vs/editor/contrib/codelens/browser/codeLensCache.js +6 -6
  375. package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +14 -15
  376. package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.js +2 -4
  377. package/vscode/src/vs/editor/contrib/colorPicker/browser/color.js +2 -23
  378. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorDetector.js +6 -9
  379. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerContribution.js +42 -0
  380. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParticipantUtils.js +51 -0
  381. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerBody.js +71 -0
  382. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +28 -0
  383. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +75 -0
  384. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerInsertButton.js +21 -0
  385. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerSaturationBox.js +101 -0
  386. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerStrip.js +92 -0
  387. package/vscode/src/vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider.js +1 -3
  388. package/vscode/src/vs/editor/contrib/colorPicker/browser/{colorContributions.js → hoverColorPicker/hoverColorPickerContribution.js} +9 -17
  389. package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +131 -0
  390. package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerWidget.js +30 -0
  391. package/vscode/src/vs/editor/contrib/colorPicker/browser/{standaloneColorPickerActions.js → standaloneColorPicker/standaloneColorPickerActions.js} +17 -23
  392. package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerController.js +48 -0
  393. package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +115 -0
  394. package/vscode/src/vs/editor/contrib/colorPicker/browser/{standaloneColorPickerWidget.js → standaloneColorPicker/standaloneColorPickerWidget.js} +22 -69
  395. package/vscode/src/vs/editor/contrib/comment/browser/blockCommentCommand.js +4 -5
  396. package/vscode/src/vs/editor/contrib/comment/browser/comment.js +22 -24
  397. package/vscode/src/vs/editor/contrib/comment/browser/lineCommentCommand.js +12 -20
  398. package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +28 -33
  399. package/vscode/src/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +6 -8
  400. package/vscode/src/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +4 -4
  401. package/vscode/src/vs/editor/contrib/dnd/browser/dnd.js +12 -17
  402. package/vscode/src/vs/editor/contrib/documentSymbols/browser/outlineModel.js +2 -2
  403. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +9 -11
  404. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +19 -20
  405. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  406. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +9 -11
  407. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +6 -7
  408. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +4 -6
  409. package/vscode/src/vs/editor/contrib/editorState/browser/editorState.js +9 -16
  410. package/vscode/src/vs/editor/contrib/editorState/browser/keybindingCancellation.js +5 -7
  411. package/vscode/src/vs/editor/contrib/find/browser/findController.js +101 -111
  412. package/vscode/src/vs/editor/contrib/find/browser/findDecorations.js +8 -8
  413. package/vscode/src/vs/editor/contrib/find/browser/findModel.js +25 -31
  414. package/vscode/src/vs/editor/contrib/find/browser/findOptionsWidget.js +1 -2
  415. package/vscode/src/vs/editor/contrib/find/browser/findState.js +11 -17
  416. package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +71 -72
  417. package/vscode/src/vs/editor/contrib/find/browser/replacePattern.js +19 -25
  418. package/vscode/src/vs/editor/contrib/folding/browser/folding.js +111 -89
  419. package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +22 -23
  420. package/vscode/src/vs/editor/contrib/folding/browser/foldingModel.js +6 -6
  421. package/vscode/src/vs/editor/contrib/folding/browser/foldingRanges.js +14 -20
  422. package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  423. package/vscode/src/vs/editor/contrib/format/browser/format.js +12 -23
  424. package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +19 -21
  425. package/vscode/src/vs/editor/contrib/gotoError/browser/gotoError.js +22 -25
  426. package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +19 -22
  427. package/vscode/src/vs/editor/contrib/gotoError/browser/markerNavigationService.js +2 -2
  428. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +79 -80
  429. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +7 -9
  430. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +8 -10
  431. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +31 -34
  432. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  433. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +7 -11
  434. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +14 -10
  435. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +11 -13
  436. package/vscode/src/vs/editor/contrib/gpu/browser/gpuActions.js +119 -0
  437. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverComputer.js +8 -21
  438. package/vscode/src/vs/editor/contrib/hover/browser/{contentHoverController2.js → contentHoverController.js} +9 -12
  439. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +10 -9
  440. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverTypes.js +8 -8
  441. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +11 -15
  442. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js +31 -39
  443. package/vscode/src/vs/editor/contrib/hover/browser/{marginHoverComputer.js → glyphHoverComputer.js} +6 -20
  444. package/vscode/src/vs/editor/contrib/hover/browser/{marginHoverController.js → glyphHoverController.js} +23 -25
  445. package/vscode/src/vs/editor/contrib/hover/browser/{marginHoverWidget.js → glyphHoverWidget.js} +30 -33
  446. package/vscode/src/vs/editor/contrib/hover/browser/hover.css.js +1 -1
  447. package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +12 -12
  448. package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  449. package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +50 -54
  450. package/vscode/src/vs/editor/contrib/hover/browser/hoverContribution.js +5 -5
  451. package/vscode/src/vs/editor/contrib/hover/browser/hoverOperation.js +64 -66
  452. package/vscode/src/vs/editor/contrib/hover/browser/hoverTypes.js +7 -12
  453. package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +21 -19
  454. package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +11 -13
  455. package/vscode/src/vs/editor/contrib/hover/browser/resizableContentWidget.js +4 -6
  456. package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +13 -12
  457. package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +27 -30
  458. package/vscode/src/vs/editor/contrib/indentation/common/indentation.js +1 -2
  459. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsContribution.js +2 -2
  460. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +101 -42
  461. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +10 -12
  462. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +2 -3
  463. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +88 -35
  464. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +14 -7
  465. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +96 -54
  466. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +12 -13
  467. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +15 -17
  468. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +10 -6
  469. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.js +3 -4
  470. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/{singleTextEdit.js → computeGhostText.js} +3 -23
  471. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +94 -47
  472. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +63 -21
  473. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +12 -0
  474. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineEditsAdapter.js +83 -0
  475. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +6 -3
  476. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/singleTextEditHelpers.js +25 -0
  477. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdaptor.js +3 -3
  478. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +44 -19
  479. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/{ghostTextView.css.js → ghostText/ghostTextView.css.js} +2 -2
  480. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +295 -0
  481. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.css.js +4 -0
  482. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +357 -0
  483. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils.js +70 -0
  484. package/vscode/src/vs/editor/contrib/inlineEdit/browser/commands.js +10 -12
  485. package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +20 -14
  486. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEdit.contribution.js +2 -2
  487. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +21 -17
  488. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +6 -8
  489. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditSideBySideWidget.js +6 -6
  490. package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgress.js +4 -7
  491. package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +4 -7
  492. package/vscode/src/vs/editor/contrib/linesOperations/browser/copyLinesCommand.js +2 -2
  493. package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +63 -65
  494. package/vscode/src/vs/editor/contrib/linesOperations/browser/moveLinesCommand.js +2 -4
  495. package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +12 -16
  496. package/vscode/src/vs/editor/contrib/links/browser/links.js +20 -23
  497. package/vscode/src/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +4 -6
  498. package/vscode/src/vs/editor/contrib/message/browser/messageController.js +10 -15
  499. package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +73 -75
  500. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js +14 -16
  501. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +16 -18
  502. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +8 -9
  503. package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +24 -25
  504. package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +3 -3
  505. package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js +7 -7
  506. package/vscode/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +2 -4
  507. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +8 -10
  508. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +36 -37
  509. package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +5 -6
  510. package/vscode/src/vs/editor/contrib/rename/browser/rename.js +31 -33
  511. package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +17 -21
  512. package/vscode/src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +12 -15
  513. package/vscode/src/vs/editor/contrib/semanticTokens/browser/viewportSemanticTokens.js +2 -2
  514. package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +15 -18
  515. package/vscode/src/vs/editor/contrib/smartSelect/browser/wordSelections.js +2 -3
  516. package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +14 -17
  517. package/vscode/src/vs/editor/contrib/snippet/browser/snippetParser.js +81 -100
  518. package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.js +7 -10
  519. package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  520. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +16 -18
  521. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollContribution.js +2 -2
  522. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +19 -20
  523. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -2
  524. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +2 -3
  525. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +12 -14
  526. package/vscode/src/vs/editor/contrib/suggest/browser/completionModel.js +10 -18
  527. package/vscode/src/vs/editor/contrib/suggest/browser/media/suggest.css.js +1 -1
  528. package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +24 -32
  529. package/vscode/src/vs/editor/contrib/suggest/browser/suggestCommitCharacters.js +2 -4
  530. package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +79 -93
  531. package/vscode/src/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +4 -6
  532. package/vscode/src/vs/editor/contrib/suggest/browser/suggestMemory.js +6 -6
  533. package/vscode/src/vs/editor/contrib/suggest/browser/suggestModel.js +57 -66
  534. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +101 -98
  535. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +12 -8
  536. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +11 -12
  537. package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +2 -3
  538. package/vscode/src/vs/editor/contrib/suggest/browser/wordDistance.js +2 -4
  539. package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  540. package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +8 -10
  541. package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  542. package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +49 -52
  543. package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +11 -12
  544. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +19 -19
  545. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +87 -62
  546. package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +51 -55
  547. package/vscode/src/vs/editor/contrib/wordPartOperations/browser/wordPartOperations.js +19 -21
  548. package/vscode/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.js +9 -12
  549. package/vscode/src/vs/editor/editor.api.d.ts +3 -0
  550. package/vscode/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +4 -6
  551. package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +3 -4
  552. package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditorService.js +4 -5
  553. package/vscode/src/vs/editor/standalone/browser/standaloneLayoutService.js +4 -4
  554. package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +44 -47
  555. package/vscode/src/vs/editor/standalone/browser/standaloneThemeService.js +5 -5
  556. package/vscode/src/vs/editor/standalone/browser/standaloneTreeSitterService.js +4 -0
  557. package/vscode/src/vs/nls.js +1 -1
  558. package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +3 -3
  559. package/vscode/src/vs/platform/accessibility/browser/accessibleView.js +1 -31
  560. package/vscode/src/vs/platform/accessibility/common/accessibility.js +1 -7
  561. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +52 -51
  562. package/vscode/src/vs/platform/action/common/actionCommonCategories.js +6 -6
  563. package/vscode/src/vs/platform/actionWidget/browser/actionList.js +12 -17
  564. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +21 -23
  565. package/vscode/src/vs/platform/actions/browser/actionViewItemService.service.js +3 -0
  566. package/vscode/src/vs/platform/actions/browser/buttonbar.js +3 -3
  567. package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +7 -6
  568. package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +9 -11
  569. package/vscode/src/vs/platform/actions/browser/toolbar.js +34 -17
  570. package/vscode/src/vs/platform/actions/common/actions.contribution.js +0 -1
  571. package/vscode/src/vs/platform/actions/common/actions.d.ts +9 -12
  572. package/vscode/src/vs/platform/actions/common/actions.js +8 -11
  573. package/vscode/src/vs/platform/actions/common/menuResetAction.js +1 -1
  574. package/vscode/src/vs/platform/actions/common/menuService.js +6 -7
  575. package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +20 -0
  576. package/vscode/src/vs/platform/clipboard/common/clipboardService.service.d.ts +5 -0
  577. package/vscode/src/vs/platform/configuration/common/configuration.js +8 -8
  578. package/vscode/src/vs/platform/configuration/common/configurationModels.js +3 -4
  579. package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +31 -31
  580. package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +3 -5
  581. package/vscode/src/vs/platform/contextkey/common/contextkey.js +89 -109
  582. package/vscode/src/vs/platform/contextkey/common/contextkeys.js +10 -10
  583. package/vscode/src/vs/platform/contextkey/common/scanner.js +74 -99
  584. package/vscode/src/vs/platform/contextview/browser/contextView.service.d.ts +2 -2
  585. package/vscode/src/vs/platform/contextview/browser/contextViewService.js +6 -6
  586. package/vscode/src/vs/platform/dialogs/common/dialogs.js +9 -9
  587. package/vscode/src/vs/platform/dialogs/common/dialogs.service.d.ts +1 -1
  588. package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
  589. package/vscode/src/vs/platform/editor/common/editor.js +1 -14
  590. package/vscode/src/vs/platform/extensionManagement/common/extensionEnablementService.js +8 -9
  591. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +80 -127
  592. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.service.d.ts +1 -1
  593. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.js +3 -3
  594. package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
  595. package/vscode/src/vs/platform/extensionManagement/common/extensionStorage.js +12 -13
  596. package/vscode/src/vs/platform/extensionManagement/common/extensionsProfileScannerService.js +9 -16
  597. package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +35 -35
  598. package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +4 -6
  599. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +42 -27
  600. package/vscode/src/vs/platform/extensions/common/extensions.js +1 -22
  601. package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +2 -7
  602. package/vscode/src/vs/platform/externalServices/common/serviceMachineId.js +2 -3
  603. package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +6 -6
  604. package/vscode/src/vs/platform/files/common/files.js +25 -53
  605. package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.js +10 -10
  606. package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +8 -9
  607. package/vscode/src/vs/platform/hover/browser/hover.js +1 -2
  608. package/vscode/src/vs/platform/instantiation/common/extensions.js +1 -6
  609. package/vscode/src/vs/platform/instantiation/common/instantiation.d.ts +1 -1
  610. package/vscode/src/vs/platform/instantiation/common/instantiationService.js +5 -12
  611. package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +10 -11
  612. package/vscode/src/vs/platform/keybinding/common/keybindingResolver.js +9 -15
  613. package/vscode/src/vs/platform/keybinding/common/keybindingsRegistry.js +4 -12
  614. package/vscode/src/vs/platform/keybinding/common/resolvedKeybindingItem.js +1 -2
  615. package/vscode/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js +63 -64
  616. package/vscode/src/vs/platform/languagePacks/common/languagePacks.js +1 -1
  617. package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +3 -3
  618. package/vscode/src/vs/platform/list/browser/listService.js +31 -38
  619. package/vscode/src/vs/platform/log/common/bufferLog.js +4 -3
  620. package/vscode/src/vs/platform/markers/common/markers.js +4 -9
  621. package/vscode/src/vs/platform/observable/common/platformObservableUtils.js +4 -2
  622. package/vscode/src/vs/platform/observable/common/wrapInHotClass.js +25 -0
  623. package/vscode/src/vs/platform/observable/common/wrapInReloadableClass.js +8 -43
  624. package/vscode/src/vs/platform/opener/browser/link.js +1 -2
  625. package/vscode/src/vs/platform/product/common/product.js +1 -1
  626. package/vscode/src/vs/platform/progress/common/progress.js +1 -10
  627. package/vscode/src/vs/platform/quickinput/browser/quickInput.js +16 -17
  628. package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +32 -33
  629. package/vscode/src/vs/platform/quickinput/browser/quickInputBox.js +2 -3
  630. package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +10 -11
  631. package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +9 -12
  632. package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +2 -3
  633. package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +4 -5
  634. package/vscode/src/vs/platform/quickinput/common/quickInput.js +1 -7
  635. package/vscode/src/vs/platform/remote/common/remoteAgentConnection.js +15 -29
  636. package/vscode/src/vs/platform/remote/common/remoteAuthorityResolver.js +3 -8
  637. package/vscode/src/vs/platform/request/common/request.js +31 -26
  638. package/vscode/src/vs/platform/storage/common/storage.js +22 -22
  639. package/vscode/src/vs/platform/telemetry/common/telemetry.js +1 -15
  640. package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +12 -12
  641. package/vscode/src/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +41 -0
  642. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.js +345 -0
  643. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/terminalCommand.js +296 -0
  644. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +761 -0
  645. package/vscode/src/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +29 -0
  646. package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +22 -0
  647. package/vscode/src/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +48 -0
  648. package/vscode/src/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +94 -0
  649. package/vscode/src/vs/platform/terminal/common/environmentVariable.js +7 -0
  650. package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.js +196 -0
  651. package/vscode/src/vs/platform/terminal/common/terminal.js +1 -155
  652. package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +40 -0
  653. package/vscode/src/vs/platform/terminal/common/terminalProfiles.js +107 -0
  654. package/vscode/src/vs/platform/terminal/common/terminalRecorder.js +67 -0
  655. package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +346 -0
  656. package/vscode/src/vs/platform/theme/common/colorUtils.js +17 -27
  657. package/vscode/src/vs/platform/theme/common/colors/baseColors.js +17 -17
  658. package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +9 -9
  659. package/vscode/src/vs/platform/theme/common/colors/editorColors.js +93 -93
  660. package/vscode/src/vs/platform/theme/common/colors/inputColors.js +45 -45
  661. package/vscode/src/vs/platform/theme/common/colors/listColors.js +36 -36
  662. package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
  663. package/vscode/src/vs/platform/theme/common/colors/miscColors.js +8 -8
  664. package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  665. package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
  666. package/vscode/src/vs/platform/theme/common/iconRegistry.js +5 -5
  667. package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +42 -42
  668. package/vscode/src/vs/platform/tunnel/common/tunnel.js +1 -3
  669. package/vscode/src/vs/platform/undoRedo/common/undoRedo.js +1 -6
  670. package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +44 -49
  671. package/vscode/src/vs/platform/update/common/update.js +10 -37
  672. package/vscode/src/vs/platform/uriIdentity/common/uriIdentityService.js +1 -3
  673. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +2 -0
  674. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +146 -145
  675. package/vscode/src/vs/platform/userDataSync/common/abstractSynchronizer.js +60 -58
  676. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +14 -81
  677. package/vscode/src/vs/platform/userDataSync/common/userDataSyncMachines.js +6 -7
  678. package/vscode/src/vs/platform/userDataSync/common/userDataSyncStoreService.js +48 -49
  679. package/vscode/src/vs/platform/window/common/window.js +7 -23
  680. package/vscode/src/vs/platform/workspace/common/workspace.js +2 -8
  681. package/vscode/src/vs/workbench/api/browser/statusBarService.js +10 -16
  682. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +27 -14
  683. package/vscode/src/vs/workbench/api/common/extHost.common.services.js +28 -28
  684. package/vscode/src/vs/workbench/api/common/extHost.protocol.js +3 -65
  685. package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +9 -4
  686. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +56 -29
  687. package/vscode/src/vs/workbench/api/common/extHostCodeMapper.js +47 -0
  688. package/vscode/src/vs/workbench/api/common/extHostComments.js +17 -18
  689. package/vscode/src/vs/workbench/api/common/extHostConfiguration.js +9 -10
  690. package/vscode/src/vs/workbench/api/common/extHostCustomEditors.js +6 -11
  691. package/vscode/src/vs/workbench/api/common/extHostDebugService.js +45 -36
  692. package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
  693. package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +19 -19
  694. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +4 -4
  695. package/vscode/src/vs/workbench/api/common/extHostFileSystem.js +15 -17
  696. package/vscode/src/vs/workbench/api/common/extHostFileSystemConsumer.js +2 -2
  697. package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +67 -30
  698. package/vscode/src/vs/workbench/api/common/extHostFileSystemInfo.js +1 -2
  699. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +117 -94
  700. package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +46 -9
  701. package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +43 -35
  702. package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
  703. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +13 -11
  704. package/vscode/src/vs/workbench/api/common/extHostNotebookEditor.js +11 -6
  705. package/vscode/src/vs/workbench/api/common/extHostSCM.js +38 -30
  706. package/vscode/src/vs/workbench/api/common/extHostSearch.js +7 -0
  707. package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
  708. package/vscode/src/vs/workbench/api/common/extHostTask.js +2 -2
  709. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +6 -7
  710. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +7 -9
  711. package/vscode/src/vs/workbench/api/common/extHostTestItem.js +7 -7
  712. package/vscode/src/vs/workbench/api/common/extHostTesting.js +27 -33
  713. package/vscode/src/vs/workbench/api/common/extHostTimeline.js +1 -2
  714. package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +1 -1
  715. package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +5 -5
  716. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +218 -193
  717. package/vscode/src/vs/workbench/api/common/extHostTypes.js +24 -26
  718. package/vscode/src/vs/workbench/api/common/extHostWebviewMessaging.js +22 -23
  719. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +14 -13
  720. package/vscode/src/vs/workbench/api/common/extensionHostMain.js +1 -1
  721. package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +14 -14
  722. package/vscode/src/vs/workbench/api/worker/extHost.worker.services.js +3 -3
  723. package/vscode/src/vs/workbench/api/worker/extensionHostWorker.js +4 -4
  724. package/vscode/src/vs/workbench/browser/actions/developerActions.js +39 -42
  725. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +220 -215
  726. package/vscode/src/vs/workbench/browser/actions/textInputActions.js +8 -9
  727. package/vscode/src/vs/workbench/browser/actions/widgetNavigationCommands.js +7 -8
  728. package/vscode/src/vs/workbench/browser/actions/windowActions.js +46 -47
  729. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +37 -38
  730. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +4 -4
  731. package/vscode/src/vs/workbench/browser/codeeditor.js +9 -12
  732. package/vscode/src/vs/workbench/browser/editor.js +2 -2
  733. package/vscode/src/vs/workbench/browser/labels.js +2 -2
  734. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.d.ts +2 -1
  735. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +19 -22
  736. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +34 -20
  737. package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +1 -1
  738. package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +3 -3
  739. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +69 -70
  740. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +44 -45
  741. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsModel.js +2 -4
  742. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +1 -1
  743. package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +17 -18
  744. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution._autosave.js +2 -2
  745. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +316 -323
  746. package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +27 -30
  747. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +100 -100
  748. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +54 -58
  749. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +14 -15
  750. package/vscode/src/vs/workbench/browser/parts/editor/editorPane.js +3 -4
  751. package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +24 -11
  752. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +12 -14
  753. package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +11 -12
  754. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +81 -87
  755. package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +21 -13
  756. package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +17 -19
  757. package/vscode/src/vs/workbench/browser/parts/editor/media/editorplaceholder.css.js +1 -1
  758. package/vscode/src/vs/workbench/browser/parts/editor/media/editortabscontrol.css.js +1 -1
  759. package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +23 -26
  760. package/vscode/src/vs/workbench/browser/parts/editor/noEditorTabsControl.js +9 -2
  761. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +16 -17
  762. package/vscode/src/vs/workbench/browser/parts/editor/singleEditorTabsControl.js +4 -4
  763. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +2 -3
  764. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +8 -10
  765. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +11 -13
  766. package/vscode/src/vs/workbench/browser/parts/editor/textResourceEditor.js +4 -7
  767. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +25 -30
  768. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.js +17 -17
  769. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsAlerts.js +5 -6
  770. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +14 -16
  771. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +43 -44
  772. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsList.js +6 -6
  773. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsStatus.js +19 -21
  774. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +10 -14
  775. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +9 -10
  776. package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.d.ts +4 -2
  777. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +1 -1
  778. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +62 -61
  779. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.d.ts +3 -1
  780. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +57 -61
  781. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +16 -23
  782. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -1
  783. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +8 -9
  784. package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +9 -10
  785. package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +1 -0
  786. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +18 -16
  787. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +54 -63
  788. package/vscode/src/vs/workbench/browser/quickaccess.js +1 -1
  789. package/vscode/src/vs/workbench/browser/window.js +18 -19
  790. package/vscode/src/vs/workbench/browser/workbench.contribution.js +257 -249
  791. package/vscode/src/vs/workbench/common/configuration.js +28 -30
  792. package/vscode/src/vs/workbench/common/contextkeys.js +70 -70
  793. package/vscode/src/vs/workbench/common/contributions.js +22 -23
  794. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +17 -17
  795. package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +27 -27
  796. package/vscode/src/vs/workbench/common/editor/editorInput.js +7 -8
  797. package/vscode/src/vs/workbench/common/editor/editorOptions.js +4 -5
  798. package/vscode/src/vs/workbench/common/editor/filteredEditorGroupModel.js +6 -7
  799. package/vscode/src/vs/workbench/common/editor/resourceEditorInput.js +12 -13
  800. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +8 -8
  801. package/vscode/src/vs/workbench/common/editor/textEditorModel.js +3 -4
  802. package/vscode/src/vs/workbench/common/editor.js +5 -53
  803. package/vscode/src/vs/workbench/common/memento.js +9 -10
  804. package/vscode/src/vs/workbench/common/notifications.js +11 -32
  805. package/vscode/src/vs/workbench/common/theme.js +156 -156
  806. package/vscode/src/vs/workbench/common/views.js +8 -8
  807. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +170 -197
  808. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +66 -70
  809. package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +8 -11
  810. package/vscode/src/vs/workbench/contrib/callHierarchy/common/callHierarchy.js +1 -6
  811. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +161 -36
  812. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +35 -21
  813. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +17 -14
  814. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +51 -33
  815. package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +1 -1
  816. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +11 -17
  817. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +2 -2
  818. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.js +78 -28
  819. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.js +1 -1
  820. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +1 -1
  821. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +2 -2
  822. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.js +1 -1
  823. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +29 -15
  824. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +3 -3
  825. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +107 -34
  826. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +2 -5
  827. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInvocationPart.js +68 -0
  828. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +1 -1
  829. package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.js +206 -0
  830. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditingService.js +751 -0
  831. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +3 -4
  832. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +1 -1
  833. package/vscode/src/vs/workbench/contrib/chat/browser/chatImagePaste.js +73 -0
  834. package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.js +228 -0
  835. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +469 -103
  836. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +91 -96
  837. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +25 -27
  838. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownRenderer.js +21 -2
  839. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +175 -70
  840. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
  841. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +46 -44
  842. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatContextAttachments.js +53 -0
  843. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +2 -2
  844. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.js +532 -0
  845. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
  846. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css.js +1 -1
  847. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatInlineAnchorWidget.css.js +4 -0
  848. package/vscode/src/vs/workbench/contrib/chat/common/annotations.js +32 -3
  849. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +18 -7
  850. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.service.js +3 -0
  851. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +6 -6
  852. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +34 -19
  853. package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.service.js +3 -0
  854. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +44 -74
  855. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +8 -4
  856. package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +4 -2
  857. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +2 -5
  858. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +20 -8
  859. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActions.contribution.js +1 -2
  860. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +17 -17
  861. package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +10 -10
  862. package/vscode/src/vs/workbench/contrib/codeActions/common/documentationExtensionPoint.js +6 -6
  863. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +14 -18
  864. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +10 -11
  865. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +6 -5
  866. package/vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js +2 -2
  867. package/vscode/src/vs/workbench/contrib/codeEditor/browser/editorLineNumberMenu.js +5 -7
  868. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +17 -14
  869. package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.css.js +4 -0
  870. package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +545 -0
  871. package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +5 -5
  872. package/vscode/src/vs/workbench/contrib/codeEditor/browser/menuPreventer.js +4 -5
  873. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +11 -15
  874. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +16 -19
  875. package/vscode/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.js +2 -1
  876. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +3 -5
  877. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +3 -3
  878. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +5 -6
  879. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
  880. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
  881. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +19 -22
  882. package/vscode/src/vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch.js +2 -2
  883. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +7 -7
  884. package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +24 -6
  885. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +20 -11
  886. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +45 -35
  887. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +14 -10
  888. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +9 -5
  889. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +13 -7
  890. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +4 -5
  891. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +9 -11
  892. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +27 -26
  893. package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +33 -22
  894. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +54 -29
  895. package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +1 -1
  896. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +17 -24
  897. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +39 -28
  898. package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +38 -36
  899. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +7 -7
  900. package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +11 -12
  901. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +13 -9
  902. package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +1 -2
  903. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +17 -17
  904. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +43 -45
  905. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +46 -47
  906. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +185 -147
  907. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +5 -6
  908. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +370 -0
  909. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -12
  910. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +96 -100
  911. package/vscode/src/vs/workbench/contrib/debug/browser/debugExpressionRenderer.js +160 -0
  912. package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +57 -57
  913. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +3 -3
  914. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +21 -17
  915. package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
  916. package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +6 -6
  917. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +4 -40
  918. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +28 -33
  919. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +2 -3
  920. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
  921. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +1 -1
  922. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +14 -6
  923. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +357 -330
  924. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +24 -24
  925. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -24
  926. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +5 -5
  927. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +3 -4
  928. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +5 -7
  929. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -4
  930. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +5 -6
  931. package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +3 -4
  932. package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +16 -23
  933. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +16 -19
  934. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditorTracker.js +2 -3
  935. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +30 -32
  936. package/vscode/src/vs/workbench/contrib/files/browser/explorerFileContrib.js +2 -6
  937. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +21 -23
  938. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +93 -96
  939. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands._save.js +28 -29
  940. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
  941. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +44 -46
  942. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +77 -77
  943. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +9 -9
  944. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +3 -3
  945. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +4 -4
  946. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +132 -25
  947. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +74 -58
  948. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +43 -49
  949. package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +4 -4
  950. package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +2 -3
  951. package/vscode/src/vs/workbench/contrib/files/common/explorerFileNestingTrie.js +8 -15
  952. package/vscode/src/vs/workbench/contrib/files/common/explorerModel.js +3 -5
  953. package/vscode/src/vs/workbench/contrib/files/common/files.js +16 -39
  954. package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +4 -5
  955. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +26 -27
  956. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +10 -20
  957. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +3 -3
  958. package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +8 -10
  959. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +77 -71
  960. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +110 -153
  961. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +18 -25
  962. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +19 -6
  963. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +30 -41
  964. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +20 -20
  965. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +19 -13
  966. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +1 -1
  967. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +1 -2
  968. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +62 -84
  969. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +4 -5
  970. package/vscode/src/vs/workbench/contrib/list/browser/list.contribution.js +2 -2
  971. package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
  972. package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
  973. package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +3 -2
  974. package/vscode/src/vs/workbench/contrib/markdown/browser/markedGfmHeadingIdPlugin.js +39 -0
  975. package/vscode/src/vs/workbench/contrib/markers/common/markers.js +2 -7
  976. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +8 -6
  977. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +45 -47
  978. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +3 -2
  979. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +2 -3
  980. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +3 -3
  981. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +26 -30
  982. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +8 -13
  983. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +13 -24
  984. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +5 -5
  985. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +32 -31
  986. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +8 -8
  987. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +1 -1
  988. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +13 -13
  989. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +17 -7
  990. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +12 -12
  991. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +21 -23
  992. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +6 -7
  993. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +17 -18
  994. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +8 -4
  995. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +5 -5
  996. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +4 -5
  997. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +37 -48
  998. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +24 -26
  999. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +4 -1
  1000. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +347 -127
  1001. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +12 -14
  1002. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +230 -67
  1003. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +59 -0
  1004. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +13 -10
  1005. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +7 -6
  1006. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +148 -37
  1007. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +2 -0
  1008. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +125 -71
  1009. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +13 -6
  1010. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +36 -0
  1011. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +1 -1
  1012. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +32 -13
  1013. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +1 -21
  1014. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +18 -20
  1015. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +56 -49
  1016. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +28 -28
  1017. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +13 -14
  1018. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +48 -36
  1019. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +3 -2
  1020. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +3 -3
  1021. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +3 -5
  1022. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +4 -4
  1023. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +26 -35
  1024. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +22 -16
  1025. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +2 -3
  1026. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +8 -14
  1027. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +4 -4
  1028. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +10 -11
  1029. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +3 -3
  1030. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +5 -5
  1031. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +6 -6
  1032. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +25 -33
  1033. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +14 -14
  1034. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +8 -4
  1035. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +8 -5
  1036. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +1 -2
  1037. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +3 -3
  1038. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +3 -3
  1039. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +2 -3
  1040. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +2 -2
  1041. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +12 -11
  1042. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +2 -3
  1043. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +4 -5
  1044. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +39 -49
  1045. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +2 -2
  1046. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +2 -2
  1047. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +1 -1
  1048. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +32 -21
  1049. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +85 -0
  1050. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +21 -35
  1051. package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +2 -1
  1052. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +17 -19
  1053. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +4 -7
  1054. package/vscode/src/vs/workbench/contrib/outline/browser/outline.js +2 -8
  1055. package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +6 -8
  1056. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +12 -12
  1057. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +32 -36
  1058. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +50 -50
  1059. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +24 -31
  1060. package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +6 -4
  1061. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +21 -21
  1062. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +39 -36
  1063. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +17 -17
  1064. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +77 -79
  1065. package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +2 -2
  1066. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +45 -49
  1067. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistory.js +250 -0
  1068. package/vscode/src/vs/workbench/contrib/scm/browser/util.js +131 -0
  1069. package/vscode/src/vs/workbench/contrib/scm/common/scm.js +1 -13
  1070. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +11 -12
  1071. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +2 -2
  1072. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +1 -1
  1073. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +29 -32
  1074. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +418 -266
  1075. package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +11 -11
  1076. package/vscode/src/vs/workbench/contrib/search/common/cellSearchModel.js +2 -3
  1077. package/vscode/src/vs/workbench/contrib/search/common/constants.js +1 -50
  1078. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +1 -1
  1079. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +2 -2
  1080. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +8 -9
  1081. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +5 -11
  1082. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +22 -25
  1083. package/vscode/src/vs/workbench/contrib/snippets/browser/tabCompletion.js +11 -11
  1084. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +31 -37
  1085. package/vscode/src/vs/workbench/contrib/tags/browser/workspaceTagsService.js +0 -1
  1086. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
  1087. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +5 -5
  1088. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +14 -83
  1089. package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +119 -0
  1090. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +2 -0
  1091. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +1 -27
  1092. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +1770 -0
  1093. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +40 -0
  1094. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +9 -12
  1095. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalExtensions.js +25 -0
  1096. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.js +72 -0
  1097. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +16 -0
  1098. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +2218 -0
  1099. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +8 -9
  1100. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +628 -0
  1101. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +143 -0
  1102. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +61 -0
  1103. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +315 -0
  1104. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.js +121 -0
  1105. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.js +39 -0
  1106. package/vscode/src/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
  1107. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +498 -0
  1108. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +123 -0
  1109. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +55 -0
  1110. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +571 -0
  1111. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +0 -6
  1112. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +732 -0
  1113. package/vscode/src/vs/workbench/contrib/terminal/common/history.js +378 -0
  1114. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +62 -165
  1115. package/vscode/src/vs/workbench/contrib/terminal/common/terminalClipboard.js +80 -0
  1116. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -23
  1117. package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +141 -89
  1118. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +282 -0
  1119. package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +28 -28
  1120. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/common/terminal.accessibility.js +2 -10
  1121. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css.js +4 -0
  1122. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +46 -0
  1123. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +302 -0
  1124. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +203 -0
  1125. package/vscode/src/vs/workbench/contrib/terminalContrib/find/common/terminal.find.js +9 -20
  1126. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/media/stickyScroll.css.js +4 -0
  1127. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +22 -0
  1128. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution.js +97 -0
  1129. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +372 -0
  1130. package/vscode/src/vs/workbench/contrib/terminalContrib/suggest/common/terminal.suggest.js +9 -20
  1131. package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +3 -4
  1132. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.d.ts +1 -1
  1133. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +3 -1
  1134. package/vscode/src/vs/workbench/contrib/testing/common/testId.js +18 -29
  1135. package/vscode/src/vs/workbench/contrib/testing/common/testItemCollection.js +41 -51
  1136. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +24 -35
  1137. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +39 -99
  1138. package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +14 -15
  1139. package/vscode/src/vs/workbench/contrib/timeline/common/timeline.js +2 -1
  1140. package/vscode/src/vs/workbench/contrib/typeHierarchy/common/typeHierarchy.js +1 -6
  1141. package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainService.js +1 -2
  1142. package/vscode/src/vs/workbench/contrib/url/browser/trustedDomains.js +9 -10
  1143. package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +3 -3
  1144. package/vscode/src/vs/workbench/contrib/webview/browser/webview.js +2 -9
  1145. package/vscode/src/vs/workbench/contrib/webview/common/webview.js +3 -4
  1146. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +3 -4
  1147. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +1 -2
  1148. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +1 -2
  1149. package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +2 -2
  1150. package/vscode/src/vs/workbench/services/activity/common/activity.d.ts +10 -1
  1151. package/vscode/src/vs/workbench/services/activity/common/activity.js +29 -6
  1152. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +4 -6
  1153. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +5 -6
  1154. package/vscode/src/vs/workbench/services/configuration/common/configuration.js +7 -8
  1155. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +16 -16
  1156. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +1 -1
  1157. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +15 -15
  1158. package/vscode/src/vs/workbench/services/driver/browser/driver.js +1 -2
  1159. package/vscode/src/vs/workbench/services/editor/browser/codeEditorService.js +1 -3
  1160. package/vscode/src/vs/workbench/services/editor/browser/editorService.js +26 -29
  1161. package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +0 -1
  1162. package/vscode/src/vs/workbench/services/editor/common/editorGroupColumn.js +5 -5
  1163. package/vscode/src/vs/workbench/services/editor/common/editorGroupFinder.js +5 -5
  1164. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.js +2 -2
  1165. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +2 -7
  1166. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.d.ts +6 -5
  1167. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js +2 -21
  1168. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +13 -7
  1169. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +6 -7
  1170. package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +2 -8
  1171. package/vscode/src/vs/workbench/services/extensions/common/extensionHostKind.js +10 -16
  1172. package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.js +7 -18
  1173. package/vscode/src/vs/workbench/services/extensions/common/extensionManifestPropertiesService.js +0 -1
  1174. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocation.js +3 -4
  1175. package/vscode/src/vs/workbench/services/extensions/common/extensions.js +7 -18
  1176. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +82 -82
  1177. package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +64 -103
  1178. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +20 -36
  1179. package/vscode/src/vs/workbench/services/language/common/languageService.js +29 -30
  1180. package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +27 -71
  1181. package/vscode/src/vs/workbench/services/lifecycle/common/lifecycle.js +8 -28
  1182. package/vscode/src/vs/workbench/services/lifecycle/common/lifecycleService.js +11 -11
  1183. package/vscode/src/vs/workbench/services/notebook/common/notebookDocumentService.js +12 -2
  1184. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +2 -2
  1185. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +7 -7
  1186. package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +2 -2
  1187. package/vscode/src/vs/workbench/services/progress/browser/progressIndicator.js +18 -20
  1188. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +6 -1
  1189. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +20 -16
  1190. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.service.d.ts +3 -3
  1191. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.d.ts +1 -0
  1192. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +34 -22
  1193. package/vscode/src/vs/workbench/services/search/common/fileSearchManager.js +11 -7
  1194. package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +15 -7
  1195. package/vscode/src/vs/workbench/services/search/common/replace.js +11 -12
  1196. package/vscode/src/vs/workbench/services/search/common/search.js +1 -32
  1197. package/vscode/src/vs/workbench/services/search/common/searchExtConversionTypes.js +1 -0
  1198. package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +3 -3
  1199. package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.js +1 -6
  1200. package/vscode/src/vs/workbench/services/storage/browser/storageService.js +13 -13
  1201. package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +9 -9
  1202. package/vscode/src/vs/workbench/services/textMate/common/TMHelper.js +107 -0
  1203. package/vscode/src/vs/workbench/services/textfile/common/encoding.js +2 -6
  1204. package/vscode/src/vs/workbench/services/textfile/common/textEditorService.js +0 -1
  1205. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +30 -32
  1206. package/vscode/src/vs/workbench/services/textfile/common/textfiles.js +3 -27
  1207. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +24 -24
  1208. package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +933 -0
  1209. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +15 -15
  1210. package/vscode/src/vs/workbench/services/themes/common/plistParser.js +400 -0
  1211. package/vscode/src/vs/workbench/services/themes/common/textMateScopeMatcher.js +120 -0
  1212. package/vscode/src/vs/workbench/services/themes/common/themeCompatibility.js +76 -0
  1213. package/vscode/src/vs/workbench/services/treeSitter/browser/treeSitterTokenizationFeature.service.js +3 -0
  1214. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +2 -2
  1215. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorModel.js +2 -2
  1216. package/vscode/src/vs/workbench/services/userDataProfile/browser/iconSelectBox.js +11 -12
  1217. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -3
  1218. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
  1219. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +16 -22
  1220. package/vscode/src/vs/workbench/services/views/browser/viewsService.js +51 -43
  1221. package/vscode/src/vs/workbench/services/views/common/viewsService.service.d.ts +1 -0
  1222. package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +2 -3
  1223. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +46 -59
  1224. package/vscode/src/vs/workbench/services/workingCopy/common/workingCopy.js +1 -7
  1225. package/vscode/src/vs/workbench/services/workspaces/common/workspaceTrust.js +14 -17
  1226. package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +6 -0
  1227. package/vscode-dts/vscode.proposed.aiTextSearchProviderNew.d.ts +5 -0
  1228. package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +30 -3
  1229. package/vscode-dts/vscode.proposed.chatProvider.d.ts +4 -0
  1230. package/vscode-dts/vscode.proposed.contribChatParticipantDetection.d.ts +1 -0
  1231. package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemMenu.d.ts +1 -2
  1232. package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +8 -2
  1233. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +1 -1
  1234. package/vscode-dts/vscode.proposed.lmTools.d.ts +47 -9
  1235. package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +43 -1
  1236. package/vscode-dts/vscode.proposed.notebookReplDocument.d.ts +17 -4
  1237. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +35 -33
  1238. package/workbench.js +3 -1
  1239. package/vscode/src/vs/base/common/charCode.js +0 -296
  1240. package/vscode/src/vs/base/common/hotReload.js +0 -77
  1241. package/vscode/src/vs/base/common/marshallingIds.js +0 -22
  1242. package/vscode/src/vs/editor/common/cursorEvents.js +0 -11
  1243. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +0 -265
  1244. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +0 -376
  1245. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostTextView.js +0 -271
  1246. package/vscode/src/vs/editor/contrib/inlineEdits/browser/commands.js +0 -125
  1247. package/vscode/src/vs/editor/contrib/inlineEdits/browser/consts.js +0 -8
  1248. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEdits.contribution.js +0 -9
  1249. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsController.js +0 -82
  1250. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsModel.js +0 -240
  1251. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.css.js +0 -4
  1252. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.js +0 -322
  1253. package/vscode/src/vs/platform/label/common/label.js +0 -7
  1254. package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.js +0 -14
  1255. package/vscode/src/vs/platform/workspace/common/workspaceTrust.js +0 -7
  1256. package/vscode/src/vs/workbench/contrib/accessibility/common/accessibilityCommands.js +0 -16
  1257. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +0 -164
  1258. package/vscode/src/vs/workbench/contrib/comments/common/commentCommandIds.js +0 -15
  1259. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +0 -271
  1260. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +0 -175
  1261. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +0 -4
  1262. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.js +0 -7
  1263. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +0 -720
  1264. package/vscode/src/vs/workbench/contrib/testing/common/constants.js +0 -106
  1265. package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +0 -11
  1266. package/vscode/src/vs/workbench/services/outline/browser/outline.js +0 -22
  1267. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopy.js +0 -6
  1268. package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemChangesMenu.d.ts +0 -7
  1269. package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemGroupMenu.d.ts +0 -10
  1270. /package/vscode/src/vs/editor/browser/viewParts/{lines → viewLines}/domReadingContext.js +0 -0
  1271. /package/vscode/src/vs/editor/browser/viewParts/{lines → viewLines}/viewLines.css.js +0 -0
@@ -0,0 +1,2218 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { isFirefox } from '../../../../base/browser/browser.js';
3
+ import { BrowserFeatures } from '../../../../base/browser/canIUse.js';
4
+ import { DataTransfers } from '../../../../base/browser/dnd.js';
5
+ import { isAncestorOfActiveElement, getWindow, Dimension, addDisposableListener, DragAndDropObserver, getActiveWindow, disposableWindowInterval, isHTMLElement } from '../../../../base/browser/dom.js';
6
+ import { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';
7
+ import { DomScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement.js';
8
+ import { AutoOpenBarrier, Promises, disposableTimeout, timeout } from '../../../../base/common/async.js';
9
+ import { Codicon } from '../../../../base/common/codicons.js';
10
+ import { debounce } from '../../../../base/common/decorators.js';
11
+ import { onUnexpectedError, ErrorNoTelemetry } from '../../../../base/common/errors.js';
12
+ import { Emitter } from '../../../../base/common/event.js';
13
+ import { template } from '../../../../base/common/labels.js';
14
+ import { Disposable, MutableDisposable, toDisposable, dispose, DisposableStore } from '../../../../base/common/lifecycle.js';
15
+ import { Schemas } from '../../../../base/common/network.js';
16
+ import { win32, basename, resolve } from '../../../../base/common/path.js';
17
+ import { OS, isMacintosh, isWindows } from '../../../../base/common/platform.js';
18
+ import { URI } from '../../../../base/common/uri.js';
19
+ import { TabFocus } from '../../../../editor/browser/config/tabFocus.js';
20
+ import { localize } from '../../../../nls.js';
21
+ import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.service.js';
22
+ import { AccessibilitySignal } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';
23
+ import { IAccessibilitySignalService } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.service.js';
24
+ import { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.service.js';
25
+ import { ICommandService } from '../../../../platform/commands/common/commands.service.js';
26
+ import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
27
+ import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
28
+ import { containsDragType, CodeDataTransfers } from '../../../../platform/dnd/browser/dnd.js';
29
+ import { IFileService } from '../../../../platform/files/common/files.service.js';
30
+ import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
31
+ import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js';
32
+ import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
33
+ import '../../../../platform/notification/common/notification.js';
34
+ import { INotificationService } from '../../../../platform/notification/common/notification.service.js';
35
+ import { IOpenerService } from '../../../../platform/opener/common/opener.service.js';
36
+ import { IProductService } from '../../../../platform/product/common/productService.service.js';
37
+ import { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.service.js';
38
+ import { IStorageService } from '../../../../platform/storage/common/storage.service.js';
39
+ import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.service.js';
40
+ import { TerminalCapabilityStoreMultiplexer } from '../../../../platform/terminal/common/capabilities/terminalCapabilityStore.js';
41
+ import { deserializeEnvironmentVariableCollections } from '../../../../platform/terminal/common/environmentVariableShared.js';
42
+ import { TitleEventSource, TerminalExitReason, TerminalLocation } from '../../../../platform/terminal/common/terminal.js';
43
+ import { ITerminalLogService } from '../../../../platform/terminal/common/terminal.service.js';
44
+ import { formatMessageForTerminal } from '../../../../platform/terminal/common/terminalStrings.js';
45
+ import '../../../../platform/theme/common/colorUtils.js';
46
+ import '../../../../platform/theme/common/colors/baseColors.js';
47
+ import '../../../../platform/theme/common/colors/chartsColors.js';
48
+ import { editorBackground } from '../../../../platform/theme/common/colors/editorColors.js';
49
+ import '../../../../platform/theme/common/colors/inputColors.js';
50
+ import '../../../../platform/theme/common/colors/listColors.js';
51
+ import '../../../../platform/theme/common/colors/menuColors.js';
52
+ import '../../../../platform/theme/common/colors/minimapColors.js';
53
+ import '../../../../platform/theme/common/colors/miscColors.js';
54
+ import '../../../../platform/theme/common/colors/quickpickColors.js';
55
+ import '../../../../platform/theme/common/colors/searchColors.js';
56
+ import { getIconRegistry } from '../../../../platform/theme/common/iconRegistry.js';
57
+ import { IThemeService } from '../../../../platform/theme/common/themeService.service.js';
58
+ import { IWorkspaceContextService } from '../../../../platform/workspace/common/workspace.service.js';
59
+ import { IWorkspaceTrustRequestService } from '../../../../platform/workspace/common/workspaceTrust.service.js';
60
+ import { PANEL_BACKGROUND, SIDE_BAR_BACKGROUND } from '../../../common/theme.js';
61
+ import { IViewDescriptorService } from '../../../common/views.service.js';
62
+ import { IViewsService } from '../../../services/views/common/viewsService.service.js';
63
+ import { ITerminalConfigurationService } from './terminal.service.js';
64
+ import { TerminalLaunchHelpAction } from './terminalActions.js';
65
+ import { TerminalEditorInput } from './terminalEditorInput.js';
66
+ import { TerminalExtensionsRegistry } from './terminalExtensions.js';
67
+ import { getStandardColors, createColorStyleElement, getColorClass } from './terminalIcon.js';
68
+ import { TerminalProcessManager } from './terminalProcessManager.js';
69
+ import { showRunRecentQuickPick } from './terminalRunRecentQuickPick.js';
70
+ import { TerminalStatusList } from './terminalStatusList.js';
71
+ import { getTerminalUri, getTerminalResourcesFromDragEvent } from './terminalUri.js';
72
+ import { TerminalWidgetManager } from './widgets/widgetManager.js';
73
+ import { LineDataEventAddon } from './xterm/lineDataEventAddon.js';
74
+ import { getXtermScaledDimensions, XtermTerminal } from './xterm/xtermTerminal.js';
75
+ import { getDirectoryHistory, getCommandHistory } from '../common/history.js';
76
+ import { TERMINAL_VIEW_ID, TERMINAL_CREATION_COMMANDS, DEFAULT_COMMANDS_TO_SKIP_SHELL } from '../common/terminal.js';
77
+ import { ITerminalProfileResolverService } from '../common/terminal.service.js';
78
+ import { TERMINAL_BACKGROUND_COLOR } from '../common/terminalColorRegistry.js';
79
+ import { TerminalContextKeys } from '../common/terminalContextKey.js';
80
+ import { preparePathForShell, getWorkspaceForTerminal } from '../common/terminalEnvironment.js';
81
+ import { IEditorService } from '../../../services/editor/common/editorService.service.js';
82
+ import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.service.js';
83
+ import { IHistoryService } from '../../../services/history/common/history.service.js';
84
+ import { isHorizontal } from '../../../services/layout/browser/layoutService.js';
85
+ import { IWorkbenchLayoutService } from '../../../services/layout/browser/layoutService.service.js';
86
+ import { IPathService } from '../../../services/path/common/pathService.service.js';
87
+ import { IPreferencesService } from '../../../services/preferences/common/preferences.service.js';
88
+ import { terminalStrings } from '../common/terminalStrings.js';
89
+ import { shouldPasteTerminalText } from '../common/terminalClipboard.js';
90
+ import { TerminalIconPicker } from './terminalIconPicker.js';
91
+ import { IHostService } from '../../../services/host/browser/host.service.js';
92
+ import { TerminalResizeDebouncer } from './terminalResizeDebouncer.js';
93
+ import { openContextMenu } from './terminalContextMenu.js';
94
+ import { IContextMenuService } from '../../../../platform/contextview/browser/contextView.service.js';
95
+ import Severity$1 from '../../../../base/common/severity.js';
96
+ var TerminalInstance_1;
97
+ let xtermConstructor;
98
+ const shellIntegrationSupportedShellTypes = [
99
+ "bash" ,
100
+ "zsh" ,
101
+ "pwsh" ,
102
+ "python" ,
103
+ ];
104
+ let TerminalInstance = class TerminalInstance extends Disposable {
105
+ static { TerminalInstance_1 = this; }
106
+ static { this._instanceIdCounter = 1; }
107
+ get domElement() { return this._wrapperElement; }
108
+ get usedShellIntegrationInjection() { return this._usedShellIntegrationInjection; }
109
+ pauseInputEvents(barrier) {
110
+ this._pauseInputEventBarrier = barrier;
111
+ }
112
+ get store() {
113
+ return this._store;
114
+ }
115
+ get extEnvironmentVariableCollection() { return this._processManager.extEnvironmentVariableCollection; }
116
+ get waitOnExit() { return this._shellLaunchConfig.attachPersistentProcess?.waitOnExit || this._shellLaunchConfig.waitOnExit; }
117
+ set waitOnExit(value) {
118
+ this._shellLaunchConfig.waitOnExit = value;
119
+ }
120
+ get target() { return this._target; }
121
+ set target(value) {
122
+ this._target = value;
123
+ this._onDidChangeTarget.fire(value);
124
+ }
125
+ get instanceId() { return this._instanceId; }
126
+ get resource() { return this._resource; }
127
+ get cols() {
128
+ if (this._fixedCols !== undefined) {
129
+ return this._fixedCols;
130
+ }
131
+ if (this._dimensionsOverride && this._dimensionsOverride.cols) {
132
+ if (this._dimensionsOverride.forceExactSize) {
133
+ return this._dimensionsOverride.cols;
134
+ }
135
+ return Math.min(Math.max(this._dimensionsOverride.cols, 2), this._cols);
136
+ }
137
+ return this._cols;
138
+ }
139
+ get rows() {
140
+ if (this._fixedRows !== undefined) {
141
+ return this._fixedRows;
142
+ }
143
+ if (this._dimensionsOverride && this._dimensionsOverride.rows) {
144
+ if (this._dimensionsOverride.forceExactSize) {
145
+ return this._dimensionsOverride.rows;
146
+ }
147
+ return Math.min(Math.max(this._dimensionsOverride.rows, 2), this._rows);
148
+ }
149
+ return this._rows;
150
+ }
151
+ get isDisposed() { return this._store.isDisposed; }
152
+ get fixedCols() { return this._fixedCols; }
153
+ get fixedRows() { return this._fixedRows; }
154
+ get maxCols() { return this._cols; }
155
+ get maxRows() { return this._rows; }
156
+ get processId() { return this._processManager.shellProcessId; }
157
+ get processReady() { return this._processManager.ptyProcessReady; }
158
+ get hasChildProcesses() { return this.shellLaunchConfig.attachPersistentProcess?.hasChildProcesses || this._processManager.hasChildProcesses; }
159
+ get reconnectionProperties() { return this.shellLaunchConfig.attachPersistentProcess?.reconnectionProperties || this.shellLaunchConfig.reconnectionProperties; }
160
+ get areLinksReady() { return this._areLinksReady; }
161
+ get initialDataEvents() { return this._initialDataEvents; }
162
+ get exitCode() { return this._exitCode; }
163
+ get exitReason() { return this._exitReason; }
164
+ get hadFocusOnExit() { return this._hadFocusOnExit; }
165
+ get isTitleSetByProcess() { return !!this._messageTitleDisposable.value; }
166
+ get shellLaunchConfig() { return this._shellLaunchConfig; }
167
+ get shellType() { return this._shellType; }
168
+ get os() { return this._processManager.os; }
169
+ get isRemote() { return this._processManager.remoteAuthority !== undefined; }
170
+ get remoteAuthority() { return this._processManager.remoteAuthority; }
171
+ get hasFocus() { return isAncestorOfActiveElement(this._wrapperElement); }
172
+ get title() { return this._title; }
173
+ get titleSource() { return this._titleSource; }
174
+ get icon() { return this._getIcon(); }
175
+ get color() { return this._getColor(); }
176
+ get processName() { return this._processName; }
177
+ get sequence() { return this._sequence; }
178
+ get staticTitle() { return this._staticTitle; }
179
+ get workspaceFolder() { return this._workspaceFolder; }
180
+ get cwd() { return this._cwd; }
181
+ get initialCwd() { return this._initialCwd; }
182
+ get description() {
183
+ if (this._description) {
184
+ return this._description;
185
+ }
186
+ const type = this.shellLaunchConfig.attachPersistentProcess?.type || this.shellLaunchConfig.type;
187
+ switch (type) {
188
+ case 'Task': return terminalStrings.typeTask;
189
+ case 'Local': return terminalStrings.typeLocal;
190
+ default: return undefined;
191
+ }
192
+ }
193
+ get userHome() { return this._userHome; }
194
+ get shellIntegrationNonce() { return this._processManager.shellIntegrationNonce; }
195
+ get injectedArgs() { return this._injectedArgs; }
196
+ constructor(_terminalShellTypeContextKey, _terminalInRunCommandPicker, _shellLaunchConfig, _contextKeyService, _contextMenuService, instantiationService, _terminalConfigurationService, _terminalProfileResolverService, _pathService, _keybindingService, _notificationService, _preferencesService, _viewsService, _clipboardService, _themeService, _configurationService, _logService, _storageService, _accessibilityService, _productService, _quickInputService, workbenchEnvironmentService, _workspaceContextService, _editorService, _workspaceTrustRequestService, _historyService, _telemetryService, _openerService, _commandService, _accessibilitySignalService, _viewDescriptorService) {
197
+ super();
198
+ this._terminalShellTypeContextKey = _terminalShellTypeContextKey;
199
+ this._terminalInRunCommandPicker = _terminalInRunCommandPicker;
200
+ this._shellLaunchConfig = _shellLaunchConfig;
201
+ this._contextKeyService = _contextKeyService;
202
+ this._contextMenuService = _contextMenuService;
203
+ this._terminalConfigurationService = _terminalConfigurationService;
204
+ this._terminalProfileResolverService = _terminalProfileResolverService;
205
+ this._pathService = _pathService;
206
+ this._keybindingService = _keybindingService;
207
+ this._notificationService = _notificationService;
208
+ this._preferencesService = _preferencesService;
209
+ this._viewsService = _viewsService;
210
+ this._clipboardService = _clipboardService;
211
+ this._themeService = _themeService;
212
+ this._configurationService = _configurationService;
213
+ this._logService = _logService;
214
+ this._storageService = _storageService;
215
+ this._accessibilityService = _accessibilityService;
216
+ this._productService = _productService;
217
+ this._quickInputService = _quickInputService;
218
+ this._workspaceContextService = _workspaceContextService;
219
+ this._editorService = _editorService;
220
+ this._workspaceTrustRequestService = _workspaceTrustRequestService;
221
+ this._historyService = _historyService;
222
+ this._telemetryService = _telemetryService;
223
+ this._openerService = _openerService;
224
+ this._commandService = _commandService;
225
+ this._accessibilitySignalService = _accessibilitySignalService;
226
+ this._viewDescriptorService = _viewDescriptorService;
227
+ this._contributions = ( (new Map()));
228
+ this._latestXtermWriteData = 0;
229
+ this._latestXtermParseData = 0;
230
+ this._title = '';
231
+ this._titleSource = TitleEventSource.Process;
232
+ this._cols = 0;
233
+ this._rows = 0;
234
+ this._cwd = undefined;
235
+ this._initialCwd = undefined;
236
+ this._injectedArgs = undefined;
237
+ this._layoutSettingsChanged = true;
238
+ this._areLinksReady = false;
239
+ this._initialDataEventsListener = this._register(( (new MutableDisposable())));
240
+ this._initialDataEvents = [];
241
+ this._messageTitleDisposable = this._register(( (new MutableDisposable())));
242
+ this._dndObserver = this._register(( (new MutableDisposable())));
243
+ this._processName = '';
244
+ this._usedShellIntegrationInjection = false;
245
+ this.capabilities = this._register(( (new TerminalCapabilityStoreMultiplexer())));
246
+ this.disableLayout = false;
247
+ this._onExit = ( (new Emitter()));
248
+ this.onExit = this._onExit.event;
249
+ this._onDisposed = this._register(( (new Emitter())));
250
+ this.onDisposed = this._onDisposed.event;
251
+ this._onProcessIdReady = this._register(( (new Emitter())));
252
+ this.onProcessIdReady = this._onProcessIdReady.event;
253
+ this._onProcessReplayComplete = this._register(( (new Emitter())));
254
+ this.onProcessReplayComplete = this._onProcessReplayComplete.event;
255
+ this._onTitleChanged = this._register(( (new Emitter())));
256
+ this.onTitleChanged = this._onTitleChanged.event;
257
+ this._onIconChanged = this._register(( (new Emitter())));
258
+ this.onIconChanged = this._onIconChanged.event;
259
+ this._onWillData = this._register(( (new Emitter())));
260
+ this.onWillData = this._onWillData.event;
261
+ this._onData = this._register(( (new Emitter())));
262
+ this.onData = this._onData.event;
263
+ this._onBinary = this._register(( (new Emitter())));
264
+ this.onBinary = this._onBinary.event;
265
+ this._onLineData = this._register(( (new Emitter({
266
+ onDidAddFirstListener: () => this._onLineDataSetup()
267
+ }))));
268
+ this.onLineData = this._onLineData.event;
269
+ this._onRequestExtHostProcess = this._register(( (new Emitter())));
270
+ this.onRequestExtHostProcess = this._onRequestExtHostProcess.event;
271
+ this._onDimensionsChanged = this._register(( (new Emitter())));
272
+ this.onDimensionsChanged = this._onDimensionsChanged.event;
273
+ this._onMaximumDimensionsChanged = this._register(( (new Emitter())));
274
+ this.onMaximumDimensionsChanged = this._onMaximumDimensionsChanged.event;
275
+ this._onDidFocus = this._register(( (new Emitter())));
276
+ this.onDidFocus = this._onDidFocus.event;
277
+ this._onDidRequestFocus = this._register(( (new Emitter())));
278
+ this.onDidRequestFocus = this._onDidRequestFocus.event;
279
+ this._onDidBlur = this._register(( (new Emitter())));
280
+ this.onDidBlur = this._onDidBlur.event;
281
+ this._onDidInputData = this._register(( (new Emitter())));
282
+ this.onDidInputData = this._onDidInputData.event;
283
+ this._onDidChangeSelection = this._register(( (new Emitter())));
284
+ this.onDidChangeSelection = this._onDidChangeSelection.event;
285
+ this._onRequestAddInstanceToGroup = this._register(( (new Emitter())));
286
+ this.onRequestAddInstanceToGroup = this._onRequestAddInstanceToGroup.event;
287
+ this._onDidChangeHasChildProcesses = this._register(( (new Emitter())));
288
+ this.onDidChangeHasChildProcesses = this._onDidChangeHasChildProcesses.event;
289
+ this._onDidExecuteText = this._register(( (new Emitter())));
290
+ this.onDidExecuteText = this._onDidExecuteText.event;
291
+ this._onDidChangeTarget = this._register(( (new Emitter())));
292
+ this.onDidChangeTarget = this._onDidChangeTarget.event;
293
+ this._onDidSendText = this._register(( (new Emitter())));
294
+ this.onDidSendText = this._onDidSendText.event;
295
+ this._onDidChangeShellType = this._register(( (new Emitter())));
296
+ this.onDidChangeShellType = this._onDidChangeShellType.event;
297
+ this._onDidChangeVisibility = this._register(( (new Emitter())));
298
+ this.onDidChangeVisibility = this._onDidChangeVisibility.event;
299
+ this._onWillPaste = this._register(( (new Emitter())));
300
+ this.onWillPaste = this._onWillPaste.event;
301
+ this._onDidPaste = this._register(( (new Emitter())));
302
+ this.onDidPaste = this._onDidPaste.event;
303
+ this._overrideCopySelection = undefined;
304
+ this._wrapperElement = document.createElement('div');
305
+ this._wrapperElement.classList.add('terminal-wrapper');
306
+ this._widgetManager = this._register(instantiationService.createInstance(TerminalWidgetManager));
307
+ this._skipTerminalCommands = [];
308
+ this._isExiting = false;
309
+ this._hadFocusOnExit = false;
310
+ this._isVisible = false;
311
+ this._instanceId = TerminalInstance_1._instanceIdCounter++;
312
+ this._hasHadInput = false;
313
+ this._fixedRows = _shellLaunchConfig.attachPersistentProcess?.fixedDimensions?.rows;
314
+ this._fixedCols = _shellLaunchConfig.attachPersistentProcess?.fixedDimensions?.cols;
315
+ this._resource = getTerminalUri(this._workspaceContextService.getWorkspace().id, this.instanceId, this.title);
316
+ if (this._shellLaunchConfig.attachPersistentProcess?.hideFromUser) {
317
+ this._shellLaunchConfig.hideFromUser = this._shellLaunchConfig.attachPersistentProcess.hideFromUser;
318
+ }
319
+ if (this._shellLaunchConfig.attachPersistentProcess?.isFeatureTerminal) {
320
+ this._shellLaunchConfig.isFeatureTerminal = this._shellLaunchConfig.attachPersistentProcess.isFeatureTerminal;
321
+ }
322
+ if (this._shellLaunchConfig.attachPersistentProcess?.type) {
323
+ this._shellLaunchConfig.type = this._shellLaunchConfig.attachPersistentProcess.type;
324
+ }
325
+ if (this.shellLaunchConfig.cwd) {
326
+ const cwdUri = typeof this._shellLaunchConfig.cwd === 'string' ? ( (URI.from({
327
+ scheme: Schemas.file,
328
+ path: this._shellLaunchConfig.cwd
329
+ }))) : this._shellLaunchConfig.cwd;
330
+ if (cwdUri) {
331
+ this._workspaceFolder = this._workspaceContextService.getWorkspaceFolder(cwdUri) ?? undefined;
332
+ }
333
+ }
334
+ if (!this._workspaceFolder) {
335
+ const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot();
336
+ this._workspaceFolder = activeWorkspaceRootUri ? this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri) ?? undefined : undefined;
337
+ }
338
+ const scopedContextKeyService = this._register(_contextKeyService.createScoped(this._wrapperElement));
339
+ this._scopedContextKeyService = scopedContextKeyService;
340
+ this._scopedInstantiationService = this._register(instantiationService.createChild(( (new ServiceCollection([IContextKeyService, scopedContextKeyService])))));
341
+ this._terminalFocusContextKey = TerminalContextKeys.focus.bindTo(scopedContextKeyService);
342
+ this._terminalHasFixedWidth = TerminalContextKeys.terminalHasFixedWidth.bindTo(scopedContextKeyService);
343
+ this._terminalHasTextContextKey = TerminalContextKeys.textSelected.bindTo(scopedContextKeyService);
344
+ this._terminalAltBufferActiveContextKey = TerminalContextKeys.altBufferActive.bindTo(scopedContextKeyService);
345
+ this._terminalShellIntegrationEnabledContextKey = TerminalContextKeys.terminalShellIntegrationEnabled.bindTo(scopedContextKeyService);
346
+ this._logService.trace(`terminalInstance#ctor (instanceId: ${this.instanceId})`, this._shellLaunchConfig);
347
+ this._register(this.capabilities.onDidAddCapabilityType(e => {
348
+ this._logService.debug('terminalInstance added capability', e);
349
+ if (e === 0 ) {
350
+ this.capabilities.get(0 )?.onDidChangeCwd(e => {
351
+ this._cwd = e;
352
+ this._setTitle(this.title, TitleEventSource.Config);
353
+ this._scopedInstantiationService.invokeFunction(getDirectoryHistory)?.add(e, { remoteAuthority: this.remoteAuthority });
354
+ });
355
+ }
356
+ else if (e === 2 ) {
357
+ const commandCapability = this.capabilities.get(2 );
358
+ commandCapability?.onCommandFinished(e => {
359
+ if (e.command.trim().length > 0) {
360
+ this._scopedInstantiationService.invokeFunction(getCommandHistory)?.add(e.command, { shellType: this._shellType });
361
+ }
362
+ });
363
+ }
364
+ }));
365
+ this._register(this.capabilities.onDidRemoveCapabilityType(e => this._logService.debug('terminalInstance removed capability', e)));
366
+ if (!this.shellLaunchConfig.executable && !workbenchEnvironmentService.remoteAuthority) {
367
+ this._terminalProfileResolverService.resolveIcon(this._shellLaunchConfig, OS);
368
+ }
369
+ this._icon = _shellLaunchConfig.attachPersistentProcess?.icon || _shellLaunchConfig.icon;
370
+ if (this.shellLaunchConfig.customPtyImplementation) {
371
+ this._setTitle(this._shellLaunchConfig.name, TitleEventSource.Api);
372
+ }
373
+ this.statusList = this._register(this._scopedInstantiationService.createInstance(TerminalStatusList));
374
+ this._initDimensions();
375
+ this._processManager = this._createProcessManager();
376
+ this._containerReadyBarrier = ( (new AutoOpenBarrier(100 )));
377
+ this._attachBarrier = ( (new AutoOpenBarrier(1000)));
378
+ this._xtermReadyPromise = this._createXterm();
379
+ this._xtermReadyPromise.then(async () => {
380
+ await this._containerReadyBarrier.wait();
381
+ if (!this.shellLaunchConfig.customPtyImplementation && this._terminalConfigurationService.config.shellIntegration?.enabled && !this.shellLaunchConfig.executable) {
382
+ const os = await this._processManager.getBackendOS();
383
+ const defaultProfile = (await this._terminalProfileResolverService.getDefaultProfile({ remoteAuthority: this.remoteAuthority, os }));
384
+ this.shellLaunchConfig.executable = defaultProfile.path;
385
+ this.shellLaunchConfig.args = defaultProfile.args;
386
+ if (this.shellLaunchConfig.isExtensionOwnedTerminal) {
387
+ this.shellLaunchConfig.icon ??= defaultProfile.icon;
388
+ this.shellLaunchConfig.color ??= defaultProfile.color;
389
+ this.shellLaunchConfig.env ??= defaultProfile.env;
390
+ }
391
+ else {
392
+ this.shellLaunchConfig.icon = defaultProfile.icon;
393
+ this.shellLaunchConfig.color = defaultProfile.color;
394
+ this.shellLaunchConfig.env = defaultProfile.env;
395
+ }
396
+ }
397
+ await this._createProcess();
398
+ if (this.shellLaunchConfig.attachPersistentProcess) {
399
+ this._cwd = this.shellLaunchConfig.attachPersistentProcess.cwd;
400
+ this._setTitle(this.shellLaunchConfig.attachPersistentProcess.title, this.shellLaunchConfig.attachPersistentProcess.titleSource);
401
+ this.setShellType(this.shellType);
402
+ }
403
+ if (this._fixedCols) {
404
+ await this._addScrollbar();
405
+ }
406
+ }).catch((err) => {
407
+ if (!this.isDisposed) {
408
+ throw err;
409
+ }
410
+ });
411
+ this._register(this._configurationService.onDidChangeConfiguration(async (e) => {
412
+ if (e.affectsConfiguration("accessibility.verbosity.terminal" )) {
413
+ this._setAriaLabel(this.xterm?.raw, this._instanceId, this.title);
414
+ }
415
+ if (e.affectsConfiguration('terminal.integrated')) {
416
+ this.updateConfig();
417
+ this.setVisible(this._isVisible);
418
+ }
419
+ const layoutSettings = [
420
+ "terminal.integrated.fontSize" ,
421
+ "terminal.integrated.fontFamily" ,
422
+ "terminal.integrated.fontWeight" ,
423
+ "terminal.integrated.fontWeightBold" ,
424
+ "terminal.integrated.letterSpacing" ,
425
+ "terminal.integrated.lineHeight" ,
426
+ 'editor.fontFamily'
427
+ ];
428
+ if (( (layoutSettings.some(id => e.affectsConfiguration(id))))) {
429
+ this._layoutSettingsChanged = true;
430
+ await this._resize();
431
+ }
432
+ if (e.affectsConfiguration("terminal.integrated.unicodeVersion" )) {
433
+ this._updateUnicodeVersion();
434
+ }
435
+ if (e.affectsConfiguration('editor.accessibilitySupport')) {
436
+ this.updateAccessibilitySupport();
437
+ }
438
+ if (e.affectsConfiguration("terminal.integrated.tabs.title" ) ||
439
+ e.affectsConfiguration("terminal.integrated.tabs.separator" ) ||
440
+ e.affectsConfiguration("terminal.integrated.tabs.description" )) {
441
+ this._labelComputer?.refreshLabel(this);
442
+ }
443
+ }));
444
+ this._register(this._workspaceContextService.onDidChangeWorkspaceFolders(() => this._labelComputer?.refreshLabel(this)));
445
+ let initialDataEventsTimeout = getWindow(this._container).setTimeout(() => {
446
+ initialDataEventsTimeout = undefined;
447
+ this._initialDataEvents = undefined;
448
+ this._initialDataEventsListener.clear();
449
+ }, 10000);
450
+ this._register(toDisposable(() => {
451
+ if (initialDataEventsTimeout) {
452
+ getWindow(this._container).clearTimeout(initialDataEventsTimeout);
453
+ }
454
+ }));
455
+ const contributionDescs = TerminalExtensionsRegistry.getTerminalContributions();
456
+ for (const desc of contributionDescs) {
457
+ if (( (this._contributions.has(desc.id)))) {
458
+ onUnexpectedError(( (new Error(`Cannot have two terminal contributions with the same id ${desc.id}`))));
459
+ continue;
460
+ }
461
+ let contribution;
462
+ try {
463
+ contribution = this._register(this._scopedInstantiationService.createInstance(desc.ctor, this, this._processManager, this._widgetManager));
464
+ this._contributions.set(desc.id, contribution);
465
+ }
466
+ catch (err) {
467
+ onUnexpectedError(err);
468
+ }
469
+ this._xtermReadyPromise.then(xterm => {
470
+ contribution.xtermReady?.(xterm);
471
+ });
472
+ this._register(this.onDisposed(() => {
473
+ contribution.dispose();
474
+ this._contributions.delete(desc.id);
475
+ if ('instance' in contribution) {
476
+ delete contribution.instance;
477
+ }
478
+ if ('_instance' in contribution) {
479
+ delete contribution._instance;
480
+ }
481
+ }));
482
+ }
483
+ }
484
+ getContribution(id) {
485
+ return this._contributions.get(id);
486
+ }
487
+ _getIcon() {
488
+ if (!this._icon) {
489
+ this._icon = this._processManager.processState >= 2
490
+ ? getIconRegistry().getIcon(this._configurationService.getValue("terminal.integrated.tabs.defaultIcon" ))
491
+ : undefined;
492
+ }
493
+ return this._icon;
494
+ }
495
+ _getColor() {
496
+ if (this.shellLaunchConfig.color) {
497
+ return this.shellLaunchConfig.color;
498
+ }
499
+ if (this.shellLaunchConfig?.attachPersistentProcess?.color) {
500
+ return this.shellLaunchConfig.attachPersistentProcess.color;
501
+ }
502
+ if (this._processManager.processState >= 2 ) {
503
+ return undefined;
504
+ }
505
+ return undefined;
506
+ }
507
+ _initDimensions() {
508
+ if (!this._container) {
509
+ this._cols = 80 ;
510
+ this._rows = 30 ;
511
+ return;
512
+ }
513
+ const computedStyle = getWindow(this._container).getComputedStyle(this._container);
514
+ const width = parseInt(computedStyle.width);
515
+ const height = parseInt(computedStyle.height);
516
+ this._evaluateColsAndRows(width, height);
517
+ }
518
+ _evaluateColsAndRows(width, height) {
519
+ if (!width || !height) {
520
+ this._setLastKnownColsAndRows();
521
+ return null;
522
+ }
523
+ const dimension = this._getDimension(width, height);
524
+ if (!dimension) {
525
+ this._setLastKnownColsAndRows();
526
+ return null;
527
+ }
528
+ const font = this.xterm ? this.xterm.getFont() : this._terminalConfigurationService.getFont(getWindow(this.domElement));
529
+ const newRC = getXtermScaledDimensions(getWindow(this.domElement), font, dimension.width, dimension.height);
530
+ if (!newRC) {
531
+ this._setLastKnownColsAndRows();
532
+ return null;
533
+ }
534
+ if (this._cols !== newRC.cols || this._rows !== newRC.rows) {
535
+ this._cols = newRC.cols;
536
+ this._rows = newRC.rows;
537
+ this._fireMaximumDimensionsChanged();
538
+ }
539
+ return dimension.width;
540
+ }
541
+ _setLastKnownColsAndRows() {
542
+ if (TerminalInstance_1._lastKnownGridDimensions) {
543
+ this._cols = TerminalInstance_1._lastKnownGridDimensions.cols;
544
+ this._rows = TerminalInstance_1._lastKnownGridDimensions.rows;
545
+ }
546
+ }
547
+ _fireMaximumDimensionsChanged() {
548
+ this._onMaximumDimensionsChanged.fire();
549
+ }
550
+ _getDimension(width, height) {
551
+ const font = this.xterm ? this.xterm.getFont() : this._terminalConfigurationService.getFont(getWindow(this.domElement));
552
+ if (!font || !font.charWidth || !font.charHeight) {
553
+ return undefined;
554
+ }
555
+ if (!this.xterm?.raw.element) {
556
+ return undefined;
557
+ }
558
+ const computedStyle = getWindow(this.xterm.raw.element).getComputedStyle(this.xterm.raw.element);
559
+ const horizontalPadding = parseInt(computedStyle.paddingLeft) + parseInt(computedStyle.paddingRight) + 14 ;
560
+ const verticalPadding = parseInt(computedStyle.paddingTop) + parseInt(computedStyle.paddingBottom);
561
+ TerminalInstance_1._lastKnownCanvasDimensions = new Dimension(Math.min(4096 , width - horizontalPadding), height - verticalPadding + (this._hasScrollBar && this._horizontalScrollbar ? -5 : 0));
562
+ return TerminalInstance_1._lastKnownCanvasDimensions;
563
+ }
564
+ get persistentProcessId() { return this._processManager.persistentProcessId; }
565
+ get shouldPersist() { return this._processManager.shouldPersist && !this.shellLaunchConfig.isTransient && (!this.reconnectionProperties || this._configurationService.getValue('task.reconnection') === true); }
566
+ static getXtermConstructor(keybindingService, contextKeyService) {
567
+ const keybinding = keybindingService.lookupKeybinding("workbench.action.terminal.focusAccessibleBuffer" , contextKeyService);
568
+ if (xtermConstructor) {
569
+ return xtermConstructor;
570
+ }
571
+ xtermConstructor = Promises.withAsyncBody(async (resolve) => {
572
+ const Terminal = (await import('@xterm/xterm').then(module => module.default ?? module)).Terminal;
573
+ Terminal.strings.promptLabel = ( localize(9051, 'Terminal input'));
574
+ Terminal.strings.tooMuchOutput = keybinding ? ( localize(
575
+ 9052,
576
+ 'Use the accessible buffer {0} to manually review output',
577
+ keybinding.getLabel()
578
+ )) : ( localize(
579
+ 9053,
580
+ 'Use the Terminal: Focus Accessible Buffer command to manually review output'
581
+ ));
582
+ resolve(Terminal);
583
+ });
584
+ return xtermConstructor;
585
+ }
586
+ async _createXterm() {
587
+ const Terminal = await TerminalInstance_1.getXtermConstructor(this._keybindingService, this._contextKeyService);
588
+ if (this.isDisposed) {
589
+ throw ( (new ErrorNoTelemetry('Terminal disposed of during xterm.js creation')));
590
+ }
591
+ const disableShellIntegrationReporting = (this.shellLaunchConfig.executable === undefined || this.shellType === undefined) || !shellIntegrationSupportedShellTypes.includes(this.shellType);
592
+ const xterm = this._scopedInstantiationService.createInstance(XtermTerminal, Terminal, this._cols, this._rows, this._scopedInstantiationService.createInstance(TerminalInstanceColorProvider, this), this.capabilities, this._processManager.shellIntegrationNonce, disableShellIntegrationReporting);
593
+ this.xterm = xterm;
594
+ this._resizeDebouncer = this._register(( (new TerminalResizeDebouncer(() => this._isVisible, () => xterm, async (cols, rows) => {
595
+ xterm.raw.resize(cols, rows);
596
+ await this._updatePtyDimensions(xterm.raw);
597
+ }, async (cols) => {
598
+ xterm.raw.resize(cols, xterm.raw.rows);
599
+ await this._updatePtyDimensions(xterm.raw);
600
+ }, async (rows) => {
601
+ xterm.raw.resize(xterm.raw.cols, rows);
602
+ await this._updatePtyDimensions(xterm.raw);
603
+ }))));
604
+ this.updateAccessibilitySupport();
605
+ this._register(this.xterm.onDidRequestRunCommand(e => {
606
+ if (e.copyAsHtml) {
607
+ this.copySelection(true, e.command);
608
+ }
609
+ else {
610
+ this.sendText(e.command.command, e.noNewLine ? false : true);
611
+ }
612
+ }));
613
+ this._register(this.xterm.onDidRequestRefreshDimensions(() => {
614
+ if (this._lastLayoutDimensions) {
615
+ this.layout(this._lastLayoutDimensions);
616
+ }
617
+ }));
618
+ const initialTextWrittenPromise = this._shellLaunchConfig.initialText ? ( (new Promise(r => this._writeInitialText(xterm, r)))) : undefined;
619
+ const lineDataEventAddon = this._register(( (new LineDataEventAddon(initialTextWrittenPromise))));
620
+ this._register(lineDataEventAddon.onLineData(e => this._onLineData.fire(e)));
621
+ this._lineDataEventAddon = lineDataEventAddon;
622
+ disposableTimeout(() => {
623
+ this._register(xterm.raw.onBell(() => {
624
+ if (this._configurationService.getValue("terminal.integrated.enableBell" ) || this._configurationService.getValue("terminal.integrated.enableVisualBell" )) {
625
+ this.statusList.add({
626
+ id: "bell" ,
627
+ severity: Severity$1.Warning,
628
+ icon: Codicon.bell,
629
+ tooltip: ( localize(9054, "Bell"))
630
+ }, this._terminalConfigurationService.config.bellDuration);
631
+ }
632
+ this._accessibilitySignalService.playSignal(AccessibilitySignal.terminalBell);
633
+ }));
634
+ }, 1000, this._store);
635
+ this._register(xterm.raw.onSelectionChange(async () => this._onSelectionChange()));
636
+ this._register(xterm.raw.buffer.onBufferChange(() => this._refreshAltBufferContextKey()));
637
+ this._register(this._processManager.onProcessData(e => this._onProcessData(e)));
638
+ this._register(xterm.raw.onData(async (data) => {
639
+ await this._pauseInputEventBarrier?.wait();
640
+ await this._processManager.write(data);
641
+ this._onDidInputData.fire(data);
642
+ }));
643
+ this._register(xterm.raw.onBinary(data => this._processManager.processBinary(data)));
644
+ this._register(this._processManager.onProcessReady(async (processTraits) => {
645
+ if (this._processManager.os) {
646
+ lineDataEventAddon.setOperatingSystem(this._processManager.os);
647
+ }
648
+ xterm.raw.options.windowsPty = processTraits.windowsPty;
649
+ }));
650
+ this._register(this._processManager.onRestoreCommands(e => this.xterm?.shellIntegration.deserialize(e)));
651
+ this._register(this._viewDescriptorService.onDidChangeLocation(({ views }) => {
652
+ if (( (views.some(v => v.id === TERMINAL_VIEW_ID)))) {
653
+ xterm.refresh();
654
+ }
655
+ }));
656
+ if (!( (this.capabilities.has(0 )))) {
657
+ let onKeyListener = xterm.raw.onKey(e => {
658
+ const event = ( (new StandardKeyboardEvent(e.domEvent)));
659
+ if (event.equals(3 )) {
660
+ this._updateProcessCwd();
661
+ }
662
+ });
663
+ this._register(this.capabilities.onDidAddCapabilityType(e => {
664
+ if (e === 0 ) {
665
+ onKeyListener?.dispose();
666
+ onKeyListener = undefined;
667
+ }
668
+ }));
669
+ }
670
+ this._pathService.userHome().then(userHome => {
671
+ this._userHome = userHome.fsPath;
672
+ });
673
+ if (this._isVisible) {
674
+ this._open();
675
+ }
676
+ return xterm;
677
+ }
678
+ async _onLineDataSetup() {
679
+ const xterm = this.xterm || (await this._xtermReadyPromise);
680
+ xterm.raw.loadAddon(this._lineDataEventAddon);
681
+ }
682
+ async runCommand(commandLine, shouldExecute) {
683
+ let commandDetection = this.capabilities.get(2 );
684
+ if (!commandDetection && ((this._processManager.processState === 1 || this._processManager.processState === 2) )) {
685
+ const store = ( (new DisposableStore()));
686
+ await Promise.race([
687
+ ( (new Promise(r => {
688
+ store.add(this.capabilities.onDidAddCapabilityType(e => {
689
+ if (e === 2 ) {
690
+ commandDetection = this.capabilities.get(2 );
691
+ r();
692
+ }
693
+ }));
694
+ }))),
695
+ timeout(2000),
696
+ ]);
697
+ store.dispose();
698
+ }
699
+ if (!commandDetection || commandDetection.promptInputModel.value.length > 0) {
700
+ await this.sendText('\x03', false);
701
+ await timeout(100);
702
+ }
703
+ await this.sendText(commandLine, shouldExecute, !shouldExecute);
704
+ }
705
+ async runRecent(type, filterMode, value) {
706
+ return this._scopedInstantiationService.invokeFunction(showRunRecentQuickPick, this, this._terminalInRunCommandPicker, type, filterMode, value);
707
+ }
708
+ detachFromElement() {
709
+ this._wrapperElement.remove();
710
+ this._container = undefined;
711
+ }
712
+ attachToElement(container) {
713
+ if (this._container === container) {
714
+ return;
715
+ }
716
+ if (!this._attachBarrier.isOpen()) {
717
+ this._attachBarrier.open();
718
+ }
719
+ this._container = container;
720
+ this._container.appendChild(this._wrapperElement);
721
+ if (this.xterm?.raw.element) {
722
+ this.xterm.raw.open(this.xterm.raw.element);
723
+ }
724
+ this.xterm?.refresh();
725
+ setTimeout(() => this._initDragAndDrop(container));
726
+ }
727
+ _open() {
728
+ if (!this.xterm || this.xterm.raw.element) {
729
+ return;
730
+ }
731
+ if (!this._container || !this._container.isConnected) {
732
+ throw ( (new Error(
733
+ 'A container element needs to be set with `attachToElement` and be part of the DOM before calling `_open`'
734
+ )));
735
+ }
736
+ const xtermElement = document.createElement('div');
737
+ this._wrapperElement.appendChild(xtermElement);
738
+ this._container.appendChild(this._wrapperElement);
739
+ const xterm = this.xterm;
740
+ this._wrapperElement.xterm = xterm.raw;
741
+ const screenElement = xterm.attachToElement(xtermElement);
742
+ for (const contribution of ( (this._contributions.values()))) {
743
+ if (!this.xterm) {
744
+ this._xtermReadyPromise.then(xterm => contribution.xtermOpen?.(xterm));
745
+ }
746
+ else {
747
+ contribution.xtermOpen?.(this.xterm);
748
+ }
749
+ }
750
+ this._register(xterm.shellIntegration.onDidChangeStatus(() => {
751
+ if (this.hasFocus) {
752
+ this._setShellIntegrationContextKey();
753
+ }
754
+ else {
755
+ this._terminalShellIntegrationEnabledContextKey.reset();
756
+ }
757
+ }));
758
+ if (!xterm.raw.element || !xterm.raw.textarea) {
759
+ throw ( (new Error('xterm elements not set after open')));
760
+ }
761
+ this._setAriaLabel(xterm.raw, this._instanceId, this._title);
762
+ xterm.raw.attachCustomKeyEventHandler((event) => {
763
+ if (this._isExiting) {
764
+ return false;
765
+ }
766
+ const standardKeyboardEvent = ( (new StandardKeyboardEvent(event)));
767
+ const resolveResult = this._keybindingService.softDispatch(standardKeyboardEvent, standardKeyboardEvent.target);
768
+ const isValidChord = resolveResult.kind === 1 && this._terminalConfigurationService.config.allowChords && event.key !== 'Escape';
769
+ if (this._keybindingService.inChordMode || isValidChord) {
770
+ event.preventDefault();
771
+ return false;
772
+ }
773
+ const SHOW_TERMINAL_CONFIG_PROMPT_KEY = 'terminal.integrated.showTerminalConfigPrompt';
774
+ const EXCLUDED_KEYS = ['RightArrow', 'LeftArrow', 'UpArrow', 'DownArrow', 'Space', 'Meta', 'Control', 'Shift', 'Alt', '', 'Delete', 'Backspace', 'Tab'];
775
+ if (this._storageService.getBoolean(SHOW_TERMINAL_CONFIG_PROMPT_KEY, -1 , true) &&
776
+ !EXCLUDED_KEYS.includes(event.key) &&
777
+ !event.ctrlKey &&
778
+ !event.shiftKey &&
779
+ !event.altKey) {
780
+ this._hasHadInput = true;
781
+ }
782
+ if (resolveResult.kind === 2 && resolveResult.commandId && ( (this._skipTerminalCommands.some(k => k === resolveResult.commandId))) && !this._terminalConfigurationService.config.sendKeybindingsToShell) {
783
+ if (this._storageService.getBoolean(SHOW_TERMINAL_CONFIG_PROMPT_KEY, -1 , true) &&
784
+ this._hasHadInput &&
785
+ !TERMINAL_CREATION_COMMANDS.includes(resolveResult.commandId)) {
786
+ this._notificationService.prompt(Severity$1.Info, ( localize(
787
+ 9055,
788
+ "Some keybindings don't go to the terminal by default and are handled by {0} instead.",
789
+ this._productService.nameLong
790
+ )), [
791
+ {
792
+ label: ( localize(9056, "Configure Terminal Settings")),
793
+ run: () => {
794
+ this._preferencesService.openSettings({ jsonEditor: false, query: `@id:${"terminal.integrated.commandsToSkipShell" },${"terminal.integrated.sendKeybindingsToShell" },${"terminal.integrated.allowChords" }` });
795
+ }
796
+ }
797
+ ]);
798
+ this._storageService.store(SHOW_TERMINAL_CONFIG_PROMPT_KEY, false, -1 , 0 );
799
+ }
800
+ event.preventDefault();
801
+ return false;
802
+ }
803
+ if (this._terminalConfigurationService.config.allowMnemonics && !isMacintosh && event.altKey) {
804
+ return false;
805
+ }
806
+ if (TabFocus.getTabFocusMode() && event.key === 'Tab') {
807
+ return false;
808
+ }
809
+ if (event.key === 'Tab' && event.shiftKey) {
810
+ event.preventDefault();
811
+ return true;
812
+ }
813
+ if (isWindows && event.altKey && event.key === 'F4' && !event.ctrlKey) {
814
+ return false;
815
+ }
816
+ if (!BrowserFeatures.clipboard.readText && event.key === 'v' && event.ctrlKey) {
817
+ return false;
818
+ }
819
+ return true;
820
+ });
821
+ this._register(addDisposableListener(xterm.raw.element, 'mousedown', () => {
822
+ const listener = addDisposableListener(xterm.raw.element.ownerDocument, 'mouseup', () => {
823
+ setTimeout(() => this._refreshSelectionContextKey(), 0);
824
+ listener.dispose();
825
+ });
826
+ }));
827
+ this._register(addDisposableListener(xterm.raw.element, 'touchstart', () => {
828
+ xterm.raw.focus();
829
+ }));
830
+ this._register(addDisposableListener(xterm.raw.element, 'keyup', () => {
831
+ setTimeout(() => this._refreshSelectionContextKey(), 0);
832
+ }));
833
+ this._register(addDisposableListener(xterm.raw.textarea, 'focus', () => this._setFocus(true)));
834
+ this._register(addDisposableListener(xterm.raw.textarea, 'blur', () => this._setFocus(false)));
835
+ this._register(addDisposableListener(xterm.raw.textarea, 'focusout', () => this._setFocus(false)));
836
+ this._initDragAndDrop(this._container);
837
+ this._widgetManager.attachToElement(screenElement);
838
+ if (this._lastLayoutDimensions) {
839
+ this.layout(this._lastLayoutDimensions);
840
+ }
841
+ this.updateConfig();
842
+ if (xterm.raw.options.disableStdin) {
843
+ this._attachPressAnyKeyToCloseListener(xterm.raw);
844
+ }
845
+ }
846
+ _setFocus(focused) {
847
+ if (focused) {
848
+ this._terminalFocusContextKey.set(true);
849
+ this._setShellIntegrationContextKey();
850
+ this._onDidFocus.fire(this);
851
+ }
852
+ else {
853
+ this.resetFocusContextKey();
854
+ this._onDidBlur.fire(this);
855
+ this._refreshSelectionContextKey();
856
+ }
857
+ }
858
+ _setShellIntegrationContextKey() {
859
+ if (this.xterm) {
860
+ this._terminalShellIntegrationEnabledContextKey.set(this.xterm.shellIntegration.status === 2 );
861
+ }
862
+ }
863
+ resetFocusContextKey() {
864
+ this._terminalFocusContextKey.reset();
865
+ this._terminalShellIntegrationEnabledContextKey.reset();
866
+ }
867
+ _initDragAndDrop(container) {
868
+ const store = ( (new DisposableStore()));
869
+ const dndController = store.add(this._scopedInstantiationService.createInstance(TerminalInstanceDragAndDropController, container));
870
+ store.add(dndController.onDropTerminal(e => this._onRequestAddInstanceToGroup.fire(e)));
871
+ store.add(dndController.onDropFile(async (path) => {
872
+ this.focus();
873
+ await this.sendPath(path, false);
874
+ }));
875
+ store.add(new DragAndDropObserver(container, dndController));
876
+ this._dndObserver.value = store;
877
+ }
878
+ hasSelection() {
879
+ return this.xterm ? this.xterm.raw.hasSelection() : false;
880
+ }
881
+ async copySelection(asHtml, command) {
882
+ const xterm = await this._xtermReadyPromise;
883
+ await xterm.copySelection(asHtml, command);
884
+ }
885
+ get selection() {
886
+ return this.xterm && this.hasSelection() ? this.xterm.raw.getSelection() : undefined;
887
+ }
888
+ clearSelection() {
889
+ this.xterm?.raw.clearSelection();
890
+ }
891
+ _refreshAltBufferContextKey() {
892
+ this._terminalAltBufferActiveContextKey.set(!!(this.xterm && this.xterm.raw.buffer.active === this.xterm.raw.buffer.alternate));
893
+ }
894
+ dispose(reason) {
895
+ if (this.shellLaunchConfig.type === 'Task' && reason === TerminalExitReason.Process && this._exitCode !== 0 && !this.shellLaunchConfig.waitOnExit) {
896
+ return;
897
+ }
898
+ if (this.isDisposed) {
899
+ return;
900
+ }
901
+ this._logService.trace(`terminalInstance#dispose (instanceId: ${this.instanceId})`);
902
+ dispose(this._widgetManager);
903
+ if (this.xterm?.raw.element) {
904
+ this._hadFocusOnExit = this.hasFocus;
905
+ }
906
+ if (this._wrapperElement.xterm) {
907
+ this._wrapperElement.xterm = undefined;
908
+ }
909
+ if (this._horizontalScrollbar) {
910
+ this._horizontalScrollbar.dispose();
911
+ this._horizontalScrollbar = undefined;
912
+ }
913
+ try {
914
+ this.xterm?.dispose();
915
+ }
916
+ catch (err) {
917
+ this._logService.error('Exception occurred during xterm disposal', err);
918
+ }
919
+ if (isFirefox) {
920
+ this.resetFocusContextKey();
921
+ this._terminalHasTextContextKey.reset();
922
+ this._onDidBlur.fire(this);
923
+ }
924
+ if (this._pressAnyKeyToCloseListener) {
925
+ this._pressAnyKeyToCloseListener.dispose();
926
+ this._pressAnyKeyToCloseListener = undefined;
927
+ }
928
+ if (this._exitReason === undefined) {
929
+ this._exitReason = reason ?? TerminalExitReason.Unknown;
930
+ }
931
+ this._processManager.dispose();
932
+ this._onProcessExit(undefined);
933
+ this._onDisposed.fire(this);
934
+ super.dispose();
935
+ }
936
+ async detachProcessAndDispose(reason) {
937
+ await this._processManager.detachFromProcess(reason === TerminalExitReason.User);
938
+ this.dispose(reason);
939
+ }
940
+ focus(force) {
941
+ this._refreshAltBufferContextKey();
942
+ if (!this.xterm) {
943
+ return;
944
+ }
945
+ if (force || !getActiveWindow().getSelection()?.toString()) {
946
+ this.xterm.raw.focus();
947
+ this._onDidRequestFocus.fire();
948
+ }
949
+ }
950
+ async focusWhenReady(force) {
951
+ await this._xtermReadyPromise;
952
+ await this._attachBarrier.wait();
953
+ this.focus(force);
954
+ }
955
+ async paste() {
956
+ await this._paste(await this._clipboardService.readText());
957
+ }
958
+ async pasteSelection() {
959
+ await this._paste(await this._clipboardService.readText('selection'));
960
+ }
961
+ async _paste(value) {
962
+ if (!this.xterm) {
963
+ return;
964
+ }
965
+ let currentText = value;
966
+ const shouldPasteText = await this._scopedInstantiationService.invokeFunction(shouldPasteTerminalText, currentText, this.xterm?.raw.modes.bracketedPasteMode);
967
+ if (!shouldPasteText) {
968
+ return;
969
+ }
970
+ if (typeof shouldPasteText === 'object') {
971
+ currentText = shouldPasteText.modifiedText;
972
+ }
973
+ this.focus();
974
+ this._onWillPaste.fire(currentText);
975
+ this.xterm.raw.paste(currentText);
976
+ this._onDidPaste.fire(currentText);
977
+ }
978
+ async sendText(text, shouldExecute, bracketedPasteMode) {
979
+ if (bracketedPasteMode && this.xterm?.raw.modes.bracketedPasteMode) {
980
+ text = `\x1b[200~${text}\x1b[201~`;
981
+ }
982
+ text = text.replace(/\r?\n/g, '\r');
983
+ if (shouldExecute && !text.endsWith('\r')) {
984
+ text += '\r';
985
+ }
986
+ this._logService.debug('sending data (vscode)', text);
987
+ await this._processManager.write(text);
988
+ this._onDidInputData.fire(text);
989
+ this._onDidSendText.fire(text);
990
+ this.xterm?.scrollToBottom();
991
+ if (shouldExecute) {
992
+ this._onDidExecuteText.fire();
993
+ }
994
+ }
995
+ async sendPath(originalPath, shouldExecute) {
996
+ return this.sendText(await this.preparePathForShell(originalPath), shouldExecute);
997
+ }
998
+ async preparePathForShell(originalPath) {
999
+ await this.processReady;
1000
+ return preparePathForShell(originalPath, this.shellLaunchConfig.executable, this.title, this.shellType, this._processManager.backend, this._processManager.os);
1001
+ }
1002
+ setVisible(visible) {
1003
+ const didChange = this._isVisible !== visible;
1004
+ this._isVisible = visible;
1005
+ this._wrapperElement.classList.toggle('active', visible);
1006
+ if (visible && this.xterm) {
1007
+ this._open();
1008
+ this._resizeDebouncer?.flush();
1009
+ this._resize();
1010
+ }
1011
+ if (didChange) {
1012
+ this._onDidChangeVisibility.fire(visible);
1013
+ }
1014
+ }
1015
+ scrollDownLine() {
1016
+ this.xterm?.scrollDownLine();
1017
+ }
1018
+ scrollDownPage() {
1019
+ this.xterm?.scrollDownPage();
1020
+ }
1021
+ scrollToBottom() {
1022
+ this.xterm?.scrollToBottom();
1023
+ }
1024
+ scrollUpLine() {
1025
+ this.xterm?.scrollUpLine();
1026
+ }
1027
+ scrollUpPage() {
1028
+ this.xterm?.scrollUpPage();
1029
+ }
1030
+ scrollToTop() {
1031
+ this.xterm?.scrollToTop();
1032
+ }
1033
+ clearBuffer() {
1034
+ this._processManager.clearBuffer();
1035
+ this.xterm?.clearBuffer();
1036
+ }
1037
+ _refreshSelectionContextKey() {
1038
+ const isActive = !!this._viewsService.getActiveViewWithId(TERMINAL_VIEW_ID);
1039
+ let isEditorActive = false;
1040
+ const editor = this._editorService.activeEditor;
1041
+ if (editor) {
1042
+ isEditorActive = editor instanceof TerminalEditorInput;
1043
+ }
1044
+ this._terminalHasTextContextKey.set((isActive || isEditorActive) && this.hasSelection());
1045
+ }
1046
+ _createProcessManager() {
1047
+ let deserializedCollections;
1048
+ if (this.shellLaunchConfig.attachPersistentProcess?.environmentVariableCollections) {
1049
+ deserializedCollections = deserializeEnvironmentVariableCollections(this.shellLaunchConfig.attachPersistentProcess.environmentVariableCollections);
1050
+ }
1051
+ const processManager = this._scopedInstantiationService.createInstance(TerminalProcessManager, this._instanceId, this.shellLaunchConfig?.cwd, deserializedCollections, this.shellLaunchConfig.attachPersistentProcess?.shellIntegrationNonce);
1052
+ this.capabilities.add(processManager.capabilities);
1053
+ this._register(processManager.onProcessReady(async (e) => {
1054
+ this._onProcessIdReady.fire(this);
1055
+ this._initialCwd = await this.getInitialCwd();
1056
+ if (!this._labelComputer) {
1057
+ this._labelComputer = this._register(this._scopedInstantiationService.createInstance(TerminalLabelComputer));
1058
+ this._register(this._labelComputer.onDidChangeLabel(e => {
1059
+ const wasChanged = this._title !== e.title || this._description !== e.description;
1060
+ if (wasChanged) {
1061
+ this._title = e.title;
1062
+ this._description = e.description;
1063
+ this._onTitleChanged.fire(this);
1064
+ }
1065
+ }));
1066
+ }
1067
+ if (this._shellLaunchConfig.name) {
1068
+ this._setTitle(this._shellLaunchConfig.name, TitleEventSource.Api);
1069
+ }
1070
+ else {
1071
+ setTimeout(() => {
1072
+ this._xtermReadyPromise.then(xterm => {
1073
+ this._messageTitleDisposable.value = xterm.raw.onTitleChange(e => this._onTitleChange(e));
1074
+ });
1075
+ });
1076
+ this._setTitle(this._shellLaunchConfig.executable, TitleEventSource.Process);
1077
+ }
1078
+ }));
1079
+ this._register(processManager.onProcessExit(exitCode => this._onProcessExit(exitCode)));
1080
+ this._register(processManager.onDidChangeProperty(({ type, value }) => {
1081
+ switch (type) {
1082
+ case "cwd" :
1083
+ this._cwd = value;
1084
+ this._labelComputer?.refreshLabel(this);
1085
+ break;
1086
+ case "initialCwd" :
1087
+ this._initialCwd = value;
1088
+ this._cwd = this._initialCwd;
1089
+ this._setTitle(this.title, TitleEventSource.Config);
1090
+ this._icon = this._shellLaunchConfig.attachPersistentProcess?.icon || this._shellLaunchConfig.icon;
1091
+ this._onIconChanged.fire({ instance: this, userInitiated: false });
1092
+ break;
1093
+ case "title" :
1094
+ this._setTitle(value ?? '', TitleEventSource.Process);
1095
+ break;
1096
+ case "overrideDimensions" :
1097
+ this.setOverrideDimensions(value, true);
1098
+ break;
1099
+ case "resolvedShellLaunchConfig" :
1100
+ this._setResolvedShellLaunchConfig(value);
1101
+ break;
1102
+ case "shellType" :
1103
+ this.setShellType(value);
1104
+ break;
1105
+ case "hasChildProcesses" :
1106
+ this._onDidChangeHasChildProcesses.fire(value);
1107
+ break;
1108
+ case "usedShellIntegrationInjection" :
1109
+ this._usedShellIntegrationInjection = true;
1110
+ break;
1111
+ }
1112
+ }));
1113
+ this._initialDataEventsListener.value = processManager.onProcessData(ev => this._initialDataEvents?.push(ev.data));
1114
+ this._register(processManager.onProcessReplayComplete(() => this._onProcessReplayComplete.fire()));
1115
+ this._register(processManager.onEnvironmentVariableInfoChanged(e => this._onEnvironmentVariableInfoChanged(e)));
1116
+ this._register(processManager.onPtyDisconnect(() => {
1117
+ if (this.xterm) {
1118
+ this.xterm.raw.options.disableStdin = true;
1119
+ }
1120
+ this.statusList.add({
1121
+ id: "disconnected" ,
1122
+ severity: Severity$1.Error,
1123
+ icon: Codicon.debugDisconnect,
1124
+ tooltip: ( localize(9057, "Lost connection to process"))
1125
+ });
1126
+ }));
1127
+ this._register(processManager.onPtyReconnect(() => {
1128
+ if (this.xterm) {
1129
+ this.xterm.raw.options.disableStdin = false;
1130
+ }
1131
+ this.statusList.remove("disconnected" );
1132
+ }));
1133
+ return processManager;
1134
+ }
1135
+ async _createProcess() {
1136
+ if (this.isDisposed) {
1137
+ return;
1138
+ }
1139
+ const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(Schemas.file);
1140
+ if (activeWorkspaceRootUri) {
1141
+ const trusted = await this._trust();
1142
+ if (!trusted) {
1143
+ this._onProcessExit({ message: ( localize(9058, "Cannot launch a terminal process in an untrusted workspace")) });
1144
+ }
1145
+ }
1146
+ else if (this._cwd && this._userHome && this._cwd !== this._userHome) {
1147
+ this._onProcessExit({
1148
+ message: ( localize(
1149
+ 9059,
1150
+ "Cannot launch a terminal process in an untrusted workspace with cwd {0} and userHome {1}",
1151
+ this._cwd,
1152
+ this._userHome
1153
+ ))
1154
+ });
1155
+ }
1156
+ if (this._container && this._cols === 0 && this._rows === 0) {
1157
+ this._initDimensions();
1158
+ this.xterm?.raw.resize(this._cols || 80 , this._rows || 30 );
1159
+ }
1160
+ const originalIcon = this.shellLaunchConfig.icon;
1161
+ await this._processManager.createProcess(this._shellLaunchConfig, this._cols || 80 , this._rows || 30 ).then(result => {
1162
+ if (result) {
1163
+ if ('message' in result) {
1164
+ this._onProcessExit(result);
1165
+ }
1166
+ else if ('injectedArgs' in result) {
1167
+ this._injectedArgs = result.injectedArgs;
1168
+ }
1169
+ }
1170
+ });
1171
+ if (this.isDisposed) {
1172
+ return;
1173
+ }
1174
+ if (this.xterm?.shellIntegration) {
1175
+ this.capabilities.add(this.xterm.shellIntegration.capabilities);
1176
+ }
1177
+ if (originalIcon !== this.shellLaunchConfig.icon || this.shellLaunchConfig.color) {
1178
+ this._icon = this._shellLaunchConfig.attachPersistentProcess?.icon || this._shellLaunchConfig.icon;
1179
+ this._onIconChanged.fire({ instance: this, userInitiated: false });
1180
+ }
1181
+ }
1182
+ registerMarker(offset) {
1183
+ return this.xterm?.raw.registerMarker(offset);
1184
+ }
1185
+ addBufferMarker(properties) {
1186
+ this.capabilities.get(4 )?.addMark(properties);
1187
+ }
1188
+ scrollToMark(startMarkId, endMarkId, highlight) {
1189
+ this.xterm?.markTracker.scrollToClosestMarker(startMarkId, endMarkId, highlight);
1190
+ }
1191
+ async freePortKillProcess(port, command) {
1192
+ await this._processManager?.freePortKillProcess(port);
1193
+ this.runCommand(command, false);
1194
+ }
1195
+ _onProcessData(ev) {
1196
+ const execIndex = ev.data.indexOf('\x1b]633;C\x07');
1197
+ if (execIndex !== -1) {
1198
+ if (ev.trackCommit) {
1199
+ this._writeProcessData(ev.data.substring(0, execIndex + '\x1b]633;C\x07'.length));
1200
+ ev.writePromise = ( (new Promise(
1201
+ r => this._writeProcessData(ev.data.substring(execIndex + '\x1b]633;C\x07'.length), r)
1202
+ )));
1203
+ }
1204
+ else {
1205
+ this._writeProcessData(ev.data.substring(0, execIndex + '\x1b]633;C\x07'.length));
1206
+ this._writeProcessData(ev.data.substring(execIndex + '\x1b]633;C\x07'.length));
1207
+ }
1208
+ }
1209
+ else {
1210
+ if (ev.trackCommit) {
1211
+ ev.writePromise = ( (new Promise(r => this._writeProcessData(ev.data, r))));
1212
+ }
1213
+ else {
1214
+ this._writeProcessData(ev.data);
1215
+ }
1216
+ }
1217
+ }
1218
+ _writeProcessData(data, cb) {
1219
+ this._onWillData.fire(data);
1220
+ const messageId = ++this._latestXtermWriteData;
1221
+ this.xterm?.raw.write(data, () => {
1222
+ this._latestXtermParseData = messageId;
1223
+ this._processManager.acknowledgeDataEvent(data.length);
1224
+ cb?.();
1225
+ this._onData.fire(data);
1226
+ });
1227
+ }
1228
+ async _onProcessExit(exitCodeOrError) {
1229
+ if (this._isExiting) {
1230
+ return;
1231
+ }
1232
+ const parsedExitResult = parseExitResult(exitCodeOrError, this.shellLaunchConfig, this._processManager.processState, this._initialCwd);
1233
+ if (this._usedShellIntegrationInjection && this._processManager.processState === 4 && parsedExitResult?.code !== 0) {
1234
+ this._relaunchWithShellIntegrationDisabled(parsedExitResult?.message);
1235
+ this._onExit.fire(exitCodeOrError);
1236
+ return;
1237
+ }
1238
+ this._isExiting = true;
1239
+ await this._flushXtermData();
1240
+ this._exitCode = parsedExitResult?.code;
1241
+ const exitMessage = parsedExitResult?.message;
1242
+ this._logService.debug('Terminal process exit', 'instanceId', this.instanceId, 'code', this._exitCode, 'processState', this._processManager.processState);
1243
+ const waitOnExit = this.waitOnExit;
1244
+ if (waitOnExit && this._processManager.processState !== 5 ) {
1245
+ this._xtermReadyPromise.then(xterm => {
1246
+ if (exitMessage) {
1247
+ xterm.raw.write(formatMessageForTerminal(exitMessage));
1248
+ }
1249
+ switch (typeof waitOnExit) {
1250
+ case 'string':
1251
+ xterm.raw.write(formatMessageForTerminal(waitOnExit, { excludeLeadingNewLine: true }));
1252
+ break;
1253
+ case 'function':
1254
+ if (this.exitCode !== undefined) {
1255
+ xterm.raw.write(formatMessageForTerminal(waitOnExit(this.exitCode), { excludeLeadingNewLine: true }));
1256
+ }
1257
+ break;
1258
+ }
1259
+ xterm.raw.options.disableStdin = true;
1260
+ if (xterm.raw.textarea) {
1261
+ this._attachPressAnyKeyToCloseListener(xterm.raw);
1262
+ }
1263
+ });
1264
+ }
1265
+ else {
1266
+ if (exitMessage) {
1267
+ const failedDuringLaunch = this._processManager.processState === 4 ;
1268
+ if (failedDuringLaunch || this._terminalConfigurationService.config.showExitAlert) {
1269
+ this._notificationService.notify({
1270
+ message: exitMessage,
1271
+ severity: Severity$1.Error,
1272
+ actions: { primary: [this._scopedInstantiationService.createInstance(TerminalLaunchHelpAction)] }
1273
+ });
1274
+ }
1275
+ else {
1276
+ this._logService.warn(exitMessage);
1277
+ }
1278
+ }
1279
+ this.dispose(TerminalExitReason.Process);
1280
+ }
1281
+ this._onExit.fire(exitCodeOrError);
1282
+ if (this.isDisposed) {
1283
+ this._onExit.dispose();
1284
+ }
1285
+ }
1286
+ _relaunchWithShellIntegrationDisabled(exitMessage) {
1287
+ this._shellLaunchConfig.ignoreShellIntegration = true;
1288
+ this.relaunch();
1289
+ this.statusList.add({
1290
+ id: "shell-integration-attention-needed" ,
1291
+ severity: Severity$1.Warning,
1292
+ icon: Codicon.warning,
1293
+ tooltip: `${exitMessage} ` + ( localize(9060, 'Disabling shell integration in user settings might help.')),
1294
+ hoverActions: [{
1295
+ commandId: "workbench.action.terminal.learnMore" ,
1296
+ label: ( localize(9061, "Learn more about shell integration")),
1297
+ run: () => {
1298
+ this._openerService.open('https://code.visualstudio.com/docs/editor/integrated-terminal#_shell-integration');
1299
+ }
1300
+ }, {
1301
+ commandId: 'workbench.action.openSettings',
1302
+ label: ( localize(9062, "Open user settings")),
1303
+ run: () => {
1304
+ this._commandService.executeCommand('workbench.action.openSettings', 'terminal.integrated.shellIntegration.enabled');
1305
+ }
1306
+ }]
1307
+ });
1308
+ this._telemetryService.publicLog2('terminal/shellIntegrationFailureProcessExit');
1309
+ }
1310
+ _flushXtermData() {
1311
+ if (this._latestXtermWriteData === this._latestXtermParseData) {
1312
+ return Promise.resolve();
1313
+ }
1314
+ let retries = 0;
1315
+ return (
1316
+ (new Promise(r => {
1317
+ const interval = disposableWindowInterval(getActiveWindow().window, () => {
1318
+ if (this._latestXtermWriteData === this._latestXtermParseData || ++retries === 5) {
1319
+ interval.dispose();
1320
+ r();
1321
+ }
1322
+ }, 20);
1323
+ }))
1324
+ );
1325
+ }
1326
+ _attachPressAnyKeyToCloseListener(xterm) {
1327
+ if (xterm.textarea && !this._pressAnyKeyToCloseListener) {
1328
+ this._pressAnyKeyToCloseListener = addDisposableListener(xterm.textarea, 'keypress', (event) => {
1329
+ if (this._pressAnyKeyToCloseListener) {
1330
+ this._pressAnyKeyToCloseListener.dispose();
1331
+ this._pressAnyKeyToCloseListener = undefined;
1332
+ this.dispose(TerminalExitReason.Process);
1333
+ event.preventDefault();
1334
+ }
1335
+ });
1336
+ }
1337
+ }
1338
+ _writeInitialText(xterm, callback) {
1339
+ if (!this._shellLaunchConfig.initialText) {
1340
+ callback?.();
1341
+ return;
1342
+ }
1343
+ const text = typeof this._shellLaunchConfig.initialText === 'string'
1344
+ ? this._shellLaunchConfig.initialText
1345
+ : this._shellLaunchConfig.initialText?.text;
1346
+ if (typeof this._shellLaunchConfig.initialText === 'string') {
1347
+ xterm.raw.writeln(text, callback);
1348
+ }
1349
+ else {
1350
+ if (this._shellLaunchConfig.initialText.trailingNewLine) {
1351
+ xterm.raw.writeln(text, callback);
1352
+ }
1353
+ else {
1354
+ xterm.raw.write(text, callback);
1355
+ }
1356
+ }
1357
+ }
1358
+ async reuseTerminal(shell, reset = false) {
1359
+ this._pressAnyKeyToCloseListener?.dispose();
1360
+ this._pressAnyKeyToCloseListener = undefined;
1361
+ const xterm = this.xterm;
1362
+ if (xterm) {
1363
+ if (!reset) {
1364
+ await ( (new Promise(r => xterm.raw.write('\n\x1b[G', r))));
1365
+ }
1366
+ if (shell.initialText) {
1367
+ this._shellLaunchConfig.initialText = shell.initialText;
1368
+ await ( (new Promise(r => this._writeInitialText(xterm, r))));
1369
+ }
1370
+ if (this._isExiting && this._shellLaunchConfig.waitOnExit) {
1371
+ xterm.raw.options.disableStdin = false;
1372
+ this._isExiting = false;
1373
+ }
1374
+ if (reset) {
1375
+ xterm.clearDecorations();
1376
+ }
1377
+ }
1378
+ this.statusList.remove("relaunch-needed" );
1379
+ if (!reset) {
1380
+ shell.initialText = ' ';
1381
+ }
1382
+ this._shellLaunchConfig = shell;
1383
+ await this._processManager.relaunch(this._shellLaunchConfig, this._cols || 80 , this._rows || 30 , reset).then(result => {
1384
+ if (result) {
1385
+ if ('message' in result) {
1386
+ this._onProcessExit(result);
1387
+ }
1388
+ else if ('injectedArgs' in result) {
1389
+ this._injectedArgs = result.injectedArgs;
1390
+ }
1391
+ }
1392
+ });
1393
+ }
1394
+ relaunch() {
1395
+ this.reuseTerminal(this._shellLaunchConfig, true);
1396
+ }
1397
+ _onTitleChange(title) {
1398
+ if (this.isTitleSetByProcess) {
1399
+ this._setTitle(title, TitleEventSource.Sequence);
1400
+ }
1401
+ }
1402
+ async _trust() {
1403
+ return (await this._workspaceTrustRequestService.requestWorkspaceTrust({
1404
+ message: ( localize(9063, "Creating a terminal process requires executing code"))
1405
+ })) === true;
1406
+ }
1407
+ async _onSelectionChange() {
1408
+ this._onDidChangeSelection.fire(this);
1409
+ if (this._configurationService.getValue("terminal.integrated.copyOnSelection" )) {
1410
+ if (this._overrideCopySelection === false) {
1411
+ return;
1412
+ }
1413
+ if (this.hasSelection()) {
1414
+ await this.copySelection();
1415
+ }
1416
+ }
1417
+ }
1418
+ overrideCopyOnSelection(value) {
1419
+ if (this._overrideCopySelection !== undefined) {
1420
+ throw ( (new Error('Cannot set a copy on selection override multiple times')));
1421
+ }
1422
+ this._overrideCopySelection = value;
1423
+ return toDisposable(() => this._overrideCopySelection = undefined);
1424
+ }
1425
+ async _updateProcessCwd() {
1426
+ if (this.isDisposed || this.shellLaunchConfig.customPtyImplementation) {
1427
+ return;
1428
+ }
1429
+ try {
1430
+ const cwd = await this._refreshProperty("cwd" );
1431
+ if (typeof cwd !== 'string') {
1432
+ throw ( (new Error(`cwd is not a string ${cwd}`)));
1433
+ }
1434
+ }
1435
+ catch (e) {
1436
+ if (e instanceof Error && e.message === 'Cannot refresh property when process is not set') {
1437
+ return;
1438
+ }
1439
+ throw e;
1440
+ }
1441
+ }
1442
+ updateConfig() {
1443
+ this._setCommandsToSkipShell(this._terminalConfigurationService.config.commandsToSkipShell);
1444
+ this._refreshEnvironmentVariableInfoWidgetState(this._processManager.environmentVariableInfo);
1445
+ }
1446
+ async _updateUnicodeVersion() {
1447
+ this._processManager.setUnicodeVersion(this._terminalConfigurationService.config.unicodeVersion);
1448
+ }
1449
+ updateAccessibilitySupport() {
1450
+ this.xterm.raw.options.screenReaderMode = this._accessibilityService.isScreenReaderOptimized();
1451
+ }
1452
+ _setCommandsToSkipShell(commands) {
1453
+ const excludeCommands = ( (commands.filter(command => command[0] === '-').map(command => command.slice(1))));
1454
+ this._skipTerminalCommands = DEFAULT_COMMANDS_TO_SKIP_SHELL.filter(defaultCommand => {
1455
+ return !excludeCommands.includes(defaultCommand);
1456
+ }).concat(commands);
1457
+ }
1458
+ layout(dimension) {
1459
+ this._lastLayoutDimensions = dimension;
1460
+ if (this.disableLayout) {
1461
+ return;
1462
+ }
1463
+ if (dimension.width <= 0 || dimension.height <= 0) {
1464
+ return;
1465
+ }
1466
+ const terminalWidth = this._evaluateColsAndRows(dimension.width, dimension.height);
1467
+ if (!terminalWidth) {
1468
+ return;
1469
+ }
1470
+ this._resize();
1471
+ if (!this._containerReadyBarrier.isOpen()) {
1472
+ this._containerReadyBarrier.open();
1473
+ }
1474
+ for (const contribution of ( (this._contributions.values()))) {
1475
+ if (!this.xterm) {
1476
+ this._xtermReadyPromise.then(xterm => contribution.layout?.(xterm, dimension));
1477
+ }
1478
+ else {
1479
+ contribution.layout?.(this.xterm, dimension);
1480
+ }
1481
+ }
1482
+ }
1483
+ async _resize(immediate) {
1484
+ if (!this.xterm) {
1485
+ return;
1486
+ }
1487
+ let cols = this.cols;
1488
+ let rows = this.rows;
1489
+ if (this._isVisible && this._layoutSettingsChanged) {
1490
+ const font = this.xterm.getFont();
1491
+ const config = this._terminalConfigurationService.config;
1492
+ this.xterm.raw.options.letterSpacing = font.letterSpacing;
1493
+ this.xterm.raw.options.lineHeight = font.lineHeight;
1494
+ this.xterm.raw.options.fontSize = font.fontSize;
1495
+ this.xterm.raw.options.fontFamily = font.fontFamily;
1496
+ this.xterm.raw.options.fontWeight = config.fontWeight;
1497
+ this.xterm.raw.options.fontWeightBold = config.fontWeightBold;
1498
+ this._initDimensions();
1499
+ cols = this.cols;
1500
+ rows = this.rows;
1501
+ this._layoutSettingsChanged = false;
1502
+ }
1503
+ if (isNaN(cols) || isNaN(rows)) {
1504
+ return;
1505
+ }
1506
+ if (cols !== this.xterm.raw.cols || rows !== this.xterm.raw.rows) {
1507
+ if (this._fixedRows || this._fixedCols) {
1508
+ await this._updateProperty("fixedDimensions" , { cols: this._fixedCols, rows: this._fixedRows });
1509
+ }
1510
+ this._onDimensionsChanged.fire();
1511
+ }
1512
+ TerminalInstance_1._lastKnownGridDimensions = { cols, rows };
1513
+ this._resizeDebouncer.resize(cols, rows, immediate ?? false);
1514
+ }
1515
+ async _updatePtyDimensions(rawXterm) {
1516
+ await this._processManager.setDimensions(rawXterm.cols, rawXterm.rows);
1517
+ }
1518
+ setShellType(shellType) {
1519
+ if (this._shellType === shellType) {
1520
+ return;
1521
+ }
1522
+ if (shellType) {
1523
+ this._shellType = shellType;
1524
+ this._terminalShellTypeContextKey.set(shellType?.toString());
1525
+ this._onDidChangeShellType.fire(shellType);
1526
+ }
1527
+ }
1528
+ _setAriaLabel(xterm, terminalId, title) {
1529
+ const labelParts = [];
1530
+ if (xterm && xterm.textarea) {
1531
+ if (title && title.length > 0) {
1532
+ labelParts.push(( localize(9064, "Terminal {0}, {1}", terminalId, title)));
1533
+ }
1534
+ else {
1535
+ labelParts.push(( localize(9065, "Terminal {0}", terminalId)));
1536
+ }
1537
+ const screenReaderOptimized = this._accessibilityService.isScreenReaderOptimized();
1538
+ if (!screenReaderOptimized) {
1539
+ labelParts.push(( localize(
1540
+ 9066,
1541
+ "Run the command: Toggle Screen Reader Accessibility Mode for an optimized screen reader experience"
1542
+ )));
1543
+ }
1544
+ const accessibilityHelpKeybinding = this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp" )?.getLabel();
1545
+ if (this._configurationService.getValue("accessibility.verbosity.terminal" ) && accessibilityHelpKeybinding) {
1546
+ labelParts.push(( localize(
1547
+ 9067,
1548
+ "Use {0} for terminal accessibility help",
1549
+ accessibilityHelpKeybinding
1550
+ )));
1551
+ }
1552
+ xterm.textarea.setAttribute('aria-label', labelParts.join('\n'));
1553
+ }
1554
+ }
1555
+ _updateTitleProperties(title, eventSource) {
1556
+ if (!title) {
1557
+ return this._processName;
1558
+ }
1559
+ switch (eventSource) {
1560
+ case TitleEventSource.Process:
1561
+ if (this._processManager.os === 1 ) {
1562
+ title = win32.parse(title).name;
1563
+ }
1564
+ else {
1565
+ const firstSpaceIndex = title.indexOf(' ');
1566
+ if (title.startsWith('/')) {
1567
+ title = basename(title);
1568
+ }
1569
+ else if (firstSpaceIndex > -1) {
1570
+ title = title.substring(0, firstSpaceIndex);
1571
+ }
1572
+ }
1573
+ this._processName = title;
1574
+ break;
1575
+ case TitleEventSource.Api:
1576
+ this._staticTitle = title;
1577
+ this._messageTitleDisposable.value = undefined;
1578
+ break;
1579
+ case TitleEventSource.Sequence:
1580
+ this._sequence = title;
1581
+ if (this._processManager.os === 1 &&
1582
+ title.match(/^[a-zA-Z]:\\.+\.[a-zA-Z]{1,3}/)) {
1583
+ this._sequence = win32.parse(title).name;
1584
+ }
1585
+ break;
1586
+ }
1587
+ this._titleSource = eventSource;
1588
+ return title;
1589
+ }
1590
+ setOverrideDimensions(dimensions, immediate = false) {
1591
+ if (this._dimensionsOverride && this._dimensionsOverride.forceExactSize && !dimensions && this._rows === 0 && this._cols === 0) {
1592
+ this._cols = this._dimensionsOverride.cols;
1593
+ this._rows = this._dimensionsOverride.rows;
1594
+ }
1595
+ this._dimensionsOverride = dimensions;
1596
+ if (immediate) {
1597
+ this._resize(true);
1598
+ }
1599
+ else {
1600
+ this._resize();
1601
+ }
1602
+ }
1603
+ async setFixedDimensions() {
1604
+ const cols = await this._quickInputService.input({
1605
+ title: ( localize(9068, "Set Fixed Dimensions: Column")),
1606
+ placeHolder: 'Enter a number of columns or leave empty for automatic width',
1607
+ validateInput: async (text) => text.length > 0 && !text.match(/^\d+$/) ? { content: 'Enter a number or leave empty size automatically', severity: Severity$1.Error } : undefined
1608
+ });
1609
+ if (cols === undefined) {
1610
+ return;
1611
+ }
1612
+ this._fixedCols = this._parseFixedDimension(cols);
1613
+ this._labelComputer?.refreshLabel(this);
1614
+ this._terminalHasFixedWidth.set(!!this._fixedCols);
1615
+ const rows = await this._quickInputService.input({
1616
+ title: ( localize(9069, "Set Fixed Dimensions: Row")),
1617
+ placeHolder: 'Enter a number of rows or leave empty for automatic height',
1618
+ validateInput: async (text) => text.length > 0 && !text.match(/^\d+$/) ? { content: 'Enter a number or leave empty size automatically', severity: Severity$1.Error } : undefined
1619
+ });
1620
+ if (rows === undefined) {
1621
+ return;
1622
+ }
1623
+ this._fixedRows = this._parseFixedDimension(rows);
1624
+ this._labelComputer?.refreshLabel(this);
1625
+ await this._refreshScrollbar();
1626
+ this._resize();
1627
+ this.focus();
1628
+ }
1629
+ _parseFixedDimension(value) {
1630
+ if (value === '') {
1631
+ return undefined;
1632
+ }
1633
+ const parsed = parseInt(value);
1634
+ if (parsed <= 0) {
1635
+ throw ( (new Error(`Could not parse dimension "${value}"`)));
1636
+ }
1637
+ return parsed;
1638
+ }
1639
+ async toggleSizeToContentWidth() {
1640
+ if (!this.xterm?.raw.buffer.active) {
1641
+ return;
1642
+ }
1643
+ if (this._hasScrollBar) {
1644
+ this._terminalHasFixedWidth.set(false);
1645
+ this._fixedCols = undefined;
1646
+ this._fixedRows = undefined;
1647
+ this._hasScrollBar = false;
1648
+ this._initDimensions();
1649
+ await this._resize();
1650
+ }
1651
+ else {
1652
+ const font = this.xterm ? this.xterm.getFont() : this._terminalConfigurationService.getFont(getWindow(this.domElement));
1653
+ const maxColsForTexture = Math.floor(4096 / (font.charWidth ?? 20));
1654
+ const proposedCols = Math.max(this.maxCols, Math.min(this.xterm.getLongestViewportWrappedLineLength(), maxColsForTexture));
1655
+ if (proposedCols > this.xterm.raw.cols) {
1656
+ this._fixedCols = proposedCols;
1657
+ }
1658
+ }
1659
+ await this._refreshScrollbar();
1660
+ this._labelComputer?.refreshLabel(this);
1661
+ this.focus();
1662
+ }
1663
+ _refreshScrollbar() {
1664
+ if (this._fixedCols || this._fixedRows) {
1665
+ return this._addScrollbar();
1666
+ }
1667
+ return this._removeScrollbar();
1668
+ }
1669
+ async _addScrollbar() {
1670
+ const charWidth = (this.xterm ? this.xterm.getFont() : this._terminalConfigurationService.getFont(getWindow(this.domElement))).charWidth;
1671
+ if (!this.xterm?.raw.element || !this._container || !charWidth || !this._fixedCols) {
1672
+ return;
1673
+ }
1674
+ this._wrapperElement.classList.add('fixed-dims');
1675
+ this._hasScrollBar = true;
1676
+ this._initDimensions();
1677
+ await this._resize();
1678
+ this._terminalHasFixedWidth.set(true);
1679
+ if (!this._horizontalScrollbar) {
1680
+ this._horizontalScrollbar = this._register(( (new DomScrollableElement(this._wrapperElement, {
1681
+ vertical: 2 ,
1682
+ horizontal: 1 ,
1683
+ useShadows: false,
1684
+ scrollYToX: false,
1685
+ consumeMouseWheelIfScrollbarIsNeeded: false
1686
+ }))));
1687
+ this._container.appendChild(this._horizontalScrollbar.getDomNode());
1688
+ }
1689
+ this._horizontalScrollbar.setScrollDimensions({
1690
+ width: this.xterm.raw.element.clientWidth,
1691
+ scrollWidth: this._fixedCols * charWidth + 40
1692
+ });
1693
+ this._horizontalScrollbar.getDomNode().style.paddingBottom = '16px';
1694
+ if (isWindows) {
1695
+ for (let i = this.xterm.raw.buffer.active.viewportY; i < this.xterm.raw.buffer.active.length; i++) {
1696
+ const line = this.xterm.raw.buffer.active.getLine(i);
1697
+ line._line.isWrapped = false;
1698
+ }
1699
+ }
1700
+ }
1701
+ async _removeScrollbar() {
1702
+ if (!this._container || !this._horizontalScrollbar) {
1703
+ return;
1704
+ }
1705
+ this._horizontalScrollbar.getDomNode().remove();
1706
+ this._horizontalScrollbar.dispose();
1707
+ this._horizontalScrollbar = undefined;
1708
+ this._wrapperElement.remove();
1709
+ this._wrapperElement.classList.remove('fixed-dims');
1710
+ this._container.appendChild(this._wrapperElement);
1711
+ }
1712
+ _setResolvedShellLaunchConfig(shellLaunchConfig) {
1713
+ this._shellLaunchConfig.args = shellLaunchConfig.args;
1714
+ this._shellLaunchConfig.cwd = shellLaunchConfig.cwd;
1715
+ this._shellLaunchConfig.executable = shellLaunchConfig.executable;
1716
+ this._shellLaunchConfig.env = shellLaunchConfig.env;
1717
+ }
1718
+ _onEnvironmentVariableInfoChanged(info) {
1719
+ if (info.requiresAction) {
1720
+ this.xterm?.raw.textarea?.setAttribute('aria-label', ( localize(
1721
+ 9070,
1722
+ "Terminal {0} environment is stale, run the 'Show Environment Information' command for more information",
1723
+ this._instanceId
1724
+ )));
1725
+ }
1726
+ this._refreshEnvironmentVariableInfoWidgetState(info);
1727
+ }
1728
+ async _refreshEnvironmentVariableInfoWidgetState(info) {
1729
+ if (!info) {
1730
+ this.statusList.remove("relaunch-needed" );
1731
+ this.statusList.remove("env-var-info-changes-active" );
1732
+ return;
1733
+ }
1734
+ if (
1735
+ info.requiresAction &&
1736
+ this._terminalConfigurationService.config.environmentChangesRelaunch &&
1737
+ !this._processManager.hasWrittenData &&
1738
+ (!this._shellLaunchConfig.isFeatureTerminal || (this.reconnectionProperties && this._configurationService.getValue('task.reconnection') === true)) &&
1739
+ !this._shellLaunchConfig.customPtyImplementation &&
1740
+ !this._shellLaunchConfig.isExtensionOwnedTerminal &&
1741
+ !this._shellLaunchConfig.attachPersistentProcess &&
1742
+ !((this._processManager.remoteAuthority && this._terminalConfigurationService.config.windowsEnableConpty && (await this._processManager.getBackendOS()) === 1) )) {
1743
+ this.relaunch();
1744
+ return;
1745
+ }
1746
+ const workspaceFolder = getWorkspaceForTerminal(this.shellLaunchConfig.cwd, this._workspaceContextService, this._historyService);
1747
+ this.statusList.add(info.getStatus({ workspaceFolder }));
1748
+ }
1749
+ async getInitialCwd() {
1750
+ if (!this._initialCwd) {
1751
+ this._initialCwd = this._processManager.initialCwd;
1752
+ }
1753
+ return this._initialCwd;
1754
+ }
1755
+ async getCwd() {
1756
+ if (( (this.capabilities.has(0 )))) {
1757
+ return this.capabilities.get(0 ).getCwd();
1758
+ }
1759
+ else if (( (this.capabilities.has(1 )))) {
1760
+ return this.capabilities.get(1 ).getCwd();
1761
+ }
1762
+ return this._processManager.initialCwd;
1763
+ }
1764
+ async _refreshProperty(type) {
1765
+ await this.processReady;
1766
+ return this._processManager.refreshProperty(type);
1767
+ }
1768
+ async _updateProperty(type, value) {
1769
+ return this._processManager.updateProperty(type, value);
1770
+ }
1771
+ async rename(title) {
1772
+ this._setTitle(title, TitleEventSource.Api);
1773
+ }
1774
+ _setTitle(title, eventSource) {
1775
+ const reset = !title;
1776
+ title = this._updateTitleProperties(title, eventSource);
1777
+ const titleChanged = title !== this._title;
1778
+ this._title = title;
1779
+ this._labelComputer?.refreshLabel(this, reset);
1780
+ this._setAriaLabel(this.xterm?.raw, this._instanceId, this._title);
1781
+ if (titleChanged) {
1782
+ this._onTitleChanged.fire(this);
1783
+ }
1784
+ }
1785
+ async changeIcon(icon) {
1786
+ if (icon) {
1787
+ this._icon = icon;
1788
+ this._onIconChanged.fire({ instance: this, userInitiated: true });
1789
+ return icon;
1790
+ }
1791
+ const iconPicker = this._scopedInstantiationService.createInstance(TerminalIconPicker);
1792
+ const pickedIcon = await iconPicker.pickIcons();
1793
+ iconPicker.dispose();
1794
+ if (!pickedIcon) {
1795
+ return undefined;
1796
+ }
1797
+ this._icon = pickedIcon;
1798
+ this._onIconChanged.fire({ instance: this, userInitiated: true });
1799
+ return pickedIcon;
1800
+ }
1801
+ async changeColor(color, skipQuickPick) {
1802
+ if (color) {
1803
+ this.shellLaunchConfig.color = color;
1804
+ this._onIconChanged.fire({ instance: this, userInitiated: true });
1805
+ return color;
1806
+ }
1807
+ else if (skipQuickPick) {
1808
+ this.shellLaunchConfig.color = '';
1809
+ this._onIconChanged.fire({ instance: this, userInitiated: true });
1810
+ return;
1811
+ }
1812
+ const icon = this._getIcon();
1813
+ if (!icon) {
1814
+ return;
1815
+ }
1816
+ const colorTheme = this._themeService.getColorTheme();
1817
+ const standardColors = getStandardColors(colorTheme);
1818
+ const colorStyleDisposable = createColorStyleElement(colorTheme);
1819
+ const items = [];
1820
+ for (const colorKey of standardColors) {
1821
+ const colorClass = getColorClass(colorKey);
1822
+ items.push({
1823
+ label: `$(${Codicon.circleFilled.id}) ${colorKey.replace('terminal.ansi', '')}`, id: colorKey, description: colorKey, iconClasses: [colorClass]
1824
+ });
1825
+ }
1826
+ items.push({ type: 'separator' });
1827
+ const showAllColorsItem = { label: 'Reset to default' };
1828
+ items.push(showAllColorsItem);
1829
+ const disposables = [];
1830
+ const quickPick = this._quickInputService.createQuickPick({ useSeparators: true });
1831
+ disposables.push(quickPick);
1832
+ quickPick.items = items;
1833
+ quickPick.matchOnDescription = true;
1834
+ quickPick.placeholder = ( localize(9071, 'Select a color for the terminal'));
1835
+ quickPick.show();
1836
+ const result = await ( (new Promise(r => {
1837
+ disposables.push(quickPick.onDidHide(() => r(undefined)));
1838
+ disposables.push(quickPick.onDidAccept(() => r(quickPick.selectedItems[0])));
1839
+ })));
1840
+ dispose(disposables);
1841
+ if (result) {
1842
+ this.shellLaunchConfig.color = result.id;
1843
+ this._onIconChanged.fire({ instance: this, userInitiated: true });
1844
+ }
1845
+ quickPick.hide();
1846
+ colorStyleDisposable.dispose();
1847
+ return result?.id;
1848
+ }
1849
+ forceScrollbarVisibility() {
1850
+ this._wrapperElement.classList.add('force-scrollbar');
1851
+ }
1852
+ resetScrollbarVisibility() {
1853
+ this._wrapperElement.classList.remove('force-scrollbar');
1854
+ }
1855
+ setParentContextKeyService(parentContextKeyService) {
1856
+ this._scopedContextKeyService.updateParent(parentContextKeyService);
1857
+ }
1858
+ async handleMouseEvent(event, contextMenu) {
1859
+ if (isHTMLElement(event.target) && (event.target.classList.contains('scrollbar') || event.target.classList.contains('slider'))) {
1860
+ return { cancelContextMenu: true };
1861
+ }
1862
+ if (event.which === 2) {
1863
+ switch (this._terminalConfigurationService.config.middleClickBehavior) {
1864
+ case 'paste':
1865
+ this.paste();
1866
+ break;
1867
+ case 'default':
1868
+ default:
1869
+ this.focus();
1870
+ break;
1871
+ }
1872
+ return;
1873
+ }
1874
+ if (event.which === 3) {
1875
+ const rightClickBehavior = this._terminalConfigurationService.config.rightClickBehavior;
1876
+ if (rightClickBehavior === 'nothing') {
1877
+ if (!event.shiftKey) {
1878
+ return { cancelContextMenu: true };
1879
+ }
1880
+ return;
1881
+ }
1882
+ else if (rightClickBehavior === 'copyPaste' || rightClickBehavior === 'paste') {
1883
+ if (rightClickBehavior === 'copyPaste' && event.shiftKey) {
1884
+ openContextMenu(getActiveWindow(), event, this, contextMenu, this._contextMenuService);
1885
+ return;
1886
+ }
1887
+ if (rightClickBehavior === 'copyPaste' && this.hasSelection()) {
1888
+ await this.copySelection();
1889
+ this.clearSelection();
1890
+ }
1891
+ else {
1892
+ if (BrowserFeatures.clipboard.readText) {
1893
+ this.paste();
1894
+ }
1895
+ else {
1896
+ this._notificationService.info(`This browser doesn't support the clipboard.readText API needed to trigger a paste, try ${isMacintosh ? '⌘' : 'Ctrl'}+V instead.`);
1897
+ }
1898
+ }
1899
+ if (isMacintosh) {
1900
+ setTimeout(() => this.clearSelection(), 0);
1901
+ }
1902
+ return { cancelContextMenu: true };
1903
+ }
1904
+ }
1905
+ }
1906
+ };
1907
+ TerminalInstance.__decorator = ( (__decorate([
1908
+ debounce(50)
1909
+ ], TerminalInstance.prototype, "_fireMaximumDimensionsChanged", null)));
1910
+ TerminalInstance.__decorator = ( (__decorate([
1911
+ debounce(1000)
1912
+ ], TerminalInstance.prototype, "relaunch", null)));
1913
+ TerminalInstance.__decorator = ( (__decorate([
1914
+ debounce(2000)
1915
+ ], TerminalInstance.prototype, "_updateProcessCwd", null)));
1916
+ TerminalInstance = TerminalInstance_1 = ( (__decorate([
1917
+ ( (__param(3, IContextKeyService))),
1918
+ ( (__param(4, IContextMenuService))),
1919
+ ( (__param(5, IInstantiationService))),
1920
+ ( (__param(6, ITerminalConfigurationService))),
1921
+ ( (__param(7, ITerminalProfileResolverService))),
1922
+ ( (__param(8, IPathService))),
1923
+ ( (__param(9, IKeybindingService))),
1924
+ ( (__param(10, INotificationService))),
1925
+ ( (__param(11, IPreferencesService))),
1926
+ ( (__param(12, IViewsService))),
1927
+ ( (__param(13, IClipboardService))),
1928
+ ( (__param(14, IThemeService))),
1929
+ ( (__param(15, IConfigurationService))),
1930
+ ( (__param(16, ITerminalLogService))),
1931
+ ( (__param(17, IStorageService))),
1932
+ ( (__param(18, IAccessibilityService))),
1933
+ ( (__param(19, IProductService))),
1934
+ ( (__param(20, IQuickInputService))),
1935
+ ( (__param(21, IWorkbenchEnvironmentService))),
1936
+ ( (__param(22, IWorkspaceContextService))),
1937
+ ( (__param(23, IEditorService))),
1938
+ ( (__param(24, IWorkspaceTrustRequestService))),
1939
+ ( (__param(25, IHistoryService))),
1940
+ ( (__param(26, ITelemetryService))),
1941
+ ( (__param(27, IOpenerService))),
1942
+ ( (__param(28, ICommandService))),
1943
+ ( (__param(29, IAccessibilitySignalService))),
1944
+ ( (__param(30, IViewDescriptorService)))
1945
+ ], TerminalInstance)));
1946
+ let TerminalInstanceDragAndDropController = class TerminalInstanceDragAndDropController extends Disposable {
1947
+ get onDropFile() { return this._onDropFile.event; }
1948
+ get onDropTerminal() { return this._onDropTerminal.event; }
1949
+ constructor(_container, _layoutService, _viewDescriptorService, _hostService) {
1950
+ super();
1951
+ this._container = _container;
1952
+ this._layoutService = _layoutService;
1953
+ this._viewDescriptorService = _viewDescriptorService;
1954
+ this._hostService = _hostService;
1955
+ this._onDropFile = this._register(( (new Emitter())));
1956
+ this._onDropTerminal = this._register(( (new Emitter())));
1957
+ this._register(toDisposable(() => this._clearDropOverlay()));
1958
+ }
1959
+ _clearDropOverlay() {
1960
+ this._dropOverlay?.remove();
1961
+ this._dropOverlay = undefined;
1962
+ }
1963
+ onDragEnter(e) {
1964
+ if (!containsDragType(e, DataTransfers.FILES, DataTransfers.RESOURCES, "Terminals" , CodeDataTransfers.FILES)) {
1965
+ return;
1966
+ }
1967
+ if (!this._dropOverlay) {
1968
+ this._dropOverlay = document.createElement('div');
1969
+ this._dropOverlay.classList.add('terminal-drop-overlay');
1970
+ }
1971
+ if (containsDragType(e, "Terminals" )) {
1972
+ const side = this._getDropSide(e);
1973
+ this._dropOverlay.classList.toggle('drop-before', side === 'before');
1974
+ this._dropOverlay.classList.toggle('drop-after', side === 'after');
1975
+ }
1976
+ if (!this._dropOverlay.parentElement) {
1977
+ this._container.appendChild(this._dropOverlay);
1978
+ }
1979
+ }
1980
+ onDragLeave(e) {
1981
+ this._clearDropOverlay();
1982
+ }
1983
+ onDragEnd(e) {
1984
+ this._clearDropOverlay();
1985
+ }
1986
+ onDragOver(e) {
1987
+ if (!e.dataTransfer || !this._dropOverlay) {
1988
+ return;
1989
+ }
1990
+ if (containsDragType(e, "Terminals" )) {
1991
+ const side = this._getDropSide(e);
1992
+ this._dropOverlay.classList.toggle('drop-before', side === 'before');
1993
+ this._dropOverlay.classList.toggle('drop-after', side === 'after');
1994
+ }
1995
+ this._dropOverlay.style.opacity = '1';
1996
+ }
1997
+ async onDrop(e) {
1998
+ this._clearDropOverlay();
1999
+ if (!e.dataTransfer) {
2000
+ return;
2001
+ }
2002
+ const terminalResources = getTerminalResourcesFromDragEvent(e);
2003
+ if (terminalResources) {
2004
+ for (const uri of terminalResources) {
2005
+ const side = this._getDropSide(e);
2006
+ this._onDropTerminal.fire({ uri, side });
2007
+ }
2008
+ return;
2009
+ }
2010
+ let path;
2011
+ const rawResources = e.dataTransfer.getData(DataTransfers.RESOURCES);
2012
+ if (rawResources) {
2013
+ path = ( (URI.parse(JSON.parse(rawResources)[0])));
2014
+ }
2015
+ const rawCodeFiles = e.dataTransfer.getData(CodeDataTransfers.FILES);
2016
+ if (!path && rawCodeFiles) {
2017
+ path = URI.file(JSON.parse(rawCodeFiles)[0]);
2018
+ }
2019
+ if (!path && e.dataTransfer.files.length > 0 && this._hostService.getPathForFile(e.dataTransfer.files[0])) {
2020
+ path = URI.file(this._hostService.getPathForFile(e.dataTransfer.files[0]));
2021
+ }
2022
+ if (!path) {
2023
+ return;
2024
+ }
2025
+ this._onDropFile.fire(path);
2026
+ }
2027
+ _getDropSide(e) {
2028
+ const target = this._container;
2029
+ if (!target) {
2030
+ return 'after';
2031
+ }
2032
+ const rect = target.getBoundingClientRect();
2033
+ return this._getViewOrientation() === 1
2034
+ ? (e.clientX - rect.left < rect.width / 2 ? 'before' : 'after')
2035
+ : (e.clientY - rect.top < rect.height / 2 ? 'before' : 'after');
2036
+ }
2037
+ _getViewOrientation() {
2038
+ const panelPosition = this._layoutService.getPanelPosition();
2039
+ const terminalLocation = this._viewDescriptorService.getViewLocationById(TERMINAL_VIEW_ID);
2040
+ return terminalLocation === 1 && isHorizontal(panelPosition)
2041
+ ? 1
2042
+ : 0 ;
2043
+ }
2044
+ };
2045
+ TerminalInstanceDragAndDropController = ( (__decorate([
2046
+ ( (__param(1, IWorkbenchLayoutService))),
2047
+ ( (__param(2, IViewDescriptorService))),
2048
+ ( (__param(3, IHostService)))
2049
+ ], TerminalInstanceDragAndDropController)));
2050
+ let TerminalLabelComputer = class TerminalLabelComputer extends Disposable {
2051
+ get title() { return this._title; }
2052
+ get description() { return this._description; }
2053
+ constructor(_fileService, _terminalConfigurationService, _workspaceContextService) {
2054
+ super();
2055
+ this._fileService = _fileService;
2056
+ this._terminalConfigurationService = _terminalConfigurationService;
2057
+ this._workspaceContextService = _workspaceContextService;
2058
+ this._title = '';
2059
+ this._description = '';
2060
+ this._onDidChangeLabel = this._register(( (new Emitter())));
2061
+ this.onDidChangeLabel = this._onDidChangeLabel.event;
2062
+ }
2063
+ refreshLabel(instance, reset) {
2064
+ this._title = this.computeLabel(instance, this._terminalConfigurationService.config.tabs.title, "title" , reset);
2065
+ this._description = this.computeLabel(instance, this._terminalConfigurationService.config.tabs.description, "description" );
2066
+ if (this._title !== instance.title || this._description !== instance.description || reset) {
2067
+ this._onDidChangeLabel.fire({ title: this._title, description: this._description });
2068
+ }
2069
+ }
2070
+ computeLabel(instance, labelTemplate, labelType, reset) {
2071
+ const type = instance.shellLaunchConfig.attachPersistentProcess?.type || instance.shellLaunchConfig.type;
2072
+ const templateProperties = {
2073
+ cwd: instance.cwd || instance.initialCwd || '',
2074
+ cwdFolder: '',
2075
+ workspaceFolderName: instance.workspaceFolder?.name,
2076
+ workspaceFolder: instance.workspaceFolder ? basename(instance.workspaceFolder.uri.fsPath) : undefined,
2077
+ local: type === 'Local' ? terminalStrings.typeLocal : undefined,
2078
+ process: instance.processName,
2079
+ sequence: instance.sequence,
2080
+ task: type === 'Task' ? terminalStrings.typeTask : undefined,
2081
+ fixedDimensions: instance.fixedCols
2082
+ ? (instance.fixedRows ? `\u2194${instance.fixedCols} \u2195${instance.fixedRows}` : `\u2194${instance.fixedCols}`)
2083
+ : (instance.fixedRows ? `\u2195${instance.fixedRows}` : ''),
2084
+ separator: { label: this._terminalConfigurationService.config.tabs.separator }
2085
+ };
2086
+ templateProperties.workspaceFolderName = instance.workspaceFolder?.name ?? templateProperties.workspaceFolder;
2087
+ labelTemplate = labelTemplate.trim();
2088
+ if (!labelTemplate) {
2089
+ return labelType === "title" ? (instance.processName || '') : '';
2090
+ }
2091
+ if (!reset && instance.staticTitle && labelType === "title" ) {
2092
+ return instance.staticTitle.replace(/[\n\r\t]/g, '') || templateProperties.process?.replace(/[\n\r\t]/g, '') || '';
2093
+ }
2094
+ const detection = ( (instance.capabilities.has(0 ))) || ( (instance.capabilities.has(1 )));
2095
+ const folders = this._workspaceContextService.getWorkspace().folders;
2096
+ const multiRootWorkspace = folders.length > 1;
2097
+ if (templateProperties.cwd && detection && ((!instance.shellLaunchConfig.isFeatureTerminal || labelType === "title") )) {
2098
+ const cwdUri = ( (URI.from({
2099
+ scheme: instance.workspaceFolder?.uri.scheme || Schemas.file,
2100
+ path: instance.cwd ? resolve(instance.cwd) : undefined
2101
+ })));
2102
+ let showCwd = false;
2103
+ if (multiRootWorkspace) {
2104
+ showCwd = true;
2105
+ }
2106
+ else if (instance.workspaceFolder?.uri) {
2107
+ const caseSensitive = this._fileService.hasCapability(instance.workspaceFolder.uri, 1024 );
2108
+ showCwd = cwdUri.fsPath.localeCompare(instance.workspaceFolder.uri.fsPath, undefined, { sensitivity: caseSensitive ? 'case' : 'base' }) !== 0;
2109
+ }
2110
+ if (showCwd) {
2111
+ templateProperties.cwdFolder = basename(templateProperties.cwd);
2112
+ }
2113
+ }
2114
+ const label = template(labelTemplate, templateProperties).replace(/[\n\r\t]/g, '').trim();
2115
+ return label === '' && labelType === "title" ? (instance.processName || '') : label;
2116
+ }
2117
+ };
2118
+ TerminalLabelComputer = ( (__decorate([
2119
+ ( (__param(0, IFileService))),
2120
+ ( (__param(1, ITerminalConfigurationService))),
2121
+ ( (__param(2, IWorkspaceContextService)))
2122
+ ], TerminalLabelComputer)));
2123
+ function parseExitResult(exitCodeOrError, shellLaunchConfig, processState, initialCwd) {
2124
+ if (exitCodeOrError === undefined || exitCodeOrError === 0) {
2125
+ return { code: exitCodeOrError, message: undefined };
2126
+ }
2127
+ const code = typeof exitCodeOrError === 'number' ? exitCodeOrError : exitCodeOrError.code;
2128
+ let message = undefined;
2129
+ switch (typeof exitCodeOrError) {
2130
+ case 'number': {
2131
+ let commandLine = undefined;
2132
+ if (shellLaunchConfig.executable) {
2133
+ commandLine = shellLaunchConfig.executable;
2134
+ if (typeof shellLaunchConfig.args === 'string') {
2135
+ commandLine += ` ${shellLaunchConfig.args}`;
2136
+ }
2137
+ else if (shellLaunchConfig.args && shellLaunchConfig.args.length) {
2138
+ commandLine += ( (shellLaunchConfig.args.map(a => ` '${a}'`))).join();
2139
+ }
2140
+ }
2141
+ if (processState === 4 ) {
2142
+ if (commandLine) {
2143
+ message = ( localize(
2144
+ 9072,
2145
+ "The terminal process \"{0}\" failed to launch (exit code: {1}).",
2146
+ commandLine,
2147
+ code
2148
+ ));
2149
+ }
2150
+ else {
2151
+ message = ( localize(9073, "The terminal process failed to launch (exit code: {0}).", code));
2152
+ }
2153
+ }
2154
+ else {
2155
+ if (commandLine) {
2156
+ message = ( localize(
2157
+ 9074,
2158
+ "The terminal process \"{0}\" terminated with exit code: {1}.",
2159
+ commandLine,
2160
+ code
2161
+ ));
2162
+ }
2163
+ else {
2164
+ message = ( localize(9075, "The terminal process terminated with exit code: {0}.", code));
2165
+ }
2166
+ }
2167
+ break;
2168
+ }
2169
+ case 'object': {
2170
+ if (( (exitCodeOrError.message.toString())).includes('Could not find pty with id')) {
2171
+ break;
2172
+ }
2173
+ let innerMessage = exitCodeOrError.message;
2174
+ const conptyError = exitCodeOrError.message.match(/.*error code:\s*(\d+).*$/);
2175
+ if (conptyError) {
2176
+ const errorCode = conptyError.length > 1 ? parseInt(conptyError[1]) : undefined;
2177
+ switch (errorCode) {
2178
+ case 5:
2179
+ innerMessage = `Access was denied to the path containing your executable "${shellLaunchConfig.executable}". Manage and change your permissions to get this to work`;
2180
+ break;
2181
+ case 267:
2182
+ innerMessage = `Invalid starting directory "${initialCwd}", review your terminal.integrated.cwd setting`;
2183
+ break;
2184
+ case 1260:
2185
+ 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`;
2186
+ break;
2187
+ }
2188
+ }
2189
+ message = ( localize(9076, "The terminal process failed to launch: {0}.", innerMessage));
2190
+ break;
2191
+ }
2192
+ }
2193
+ return { code, message };
2194
+ }
2195
+ let TerminalInstanceColorProvider = class TerminalInstanceColorProvider {
2196
+ constructor(_instance, _viewDescriptorService) {
2197
+ this._instance = _instance;
2198
+ this._viewDescriptorService = _viewDescriptorService;
2199
+ }
2200
+ getBackgroundColor(theme) {
2201
+ const terminalBackground = theme.getColor(TERMINAL_BACKGROUND_COLOR);
2202
+ if (terminalBackground) {
2203
+ return terminalBackground;
2204
+ }
2205
+ if (this._instance.target === TerminalLocation.Editor) {
2206
+ return theme.getColor(editorBackground);
2207
+ }
2208
+ const location = this._viewDescriptorService.getViewLocationById(TERMINAL_VIEW_ID);
2209
+ if (location === 1 ) {
2210
+ return theme.getColor(PANEL_BACKGROUND);
2211
+ }
2212
+ return theme.getColor(SIDE_BAR_BACKGROUND);
2213
+ }
2214
+ };
2215
+ TerminalInstanceColorProvider = ( (__decorate([
2216
+ ( (__param(1, IViewDescriptorService)))
2217
+ ], TerminalInstanceColorProvider)));
2218
+ export { TerminalInstance, TerminalInstanceColorProvider, TerminalLabelComputer, parseExitResult };