@codingame/monaco-vscode-api 8.0.4 → 9.0.2

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 (696) hide show
  1. package/api.js +9 -10
  2. package/debugProtocol.d.ts +69 -5
  3. package/extensions.d.ts +5 -3
  4. package/extensions.js +1 -1
  5. package/localExtensionHost.js +2 -2
  6. package/missing-services.js +19 -3
  7. package/package.json +9 -8
  8. package/service-override/extensions.d.ts +1 -1
  9. package/service-override/tools/editor.d.ts +4 -4
  10. package/service-override/tools/editor.js +7 -3
  11. package/services.js +2 -2
  12. package/tools.js +1 -1
  13. package/vscode/src/vs/base/browser/browser.js +4 -3
  14. package/vscode/src/vs/base/browser/defaultWorkerFactory.js +83 -13
  15. package/vscode/src/vs/base/browser/dom.js +6 -12
  16. package/vscode/src/vs/base/browser/markdownRenderer.js +57 -68
  17. package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +1 -1
  18. package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +1 -1
  19. package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +3 -3
  20. package/vscode/src/vs/base/browser/ui/button/button.js +26 -1
  21. package/vscode/src/vs/base/browser/ui/dialog/dialog.css.js +1 -1
  22. package/vscode/src/vs/base/browser/ui/dialog/dialog.js +7 -7
  23. package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -1
  24. package/vscode/src/vs/base/browser/ui/findinput/findInput.js +1 -1
  25. package/vscode/src/vs/base/browser/ui/findinput/findInputToggles.js +3 -3
  26. package/vscode/src/vs/base/browser/ui/findinput/replaceInput.js +2 -2
  27. package/vscode/src/vs/base/browser/ui/hover/hover.d.ts +1 -0
  28. package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.d.ts +7 -0
  29. package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +2 -2
  30. package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +8 -6
  31. package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.js +2 -2
  32. package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +6 -6
  33. package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +1 -1
  34. package/vscode/src/vs/base/browser/ui/list/listView.js +2 -2
  35. package/vscode/src/vs/base/browser/ui/menu/menubar.js +1 -1
  36. package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +1 -1
  37. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +1 -1
  38. package/vscode/src/vs/base/browser/ui/table/tableWidget.js +8 -0
  39. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +1 -1
  40. package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +11 -6
  41. package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +1 -1
  42. package/vscode/src/vs/base/common/actions.js +1 -1
  43. package/vscode/src/vs/base/common/amd.js +119 -0
  44. package/vscode/src/vs/base/common/async.d.ts +13 -1
  45. package/vscode/src/vs/base/common/date.js +22 -6
  46. package/vscode/src/vs/base/common/event.d.ts +6 -0
  47. package/vscode/src/vs/base/common/event.js +5 -0
  48. package/vscode/src/vs/base/common/jsonErrorMessages.js +9 -9
  49. package/vscode/src/vs/base/common/keybindingLabels.js +20 -20
  50. package/vscode/src/vs/base/common/network.js +15 -13
  51. package/vscode/src/vs/base/common/performance.js +1 -1
  52. package/vscode/src/vs/base/common/platform.js +3 -1
  53. package/vscode/src/vs/base/common/product.d.ts +0 -1
  54. package/vscode/src/vs/base/common/worker/simpleWorker.js +136 -127
  55. package/vscode/src/vs/editor/browser/controller/mouseHandler.js +18 -66
  56. package/vscode/src/vs/editor/browser/controller/mouseTarget.js +5 -18
  57. package/vscode/src/vs/editor/browser/controller/pointerHandler.js +3 -3
  58. package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +5 -5
  59. package/vscode/src/vs/editor/browser/coreCommands.js +3 -3
  60. package/vscode/src/vs/editor/browser/services/editorWorkerService.js +115 -221
  61. package/vscode/src/vs/editor/browser/services/hoverService/hoverWidget.js +2 -2
  62. package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +5 -2
  63. package/vscode/src/vs/editor/browser/view/viewLayer.js +20 -20
  64. package/vscode/src/vs/editor/browser/view/viewOverlays.js +5 -6
  65. package/vscode/src/vs/editor/browser/view.js +1 -3
  66. package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.js +10 -14
  67. package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +3 -1
  68. package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -3
  69. package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +12 -12
  70. package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +14 -14
  71. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
  72. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -1
  73. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +7 -7
  74. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
  75. package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
  76. package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +4 -4
  77. package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
  78. package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
  79. package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +3 -3
  80. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/colors.js +4 -4
  81. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +15 -5
  82. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +1 -1
  83. package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +59 -50
  84. package/vscode/src/vs/editor/common/config/editorOptions.js +1 -1
  85. package/vscode/src/vs/editor/common/core/editorColorRegistry.js +71 -71
  86. package/vscode/src/vs/editor/common/cursor/cursor.js +1 -1
  87. package/vscode/src/vs/editor/common/cursor/cursorTypeEditOperations.js +1 -1
  88. package/vscode/src/vs/editor/common/editorContextKeys.js +47 -47
  89. package/vscode/src/vs/editor/common/languages/modesRegistry.js +1 -1
  90. package/vscode/src/vs/editor/common/languages.js +29 -28
  91. package/vscode/src/vs/editor/common/model/editStack.js +1 -1
  92. package/vscode/src/vs/editor/common/model/textModel.js +8 -39
  93. package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +84 -74
  94. package/vscode/src/vs/editor/common/model/tokens.js +82 -0
  95. package/vscode/src/vs/editor/common/model/treeSitterTokens.js +69 -0
  96. package/vscode/src/vs/editor/common/model.d.ts +2 -0
  97. package/vscode/src/vs/editor/common/services/editorSimpleWorker.js +39 -241
  98. package/vscode/src/vs/editor/common/services/editorWorker.d.ts +3 -2
  99. package/vscode/src/vs/editor/common/services/editorWorkerBootstrap.js +27 -0
  100. package/vscode/src/vs/editor/common/services/editorWorkerHost.js +10 -0
  101. package/vscode/src/vs/editor/common/services/getIconClasses.js +1 -1
  102. package/vscode/src/vs/editor/common/services/languageService.js +10 -37
  103. package/vscode/src/vs/editor/common/services/modelService.js +6 -17
  104. package/vscode/src/vs/editor/common/services/textModelSync/textModelSync.impl.js +323 -0
  105. package/vscode/src/vs/editor/common/services/treeSitterParserService.js +3 -0
  106. package/vscode/src/vs/editor/common/standaloneStrings.js +57 -28
  107. package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  108. package/vscode/src/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  109. package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  110. package/vscode/src/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  111. package/vscode/src/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  112. package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  113. package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  114. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +28 -28
  115. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  116. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +14 -6
  117. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  118. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +14 -1
  119. package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +41 -29
  120. package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  121. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +2 -2
  122. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +1 -1
  123. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +2 -2
  124. package/vscode/src/vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider.js +13 -13
  125. package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions.js +7 -7
  126. package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +10 -30
  127. package/vscode/src/vs/editor/contrib/comment/browser/comment.js +6 -6
  128. package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  129. package/vscode/src/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  130. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +3 -3
  131. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +12 -15
  132. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  133. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +1 -1
  134. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  135. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  136. package/vscode/src/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  137. package/vscode/src/vs/editor/contrib/find/browser/findController.js +26 -25
  138. package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +27 -27
  139. package/vscode/src/vs/editor/contrib/folding/browser/folding.d.ts +4 -1
  140. package/vscode/src/vs/editor/contrib/folding/browser/folding.js +20 -3
  141. package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  142. package/vscode/src/vs/editor/contrib/folding/browser/foldingModel.d.ts +2 -1
  143. package/vscode/src/vs/editor/contrib/folding/browser/foldingModel.js +5 -13
  144. package/vscode/src/vs/editor/contrib/folding/browser/foldingRanges.d.ts +3 -1
  145. package/vscode/src/vs/editor/contrib/folding/browser/foldingRanges.js +2 -2
  146. package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  147. package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +2 -2
  148. package/vscode/src/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  149. package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  150. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  151. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToSymbol.js +1 -1
  152. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  153. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +9 -4
  154. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  155. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +10 -14
  156. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  157. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  158. package/vscode/src/vs/editor/contrib/hover/browser/{hoverController.js → contentHoverController2.js} +26 -84
  159. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +3 -3
  160. package/vscode/src/vs/editor/contrib/hover/browser/{contentHoverController.js → contentHoverWidgetWrapper.js} +20 -5
  161. package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +5 -5
  162. package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  163. package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +37 -37
  164. package/vscode/src/vs/editor/contrib/hover/browser/hoverContribution.js +4 -2
  165. package/vscode/src/vs/editor/contrib/hover/browser/hoverUtils.js +12 -0
  166. package/vscode/src/vs/editor/contrib/hover/browser/marginHoverController.js +166 -0
  167. package/vscode/src/vs/editor/contrib/hover/browser/marginHoverWidget.js +24 -4
  168. package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  169. package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +7 -6
  170. package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  171. package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  172. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  173. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{commands.js → controller/commands.js} +26 -26
  174. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{inlineCompletionContextKeys.js → controller/inlineCompletionContextKeys.js} +14 -14
  175. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{inlineCompletionsController.js → controller/inlineCompletionsController.js} +35 -35
  176. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{hoverParticipant.js → hintsWidget/hoverParticipant.js} +23 -23
  177. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{inlineCompletionsHintsWidget.css.js → hintsWidget/inlineCompletionsHintsWidget.css.js} +1 -1
  178. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{inlineCompletionsHintsWidget.js → hintsWidget/inlineCompletionsHintsWidget.js} +38 -38
  179. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +3 -3
  180. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.js +2 -2
  181. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{ghostText.js → model/ghostText.js} +5 -5
  182. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{inlineCompletionsModel.js → model/inlineCompletionsModel.js} +27 -27
  183. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{inlineCompletionsSource.js → model/inlineCompletionsSource.js} +16 -16
  184. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{provideInlineCompletions.js → model/provideInlineCompletions.js} +11 -11
  185. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{singleTextEdit.js → model/singleTextEdit.js} +6 -6
  186. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{suggestWidgetInlineCompletionProvider.js → model/suggestWidgetAdaptor.js} +11 -11
  187. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{ghostText.css.js → view/ghostTextView.css.js} +1 -1
  188. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{ghostTextWidget.js → view/ghostTextView.js} +29 -29
  189. package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +1 -1
  190. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +1 -1
  191. package/vscode/src/vs/editor/contrib/inlineEdits/browser/commands.js +6 -6
  192. package/vscode/src/vs/editor/contrib/inlineEdits/browser/consts.js +2 -2
  193. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsModel.js +1 -1
  194. package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  195. package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +30 -30
  196. package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  197. package/vscode/src/vs/editor/contrib/links/browser/links.js +10 -10
  198. package/vscode/src/vs/editor/contrib/message/browser/messageController.js +1 -1
  199. package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  200. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  201. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  202. package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +17 -17
  203. package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  204. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
  205. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  206. package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  207. package/vscode/src/vs/editor/contrib/rename/browser/rename.js +11 -11
  208. package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +6 -8
  209. package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  210. package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  211. package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  212. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  213. package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  214. package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +28 -13
  215. package/vscode/src/vs/editor/contrib/suggest/browser/suggestModel.js +6 -3
  216. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +16 -16
  217. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  218. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  219. package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  220. package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  221. package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  222. package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  223. package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  224. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  225. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js +64 -0
  226. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +62 -89
  227. package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  228. package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +3 -3
  229. package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +0 -1
  230. package/vscode/src/vs/editor/standalone/browser/standaloneServices.d.ts +1 -1
  231. package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +24 -3
  232. package/vscode/src/vs/editor/standalone/browser/standaloneTreeSitterService.js +13 -0
  233. package/vscode/src/vs/nls.js +4 -3
  234. package/vscode/src/vs/nls.messages.js +7 -0
  235. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +49 -49
  236. package/vscode/src/vs/platform/action/common/actionCommonCategories.js +6 -6
  237. package/vscode/src/vs/platform/actionWidget/browser/actionList.js +4 -4
  238. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css.js +1 -1
  239. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  240. package/vscode/src/vs/platform/actions/browser/buttonbar.js +8 -7
  241. package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  242. package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -2
  243. package/vscode/src/vs/platform/actions/common/actions.d.ts +2 -0
  244. package/vscode/src/vs/platform/actions/common/actions.js +2 -0
  245. package/vscode/src/vs/platform/actions/common/menuResetAction.js +1 -1
  246. package/vscode/src/vs/platform/actions/common/menuService.js +17 -7
  247. package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +45 -5
  248. package/vscode/src/vs/platform/clipboard/common/clipboardService.service.d.ts +6 -0
  249. package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  250. package/vscode/src/vs/platform/contextkey/common/contextkeys.js +9 -9
  251. package/vscode/src/vs/platform/contextkey/common/scanner.js +5 -5
  252. package/vscode/src/vs/platform/dialogs/common/dialogs.js +9 -9
  253. package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
  254. package/vscode/src/vs/platform/extensionManagement/common/extensionEnablementService.js +4 -4
  255. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -2
  256. package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
  257. package/vscode/src/vs/platform/extensionManagement/common/extensionStorage.js +1 -1
  258. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +19 -19
  259. package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +16 -10
  260. package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +2 -2
  261. package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  262. package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  263. package/vscode/src/vs/platform/languagePacks/common/languagePacks.js +1 -1
  264. package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +3 -3
  265. package/vscode/src/vs/platform/list/browser/listService.js +27 -27
  266. package/vscode/src/vs/platform/markers/common/markerService.js +0 -1
  267. package/vscode/src/vs/platform/markers/common/markers.js +3 -3
  268. package/vscode/src/vs/platform/quickinput/browser/quickAccess.js +1 -1
  269. package/vscode/src/vs/platform/quickinput/browser/quickInput.js +8 -8
  270. package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +3 -3
  271. package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +11 -8
  272. package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +3 -3
  273. package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +43 -35
  274. package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  275. package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +10 -7
  276. package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +12 -2
  277. package/vscode/src/vs/platform/quickinput/common/quickInput.service.d.ts +10 -1
  278. package/vscode/src/vs/platform/request/common/request.js +14 -14
  279. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.d.ts +19 -4
  280. package/vscode/src/vs/platform/terminal/common/terminal.d.ts +11 -8
  281. package/vscode/src/vs/platform/terminal/common/terminal.js +9 -5
  282. package/vscode/src/vs/platform/theme/common/colorUtils.js +4 -3
  283. package/vscode/src/vs/platform/theme/common/colors/baseColors.js +17 -17
  284. package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +8 -8
  285. package/vscode/src/vs/platform/theme/common/colors/editorColors.js +94 -94
  286. package/vscode/src/vs/platform/theme/common/colors/inputColors.js +45 -45
  287. package/vscode/src/vs/platform/theme/common/colors/listColors.js +37 -33
  288. package/vscode/src/vs/platform/theme/common/colors/menuColors.js +7 -7
  289. package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
  290. package/vscode/src/vs/platform/theme/common/colors/miscColors.js +8 -8
  291. package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  292. package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
  293. package/vscode/src/vs/platform/theme/common/iconRegistry.js +5 -5
  294. package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +42 -42
  295. package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  296. package/vscode/src/vs/platform/userDataSync/common/abstractSynchronizer.js +2 -2
  297. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
  298. package/vscode/src/vs/platform/userDataSync/common/userDataSyncMachines.js +1 -1
  299. package/vscode/src/vs/platform/window/common/window.js +16 -1
  300. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +20 -73
  301. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +98 -52
  302. package/vscode/src/vs/workbench/api/common/extHostComments.js +1 -1
  303. package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
  304. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
  305. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +5 -5
  306. package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +55 -13
  307. package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +5 -5
  308. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +11 -11
  309. package/vscode/src/vs/workbench/api/common/extHostSearch.js +48 -5
  310. package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
  311. package/vscode/src/vs/workbench/api/common/extHostTask.js +2 -1
  312. package/vscode/src/vs/workbench/api/common/extHostTesting.js +22 -9
  313. package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +1 -1
  314. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +147 -48
  315. package/vscode/src/vs/workbench/api/common/extHostTypes.js +17 -10
  316. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +230 -80
  317. package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +12 -12
  318. package/vscode/src/vs/workbench/api/worker/extensionHostWorker.esm.js +3 -0
  319. package/vscode/src/vs/workbench/browser/actions/developerActions.js +31 -31
  320. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +154 -148
  321. package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
  322. package/vscode/src/vs/workbench/browser/actions/windowActions.js +25 -25
  323. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +21 -21
  324. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +4 -4
  325. package/vscode/src/vs/workbench/browser/editor.js +2 -2
  326. package/vscode/src/vs/workbench/browser/labels.js +2 -2
  327. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +11 -11
  328. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +11 -11
  329. package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +1 -1
  330. package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +3 -3
  331. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +41 -41
  332. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +11 -11
  333. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +1 -1
  334. package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +6 -6
  335. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +131 -131
  336. package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +2 -2
  337. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +16 -16
  338. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +7 -7
  339. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +13 -13
  340. package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +2 -2
  341. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +9 -9
  342. package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +5 -5
  343. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +74 -72
  344. package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +2 -2
  345. package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +1 -1
  346. package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +19 -9
  347. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -1
  348. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +1 -1
  349. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +3 -3
  350. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
  351. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +15 -15
  352. package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsCenter.css.js +1 -1
  353. package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsList.css.js +1 -1
  354. package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsToasts.css.js +1 -1
  355. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.js +17 -17
  356. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsAlerts.js +3 -3
  357. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +6 -6
  358. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +9 -9
  359. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsList.js +6 -6
  360. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsStatus.js +13 -13
  361. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +2 -2
  362. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +4 -4
  363. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +34 -34
  364. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +18 -18
  365. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +2 -2
  366. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -1
  367. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +7 -7
  368. package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +1 -1
  369. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +4 -4
  370. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +9 -6
  371. package/vscode/src/vs/workbench/browser/quickaccess.js +1 -1
  372. package/vscode/src/vs/workbench/browser/window.js +24 -17
  373. package/vscode/src/vs/workbench/browser/workbench.contribution.js +217 -217
  374. package/vscode/src/vs/workbench/common/configuration.js +10 -10
  375. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +1 -1
  376. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +1 -1
  377. package/vscode/src/vs/workbench/common/editor/textEditorModel.js +1 -1
  378. package/vscode/src/vs/workbench/common/theme.js +156 -156
  379. package/vscode/src/vs/workbench/common/views.js +5 -5
  380. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +178 -137
  381. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +13 -13
  382. package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +6 -0
  383. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +88 -61
  384. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +4 -4
  385. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
  386. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +289 -0
  387. package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +1 -1
  388. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +11 -11
  389. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +2 -2
  390. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.js +8 -8
  391. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.js +1 -1
  392. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +1 -1
  393. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +3 -2
  394. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +15 -9
  395. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +31 -74
  396. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.js +3 -0
  397. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +1 -1
  398. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatConfirmationWidget.css.js +1 -1
  399. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +2 -2
  400. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +5 -12
  401. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +73 -60
  402. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +139 -50
  403. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +36 -19
  404. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownRenderer.js +26 -3
  405. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +39 -31
  406. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
  407. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +50 -37
  408. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +7 -20
  409. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
  410. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +62 -1
  411. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +6 -6
  412. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +36 -17
  413. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +105 -40
  414. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +35 -2
  415. package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +12 -5
  416. package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +13 -1
  417. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +17 -21
  418. package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +17 -1
  419. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +3 -0
  420. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +6 -6
  421. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +15 -15
  422. package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +10 -10
  423. package/vscode/src/vs/workbench/contrib/codeActions/common/documentationExtensionPoint.js +6 -6
  424. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
  425. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
  426. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
  427. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +10 -10
  428. package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
  429. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +6 -6
  430. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +15 -6
  431. package/vscode/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.js +33 -1
  432. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +13 -34
  433. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
  434. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
  435. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
  436. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
  437. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
  438. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +7 -7
  439. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +5 -5
  440. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +3 -3
  441. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +4 -4
  442. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +3 -3
  443. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +18 -4
  444. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +15 -4
  445. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +0 -8
  446. package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +10 -10
  447. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +7 -6
  448. package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +13 -6
  449. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +17 -13
  450. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +64 -30
  451. package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +85 -11
  452. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +7 -7
  453. package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +6 -4
  454. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +9 -9
  455. package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +30 -0
  456. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +3 -3
  457. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +15 -9
  458. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +65 -60
  459. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +21 -16
  460. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +75 -74
  461. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +2 -2
  462. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -12
  463. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +45 -41
  464. package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +57 -57
  465. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +4 -4
  466. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +260 -0
  467. package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
  468. package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +9 -1
  469. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +18 -11
  470. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
  471. package/vscode/src/vs/workbench/contrib/debug/common/debugUtils.js +3 -0
  472. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
  473. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +2 -2
  474. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +1 -1
  475. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +166 -166
  476. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +24 -24
  477. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +5 -5
  478. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +2 -2
  479. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +3 -3
  480. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -4
  481. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +4 -4
  482. package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +1 -1
  483. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +8 -8
  484. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +20 -20
  485. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +14 -14
  486. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +85 -85
  487. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands._save.js +8 -8
  488. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
  489. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +33 -33
  490. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +52 -87
  491. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
  492. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
  493. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +4 -4
  494. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +7 -7
  495. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +18 -14
  496. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +7 -7
  497. package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +4 -4
  498. package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +1 -1
  499. package/vscode/src/vs/workbench/contrib/files/common/files.d.ts +1 -0
  500. package/vscode/src/vs/workbench/contrib/files/common/files.js +14 -14
  501. package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
  502. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
  503. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
  504. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  505. package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
  506. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +73 -93
  507. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +11 -18
  508. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +234 -112
  509. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +53 -138
  510. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +33 -38
  511. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +249 -117
  512. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +85 -44
  513. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +93 -41
  514. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +1 -1
  515. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +1 -1
  516. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +63 -45
  517. package/vscode/src/vs/workbench/contrib/list/browser/list.contribution.js +3 -0
  518. package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +27 -0
  519. package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +54 -0
  520. package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +95 -25
  521. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +1 -1
  522. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +29 -29
  523. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +2 -2
  524. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +269 -0
  525. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget.js +40 -0
  526. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +8 -8
  527. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +1 -1
  528. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +58 -6
  529. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.js +2 -1
  530. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +1 -1
  531. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +6 -6
  532. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +17 -17
  533. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +3 -3
  534. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +12 -5
  535. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +3 -3
  536. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +5 -5
  537. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +2 -2
  538. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
  539. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
  540. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +49 -0
  541. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1515 -0
  542. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +266 -0
  543. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +630 -0
  544. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +113 -0
  545. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +37 -0
  546. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css.js +4 -0
  547. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +729 -0
  548. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +28 -0
  549. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +445 -0
  550. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +184 -0
  551. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +454 -0
  552. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +256 -0
  553. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +45 -0
  554. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +1 -1
  555. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +3 -3
  556. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +3 -3
  557. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +9 -9
  558. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +62 -43
  559. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +29 -29
  560. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +4 -4
  561. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +29 -7
  562. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +13 -12
  563. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +53 -14
  564. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +4 -4
  565. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +1 -1
  566. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +3 -3
  567. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +2 -2
  568. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +2 -2
  569. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.js +114 -0
  570. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +0 -1
  571. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +1 -1
  572. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +4 -4
  573. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +16 -9
  574. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +32 -2
  575. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +2 -2
  576. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +14 -5
  577. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.js +47 -0
  578. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +35 -30
  579. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +2 -2
  580. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +4 -0
  581. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +2 -3
  582. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +105 -0
  583. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +9 -3
  584. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +11 -18
  585. package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +3 -3
  586. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +12 -12
  587. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +18 -17
  588. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +54 -49
  589. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +21 -21
  590. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +15 -15
  591. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +17 -17
  592. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +60 -60
  593. package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +2 -2
  594. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +23 -23
  595. package/vscode/src/vs/workbench/contrib/scm/common/scm.js +2 -1
  596. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +10 -10
  597. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +4 -5
  598. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +1 -1
  599. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +10 -10
  600. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +14 -33
  601. package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +2 -2
  602. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +1 -1
  603. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +2 -2
  604. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
  605. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
  606. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
  607. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
  608. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
  609. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +5 -5
  610. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +3 -3
  611. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +18 -1
  612. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +4 -4
  613. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +32 -32
  614. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +3 -0
  615. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +7 -7
  616. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -23
  617. package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +16 -16
  618. package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +28 -28
  619. package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
  620. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +8 -4
  621. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.d.ts +2 -1
  622. package/vscode/src/vs/workbench/contrib/url/browser/trustedDomains.js +6 -6
  623. package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +3 -3
  624. package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +21 -2
  625. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +1 -1
  626. package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +2 -2
  627. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +3 -3
  628. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +7 -7
  629. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +2 -1
  630. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +16 -16
  631. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +1 -1
  632. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +15 -15
  633. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +6 -8
  634. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.service.d.ts +10 -3
  635. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
  636. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js +1 -1
  637. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +6 -6
  638. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -2
  639. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +1 -0
  640. package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +5 -0
  641. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +83 -83
  642. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +5 -5
  643. package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
  644. package/vscode/src/vs/workbench/services/lifecycle/common/lifecycleService.js +3 -3
  645. package/vscode/src/vs/workbench/services/output/common/output.js +1 -2
  646. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +2 -2
  647. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +7 -7
  648. package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +2 -2
  649. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
  650. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +5 -5
  651. package/vscode/src/vs/workbench/services/search/common/fileSearchManager.js +62 -30
  652. package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +42 -12
  653. package/vscode/src/vs/workbench/services/search/common/search.js +69 -34
  654. package/vscode/src/vs/workbench/services/search/common/searchExtConversionTypes.js +144 -0
  655. package/vscode/src/vs/workbench/services/search/common/searchExtTypes.js +9 -29
  656. package/vscode/src/vs/workbench/services/search/common/searchHelpers.js +7 -7
  657. package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +77 -93
  658. package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +9 -9
  659. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +7 -4
  660. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
  661. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
  662. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +8 -9
  663. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
  664. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +11 -11
  665. package/vscode/src/vs/workbench/services/views/browser/viewsService.js +7 -7
  666. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +20 -17
  667. package/vscode-dts/vscode.proposed.aiTextSearchProviderNew.d.ts +1 -85
  668. package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +42 -13
  669. package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +5 -0
  670. package/vscode-dts/vscode.proposed.chatProvider.d.ts +1 -1
  671. package/vscode-dts/vscode.proposed.chatVariableResolver.d.ts +0 -17
  672. package/vscode-dts/vscode.proposed.contribChatParticipantDetection.d.ts +6 -0
  673. package/vscode-dts/vscode.proposed.contribDebugCreateConfiguration.d.ts +6 -0
  674. package/vscode-dts/vscode.proposed.contribSourceControlHistoryTitleMenu.d.ts +7 -0
  675. package/vscode-dts/vscode.proposed.contribViewContainerTitle.d.ts +8 -0
  676. package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +6 -3
  677. package/vscode-dts/vscode.proposed.extensionsAny.d.ts +1 -0
  678. package/vscode-dts/vscode.proposed.fileSearchProviderNew.d.ts +7 -6
  679. package/vscode-dts/vscode.proposed.findFiles2New.d.ts +36 -11
  680. package/vscode-dts/vscode.proposed.findTextInFilesNew.d.ts +51 -30
  681. package/vscode-dts/vscode.proposed.interactive.d.ts +0 -2
  682. package/vscode-dts/vscode.proposed.lmTools.d.ts +119 -20
  683. package/vscode-dts/vscode.proposed.notebookReplDocument.d.ts +20 -0
  684. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +1 -0
  685. package/vscode-dts/vscode.proposed.testObserver.d.ts +6 -0
  686. package/vscode-dts/vscode.proposed.textSearchCompleteNew.d.ts +1 -9
  687. package/vscode-dts/vscode.proposed.textSearchProviderNew.d.ts +58 -17
  688. package/workers/editor.worker.js +1 -1
  689. package/workers/extensionHost.worker.js +1 -3
  690. package/external/vscode-marked/lib/marked.esm.js +0 -2199
  691. package/vscode/src/vs/editor/browser/services/webWorker.js +0 -57
  692. package/vscode/src/vs/editor/editor.worker.js +0 -21
  693. package/vscode-dts/vscode.proposed.authGetSessions.d.ts +0 -70
  694. package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +0 -338
  695. package/vscode-dts/vscode.proposed.testMessageStackTrace.d.ts +0 -38
  696. /package/vscode/src/vs/editor/contrib/inlineCompletions/browser/{commandIds.js → controller/commandIds.js} +0 -0
@@ -0,0 +1,1515 @@
1
+ import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
2
+ import { addDisposableListener, append, $, scheduleAtNextAnimationFrame, getWindow, reset, h } from '../../../../../base/browser/dom.js';
3
+ import { Disposable, DisposableStore } from '../../../../../base/common/lifecycle.js';
4
+ import { Schemas } from '../../../../../base/common/network.js';
5
+ import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';
6
+ import { OutputComparison, outputEqual, OUTPUT_EDITOR_HEIGHT_MAGIC, PropertyFoldingState, SideBySideDiffElementViewModel, getFormattedMetadataJSON, getFormattedOutputJSON } from './diffElementViewModel.js';
7
+ import { DiffSide, NOTEBOOK_DIFF_CELL_INPUT, NOTEBOOK_DIFF_CELL_IGNORE_WHITESPACE, NOTEBOOK_DIFF_CELL_PROPERTY, NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED, DIFF_CELL_MARGIN } from './notebookDiffEditorBrowser.js';
8
+ import { CodeEditorWidget } from '../../../../../editor/browser/widget/codeEditor/codeEditorWidget.js';
9
+ import { IModelService } from '../../../../../editor/common/services/model.js';
10
+ import { ILanguageService } from '../../../../../editor/common/languages/language.js';
11
+ import { CellEditType, CellUri } from '../../common/notebookCommon.js';
12
+ import { IContextMenuService } from '../../../../../platform/contextview/browser/contextView.service.js';
13
+ import { MenuId, MenuItemAction } from '../../../../../platform/actions/common/actions.js';
14
+ import { IMenuService } from '../../../../../platform/actions/common/actions.service.js';
15
+ import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.service.js';
16
+ import { INotificationService } from '../../../../../platform/notification/common/notification.service.js';
17
+ import { createAndFillInActionBarActions } from '../../../../../platform/actions/browser/menuEntryActionViewItem.js';
18
+ import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.service.js';
19
+ import { CodiconActionViewItem } from '../view/cellParts/cellActionView.js';
20
+ import { collapsedIcon, expandedIcon } from '../notebookIcons.js';
21
+ import { OutputContainer } from './diffElementOutputs.js';
22
+ import { EditorExtensionsRegistry } from '../../../../../editor/browser/editorExtensions.js';
23
+ import { ContextMenuController } from '../../../../../editor/contrib/contextmenu/browser/contextmenu.js';
24
+ import { SnippetController2 } from '../../../../../editor/contrib/snippet/browser/snippetController2.js';
25
+ import { SuggestController } from '../../../../../editor/contrib/suggest/browser/suggestController.js';
26
+ import { MenuPreventer } from '../../../codeEditor/browser/menuPreventer.js';
27
+ import { SelectionClipboardContributionID } from '../../../codeEditor/browser/selectionClipboard.js';
28
+ import { TabCompletionController } from '../../../snippets/browser/tabCompletion.js';
29
+ import { renderIcon, renderLabelWithIcons } from '../../../../../base/browser/ui/iconLabel/iconLabels.js';
30
+ import { ITextModelService } from '../../../../../editor/common/services/resolverService.js';
31
+ import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.service.js';
32
+ import { IThemeService } from '../../../../../platform/theme/common/themeService.service.js';
33
+ import { WorkbenchToolBar } from '../../../../../platform/actions/browser/toolbar.js';
34
+ import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.service.js';
35
+ import { fixedDiffEditorOptions, fixedEditorOptions, fixedEditorPaddingSingleLineCells, fixedEditorPadding } from './diffCellEditorOptions.js';
36
+ import { AccessibilityVerbositySettingId } from '../../../accessibility/browser/accessibilityConfiguration.js';
37
+ import { IAccessibilityService } from '../../../../../platform/accessibility/common/accessibility.service.js';
38
+ import { DiffEditorWidget } from '../../../../../editor/browser/widget/diffEditor/diffEditorWidget.js';
39
+ import { ICommandService } from '../../../../../platform/commands/common/commands.service.js';
40
+ import { localize } from '../../../../../nls.js';
41
+ import { Emitter } from '../../../../../base/common/event.js';
42
+ import { ITextResourceConfigurationService } from '../../../../../editor/common/services/textResourceConfiguration.js';
43
+ function getOptimizedNestedCodeEditorWidgetOptions() {
44
+ return {
45
+ isSimpleWidget: false,
46
+ contributions: EditorExtensionsRegistry.getSomeEditorContributions([
47
+ MenuPreventer.ID,
48
+ SelectionClipboardContributionID,
49
+ ContextMenuController.ID,
50
+ SuggestController.ID,
51
+ SnippetController2.ID,
52
+ TabCompletionController.ID,
53
+ ])
54
+ };
55
+ }
56
+ class CellDiffPlaceholderElement extends Disposable {
57
+ constructor(placeholder, templateData) {
58
+ super();
59
+ templateData.body.classList.remove('left', 'right', 'full');
60
+ const text = (placeholder.hiddenCells.length === 1) ?
61
+ ( localize(11473, '{0} hidden cell', placeholder.hiddenCells.length)) :
62
+ ( localize(11474, '{0} hidden cells', placeholder.hiddenCells.length));
63
+ templateData.placeholder.innerText = text;
64
+ this._register(addDisposableListener(templateData.placeholder, 'dblclick', (e) => {
65
+ if (e.button !== 0) {
66
+ return;
67
+ }
68
+ e.preventDefault();
69
+ placeholder.showHiddenCells();
70
+ }));
71
+ this._register(templateData.marginOverlay.onAction(() => placeholder.showHiddenCells()));
72
+ templateData.marginOverlay.show();
73
+ }
74
+ }
75
+ let PropertyHeader = class PropertyHeader extends Disposable {
76
+ constructor(cell, propertyHeaderContainer, notebookEditor, accessor, contextMenuService, keybindingService, commandService, notificationService, menuService, contextKeyService, themeService, telemetryService, accessibilityService) {
77
+ super();
78
+ this.cell = cell;
79
+ this.propertyHeaderContainer = propertyHeaderContainer;
80
+ this.notebookEditor = notebookEditor;
81
+ this.accessor = accessor;
82
+ this.contextMenuService = contextMenuService;
83
+ this.keybindingService = keybindingService;
84
+ this.commandService = commandService;
85
+ this.notificationService = notificationService;
86
+ this.menuService = menuService;
87
+ this.contextKeyService = contextKeyService;
88
+ this.themeService = themeService;
89
+ this.telemetryService = telemetryService;
90
+ this.accessibilityService = accessibilityService;
91
+ }
92
+ buildHeader() {
93
+ const metadataChanged = this.accessor.checkIfModified(this.cell);
94
+ this._foldingIndicator = append(this.propertyHeaderContainer, $('.property-folding-indicator'));
95
+ this._foldingIndicator.classList.add(this.accessor.prefix);
96
+ this._updateFoldingIcon();
97
+ const metadataStatus = append(this.propertyHeaderContainer, $('div.property-status'));
98
+ this._statusSpan = append(metadataStatus, $('span'));
99
+ this._description = append(metadataStatus, $('span.property-description'));
100
+ if (metadataChanged) {
101
+ this._statusSpan.textContent = this.accessor.changedLabel;
102
+ this._statusSpan.style.fontWeight = 'bold';
103
+ if (metadataChanged.reason) {
104
+ this._description.textContent = metadataChanged.reason;
105
+ }
106
+ this.propertyHeaderContainer.classList.add('modified');
107
+ }
108
+ else {
109
+ this._statusSpan.textContent = this.accessor.unChangedLabel;
110
+ this._description.textContent = '';
111
+ this.propertyHeaderContainer.classList.remove('modified');
112
+ }
113
+ const cellToolbarContainer = append(this.propertyHeaderContainer, $('div.property-toolbar'));
114
+ this._toolbar = ( (new WorkbenchToolBar(cellToolbarContainer, {
115
+ actionViewItemProvider: (action, options) => {
116
+ if (action instanceof MenuItemAction) {
117
+ const item = ( (new CodiconActionViewItem(
118
+ action,
119
+ { hoverDelegate: options.hoverDelegate },
120
+ this.keybindingService,
121
+ this.notificationService,
122
+ this.contextKeyService,
123
+ this.themeService,
124
+ this.contextMenuService,
125
+ this.accessibilityService
126
+ )));
127
+ return item;
128
+ }
129
+ return undefined;
130
+ }
131
+ }, this.menuService, this.contextKeyService, this.contextMenuService, this.keybindingService, this.commandService, this.telemetryService)));
132
+ this._register(this._toolbar);
133
+ this._toolbar.context = {
134
+ cell: this.cell
135
+ };
136
+ const scopedContextKeyService = this.contextKeyService.createScoped(cellToolbarContainer);
137
+ this._register(scopedContextKeyService);
138
+ const propertyChanged = NOTEBOOK_DIFF_CELL_PROPERTY.bindTo(scopedContextKeyService);
139
+ propertyChanged.set(!!metadataChanged);
140
+ this._propertyExpanded = NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED.bindTo(scopedContextKeyService);
141
+ this._menu = this.menuService.createMenu(this.accessor.menuId, scopedContextKeyService);
142
+ this._register(this._menu);
143
+ const actions = [];
144
+ createAndFillInActionBarActions(this._menu, { shouldForwardArgs: true }, actions);
145
+ this._toolbar.setActions(actions);
146
+ this._register(this._menu.onDidChange(() => {
147
+ const actions = [];
148
+ createAndFillInActionBarActions(this._menu, { shouldForwardArgs: true }, actions);
149
+ this._toolbar.setActions(actions);
150
+ }));
151
+ this._register(this.notebookEditor.onMouseUp(e => {
152
+ if (!e.event.target) {
153
+ return;
154
+ }
155
+ const target = e.event.target;
156
+ if (target === this.propertyHeaderContainer ||
157
+ target === this._foldingIndicator || this._foldingIndicator.contains(target) ||
158
+ target === metadataStatus || metadataStatus.contains(target)) {
159
+ const cellViewModel = e.target;
160
+ if (cellViewModel === this.cell) {
161
+ const oldFoldingState = this.accessor.getFoldingState(this.cell);
162
+ this.accessor.updateFoldingState(this.cell, oldFoldingState === PropertyFoldingState.Expanded ? PropertyFoldingState.Collapsed : PropertyFoldingState.Expanded);
163
+ this._updateFoldingIcon();
164
+ this.accessor.updateInfoRendering(this.cell.renderOutput);
165
+ }
166
+ }
167
+ return;
168
+ }));
169
+ this._updateFoldingIcon();
170
+ this.accessor.updateInfoRendering(this.cell.renderOutput);
171
+ }
172
+ refresh() {
173
+ const metadataChanged = this.accessor.checkIfModified(this.cell);
174
+ if (metadataChanged) {
175
+ this._statusSpan.textContent = this.accessor.changedLabel;
176
+ this._statusSpan.style.fontWeight = 'bold';
177
+ if (metadataChanged.reason) {
178
+ this._description.textContent = metadataChanged.reason;
179
+ }
180
+ this.propertyHeaderContainer.classList.add('modified');
181
+ const actions = [];
182
+ createAndFillInActionBarActions(this._menu, undefined, actions);
183
+ this._toolbar.setActions(actions);
184
+ }
185
+ else {
186
+ this._statusSpan.textContent = this.accessor.unChangedLabel;
187
+ this._statusSpan.style.fontWeight = 'normal';
188
+ this._description.textContent = '';
189
+ this.propertyHeaderContainer.classList.remove('modified');
190
+ this._toolbar.setActions([]);
191
+ }
192
+ }
193
+ _updateFoldingIcon() {
194
+ if (this.accessor.getFoldingState(this.cell) === PropertyFoldingState.Collapsed) {
195
+ reset(this._foldingIndicator, renderIcon(collapsedIcon));
196
+ this._propertyExpanded?.set(false);
197
+ }
198
+ else {
199
+ reset(this._foldingIndicator, renderIcon(expandedIcon));
200
+ this._propertyExpanded?.set(true);
201
+ }
202
+ }
203
+ };
204
+ PropertyHeader = ( (__decorate([
205
+ ( (__param(4, IContextMenuService))),
206
+ ( (__param(5, IKeybindingService))),
207
+ ( (__param(6, ICommandService))),
208
+ ( (__param(7, INotificationService))),
209
+ ( (__param(8, IMenuService))),
210
+ ( (__param(9, IContextKeyService))),
211
+ ( (__param(10, IThemeService))),
212
+ ( (__param(11, ITelemetryService))),
213
+ ( (__param(12, IAccessibilityService)))
214
+ ], PropertyHeader)));
215
+ class AbstractElementRenderer extends Disposable {
216
+ constructor(notebookEditor, cell, templateData, style, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService, textConfigurationService) {
217
+ super();
218
+ this.notebookEditor = notebookEditor;
219
+ this.cell = cell;
220
+ this.templateData = templateData;
221
+ this.style = style;
222
+ this.instantiationService = instantiationService;
223
+ this.languageService = languageService;
224
+ this.modelService = modelService;
225
+ this.textModelService = textModelService;
226
+ this.contextMenuService = contextMenuService;
227
+ this.keybindingService = keybindingService;
228
+ this.notificationService = notificationService;
229
+ this.menuService = menuService;
230
+ this.contextKeyService = contextKeyService;
231
+ this.configurationService = configurationService;
232
+ this.textConfigurationService = textConfigurationService;
233
+ this._metadataLocalDisposable = this._register(( (new DisposableStore())));
234
+ this._outputLocalDisposable = this._register(( (new DisposableStore())));
235
+ this._ignoreMetadata = false;
236
+ this._ignoreOutputs = false;
237
+ this._isDisposed = false;
238
+ this._metadataEditorDisposeStore = this._register(( (new DisposableStore())));
239
+ this._outputEditorDisposeStore = this._register(( (new DisposableStore())));
240
+ this._register(cell.onDidLayoutChange(e => {
241
+ this.layout(e);
242
+ }));
243
+ this._register(cell.onDidLayoutChange(e => this.updateBorders()));
244
+ this.init();
245
+ this.buildBody();
246
+ this._register(cell.onDidStateChange(() => {
247
+ this.updateOutputRendering(this.cell.renderOutput);
248
+ }));
249
+ }
250
+ buildBody() {
251
+ const body = this.templateData.body;
252
+ this._diffEditorContainer = this.templateData.diffEditorContainer;
253
+ body.classList.remove('left', 'right', 'full');
254
+ switch (this.style) {
255
+ case 'left':
256
+ body.classList.add('left');
257
+ break;
258
+ case 'right':
259
+ body.classList.add('right');
260
+ break;
261
+ default:
262
+ body.classList.add('full');
263
+ break;
264
+ }
265
+ this.styleContainer(this._diffEditorContainer);
266
+ this.updateSourceEditor();
267
+ if (this.cell.modified) {
268
+ this._register(this.cell.modified.textModel.onDidChangeContent(() => this._cellHeader.refresh()));
269
+ }
270
+ this._ignoreMetadata = this.configurationService.getValue('notebook.diff.ignoreMetadata');
271
+ if (this._ignoreMetadata) {
272
+ this._disposeMetadata();
273
+ }
274
+ else {
275
+ this._buildMetadata();
276
+ }
277
+ this._ignoreOutputs = this.configurationService.getValue('notebook.diff.ignoreOutputs') || !!(this.notebookEditor.textModel?.transientOptions.transientOutputs);
278
+ if (this._ignoreOutputs) {
279
+ this._disposeOutput();
280
+ }
281
+ else {
282
+ this._buildOutput();
283
+ }
284
+ this._register(this.configurationService.onDidChangeConfiguration(e => {
285
+ let metadataLayoutChange = false;
286
+ let outputLayoutChange = false;
287
+ if (e.affectsConfiguration('notebook.diff.ignoreMetadata')) {
288
+ const newValue = this.configurationService.getValue('notebook.diff.ignoreMetadata');
289
+ if (newValue !== undefined && this._ignoreMetadata !== newValue) {
290
+ this._ignoreMetadata = newValue;
291
+ this._metadataLocalDisposable.clear();
292
+ if (this.configurationService.getValue('notebook.diff.ignoreMetadata')) {
293
+ this._disposeMetadata();
294
+ }
295
+ else {
296
+ this.cell.metadataStatusHeight = 25;
297
+ this._buildMetadata();
298
+ this.updateMetadataRendering();
299
+ metadataLayoutChange = true;
300
+ }
301
+ }
302
+ }
303
+ if (e.affectsConfiguration('notebook.diff.ignoreOutputs')) {
304
+ const newValue = this.configurationService.getValue('notebook.diff.ignoreOutputs');
305
+ if (newValue !== undefined && this._ignoreOutputs !== (newValue || this.notebookEditor.textModel?.transientOptions.transientOutputs)) {
306
+ this._ignoreOutputs = newValue || !!(this.notebookEditor.textModel?.transientOptions.transientOutputs);
307
+ this._outputLocalDisposable.clear();
308
+ if (this._ignoreOutputs) {
309
+ this._disposeOutput();
310
+ }
311
+ else {
312
+ this.cell.outputStatusHeight = 25;
313
+ this._buildOutput();
314
+ outputLayoutChange = true;
315
+ }
316
+ }
317
+ }
318
+ if (metadataLayoutChange || outputLayoutChange) {
319
+ this.layout({ metadataHeight: metadataLayoutChange, outputTotalHeight: outputLayoutChange });
320
+ }
321
+ }));
322
+ }
323
+ updateMetadataRendering() {
324
+ if (this.cell.metadataFoldingState === PropertyFoldingState.Expanded) {
325
+ this._metadataInfoContainer.style.display = 'block';
326
+ if (!this._metadataEditorContainer || !this._metadataEditor) {
327
+ this._metadataEditorContainer = append(this._metadataInfoContainer, $('.metadata-editor-container'));
328
+ this._buildMetadataEditor();
329
+ }
330
+ else {
331
+ this.cell.metadataHeight = this._metadataEditor.getContentHeight();
332
+ }
333
+ }
334
+ else {
335
+ this._metadataInfoContainer.style.display = 'none';
336
+ this.cell.metadataHeight = 0;
337
+ }
338
+ }
339
+ updateOutputRendering(renderRichOutput) {
340
+ if (this.cell.outputFoldingState === PropertyFoldingState.Expanded) {
341
+ this._outputInfoContainer.style.display = 'block';
342
+ if (renderRichOutput) {
343
+ this._hideOutputsRaw();
344
+ this._buildOutputRendererContainer();
345
+ this._showOutputsRenderer();
346
+ this._showOutputsEmptyView();
347
+ }
348
+ else {
349
+ this._hideOutputsRenderer();
350
+ this._buildOutputRawContainer();
351
+ this._showOutputsRaw();
352
+ }
353
+ }
354
+ else {
355
+ this._outputInfoContainer.style.display = 'none';
356
+ this._hideOutputsRaw();
357
+ this._hideOutputsRenderer();
358
+ this._hideOutputsEmptyView();
359
+ }
360
+ }
361
+ _buildOutputRawContainer() {
362
+ if (!this._outputEditorContainer) {
363
+ this._outputEditorContainer = append(this._outputInfoContainer, $('.output-editor-container'));
364
+ this._buildOutputEditor();
365
+ }
366
+ }
367
+ _showOutputsRaw() {
368
+ if (this._outputEditorContainer) {
369
+ this._outputEditorContainer.style.display = 'block';
370
+ this.cell.rawOutputHeight = this._outputEditor.getContentHeight();
371
+ }
372
+ }
373
+ _showOutputsEmptyView() {
374
+ this.cell.layoutChange();
375
+ }
376
+ _hideOutputsRaw() {
377
+ if (this._outputEditorContainer) {
378
+ this._outputEditorContainer.style.display = 'none';
379
+ this.cell.rawOutputHeight = 0;
380
+ }
381
+ }
382
+ _hideOutputsEmptyView() {
383
+ this.cell.layoutChange();
384
+ }
385
+ _applySanitizedMetadataChanges(currentMetadata, newMetadata) {
386
+ const result = {};
387
+ try {
388
+ const newMetadataObj = JSON.parse(newMetadata);
389
+ const keys = ( (new Set([...( (Object.keys(newMetadataObj)))])));
390
+ for (const key of keys) {
391
+ switch (key) {
392
+ case 'inputCollapsed':
393
+ case 'outputCollapsed':
394
+ if (typeof newMetadataObj[key] === 'boolean') {
395
+ result[key] = newMetadataObj[key];
396
+ }
397
+ else {
398
+ result[key] = currentMetadata[key];
399
+ }
400
+ break;
401
+ default:
402
+ result[key] = newMetadataObj[key];
403
+ break;
404
+ }
405
+ }
406
+ const index = this.notebookEditor.textModel.cells.indexOf(this.cell.modified.textModel);
407
+ if (index < 0) {
408
+ return;
409
+ }
410
+ this.notebookEditor.textModel.applyEdits([
411
+ { editType: CellEditType.Metadata, index, metadata: result }
412
+ ], true, undefined, () => undefined, undefined, true);
413
+ }
414
+ catch {
415
+ }
416
+ }
417
+ async _buildMetadataEditor() {
418
+ this._metadataEditorDisposeStore.clear();
419
+ if (this.cell instanceof SideBySideDiffElementViewModel) {
420
+ this._metadataEditor = this.instantiationService.createInstance(DiffEditorWidget, this._metadataEditorContainer, {
421
+ ...fixedDiffEditorOptions,
422
+ overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(),
423
+ readOnly: false,
424
+ originalEditable: false,
425
+ ignoreTrimWhitespace: false,
426
+ automaticLayout: false,
427
+ dimension: {
428
+ height: this.cell.layoutInfo.metadataHeight,
429
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), true, true)
430
+ }
431
+ }, {
432
+ originalEditor: getOptimizedNestedCodeEditorWidgetOptions(),
433
+ modifiedEditor: getOptimizedNestedCodeEditorWidgetOptions()
434
+ });
435
+ this.layout({ metadataHeight: true });
436
+ this._metadataEditorDisposeStore.add(this._metadataEditor);
437
+ this._metadataEditorContainer?.classList.add('diff');
438
+ const originalMetadataModel = await this.textModelService.createModelReference(CellUri.generateCellPropertyUri(this.cell.originalDocument.uri, this.cell.original.handle, Schemas.vscodeNotebookCellMetadata));
439
+ const modifiedMetadataModel = await this.textModelService.createModelReference(CellUri.generateCellPropertyUri(this.cell.modifiedDocument.uri, this.cell.modified.handle, Schemas.vscodeNotebookCellMetadata));
440
+ this._metadataEditor.setModel({
441
+ original: originalMetadataModel.object.textEditorModel,
442
+ modified: modifiedMetadataModel.object.textEditorModel
443
+ });
444
+ this._metadataEditorDisposeStore.add(originalMetadataModel);
445
+ this._metadataEditorDisposeStore.add(modifiedMetadataModel);
446
+ this.cell.metadataHeight = this._metadataEditor.getContentHeight();
447
+ this._metadataEditorDisposeStore.add(this._metadataEditor.onDidContentSizeChange((e) => {
448
+ if (e.contentHeightChanged && this.cell.metadataFoldingState === PropertyFoldingState.Expanded) {
449
+ this.cell.metadataHeight = e.contentHeight;
450
+ }
451
+ }));
452
+ let respondingToContentChange = false;
453
+ this._metadataEditorDisposeStore.add(modifiedMetadataModel.object.textEditorModel.onDidChangeContent(() => {
454
+ respondingToContentChange = true;
455
+ const value = modifiedMetadataModel.object.textEditorModel.getValue();
456
+ this._applySanitizedMetadataChanges(this.cell.modified.metadata, value);
457
+ this._metadataHeader.refresh();
458
+ respondingToContentChange = false;
459
+ }));
460
+ this._metadataEditorDisposeStore.add(this.cell.modified.textModel.onDidChangeMetadata(() => {
461
+ if (respondingToContentChange) {
462
+ return;
463
+ }
464
+ const modifiedMetadataSource = getFormattedMetadataJSON(this.notebookEditor.textModel, this.cell.modified?.metadata || {}, this.cell.modified?.language);
465
+ modifiedMetadataModel.object.textEditorModel.setValue(modifiedMetadataSource);
466
+ }));
467
+ return;
468
+ }
469
+ else {
470
+ this._metadataEditor = this.instantiationService.createInstance(CodeEditorWidget, this._metadataEditorContainer, {
471
+ ...fixedEditorOptions,
472
+ dimension: {
473
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true),
474
+ height: this.cell.layoutInfo.metadataHeight
475
+ },
476
+ overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(),
477
+ readOnly: false
478
+ }, {});
479
+ this.layout({ metadataHeight: true });
480
+ this._metadataEditorDisposeStore.add(this._metadataEditor);
481
+ const mode = this.languageService.createById('jsonc');
482
+ const originalMetadataSource = getFormattedMetadataJSON(this.notebookEditor.textModel, this.cell.type === 'insert'
483
+ ? this.cell.modified.metadata || {}
484
+ : this.cell.original.metadata || {});
485
+ const uri = this.cell.type === 'insert'
486
+ ? this.cell.modified.uri
487
+ : this.cell.original.uri;
488
+ const handle = this.cell.type === 'insert'
489
+ ? this.cell.modified.handle
490
+ : this.cell.original.handle;
491
+ const modelUri = CellUri.generateCellPropertyUri(uri, handle, Schemas.vscodeNotebookCellMetadata);
492
+ const metadataModel = this.modelService.createModel(originalMetadataSource, mode, modelUri, false);
493
+ this._metadataEditor.setModel(metadataModel);
494
+ this._metadataEditorDisposeStore.add(metadataModel);
495
+ this.cell.metadataHeight = this._metadataEditor.getContentHeight();
496
+ this._metadataEditorDisposeStore.add(this._metadataEditor.onDidContentSizeChange((e) => {
497
+ if (e.contentHeightChanged && this.cell.metadataFoldingState === PropertyFoldingState.Expanded) {
498
+ this.cell.metadataHeight = e.contentHeight;
499
+ }
500
+ }));
501
+ }
502
+ }
503
+ _buildOutputEditor() {
504
+ this._outputEditorDisposeStore.clear();
505
+ if ((this.cell.type === 'modified' || this.cell.type === 'unchanged') && !this.notebookEditor.textModel.transientOptions.transientOutputs) {
506
+ const originalOutputsSource = getFormattedOutputJSON(this.cell.original?.outputs || []);
507
+ const modifiedOutputsSource = getFormattedOutputJSON(this.cell.modified?.outputs || []);
508
+ if (originalOutputsSource !== modifiedOutputsSource) {
509
+ const mode = this.languageService.createById('json');
510
+ const originalModel = this.modelService.createModel(originalOutputsSource, mode, undefined, true);
511
+ const modifiedModel = this.modelService.createModel(modifiedOutputsSource, mode, undefined, true);
512
+ this._outputEditorDisposeStore.add(originalModel);
513
+ this._outputEditorDisposeStore.add(modifiedModel);
514
+ const lineHeight = this.notebookEditor.getLayoutInfo().fontInfo.lineHeight || 17;
515
+ const lineCount = Math.max(originalModel.getLineCount(), modifiedModel.getLineCount());
516
+ this._outputEditor = this.instantiationService.createInstance(DiffEditorWidget, this._outputEditorContainer, {
517
+ ...fixedDiffEditorOptions,
518
+ overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(),
519
+ readOnly: true,
520
+ ignoreTrimWhitespace: false,
521
+ automaticLayout: false,
522
+ dimension: {
523
+ height: Math.min(OUTPUT_EDITOR_HEIGHT_MAGIC, this.cell.layoutInfo.rawOutputHeight || lineHeight * lineCount),
524
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true)
525
+ },
526
+ accessibilityVerbose: this.configurationService.getValue(AccessibilityVerbositySettingId.DiffEditor) ?? false
527
+ }, {
528
+ originalEditor: getOptimizedNestedCodeEditorWidgetOptions(),
529
+ modifiedEditor: getOptimizedNestedCodeEditorWidgetOptions()
530
+ });
531
+ this._outputEditorDisposeStore.add(this._outputEditor);
532
+ this._outputEditorContainer?.classList.add('diff');
533
+ this._outputEditor.setModel({
534
+ original: originalModel,
535
+ modified: modifiedModel
536
+ });
537
+ this._outputEditor.restoreViewState(this.cell.getOutputEditorViewState());
538
+ this.cell.rawOutputHeight = this._outputEditor.getContentHeight();
539
+ this._outputEditorDisposeStore.add(this._outputEditor.onDidContentSizeChange((e) => {
540
+ if (e.contentHeightChanged && this.cell.outputFoldingState === PropertyFoldingState.Expanded) {
541
+ this.cell.rawOutputHeight = e.contentHeight;
542
+ }
543
+ }));
544
+ this._outputEditorDisposeStore.add(this.cell.modified.textModel.onDidChangeOutputs(() => {
545
+ const modifiedOutputsSource = getFormattedOutputJSON(this.cell.modified?.outputs || []);
546
+ modifiedModel.setValue(modifiedOutputsSource);
547
+ this._outputHeader.refresh();
548
+ }));
549
+ return;
550
+ }
551
+ }
552
+ this._outputEditor = this.instantiationService.createInstance(CodeEditorWidget, this._outputEditorContainer, {
553
+ ...fixedEditorOptions,
554
+ dimension: {
555
+ width: Math.min(OUTPUT_EDITOR_HEIGHT_MAGIC, this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, this.cell.type === 'unchanged' || this.cell.type === 'modified') - 32),
556
+ height: this.cell.layoutInfo.rawOutputHeight
557
+ },
558
+ overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode()
559
+ }, {});
560
+ this._outputEditorDisposeStore.add(this._outputEditor);
561
+ const mode = this.languageService.createById('json');
562
+ const originaloutputSource = getFormattedOutputJSON(this.notebookEditor.textModel.transientOptions.transientOutputs
563
+ ? []
564
+ : this.cell.type === 'insert'
565
+ ? this.cell.modified.outputs || []
566
+ : this.cell.original.outputs || []);
567
+ const outputModel = this.modelService.createModel(originaloutputSource, mode, undefined, true);
568
+ this._outputEditorDisposeStore.add(outputModel);
569
+ this._outputEditor.setModel(outputModel);
570
+ this._outputEditor.restoreViewState(this.cell.getOutputEditorViewState());
571
+ this.cell.rawOutputHeight = this._outputEditor.getContentHeight();
572
+ this._outputEditorDisposeStore.add(this._outputEditor.onDidContentSizeChange((e) => {
573
+ if (e.contentHeightChanged && this.cell.outputFoldingState === PropertyFoldingState.Expanded) {
574
+ this.cell.rawOutputHeight = e.contentHeight;
575
+ }
576
+ }));
577
+ }
578
+ layoutNotebookCell() {
579
+ this.notebookEditor.layoutNotebookCell(this.cell, this.cell.layoutInfo.totalHeight);
580
+ }
581
+ updateBorders() {
582
+ this.templateData.leftBorder.style.height = `${this.cell.layoutInfo.totalHeight - 32}px`;
583
+ this.templateData.rightBorder.style.height = `${this.cell.layoutInfo.totalHeight - 32}px`;
584
+ this.templateData.bottomBorder.style.top = `${this.cell.layoutInfo.totalHeight - 32}px`;
585
+ }
586
+ dispose() {
587
+ if (this._outputEditor) {
588
+ this.cell.saveOutputEditorViewState(this._outputEditor.saveViewState());
589
+ }
590
+ if (this._metadataEditor) {
591
+ this.cell.saveMetadataEditorViewState(this._metadataEditor.saveViewState());
592
+ }
593
+ this._metadataEditorDisposeStore.dispose();
594
+ this._outputEditorDisposeStore.dispose();
595
+ this._isDisposed = true;
596
+ super.dispose();
597
+ }
598
+ }
599
+ class SingleSideDiffElement extends AbstractElementRenderer {
600
+ constructor(notebookEditor, cell, templateData, style, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService, textConfigurationService) {
601
+ super(notebookEditor, cell, templateData, style, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService, textConfigurationService);
602
+ this.cell = cell;
603
+ this.templateData = templateData;
604
+ this.updateBorders();
605
+ }
606
+ init() {
607
+ this._diagonalFill = this.templateData.diagonalFill;
608
+ }
609
+ buildBody() {
610
+ const body = this.templateData.body;
611
+ this._diffEditorContainer = this.templateData.diffEditorContainer;
612
+ body.classList.remove('left', 'right', 'full');
613
+ switch (this.style) {
614
+ case 'left':
615
+ body.classList.add('left');
616
+ break;
617
+ case 'right':
618
+ body.classList.add('right');
619
+ break;
620
+ default:
621
+ body.classList.add('full');
622
+ break;
623
+ }
624
+ this.styleContainer(this._diffEditorContainer);
625
+ this.updateSourceEditor();
626
+ if (this.configurationService.getValue('notebook.diff.ignoreMetadata')) {
627
+ this._disposeMetadata();
628
+ }
629
+ else {
630
+ this._buildMetadata();
631
+ }
632
+ if (this.configurationService.getValue('notebook.diff.ignoreOutputs') || this.notebookEditor.textModel?.transientOptions.transientOutputs) {
633
+ this._disposeOutput();
634
+ }
635
+ else {
636
+ this._buildOutput();
637
+ }
638
+ this._register(this.configurationService.onDidChangeConfiguration(e => {
639
+ let metadataLayoutChange = false;
640
+ let outputLayoutChange = false;
641
+ if (e.affectsConfiguration('notebook.diff.ignoreMetadata')) {
642
+ this._metadataLocalDisposable.clear();
643
+ if (this.configurationService.getValue('notebook.diff.ignoreMetadata')) {
644
+ this._disposeMetadata();
645
+ }
646
+ else {
647
+ this.cell.metadataStatusHeight = 25;
648
+ this._buildMetadata();
649
+ this.updateMetadataRendering();
650
+ metadataLayoutChange = true;
651
+ }
652
+ }
653
+ if (e.affectsConfiguration('notebook.diff.ignoreOutputs')) {
654
+ this._outputLocalDisposable.clear();
655
+ if (this.configurationService.getValue('notebook.diff.ignoreOutputs') || this.notebookEditor.textModel?.transientOptions.transientOutputs) {
656
+ this._disposeOutput();
657
+ }
658
+ else {
659
+ this.cell.outputStatusHeight = 25;
660
+ this._buildOutput();
661
+ outputLayoutChange = true;
662
+ }
663
+ }
664
+ if (metadataLayoutChange || outputLayoutChange) {
665
+ this.layout({ metadataHeight: metadataLayoutChange, outputTotalHeight: outputLayoutChange });
666
+ }
667
+ }));
668
+ }
669
+ updateSourceEditor() {
670
+ this._cellHeaderContainer = this.templateData.cellHeaderContainer;
671
+ this._cellHeaderContainer.style.display = 'flex';
672
+ this._cellHeaderContainer.innerText = '';
673
+ this._editorContainer = this.templateData.editorContainer;
674
+ this._editorContainer.classList.add('diff');
675
+ const renderSourceEditor = () => {
676
+ if (this.cell.cellFoldingState === PropertyFoldingState.Collapsed) {
677
+ this._editorContainer.style.display = 'none';
678
+ this.cell.editorHeight = 0;
679
+ return;
680
+ }
681
+ const lineCount = this.nestedCellViewModel.textModel.textBuffer.getLineCount();
682
+ const lineHeight = this.notebookEditor.getLayoutInfo().fontInfo.lineHeight || 17;
683
+ const editorHeight = lineCount * lineHeight + fixedEditorPadding.top + fixedEditorPadding.bottom;
684
+ this._editorContainer.style.height = `${editorHeight}px`;
685
+ this._editorContainer.style.display = 'block';
686
+ if (this._editor) {
687
+ const contentHeight = this._editor.getContentHeight();
688
+ if (contentHeight >= 0) {
689
+ this.cell.editorHeight = contentHeight;
690
+ }
691
+ return;
692
+ }
693
+ this._editor = this.templateData.sourceEditor;
694
+ this._editor.layout({
695
+ width: (this.notebookEditor.getLayoutInfo().width - 2 * DIFF_CELL_MARGIN) / 2 - 18,
696
+ height: editorHeight
697
+ });
698
+ this._editor.updateOptions({ readOnly: this.readonly });
699
+ this.cell.editorHeight = editorHeight;
700
+ this._register(this._editor.onDidContentSizeChange((e) => {
701
+ if (this.cell.cellFoldingState === PropertyFoldingState.Expanded && e.contentHeightChanged && this.cell.layoutInfo.editorHeight !== e.contentHeight) {
702
+ this.cell.editorHeight = e.contentHeight;
703
+ }
704
+ }));
705
+ this._initializeSourceDiffEditor(this.nestedCellViewModel);
706
+ };
707
+ this._cellHeader = this._register(this.instantiationService.createInstance(PropertyHeader, this.cell, this._cellHeaderContainer, this.notebookEditor, {
708
+ updateInfoRendering: () => renderSourceEditor(),
709
+ checkIfModified: (_) => ({ reason: undefined }),
710
+ getFoldingState: (cell) => cell.cellFoldingState,
711
+ updateFoldingState: (cell, state) => cell.cellFoldingState = state,
712
+ unChangedLabel: 'Input',
713
+ changedLabel: 'Input',
714
+ prefix: 'input',
715
+ menuId: MenuId.NotebookDiffCellInputTitle
716
+ }));
717
+ this._cellHeader.buildHeader();
718
+ renderSourceEditor();
719
+ this._initializeSourceDiffEditor(this.nestedCellViewModel);
720
+ }
721
+ calculateDiagonalFillHeight() {
722
+ return this.cell.layoutInfo.cellStatusHeight + this.cell.layoutInfo.editorHeight + this.cell.layoutInfo.editorMargin + this.cell.layoutInfo.metadataStatusHeight + this.cell.layoutInfo.metadataHeight + this.cell.layoutInfo.outputTotalHeight + this.cell.layoutInfo.outputStatusHeight;
723
+ }
724
+ async _initializeSourceDiffEditor(modifiedCell) {
725
+ const modifiedRef = await this.textModelService.createModelReference(modifiedCell.uri);
726
+ if (this._isDisposed) {
727
+ return;
728
+ }
729
+ const modifiedTextModel = modifiedRef.object.textEditorModel;
730
+ this._register(modifiedRef);
731
+ this._editor.setModel(modifiedTextModel);
732
+ const editorViewState = this.cell.getSourceEditorViewState();
733
+ if (editorViewState) {
734
+ this._editor.restoreViewState(editorViewState);
735
+ }
736
+ const contentHeight = this._editor.getContentHeight();
737
+ this.cell.editorHeight = contentHeight;
738
+ const height = `${this.calculateDiagonalFillHeight()}px`;
739
+ if (this._diagonalFill.style.height !== height) {
740
+ this._diagonalFill.style.height = height;
741
+ }
742
+ }
743
+ _disposeMetadata() {
744
+ this.cell.metadataStatusHeight = 0;
745
+ this.cell.metadataHeight = 0;
746
+ this.templateData.cellHeaderContainer.style.display = 'none';
747
+ this.templateData.metadataHeaderContainer.style.display = 'none';
748
+ this.templateData.metadataInfoContainer.style.display = 'none';
749
+ this._metadataEditor = undefined;
750
+ }
751
+ _buildMetadata() {
752
+ this._metadataHeaderContainer = this.templateData.metadataHeaderContainer;
753
+ this._metadataInfoContainer = this.templateData.metadataInfoContainer;
754
+ this._metadataHeaderContainer.style.display = 'flex';
755
+ this._metadataInfoContainer.style.display = 'block';
756
+ this._metadataHeaderContainer.innerText = '';
757
+ this._metadataInfoContainer.innerText = '';
758
+ this._metadataHeader = this.instantiationService.createInstance(PropertyHeader, this.cell, this._metadataHeaderContainer, this.notebookEditor, {
759
+ updateInfoRendering: this.updateMetadataRendering.bind(this),
760
+ checkIfModified: (cell) => {
761
+ return cell.checkMetadataIfModified();
762
+ },
763
+ getFoldingState: (cell) => {
764
+ return cell.metadataFoldingState;
765
+ },
766
+ updateFoldingState: (cell, state) => {
767
+ cell.metadataFoldingState = state;
768
+ },
769
+ unChangedLabel: 'Metadata',
770
+ changedLabel: 'Metadata changed',
771
+ prefix: 'metadata',
772
+ menuId: MenuId.NotebookDiffCellMetadataTitle
773
+ });
774
+ this._metadataLocalDisposable.add(this._metadataHeader);
775
+ this._metadataHeader.buildHeader();
776
+ }
777
+ _buildOutput() {
778
+ this.templateData.outputHeaderContainer.style.display = 'flex';
779
+ this.templateData.outputInfoContainer.style.display = 'block';
780
+ this._outputHeaderContainer = this.templateData.outputHeaderContainer;
781
+ this._outputInfoContainer = this.templateData.outputInfoContainer;
782
+ this._outputHeaderContainer.innerText = '';
783
+ this._outputInfoContainer.innerText = '';
784
+ this._outputHeader = this.instantiationService.createInstance(PropertyHeader, this.cell, this._outputHeaderContainer, this.notebookEditor, {
785
+ updateInfoRendering: this.updateOutputRendering.bind(this),
786
+ checkIfModified: (cell) => {
787
+ return cell.checkIfOutputsModified();
788
+ },
789
+ getFoldingState: (cell) => {
790
+ return cell.outputFoldingState;
791
+ },
792
+ updateFoldingState: (cell, state) => {
793
+ cell.outputFoldingState = state;
794
+ },
795
+ unChangedLabel: 'Outputs',
796
+ changedLabel: 'Outputs changed',
797
+ prefix: 'output',
798
+ menuId: MenuId.NotebookDiffCellOutputsTitle
799
+ });
800
+ this._outputLocalDisposable.add(this._outputHeader);
801
+ this._outputHeader.buildHeader();
802
+ }
803
+ _disposeOutput() {
804
+ this._hideOutputsRaw();
805
+ this._hideOutputsRenderer();
806
+ this._hideOutputsEmptyView();
807
+ this.cell.rawOutputHeight = 0;
808
+ this.cell.outputStatusHeight = 0;
809
+ this.templateData.outputHeaderContainer.style.display = 'none';
810
+ this.templateData.outputInfoContainer.style.display = 'none';
811
+ this._outputViewContainer = undefined;
812
+ }
813
+ }
814
+ let DeletedElement = class DeletedElement extends SingleSideDiffElement {
815
+ constructor(notebookEditor, cell, templateData, languageService, modelService, textModelService, instantiationService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService, textConfigurationService) {
816
+ super(notebookEditor, cell, templateData, 'left', instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService, textConfigurationService);
817
+ }
818
+ get nestedCellViewModel() {
819
+ return this.cell.original;
820
+ }
821
+ get readonly() {
822
+ return true;
823
+ }
824
+ styleContainer(container) {
825
+ container.classList.remove('inserted');
826
+ container.classList.add('removed');
827
+ }
828
+ layout(state) {
829
+ scheduleAtNextAnimationFrame(getWindow(this._diffEditorContainer), () => {
830
+ if ((state.editorHeight || state.outerWidth) && this._editor) {
831
+ this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
832
+ this._editor.layout({
833
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
834
+ height: this.cell.layoutInfo.editorHeight
835
+ });
836
+ }
837
+ if (state.outerWidth && this._editor) {
838
+ this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
839
+ this._editor.layout();
840
+ }
841
+ if (state.metadataHeight || state.outerWidth) {
842
+ this._metadataEditor?.layout({
843
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
844
+ height: this.cell.layoutInfo.metadataHeight
845
+ });
846
+ }
847
+ if (state.outputTotalHeight || state.outerWidth) {
848
+ this._outputEditor?.layout({
849
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
850
+ height: this.cell.layoutInfo.outputTotalHeight
851
+ });
852
+ }
853
+ if (this._diagonalFill) {
854
+ this._diagonalFill.style.height = `${this.calculateDiagonalFillHeight()}px`;
855
+ }
856
+ this.layoutNotebookCell();
857
+ });
858
+ }
859
+ _buildOutputRendererContainer() {
860
+ if (!this._outputViewContainer) {
861
+ this._outputViewContainer = append(this._outputInfoContainer, $('.output-view-container'));
862
+ this._outputEmptyElement = append(this._outputViewContainer, $('.output-empty-view'));
863
+ const span = append(this._outputEmptyElement, $('span'));
864
+ span.innerText = 'No outputs to render';
865
+ if (this.cell.original.outputs.length === 0) {
866
+ this._outputEmptyElement.style.display = 'block';
867
+ }
868
+ else {
869
+ this._outputEmptyElement.style.display = 'none';
870
+ }
871
+ this.cell.layoutChange();
872
+ this._outputLeftView = this.instantiationService.createInstance(OutputContainer, this.notebookEditor, this.notebookEditor.textModel, this.cell, this.cell.original, DiffSide.Original, this._outputViewContainer);
873
+ this._register(this._outputLeftView);
874
+ this._outputLeftView.render();
875
+ const removedOutputRenderListener = this.notebookEditor.onDidDynamicOutputRendered(e => {
876
+ if (( (e.cell.uri.toString())) === ( (this.cell.original.uri.toString()))) {
877
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, ['nb-cellDeleted'], []);
878
+ removedOutputRenderListener.dispose();
879
+ }
880
+ });
881
+ this._register(removedOutputRenderListener);
882
+ }
883
+ this._outputViewContainer.style.display = 'block';
884
+ }
885
+ _decorate() {
886
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, ['nb-cellDeleted'], []);
887
+ }
888
+ _showOutputsRenderer() {
889
+ if (this._outputViewContainer) {
890
+ this._outputViewContainer.style.display = 'block';
891
+ this._outputLeftView?.showOutputs();
892
+ this._decorate();
893
+ }
894
+ }
895
+ _hideOutputsRenderer() {
896
+ if (this._outputViewContainer) {
897
+ this._outputViewContainer.style.display = 'none';
898
+ this._outputLeftView?.hideOutputs();
899
+ }
900
+ }
901
+ dispose() {
902
+ if (this._editor) {
903
+ this.cell.saveSpirceEditorViewState(this._editor.saveViewState());
904
+ }
905
+ super.dispose();
906
+ }
907
+ };
908
+ DeletedElement = ( (__decorate([
909
+ ( (__param(3, ILanguageService))),
910
+ ( (__param(4, IModelService))),
911
+ ( (__param(5, ITextModelService))),
912
+ ( (__param(6, IInstantiationService))),
913
+ ( (__param(7, IContextMenuService))),
914
+ ( (__param(8, IKeybindingService))),
915
+ ( (__param(9, INotificationService))),
916
+ ( (__param(10, IMenuService))),
917
+ ( (__param(11, IContextKeyService))),
918
+ ( (__param(12, IConfigurationService))),
919
+ ( (__param(13, ITextResourceConfigurationService)))
920
+ ], DeletedElement)));
921
+ let InsertElement = class InsertElement extends SingleSideDiffElement {
922
+ constructor(notebookEditor, cell, templateData, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService, textConfigurationService) {
923
+ super(notebookEditor, cell, templateData, 'right', instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService, textConfigurationService);
924
+ }
925
+ get nestedCellViewModel() {
926
+ return this.cell.modified;
927
+ }
928
+ get readonly() {
929
+ return false;
930
+ }
931
+ styleContainer(container) {
932
+ container.classList.remove('removed');
933
+ container.classList.add('inserted');
934
+ }
935
+ _buildOutputRendererContainer() {
936
+ if (!this._outputViewContainer) {
937
+ this._outputViewContainer = append(this._outputInfoContainer, $('.output-view-container'));
938
+ this._outputEmptyElement = append(this._outputViewContainer, $('.output-empty-view'));
939
+ this._outputEmptyElement.innerText = 'No outputs to render';
940
+ if (this.cell.modified.outputs.length === 0) {
941
+ this._outputEmptyElement.style.display = 'block';
942
+ }
943
+ else {
944
+ this._outputEmptyElement.style.display = 'none';
945
+ }
946
+ this.cell.layoutChange();
947
+ this._outputRightView = this.instantiationService.createInstance(OutputContainer, this.notebookEditor, this.notebookEditor.textModel, this.cell, this.cell.modified, DiffSide.Modified, this._outputViewContainer);
948
+ this._register(this._outputRightView);
949
+ this._outputRightView.render();
950
+ const insertOutputRenderListener = this.notebookEditor.onDidDynamicOutputRendered(e => {
951
+ if (( (e.cell.uri.toString())) === ( (this.cell.modified.uri.toString()))) {
952
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, ['nb-cellAdded'], []);
953
+ insertOutputRenderListener.dispose();
954
+ }
955
+ });
956
+ this._register(insertOutputRenderListener);
957
+ }
958
+ this._outputViewContainer.style.display = 'block';
959
+ }
960
+ _decorate() {
961
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, ['nb-cellAdded'], []);
962
+ }
963
+ _showOutputsRenderer() {
964
+ if (this._outputViewContainer) {
965
+ this._outputViewContainer.style.display = 'block';
966
+ this._outputRightView?.showOutputs();
967
+ this._decorate();
968
+ }
969
+ }
970
+ _hideOutputsRenderer() {
971
+ if (this._outputViewContainer) {
972
+ this._outputViewContainer.style.display = 'none';
973
+ this._outputRightView?.hideOutputs();
974
+ }
975
+ }
976
+ layout(state) {
977
+ scheduleAtNextAnimationFrame(getWindow(this._diffEditorContainer), () => {
978
+ if ((state.editorHeight || state.outerWidth) && this._editor) {
979
+ this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
980
+ this._editor.layout({
981
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
982
+ height: this.cell.layoutInfo.editorHeight
983
+ });
984
+ }
985
+ if (state.outerWidth && this._editor) {
986
+ this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
987
+ this._editor.layout();
988
+ }
989
+ if (state.metadataHeight || state.outerWidth) {
990
+ this._metadataEditor?.layout({
991
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true),
992
+ height: this.cell.layoutInfo.metadataHeight
993
+ });
994
+ }
995
+ if (state.outputTotalHeight || state.outerWidth) {
996
+ this._outputEditor?.layout({
997
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
998
+ height: this.cell.layoutInfo.outputTotalHeight
999
+ });
1000
+ }
1001
+ this.layoutNotebookCell();
1002
+ if (this._diagonalFill) {
1003
+ this._diagonalFill.style.height = `${this.calculateDiagonalFillHeight()}px`;
1004
+ }
1005
+ });
1006
+ }
1007
+ dispose() {
1008
+ if (this._editor) {
1009
+ this.cell.saveSpirceEditorViewState(this._editor.saveViewState());
1010
+ }
1011
+ super.dispose();
1012
+ }
1013
+ };
1014
+ InsertElement = ( (__decorate([
1015
+ ( (__param(3, IInstantiationService))),
1016
+ ( (__param(4, ILanguageService))),
1017
+ ( (__param(5, IModelService))),
1018
+ ( (__param(6, ITextModelService))),
1019
+ ( (__param(7, IContextMenuService))),
1020
+ ( (__param(8, IKeybindingService))),
1021
+ ( (__param(9, INotificationService))),
1022
+ ( (__param(10, IMenuService))),
1023
+ ( (__param(11, IContextKeyService))),
1024
+ ( (__param(12, IConfigurationService))),
1025
+ ( (__param(13, ITextResourceConfigurationService)))
1026
+ ], InsertElement)));
1027
+ let ModifiedElement = class ModifiedElement extends AbstractElementRenderer {
1028
+ constructor(notebookEditor, cell, templateData, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService, textConfigurationService) {
1029
+ super(notebookEditor, cell, templateData, 'full', instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService, textConfigurationService);
1030
+ this.cell = cell;
1031
+ this.templateData = templateData;
1032
+ this._editorViewStateChanged = false;
1033
+ this.updateBorders();
1034
+ }
1035
+ init() { }
1036
+ styleContainer(container) {
1037
+ container.classList.remove('inserted', 'removed');
1038
+ }
1039
+ buildBody() {
1040
+ super.buildBody();
1041
+ if (this.cell.displayIconToHideUnmodifiedCells) {
1042
+ this._register(this.templateData.marginOverlay.onAction(() => this.cell.hideUnchangedCells()));
1043
+ this.templateData.marginOverlay.show();
1044
+ }
1045
+ else {
1046
+ this.templateData.marginOverlay.hide();
1047
+ }
1048
+ }
1049
+ _disposeMetadata() {
1050
+ this.cell.metadataStatusHeight = 0;
1051
+ this.cell.metadataHeight = 0;
1052
+ this.templateData.metadataHeaderContainer.style.display = 'none';
1053
+ this.templateData.metadataInfoContainer.style.display = 'none';
1054
+ this._metadataEditor = undefined;
1055
+ }
1056
+ _buildMetadata() {
1057
+ this._metadataHeaderContainer = this.templateData.metadataHeaderContainer;
1058
+ this._metadataInfoContainer = this.templateData.metadataInfoContainer;
1059
+ this._metadataHeaderContainer.style.display = 'flex';
1060
+ this._metadataInfoContainer.style.display = 'block';
1061
+ this._metadataHeaderContainer.innerText = '';
1062
+ this._metadataInfoContainer.innerText = '';
1063
+ this._metadataHeader = this.instantiationService.createInstance(PropertyHeader, this.cell, this._metadataHeaderContainer, this.notebookEditor, {
1064
+ updateInfoRendering: this.updateMetadataRendering.bind(this),
1065
+ checkIfModified: (cell) => {
1066
+ return cell.checkMetadataIfModified();
1067
+ },
1068
+ getFoldingState: (cell) => {
1069
+ return cell.metadataFoldingState;
1070
+ },
1071
+ updateFoldingState: (cell, state) => {
1072
+ cell.metadataFoldingState = state;
1073
+ },
1074
+ unChangedLabel: 'Metadata',
1075
+ changedLabel: 'Metadata changed',
1076
+ prefix: 'metadata',
1077
+ menuId: MenuId.NotebookDiffCellMetadataTitle
1078
+ });
1079
+ this._metadataLocalDisposable.add(this._metadataHeader);
1080
+ this._metadataHeader.buildHeader();
1081
+ }
1082
+ _disposeOutput() {
1083
+ this._hideOutputsRaw();
1084
+ this._hideOutputsRenderer();
1085
+ this._hideOutputsEmptyView();
1086
+ this.cell.rawOutputHeight = 0;
1087
+ this.cell.outputStatusHeight = 0;
1088
+ this.templateData.outputHeaderContainer.style.display = 'none';
1089
+ this.templateData.outputInfoContainer.style.display = 'none';
1090
+ this._outputViewContainer = undefined;
1091
+ }
1092
+ _buildOutput() {
1093
+ this.templateData.outputHeaderContainer.style.display = 'flex';
1094
+ this.templateData.outputInfoContainer.style.display = 'block';
1095
+ this._outputHeaderContainer = this.templateData.outputHeaderContainer;
1096
+ this._outputInfoContainer = this.templateData.outputInfoContainer;
1097
+ this._outputHeaderContainer.innerText = '';
1098
+ this._outputInfoContainer.innerText = '';
1099
+ if (this.cell.checkIfOutputsModified()) {
1100
+ this._outputInfoContainer.classList.add('modified');
1101
+ }
1102
+ else {
1103
+ this._outputInfoContainer.classList.remove('modified');
1104
+ }
1105
+ this._outputHeader = this.instantiationService.createInstance(PropertyHeader, this.cell, this._outputHeaderContainer, this.notebookEditor, {
1106
+ updateInfoRendering: this.updateOutputRendering.bind(this),
1107
+ checkIfModified: (cell) => {
1108
+ return cell.checkIfOutputsModified();
1109
+ },
1110
+ getFoldingState: (cell) => {
1111
+ return cell.outputFoldingState;
1112
+ },
1113
+ updateFoldingState: (cell, state) => {
1114
+ cell.outputFoldingState = state;
1115
+ },
1116
+ unChangedLabel: 'Outputs',
1117
+ changedLabel: 'Outputs changed',
1118
+ prefix: 'output',
1119
+ menuId: MenuId.NotebookDiffCellOutputsTitle
1120
+ });
1121
+ this._outputLocalDisposable.add(this._outputHeader);
1122
+ this._outputHeader.buildHeader();
1123
+ }
1124
+ _buildOutputRendererContainer() {
1125
+ if (!this._outputViewContainer) {
1126
+ this._outputViewContainer = append(this._outputInfoContainer, $('.output-view-container'));
1127
+ this._outputEmptyElement = append(this._outputViewContainer, $('.output-empty-view'));
1128
+ this._outputEmptyElement.innerText = 'No outputs to render';
1129
+ if (!this.cell.checkIfOutputsModified() && this.cell.modified.outputs.length === 0) {
1130
+ this._outputEmptyElement.style.display = 'block';
1131
+ }
1132
+ else {
1133
+ this._outputEmptyElement.style.display = 'none';
1134
+ }
1135
+ this.cell.layoutChange();
1136
+ this._register(this.cell.modified.textModel.onDidChangeOutputs(() => {
1137
+ if (!this.cell.checkIfOutputsModified() && this.cell.modified.outputs.length === 0) {
1138
+ this._outputEmptyElement.style.display = 'block';
1139
+ }
1140
+ else {
1141
+ this._outputEmptyElement.style.display = 'none';
1142
+ }
1143
+ this._decorate();
1144
+ }));
1145
+ this._outputLeftContainer = append(this._outputViewContainer, $('.output-view-container-left'));
1146
+ this._outputRightContainer = append(this._outputViewContainer, $('.output-view-container-right'));
1147
+ this._outputMetadataContainer = append(this._outputViewContainer, $('.output-view-container-metadata'));
1148
+ const outputModified = this.cell.checkIfOutputsModified();
1149
+ const outputMetadataChangeOnly = outputModified
1150
+ && outputModified.kind === OutputComparison.Metadata
1151
+ && this.cell.original.outputs.length === 1
1152
+ && this.cell.modified.outputs.length === 1
1153
+ && outputEqual(this.cell.original.outputs[0], this.cell.modified.outputs[0]) === OutputComparison.Metadata;
1154
+ if (outputModified && !outputMetadataChangeOnly) {
1155
+ const originalOutputRenderListener = this.notebookEditor.onDidDynamicOutputRendered(e => {
1156
+ if (( (e.cell.uri.toString())) === ( (this.cell.original.uri.toString())) && this.cell.checkIfOutputsModified()) {
1157
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, ['nb-cellDeleted'], []);
1158
+ originalOutputRenderListener.dispose();
1159
+ }
1160
+ });
1161
+ const modifiedOutputRenderListener = this.notebookEditor.onDidDynamicOutputRendered(e => {
1162
+ if (( (e.cell.uri.toString())) === ( (this.cell.modified.uri.toString())) && this.cell.checkIfOutputsModified()) {
1163
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, ['nb-cellAdded'], []);
1164
+ modifiedOutputRenderListener.dispose();
1165
+ }
1166
+ });
1167
+ this._register(originalOutputRenderListener);
1168
+ this._register(modifiedOutputRenderListener);
1169
+ }
1170
+ this._outputLeftView = this.instantiationService.createInstance(OutputContainer, this.notebookEditor, this.notebookEditor.textModel, this.cell, this.cell.original, DiffSide.Original, this._outputLeftContainer);
1171
+ this._outputLeftView.render();
1172
+ this._register(this._outputLeftView);
1173
+ this._outputRightView = this.instantiationService.createInstance(OutputContainer, this.notebookEditor, this.notebookEditor.textModel, this.cell, this.cell.modified, DiffSide.Modified, this._outputRightContainer);
1174
+ this._outputRightView.render();
1175
+ this._register(this._outputRightView);
1176
+ if (outputModified && !outputMetadataChangeOnly) {
1177
+ this._decorate();
1178
+ }
1179
+ if (outputMetadataChangeOnly) {
1180
+ this._outputMetadataContainer.style.top = `${this.cell.layoutInfo.rawOutputHeight}px`;
1181
+ this._outputMetadataEditor = this.instantiationService.createInstance(DiffEditorWidget, this._outputMetadataContainer, {
1182
+ ...fixedDiffEditorOptions,
1183
+ overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(),
1184
+ readOnly: true,
1185
+ ignoreTrimWhitespace: false,
1186
+ automaticLayout: false,
1187
+ dimension: {
1188
+ height: OUTPUT_EDITOR_HEIGHT_MAGIC,
1189
+ width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true)
1190
+ }
1191
+ }, {
1192
+ originalEditor: getOptimizedNestedCodeEditorWidgetOptions(),
1193
+ modifiedEditor: getOptimizedNestedCodeEditorWidgetOptions()
1194
+ });
1195
+ this._register(this._outputMetadataEditor);
1196
+ const originalOutputMetadataSource = JSON.stringify(this.cell.original.outputs[0].metadata ?? {}, undefined, '\t');
1197
+ const modifiedOutputMetadataSource = JSON.stringify(this.cell.modified.outputs[0].metadata ?? {}, undefined, '\t');
1198
+ const mode = this.languageService.createById('json');
1199
+ const originalModel = this.modelService.createModel(originalOutputMetadataSource, mode, undefined, true);
1200
+ const modifiedModel = this.modelService.createModel(modifiedOutputMetadataSource, mode, undefined, true);
1201
+ this._outputMetadataEditor.setModel({
1202
+ original: originalModel,
1203
+ modified: modifiedModel
1204
+ });
1205
+ this.cell.outputMetadataHeight = this._outputMetadataEditor.getContentHeight();
1206
+ this._register(this._outputMetadataEditor.onDidContentSizeChange((e) => {
1207
+ this.cell.outputMetadataHeight = e.contentHeight;
1208
+ }));
1209
+ }
1210
+ }
1211
+ this._outputViewContainer.style.display = 'block';
1212
+ }
1213
+ _decorate() {
1214
+ if (this.cell.checkIfOutputsModified()) {
1215
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, ['nb-cellDeleted'], []);
1216
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, ['nb-cellAdded'], []);
1217
+ }
1218
+ else {
1219
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, [], ['nb-cellDeleted']);
1220
+ this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, [], ['nb-cellAdded']);
1221
+ }
1222
+ }
1223
+ _showOutputsRenderer() {
1224
+ if (this._outputViewContainer) {
1225
+ this._outputViewContainer.style.display = 'block';
1226
+ this._outputLeftView?.showOutputs();
1227
+ this._outputRightView?.showOutputs();
1228
+ this._outputMetadataEditor?.layout({
1229
+ width: this._editor?.getViewWidth() || this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true),
1230
+ height: this.cell.layoutInfo.outputMetadataHeight
1231
+ });
1232
+ this._decorate();
1233
+ }
1234
+ }
1235
+ _hideOutputsRenderer() {
1236
+ if (this._outputViewContainer) {
1237
+ this._outputViewContainer.style.display = 'none';
1238
+ this._outputLeftView?.hideOutputs();
1239
+ this._outputRightView?.hideOutputs();
1240
+ }
1241
+ }
1242
+ updateSourceEditor() {
1243
+ this._cellHeaderContainer = this.templateData.cellHeaderContainer;
1244
+ this._cellHeaderContainer.style.display = 'flex';
1245
+ this._cellHeaderContainer.innerText = '';
1246
+ const modifiedCell = this.cell.modified;
1247
+ this._editorContainer = this.templateData.editorContainer;
1248
+ this._editorContainer.classList.add('diff');
1249
+ const renderSourceEditor = () => {
1250
+ if (this.cell.cellFoldingState === PropertyFoldingState.Collapsed) {
1251
+ this._editorContainer.style.display = 'none';
1252
+ this.cell.editorHeight = 0;
1253
+ return;
1254
+ }
1255
+ const lineCount = modifiedCell.textModel.textBuffer.getLineCount();
1256
+ const lineHeight = this.notebookEditor.getLayoutInfo().fontInfo.lineHeight || 17;
1257
+ const editorHeight = this.cell.layoutInfo.editorHeight !== 0 ? this.cell.layoutInfo.editorHeight : (lineCount * lineHeight) + fixedEditorPadding.top + fixedEditorPadding.bottom;
1258
+ this._editorContainer.style.height = `${editorHeight}px`;
1259
+ this._editorContainer.style.display = 'block';
1260
+ if (this._editor) {
1261
+ const contentHeight = this._editor.getContentHeight();
1262
+ if (contentHeight >= 0) {
1263
+ this.cell.editorHeight = contentHeight;
1264
+ }
1265
+ return;
1266
+ }
1267
+ this._editor = this.templateData.sourceEditor;
1268
+ if (lineCount === 1) {
1269
+ this._editor.updateOptions({
1270
+ padding: fixedEditorPaddingSingleLineCells
1271
+ });
1272
+ }
1273
+ this._editor.layout({
1274
+ width: this.notebookEditor.getLayoutInfo().width - 2 * DIFF_CELL_MARGIN,
1275
+ height: editorHeight
1276
+ });
1277
+ this._register(this._editor.onDidContentSizeChange((e) => {
1278
+ if (this.cell.cellFoldingState === PropertyFoldingState.Expanded && e.contentHeightChanged && this.cell.layoutInfo.editorHeight !== e.contentHeight) {
1279
+ this.cell.editorHeight = e.contentHeight;
1280
+ }
1281
+ }));
1282
+ this._initializeSourceDiffEditor();
1283
+ };
1284
+ this._cellHeader = this._register(this.instantiationService.createInstance(PropertyHeader, this.cell, this._cellHeaderContainer, this.notebookEditor, {
1285
+ updateInfoRendering: () => renderSourceEditor(),
1286
+ checkIfModified: (cell) => {
1287
+ return cell.modified?.textModel.getTextBufferHash() !== cell.original?.textModel.getTextBufferHash() ? { reason: undefined } : false;
1288
+ },
1289
+ getFoldingState: (cell) => cell.cellFoldingState,
1290
+ updateFoldingState: (cell, state) => cell.cellFoldingState = state,
1291
+ unChangedLabel: 'Input',
1292
+ changedLabel: 'Input changed',
1293
+ prefix: 'input',
1294
+ menuId: MenuId.NotebookDiffCellInputTitle
1295
+ }));
1296
+ this._cellHeader.buildHeader();
1297
+ renderSourceEditor();
1298
+ const scopedContextKeyService = this.contextKeyService.createScoped(this.templateData.inputToolbarContainer);
1299
+ this._register(scopedContextKeyService);
1300
+ const inputChanged = NOTEBOOK_DIFF_CELL_INPUT.bindTo(scopedContextKeyService);
1301
+ inputChanged.set(this.cell.modified.textModel.getTextBufferHash() !== this.cell.original.textModel.getTextBufferHash());
1302
+ const ignoreWhitespace = NOTEBOOK_DIFF_CELL_IGNORE_WHITESPACE.bindTo(scopedContextKeyService);
1303
+ const ignore = this.textConfigurationService.getValue(this.cell.modified.uri, 'diffEditor.ignoreTrimWhitespace');
1304
+ ignoreWhitespace.set(ignore);
1305
+ this._toolbar = this.templateData.toolbar;
1306
+ this._toolbar.context = {
1307
+ cell: this.cell
1308
+ };
1309
+ const refreshToolbar = () => {
1310
+ const ignore = this.textConfigurationService.getValue(this.cell.modified.uri, 'diffEditor.ignoreTrimWhitespace');
1311
+ ignoreWhitespace.set(ignore);
1312
+ const hasChanges = this.cell.modified.textModel.getTextBufferHash() !== this.cell.original.textModel.getTextBufferHash();
1313
+ inputChanged.set(hasChanges);
1314
+ if (hasChanges) {
1315
+ const actions = [];
1316
+ const menu = this.menuService.getMenuActions(MenuId.NotebookDiffCellInputTitle, scopedContextKeyService, { shouldForwardArgs: true });
1317
+ createAndFillInActionBarActions(menu, actions);
1318
+ this._toolbar.setActions(actions);
1319
+ }
1320
+ else {
1321
+ this._toolbar.setActions([]);
1322
+ }
1323
+ };
1324
+ this._register(this.cell.modified.textModel.onDidChangeContent(() => refreshToolbar()));
1325
+ this._register(this.textConfigurationService.onDidChangeConfiguration(e => {
1326
+ if (e.affectsConfiguration(this.cell.modified.uri, 'diffEditor') &&
1327
+ ( (e.affectedKeys.has('diffEditor.ignoreTrimWhitespace')))) {
1328
+ refreshToolbar();
1329
+ }
1330
+ }));
1331
+ refreshToolbar();
1332
+ }
1333
+ async _initializeSourceDiffEditor() {
1334
+ const originalCell = this.cell.original;
1335
+ const modifiedCell = this.cell.modified;
1336
+ const originalRef = await this.textModelService.createModelReference(originalCell.uri);
1337
+ const modifiedRef = await this.textModelService.createModelReference(modifiedCell.uri);
1338
+ if (this._isDisposed) {
1339
+ return;
1340
+ }
1341
+ const textModel = originalRef.object.textEditorModel;
1342
+ const modifiedTextModel = modifiedRef.object.textEditorModel;
1343
+ this._register(originalRef);
1344
+ this._register(modifiedRef);
1345
+ this._editor.setModel({
1346
+ original: textModel,
1347
+ modified: modifiedTextModel,
1348
+ });
1349
+ const handleViewStateChange = () => {
1350
+ this._editorViewStateChanged = true;
1351
+ };
1352
+ const handleScrollChange = (e) => {
1353
+ if (e.scrollTopChanged || e.scrollLeftChanged) {
1354
+ this._editorViewStateChanged = true;
1355
+ }
1356
+ };
1357
+ this.updateEditorOptionsForWhitespace();
1358
+ this._register(this._editor.getOriginalEditor().onDidChangeCursorSelection(handleViewStateChange));
1359
+ this._register(this._editor.getOriginalEditor().onDidScrollChange(handleScrollChange));
1360
+ this._register(this._editor.getModifiedEditor().onDidChangeCursorSelection(handleViewStateChange));
1361
+ this._register(this._editor.getModifiedEditor().onDidScrollChange(handleScrollChange));
1362
+ const editorViewState = this.cell.getSourceEditorViewState();
1363
+ if (editorViewState) {
1364
+ this._editor.restoreViewState(editorViewState);
1365
+ }
1366
+ const contentHeight = this._editor.getContentHeight();
1367
+ this.cell.editorHeight = contentHeight;
1368
+ }
1369
+ updateEditorOptionsForWhitespace() {
1370
+ const editor = this._editor;
1371
+ if (!editor) {
1372
+ return;
1373
+ }
1374
+ const uri = editor.getModel()?.modified.uri || editor.getModel()?.original.uri;
1375
+ if (!uri) {
1376
+ return;
1377
+ }
1378
+ const ignoreTrimWhitespace = this.textConfigurationService.getValue(uri, 'diffEditor.ignoreTrimWhitespace');
1379
+ editor.updateOptions({ ignoreTrimWhitespace });
1380
+ this._register(this.textConfigurationService.onDidChangeConfiguration(e => {
1381
+ if (e.affectsConfiguration(uri, 'diffEditor') &&
1382
+ ( (e.affectedKeys.has('diffEditor.ignoreTrimWhitespace')))) {
1383
+ const ignoreTrimWhitespace = this.textConfigurationService.getValue(uri, 'diffEditor.ignoreTrimWhitespace');
1384
+ editor.updateOptions({ ignoreTrimWhitespace });
1385
+ }
1386
+ }));
1387
+ }
1388
+ layout(state) {
1389
+ scheduleAtNextAnimationFrame(getWindow(this._diffEditorContainer), () => {
1390
+ if (state.editorHeight && this._editor) {
1391
+ this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
1392
+ this._editor.layout({
1393
+ width: this._editor.getViewWidth(),
1394
+ height: this.cell.layoutInfo.editorHeight
1395
+ });
1396
+ }
1397
+ if (state.outerWidth && this._editor) {
1398
+ this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
1399
+ this._editor.layout();
1400
+ }
1401
+ if (state.metadataHeight || state.outerWidth) {
1402
+ if (this._metadataEditorContainer) {
1403
+ this._metadataEditorContainer.style.height = `${this.cell.layoutInfo.metadataHeight}px`;
1404
+ this._metadataEditor?.layout({
1405
+ width: this._editor?.getViewWidth() || this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true),
1406
+ height: this.cell.layoutInfo.metadataHeight
1407
+ });
1408
+ }
1409
+ }
1410
+ if (state.outputTotalHeight || state.outerWidth) {
1411
+ if (this._outputEditorContainer) {
1412
+ this._outputEditorContainer.style.height = `${this.cell.layoutInfo.outputTotalHeight}px`;
1413
+ this._outputEditor?.layout({
1414
+ width: this._editor?.getViewWidth() || this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true),
1415
+ height: this.cell.layoutInfo.outputTotalHeight
1416
+ });
1417
+ }
1418
+ if (this._outputMetadataContainer) {
1419
+ this._outputMetadataContainer.style.height = `${this.cell.layoutInfo.outputMetadataHeight}px`;
1420
+ this._outputMetadataContainer.style.top = `${this.cell.layoutInfo.outputTotalHeight - this.cell.layoutInfo.outputMetadataHeight}px`;
1421
+ this._outputMetadataEditor?.layout({
1422
+ width: this._editor?.getViewWidth() || this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true),
1423
+ height: this.cell.layoutInfo.outputMetadataHeight
1424
+ });
1425
+ }
1426
+ }
1427
+ this.layoutNotebookCell();
1428
+ });
1429
+ }
1430
+ dispose() {
1431
+ if (this._editor) {
1432
+ this._editor.setModel(null);
1433
+ }
1434
+ if (this._editor && this._editorViewStateChanged) {
1435
+ this.cell.saveSpirceEditorViewState(this._editor.saveViewState());
1436
+ }
1437
+ super.dispose();
1438
+ }
1439
+ };
1440
+ ModifiedElement = ( (__decorate([
1441
+ ( (__param(3, IInstantiationService))),
1442
+ ( (__param(4, ILanguageService))),
1443
+ ( (__param(5, IModelService))),
1444
+ ( (__param(6, ITextModelService))),
1445
+ ( (__param(7, IContextMenuService))),
1446
+ ( (__param(8, IKeybindingService))),
1447
+ ( (__param(9, INotificationService))),
1448
+ ( (__param(10, IMenuService))),
1449
+ ( (__param(11, IContextKeyService))),
1450
+ ( (__param(12, IConfigurationService))),
1451
+ ( (__param(13, ITextResourceConfigurationService)))
1452
+ ], ModifiedElement)));
1453
+ class CollapsedCellOverlayWidget extends Disposable {
1454
+ constructor(container) {
1455
+ super();
1456
+ this.container = container;
1457
+ this._nodes = h('div.diff-hidden-cells', [
1458
+ h('div.center@content', { style: { display: 'flex' } }, [
1459
+ $('a', {
1460
+ title: ( localize(11475, 'Show Unchanged Cells')),
1461
+ role: 'button',
1462
+ onclick: () => { this._action.fire(); }
1463
+ }, ...renderLabelWithIcons('$(unfold)'))
1464
+ ]),
1465
+ ]);
1466
+ this._action = this._register(( (new Emitter())));
1467
+ this.onAction = this._action.event;
1468
+ this._nodes.root.style.display = 'none';
1469
+ container.appendChild(this._nodes.root);
1470
+ }
1471
+ show() {
1472
+ this._nodes.root.style.display = 'block';
1473
+ }
1474
+ hide() {
1475
+ this._nodes.root.style.display = 'none';
1476
+ }
1477
+ dispose() {
1478
+ this.hide();
1479
+ this.container.removeChild(this._nodes.root);
1480
+ reset(this._nodes.root);
1481
+ super.dispose();
1482
+ }
1483
+ }
1484
+ class UnchangedCellOverlayWidget extends Disposable {
1485
+ constructor(container) {
1486
+ super();
1487
+ this.container = container;
1488
+ this._nodes = h('div.diff-hidden-cells', [
1489
+ h('div.center@content', { style: { display: 'flex' } }, [
1490
+ $('a', {
1491
+ title: ( localize(11476, 'Hide Unchanged Cells')),
1492
+ role: 'button',
1493
+ onclick: () => { this._action.fire(); }
1494
+ }, ...renderLabelWithIcons('$(fold)')),
1495
+ ]),
1496
+ ]);
1497
+ this._action = this._register(( (new Emitter())));
1498
+ this.onAction = this._action.event;
1499
+ this._nodes.root.style.display = 'none';
1500
+ container.appendChild(this._nodes.root);
1501
+ }
1502
+ show() {
1503
+ this._nodes.root.style.display = 'block';
1504
+ }
1505
+ hide() {
1506
+ this._nodes.root.style.display = 'none';
1507
+ }
1508
+ dispose() {
1509
+ this.hide();
1510
+ this.container.removeChild(this._nodes.root);
1511
+ reset(this._nodes.root);
1512
+ super.dispose();
1513
+ }
1514
+ }
1515
+ export { CellDiffPlaceholderElement, CollapsedCellOverlayWidget, DeletedElement, InsertElement, ModifiedElement, UnchangedCellOverlayWidget, getOptimizedNestedCodeEditorWidgetOptions };