@codingame/monaco-vscode-api 32.0.1 → 33.0.3

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 (630) hide show
  1. package/missing-services.js +51 -7
  2. package/package.json +8 -8
  3. package/service-override/tools/views.d.ts +2 -2
  4. package/services.d.ts +3 -0
  5. package/services.js +8 -3
  6. package/vscode/product.json.js +1 -1
  7. package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  8. package/vscode/src/vs/base/common/arrays.js +5 -1
  9. package/vscode/src/vs/base/common/async.js +94 -1
  10. package/vscode/src/vs/base/common/cache.js +22 -1
  11. package/vscode/src/vs/base/common/defaultAccount.d.ts +63 -0
  12. package/vscode/src/vs/base/common/policy.d.ts +1 -1
  13. package/vscode/src/vs/base/common/product.d.ts +0 -2
  14. package/vscode/src/vs/base/parts/ipc/common/ipc.net.d.ts +12 -0
  15. package/vscode/src/vs/base/parts/ipc/common/ipc.net.js +1 -1
  16. package/vscode/src/vs/editor/common/config/editorOptions.js +1 -1
  17. package/vscode/src/vs/editor/common/textModelEditSource.js +18 -1
  18. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +2 -2
  19. package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.d.ts +2 -0
  20. package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +22 -2
  21. package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.d.ts +1 -0
  22. package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.js +58 -17
  23. package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  24. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  25. package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +9 -9
  26. package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +11 -11
  27. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
  28. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  29. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  30. package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  31. package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  32. package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  33. package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  34. package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  35. package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  36. package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  37. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  38. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js +6 -3
  39. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  40. package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +3 -3
  41. package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +3 -0
  42. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  43. package/vscode/src/vs/platform/action/common/actionCommonCategories.js +6 -6
  44. package/vscode/src/vs/platform/actionWidget/browser/actionList.d.ts +7 -0
  45. package/vscode/src/vs/platform/actionWidget/browser/actionList.js +24 -10
  46. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css +1 -0
  47. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +12 -12
  48. package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +3 -3
  49. package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -2
  50. package/vscode/src/vs/platform/actions/common/menuResetAction.js +1 -1
  51. package/vscode/src/vs/platform/actions/common/menuService.js +2 -2
  52. package/vscode/src/vs/platform/agentHost/browser/nullAgentHostService.d.ts +1 -1
  53. package/vscode/src/vs/platform/agentHost/common/agentHostUri.js +3 -0
  54. package/vscode/src/vs/platform/agentHost/common/agentPluginManager.d.ts +1 -1
  55. package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +1 -1
  56. package/vscode/src/vs/platform/agentHost/common/remoteAgentHostService.d.ts +13 -4
  57. package/vscode/src/vs/platform/agentHost/common/remoteAgentHostService.js +8 -3
  58. package/vscode/src/vs/platform/agentHost/common/remoteAgentHostService.service.d.ts +17 -1
  59. package/vscode/src/vs/platform/agentHost/common/sshRemoteAgentHost.d.ts +27 -0
  60. package/vscode/src/vs/platform/agentHost/common/sshRemoteAgentHost.service.d.ts +20 -1
  61. package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +1 -1
  62. package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +1054 -0
  63. package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.js +59 -0
  64. package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +17 -1
  65. package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +6 -2
  66. package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +5 -0
  67. package/vscode/src/vs/platform/agentHost/common/state/protocolUpgrade.d.ts +73 -0
  68. package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +139 -0
  69. package/vscode/src/vs/platform/agentHost/common/state/sessionState.js +24 -0
  70. package/vscode/src/vs/platform/browserView/common/browserView.d.ts +20 -0
  71. package/vscode/src/vs/platform/browserView/common/browserView.js +1 -0
  72. package/vscode/src/vs/platform/browserView/common/browserViewTelemetry.d.ts +3 -1
  73. package/vscode/src/vs/platform/configuration/common/configuration.js +1 -1
  74. package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +10 -10
  75. package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  76. package/vscode/src/vs/platform/contextkey/common/contextkey.js +10 -10
  77. package/vscode/src/vs/platform/contextkey/common/contextkeys.js +9 -9
  78. package/vscode/src/vs/platform/contextkey/common/scanner.js +5 -5
  79. package/vscode/src/vs/platform/defaultAccount/common/defaultAccount.d.ts +16 -1
  80. package/vscode/src/vs/platform/defaultAccount/common/defaultAccount.js +8 -0
  81. package/vscode/src/vs/platform/defaultAccount/common/defaultAccount.service.d.ts +9 -1
  82. package/vscode/src/vs/platform/dialogs/common/dialogs.js +9 -9
  83. package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
  84. package/vscode/src/vs/platform/environment/common/argv.d.ts +0 -2
  85. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +14 -14
  86. package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
  87. package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +7 -7
  88. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +21 -21
  89. package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +2 -2
  90. package/vscode/src/vs/platform/files/common/files.js +6 -6
  91. package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  92. package/vscode/src/vs/platform/hover/browser/hoverService.js +1 -1
  93. package/vscode/src/vs/platform/hover/browser/hoverWidget.js +1 -1
  94. package/vscode/src/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  95. package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
  96. package/vscode/src/vs/platform/languagePacks/common/languagePacks.js +1 -1
  97. package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +3 -3
  98. package/vscode/src/vs/platform/list/browser/listService.js +25 -25
  99. package/vscode/src/vs/platform/log/common/log.js +6 -6
  100. package/vscode/src/vs/platform/markers/common/markerService.js +2 -2
  101. package/vscode/src/vs/platform/markers/common/markers.js +6 -6
  102. package/vscode/src/vs/platform/mcp/common/mcpManagementService.js +1 -1
  103. package/vscode/src/vs/platform/meteredConnection/common/meteredConnection.config.contribution.js +5 -5
  104. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.service.d.ts +2 -4
  105. package/vscode/src/vs/platform/notification/common/notification.js +3 -3
  106. package/vscode/src/vs/platform/policy/common/policy.d.ts +1 -1
  107. package/vscode/src/vs/platform/product/common/product.js +3 -3
  108. package/vscode/src/vs/platform/quickinput/browser/quickInput.js +10 -10
  109. package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  110. package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +6 -6
  111. package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +1 -1
  112. package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  113. package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +2 -2
  114. package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  115. package/vscode/src/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
  116. package/vscode/src/vs/platform/request/common/request.js +20 -20
  117. package/vscode/src/vs/platform/telemetry/common/telemetry.js +4 -1
  118. package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -1
  119. package/vscode/src/vs/platform/terminal/common/terminalPlatformConfiguration.js +34 -34
  120. package/vscode/src/vs/platform/terminal/common/terminalProfiles.js +1 -1
  121. package/vscode/src/vs/platform/theme/common/colorUtils.js +2 -2
  122. package/vscode/src/vs/platform/theme/common/colors/baseColors.js +19 -19
  123. package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +9 -9
  124. package/vscode/src/vs/platform/theme/common/colors/editorColors.js +95 -95
  125. package/vscode/src/vs/platform/theme/common/colors/inputColors.js +48 -48
  126. package/vscode/src/vs/platform/theme/common/colors/listColors.js +36 -36
  127. package/vscode/src/vs/platform/theme/common/colors/menuColors.js +7 -7
  128. package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
  129. package/vscode/src/vs/platform/theme/common/colors/miscColors.js +16 -16
  130. package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +10 -10
  131. package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
  132. package/vscode/src/vs/platform/theme/common/iconRegistry.js +6 -6
  133. package/vscode/src/vs/platform/theme/common/sizeUtils.d.ts +5 -3
  134. package/vscode/src/vs/platform/theme/common/sizeUtils.js +17 -3
  135. package/vscode/src/vs/platform/theme/common/sizes/baseSizes.js +11 -11
  136. package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +42 -42
  137. package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  138. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
  139. package/vscode/src/vs/platform/userDataSync/common/abstractSynchronizer.js +2 -2
  140. package/vscode/src/vs/platform/userDataSync/common/keybindingsSync.js +2 -2
  141. package/vscode/src/vs/platform/userDataSync/common/settingsSync.js +1 -1
  142. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
  143. package/vscode/src/vs/platform/userDataSync/common/userDataSyncMachines.js +1 -1
  144. package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
  145. package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +12 -12
  146. package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +7 -1
  147. package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +5 -5
  148. package/vscode/src/vs/workbench/api/common/extHostChatOutputRenderer.d.ts +2 -2
  149. package/vscode/src/vs/workbench/api/common/extHostChatOutputRenderer.js +2 -2
  150. package/vscode/src/vs/workbench/api/common/extHostChatStatus.js +9 -1
  151. package/vscode/src/vs/workbench/api/common/extHostConfiguration.js +1 -0
  152. package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
  153. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
  154. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +2 -2
  155. package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +3 -4
  156. package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
  157. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
  158. package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
  159. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +4 -1
  160. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +1 -1
  161. package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +2 -2
  162. package/vscode/src/vs/workbench/api/common/extHostWorkspace.d.ts +12 -0
  163. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +98 -38
  164. package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +11 -11
  165. package/vscode/src/vs/workbench/browser/actions/developerActions.js +35 -35
  166. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +127 -127
  167. package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
  168. package/vscode/src/vs/workbench/browser/actions/windowActions.js +29 -29
  169. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +21 -21
  170. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +4 -4
  171. package/vscode/src/vs/workbench/browser/editor.js +2 -2
  172. package/vscode/src/vs/workbench/browser/labels.js +4 -4
  173. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +23 -23
  174. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +26 -26
  175. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +4 -4
  176. package/vscode/src/vs/workbench/browser/parts/compositeBar.js +1 -1
  177. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +9 -9
  178. package/vscode/src/vs/workbench/browser/parts/compositePart.js +3 -3
  179. package/vscode/src/vs/workbench/browser/parts/dialogs/dialog.js +1 -1
  180. package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +3 -3
  181. package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +1 -1
  182. package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +3 -3
  183. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +37 -37
  184. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +12 -12
  185. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +1 -1
  186. package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +19 -9
  187. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.d.ts +1 -2
  188. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +139 -176
  189. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +28 -27
  190. package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +1 -1
  191. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +7 -7
  192. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +12 -12
  193. package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +2 -2
  194. package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +16 -10
  195. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +10 -10
  196. package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +5 -5
  197. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +66 -66
  198. package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +3 -3
  199. package/vscode/src/vs/workbench/browser/parts/editor/modalEditorPart.js +24 -7
  200. package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +1 -1
  201. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -1
  202. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +1 -1
  203. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +3 -3
  204. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
  205. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +19 -19
  206. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.js +22 -22
  207. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsAlerts.js +3 -3
  208. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +6 -6
  209. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +13 -13
  210. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsList.js +6 -6
  211. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsStatus.js +13 -13
  212. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +2 -2
  213. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +4 -4
  214. package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +4 -4
  215. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +3 -3
  216. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +27 -27
  217. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +3 -3
  218. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -2
  219. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +1 -1
  220. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +10 -10
  221. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarActions.js +15 -15
  222. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +2 -2
  223. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -1
  224. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +7 -7
  225. package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +4 -4
  226. package/vscode/src/vs/workbench/browser/parts/views/viewMenuActions.d.ts +7 -2
  227. package/vscode/src/vs/workbench/browser/parts/views/viewMenuActions.js +28 -5
  228. package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +7 -0
  229. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +11 -5
  230. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +12 -9
  231. package/vscode/src/vs/workbench/browser/quickaccess.js +1 -1
  232. package/vscode/src/vs/workbench/browser/window.js +14 -14
  233. package/vscode/src/vs/workbench/browser/workbench.contribution.js +225 -225
  234. package/vscode/src/vs/workbench/common/configuration.js +9 -9
  235. package/vscode/src/vs/workbench/common/contextkeys.js +82 -82
  236. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +1 -1
  237. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +1 -1
  238. package/vscode/src/vs/workbench/common/editor/textEditorModel.js +1 -1
  239. package/vscode/src/vs/workbench/common/editor.js +4 -4
  240. package/vscode/src/vs/workbench/common/theme.js +161 -161
  241. package/vscode/src/vs/workbench/common/views.js +4 -4
  242. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +156 -156
  243. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
  244. package/vscode/src/vs/workbench/contrib/browserView/common/browserEditorInput.js +1 -1
  245. package/vscode/src/vs/workbench/contrib/browserView/common/browserView.js +10 -7
  246. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +68 -66
  247. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.service.d.ts +8 -0
  248. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.service.js +6 -0
  249. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service.d.ts +70 -0
  250. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service.js +6 -0
  251. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +12 -12
  252. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +1 -1
  253. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +3 -3
  254. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatScreenshotContext.js +1 -1
  255. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +7 -7
  256. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service.d.ts +4 -2
  257. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +2 -2
  258. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +43 -43
  259. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
  260. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatOutputPartStateCache.service.d.ts +7 -0
  261. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatOutputPartStateCache.service.js +6 -0
  262. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.js +9 -9
  263. package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.d.ts +1 -0
  264. package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.js +93 -86
  265. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.js +2 -2
  266. package/vscode/src/vs/workbench/contrib/chat/common/chatModes.d.ts +4 -6
  267. package/vscode/src/vs/workbench/contrib/chat/common/chatModes.js +29 -21
  268. package/vscode/src/vs/workbench/contrib/chat/common/chatModes.service.d.ts +7 -8
  269. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +1 -1
  270. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.d.ts +41 -2
  271. package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +3 -0
  272. package/vscode/src/vs/workbench/contrib/chat/common/constants.js +3 -0
  273. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +1 -1
  274. package/vscode/src/vs/workbench/contrib/chat/common/editing/chatEditingService.js +2 -2
  275. package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +3 -3
  276. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.d.ts +17 -4
  277. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +152 -49
  278. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.service.d.ts +20 -0
  279. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.d.ts +3 -0
  280. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.js +17 -8
  281. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +1 -1
  282. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +21 -19
  283. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookSchema.js +18 -18
  284. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookTypes.js +20 -20
  285. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptFileAttributes.js +79 -79
  286. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptTypes.js +10 -10
  287. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +92 -0
  288. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +329 -0
  289. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +5 -44
  290. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +33 -276
  291. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +1 -1
  292. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +8 -8
  293. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +10 -10
  294. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +7 -7
  295. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +2 -2
  296. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +3 -3
  297. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +4 -4
  298. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +22 -22
  299. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.d.ts +2 -1
  300. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.js +6 -5
  301. package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.service.d.ts +2 -1
  302. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +11 -11
  303. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
  304. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
  305. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
  306. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +10 -10
  307. package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
  308. package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
  309. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +6 -6
  310. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
  311. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
  312. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +3 -3
  313. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
  314. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +12 -12
  315. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
  316. package/vscode/src/vs/workbench/contrib/codeEditor/common/languageConfigurationExtensionPoint.js +65 -65
  317. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +7 -7
  318. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +7 -7
  319. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +2 -2
  320. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +3 -3
  321. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +3 -3
  322. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +3 -3
  323. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +3 -3
  324. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
  325. package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
  326. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +7 -7
  327. package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +1 -1
  328. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +9 -9
  329. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +14 -14
  330. package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +16 -16
  331. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +7 -7
  332. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +12 -12
  333. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorDiffInput.d.ts +7 -12
  334. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorDiffInput.js +68 -64
  335. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +3 -3
  336. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +1 -1
  337. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +29 -29
  338. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +14 -14
  339. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +75 -75
  340. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +2 -2
  341. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +6 -6
  342. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -12
  343. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +38 -38
  344. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +2 -2
  345. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +3 -3
  346. package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +57 -57
  347. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +3 -3
  348. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +4 -4
  349. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +2 -2
  350. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +18 -18
  351. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +5 -5
  352. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +9 -9
  353. package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
  354. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +65 -65
  355. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +6 -6
  356. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
  357. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
  358. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +1 -1
  359. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +1 -1
  360. package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.js +2 -2
  361. package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +4 -4
  362. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +15 -0
  363. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +85 -0
  364. package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +1 -1
  365. package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +1 -1
  366. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +41 -41
  367. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.js +1 -1
  368. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +15 -15
  369. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +14 -14
  370. package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +149 -151
  371. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +179 -179
  372. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.js +1 -1
  373. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.js +1 -1
  374. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.js +5 -5
  375. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +25 -25
  376. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.js +4 -4
  377. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +7 -7
  378. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +47 -47
  379. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +6 -6
  380. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +30 -30
  381. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +79 -76
  382. package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +2 -2
  383. package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +1 -1
  384. package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +2 -2
  385. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
  386. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +5 -5
  387. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +2 -2
  388. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +3 -3
  389. package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +3 -3
  390. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -4
  391. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +3 -3
  392. package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +1 -1
  393. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +8 -8
  394. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +18 -18
  395. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +14 -14
  396. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +39 -39
  397. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +84 -84
  398. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands._save.js +4 -4
  399. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +2 -2
  400. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
  401. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +28 -28
  402. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +50 -50
  403. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
  404. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
  405. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +4 -4
  406. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +7 -7
  407. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +17 -17
  408. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +7 -7
  409. package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +4 -4
  410. package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +1 -1
  411. package/vscode/src/vs/workbench/contrib/files/common/files.js +16 -16
  412. package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
  413. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
  414. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
  415. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  416. package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
  417. package/vscode/src/vs/workbench/contrib/inlineCompletions/browser/inlineCompletionLanguageStatusBarContribution.d.ts +17 -0
  418. package/vscode/src/vs/workbench/contrib/inlineCompletions/browser/inlineCompletionLanguageStatusBarContribution.js +108 -0
  419. package/vscode/src/vs/workbench/contrib/inlineCompletions/browser/inlineCompletions.contribution.d.ts +8 -0
  420. package/vscode/src/vs/workbench/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +49 -0
  421. package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
  422. package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
  423. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommandsAddConfiguration.js +66 -66
  424. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +40 -40
  425. package/vscode/src/vs/workbench/contrib/mcp/common/mcpConfiguration.js +42 -42
  426. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +16 -16
  427. package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +4 -4
  428. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +4 -4
  429. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +23 -23
  430. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +2 -2
  431. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +8 -8
  432. package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnection.contribution.js +8 -8
  433. package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnectionStatus.js +4 -4
  434. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +1 -1
  435. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +3 -3
  436. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +1 -1
  437. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +17 -17
  438. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
  439. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +746 -0
  440. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +6 -6
  441. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
  442. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
  443. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
  444. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +300 -0
  445. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
  446. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
  447. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
  448. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1963 -0
  449. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
  450. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +314 -0
  451. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
  452. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +886 -0
  453. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
  454. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +118 -0
  455. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
  456. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +71 -0
  457. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
  458. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
  459. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
  460. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +313 -0
  461. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
  462. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +265 -0
  463. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
  464. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +185 -0
  465. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
  466. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +104 -0
  467. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
  468. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +43 -0
  469. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
  470. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +41 -0
  471. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
  472. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +69 -0
  473. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
  474. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
  475. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +933 -0
  476. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
  477. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +32 -0
  478. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
  479. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +643 -0
  480. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
  481. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +197 -0
  482. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
  483. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +539 -0
  484. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
  485. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
  486. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +3 -3
  487. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +7 -7
  488. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +24 -24
  489. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +29 -29
  490. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +5 -5
  491. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +7 -7
  492. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
  493. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +4 -4
  494. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +1 -1
  495. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +3 -3
  496. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +1 -1
  497. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +2 -2
  498. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +4 -4
  499. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +1 -1
  500. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +14 -14
  501. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +2 -2
  502. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +1 -1
  503. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
  504. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +90 -0
  505. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
  506. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
  507. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -2
  508. package/vscode/src/vs/workbench/contrib/opener/browser/opener.contribution.d.ts +1 -0
  509. package/vscode/src/vs/workbench/contrib/opener/browser/opener.contribution.js +44 -0
  510. package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +3 -3
  511. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +13 -13
  512. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +10 -10
  513. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +60 -60
  514. package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +3 -3
  515. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +21 -21
  516. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +15 -15
  517. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +17 -17
  518. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +59 -59
  519. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistory.js +11 -11
  520. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.js +6 -6
  521. package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.js +14 -14
  522. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +9 -9
  523. package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +3 -3
  524. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +1 -1
  525. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +9 -9
  526. package/vscode/src/vs/workbench/contrib/search/browser/searchChatContext.js +5 -5
  527. package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +1 -1
  528. package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +20 -20
  529. package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +2 -2
  530. package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +14 -14
  531. package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +55 -55
  532. package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +11 -11
  533. package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +2 -2
  534. package/vscode/src/vs/workbench/contrib/search/common/search.d.ts +2 -0
  535. package/vscode/src/vs/workbench/contrib/search/common/search.js +9 -1
  536. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +4 -4
  537. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +5 -5
  538. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
  539. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
  540. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
  541. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
  542. package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
  543. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +6 -6
  544. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +6 -6
  545. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
  546. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +3 -3
  547. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +13 -13
  548. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +40 -40
  549. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +15 -15
  550. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +10 -10
  551. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -23
  552. package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +17 -17
  553. package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +26 -26
  554. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/common/terminalAccessibilityConfiguration.js +2 -2
  555. package/vscode/src/vs/workbench/contrib/terminalContrib/autoReplies/common/terminalAutoRepliesConfiguration.js +2 -2
  556. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +9 -9
  557. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.d.ts +2 -0
  558. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.js +104 -74
  559. package/vscode/src/vs/workbench/contrib/terminalContrib/commandGuide/common/terminalCommandGuideConfiguration.js +1 -1
  560. package/vscode/src/vs/workbench/contrib/terminalContrib/history/common/terminal.history.js +1 -1
  561. package/vscode/src/vs/workbench/contrib/terminalContrib/inlineHint/common/terminalInitialHintConfiguration.js +2 -2
  562. package/vscode/src/vs/workbench/contrib/terminalContrib/notification/common/terminalNotificationConfiguration.js +1 -1
  563. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/common/terminalStickyScrollConfiguration.js +3 -3
  564. package/vscode/src/vs/workbench/contrib/terminalContrib/suggest/common/terminalSuggestConfiguration.js +30 -30
  565. package/vscode/src/vs/workbench/contrib/terminalContrib/typeAhead/common/terminalTypeAheadConfiguration.js +5 -5
  566. package/vscode/src/vs/workbench/contrib/terminalContrib/zoom/common/terminal.zoom.js +2 -2
  567. package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
  568. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
  569. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
  570. package/vscode/src/vs/workbench/contrib/url/browser/trustedDomains.js +6 -6
  571. package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +3 -3
  572. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindAccessibilityHelp.js +30 -30
  573. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +1 -1
  574. package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.js +14 -14
  575. package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +2 -2
  576. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +2 -1
  577. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +14 -3
  578. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +31 -25
  579. package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +15 -0
  580. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +5 -5
  581. package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.d.ts +11 -2
  582. package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.js +65 -22
  583. package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.service.d.ts +2 -0
  584. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +16 -16
  585. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +1 -1
  586. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
  587. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.d.ts +15 -3
  588. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +19 -3
  589. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.service.d.ts +2 -2
  590. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionsIcons.js +3 -3
  591. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +6 -6
  592. package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +10 -10
  593. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +88 -88
  594. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +5 -5
  595. package/vscode/src/vs/workbench/services/language/common/languageService.js +24 -24
  596. package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
  597. package/vscode/src/vs/workbench/services/policies/common/accountPolicyService.js +1 -1
  598. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +2 -2
  599. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +7 -7
  600. package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +4 -4
  601. package/vscode/src/vs/workbench/services/preferences/common/preferencesModels.js +2 -2
  602. package/vscode/src/vs/workbench/services/preferences/common/preferencesValidation.js +30 -30
  603. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
  604. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
  605. package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
  606. package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +9 -9
  607. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +3 -3
  608. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +18 -18
  609. package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +8 -8
  610. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
  611. package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +24 -24
  612. package/vscode/src/vs/workbench/services/title/browser/titleService.service.d.ts +7 -0
  613. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -3
  614. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
  615. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
  616. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +16 -16
  617. package/vscode-dts/vscode.proposed.authIssuers.d.ts +14 -0
  618. package/vscode-dts/vscode.proposed.chatOutputRenderer.d.ts +23 -3
  619. package/vscode-dts/vscode.proposed.chatProvider.d.ts +0 -9
  620. package/vscode-dts/vscode.proposed.chatStatusItem.d.ts +5 -0
  621. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.service.d.ts +0 -7
  622. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.service.js +0 -6
  623. package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.d.ts +0 -39
  624. package/vscode/src/vs/workbench/contrib/chat/common/widget/input/modelPickerWidget.d.ts +0 -4
  625. package/vscode/src/vs/workbench/contrib/chat/common/widget/input/modelPickerWidget.js +0 -9
  626. package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.d.ts +0 -76
  627. package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +0 -470
  628. package/vscode/src/vs/workbench/contrib/extensions/browser/media/runtimeExtensionsEditor.css +0 -86
  629. package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.d.ts +0 -15
  630. package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +0 -47
@@ -0,0 +1,933 @@
1
+
2
+ import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
3
+ import { localize } from '../../../../../nls.js';
4
+ import { $ as $$1, append, createElement, addStandardDisposableGenericMouseDownListener, addStandardDisposableGenericMouseUpListener, scheduleAtNextAnimationFrame } from '../../../../../base/browser/dom.js';
5
+ import { IStorageService } from '../../../../../platform/storage/common/storage.service.js';
6
+ import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.service.js';
7
+ import { registerThemingParticipant } from '../../../../../platform/theme/common/themeService.js';
8
+ import { IThemeService } from '../../../../../platform/theme/common/themeService.service.js';
9
+ import { EditorPaneSelectionCompareResult, EditorPaneSelectionChangeReason } from '../../../../common/editor.js';
10
+ import { getDefaultNotebookCreationOptions } from '../notebookEditorWidget.js';
11
+ import { CancellationTokenSource } from '../../../../../base/common/cancellation.js';
12
+ import { SideBySideDiffElementViewModel } from './diffElementViewModel.js';
13
+ import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';
14
+ import { CellDiffSingleSideRenderer, CellDiffSideBySideRenderer, CellDiffPlaceholderRenderer, NotebookDocumentMetadataDiffRenderer, NotebookTextDiffList, NotebookCellTextDiffListDelegate } from './notebookDiffList.js';
15
+ import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.service.js';
16
+ import '../../../../../platform/theme/common/colorUtils.js';
17
+ import { foreground, focusBorder } from '../../../../../platform/theme/common/colors/baseColors.js';
18
+ import '../../../../../platform/theme/common/colors/chartsColors.js';
19
+ import { editorBackground, diffDiagonalFill } from '../../../../../platform/theme/common/colors/editorColors.js';
20
+ import '../../../../../platform/theme/common/colors/inputColors.js';
21
+ import '../../../../../platform/theme/common/colors/listColors.js';
22
+ import '../../../../../platform/theme/common/colors/menuColors.js';
23
+ import '../../../../../platform/theme/common/colors/minimapColors.js';
24
+ import '../../../../../platform/theme/common/colors/miscColors.js';
25
+ import '../../../../../platform/theme/common/colors/quickpickColors.js';
26
+ import '../../../../../platform/theme/common/colors/searchColors.js';
27
+ import { INotebookEditorWorkerService } from '../../common/services/notebookWorkerService.service.js';
28
+ import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.service.js';
29
+ import { createBareFontInfoFromRawSettings } from '../../../../../editor/common/config/fontInfoFromSettings.js';
30
+ import { PixelRatio } from '../../../../../base/browser/pixelRatio.js';
31
+ import { DiffSide, DIFF_CELL_MARGIN } from './notebookDiffEditorBrowser.js';
32
+ import { Emitter, Event } from '../../../../../base/common/event.js';
33
+ import { DisposableStore, toDisposable } from '../../../../../base/common/lifecycle.js';
34
+ import { EditorPane } from '../../../../browser/parts/editor/editorPane.js';
35
+ import { NOTEBOOK_DIFF_EDITOR_ID, NotebookSetting, CellUri } from '../../common/notebookCommon.js';
36
+ import { SequencerByKey } from '../../../../../base/common/async.js';
37
+ import { generateUuid } from '../../../../../base/common/uuid.js';
38
+ import { BackLayerWebView } from '../view/renderers/backLayerWebView.js';
39
+ import { NotebookDiffEditorEventDispatcher, NotebookDiffLayoutChangedEvent } from './eventDispatcher.js';
40
+ import { FontMeasurements } from '../../../../../editor/browser/config/fontMeasurements.js';
41
+ import { NotebookOptions } from '../notebookOptions.js';
42
+ import { cellIndexesToRanges, cellRangesToIndexes } from '../../common/notebookRange.js';
43
+ import { NotebookDiffOverviewRuler } from './notebookDiffOverviewRuler.js';
44
+ import { registerZIndex, ZIndex } from '../../../../../platform/layout/browser/zIndexRegistry.js';
45
+ import { NotebookDiffViewModel } from './notebookDiffViewModel.js';
46
+ import { INotebookService } from '../../common/notebookService.service.js';
47
+ import { DiffEditorHeightCalculatorService } from './editorHeightCalculator.js';
48
+ import { IEditorService } from '../../../../services/editor/common/editorService.service.js';
49
+ import { NotebookInlineDiffWidget } from './inlineDiff/notebookInlineDiffWidget.js';
50
+ import '../../../../../base/common/observableInternal/index.js';
51
+ import { observableValue } from '../../../../../base/common/observableInternal/observables/observableValue.js';
52
+
53
+ var NotebookTextDiffEditor_1;
54
+ const $ = $$1;
55
+ class NotebookDiffEditorSelection {
56
+ constructor(selections) {
57
+ this.selections = selections;
58
+ }
59
+ compare(other) {
60
+ if (!(other instanceof NotebookDiffEditorSelection)) {
61
+ return EditorPaneSelectionCompareResult.DIFFERENT;
62
+ }
63
+ if (this.selections.length !== other.selections.length) {
64
+ return EditorPaneSelectionCompareResult.DIFFERENT;
65
+ }
66
+ for (let i = 0; i < this.selections.length; i++) {
67
+ if (this.selections[i] !== other.selections[i]) {
68
+ return EditorPaneSelectionCompareResult.DIFFERENT;
69
+ }
70
+ }
71
+ return EditorPaneSelectionCompareResult.IDENTICAL;
72
+ }
73
+ restore(options) {
74
+ const notebookOptions = {
75
+ cellSelections: cellIndexesToRanges(this.selections)
76
+ };
77
+ Object.assign(notebookOptions, options);
78
+ return notebookOptions;
79
+ }
80
+ }
81
+ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
82
+ static {
83
+ NotebookTextDiffEditor_1 = this;
84
+ }
85
+ static {
86
+ this.ENTIRE_DIFF_OVERVIEW_WIDTH = 30;
87
+ }
88
+ static {
89
+ this.ID = NOTEBOOK_DIFF_EDITOR_ID;
90
+ }
91
+ get textModel() {
92
+ return this._model?.modified.notebook;
93
+ }
94
+ get inlineNotebookEditor() {
95
+ if (this._inlineView) {
96
+ return this.inlineDiffWidget?.editorWidget;
97
+ }
98
+ return undefined;
99
+ }
100
+ get notebookOptions() {
101
+ return this._notebookOptions;
102
+ }
103
+ get isDisposed() {
104
+ return this._isDisposed;
105
+ }
106
+ constructor(
107
+ group,
108
+ instantiationService,
109
+ themeService,
110
+ contextKeyService,
111
+ notebookEditorWorkerService,
112
+ configurationService,
113
+ telemetryService,
114
+ storageService,
115
+ notebookService,
116
+ editorService
117
+ ) {
118
+ super(
119
+ NotebookTextDiffEditor_1.ID,
120
+ group,
121
+ telemetryService,
122
+ themeService,
123
+ storageService
124
+ );
125
+ this.instantiationService = instantiationService;
126
+ this.contextKeyService = contextKeyService;
127
+ this.notebookEditorWorkerService = notebookEditorWorkerService;
128
+ this.configurationService = configurationService;
129
+ this.notebookService = notebookService;
130
+ this.editorService = editorService;
131
+ this.creationOptions = getDefaultNotebookCreationOptions();
132
+ this._dimension = undefined;
133
+ this._modifiedWebview = null;
134
+ this._originalWebview = null;
135
+ this._webviewTransparentCover = null;
136
+ this._inlineView = false;
137
+ this._onMouseUp = this._register(( new Emitter()));
138
+ this.onMouseUp = this._onMouseUp.event;
139
+ this._onDidScroll = this._register(( new Emitter()));
140
+ this.onDidScroll = this._onDidScroll.event;
141
+ this.onDidChangeScroll = this._onDidScroll.event;
142
+ this._model = null;
143
+ this._modifiedResourceDisposableStore = this._register(( new DisposableStore()));
144
+ this._insetModifyQueueByOutputId = ( new SequencerByKey());
145
+ this._onDidDynamicOutputRendered = this._register(( new Emitter()));
146
+ this.onDidDynamicOutputRendered = this._onDidDynamicOutputRendered.event;
147
+ this._localStore = this._register(( new DisposableStore()));
148
+ this._onDidChangeSelection = this._register(( new Emitter()));
149
+ this.onDidChangeSelection = this._onDidChangeSelection.event;
150
+ this._isDisposed = false;
151
+ this._currentChangedIndex = observableValue(this, -1);
152
+ this.currentChangedIndex = this._currentChangedIndex;
153
+ this.pendingLayouts = ( new WeakMap());
154
+ this.diffEditorCalcuator = this.instantiationService.createInstance(DiffEditorHeightCalculatorService, this.fontInfo.lineHeight);
155
+ this._notebookOptions = instantiationService.createInstance(NotebookOptions, this.window, false, undefined);
156
+ this._register(this._notebookOptions);
157
+ this._revealFirst = true;
158
+ }
159
+ get fontInfo() {
160
+ if (!this._fontInfo) {
161
+ this._fontInfo = this.createFontInfo();
162
+ }
163
+ return this._fontInfo;
164
+ }
165
+ createFontInfo() {
166
+ const editorOptions = this.configurationService.getValue("editor");
167
+ return FontMeasurements.readFontInfo(
168
+ this.window,
169
+ createBareFontInfoFromRawSettings(editorOptions, PixelRatio.getInstance(this.window).value)
170
+ );
171
+ }
172
+ isOverviewRulerEnabled() {
173
+ return this.configurationService.getValue(NotebookSetting.diffOverviewRuler) ?? false;
174
+ }
175
+ getSelection() {
176
+ const selections = this._list.getFocus();
177
+ return ( new NotebookDiffEditorSelection(selections));
178
+ }
179
+ toggleNotebookCellSelection(cell) {}
180
+ updatePerformanceMetadata(cellId, executionId, duration, rendererId) {}
181
+ async focusNotebookCell(cell, focus) {}
182
+ async focusNextNotebookCell(cell, focus) {}
183
+ didFocusOutputInputChange(inputFocused) {}
184
+ getScrollTop() {
185
+ return this._list?.scrollTop ?? 0;
186
+ }
187
+ getScrollHeight() {
188
+ return this._list?.scrollHeight ?? 0;
189
+ }
190
+ getScrollPosition() {
191
+ return {
192
+ scrollTop: this.getScrollTop(),
193
+ scrollLeft: this._list?.scrollLeft ?? 0
194
+ };
195
+ }
196
+ setScrollPosition(scrollPosition) {
197
+ if (!this._list) {
198
+ return;
199
+ }
200
+ this._list.scrollTop = scrollPosition.scrollTop;
201
+ if (scrollPosition.scrollLeft !== undefined) {
202
+ this._list.scrollLeft = scrollPosition.scrollLeft;
203
+ }
204
+ }
205
+ delegateVerticalScrollbarPointerDown(browserEvent) {
206
+ this._list?.delegateVerticalScrollbarPointerDown(browserEvent);
207
+ }
208
+ updateOutputHeight(cellInfo, output, outputHeight, isInit) {
209
+ const diffElement = cellInfo.diffElement;
210
+ const cell = this.getCellByInfo(cellInfo);
211
+ const outputIndex = cell.outputsViewModels.indexOf(output);
212
+ if (diffElement instanceof SideBySideDiffElementViewModel) {
213
+ const info = CellUri.parse(cellInfo.cellUri);
214
+ if (!info) {
215
+ return;
216
+ }
217
+ diffElement.updateOutputHeight(( info.notebook.toString()) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified, outputIndex, outputHeight);
218
+ } else {
219
+ diffElement.updateOutputHeight(
220
+ diffElement.type === "insert" ? DiffSide.Modified : DiffSide.Original,
221
+ outputIndex,
222
+ outputHeight
223
+ );
224
+ }
225
+ if (isInit) {
226
+ this._onDidDynamicOutputRendered.fire({
227
+ cell,
228
+ output
229
+ });
230
+ }
231
+ }
232
+ setMarkupCellEditState(cellId, editState) {}
233
+ didStartDragMarkupCell(cellId, event) {}
234
+ didDragMarkupCell(cellId, event) {}
235
+ didEndDragMarkupCell(cellId) {}
236
+ didDropMarkupCell(cellId) {}
237
+ didResizeOutput(cellId) {}
238
+ async toggleInlineView() {
239
+ this._layoutCancellationTokenSource?.dispose();
240
+ this._inlineView = !this._inlineView;
241
+ if (!this._lastLayoutProperties) {
242
+ return;
243
+ }
244
+ if (this._inlineView) {
245
+ this.layout(
246
+ this._lastLayoutProperties?.dimension,
247
+ this._lastLayoutProperties?.position
248
+ );
249
+ this.inlineDiffWidget?.show(
250
+ this.input,
251
+ this._model?.modified.notebook,
252
+ this._model?.original.notebook,
253
+ this._options
254
+ );
255
+ } else {
256
+ this.layout(
257
+ this._lastLayoutProperties?.dimension,
258
+ this._lastLayoutProperties?.position
259
+ );
260
+ this.inlineDiffWidget?.hide();
261
+ }
262
+ this._layoutCancellationTokenSource = ( new CancellationTokenSource());
263
+ this.updateLayout(this._layoutCancellationTokenSource.token);
264
+ }
265
+ createEditor(parent) {
266
+ this._rootElement = append(parent, $$1(".notebook-text-diff-editor"));
267
+ this._overflowContainer = createElement("div");
268
+ this._overflowContainer.classList.add("notebook-overflow-widget-container", "monaco-editor");
269
+ append(parent, this._overflowContainer);
270
+ const renderers = [
271
+ this.instantiationService.createInstance(CellDiffSingleSideRenderer, this),
272
+ this.instantiationService.createInstance(CellDiffSideBySideRenderer, this),
273
+ this.instantiationService.createInstance(CellDiffPlaceholderRenderer, this),
274
+ this.instantiationService.createInstance(NotebookDocumentMetadataDiffRenderer, this)
275
+ ];
276
+ this._listViewContainer = append(this._rootElement, $$1(".notebook-diff-list-view"));
277
+ this._list = this.instantiationService.createInstance(
278
+ NotebookTextDiffList,
279
+ "NotebookTextDiff",
280
+ this._listViewContainer,
281
+ this.instantiationService.createInstance(NotebookCellTextDiffListDelegate, this.window),
282
+ renderers,
283
+ this.contextKeyService,
284
+ {
285
+ setRowLineHeight: false,
286
+ setRowHeight: false,
287
+ supportDynamicHeights: true,
288
+ horizontalScrolling: false,
289
+ keyboardSupport: false,
290
+ mouseSupport: true,
291
+ multipleSelectionSupport: false,
292
+ typeNavigationEnabled: true,
293
+ paddingBottom: 0,
294
+ styleController: _suffix => {
295
+ return this._list;
296
+ },
297
+ overrideStyles: {
298
+ listBackground: editorBackground,
299
+ listActiveSelectionBackground: editorBackground,
300
+ listActiveSelectionForeground: foreground,
301
+ listFocusAndSelectionBackground: editorBackground,
302
+ listFocusAndSelectionForeground: foreground,
303
+ listFocusBackground: editorBackground,
304
+ listFocusForeground: foreground,
305
+ listHoverForeground: foreground,
306
+ listHoverBackground: editorBackground,
307
+ listHoverOutline: focusBorder,
308
+ listFocusOutline: focusBorder,
309
+ listInactiveSelectionBackground: editorBackground,
310
+ listInactiveSelectionForeground: foreground,
311
+ listInactiveFocusBackground: editorBackground,
312
+ listInactiveFocusOutline: editorBackground
313
+ },
314
+ accessibilityProvider: {
315
+ getAriaLabel() {
316
+ return null;
317
+ },
318
+ getWidgetAriaLabel() {
319
+ return localize(11819, "Notebook Text Diff");
320
+ }
321
+ }
322
+ }
323
+ );
324
+ this.inlineDiffWidget = this._register(this.instantiationService.createInstance(
325
+ NotebookInlineDiffWidget,
326
+ this._rootElement,
327
+ this.group.id,
328
+ this.window,
329
+ this.notebookOptions,
330
+ this._dimension
331
+ ));
332
+ this._register(this._list);
333
+ this._register(this._list.onMouseUp(e => {
334
+ if (e.element) {
335
+ if (typeof e.index === "number") {
336
+ this._list.setFocus([e.index]);
337
+ }
338
+ this._onMouseUp.fire({
339
+ event: e.browserEvent,
340
+ target: e.element
341
+ });
342
+ }
343
+ }));
344
+ this._register(this._list.onDidScroll(() => {
345
+ this._onDidScroll.fire();
346
+ }));
347
+ this._register(this._list.onDidChangeFocus(() => this._onDidChangeSelection.fire({
348
+ reason: EditorPaneSelectionChangeReason.USER
349
+ })));
350
+ this._overviewRulerContainer = createElement("div");
351
+ this._overviewRulerContainer.classList.add("notebook-overview-ruler-container");
352
+ this._rootElement.appendChild(this._overviewRulerContainer);
353
+ this._registerOverviewRuler();
354
+ this._webviewTransparentCover = append(this._list.rowsContainer, $(".webview-cover"));
355
+ this._webviewTransparentCover.style.display = "none";
356
+ this._register(
357
+ addStandardDisposableGenericMouseDownListener(this._overflowContainer, e => {
358
+ if (e.target.classList.contains("slider") && this._webviewTransparentCover) {
359
+ this._webviewTransparentCover.style.display = "block";
360
+ }
361
+ })
362
+ );
363
+ this._register(
364
+ addStandardDisposableGenericMouseUpListener(this._overflowContainer, () => {
365
+ if (this._webviewTransparentCover) {
366
+ this._webviewTransparentCover.style.display = "none";
367
+ }
368
+ })
369
+ );
370
+ this._register(this._list.onDidScroll(e => {
371
+ this._webviewTransparentCover.style.top = `${e.scrollTop}px`;
372
+ }));
373
+ }
374
+ _registerOverviewRuler() {
375
+ this._overviewRuler = this._register(this.instantiationService.createInstance(
376
+ NotebookDiffOverviewRuler,
377
+ this,
378
+ NotebookTextDiffEditor_1.ENTIRE_DIFF_OVERVIEW_WIDTH,
379
+ this._overviewRulerContainer
380
+ ));
381
+ }
382
+ _updateOutputsOffsetsInWebview(scrollTop, scrollHeight, activeWebview, getActiveNestedCell, diffSide) {
383
+ activeWebview.element.style.height = `${scrollHeight}px`;
384
+ if (activeWebview.insetMapping) {
385
+ const updateItems = [];
386
+ const removedItems = [];
387
+ activeWebview.insetMapping.forEach((value, key) => {
388
+ const cell = getActiveNestedCell(value.cellInfo.diffElement);
389
+ if (!cell) {
390
+ return;
391
+ }
392
+ const viewIndex = this._list.indexOf(value.cellInfo.diffElement);
393
+ if (viewIndex === undefined) {
394
+ return;
395
+ }
396
+ if (cell.outputsViewModels.indexOf(key) < 0) {
397
+ removedItems.push(key);
398
+ } else {
399
+ const cellTop = this._list.getCellViewScrollTop(value.cellInfo.diffElement);
400
+ const outputIndex = cell.outputsViewModels.indexOf(key);
401
+ const outputOffset = value.cellInfo.diffElement.getOutputOffsetInCell(diffSide, outputIndex);
402
+ updateItems.push({
403
+ cell,
404
+ output: key,
405
+ cellTop: cellTop,
406
+ outputOffset: outputOffset,
407
+ forceDisplay: false
408
+ });
409
+ }
410
+ });
411
+ activeWebview.removeInsets(removedItems);
412
+ if (updateItems.length) {
413
+ activeWebview.updateScrollTops(updateItems, []);
414
+ }
415
+ }
416
+ }
417
+ async setInput(input, options, context, token) {
418
+ this.inlineDiffWidget?.hide();
419
+ await super.setInput(input, options, context, token);
420
+ const model = await input.resolve();
421
+ if (this._model !== model) {
422
+ this._detachModel();
423
+ this._attachModel(model);
424
+ }
425
+ this._model = model;
426
+ if (this._model === null) {
427
+ return;
428
+ }
429
+ if (this._inlineView) {
430
+ this._listViewContainer.style.display = "none";
431
+ this.inlineDiffWidget?.show(input, model.modified.notebook, model.original.notebook, options);
432
+ } else {
433
+ this._listViewContainer.style.display = "block";
434
+ this.inlineDiffWidget?.hide();
435
+ }
436
+ this._revealFirst = true;
437
+ this._modifiedResourceDisposableStore.clear();
438
+ this._layoutCancellationTokenSource = ( new CancellationTokenSource());
439
+ this._modifiedResourceDisposableStore.add(Event.any(
440
+ this._model.original.notebook.onDidChangeContent,
441
+ this._model.modified.notebook.onDidChangeContent
442
+ )(e => {
443
+ if (this._model !== null && this.editorService.activeEditor !== input) {
444
+ this._layoutCancellationTokenSource?.dispose();
445
+ this._layoutCancellationTokenSource = ( new CancellationTokenSource());
446
+ this.updateLayout(this._layoutCancellationTokenSource.token);
447
+ }
448
+ }));
449
+ await this._createOriginalWebview(
450
+ generateUuid(),
451
+ this._model.original.viewType,
452
+ this._model.original.resource
453
+ );
454
+ if (this._originalWebview) {
455
+ this._modifiedResourceDisposableStore.add(this._originalWebview);
456
+ }
457
+ await this._createModifiedWebview(
458
+ generateUuid(),
459
+ this._model.modified.viewType,
460
+ this._model.modified.resource
461
+ );
462
+ if (this._modifiedWebview) {
463
+ this._modifiedResourceDisposableStore.add(this._modifiedWebview);
464
+ }
465
+ await this.updateLayout(
466
+ this._layoutCancellationTokenSource.token,
467
+ options?.cellSelections ? cellRangesToIndexes(options.cellSelections) : undefined
468
+ );
469
+ }
470
+ setVisible(visible) {
471
+ super.setVisible(visible);
472
+ if (!visible) {
473
+ this.inlineDiffWidget?.hide();
474
+ }
475
+ }
476
+ _detachModel() {
477
+ this._localStore.clear();
478
+ this._originalWebview?.dispose();
479
+ this._originalWebview?.element.remove();
480
+ this._originalWebview = null;
481
+ this._modifiedWebview?.dispose();
482
+ this._modifiedWebview?.element.remove();
483
+ this._modifiedWebview = null;
484
+ this.notebookDiffViewModel?.dispose();
485
+ this.notebookDiffViewModel = undefined;
486
+ this._modifiedResourceDisposableStore.clear();
487
+ this._list.clear();
488
+ }
489
+ _attachModel(model) {
490
+ this._model = model;
491
+ this._eventDispatcher = ( new NotebookDiffEditorEventDispatcher());
492
+ const updateInsets = () => {
493
+ scheduleAtNextAnimationFrame(this.window, () => {
494
+ if (this._isDisposed) {
495
+ return;
496
+ }
497
+ if (this._modifiedWebview) {
498
+ this._updateOutputsOffsetsInWebview(
499
+ this._list.scrollTop,
500
+ this._list.scrollHeight,
501
+ this._modifiedWebview,
502
+ diffElement => {
503
+ return diffElement.modified;
504
+ },
505
+ DiffSide.Modified
506
+ );
507
+ }
508
+ if (this._originalWebview) {
509
+ this._updateOutputsOffsetsInWebview(
510
+ this._list.scrollTop,
511
+ this._list.scrollHeight,
512
+ this._originalWebview,
513
+ diffElement => {
514
+ return diffElement.original;
515
+ },
516
+ DiffSide.Original
517
+ );
518
+ }
519
+ });
520
+ };
521
+ this._localStore.add(this._list.onDidChangeContentHeight(() => {
522
+ updateInsets();
523
+ }));
524
+ this._localStore.add(this._list.onDidChangeFocus(e => {
525
+ if (e.indexes.length && this.notebookDiffViewModel && e.indexes[0] < this.notebookDiffViewModel.items.length) {
526
+ const selectedItem = this.notebookDiffViewModel.items[e.indexes[0]];
527
+ const changedItems = this.notebookDiffViewModel.items.filter(
528
+ item => item.type !== "unchanged" && item.type !== "unchangedMetadata" && item.type !== "placeholder"
529
+ );
530
+ if (selectedItem && selectedItem?.type !== "placeholder" && selectedItem?.type !== "unchanged" && selectedItem?.type !== "unchangedMetadata") {
531
+ return this._currentChangedIndex.set(changedItems.indexOf(selectedItem), undefined);
532
+ }
533
+ }
534
+ return this._currentChangedIndex.set(-1, undefined);
535
+ }));
536
+ this._localStore.add(this._eventDispatcher.onDidChangeCellLayout(() => {
537
+ updateInsets();
538
+ }));
539
+ const vm = this.notebookDiffViewModel = this._register(( new NotebookDiffViewModel(
540
+ this._model,
541
+ this.notebookEditorWorkerService,
542
+ this.configurationService,
543
+ this._eventDispatcher,
544
+ this.notebookService,
545
+ this.diffEditorCalcuator,
546
+ this.fontInfo,
547
+ undefined
548
+ )));
549
+ this._localStore.add(this.notebookDiffViewModel.onDidChangeItems(e => {
550
+ this._originalWebview?.removeInsets([...this._originalWebview?.insetMapping.keys()]);
551
+ this._modifiedWebview?.removeInsets([...this._modifiedWebview?.insetMapping.keys()]);
552
+ if (this._revealFirst && typeof e.firstChangeIndex === "number" && e.firstChangeIndex > -1 && e.firstChangeIndex < this._list.length) {
553
+ this._revealFirst = false;
554
+ this._list.setFocus([e.firstChangeIndex]);
555
+ this._list.reveal(e.firstChangeIndex, 0.3);
556
+ }
557
+ this._list.splice(e.start, e.deleteCount, e.elements);
558
+ if (this.isOverviewRulerEnabled()) {
559
+ this._overviewRuler.updateViewModels(vm.items, this._eventDispatcher);
560
+ }
561
+ }));
562
+ }
563
+ async _createModifiedWebview(id, viewType, resource) {
564
+ this._modifiedWebview?.dispose();
565
+ this._modifiedWebview = this.instantiationService.createInstance(BackLayerWebView, this, id, viewType, resource, {
566
+ ...this._notebookOptions.computeDiffWebviewOptions(),
567
+ fontFamily: this._generateFontFamily()
568
+ }, undefined);
569
+ this._list.rowsContainer.insertAdjacentElement("afterbegin", this._modifiedWebview.element);
570
+ this._modifiedWebview.createWebview(this.window);
571
+ this._modifiedWebview.element.style.width = `calc(50% - 16px)`;
572
+ this._modifiedWebview.element.style.left = `calc(50%)`;
573
+ }
574
+ _generateFontFamily() {
575
+ return this.fontInfo.fontFamily ?? `"SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace`;
576
+ }
577
+ async _createOriginalWebview(id, viewType, resource) {
578
+ this._originalWebview?.dispose();
579
+ this._originalWebview = this.instantiationService.createInstance(BackLayerWebView, this, id, viewType, resource, {
580
+ ...this._notebookOptions.computeDiffWebviewOptions(),
581
+ fontFamily: this._generateFontFamily()
582
+ }, undefined);
583
+ this._list.rowsContainer.insertAdjacentElement("afterbegin", this._originalWebview.element);
584
+ this._originalWebview.createWebview(this.window);
585
+ this._originalWebview.element.style.width = `calc(50% - 16px)`;
586
+ this._originalWebview.element.style.left = `16px`;
587
+ }
588
+ setOptions(options) {
589
+ const selections = options?.cellSelections ? cellRangesToIndexes(options.cellSelections) : undefined;
590
+ if (selections) {
591
+ this._list.setFocus(selections);
592
+ }
593
+ }
594
+ async updateLayout(token, selections) {
595
+ if (!this._model || !this.notebookDiffViewModel) {
596
+ return;
597
+ }
598
+ await this.notebookDiffViewModel.computeDiff(token);
599
+ if (token.isCancellationRequested) {
600
+ return;
601
+ }
602
+ if (selections) {
603
+ this._list.setFocus(selections);
604
+ }
605
+ }
606
+ scheduleOutputHeightAck(cellInfo, outputId, height) {
607
+ const diffElement = cellInfo.diffElement;
608
+ let diffSide = DiffSide.Original;
609
+ if (diffElement instanceof SideBySideDiffElementViewModel) {
610
+ const info = CellUri.parse(cellInfo.cellUri);
611
+ if (!info) {
612
+ return;
613
+ }
614
+ diffSide = ( info.notebook.toString()) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified;
615
+ } else {
616
+ diffSide = diffElement.type === "insert" ? DiffSide.Modified : DiffSide.Original;
617
+ }
618
+ const webview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
619
+ scheduleAtNextAnimationFrame(this.window, () => {
620
+ webview?.ackHeight([{
621
+ cellId: cellInfo.cellId,
622
+ outputId,
623
+ height
624
+ }]);
625
+ }, 10);
626
+ }
627
+ layoutNotebookCell(cell, height) {
628
+ const relayout = (cell, height) => {
629
+ this._list.updateElementHeight2(cell, height);
630
+ };
631
+ let disposable = this.pendingLayouts.get(cell);
632
+ if (disposable) {
633
+ this._localStore.delete(disposable);
634
+ }
635
+ let r;
636
+ const layoutDisposable = scheduleAtNextAnimationFrame(this.window, () => {
637
+ this.pendingLayouts.delete(cell);
638
+ relayout(cell, height);
639
+ r();
640
+ });
641
+ disposable = toDisposable(() => {
642
+ layoutDisposable.dispose();
643
+ r();
644
+ });
645
+ this._localStore.add(disposable);
646
+ this.pendingLayouts.set(cell, disposable);
647
+ return ( new Promise(resolve => {
648
+ r = resolve;
649
+ }));
650
+ }
651
+ setScrollTop(scrollTop) {
652
+ this._list.scrollTop = scrollTop;
653
+ }
654
+ triggerScroll(event) {
655
+ this._list.triggerScrollFromMouseWheelEvent(event);
656
+ }
657
+ firstChange() {
658
+ if (!this.notebookDiffViewModel) {
659
+ return;
660
+ }
661
+ const currentViewModels = this.notebookDiffViewModel.items;
662
+ const index = currentViewModels.findIndex(
663
+ vm => vm.type !== "unchanged" && vm.type !== "unchangedMetadata" && vm.type !== "placeholder"
664
+ );
665
+ if (index >= 0) {
666
+ this._list.setFocus([index]);
667
+ this._list.reveal(index);
668
+ }
669
+ }
670
+ lastChange() {
671
+ if (!this.notebookDiffViewModel) {
672
+ return;
673
+ }
674
+ const currentViewModels = this.notebookDiffViewModel.items;
675
+ const item = currentViewModels.slice().reverse().find(
676
+ vm => vm.type !== "unchanged" && vm.type !== "unchangedMetadata" && vm.type !== "placeholder"
677
+ );
678
+ const index = item ? currentViewModels.indexOf(item) : -1;
679
+ if (index >= 0) {
680
+ this._list.setFocus([index]);
681
+ this._list.reveal(index);
682
+ }
683
+ }
684
+ previousChange() {
685
+ if (!this.notebookDiffViewModel) {
686
+ return;
687
+ }
688
+ let currFocus = this._list.getFocus()[0];
689
+ if (isNaN(currFocus) || currFocus < 0) {
690
+ currFocus = 0;
691
+ }
692
+ let prevChangeIndex = currFocus - 1;
693
+ const currentViewModels = this.notebookDiffViewModel.items;
694
+ while (prevChangeIndex >= 0) {
695
+ const vm = currentViewModels[prevChangeIndex];
696
+ if (vm.type !== "unchanged" && vm.type !== "unchangedMetadata" && vm.type !== "placeholder") {
697
+ break;
698
+ }
699
+ prevChangeIndex--;
700
+ }
701
+ if (prevChangeIndex >= 0) {
702
+ this._list.setFocus([prevChangeIndex]);
703
+ this._list.reveal(prevChangeIndex);
704
+ } else {
705
+ const index = currentViewModels.findLastIndex(
706
+ vm => vm.type !== "unchanged" && vm.type !== "unchangedMetadata" && vm.type !== "placeholder"
707
+ );
708
+ if (index >= 0) {
709
+ this._list.setFocus([index]);
710
+ this._list.reveal(index);
711
+ }
712
+ }
713
+ }
714
+ nextChange() {
715
+ if (!this.notebookDiffViewModel) {
716
+ return;
717
+ }
718
+ let currFocus = this._list.getFocus()[0];
719
+ if (isNaN(currFocus) || currFocus < 0) {
720
+ currFocus = 0;
721
+ }
722
+ let nextChangeIndex = currFocus + 1;
723
+ const currentViewModels = this.notebookDiffViewModel.items;
724
+ while (nextChangeIndex < currentViewModels.length) {
725
+ const vm = currentViewModels[nextChangeIndex];
726
+ if (vm.type !== "unchanged" && vm.type !== "unchangedMetadata" && vm.type !== "placeholder") {
727
+ break;
728
+ }
729
+ nextChangeIndex++;
730
+ }
731
+ if (nextChangeIndex < currentViewModels.length) {
732
+ this._list.setFocus([nextChangeIndex]);
733
+ this._list.reveal(nextChangeIndex);
734
+ } else {
735
+ const index = currentViewModels.findIndex(
736
+ vm => vm.type !== "unchanged" && vm.type !== "unchangedMetadata" && vm.type !== "placeholder"
737
+ );
738
+ if (index >= 0) {
739
+ this._list.setFocus([index]);
740
+ this._list.reveal(index);
741
+ }
742
+ }
743
+ }
744
+ createOutput(cellDiffViewModel, cellViewModel, output, getOffset, diffSide) {
745
+ this._insetModifyQueueByOutputId.queue(
746
+ output.source.model.outputId + (diffSide === DiffSide.Modified ? "-right" : "left"),
747
+ async () => {
748
+ const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
749
+ if (!activeWebview) {
750
+ return;
751
+ }
752
+ if (!( activeWebview.insetMapping.has(output.source))) {
753
+ const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
754
+ await activeWebview.createOutput({
755
+ diffElement: cellDiffViewModel,
756
+ cellHandle: cellViewModel.handle,
757
+ cellId: cellViewModel.id,
758
+ cellUri: cellViewModel.uri
759
+ }, output, cellTop, getOffset());
760
+ } else {
761
+ const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
762
+ const outputIndex = cellViewModel.outputsViewModels.indexOf(output.source);
763
+ const outputOffset = cellDiffViewModel.getOutputOffsetInCell(diffSide, outputIndex);
764
+ activeWebview.updateScrollTops([{
765
+ cell: cellViewModel,
766
+ output: output.source,
767
+ cellTop,
768
+ outputOffset,
769
+ forceDisplay: true
770
+ }], []);
771
+ }
772
+ }
773
+ );
774
+ }
775
+ updateMarkupCellHeight() {}
776
+ getCellByInfo(cellInfo) {
777
+ return cellInfo.diffElement.getCellByUri(cellInfo.cellUri);
778
+ }
779
+ getCellById(cellId) {
780
+ throw ( new Error("Not implemented"));
781
+ }
782
+ removeInset(cellDiffViewModel, cellViewModel, displayOutput, diffSide) {
783
+ this._insetModifyQueueByOutputId.queue(
784
+ displayOutput.model.outputId + (diffSide === DiffSide.Modified ? "-right" : "left"),
785
+ async () => {
786
+ const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
787
+ if (!activeWebview) {
788
+ return;
789
+ }
790
+ if (!( activeWebview.insetMapping.has(displayOutput))) {
791
+ return;
792
+ }
793
+ activeWebview.removeInsets([displayOutput]);
794
+ }
795
+ );
796
+ }
797
+ showInset(cellDiffViewModel, cellViewModel, displayOutput, diffSide) {
798
+ this._insetModifyQueueByOutputId.queue(
799
+ displayOutput.model.outputId + (diffSide === DiffSide.Modified ? "-right" : "left"),
800
+ async () => {
801
+ const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
802
+ if (!activeWebview) {
803
+ return;
804
+ }
805
+ if (!( activeWebview.insetMapping.has(displayOutput))) {
806
+ return;
807
+ }
808
+ const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
809
+ const outputIndex = cellViewModel.outputsViewModels.indexOf(displayOutput);
810
+ const outputOffset = cellDiffViewModel.getOutputOffsetInCell(diffSide, outputIndex);
811
+ activeWebview.updateScrollTops([{
812
+ cell: cellViewModel,
813
+ output: displayOutput,
814
+ cellTop,
815
+ outputOffset,
816
+ forceDisplay: true
817
+ }], []);
818
+ }
819
+ );
820
+ }
821
+ hideInset(cellDiffViewModel, cellViewModel, output) {
822
+ this._modifiedWebview?.hideInset(output);
823
+ this._originalWebview?.hideInset(output);
824
+ }
825
+ getDomNode() {
826
+ return this._rootElement;
827
+ }
828
+ getOverflowContainerDomNode() {
829
+ return this._overflowContainer;
830
+ }
831
+ getControl() {
832
+ return this;
833
+ }
834
+ clearInput() {
835
+ this.inlineDiffWidget?.hide();
836
+ super.clearInput();
837
+ this._modifiedResourceDisposableStore.clear();
838
+ this._list?.splice(0, this._list?.length || 0);
839
+ this._model = null;
840
+ this.notebookDiffViewModel?.dispose();
841
+ this.notebookDiffViewModel = undefined;
842
+ }
843
+ deltaCellOutputContainerClassNames(diffSide, cellId, added, removed) {
844
+ if (diffSide === DiffSide.Original) {
845
+ this._originalWebview?.deltaCellOutputContainerClassNames(cellId, added, removed);
846
+ } else {
847
+ this._modifiedWebview?.deltaCellOutputContainerClassNames(cellId, added, removed);
848
+ }
849
+ }
850
+ getLayoutInfo() {
851
+ if (!this._list) {
852
+ throw ( new Error("Editor is not initalized successfully"));
853
+ }
854
+ return {
855
+ width: this._dimension.width,
856
+ height: this._dimension.height,
857
+ fontInfo: this.fontInfo,
858
+ scrollHeight: this._list?.getScrollHeight() ?? 0,
859
+ stickyHeight: 0,
860
+ listViewOffsetTop: 0
861
+ };
862
+ }
863
+ layout(dimension, position) {
864
+ this._rootElement.classList.toggle("mid-width", dimension.width < 1000 && dimension.width >= 600);
865
+ this._rootElement.classList.toggle("narrow-width", dimension.width < 600);
866
+ const overviewRulerEnabled = this.isOverviewRulerEnabled();
867
+ this._dimension = dimension.with(
868
+ dimension.width - (overviewRulerEnabled ? NotebookTextDiffEditor_1.ENTIRE_DIFF_OVERVIEW_WIDTH : 0)
869
+ );
870
+ this._listViewContainer.style.height = `${dimension.height}px`;
871
+ this._listViewContainer.style.width = `${this._dimension.width}px`;
872
+ if (this._inlineView) {
873
+ this._listViewContainer.style.display = "none";
874
+ this.inlineDiffWidget?.setLayout(dimension, position);
875
+ } else {
876
+ this.inlineDiffWidget?.hide();
877
+ this._listViewContainer.style.display = "block";
878
+ this._list?.layout(this._dimension.height, this._dimension.width);
879
+ if (this._modifiedWebview) {
880
+ this._modifiedWebview.element.style.width = `calc(50% - 16px)`;
881
+ this._modifiedWebview.element.style.left = `calc(50%)`;
882
+ }
883
+ if (this._originalWebview) {
884
+ this._originalWebview.element.style.width = `calc(50% - 16px)`;
885
+ this._originalWebview.element.style.left = `16px`;
886
+ }
887
+ if (this._webviewTransparentCover) {
888
+ this._webviewTransparentCover.style.height = `${this._dimension.height}px`;
889
+ this._webviewTransparentCover.style.width = `${this._dimension.width}px`;
890
+ }
891
+ if (overviewRulerEnabled) {
892
+ this._overviewRuler.layout();
893
+ }
894
+ }
895
+ this._lastLayoutProperties = {
896
+ dimension,
897
+ position
898
+ };
899
+ this._eventDispatcher?.emit([( new NotebookDiffLayoutChangedEvent({
900
+ width: true,
901
+ fontInfo: true
902
+ }, this.getLayoutInfo()))]);
903
+ }
904
+ dispose() {
905
+ this._isDisposed = true;
906
+ this._layoutCancellationTokenSource?.dispose();
907
+ this._detachModel();
908
+ super.dispose();
909
+ }
910
+ };
911
+ NotebookTextDiffEditor = NotebookTextDiffEditor_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IThemeService)), ( __param(3, IContextKeyService)), ( __param(4, INotebookEditorWorkerService)), ( __param(5, IConfigurationService)), ( __param(6, ITelemetryService)), ( __param(7, IStorageService)), ( __param(8, INotebookService)), ( __param(9, IEditorService))], NotebookTextDiffEditor));
912
+ registerZIndex(ZIndex.Base, 10, "notebook-diff-view-viewport-slider");
913
+ registerThemingParticipant((theme, collector) => {
914
+ const diffDiagonalFillColor = theme.getColor(diffDiagonalFill);
915
+ collector.addRule(`
916
+ .notebook-text-diff-editor .diagonal-fill {
917
+ background-image: linear-gradient(
918
+ -45deg,
919
+ ${diffDiagonalFillColor} 12.5%,
920
+ #0000 12.5%, #0000 50%,
921
+ ${diffDiagonalFillColor} 50%, ${diffDiagonalFillColor} 62.5%,
922
+ #0000 62.5%, #0000 100%
923
+ );
924
+ background-size: 8px 8px;
925
+ }
926
+ `);
927
+ collector.addRule(`.notebook-text-diff-editor .cell-body { margin: ${DIFF_CELL_MARGIN}px; }`);
928
+ collector.addRule(
929
+ `.notebook-text-diff-editor .cell-placeholder-body { margin: ${DIFF_CELL_MARGIN}px 0; }`
930
+ );
931
+ });
932
+
933
+ export { NotebookTextDiffEditor };