@codingame/monaco-vscode-api 29.1.1 → 30.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. package/missing-services.js +39 -16
  2. package/package.json +8 -8
  3. package/services.js +3 -3
  4. package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  5. package/vscode/src/vs/base/browser/ui/contextview/contextview.js +5 -5
  6. package/vscode/src/vs/base/browser/ui/dialog/dialog.js +6 -2
  7. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +19 -7
  8. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +81 -15
  9. package/vscode/src/vs/base/common/codicons.d.ts +4 -0
  10. package/vscode/src/vs/base/common/codicons.js +3 -1
  11. package/vscode/src/vs/base/common/glob.js +5 -1
  12. package/vscode/src/vs/base/common/performance.d.ts +4 -0
  13. package/vscode/src/vs/base/common/performance.js +40 -17
  14. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +1 -1
  15. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.d.ts +2 -1
  16. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +4 -0
  17. package/vscode/src/vs/platform/actionWidget/browser/actionList.d.ts +13 -0
  18. package/vscode/src/vs/platform/actionWidget/browser/actionList.js +106 -74
  19. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css +14 -11
  20. package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -0
  21. package/vscode/src/vs/platform/actions/common/actions.js +9 -0
  22. package/vscode/src/vs/platform/browserView/common/browserView.d.ts +34 -7
  23. package/vscode/src/vs/platform/editor/common/editor.d.ts +29 -4
  24. package/vscode/src/vs/platform/environment/common/argv.d.ts +1 -0
  25. package/vscode/src/vs/platform/environment/common/environmentService.d.ts +1 -0
  26. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1 -0
  27. package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +3 -0
  28. package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +3 -0
  29. package/vscode/src/vs/platform/keyboardLayout/common/keyboardLayout.js +2 -2
  30. package/vscode/src/vs/platform/label/common/label.d.ts +6 -0
  31. package/vscode/src/vs/platform/product/common/product.js +3 -3
  32. package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.d.ts +11 -2
  33. package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +6 -0
  34. package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +14 -1
  35. package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +6 -2
  36. package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +5 -3
  37. package/vscode/src/vs/platform/quickinput/common/quickInput.js +6 -2
  38. package/vscode/src/vs/platform/sandbox/common/sandboxHelperService.d.ts +4 -0
  39. package/vscode/src/vs/platform/sandbox/common/sandboxHelperService.service.d.ts +6 -0
  40. package/vscode/src/vs/platform/sandbox/common/sandboxHelperService.service.js +6 -0
  41. package/vscode/src/vs/platform/terminal/common/terminal.d.ts +3 -1
  42. package/vscode/src/vs/platform/terminal/common/terminal.js +5 -2
  43. package/vscode/src/vs/platform/theme/common/colorUtils.d.ts +4 -0
  44. package/vscode/src/vs/platform/theme/common/colorUtils.js +9 -0
  45. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +6 -1
  46. package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +21 -1
  47. package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +3 -2
  48. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +5 -1
  49. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +57 -4
  50. package/vscode/src/vs/workbench/api/common/extHostChatSessions.js +5 -3
  51. package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +34 -14
  52. package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +2 -1
  53. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.d.ts +5 -1
  54. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +32 -2
  55. package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +11 -1
  56. package/vscode/src/vs/workbench/api/common/extHostTypes.js +24 -2
  57. package/vscode/src/vs/workbench/browser/parts/editor/media/modalEditorPart.css +35 -5
  58. package/vscode/src/vs/workbench/browser/parts/editor/modalEditorPart.d.ts +1 -0
  59. package/vscode/src/vs/workbench/browser/parts/editor/modalEditorPart.js +70 -4
  60. package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +8 -1
  61. package/vscode/src/vs/workbench/browser/workbench.contribution.js +156 -167
  62. package/vscode/src/vs/workbench/common/configuration.js +9 -9
  63. package/vscode/src/vs/workbench/common/contextkeys.js +77 -77
  64. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +1 -1
  65. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +1 -1
  66. package/vscode/src/vs/workbench/common/editor/textEditorModel.js +1 -1
  67. package/vscode/src/vs/workbench/common/editor.js +4 -4
  68. package/vscode/src/vs/workbench/common/theme.js +161 -161
  69. package/vscode/src/vs/workbench/common/views.d.ts +0 -6
  70. package/vscode/src/vs/workbench/common/views.js +4 -4
  71. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +154 -154
  72. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
  73. package/vscode/src/vs/workbench/contrib/browserView/common/browserView.d.ts +11 -3
  74. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +65 -64
  75. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +6 -6
  76. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +26 -13
  77. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.d.ts +21 -3
  78. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +21 -17
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +11 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +8 -3
  81. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatScreenshotContext.js +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +6 -6
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chat.service.d.ts +1 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +7 -7
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +2 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +51 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +165 -0
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1409 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.js +9 -9
  90. package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.d.ts +2 -0
  91. package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.js +87 -83
  92. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service.d.ts +8 -0
  93. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.d.ts +12 -2
  94. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.js +5 -3
  95. package/vscode/src/vs/workbench/contrib/chat/common/chatModes.d.ts +4 -4
  96. package/vscode/src/vs/workbench/contrib/chat/common/chatModes.js +13 -12
  97. package/vscode/src/vs/workbench/contrib/chat/common/chatPerf.d.ts +75 -0
  98. package/vscode/src/vs/workbench/contrib/chat/common/chatPerf.js +30 -0
  99. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +9 -12
  100. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.js +1 -13
  101. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.service.d.ts +1 -6
  102. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.d.ts +45 -1
  103. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.service.d.ts +17 -4
  104. package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +6 -1
  105. package/vscode/src/vs/workbench/contrib/chat/common/constants.js +5 -0
  106. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +48 -5
  107. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +46 -18
  108. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.service.d.ts +10 -3
  109. package/vscode/src/vs/workbench/contrib/chat/common/editing/chatEditingService.d.ts +6 -2
  110. package/vscode/src/vs/workbench/contrib/chat/common/editing/chatEditingService.js +2 -2
  111. package/vscode/src/vs/workbench/contrib/chat/common/editing/chatEditingService.service.d.ts +9 -1
  112. package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +3 -3
  113. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +23 -23
  114. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.d.ts +11 -8
  115. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.js +54 -20
  116. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +1 -1
  117. package/vscode/src/vs/workbench/contrib/chat/common/model/chatViewModel.d.ts +3 -5
  118. package/vscode/src/vs/workbench/contrib/chat/common/model/chatViewModel.js +3 -7
  119. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatAgents.js +5 -1
  120. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.d.ts +6 -0
  121. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.d.ts +18 -0
  122. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.d.ts +10 -6
  123. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.d.ts +0 -1
  124. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +4 -1
  125. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +36 -6
  126. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.js +2 -2
  127. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations.d.ts +3 -29
  128. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations.js +2 -18
  129. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookSchema.js +18 -18
  130. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookTypes.js +20 -20
  131. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptFileAttributes.js +78 -88
  132. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser.d.ts +0 -1
  133. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser.js +1 -2
  134. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptTypes.d.ts +17 -0
  135. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptTypes.js +16 -1
  136. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +28 -23
  137. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +1 -7
  138. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.d.ts +1 -0
  139. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.js +1 -1
  140. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +8 -8
  141. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +10 -10
  142. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +3 -3
  143. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +6 -6
  144. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +2 -2
  145. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.service.d.ts +2 -8
  146. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +22 -22
  147. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.js +3 -3
  148. package/vscode/src/vs/workbench/contrib/chat/common/widget/input/modelPickerWidget.js +1 -1
  149. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +11 -11
  150. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
  151. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
  152. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
  153. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +10 -10
  154. package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
  155. package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
  156. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.d.ts +8 -1
  157. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +41 -8
  158. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
  159. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
  160. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +3 -3
  161. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
  162. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
  163. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
  164. package/vscode/src/vs/workbench/contrib/codeEditor/common/languageConfigurationExtensionPoint.js +65 -65
  165. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +7 -7
  166. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +7 -7
  167. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +2 -2
  168. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +3 -3
  169. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +3 -3
  170. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +3 -3
  171. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +3 -3
  172. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
  173. package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
  174. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +7 -7
  175. package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +1 -1
  176. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +9 -9
  177. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +14 -14
  178. package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +16 -16
  179. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +7 -7
  180. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +12 -12
  181. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +3 -3
  182. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +1 -1
  183. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +29 -29
  184. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +14 -14
  185. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +75 -75
  186. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +2 -2
  187. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +6 -6
  188. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -12
  189. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +38 -38
  190. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +2 -2
  191. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +3 -3
  192. package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +57 -57
  193. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +3 -3
  194. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +4 -4
  195. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +2 -2
  196. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +18 -18
  197. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +5 -5
  198. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +9 -9
  199. package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
  200. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +65 -65
  201. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +6 -6
  202. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
  203. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
  204. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +1 -1
  205. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +1 -1
  206. package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.js +2 -2
  207. package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +4 -4
  208. package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +18 -18
  209. package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +1 -1
  210. package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +1 -1
  211. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +41 -41
  212. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.js +1 -1
  213. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +15 -15
  214. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +14 -14
  215. package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +148 -148
  216. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +170 -170
  217. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.js +1 -1
  218. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.js +1 -1
  219. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.js +5 -5
  220. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +25 -25
  221. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.js +4 -4
  222. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +7 -7
  223. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +47 -47
  224. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +5 -5
  225. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +30 -30
  226. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +76 -76
  227. package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +2 -2
  228. package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +1 -1
  229. package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +2 -2
  230. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
  231. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +5 -5
  232. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +2 -2
  233. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +3 -3
  234. package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +2 -2
  235. package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +3 -3
  236. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -4
  237. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +3 -3
  238. package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +1 -1
  239. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +8 -8
  240. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +18 -18
  241. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +14 -14
  242. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +39 -39
  243. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +84 -84
  244. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands._save.js +4 -4
  245. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +2 -2
  246. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
  247. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +27 -27
  248. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +50 -50
  249. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
  250. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
  251. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +4 -4
  252. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +7 -7
  253. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +17 -17
  254. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +7 -7
  255. package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +4 -4
  256. package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +1 -1
  257. package/vscode/src/vs/workbench/contrib/files/common/files.js +16 -16
  258. package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
  259. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
  260. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
  261. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  262. package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
  263. package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
  264. package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
  265. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommandsAddConfiguration.js +66 -66
  266. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +40 -40
  267. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +34 -34
  268. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +2 -2
  269. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +5 -5
  270. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +5 -5
  271. package/vscode/src/vs/workbench/contrib/mcp/common/mcpConfiguration.js +40 -40
  272. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +16 -16
  273. package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +4 -4
  274. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +4 -4
  275. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +23 -23
  276. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +2 -2
  277. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +20 -9
  278. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +8 -8
  279. package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnection.contribution.js +8 -8
  280. package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnectionStatus.js +4 -4
  281. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +1 -1
  282. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +3 -3
  283. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +1 -1
  284. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +17 -17
  285. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +6 -6
  286. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
  287. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
  288. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +3 -3
  289. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +7 -7
  290. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +27 -27
  291. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +29 -29
  292. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +5 -5
  293. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +7 -7
  294. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
  295. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +4 -4
  296. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +1 -1
  297. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +3 -3
  298. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +1 -1
  299. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +2 -2
  300. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +4 -4
  301. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +1 -1
  302. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +1 -0
  303. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +14 -14
  304. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +2 -2
  305. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +1 -1
  306. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -2
  307. package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +3 -3
  308. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +13 -13
  309. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +10 -10
  310. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +60 -60
  311. package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +3 -3
  312. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +21 -21
  313. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +15 -15
  314. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +17 -17
  315. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +59 -59
  316. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistory.js +11 -11
  317. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.js +6 -6
  318. package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.js +14 -14
  319. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.d.ts +3 -1
  320. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +30 -13
  321. package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +3 -3
  322. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +1 -1
  323. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +12 -12
  324. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +9 -9
  325. package/vscode/src/vs/workbench/contrib/search/browser/searchChatContext.js +5 -5
  326. package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +1 -1
  327. package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +20 -20
  328. package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +2 -2
  329. package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +14 -14
  330. package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +55 -55
  331. package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +11 -11
  332. package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.d.ts +3 -1
  333. package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +32 -5
  334. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +4 -4
  335. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +5 -5
  336. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
  337. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
  338. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
  339. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
  340. package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
  341. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
  342. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +6 -6
  343. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
  344. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +1 -1
  345. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +3 -3
  346. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +13 -13
  347. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.d.ts +1 -2
  348. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +43 -45
  349. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +15 -15
  350. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +13 -10
  351. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -23
  352. package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +17 -17
  353. package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +26 -26
  354. package/vscode/src/vs/workbench/contrib/terminal/terminalContribExports.d.ts +10 -3
  355. package/vscode/src/vs/workbench/contrib/terminal/terminalContribExports.js +10 -3
  356. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/common/terminalAccessibilityConfiguration.js +2 -2
  357. package/vscode/src/vs/workbench/contrib/terminalContrib/autoReplies/common/terminalAutoRepliesConfiguration.js +2 -2
  358. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.d.ts +10 -6
  359. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.js +134 -91
  360. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service.d.ts +6 -2
  361. package/vscode/src/vs/workbench/contrib/terminalContrib/commandGuide/common/terminalCommandGuideConfiguration.js +1 -1
  362. package/vscode/src/vs/workbench/contrib/terminalContrib/history/common/terminal.history.js +1 -1
  363. package/vscode/src/vs/workbench/contrib/terminalContrib/inlineHint/common/terminalInitialHintConfiguration.js +1 -1
  364. package/vscode/src/vs/workbench/contrib/terminalContrib/notification/common/terminalNotificationConfiguration.js +1 -1
  365. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/common/terminalStickyScrollConfiguration.js +3 -3
  366. package/vscode/src/vs/workbench/contrib/terminalContrib/suggest/common/terminalSuggestConfiguration.js +30 -30
  367. package/vscode/src/vs/workbench/contrib/terminalContrib/typeAhead/common/terminalTypeAheadConfiguration.js +5 -5
  368. package/vscode/src/vs/workbench/contrib/terminalContrib/zoom/common/terminal.zoom.js +2 -2
  369. package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
  370. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
  371. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
  372. package/vscode/src/vs/workbench/contrib/url/browser/trustedDomains.js +6 -6
  373. package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +3 -3
  374. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindAccessibilityHelp.js +30 -30
  375. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +1 -1
  376. package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +2 -2
  377. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +1 -1
  378. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +11 -11
  379. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +5 -5
  380. package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.d.ts +4 -0
  381. package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.js +27 -16
  382. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.d.ts +1 -0
  383. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
  384. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +16 -16
  385. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +1 -1
  386. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
  387. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
  388. package/vscode/src/vs/workbench/services/environment/browser/environmentService.d.ts +1 -0
  389. package/vscode/src/vs/workbench/services/environment/browser/environmentService.js +9 -0
  390. package/vscode/src/vs/workbench/services/environment/common/environmentService.service.d.ts +1 -0
  391. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionsIcons.js +3 -3
  392. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +6 -6
  393. package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +10 -10
  394. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +88 -88
  395. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +5 -5
  396. package/vscode/src/vs/workbench/services/language/common/languageService.js +24 -24
  397. package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
  398. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +2 -2
  399. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +7 -7
  400. package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +4 -4
  401. package/vscode/src/vs/workbench/services/preferences/common/preferencesModels.js +2 -2
  402. package/vscode/src/vs/workbench/services/preferences/common/preferencesValidation.js +30 -30
  403. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
  404. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
  405. package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
  406. package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +9 -9
  407. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +3 -3
  408. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +18 -18
  409. package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +8 -8
  410. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
  411. package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +24 -24
  412. package/vscode/src/vs/workbench/services/themes/common/workbenchThemeService.d.ts +2 -2
  413. package/vscode/src/vs/workbench/services/themes/common/workbenchThemeService.js +8 -4
  414. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -3
  415. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
  416. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
  417. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +16 -16
  418. package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +0 -4
  419. package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +19 -1
  420. package/vscode-dts/vscode.proposed.chatSessionCustomizationProvider.d.ts +168 -0
  421. package/vscode-dts/vscode.proposed.d.ts +1 -0
  422. package/vscode-dts/vscode.proposed.terminalShellEnv.d.ts +1 -1
  423. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
  424. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -746
  425. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +0 -13
  426. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -300
  427. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
  428. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
  429. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
  430. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1963
  431. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
  432. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -314
  433. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
  434. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -886
  435. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
  436. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -118
  437. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
  438. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -71
  439. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
  440. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
  441. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
  442. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -313
  443. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
  444. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -265
  445. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
  446. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -185
  447. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
  448. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -104
  449. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
  450. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -43
  451. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
  452. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -41
  453. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
  454. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -69
  455. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
  456. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
  457. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -933
  458. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
  459. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -32
  460. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
  461. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -643
  462. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
  463. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -197
  464. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
  465. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -539
  466. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
  467. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
  468. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
  469. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -90
  470. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
  471. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
@@ -1,41 +0,0 @@
1
- import { Emitter } from "../../../../../base/common/event.js";
2
- import { Disposable } from "../../../../../base/common/lifecycle.js";
3
- import { PrefixSumComputer } from "../../../../../editor/common/model/prefixSumComputer.js";
4
- import { IDiffNestedCellViewModel } from "./notebookDiffEditorBrowser.js";
5
- import { ICellOutputViewModel, IGenericCellViewModel } from "../notebookBrowser.js";
6
- import { CellViewModelStateChangeEvent } from "../notebookViewEvents.js";
7
- import { NotebookCellTextModel } from "../../common/model/notebookCellTextModel.js";
8
- import { INotebookService } from "../../common/notebookService.service.js";
9
- export declare class DiffNestedCellViewModel extends Disposable implements IDiffNestedCellViewModel, IGenericCellViewModel {
10
- readonly textModel: NotebookCellTextModel;
11
- private _notebookService;
12
- private _id;
13
- get id(): string;
14
- get outputs(): import("../../common/notebookCommon.js").ICellOutput[];
15
- get language(): string;
16
- get metadata(): import("../../common/notebookCommon.js").NotebookCellMetadata;
17
- get uri(): import("../../../../../base/common/uri.js").URI;
18
- get handle(): number;
19
- protected readonly _onDidChangeState: Emitter<CellViewModelStateChangeEvent>;
20
- private _hoveringOutput;
21
- get outputIsHovered(): boolean;
22
- set outputIsHovered(v: boolean);
23
- private _focusOnOutput;
24
- get outputIsFocused(): boolean;
25
- set outputIsFocused(v: boolean);
26
- private _focusInputInOutput;
27
- get inputInOutputIsFocused(): boolean;
28
- set inputInOutputIsFocused(v: boolean);
29
- private _outputViewModels;
30
- get outputsViewModels(): ICellOutputViewModel[];
31
- protected _outputCollection: number[];
32
- protected _outputsTop: PrefixSumComputer | null;
33
- protected readonly _onDidChangeOutputLayout: Emitter<void>;
34
- readonly onDidChangeOutputLayout: import("../../../../../base/common/event.js").Event<void>;
35
- constructor(textModel: NotebookCellTextModel, _notebookService: INotebookService);
36
- private _ensureOutputsTop;
37
- getOutputOffset(index: number): number;
38
- updateOutputHeight(index: number, height: number): void;
39
- getOutputTotalHeight(): number;
40
- dispose(): void;
41
- }
@@ -1,118 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
3
- import { Emitter } from '../../../../../base/common/event.js';
4
- import { Disposable } from '../../../../../base/common/lifecycle.js';
5
- import { generateUuid } from '../../../../../base/common/uuid.js';
6
- import { PrefixSumComputer } from '../../../../../editor/common/model/prefixSumComputer.js';
7
- import { CellOutputViewModel } from '../viewModel/cellOutputViewModel.js';
8
- import { INotebookService } from '../../common/notebookService.service.js';
9
-
10
- let DiffNestedCellViewModel = class DiffNestedCellViewModel extends Disposable {
11
- get id() {
12
- return this._id;
13
- }
14
- get outputs() {
15
- return this.textModel.outputs;
16
- }
17
- get language() {
18
- return this.textModel.language;
19
- }
20
- get metadata() {
21
- return this.textModel.metadata;
22
- }
23
- get uri() {
24
- return this.textModel.uri;
25
- }
26
- get handle() {
27
- return this.textModel.handle;
28
- }
29
- get outputIsHovered() {
30
- return this._hoveringOutput;
31
- }
32
- set outputIsHovered(v) {
33
- this._hoveringOutput = v;
34
- this._onDidChangeState.fire({
35
- outputIsHoveredChanged: true
36
- });
37
- }
38
- get outputIsFocused() {
39
- return this._focusOnOutput;
40
- }
41
- set outputIsFocused(v) {
42
- this._focusOnOutput = v;
43
- this._onDidChangeState.fire({
44
- outputIsFocusedChanged: true
45
- });
46
- }
47
- get inputInOutputIsFocused() {
48
- return this._focusInputInOutput;
49
- }
50
- set inputInOutputIsFocused(v) {
51
- this._focusInputInOutput = v;
52
- }
53
- get outputsViewModels() {
54
- return this._outputViewModels;
55
- }
56
- constructor(textModel, _notebookService) {
57
- super();
58
- this.textModel = textModel;
59
- this._notebookService = _notebookService;
60
- this._onDidChangeState = this._register(( new Emitter()));
61
- this._hoveringOutput = false;
62
- this._focusOnOutput = false;
63
- this._focusInputInOutput = false;
64
- this._outputCollection = [];
65
- this._outputsTop = null;
66
- this._onDidChangeOutputLayout = this._register(( new Emitter()));
67
- this.onDidChangeOutputLayout = this._onDidChangeOutputLayout.event;
68
- this._id = generateUuid();
69
- this._outputViewModels = ( this.textModel.outputs.map(output => ( new CellOutputViewModel(this, output, this._notebookService))));
70
- this._register(this.textModel.onDidChangeOutputs(splice => {
71
- this._outputCollection.splice(splice.start, splice.deleteCount, ...( splice.newOutputs.map(() => 0)));
72
- const removed = this._outputViewModels.splice(splice.start, splice.deleteCount, ...( splice.newOutputs.map(output => ( new CellOutputViewModel(this, output, this._notebookService)))));
73
- removed.forEach(vm => vm.dispose());
74
- this._outputsTop = null;
75
- this._onDidChangeOutputLayout.fire();
76
- }));
77
- this._outputCollection = ( new Array(this.textModel.outputs.length));
78
- }
79
- _ensureOutputsTop() {
80
- if (!this._outputsTop) {
81
- const values = ( new Uint32Array(this._outputCollection.length));
82
- for (let i = 0; i < this._outputCollection.length; i++) {
83
- values[i] = this._outputCollection[i];
84
- }
85
- this._outputsTop = ( new PrefixSumComputer(values));
86
- }
87
- }
88
- getOutputOffset(index) {
89
- this._ensureOutputsTop();
90
- if (index >= this._outputCollection.length) {
91
- throw ( new Error("Output index out of range!"));
92
- }
93
- return this._outputsTop.getPrefixSum(index - 1);
94
- }
95
- updateOutputHeight(index, height) {
96
- if (index >= this._outputCollection.length) {
97
- throw ( new Error("Output index out of range!"));
98
- }
99
- this._ensureOutputsTop();
100
- this._outputCollection[index] = height;
101
- if (this._outputsTop.setValue(index, height)) {
102
- this._onDidChangeOutputLayout.fire();
103
- }
104
- }
105
- getOutputTotalHeight() {
106
- this._ensureOutputsTop();
107
- return this._outputsTop?.getTotalSum() ?? 0;
108
- }
109
- dispose() {
110
- super.dispose();
111
- this._outputViewModels.forEach(output => {
112
- output.dispose();
113
- });
114
- }
115
- };
116
- DiffNestedCellViewModel = ( __decorate([( __param(1, INotebookService))], DiffNestedCellViewModel));
117
-
118
- export { DiffNestedCellViewModel };
@@ -1,17 +0,0 @@
1
- import { URI } from "../../../../../base/common/uri.js";
2
- import { IEditorWorkerService } from "../../../../../editor/common/services/editorWorker.service.js";
3
- import { ITextModelService } from "../../../../../editor/common/services/resolverService.service.js";
4
- import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js";
5
- export interface IDiffEditorHeightCalculatorService {
6
- diffAndComputeHeight(original: URI, modified: URI): Promise<number>;
7
- computeHeightFromLines(lineCount: number): number;
8
- }
9
- export declare class DiffEditorHeightCalculatorService {
10
- private readonly lineHeight;
11
- private readonly textModelResolverService;
12
- private readonly editorWorkerService;
13
- private readonly configurationService;
14
- constructor(lineHeight: number, textModelResolverService: ITextModelService, editorWorkerService: IEditorWorkerService, configurationService: IConfigurationService);
15
- diffAndComputeHeight(original: URI, modified: URI): Promise<number>;
16
- computeHeightFromLines(lineCount: number): number;
17
- }
@@ -1,71 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
3
- import { UnchangedRegion } from '../../../../../editor/browser/widget/diffEditor/diffEditorViewModel.js';
4
- import { IEditorWorkerService } from '../../../../../editor/common/services/editorWorker.service.js';
5
- import { ITextModelService } from '../../../../../editor/common/services/resolverService.service.js';
6
- import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.service.js';
7
- import { getEditorPadding } from './diffCellEditorOptions.js';
8
- import { HeightOfHiddenLinesRegionInDiffEditor } from './diffElementViewModel.js';
9
-
10
- let DiffEditorHeightCalculatorService = class DiffEditorHeightCalculatorService {
11
- constructor(
12
- lineHeight,
13
- textModelResolverService,
14
- editorWorkerService,
15
- configurationService
16
- ) {
17
- this.lineHeight = lineHeight;
18
- this.textModelResolverService = textModelResolverService;
19
- this.editorWorkerService = editorWorkerService;
20
- this.configurationService = configurationService;
21
- }
22
- async diffAndComputeHeight(original, modified) {
23
- const [originalModel, modifiedModel] = await Promise.all([
24
- this.textModelResolverService.createModelReference(original),
25
- this.textModelResolverService.createModelReference(modified)
26
- ]);
27
- try {
28
- const diffChanges = await this.editorWorkerService.computeDiff(original, modified, {
29
- ignoreTrimWhitespace: true,
30
- maxComputationTimeMs: 0,
31
- computeMoves: false
32
- }, "advanced").then(diff => diff?.changes || []);
33
- const unchangedRegionFeatureEnabled = this.configurationService.getValue("diffEditor.hideUnchangedRegions.enabled");
34
- const minimumLineCount = this.configurationService.getValue("diffEditor.hideUnchangedRegions.minimumLineCount");
35
- const contextLineCount = this.configurationService.getValue("diffEditor.hideUnchangedRegions.contextLineCount");
36
- const originalLineCount = originalModel.object.textEditorModel.getLineCount();
37
- const modifiedLineCount = modifiedModel.object.textEditorModel.getLineCount();
38
- const unchanged = unchangedRegionFeatureEnabled ? UnchangedRegion.fromDiffs(
39
- diffChanges,
40
- originalLineCount,
41
- modifiedLineCount,
42
- minimumLineCount ?? 3,
43
- contextLineCount ?? 3
44
- ) : [];
45
- const numberOfNewLines = diffChanges.reduce((prev, curr) => {
46
- if (curr.original.isEmpty && !curr.modified.isEmpty) {
47
- return prev + curr.modified.length;
48
- }
49
- if (!curr.original.isEmpty && !curr.modified.isEmpty && curr.modified.length > curr.original.length) {
50
- return prev + curr.modified.length - curr.original.length;
51
- }
52
- return prev;
53
- }, 0);
54
- const orginalNumberOfLines = originalModel.object.textEditorModel.getLineCount();
55
- const numberOfHiddenLines = unchanged.reduce((prev, curr) => prev + curr.lineCount, 0);
56
- const numberOfHiddenSections = unchanged.length;
57
- const unchangeRegionsHeight = numberOfHiddenSections * HeightOfHiddenLinesRegionInDiffEditor;
58
- const visibleLineCount = orginalNumberOfLines + numberOfNewLines - numberOfHiddenLines;
59
- return (visibleLineCount * this.lineHeight) + getEditorPadding(visibleLineCount).top + getEditorPadding(visibleLineCount).bottom + unchangeRegionsHeight;
60
- } finally {
61
- originalModel.dispose();
62
- modifiedModel.dispose();
63
- }
64
- }
65
- computeHeightFromLines(lineCount) {
66
- return lineCount * this.lineHeight + getEditorPadding(lineCount).top + getEditorPadding(lineCount).bottom;
67
- }
68
- };
69
- DiffEditorHeightCalculatorService = ( __decorate([( __param(1, ITextModelService)), ( __param(2, IEditorWorkerService)), ( __param(3, IConfigurationService))], DiffEditorHeightCalculatorService));
70
-
71
- export { DiffEditorHeightCalculatorService };
@@ -1,27 +0,0 @@
1
- import { Emitter } from "../../../../../base/common/event.js";
2
- import { Disposable } from "../../../../../base/common/lifecycle.js";
3
- import { IDiffElementLayoutInfo } from "./notebookDiffEditorBrowser.js";
4
- import { NotebookLayoutChangeEvent, NotebookLayoutInfo } from "../notebookViewEvents.js";
5
- export declare enum NotebookDiffViewEventType {
6
- LayoutChanged = 1,
7
- CellLayoutChanged = 2
8
- }
9
- export declare class NotebookDiffLayoutChangedEvent {
10
- readonly source: NotebookLayoutChangeEvent;
11
- readonly value: NotebookLayoutInfo;
12
- readonly type = NotebookDiffViewEventType.LayoutChanged;
13
- constructor(source: NotebookLayoutChangeEvent, value: NotebookLayoutInfo);
14
- }
15
- export declare class NotebookCellLayoutChangedEvent {
16
- readonly source: IDiffElementLayoutInfo;
17
- readonly type = NotebookDiffViewEventType.CellLayoutChanged;
18
- constructor(source: IDiffElementLayoutInfo);
19
- }
20
- export type NotebookDiffViewEvent = NotebookDiffLayoutChangedEvent | NotebookCellLayoutChangedEvent;
21
- export declare class NotebookDiffEditorEventDispatcher extends Disposable {
22
- protected readonly _onDidChangeLayout: Emitter<NotebookDiffLayoutChangedEvent>;
23
- readonly onDidChangeLayout: import("../../../../../base/common/event.js").Event<NotebookDiffLayoutChangedEvent>;
24
- protected readonly _onDidChangeCellLayout: Emitter<NotebookCellLayoutChangedEvent>;
25
- readonly onDidChangeCellLayout: import("../../../../../base/common/event.js").Event<NotebookCellLayoutChangedEvent>;
26
- emit(events: NotebookDiffViewEvent[]): void;
27
- }
@@ -1,40 +0,0 @@
1
-
2
- import { Emitter } from '../../../../../base/common/event.js';
3
- import { Disposable } from '../../../../../base/common/lifecycle.js';
4
-
5
- var NotebookDiffViewEventType;
6
- (function(NotebookDiffViewEventType) {
7
- NotebookDiffViewEventType[NotebookDiffViewEventType["LayoutChanged"] = 1] = "LayoutChanged";
8
- NotebookDiffViewEventType[NotebookDiffViewEventType["CellLayoutChanged"] = 2] = "CellLayoutChanged";
9
- })(NotebookDiffViewEventType || (NotebookDiffViewEventType = {}));
10
- class NotebookDiffLayoutChangedEvent {
11
- constructor(source, value) {
12
- this.source = source;
13
- this.value = value;
14
- this.type = NotebookDiffViewEventType.LayoutChanged;
15
- }
16
- }
17
- class NotebookDiffEditorEventDispatcher extends Disposable {
18
- constructor() {
19
- super(...arguments);
20
- this._onDidChangeLayout = this._register(( new Emitter()));
21
- this.onDidChangeLayout = this._onDidChangeLayout.event;
22
- this._onDidChangeCellLayout = this._register(( new Emitter()));
23
- this.onDidChangeCellLayout = this._onDidChangeCellLayout.event;
24
- }
25
- emit(events) {
26
- for (let i = 0, len = events.length; i < len; i++) {
27
- const e = events[i];
28
- switch (e.type) {
29
- case NotebookDiffViewEventType.LayoutChanged:
30
- this._onDidChangeLayout.fire(e);
31
- break;
32
- case NotebookDiffViewEventType.CellLayoutChanged:
33
- this._onDidChangeCellLayout.fire(e);
34
- break;
35
- }
36
- }
37
- }
38
- }
39
-
40
- export { NotebookDiffEditorEventDispatcher, NotebookDiffLayoutChangedEvent, NotebookDiffViewEventType };
@@ -1,23 +0,0 @@
1
- import { DisposableStore } from "../../../../../../base/common/lifecycle.js";
2
- import { INotebookEditor } from "../../notebookBrowser.js";
3
- import { ICodeEditor } from "../../../../../../editor/browser/editorBrowser.js";
4
- import { IEditorWorkerService } from "../../../../../../editor/common/services/editorWorker.service.js";
5
- import { NotebookCellTextModel } from "../../../common/model/notebookCellTextModel.js";
6
- import { INotebookOriginalCellModelFactory } from "./notebookOriginalCellModelFactory.service.js";
7
- export declare class NotebookCellDiffDecorator extends DisposableStore {
8
- readonly modifiedCell: NotebookCellTextModel;
9
- readonly originalCell: NotebookCellTextModel;
10
- private readonly editor;
11
- private readonly _editorWorkerService;
12
- private readonly originalCellModelFactory;
13
- private _viewZones;
14
- private readonly throttledDecorator;
15
- private diffForPreviouslyAppliedDecorators?;
16
- private readonly perEditorDisposables;
17
- constructor(notebookEditor: INotebookEditor, modifiedCell: NotebookCellTextModel, originalCell: NotebookCellTextModel, editor: ICodeEditor, _editorWorkerService: IEditorWorkerService, originalCellModelFactory: INotebookOriginalCellModelFactory);
18
- update(editor: ICodeEditor): void;
19
- private _updateImpl;
20
- private _originalModel?;
21
- private getOrCreateOriginalModel;
22
- private _updateWithDiff;
23
- }
@@ -1,313 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
3
- import { DisposableStore, toDisposable } from '../../../../../../base/common/lifecycle.js';
4
- import '../../../../../../base/common/observableInternal/index.js';
5
- import { ThrottledDelayer } from '../../../../../../base/common/async.js';
6
- import { IEditorWorkerService } from '../../../../../../editor/common/services/editorWorker.service.js';
7
- import { EditorOption } from '../../../../../../editor/common/config/editorOptions.js';
8
- import { themeColorFromId } from '../../../../../../base/common/themables.js';
9
- import { RenderOptions, LineSource, renderLines } from '../../../../../../editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js';
10
- import { diffAddDecoration, diffWholeLineAddDecoration, diffDeleteDecoration } from '../../../../../../editor/browser/widget/diffEditor/registrations.contribution.js';
11
- import { TrackedRangeStickiness, MinimapPosition, OverviewRulerLane } from '../../../../../../editor/common/model.js';
12
- import { ModelDecorationOptions } from '../../../../../../editor/common/model/textModel.js';
13
- import { Range } from '../../../../../../editor/common/core/range.js';
14
- import { overviewRulerModifiedForeground, minimapGutterModifiedBackground, overviewRulerAddedForeground, minimapGutterAddedBackground, overviewRulerDeletedForeground, minimapGutterDeletedBackground } from '../../../../scm/common/quickDiff.js';
15
- import { INotebookOriginalCellModelFactory } from './notebookOriginalCellModelFactory.service.js';
16
- import { InlineDecoration, InlineDecorationType } from '../../../../../../editor/common/viewModel/inlineDecorations.js';
17
- import { createElement } from '../../../../../../base/browser/dom.js';
18
- import { observableFromEvent } from '../../../../../../base/common/observableInternal/observables/observableFromEvent.js';
19
- import { derived } from '../../../../../../base/common/observableInternal/observables/derived.js';
20
- import { autorunWithStore } from '../../../../../../base/common/observableInternal/reactions/autorun.js';
21
-
22
- let NotebookCellDiffDecorator = class NotebookCellDiffDecorator extends DisposableStore {
23
- constructor(
24
- notebookEditor,
25
- modifiedCell,
26
- originalCell,
27
- editor,
28
- _editorWorkerService,
29
- originalCellModelFactory
30
- ) {
31
- super();
32
- this.modifiedCell = modifiedCell;
33
- this.originalCell = originalCell;
34
- this.editor = editor;
35
- this._editorWorkerService = _editorWorkerService;
36
- this.originalCellModelFactory = originalCellModelFactory;
37
- this._viewZones = [];
38
- this.throttledDecorator = this.add(( new ThrottledDelayer(50)));
39
- this.perEditorDisposables = this.add(( new DisposableStore()));
40
- const onDidChangeVisibleRanges = observableFromEvent(
41
- notebookEditor.onDidChangeVisibleRanges,
42
- () => notebookEditor.visibleRanges
43
- );
44
- const editorObs = derived(r => {
45
- const visibleRanges = onDidChangeVisibleRanges.read(r);
46
- const visibleCellHandles = ( ( visibleRanges.map(range => notebookEditor.getCellsInRange(range))).flat().map(c => c.handle));
47
- if (!visibleCellHandles.includes(modifiedCell.handle)) {
48
- return;
49
- }
50
- const editor = notebookEditor.codeEditors.find(item => item[0].handle === modifiedCell.handle)?.[1];
51
- if (editor?.getModel() !== this.modifiedCell.textModel) {
52
- return;
53
- }
54
- return editor;
55
- });
56
- this.add(autorunWithStore((r, store) => {
57
- const editor = editorObs.read(r);
58
- this.perEditorDisposables.clear();
59
- if (editor) {
60
- store.add(editor.onDidChangeModel(() => {
61
- this.perEditorDisposables.clear();
62
- }));
63
- store.add(editor.onDidChangeModelContent(() => {
64
- this.update(editor);
65
- }));
66
- store.add(editor.onDidChangeConfiguration(e => {
67
- if (e.hasChanged(EditorOption.fontInfo) || e.hasChanged(EditorOption.lineHeight)) {
68
- this.update(editor);
69
- }
70
- }));
71
- this.update(editor);
72
- }
73
- }));
74
- }
75
- update(editor) {
76
- this.throttledDecorator.trigger(() => this._updateImpl(editor));
77
- }
78
- async _updateImpl(editor) {
79
- if (this.isDisposed) {
80
- return;
81
- }
82
- if (editor.getOption(EditorOption.inDiffEditor)) {
83
- this.perEditorDisposables.clear();
84
- return;
85
- }
86
- const model = editor.getModel();
87
- if (!model || model !== this.modifiedCell.textModel) {
88
- this.perEditorDisposables.clear();
89
- return;
90
- }
91
- const originalModel = this.getOrCreateOriginalModel(editor);
92
- if (!originalModel) {
93
- this.perEditorDisposables.clear();
94
- return;
95
- }
96
- const version = model.getVersionId();
97
- const diff = await this._editorWorkerService.computeDiff(originalModel.uri, model.uri, {
98
- computeMoves: true,
99
- ignoreTrimWhitespace: false,
100
- maxComputationTimeMs: Number.MAX_SAFE_INTEGER
101
- }, "advanced");
102
- if (this.isDisposed) {
103
- return;
104
- }
105
- if (diff && !diff.identical && this.modifiedCell.textModel && originalModel && model === editor.getModel() && editor.getModel()?.getVersionId() === version) {
106
- this._updateWithDiff(editor, originalModel, diff, this.modifiedCell.textModel);
107
- } else {
108
- this.perEditorDisposables.clear();
109
- }
110
- }
111
- getOrCreateOriginalModel(editor) {
112
- if (!this._originalModel) {
113
- const model = editor.getModel();
114
- if (!model) {
115
- return;
116
- }
117
- this._originalModel = this.add(this.originalCellModelFactory.getOrCreate(
118
- model.uri,
119
- this.originalCell.getValue(),
120
- model.getLanguageId(),
121
- this.modifiedCell.cellKind
122
- )).object;
123
- }
124
- return this._originalModel;
125
- }
126
- _updateWithDiff(editor, originalModel, diff, currentModel) {
127
- if (areDiffsEqual(diff, this.diffForPreviouslyAppliedDecorators)) {
128
- return;
129
- }
130
- this.perEditorDisposables.clear();
131
- const decorations = editor.createDecorationsCollection();
132
- this.perEditorDisposables.add(toDisposable(() => {
133
- editor.changeViewZones(viewZoneChangeAccessor => {
134
- for (const id of this._viewZones) {
135
- viewZoneChangeAccessor.removeZone(id);
136
- }
137
- });
138
- this._viewZones = [];
139
- decorations.clear();
140
- this.diffForPreviouslyAppliedDecorators = undefined;
141
- }));
142
- this.diffForPreviouslyAppliedDecorators = diff;
143
- const chatDiffAddDecoration = ModelDecorationOptions.createDynamic({
144
- ...diffAddDecoration,
145
- stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges
146
- });
147
- const chatDiffWholeLineAddDecoration = ModelDecorationOptions.createDynamic({
148
- ...diffWholeLineAddDecoration,
149
- stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges
150
- });
151
- const createOverviewDecoration = (overviewRulerColor, minimapColor) => {
152
- return ModelDecorationOptions.createDynamic({
153
- description: "chat-editing-decoration",
154
- overviewRuler: {
155
- color: themeColorFromId(overviewRulerColor),
156
- position: OverviewRulerLane.Left
157
- },
158
- minimap: {
159
- color: themeColorFromId(minimapColor),
160
- position: MinimapPosition.Gutter
161
- }
162
- });
163
- };
164
- const modifiedDecoration = createOverviewDecoration(overviewRulerModifiedForeground, minimapGutterModifiedBackground);
165
- const addedDecoration = createOverviewDecoration(overviewRulerAddedForeground, minimapGutterAddedBackground);
166
- const deletedDecoration = createOverviewDecoration(overviewRulerDeletedForeground, minimapGutterDeletedBackground);
167
- editor.changeViewZones(viewZoneChangeAccessor => {
168
- for (const id of this._viewZones) {
169
- viewZoneChangeAccessor.removeZone(id);
170
- }
171
- this._viewZones = [];
172
- const modifiedVisualDecorations = [];
173
- const mightContainNonBasicASCII = originalModel.mightContainNonBasicASCII();
174
- const mightContainRTL = originalModel.mightContainRTL();
175
- const renderOptions = RenderOptions.fromEditor(this.editor);
176
- const editorLineCount = currentModel.getLineCount();
177
- for (const diffEntry of diff.changes) {
178
- const originalRange = diffEntry.original;
179
- originalModel.tokenization.forceTokenization(Math.max(1, originalRange.endLineNumberExclusive - 1));
180
- const source = ( new LineSource(
181
- originalRange.mapToLineArray(l => originalModel.tokenization.getLineTokens(l)),
182
- [],
183
- mightContainNonBasicASCII,
184
- mightContainRTL
185
- ));
186
- const decorations = [];
187
- for (const i of diffEntry.innerChanges || []) {
188
- decorations.push(( new InlineDecoration(
189
- i.originalRange.delta(-(diffEntry.original.startLineNumber - 1)),
190
- diffDeleteDecoration.className,
191
- InlineDecorationType.Regular
192
- )));
193
- if (!(i.originalRange.isEmpty() && i.originalRange.startLineNumber === 1 && i.modifiedRange.endLineNumber === editorLineCount) && !i.modifiedRange.isEmpty()) {
194
- modifiedVisualDecorations.push({
195
- range: i.modifiedRange,
196
- options: chatDiffAddDecoration
197
- });
198
- }
199
- }
200
- const isCreatedContent = decorations.length === 1 && decorations[0].range.isEmpty() && diffEntry.original.startLineNumber === 1;
201
- if (!diffEntry.modified.isEmpty && !(isCreatedContent && (diffEntry.modified.endLineNumberExclusive - 1) === editorLineCount)) {
202
- modifiedVisualDecorations.push({
203
- range: diffEntry.modified.toInclusiveRange(),
204
- options: chatDiffWholeLineAddDecoration
205
- });
206
- }
207
- if (diffEntry.original.isEmpty) {
208
- modifiedVisualDecorations.push({
209
- range: diffEntry.modified.toInclusiveRange(),
210
- options: addedDecoration
211
- });
212
- } else if (diffEntry.modified.isEmpty) {
213
- modifiedVisualDecorations.push({
214
- range: ( new Range(
215
- diffEntry.modified.startLineNumber - 1,
216
- 1,
217
- diffEntry.modified.startLineNumber,
218
- 1
219
- )),
220
- options: deletedDecoration
221
- });
222
- } else {
223
- modifiedVisualDecorations.push({
224
- range: diffEntry.modified.toInclusiveRange(),
225
- options: modifiedDecoration
226
- });
227
- }
228
- const domNode = createElement("div");
229
- domNode.className = "chat-editing-original-zone view-lines line-delete monaco-mouse-cursor-text";
230
- const result = renderLines(source, renderOptions, decorations, domNode);
231
- if (!isCreatedContent) {
232
- const viewZoneData = {
233
- afterLineNumber: diffEntry.modified.startLineNumber - 1,
234
- heightInLines: result.heightInLines,
235
- domNode,
236
- ordinal: 50000 + 2
237
- };
238
- this._viewZones.push(viewZoneChangeAccessor.addZone(viewZoneData));
239
- }
240
- }
241
- decorations.set(modifiedVisualDecorations);
242
- });
243
- }
244
- };
245
- NotebookCellDiffDecorator = ( __decorate([( __param(4, IEditorWorkerService)), ( __param(5, INotebookOriginalCellModelFactory))], NotebookCellDiffDecorator));
246
- function areDiffsEqual(a, b) {
247
- if (a && b) {
248
- if (a.changes.length !== b.changes.length) {
249
- return false;
250
- }
251
- if (a.moves.length !== b.moves.length) {
252
- return false;
253
- }
254
- if (!areLineRangeMappinsEqual(a.changes, b.changes)) {
255
- return false;
256
- }
257
- if (!( a.moves.some((move, i) => {
258
- const bMove = b.moves[i];
259
- if (!areLineRangeMappinsEqual(move.changes, bMove.changes)) {
260
- return true;
261
- }
262
- if (move.lineRangeMapping.changedLineCount !== bMove.lineRangeMapping.changedLineCount) {
263
- return true;
264
- }
265
- if (!move.lineRangeMapping.modified.equals(bMove.lineRangeMapping.modified)) {
266
- return true;
267
- }
268
- if (!move.lineRangeMapping.original.equals(bMove.lineRangeMapping.original)) {
269
- return true;
270
- }
271
- return false;
272
- }))) {
273
- return false;
274
- }
275
- return true;
276
- } else if (!a && !b) {
277
- return true;
278
- } else {
279
- return false;
280
- }
281
- }
282
- function areLineRangeMappinsEqual(a, b) {
283
- if (a.length !== b.length) {
284
- return false;
285
- }
286
- if (( a.some((c, i) => {
287
- const bChange = b[i];
288
- if (c.changedLineCount !== bChange.changedLineCount) {
289
- return true;
290
- }
291
- if ((c.innerChanges || []).length !== (bChange.innerChanges || []).length) {
292
- return true;
293
- }
294
- if (( (c.innerChanges || []).some((innerC, innerIdx) => {
295
- const bInnerC = bChange.innerChanges[innerIdx];
296
- if (!innerC.modifiedRange.equalsRange(bInnerC.modifiedRange)) {
297
- return true;
298
- }
299
- if (!innerC.originalRange.equalsRange(bInnerC.originalRange)) {
300
- return true;
301
- }
302
- return false;
303
- }))) {
304
- return true;
305
- }
306
- return false;
307
- }))) {
308
- return false;
309
- }
310
- return true;
311
- }
312
-
313
- export { NotebookCellDiffDecorator };