@codingame/monaco-vscode-api 37.0.0 → 37.2.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 (746) hide show
  1. package/missing-services.js +52 -26
  2. package/package.json +8 -8
  3. package/services.d.ts +1 -1
  4. package/services.js +3 -3
  5. package/tools.d.ts +4 -0
  6. package/tools.js +24 -1
  7. package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +7 -1
  8. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +4 -1
  9. package/vscode/src/vs/base/common/errors.js +11 -1
  10. package/vscode/src/vs/base/common/htmlContent.js +4 -1
  11. package/vscode/src/vs/base/common/observableInternal/reactions/autorun.js +54 -1
  12. package/vscode/src/vs/platform/agentHost/common/agent.js +9 -1
  13. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +103 -103
  14. package/vscode/src/vs/platform/agentHost/common/agentService.js +20 -2
  15. package/vscode/src/vs/platform/agentHost/common/customizationEnablement.js +8 -1
  16. package/vscode/src/vs/platform/agentHost/common/meta/agentWorkspaceContinuationMeta.js +8 -0
  17. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.d.ts +30 -0
  18. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.js +95 -0
  19. package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +3 -1
  20. package/vscode/src/vs/platform/agentHost/common/state/sessionState.js +154 -4
  21. package/vscode/src/vs/platform/browserView/common/browserPermissions.js +14 -14
  22. package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +12 -12
  23. package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  24. package/vscode/src/vs/platform/contextkey/common/contextkey.js +10 -10
  25. package/vscode/src/vs/platform/contextkey/common/contextkeys.js +10 -10
  26. package/vscode/src/vs/platform/contextkey/common/scanner.js +5 -5
  27. package/vscode/src/vs/platform/dialogs/common/dialogs.js +9 -9
  28. package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
  29. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +14 -14
  30. package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
  31. package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +7 -7
  32. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +19 -19
  33. package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +2 -2
  34. package/vscode/src/vs/platform/files/common/files.js +6 -6
  35. package/vscode/src/vs/platform/github/common/githubPullRequestMutationService.d.ts +150 -0
  36. package/vscode/src/vs/platform/github/common/githubQueryService.d.ts +187 -0
  37. package/vscode/src/vs/platform/github/common/githubService.service.d.ts +18 -0
  38. package/vscode/src/vs/platform/github/common/githubService.service.js +6 -0
  39. package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  40. package/vscode/src/vs/platform/hover/browser/hoverWidget.js +1 -1
  41. package/vscode/src/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  42. package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
  43. package/vscode/src/vs/platform/languagePacks/common/languagePacks.js +1 -1
  44. package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +3 -3
  45. package/vscode/src/vs/platform/list/browser/listService.js +25 -25
  46. package/vscode/src/vs/platform/log/common/log.js +6 -6
  47. package/vscode/src/vs/platform/markers/common/markerService.js +2 -2
  48. package/vscode/src/vs/platform/markers/common/markers.js +6 -6
  49. package/vscode/src/vs/platform/mcp/common/mcpManagementService.js +1 -1
  50. package/vscode/src/vs/platform/meteredConnection/common/meteredConnection.config.contribution.js +5 -5
  51. package/vscode/src/vs/platform/notification/common/notification.js +3 -3
  52. package/vscode/src/vs/platform/product/common/product.js +1 -1
  53. package/vscode/src/vs/platform/quickinput/browser/quickInput.js +10 -10
  54. package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  55. package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +6 -6
  56. package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +1 -1
  57. package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  58. package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +2 -2
  59. package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  60. package/vscode/src/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
  61. package/vscode/src/vs/platform/request/common/request.js +20 -20
  62. package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -1
  63. package/vscode/src/vs/platform/terminal/common/terminalPlatformConfiguration.js +34 -34
  64. package/vscode/src/vs/platform/terminal/common/terminalProfiles.js +1 -1
  65. package/vscode/src/vs/platform/theme/common/colorUtils.js +2 -2
  66. package/vscode/src/vs/platform/theme/common/colors/baseColors.js +19 -19
  67. package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +8 -8
  68. package/vscode/src/vs/platform/theme/common/colors/editorColors.js +95 -95
  69. package/vscode/src/vs/platform/theme/common/colors/inputColors.js +48 -48
  70. package/vscode/src/vs/platform/theme/common/colors/listColors.js +36 -36
  71. package/vscode/src/vs/platform/theme/common/colors/menuColors.js +7 -7
  72. package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
  73. package/vscode/src/vs/platform/theme/common/colors/miscColors.js +16 -16
  74. package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +10 -10
  75. package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
  76. package/vscode/src/vs/platform/theme/common/iconRegistry.js +7 -7
  77. package/vscode/src/vs/platform/theme/common/sizes/baseSizes.js +37 -37
  78. package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +42 -42
  79. package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  80. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
  81. package/vscode/src/vs/platform/userDataSync/common/abstractSynchronizer.js +2 -2
  82. package/vscode/src/vs/platform/userDataSync/common/keybindingsSync.js +2 -2
  83. package/vscode/src/vs/platform/userDataSync/common/settingsSync.js +1 -1
  84. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
  85. package/vscode/src/vs/platform/userDataSync/common/userDataSyncMachines.js +1 -1
  86. package/vscode/src/vs/platform/webWorker/browser/webWorkerServiceImpl.js +2 -2
  87. package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
  88. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +63 -0
  89. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +305 -0
  90. package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +12 -12
  91. package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +2 -2
  92. package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +5 -5
  93. package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
  94. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
  95. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +2 -2
  96. package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +1 -2
  97. package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +1 -1
  98. package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
  99. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
  100. package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
  101. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -1
  102. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +1 -1
  103. package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +2 -2
  104. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
  105. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
  106. package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +18 -18
  107. package/vscode/src/vs/workbench/browser/actions/developerActions.js +40 -40
  108. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +132 -132
  109. package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
  110. package/vscode/src/vs/workbench/browser/actions/windowActions.js +29 -29
  111. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +21 -21
  112. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +4 -4
  113. package/vscode/src/vs/workbench/browser/editor.js +2 -2
  114. package/vscode/src/vs/workbench/browser/labels.js +4 -4
  115. package/vscode/src/vs/workbench/browser/media/code-icon.svg +1 -0
  116. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +23 -23
  117. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +25 -25
  118. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +4 -4
  119. package/vscode/src/vs/workbench/browser/parts/compositeBar.js +1 -1
  120. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +9 -9
  121. package/vscode/src/vs/workbench/browser/parts/compositePart.js +3 -3
  122. package/vscode/src/vs/workbench/browser/parts/dialogs/dialog.js +1 -1
  123. package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +3 -3
  124. package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +1 -1
  125. package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +3 -3
  126. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +38 -38
  127. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +14 -14
  128. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +1 -1
  129. package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +7 -7
  130. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +136 -136
  131. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +25 -25
  132. package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +1 -1
  133. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +8 -8
  134. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +12 -12
  135. package/vscode/src/vs/workbench/browser/parts/editor/editorHeaderControl.js +3 -3
  136. package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +2 -2
  137. package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +1 -1
  138. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +10 -10
  139. package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +5 -5
  140. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +66 -66
  141. package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +5 -5
  142. package/vscode/src/vs/workbench/browser/parts/editor/editorTypePicker.js +6 -6
  143. package/vscode/src/vs/workbench/browser/parts/editor/modalEditorPart.js +5 -5
  144. package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +2 -2
  145. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -1
  146. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +1 -1
  147. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +3 -3
  148. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
  149. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +19 -19
  150. package/vscode/src/vs/workbench/browser/parts/notifications/notificationAccessibleView.d.ts +10 -0
  151. package/vscode/src/vs/workbench/browser/parts/notifications/notificationAccessibleView.js +126 -0
  152. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.js +22 -22
  153. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsAlerts.js +3 -3
  154. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +6 -6
  155. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +13 -13
  156. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsList.js +6 -6
  157. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsStatus.js +13 -13
  158. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +2 -2
  159. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +12 -5
  160. package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +4 -4
  161. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +3 -3
  162. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +27 -27
  163. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +3 -3
  164. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -2
  165. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +1 -1
  166. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +11 -11
  167. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarActions.js +15 -15
  168. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +2 -2
  169. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -1
  170. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +10 -10
  171. package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +4 -4
  172. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +5 -5
  173. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +6 -6
  174. package/vscode/src/vs/workbench/browser/quickaccess.js +1 -1
  175. package/vscode/src/vs/workbench/browser/window.js +14 -14
  176. package/vscode/src/vs/workbench/browser/workbench.contribution.js +232 -232
  177. package/vscode/src/vs/workbench/common/configuration.js +9 -9
  178. package/vscode/src/vs/workbench/common/contextkeys.js +86 -86
  179. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +1 -1
  180. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +1 -1
  181. package/vscode/src/vs/workbench/common/editor/textEditorModel.js +1 -1
  182. package/vscode/src/vs/workbench/common/editor.js +4 -4
  183. package/vscode/src/vs/workbench/common/theme.js +208 -208
  184. package/vscode/src/vs/workbench/common/views.js +4 -4
  185. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +168 -168
  186. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
  187. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.js +2 -2
  188. package/vscode/src/vs/workbench/contrib/browserView/common/browserEditorInput.js +1 -1
  189. package/vscode/src/vs/workbench/contrib/browserView/common/browserView.js +11 -11
  190. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +65 -65
  191. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.d.ts +1 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.js +2 -1
  193. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +2 -2
  194. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +78 -13
  195. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service.d.ts +1 -1
  196. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLegacyMigration.js +6 -2
  197. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +15 -15
  198. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.d.ts +30 -0
  199. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.js +39 -0
  200. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service.d.ts +1 -1
  201. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.service.d.ts +1 -1
  202. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +3 -3
  203. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatScreenshotContext.js +1 -1
  204. package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +1 -1
  205. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +7 -7
  206. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutline.js +2 -2
  207. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  208. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/chatSpeechToTextService.js +19 -19
  209. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/dictationDownloadRing.js +7 -7
  210. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/dictationSession.js +2 -2
  211. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.js +2 -2
  212. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service.d.ts +1 -1
  213. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.js +10 -10
  214. package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.js +108 -108
  215. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.d.ts +2 -2
  216. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.js +81 -5
  217. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.service.d.ts +1 -1
  218. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.service.d.ts +1 -1
  219. package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.d.ts +1 -0
  220. package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.js +29 -0
  221. package/vscode/src/vs/workbench/contrib/chat/common/chatModes.js +3 -3
  222. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +2 -2
  223. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.js +1 -1
  224. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.service.d.ts +1 -1
  225. package/vscode/src/vs/workbench/contrib/chat/common/editing/chatEditingService.js +2 -2
  226. package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +3 -3
  227. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +47 -31
  228. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.js +8 -8
  229. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +1 -1
  230. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.d.ts +1 -1
  231. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.d.ts +2 -2
  232. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.service.d.ts +1 -1
  233. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.d.ts +1 -1
  234. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.d.ts +1 -1
  235. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.d.ts +2 -2
  236. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginSource.d.ts +1 -1
  237. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookSchema.js +18 -18
  238. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookTypes.js +20 -20
  239. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptFileAttributes.js +80 -80
  240. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptTypes.js +10 -10
  241. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatParserTypes.d.ts +1 -1
  242. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.d.ts +3 -0
  243. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.js +7 -0
  244. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.js +3 -3
  245. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +11 -11
  246. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
  247. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +6 -6
  248. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
  249. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +10 -10
  250. package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
  251. package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
  252. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +6 -6
  253. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
  254. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
  255. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +3 -3
  256. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
  257. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +12 -12
  258. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
  259. package/vscode/src/vs/workbench/contrib/codeEditor/common/languageConfigurationExtensionPoint.js +71 -71
  260. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +7 -7
  261. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +7 -7
  262. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +2 -2
  263. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +3 -3
  264. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +3 -3
  265. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +3 -3
  266. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +3 -3
  267. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
  268. package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
  269. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +7 -7
  270. package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +1 -1
  271. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +9 -9
  272. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +14 -14
  273. package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +16 -16
  274. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +7 -7
  275. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +12 -12
  276. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorDiffInput.js +3 -3
  277. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +3 -3
  278. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +1 -1
  279. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +29 -29
  280. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +14 -14
  281. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +75 -75
  282. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +2 -2
  283. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +9 -9
  284. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -12
  285. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +38 -38
  286. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +2 -2
  287. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +3 -3
  288. package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +57 -57
  289. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +3 -3
  290. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +7 -7
  291. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +2 -2
  292. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +18 -18
  293. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +5 -5
  294. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +9 -9
  295. package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
  296. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +65 -65
  297. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +6 -6
  298. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
  299. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
  300. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +1 -1
  301. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +1 -1
  302. package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.js +2 -2
  303. package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +4 -4
  304. package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +1 -1
  305. package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +1 -1
  306. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +41 -41
  307. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.js +1 -1
  308. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +15 -15
  309. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +14 -14
  310. package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +158 -158
  311. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +180 -180
  312. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.js +1 -1
  313. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.js +1 -1
  314. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.js +5 -5
  315. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +25 -25
  316. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.js +4 -4
  317. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +7 -7
  318. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +48 -48
  319. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +5 -5
  320. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +30 -30
  321. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +77 -77
  322. package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +2 -2
  323. package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +1 -1
  324. package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +2 -2
  325. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
  326. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +5 -5
  327. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +2 -2
  328. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +3 -3
  329. package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +3 -3
  330. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -4
  331. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +3 -3
  332. package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +1 -1
  333. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +8 -8
  334. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +18 -18
  335. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +14 -14
  336. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +39 -39
  337. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +84 -84
  338. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands._save.js +4 -4
  339. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +2 -2
  340. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
  341. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +28 -28
  342. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +50 -50
  343. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
  344. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
  345. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +7 -7
  346. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +17 -17
  347. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +9 -9
  348. package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +4 -4
  349. package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +1 -1
  350. package/vscode/src/vs/workbench/contrib/files/common/files.js +16 -16
  351. package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
  352. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
  353. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
  354. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  355. package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
  356. package/vscode/src/vs/workbench/contrib/inlineCompletions/browser/inlineCompletionLanguageStatusBarContribution.js +6 -6
  357. package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
  358. package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
  359. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommandsAddConfiguration.js +70 -70
  360. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +40 -40
  361. package/vscode/src/vs/workbench/contrib/mcp/common/mcpConfiguration.js +45 -45
  362. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +16 -16
  363. package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +4 -4
  364. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +4 -4
  365. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +23 -23
  366. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +2 -2
  367. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +8 -8
  368. package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnection.contribution.js +8 -8
  369. package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnectionStatus.js +4 -4
  370. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +1 -1
  371. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +3 -3
  372. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +1 -1
  373. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +17 -17
  374. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.d.ts +3 -3
  375. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +1 -1
  376. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +1 -1
  377. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.d.ts +1 -1
  378. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -2
  379. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.d.ts +1 -1
  380. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.service.d.ts +1 -1
  381. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service.d.ts +1 -1
  382. package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +1 -1
  383. package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +3 -3
  384. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +13 -13
  385. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +10 -10
  386. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +60 -60
  387. package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +3 -3
  388. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +21 -21
  389. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +15 -15
  390. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +17 -17
  391. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +59 -59
  392. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistory.js +11 -11
  393. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.js +6 -6
  394. package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.js +51 -15
  395. package/vscode/src/vs/workbench/contrib/search/browser/AISearch/aiSearchModel.d.ts +1 -1
  396. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +9 -9
  397. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.d.ts +1 -1
  398. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase.d.ts +1 -1
  399. package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +4 -4
  400. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +1 -1
  401. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +9 -9
  402. package/vscode/src/vs/workbench/contrib/search/browser/searchChatContext.js +5 -5
  403. package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +1 -1
  404. package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +20 -20
  405. package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +2 -2
  406. package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +14 -14
  407. package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/folderMatch.d.ts +1 -1
  408. package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon.d.ts +1 -1
  409. package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +59 -58
  410. package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +11 -11
  411. package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +2 -2
  412. package/vscode/src/vs/workbench/contrib/search/common/search.js +1 -1
  413. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +4 -4
  414. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +5 -5
  415. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
  416. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
  417. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
  418. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
  419. package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
  420. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +6 -6
  421. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +6 -6
  422. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
  423. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +3 -3
  424. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +13 -13
  425. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +42 -42
  426. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +15 -15
  427. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +10 -10
  428. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -23
  429. package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +17 -17
  430. package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +26 -26
  431. package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/common/terminalAccessibilityConfiguration.js +5 -5
  432. package/vscode/src/vs/workbench/contrib/terminalContrib/autoReplies/common/terminalAutoRepliesConfiguration.js +2 -2
  433. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.js +77 -77
  434. package/vscode/src/vs/workbench/contrib/terminalContrib/commandGuide/common/terminalCommandGuideConfiguration.js +1 -1
  435. package/vscode/src/vs/workbench/contrib/terminalContrib/history/common/terminal.history.js +1 -1
  436. package/vscode/src/vs/workbench/contrib/terminalContrib/inlineHint/common/terminalInitialHintConfiguration.js +1 -1
  437. package/vscode/src/vs/workbench/contrib/terminalContrib/notification/common/terminalNotificationConfiguration.js +1 -1
  438. package/vscode/src/vs/workbench/contrib/terminalContrib/resizeDimensionsOverlay/common/terminalResizeDimensionsOverlayConfiguration.js +1 -1
  439. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/common/terminalStickyScrollConfiguration.js +3 -3
  440. package/vscode/src/vs/workbench/contrib/terminalContrib/suggest/common/terminalSuggestConfiguration.js +30 -30
  441. package/vscode/src/vs/workbench/contrib/terminalContrib/typeAhead/common/terminalTypeAheadConfiguration.js +5 -5
  442. package/vscode/src/vs/workbench/contrib/terminalContrib/zoom/common/terminal.zoom.js +2 -2
  443. package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
  444. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
  445. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
  446. package/vscode/src/vs/workbench/contrib/url/browser/trustedDomains.js +6 -6
  447. package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +3 -3
  448. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindAccessibilityHelp.js +30 -30
  449. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +1 -1
  450. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.d.ts +34 -0
  451. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.js +72 -0
  452. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +44 -0
  453. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +96 -0
  454. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css +1148 -0
  455. package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.js +12 -12
  456. package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +2 -2
  457. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +205 -0
  458. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +1580 -0
  459. package/vscode/src/vs/workbench/services/agentHost/browser/codexAccountService.js +4 -4
  460. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +11 -11
  461. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +5 -5
  462. package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.js +16 -16
  463. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +16 -16
  464. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +1 -1
  465. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
  466. package/vscode/src/vs/workbench/services/dataChannel/browser/dataChannelService.js +11 -11
  467. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +4 -4
  468. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionsIcons.js +3 -3
  469. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +6 -6
  470. package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +10 -10
  471. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
  472. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +45 -0
  473. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +90 -90
  474. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +5 -5
  475. package/vscode/src/vs/workbench/services/language/common/languageService.js +24 -24
  476. package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
  477. package/vscode/src/vs/workbench/services/policies/common/accountPolicyService.js +1 -1
  478. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +2 -2
  479. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +7 -7
  480. package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +4 -4
  481. package/vscode/src/vs/workbench/services/preferences/common/preferencesModels.js +2 -2
  482. package/vscode/src/vs/workbench/services/preferences/common/preferencesValidation.js +30 -30
  483. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
  484. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
  485. package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
  486. package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +9 -9
  487. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +3 -3
  488. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +18 -18
  489. package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +8 -8
  490. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
  491. package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +24 -24
  492. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -3
  493. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
  494. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
  495. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +16 -16
  496. package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.d.ts +0 -7
  497. package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.js +0 -92
  498. package/vscode/src/vs/platform/agentHost/common/meta/agentFeedbackAnnotations.d.ts +0 -128
  499. package/vscode/src/vs/platform/agentHost/common/meta/agentToolCallMeta.d.ts +0 -81
  500. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.d.ts +0 -12
  501. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +0 -64
  502. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.d.ts +0 -262
  503. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +0 -865
  504. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +0 -57
  505. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +0 -311
  506. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -15
  507. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -80
  508. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +0 -2
  509. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +0 -57
  510. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -231
  511. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1850
  512. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -109
  513. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -85
  514. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +0 -140
  515. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +0 -186
  516. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.d.ts +0 -1
  517. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.js +0 -5
  518. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.d.ts +0 -46
  519. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.js +0 -17
  520. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -253
  521. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -20
  522. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +0 -34
  523. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +0 -194
  524. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -87
  525. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -69
  526. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +0 -300
  527. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +0 -272
  528. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -25
  529. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -178
  530. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -78
  531. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -51
  532. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
  533. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
  534. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -67
  535. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -294
  536. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -212
  537. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -955
  538. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
  539. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
  540. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +0 -65
  541. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +0 -697
  542. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.d.ts +0 -150
  543. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.js +0 -142
  544. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
  545. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -77
  546. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
  547. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
  548. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
  549. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
  550. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +0 -92
  551. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +0 -335
  552. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -235
  553. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1673
  554. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -202
  555. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -872
  556. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.d.ts +0 -35
  557. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.js +0 -289
  558. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.d.ts +0 -72
  559. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +0 -600
  560. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +0 -36
  561. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +0 -239
  562. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +0 -22
  563. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +0 -143
  564. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +0 -24
  565. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +0 -298
  566. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +0 -25
  567. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +0 -177
  568. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +0 -73
  569. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +0 -577
  570. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +0 -11
  571. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +0 -90
  572. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +0 -16
  573. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +0 -130
  574. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +0 -12
  575. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +0 -53
  576. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +0 -5
  577. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +0 -12
  578. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +0 -10
  579. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +0 -92
  580. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -38
  581. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -518
  582. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
  583. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -231
  584. package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.d.ts +0 -20
  585. package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.js +0 -17
  586. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.d.ts +0 -6
  587. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +0 -283
  588. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.d.ts +0 -91
  589. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +0 -340
  590. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.d.ts +0 -17
  591. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +0 -272
  592. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css +0 -686
  593. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css +0 -348
  594. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css +0 -8
  595. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css +0 -92
  596. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css +0 -119
  597. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css +0 -79
  598. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css +0 -61
  599. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditController.css +0 -55
  600. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditorOverlay.css +0 -63
  601. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css +0 -79
  602. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css +0 -63
  603. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css +0 -92
  604. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css +0 -79
  605. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css +0 -24
  606. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css +0 -61
  607. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css +0 -102
  608. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.d.ts +0 -27
  609. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +0 -131
  610. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.d.ts +0 -18
  611. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.js +0 -92
  612. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.d.ts +0 -105
  613. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +0 -673
  614. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.d.ts +0 -9
  615. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +0 -37
  616. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.d.ts +0 -354
  617. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2926
  618. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.d.ts +0 -29
  619. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +0 -36
  620. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.d.ts +0 -1
  621. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +0 -19
  622. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.d.ts +0 -200
  623. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +0 -591
  624. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.d.ts +0 -56
  625. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +0 -30
  626. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.d.ts +0 -99
  627. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +0 -131
  628. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.d.ts +0 -30
  629. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +0 -115
  630. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.d.ts +0 -28
  631. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +0 -158
  632. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.d.ts +0 -40
  633. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +0 -183
  634. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.d.ts +0 -10
  635. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +0 -66
  636. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.d.ts +0 -52
  637. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +0 -429
  638. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.d.ts +0 -6
  639. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +0 -108
  640. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.d.ts +0 -36
  641. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +0 -221
  642. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.d.ts +0 -17
  643. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +0 -142
  644. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.d.ts +0 -5
  645. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +0 -23
  646. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.d.ts +0 -18
  647. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +0 -104
  648. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.d.ts +0 -92
  649. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +0 -762
  650. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.d.ts +0 -15
  651. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +0 -58
  652. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.d.ts +0 -36
  653. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +0 -357
  654. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.d.ts +0 -6
  655. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +0 -32
  656. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.d.ts +0 -47
  657. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +0 -260
  658. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.d.ts +0 -9
  659. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.js +0 -10
  660. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.d.ts +0 -10
  661. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +0 -24
  662. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.d.ts +0 -182
  663. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +0 -796
  664. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.d.ts +0 -13
  665. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +0 -79
  666. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.d.ts +0 -30
  667. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +0 -126
  668. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.d.ts +0 -6
  669. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +0 -32
  670. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.d.ts +0 -8
  671. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +0 -50
  672. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.d.ts +0 -18
  673. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +0 -119
  674. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.d.ts +0 -57
  675. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +0 -443
  676. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.d.ts +0 -20
  677. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +0 -56
  678. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.d.ts +0 -24
  679. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.js +0 -121
  680. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.d.ts +0 -152
  681. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +0 -1288
  682. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.d.ts +0 -59
  683. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +0 -287
  684. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.d.ts +0 -117
  685. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.js +0 -6
  686. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.d.ts +0 -222
  687. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +0 -1840
  688. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.d.ts +0 -63
  689. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +0 -449
  690. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.d.ts +0 -432
  691. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.d.ts +0 -18
  692. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +0 -2546
  693. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.d.ts +0 -8
  694. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +0 -105
  695. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.d.ts +0 -137
  696. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +0 -646
  697. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.d.ts +0 -21
  698. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +0 -101
  699. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.d.ts +0 -13
  700. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.js +0 -111
  701. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.d.ts +0 -30
  702. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +0 -65
  703. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.d.ts +0 -13
  704. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +0 -49
  705. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.d.ts +0 -89
  706. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +0 -472
  707. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.d.ts +0 -11
  708. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +0 -34
  709. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.d.ts +0 -33
  710. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +0 -275
  711. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.d.ts +0 -69
  712. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +0 -269
  713. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.d.ts +0 -125
  714. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +0 -958
  715. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.d.ts +0 -9
  716. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +0 -11
  717. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.d.ts +0 -20
  718. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.js +0 -101
  719. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.d.ts +0 -65
  720. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +0 -458
  721. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.d.ts +0 -80
  722. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +0 -708
  723. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.d.ts +0 -37
  724. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +0 -193
  725. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.d.ts +0 -7
  726. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.js +0 -62
  727. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.d.ts +0 -108
  728. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +0 -717
  729. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.d.ts +0 -23
  730. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +0 -183
  731. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.d.ts +0 -11
  732. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +0 -134
  733. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.d.ts +0 -20
  734. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +0 -135
  735. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.d.ts +0 -27
  736. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +0 -213
  737. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.d.ts +0 -27
  738. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +0 -104
  739. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.d.ts +0 -115
  740. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +0 -480
  741. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.d.ts +0 -87
  742. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -352
  743. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.d.ts +0 -81
  744. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.js +0 -9
  745. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.d.ts +0 -10
  746. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +0 -19
@@ -1,1840 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
3
- import { createElement } from '../../../../../../base/browser/dom.js';
4
- import { coalesce } from '../../../../../../base/common/arrays.js';
5
- import { DeferredPromise, runWhenGlobalIdle } from '../../../../../../base/common/async.js';
6
- import { decodeBase64 } from '../../../../../../base/common/buffer.js';
7
- import { Emitter } from '../../../../../../base/common/event.js';
8
- import { getExtensionForMimeType, isTextStreamMime } from '../../../../../../base/common/mime.js';
9
- import { Schemas, FileAccess, matchesScheme, matchesSomeScheme } from '../../../../../../base/common/network.js';
10
- import { equals } from '../../../../../../base/common/objects.js';
11
- import { isAbsolute } from '../../../../../../base/common/path.js';
12
- import { isWeb, isMacintosh } from '../../../../../../base/common/platform.js';
13
- import { dirname, isEqual, extname, joinPath } from '../../../../../../base/common/resources.js';
14
- import { URI } from '../../../../../../base/common/uri.js';
15
- import { generateUuid } from '../../../../../../base/common/uuid.js';
16
- import { TokenizationRegistry } from '../../../../../../editor/common/languages.js';
17
- import { ILanguageService } from '../../../../../../editor/common/languages/language.service.js';
18
- import { generateTokensCSSForColorMap } from '../../../../../../editor/common/languages/supports/tokenization.js';
19
- import { tokenizeToString } from '../../../../../../editor/common/languages/textToHtmlTokenizer.js';
20
- import { localize } from '../../../../../../nls.js';
21
- import { MenuId } from '../../../../../../platform/actions/common/actions.js';
22
- import { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.service.js';
23
- import { IContextKeyService } from '../../../../../../platform/contextkey/common/contextkey.service.js';
24
- import { IContextMenuService } from '../../../../../../platform/contextview/browser/contextView.service.js';
25
- import { IFileDialogService } from '../../../../../../platform/dialogs/common/dialogs.service.js';
26
- import { EditorOpenSource } from '../../../../../../platform/editor/common/editor.js';
27
- import { IFileService } from '../../../../../../platform/files/common/files.service.js';
28
- import { extractSelection } from '../../../../../../platform/opener/common/opener.js';
29
- import { IOpenerService } from '../../../../../../platform/opener/common/opener.service.js';
30
- import { IStorageService } from '../../../../../../platform/storage/common/storage.service.js';
31
- import { ITelemetryService } from '../../../../../../platform/telemetry/common/telemetry.service.js';
32
- import '../../../../../../platform/theme/common/colorUtils.js';
33
- import '../../../../../../platform/theme/common/colors/baseColors.js';
34
- import '../../../../../../platform/theme/common/colors/chartsColors.js';
35
- import { editorFindMatch, editorFindMatchHighlight } from '../../../../../../platform/theme/common/colors/editorColors.js';
36
- import '../../../../../../platform/theme/common/colors/inputColors.js';
37
- import '../../../../../../platform/theme/common/colors/listColors.js';
38
- import '../../../../../../platform/theme/common/colors/menuColors.js';
39
- import '../../../../../../platform/theme/common/colors/minimapColors.js';
40
- import '../../../../../../platform/theme/common/colors/miscColors.js';
41
- import '../../../../../../platform/theme/common/colors/quickpickColors.js';
42
- import '../../../../../../platform/theme/common/colors/searchColors.js';
43
- import { Themable } from '../../../../../../platform/theme/common/themeService.js';
44
- import { IThemeService } from '../../../../../../platform/theme/common/themeService.service.js';
45
- import { IWorkspaceContextService } from '../../../../../../platform/workspace/common/workspace.service.js';
46
- import { IWorkspaceTrustManagementService } from '../../../../../../platform/workspace/common/workspaceTrust.service.js';
47
- import { CellEditState, RenderOutputType } from '../../notebookBrowser.js';
48
- import { NOTEBOOK_WEBVIEW_BOUNDARY } from '../notebookCellList.js';
49
- import { preloadsScriptStr } from './webviewPreloads.js';
50
- import { transformWebviewThemeVars } from './webviewThemeMapping.js';
51
- import { MarkupCellViewModel } from '../../viewModel/markupCellViewModel.js';
52
- import { RendererMessagingSpec, CellUri } from '../../../common/notebookCommon.js';
53
- import { INotebookLoggingService } from '../../../common/notebookLoggingService.service.js';
54
- import { INotebookService } from '../../../common/notebookService.service.js';
55
- import { WebviewOriginStore, WebviewContentPurpose } from '../../../../webview/browser/webview.js';
56
- import { IWebviewService } from '../../../../webview/browser/webview.service.js';
57
- import { WebviewWindowDragMonitor } from '../../../../webview/browser/webviewWindowDragMonitor.js';
58
- import { webviewGenericCspSource, asWebviewUri } from '../../../../webview/common/webview.js';
59
- import { IEditorGroupsService } from '../../../../../services/editor/common/editorGroupsService.service.js';
60
- import { IEditorService } from '../../../../../services/editor/common/editorService.service.js';
61
- import { IWorkbenchEnvironmentService } from '../../../../../services/environment/common/environmentService.service.js';
62
- import { IPathService } from '../../../../../services/path/common/pathService.service.js';
63
- import { TEXT_BASED_MIMETYPES, getOutputStreamText, getOutputText } from '../../viewModel/cellOutputTextHelper.js';
64
-
65
- var BackLayerWebView_1;
66
- const LINE_COLUMN_REGEX = /:([\d]+)(?::([\d]+))?$/;
67
- const LineQueryRegex = /line=(\d+)$/;
68
- const FRAGMENT_REGEX = /^(.*)#([^#]*)$/;
69
- let BackLayerWebView = class BackLayerWebView extends Themable {
70
- static {
71
- BackLayerWebView_1 = this;
72
- }
73
- static getOriginStore(storageService) {
74
- this._originStore ??= ( new WebviewOriginStore("notebook.backlayerWebview.origins", storageService));
75
- return this._originStore;
76
- }
77
- constructor(
78
- notebookEditor,
79
- id,
80
- notebookViewType,
81
- documentUri,
82
- options,
83
- rendererMessaging,
84
- webviewService,
85
- openerService,
86
- notebookService,
87
- contextService,
88
- environmentService,
89
- fileDialogService,
90
- fileService,
91
- contextMenuService,
92
- contextKeyService,
93
- workspaceTrustManagementService,
94
- configurationService,
95
- languageService,
96
- workspaceContextService,
97
- editorGroupService,
98
- editorService,
99
- storageService,
100
- pathService,
101
- notebookLogService,
102
- themeService,
103
- telemetryService
104
- ) {
105
- super(themeService);
106
- this.notebookEditor = notebookEditor;
107
- this.id = id;
108
- this.notebookViewType = notebookViewType;
109
- this.documentUri = documentUri;
110
- this.options = options;
111
- this.rendererMessaging = rendererMessaging;
112
- this.webviewService = webviewService;
113
- this.openerService = openerService;
114
- this.notebookService = notebookService;
115
- this.contextService = contextService;
116
- this.environmentService = environmentService;
117
- this.fileDialogService = fileDialogService;
118
- this.fileService = fileService;
119
- this.contextMenuService = contextMenuService;
120
- this.contextKeyService = contextKeyService;
121
- this.workspaceTrustManagementService = workspaceTrustManagementService;
122
- this.configurationService = configurationService;
123
- this.languageService = languageService;
124
- this.workspaceContextService = workspaceContextService;
125
- this.editorGroupService = editorGroupService;
126
- this.editorService = editorService;
127
- this.storageService = storageService;
128
- this.pathService = pathService;
129
- this.notebookLogService = notebookLogService;
130
- this.telemetryService = telemetryService;
131
- this.webview = undefined;
132
- this.insetMapping = ( new Map());
133
- this.pendingWebviewIdleCreationRequest = ( new Map());
134
- this.pendingWebviewIdleInsetMapping = ( new Map());
135
- this.reversedPendingWebviewIdleInsetMapping = ( new Map());
136
- this.markupPreviewMapping = ( new Map());
137
- this.hiddenInsetMapping = ( new Set());
138
- this.reversedInsetMapping = ( new Map());
139
- this.localResourceRootsCache = undefined;
140
- this._onMessage = this._register(( new Emitter()));
141
- this._preloadsCache = ( new Set());
142
- this.onMessage = this._onMessage.event;
143
- this._disposed = false;
144
- this.firstInit = true;
145
- this.nonce = generateUuid();
146
- this._logRendererDebugMessage("Creating backlayer webview for notebook");
147
- this.element = createElement("div");
148
- this.element.style.height = "1400px";
149
- this.element.style.position = "absolute";
150
- if (rendererMessaging) {
151
- this._register(rendererMessaging);
152
- rendererMessaging.receiveMessageHandler = (rendererId, message) => {
153
- if (!this.webview || this._disposed) {
154
- return Promise.resolve(false);
155
- }
156
- this._sendMessageToWebview({
157
- __vscode_notebook_message: true,
158
- type: "customRendererMessage",
159
- rendererId: rendererId,
160
- message: message
161
- });
162
- return Promise.resolve(true);
163
- };
164
- }
165
- this._register(workspaceTrustManagementService.onDidChangeTrust(e => {
166
- const baseUrl = this.asWebviewUri(this.getNotebookBaseUri(), undefined);
167
- const htmlContent = this.generateContent(( baseUrl.toString()));
168
- this.webview?.setHtml(htmlContent);
169
- }));
170
- this._register(TokenizationRegistry.onDidChange(() => {
171
- this._sendMessageToWebview({
172
- type: "tokenizedStylesChanged",
173
- css: getTokenizationCss()
174
- });
175
- }));
176
- }
177
- updateOptions(options) {
178
- this.options = options;
179
- this._updateStyles();
180
- this._updateOptions();
181
- }
182
- _logRendererDebugMessage(msg) {
183
- this.notebookLogService.debug("BacklayerWebview", `${this.documentUri} (${this.id}) - ${msg}`);
184
- }
185
- _updateStyles() {
186
- this._sendMessageToWebview({
187
- type: "notebookStyles",
188
- styles: this._generateStyles()
189
- });
190
- }
191
- _updateOptions() {
192
- this._sendMessageToWebview({
193
- type: "notebookOptions",
194
- options: {
195
- dragAndDropEnabled: this.options.dragAndDropEnabled
196
- },
197
- renderOptions: {
198
- lineLimit: this.options.outputLineLimit,
199
- outputScrolling: this.options.outputScrolling,
200
- outputWordWrap: this.options.outputWordWrap,
201
- linkifyFilePaths: this.options.outputLinkifyFilePaths,
202
- minimalError: this.options.minimalError
203
- }
204
- });
205
- }
206
- _generateStyles() {
207
- return {
208
- "notebook-output-left-margin": `${this.options.leftMargin + this.options.runGutter}px`,
209
- "notebook-output-width": `calc(100% - ${this.options.leftMargin + this.options.rightMargin + this.options.runGutter}px)`,
210
- "notebook-output-node-padding": `${this.options.outputNodePadding}px`,
211
- "notebook-run-gutter": `${this.options.runGutter}px`,
212
- "notebook-preview-node-padding": `${this.options.previewNodePadding}px`,
213
- "notebook-markdown-left-margin": `${this.options.markdownLeftMargin}px`,
214
- "notebook-output-node-left-padding": `${this.options.outputNodeLeftPadding}px`,
215
- "notebook-markdown-min-height": `${this.options.previewNodePadding * 2}px`,
216
- "notebook-markup-font-size": typeof this.options.markupFontSize === "number" && this.options.markupFontSize > 0 ? `${this.options.markupFontSize}px` : `calc(${this.options.fontSize}px * 1.2)`,
217
- "notebook-markdown-line-height": typeof this.options.markdownLineHeight === "number" && this.options.markdownLineHeight > 0 ? `${this.options.markdownLineHeight}px` : `normal`,
218
- "notebook-cell-output-font-size": `${this.options.outputFontSize || this.options.fontSize}px`,
219
- "notebook-cell-output-line-height": `${this.options.outputLineHeight}px`,
220
- "notebook-cell-output-max-height": `${this.options.outputLineHeight * this.options.outputLineLimit + 2}px`,
221
- "notebook-cell-output-font-family": this.options.outputFontFamily || this.options.fontFamily,
222
- "notebook-cell-markup-empty-content": ( localize(14623, "Empty markdown cell, double-click or press enter to edit.")),
223
- "notebook-cell-renderer-not-found-error": ( localize(14624, "No renderer found for '$0'")),
224
- "notebook-cell-renderer-fallbacks-exhausted": ( localize(14625, "Could not render content for '$0'")),
225
- "notebook-markup-font-family": this.options.markupFontFamily
226
- };
227
- }
228
- generateContent(baseUrl) {
229
- const renderersData = this.getRendererData();
230
- const preloadsData = this.getStaticPreloadsData();
231
- const renderOptions = {
232
- lineLimit: this.options.outputLineLimit,
233
- outputScrolling: this.options.outputScrolling,
234
- outputWordWrap: this.options.outputWordWrap,
235
- linkifyFilePaths: this.options.outputLinkifyFilePaths,
236
- minimalError: this.options.minimalError
237
- };
238
- const preloadScript = preloadsScriptStr({
239
- ...this.options,
240
- tokenizationCss: getTokenizationCss()
241
- }, {
242
- dragAndDropEnabled: this.options.dragAndDropEnabled
243
- }, renderOptions, renderersData, preloadsData, this.workspaceTrustManagementService.isWorkspaceTrusted(), this.nonce);
244
- const enableCsp = this.configurationService.getValue("notebook.experimental.enableCsp");
245
- const currentHighlight = this.getColor(editorFindMatch);
246
- const findMatchHighlight = this.getColor(editorFindMatchHighlight);
247
- return (
248
- `
249
- <html lang="en">
250
- <head>
251
- <meta charset="UTF-8">
252
- <base href="${baseUrl}/" />
253
- ${enableCsp ? `<meta http-equiv="Content-Security-Policy" content="
254
- default-src 'none';
255
- script-src ${webviewGenericCspSource} 'unsafe-inline' 'unsafe-eval';
256
- style-src ${webviewGenericCspSource} 'unsafe-inline';
257
- img-src ${webviewGenericCspSource} https: http: data:;
258
- font-src ${webviewGenericCspSource} https:;
259
- connect-src https:;
260
- child-src https: data:;
261
- ">` : ""}
262
- <style nonce="${this.nonce}">
263
- ::highlight(find-highlight) {
264
- background-color: var(--vscode-editor-findMatchBackground, ${findMatchHighlight});
265
- }
266
-
267
- ::highlight(current-find-highlight) {
268
- background-color: var(--vscode-editor-findMatchHighlightBackground, ${currentHighlight});
269
- }
270
-
271
- #container .cell_container {
272
- width: 100%;
273
- }
274
-
275
- #container .output_container {
276
- width: 100%;
277
- }
278
-
279
- #container .cell_container.nb-insertHighlight div.output_container div.output {
280
- background-color: var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground));
281
- }
282
-
283
- #container > div > div > div.output {
284
- font-size: var(--notebook-cell-output-font-size);
285
- width: var(--notebook-output-width);
286
- margin-left: var(--notebook-output-left-margin);
287
- background-color: var(--theme-notebook-output-background);
288
- padding-top: var(--notebook-output-node-padding);
289
- padding-right: var(--notebook-output-node-padding);
290
- padding-bottom: var(--notebook-output-node-padding);
291
- padding-left: var(--notebook-output-node-left-padding);
292
- box-sizing: border-box;
293
- border-top: none;
294
- }
295
-
296
- /* markdown */
297
- #container div.preview {
298
- width: 100%;
299
- padding-right: var(--notebook-preview-node-padding);
300
- padding-left: var(--notebook-markdown-left-margin);
301
- padding-top: var(--notebook-preview-node-padding);
302
- padding-bottom: var(--notebook-preview-node-padding);
303
-
304
- box-sizing: border-box;
305
- white-space: nowrap;
306
- overflow: hidden;
307
- white-space: initial;
308
-
309
- font-size: var(--notebook-markup-font-size);
310
- line-height: var(--notebook-markdown-line-height);
311
- color: var(--theme-ui-foreground);
312
- font-family: var(--notebook-markup-font-family);
313
- }
314
-
315
- #container div.preview.draggable {
316
- user-select: none;
317
- -webkit-user-select: none;
318
- -ms-user-select: none;
319
- cursor: grab;
320
- }
321
-
322
- #container div.preview.selected {
323
- background: var(--theme-notebook-cell-selected-background);
324
- }
325
-
326
- #container div.preview.dragging {
327
- background-color: var(--theme-background);
328
- opacity: 0.5 !important;
329
- }
330
-
331
- .monaco-workbench.vs-dark .notebookOverlay .cell.markdown .latex img,
332
- .monaco-workbench.vs-dark .notebookOverlay .cell.markdown .latex-block img {
333
- filter: brightness(0) invert(1)
334
- }
335
-
336
- #container .markup > div.nb-symbolHighlight {
337
- background-color: var(--theme-notebook-symbol-highlight-background);
338
- }
339
-
340
- #container .markup > div.nb-insertHighlight {
341
- background-color: var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground));
342
- }
343
-
344
- #container .nb-symbolHighlight .output_container .output {
345
- background-color: var(--theme-notebook-symbol-highlight-background);
346
- }
347
-
348
- #container .markup > div.nb-multiCellHighlight {
349
- background-color: var(--theme-notebook-symbol-highlight-background);
350
- }
351
-
352
- #container .nb-multiCellHighlight .output_container .output {
353
- background-color: var(--theme-notebook-symbol-highlight-background);
354
- }
355
-
356
- #container .nb-chatGenerationHighlight .output_container .output {
357
- background-color: var(--vscode-notebook-selectedCellBackground);
358
- }
359
-
360
- #container > div.nb-cellDeleted .output_container {
361
- background-color: var(--theme-notebook-diff-removed-background);
362
- }
363
-
364
- #container > div.nb-cellAdded .output_container {
365
- background-color: var(--theme-notebook-diff-inserted-background);
366
- }
367
-
368
- #container > div > div:not(.preview) > div {
369
- overflow-x: auto;
370
- }
371
-
372
- #container .no-renderer-error {
373
- color: var(--vscode-editorError-foreground);
374
- }
375
-
376
- body {
377
- padding: 0px;
378
- height: 100%;
379
- width: 100%;
380
- }
381
-
382
- table, thead, tr, th, td, tbody {
383
- border: none;
384
- border-color: transparent;
385
- border-spacing: 0;
386
- border-collapse: collapse;
387
- }
388
-
389
- table, th, tr {
390
- vertical-align: middle;
391
- text-align: right;
392
- }
393
-
394
- thead {
395
- font-weight: bold;
396
- background-color: rgba(130, 130, 130, 0.16);
397
- }
398
-
399
- th, td {
400
- padding: 4px 8px;
401
- }
402
-
403
- tr:nth-child(even) {
404
- background-color: rgba(130, 130, 130, 0.08);
405
- }
406
-
407
- tbody th {
408
- font-weight: normal;
409
- }
410
-
411
- .find-match {
412
- background-color: var(--vscode-editor-findMatchHighlightBackground);
413
- }
414
-
415
- .current-find-match {
416
- background-color: var(--vscode-editor-findMatchBackground);
417
- }
418
-
419
- #_defaultColorPalatte {
420
- color: var(--vscode-editor-findMatchHighlightBackground);
421
- background-color: var(--vscode-editor-findMatchBackground);
422
- }
423
- </style>
424
- </head>
425
- <body style="overflow: hidden;">
426
- <div id='findStart' tabIndex=-1></div>
427
- <div id='container' class="widgetarea" style="position: absolute;width:100%;top: 0px"></div>
428
- <div id="_defaultColorPalatte"></div>
429
- <script type="module">${preloadScript}</script>
430
- </body>
431
- </html>`
432
- );
433
- }
434
- getRendererData() {
435
- return ( this.notebookService.getRenderers().map(renderer => {
436
- const entrypoint = {
437
- extends: renderer.entrypoint.extends,
438
- path: ( this.asWebviewUri(renderer.entrypoint.path, renderer.extensionLocation).toString())
439
- };
440
- return {
441
- id: renderer.id,
442
- entrypoint,
443
- mimeTypes: renderer.mimeTypes,
444
- messaging: renderer.messaging !== RendererMessagingSpec.Never && !!this.rendererMessaging,
445
- isBuiltin: renderer.isBuiltin
446
- };
447
- }));
448
- }
449
- getStaticPreloadsData() {
450
- return Array.from(
451
- this.notebookService.getStaticPreloads(this.notebookViewType),
452
- preload => {
453
- return {
454
- entrypoint: ( ( this.asWebviewUri(preload.entrypoint, preload.extensionLocation).toString()).toString())
455
- };
456
- }
457
- );
458
- }
459
- asWebviewUri(uri, fromExtension) {
460
- return asWebviewUri(uri, fromExtension?.scheme === Schemas.vscodeRemote ? {
461
- isRemote: true,
462
- authority: fromExtension.authority
463
- } : undefined);
464
- }
465
- postKernelMessage(message) {
466
- this._sendMessageToWebview({
467
- __vscode_notebook_message: true,
468
- type: "customKernelMessage",
469
- message
470
- });
471
- }
472
- resolveOutputId(id) {
473
- const output = this.reversedInsetMapping.get(id);
474
- if (!output) {
475
- return;
476
- }
477
- const cellInfo = this.insetMapping.get(output).cellInfo;
478
- return {
479
- cellInfo,
480
- output
481
- };
482
- }
483
- isResolved() {
484
- return !!this.webview;
485
- }
486
- createWebview(targetWindow) {
487
- const baseUrl = this.asWebviewUri(this.getNotebookBaseUri(), undefined);
488
- const htmlContent = this.generateContent(( baseUrl.toString()));
489
- return this._initialize(htmlContent, targetWindow);
490
- }
491
- getNotebookBaseUri() {
492
- if (this.documentUri.scheme === Schemas.untitled) {
493
- const folder = this.workspaceContextService.getWorkspaceFolder(this.documentUri);
494
- if (folder) {
495
- return folder.uri;
496
- }
497
- const folders = this.workspaceContextService.getWorkspace().folders;
498
- if (folders.length) {
499
- return folders[0].uri;
500
- }
501
- }
502
- return dirname(this.documentUri);
503
- }
504
- getBuiltinLocalResourceRoots() {
505
- if (!this.documentUri.path.toLowerCase().endsWith(".ipynb")) {
506
- return [];
507
- }
508
- if (isWeb) {
509
- return [];
510
- }
511
- return [dirname(( FileAccess.asFileUri("vs/nls.js")))];
512
- }
513
- _initialize(content, targetWindow) {
514
- if (!this.element.isConnected) {
515
- throw ( new Error("Element is already detached from the DOM tree"));
516
- }
517
- this.webview = this._createInset(this.webviewService, content);
518
- this.webview.mountTo(this.element, targetWindow);
519
- this._register(this.webview);
520
- this._register(( new WebviewWindowDragMonitor(targetWindow, () => this.webview)));
521
- const initializePromise = ( new DeferredPromise());
522
- this._register(this.webview.onFatalError(e => {
523
- initializePromise.error(( new Error(`Could not initialize webview: ${e.message}}`)));
524
- }));
525
- this._register(this.webview.onMessage(async message => {
526
- const data = message.message;
527
- if (this._disposed) {
528
- return;
529
- }
530
- if (!data.__vscode_notebook_message) {
531
- return;
532
- }
533
- switch (data.type) {
534
- case "initialized":
535
- {
536
- initializePromise.complete();
537
- this.initializeWebViewState();
538
- break;
539
- }
540
- case "initializedMarkup":
541
- {
542
- if (this.initializeMarkupPromise?.requestId === data.requestId) {
543
- this.initializeMarkupPromise?.p.complete();
544
- this.initializeMarkupPromise = undefined;
545
- }
546
- break;
547
- }
548
- case "dimension":
549
- {
550
- for (const update of data.updates) {
551
- const height = update.height;
552
- if (update.isOutput) {
553
- const resolvedResult = this.resolveOutputId(update.id);
554
- if (resolvedResult) {
555
- const {
556
- cellInfo,
557
- output
558
- } = resolvedResult;
559
- this.notebookEditor.updateOutputHeight(cellInfo, output, height, !!update.init, "webview#dimension");
560
- this.notebookEditor.scheduleOutputHeightAck(cellInfo, update.id, height);
561
- } else if (update.init) {
562
- const outputRequest = this.reversedPendingWebviewIdleInsetMapping.get(update.id);
563
- if (outputRequest) {
564
- const inset = this.pendingWebviewIdleInsetMapping.get(outputRequest);
565
- this.pendingWebviewIdleCreationRequest.delete(outputRequest);
566
- this.pendingWebviewIdleCreationRequest.delete(outputRequest);
567
- const cellInfo = inset.cellInfo;
568
- this.reversedInsetMapping.set(update.id, outputRequest);
569
- this.insetMapping.set(outputRequest, inset);
570
- this.notebookEditor.updateOutputHeight(cellInfo, outputRequest, height, !!update.init, "webview#dimension");
571
- this.notebookEditor.scheduleOutputHeightAck(cellInfo, update.id, height);
572
- }
573
- this.reversedPendingWebviewIdleInsetMapping.delete(update.id);
574
- }
575
- {
576
- if (!update.init) {
577
- continue;
578
- }
579
- const output = this.reversedInsetMapping.get(update.id);
580
- if (!output) {
581
- continue;
582
- }
583
- const inset = this.insetMapping.get(output);
584
- inset.initialized = true;
585
- }
586
- } else {
587
- this.notebookEditor.updateMarkupCellHeight(update.id, height, !!update.init);
588
- }
589
- }
590
- break;
591
- }
592
- case "mouseenter":
593
- {
594
- const resolvedResult = this.resolveOutputId(data.id);
595
- if (resolvedResult) {
596
- const latestCell = this.notebookEditor.getCellByInfo(resolvedResult.cellInfo);
597
- if (latestCell) {
598
- latestCell.outputIsHovered = true;
599
- }
600
- }
601
- break;
602
- }
603
- case "mouseleave":
604
- {
605
- const resolvedResult = this.resolveOutputId(data.id);
606
- if (resolvedResult) {
607
- const latestCell = this.notebookEditor.getCellByInfo(resolvedResult.cellInfo);
608
- if (latestCell) {
609
- latestCell.outputIsHovered = false;
610
- }
611
- }
612
- break;
613
- }
614
- case "outputFocus":
615
- {
616
- const resolvedResult = this.resolveOutputId(data.id);
617
- if (resolvedResult) {
618
- const latestCell = this.notebookEditor.getCellByInfo(resolvedResult.cellInfo);
619
- if (latestCell) {
620
- latestCell.outputIsFocused = true;
621
- this.notebookEditor.focusNotebookCell(latestCell, "output", {
622
- outputId: resolvedResult.output.model.outputId,
623
- skipReveal: true,
624
- outputWebviewFocused: true
625
- });
626
- }
627
- }
628
- break;
629
- }
630
- case "outputBlur":
631
- {
632
- const resolvedResult = this.resolveOutputId(data.id);
633
- if (resolvedResult) {
634
- const latestCell = this.notebookEditor.getCellByInfo(resolvedResult.cellInfo);
635
- if (latestCell) {
636
- latestCell.outputIsFocused = false;
637
- latestCell.inputInOutputIsFocused = false;
638
- }
639
- }
640
- break;
641
- }
642
- case "scroll-ack":
643
- {
644
- break;
645
- }
646
- case "scroll-to-reveal":
647
- {
648
- this.notebookEditor.setScrollTop(data.scrollTop - NOTEBOOK_WEBVIEW_BOUNDARY);
649
- break;
650
- }
651
- case "did-scroll-wheel":
652
- {
653
- this.notebookEditor.triggerScroll({
654
- ...data.payload,
655
- preventDefault: () => {},
656
- stopPropagation: () => {}
657
- });
658
- break;
659
- }
660
- case "focus-editor":
661
- {
662
- const cell = this.notebookEditor.getCellById(data.cellId);
663
- if (cell) {
664
- if (data.focusNext) {
665
- this.notebookEditor.focusNextNotebookCell(cell, "editor");
666
- } else {
667
- await this.notebookEditor.focusNotebookCell(cell, "editor");
668
- }
669
- }
670
- break;
671
- }
672
- case "clicked-data-url":
673
- {
674
- this._onDidClickDataLink(data);
675
- break;
676
- }
677
- case "clicked-link":
678
- {
679
- if (matchesScheme(data.href, Schemas.command)) {
680
- const uri = ( URI.parse(data.href));
681
- if (uri.path === "workbench.action.openLargeOutput") {
682
- const outputId = uri.query;
683
- const group = this.editorGroupService.activeGroup;
684
- if (group) {
685
- if (group.activeEditor) {
686
- group.pinEditor(group.activeEditor);
687
- }
688
- }
689
- this.openerService.open(CellUri.generateCellOutputUriWithId(this.documentUri, outputId));
690
- return;
691
- }
692
- if (uri.path === "cellOutput.enableScrolling") {
693
- const outputId = uri.query;
694
- const cell = this.reversedInsetMapping.get(outputId);
695
- if (cell) {
696
- this.telemetryService.publicLog2("workbenchActionExecuted", {
697
- id: "notebook.cell.toggleOutputScrolling",
698
- from: "inlineLink"
699
- });
700
- cell.cellViewModel.outputsViewModels.forEach(vm => {
701
- if (vm.model.metadata) {
702
- vm.model.metadata["scrollable"] = true;
703
- vm.resetRenderer();
704
- }
705
- });
706
- }
707
- return;
708
- }
709
- this.openerService.open(data.href, {
710
- fromUserGesture: true,
711
- fromWorkspace: true,
712
- allowCommands: [
713
- "github-issues.authNow",
714
- "workbench.extensions.search",
715
- "workbench.action.openSettings",
716
- "_notebook.selectKernel",
717
- "jupyter.viewOutput",
718
- "jupyter.createPythonEnvAndSelectController"
719
- ]
720
- });
721
- return;
722
- }
723
- if (matchesSomeScheme(data.href, Schemas.http, Schemas.https, Schemas.mailto)) {
724
- this.openerService.open(data.href, {
725
- fromUserGesture: true,
726
- fromWorkspace: true
727
- });
728
- } else if (matchesScheme(data.href, Schemas.vscodeNotebookCell)) {
729
- const uri = ( URI.parse(data.href));
730
- await this._handleNotebookCellResource(uri);
731
- } else if (!/^[\w\-]+:/.test(data.href)) {
732
- await this._handleResourceOpening(tryDecodeURIComponent(data.href));
733
- } else {
734
- if (isAbsolute(data.href)) {
735
- await this._openUri(URI.file(data.href));
736
- } else {
737
- await this._openUri(( URI.parse(data.href)));
738
- }
739
- }
740
- break;
741
- }
742
- case "customKernelMessage":
743
- {
744
- this._onMessage.fire({
745
- message: data.message
746
- });
747
- break;
748
- }
749
- case "customRendererMessage":
750
- {
751
- this.rendererMessaging?.postMessage(data.rendererId, data.message);
752
- break;
753
- }
754
- case "clickMarkupCell":
755
- {
756
- const cell = this.notebookEditor.getCellById(data.cellId);
757
- if (cell) {
758
- if (data.shiftKey || (isMacintosh ? data.metaKey : data.ctrlKey)) {
759
- this.notebookEditor.toggleNotebookCellSelection(cell, data.shiftKey);
760
- } else {
761
- await this.notebookEditor.focusNotebookCell(cell, "container", {
762
- skipReveal: true
763
- });
764
- }
765
- }
766
- break;
767
- }
768
- case "contextMenuMarkupCell":
769
- {
770
- const cell = this.notebookEditor.getCellById(data.cellId);
771
- if (cell) {
772
- await this.notebookEditor.focusNotebookCell(cell, "container", {
773
- skipReveal: true
774
- });
775
- const webviewRect = this.element.getBoundingClientRect();
776
- this.contextMenuService.showContextMenu({
777
- menuId: MenuId.NotebookCellTitle,
778
- contextKeyService: this.contextKeyService,
779
- getAnchor: () => ({
780
- x: webviewRect.x + data.clientX,
781
- y: webviewRect.y + data.clientY
782
- })
783
- });
784
- }
785
- break;
786
- }
787
- case "toggleMarkupPreview":
788
- {
789
- const cell = this.notebookEditor.getCellById(data.cellId);
790
- if (cell && !this.notebookEditor.creationOptions.isReadOnly) {
791
- this.notebookEditor.setMarkupCellEditState(data.cellId, CellEditState.Editing);
792
- await this.notebookEditor.focusNotebookCell(cell, "editor", {
793
- skipReveal: true
794
- });
795
- }
796
- break;
797
- }
798
- case "mouseEnterMarkupCell":
799
- {
800
- const cell = this.notebookEditor.getCellById(data.cellId);
801
- if (cell instanceof MarkupCellViewModel) {
802
- cell.cellIsHovered = true;
803
- }
804
- break;
805
- }
806
- case "mouseLeaveMarkupCell":
807
- {
808
- const cell = this.notebookEditor.getCellById(data.cellId);
809
- if (cell instanceof MarkupCellViewModel) {
810
- cell.cellIsHovered = false;
811
- }
812
- break;
813
- }
814
- case "cell-drag-start":
815
- {
816
- this.notebookEditor.didStartDragMarkupCell(data.cellId, data);
817
- break;
818
- }
819
- case "cell-drag":
820
- {
821
- this.notebookEditor.didDragMarkupCell(data.cellId, data);
822
- break;
823
- }
824
- case "cell-drop":
825
- {
826
- this.notebookEditor.didDropMarkupCell(data.cellId, {
827
- dragOffsetY: data.dragOffsetY,
828
- ctrlKey: data.ctrlKey,
829
- altKey: data.altKey
830
- });
831
- break;
832
- }
833
- case "cell-drag-end":
834
- {
835
- this.notebookEditor.didEndDragMarkupCell(data.cellId);
836
- break;
837
- }
838
- case "renderedMarkup":
839
- {
840
- const cell = this.notebookEditor.getCellById(data.cellId);
841
- if (cell instanceof MarkupCellViewModel) {
842
- cell.renderedHtml = data.html;
843
- }
844
- this._handleHighlightCodeBlock(data.codeBlocks);
845
- break;
846
- }
847
- case "renderedCellOutput":
848
- {
849
- this._handleHighlightCodeBlock(data.codeBlocks);
850
- break;
851
- }
852
- case "outputResized":
853
- {
854
- this.notebookEditor.didResizeOutput(data.cellId);
855
- break;
856
- }
857
- case "getOutputItem":
858
- {
859
- const resolvedResult = this.resolveOutputId(data.outputId);
860
- const output = resolvedResult?.output.model.outputs.find(output => output.mime === data.mime);
861
- this._sendMessageToWebview({
862
- type: "returnOutputItem",
863
- requestId: data.requestId,
864
- output: output ? {
865
- mime: output.mime,
866
- valueBytes: output.data.buffer
867
- } : undefined
868
- });
869
- break;
870
- }
871
- case "logRendererDebugMessage":
872
- {
873
- this._logRendererDebugMessage(
874
- `${data.message}${data.data ? " " + JSON.stringify(data.data, null, 4) : ""}`
875
- );
876
- break;
877
- }
878
- case "notebookPerformanceMessage":
879
- {
880
- this.notebookEditor.updatePerformanceMetadata(data.cellId, data.executionId, data.duration, data.rendererId);
881
- if (data.outputSize && data.rendererId === "vscode.builtin-renderer") {
882
- this._sendPerformanceData(data.outputSize, data.duration);
883
- }
884
- break;
885
- }
886
- case "outputInputFocus":
887
- {
888
- const resolvedResult = this.resolveOutputId(data.id);
889
- if (resolvedResult) {
890
- const latestCell = this.notebookEditor.getCellByInfo(resolvedResult.cellInfo);
891
- if (latestCell) {
892
- latestCell.inputInOutputIsFocused = data.inputFocused;
893
- }
894
- }
895
- this.notebookEditor.didFocusOutputInputChange(data.inputFocused);
896
- }
897
- }
898
- }));
899
- return initializePromise.p;
900
- }
901
- _sendPerformanceData(outputSize, renderTime) {
902
- const telemetryData = {
903
- outputSize,
904
- renderTime
905
- };
906
- this.telemetryService.publicLog2("NotebookCellOutputRender", telemetryData);
907
- }
908
- _handleNotebookCellResource(uri) {
909
- const notebookResource = uri.path.length > 0 ? uri : this.documentUri;
910
- const lineMatch = /(?:^|&)line=([^&]+)/.exec(uri.query);
911
- let editorOptions = undefined;
912
- if (lineMatch) {
913
- const parsedLineNumber = parseInt(lineMatch[1], 10);
914
- if (!isNaN(parsedLineNumber)) {
915
- const lineNumber = parsedLineNumber;
916
- editorOptions = {
917
- selection: {
918
- startLineNumber: lineNumber,
919
- startColumn: 1
920
- }
921
- };
922
- }
923
- }
924
- const executionMatch = /(?:^|&)execution_count=([^&]+)/.exec(uri.query);
925
- if (executionMatch) {
926
- const executionCount = parseInt(executionMatch[1], 10);
927
- if (!isNaN(executionCount)) {
928
- const notebookModel = this.notebookService.getNotebookTextModel(notebookResource);
929
- const cell = notebookModel?.cells.slice().reverse().find(cell => {
930
- return cell.internalMetadata.executionOrder === executionCount;
931
- });
932
- if (cell?.uri) {
933
- return this.openerService.open(cell.uri, {
934
- fromUserGesture: true,
935
- fromWorkspace: true,
936
- editorOptions: editorOptions
937
- });
938
- }
939
- }
940
- }
941
- const fragmentLineMatch = /\?line=(\d+)$/.exec(uri.fragment);
942
- if (fragmentLineMatch) {
943
- const parsedLineNumber = parseInt(fragmentLineMatch[1], 10);
944
- if (!isNaN(parsedLineNumber)) {
945
- const lineNumber = parsedLineNumber + 1;
946
- const fragment = uri.fragment.substring(0, fragmentLineMatch.index);
947
- const editorOptions = {
948
- selection: {
949
- startLineNumber: lineNumber,
950
- startColumn: 1,
951
- endLineNumber: lineNumber,
952
- endColumn: 1
953
- }
954
- };
955
- return this.openerService.open(notebookResource.with({
956
- fragment
957
- }), {
958
- fromUserGesture: true,
959
- fromWorkspace: true,
960
- editorOptions: editorOptions
961
- });
962
- }
963
- }
964
- return this.openerService.open(notebookResource, {
965
- fromUserGesture: true,
966
- fromWorkspace: true
967
- });
968
- }
969
- async _handleResourceOpening(href) {
970
- let linkToOpen = undefined;
971
- let fragment = undefined;
972
- const hrefWithFragment = FRAGMENT_REGEX.exec(href);
973
- if (hrefWithFragment) {
974
- href = hrefWithFragment[1];
975
- fragment = hrefWithFragment[2];
976
- }
977
- if (href.startsWith("/")) {
978
- linkToOpen = await this.pathService.fileURI(href);
979
- const folders = this.workspaceContextService.getWorkspace().folders;
980
- if (folders.length) {
981
- linkToOpen = linkToOpen.with({
982
- scheme: folders[0].uri.scheme,
983
- authority: folders[0].uri.authority
984
- });
985
- }
986
- } else if (href.startsWith("~")) {
987
- const userHome = await this.pathService.userHome();
988
- if (userHome) {
989
- linkToOpen = URI.joinPath(userHome, href.substring(2));
990
- }
991
- } else {
992
- if (this.documentUri.scheme === Schemas.untitled) {
993
- const folders = this.workspaceContextService.getWorkspace().folders;
994
- if (!folders.length) {
995
- return;
996
- }
997
- linkToOpen = URI.joinPath(folders[0].uri, href);
998
- } else {
999
- linkToOpen = URI.joinPath(dirname(this.documentUri), href);
1000
- }
1001
- }
1002
- if (linkToOpen) {
1003
- if (fragment) {
1004
- linkToOpen = linkToOpen.with({
1005
- fragment
1006
- });
1007
- }
1008
- await this._openUri(linkToOpen);
1009
- }
1010
- }
1011
- async _openUri(uri) {
1012
- let lineNumber = undefined;
1013
- let column = undefined;
1014
- const lineCol = LINE_COLUMN_REGEX.exec(uri.path);
1015
- if (lineCol) {
1016
- uri = uri.with({
1017
- path: uri.path.slice(0, lineCol.index),
1018
- fragment: `L${lineCol[0].slice(1)}`
1019
- });
1020
- lineNumber = parseInt(lineCol[1], 10);
1021
- column = lineCol[2] ? parseInt(lineCol[2], 10) : 1;
1022
- }
1023
- const lineMatch = LineQueryRegex.exec(uri.query);
1024
- if (lineMatch) {
1025
- const parsedLineNumber = parseInt(lineMatch[1], 10);
1026
- if (!isNaN(parsedLineNumber)) {
1027
- lineNumber = parsedLineNumber + 1;
1028
- column = 1;
1029
- uri = uri.with({
1030
- fragment: `L${lineNumber}`
1031
- });
1032
- }
1033
- }
1034
- uri = uri.with({
1035
- query: null
1036
- });
1037
- const extractedSelection = extractSelection(uri);
1038
- const selection = lineNumber !== undefined && column !== undefined ? {
1039
- startLineNumber: lineNumber,
1040
- startColumn: column
1041
- } : extractedSelection.selection;
1042
- const resource = extractedSelection.uri;
1043
- if (!this.fileService.hasProvider(resource) || this.workspaceContextService.isInsideWorkspace(resource)) {
1044
- await this.openerService.open(uri, {
1045
- fromUserGesture: true,
1046
- fromWorkspace: true
1047
- });
1048
- return;
1049
- }
1050
- let match = undefined;
1051
- for (const group of this.editorGroupService.groups) {
1052
- const editorInput = group.editors.find(editor => editor.resource && isEqual(editor.resource, resource, true));
1053
- if (editorInput) {
1054
- match = {
1055
- group,
1056
- editor: editorInput
1057
- };
1058
- break;
1059
- }
1060
- }
1061
- const options = {
1062
- selection,
1063
- source: EditorOpenSource.USER
1064
- };
1065
- if (match) {
1066
- await this.editorService.openEditors([{
1067
- editor: match.editor,
1068
- options
1069
- }], match.group, {
1070
- validateTrust: true
1071
- });
1072
- } else {
1073
- await this.editorService.openEditors([{
1074
- resource,
1075
- options
1076
- }], undefined, {
1077
- validateTrust: true
1078
- });
1079
- }
1080
- }
1081
- _handleHighlightCodeBlock(codeBlocks) {
1082
- for (const {
1083
- id,
1084
- value,
1085
- lang
1086
- } of codeBlocks) {
1087
- const languageId = this.languageService.getLanguageIdByLanguageName(lang);
1088
- if (!languageId) {
1089
- continue;
1090
- }
1091
- tokenizeToString(this.languageService, value, languageId).then(html => {
1092
- if (this._disposed) {
1093
- return;
1094
- }
1095
- this._sendMessageToWebview({
1096
- type: "tokenizedCodeBlock",
1097
- html,
1098
- codeBlockId: id
1099
- });
1100
- });
1101
- }
1102
- }
1103
- async _onDidClickDataLink(event) {
1104
- if (typeof event.data !== "string") {
1105
- return;
1106
- }
1107
- const [splitStart, splitData] = event.data.split(";base64,");
1108
- if (!splitData || !splitStart) {
1109
- return;
1110
- }
1111
- const defaultDir = extname(this.documentUri) === ".interactive" ? this.workspaceContextService.getWorkspace().folders[0]?.uri ?? (await this.fileDialogService.defaultFilePath()) : dirname(this.documentUri);
1112
- let defaultName;
1113
- if (event.downloadName) {
1114
- defaultName = event.downloadName;
1115
- } else {
1116
- const mimeType = splitStart.replace(/^data:/, "");
1117
- const candidateExtension = mimeType && getExtensionForMimeType(mimeType);
1118
- defaultName = candidateExtension ? `download${candidateExtension}` : "download";
1119
- }
1120
- const defaultUri = joinPath(defaultDir, defaultName);
1121
- const newFileUri = await this.fileDialogService.showSaveDialog({
1122
- defaultUri
1123
- });
1124
- if (!newFileUri) {
1125
- return;
1126
- }
1127
- const buff = decodeBase64(splitData);
1128
- await this.fileService.writeFile(newFileUri, buff);
1129
- await this.openerService.open(newFileUri);
1130
- }
1131
- _createInset(webviewService, content) {
1132
- this.localResourceRootsCache = this._getResourceRootsCache();
1133
- const webview = webviewService.createWebviewElement({
1134
- origin: BackLayerWebView_1.getOriginStore(this.storageService).getOrigin(this.notebookViewType, undefined),
1135
- title: ( localize(14626, "Notebook webview content")),
1136
- options: {
1137
- purpose: WebviewContentPurpose.NotebookRenderer,
1138
- enableFindWidget: false,
1139
- transformCssVariables: transformWebviewThemeVars
1140
- },
1141
- contentOptions: {
1142
- allowMultipleAPIAcquire: true,
1143
- allowScripts: true,
1144
- forwardUntrustedKeypressEvents: false,
1145
- localResourceRoots: this.localResourceRootsCache
1146
- },
1147
- extension: undefined,
1148
- providedViewType: "notebook.output"
1149
- });
1150
- webview.setHtml(content);
1151
- webview.setContextKeyService(this.contextKeyService);
1152
- return webview;
1153
- }
1154
- _getResourceRootsCache() {
1155
- const workspaceFolders = ( this.contextService.getWorkspace().folders.map(x => x.uri));
1156
- const notebookDir = this.getNotebookBaseUri();
1157
- return [this.notebookService.getNotebookProviderResourceRoots(), ( this.notebookService.getRenderers().map(x => dirname(x.entrypoint.path))), ...Array.from(
1158
- this.notebookService.getStaticPreloads(this.notebookViewType),
1159
- x => [dirname(x.entrypoint), ...x.localResourceRoots]
1160
- ), workspaceFolders, notebookDir, this.getBuiltinLocalResourceRoots()].flat();
1161
- }
1162
- initializeWebViewState() {
1163
- this._preloadsCache.clear();
1164
- if (this._currentKernel) {
1165
- this._updatePreloadsFromKernel(this._currentKernel);
1166
- }
1167
- for (const [output, inset] of this.insetMapping.entries()) {
1168
- this._sendMessageToWebview({
1169
- ...inset.cachedCreation,
1170
- initiallyHidden: ( this.hiddenInsetMapping.has(output))
1171
- });
1172
- }
1173
- if (this.initializeMarkupPromise?.isFirstInit)
1174
- ; else {
1175
- const mdCells = [...( this.markupPreviewMapping.values())];
1176
- this.markupPreviewMapping.clear();
1177
- this.initializeMarkup(mdCells);
1178
- }
1179
- this._updateStyles();
1180
- this._updateOptions();
1181
- }
1182
- shouldUpdateInset(cell, output, cellTop, outputOffset) {
1183
- if (this._disposed) {
1184
- return false;
1185
- }
1186
- if ("isOutputCollapsed" in cell && cell.isOutputCollapsed) {
1187
- return false;
1188
- }
1189
- if (( this.hiddenInsetMapping.has(output))) {
1190
- return true;
1191
- }
1192
- const outputCache = this.insetMapping.get(output);
1193
- if (!outputCache) {
1194
- return false;
1195
- }
1196
- if (outputOffset === outputCache.cachedCreation.outputOffset && cellTop === outputCache.cachedCreation.cellTop) {
1197
- return false;
1198
- }
1199
- return true;
1200
- }
1201
- ackHeight(updates) {
1202
- this._sendMessageToWebview({
1203
- type: "ack-dimension",
1204
- updates
1205
- });
1206
- }
1207
- updateScrollTops(outputRequests, markupPreviews) {
1208
- if (this._disposed) {
1209
- return;
1210
- }
1211
- const widgets = coalesce(( outputRequests.map(request => {
1212
- const outputCache = this.insetMapping.get(request.output);
1213
- if (!outputCache) {
1214
- return;
1215
- }
1216
- if (!request.forceDisplay && !this.shouldUpdateInset(request.cell, request.output, request.cellTop, request.outputOffset)) {
1217
- return;
1218
- }
1219
- const id = outputCache.outputId;
1220
- outputCache.cachedCreation.cellTop = request.cellTop;
1221
- outputCache.cachedCreation.outputOffset = request.outputOffset;
1222
- this.hiddenInsetMapping.delete(request.output);
1223
- return {
1224
- cellId: request.cell.id,
1225
- outputId: id,
1226
- cellTop: request.cellTop,
1227
- outputOffset: request.outputOffset,
1228
- forceDisplay: request.forceDisplay
1229
- };
1230
- })));
1231
- if (!widgets.length && !markupPreviews.length) {
1232
- return;
1233
- }
1234
- this._sendMessageToWebview({
1235
- type: "view-scroll",
1236
- widgets: widgets,
1237
- markupCells: markupPreviews
1238
- });
1239
- }
1240
- async createMarkupPreview(initialization) {
1241
- if (this._disposed) {
1242
- return;
1243
- }
1244
- if (( this.markupPreviewMapping.has(initialization.cellId))) {
1245
- console.error("Trying to create markup preview that already exists");
1246
- return;
1247
- }
1248
- this.markupPreviewMapping.set(initialization.cellId, initialization);
1249
- this._sendMessageToWebview({
1250
- type: "createMarkupCell",
1251
- cell: initialization
1252
- });
1253
- }
1254
- async showMarkupPreview(newContent) {
1255
- if (this._disposed) {
1256
- return;
1257
- }
1258
- const entry = this.markupPreviewMapping.get(newContent.cellId);
1259
- if (!entry) {
1260
- return this.createMarkupPreview(newContent);
1261
- }
1262
- const sameContent = newContent.content === entry.content;
1263
- const sameMetadata = (equals(newContent.metadata, entry.metadata));
1264
- if (!sameContent || !sameMetadata || !entry.visible) {
1265
- this._sendMessageToWebview({
1266
- type: "showMarkupCell",
1267
- id: newContent.cellId,
1268
- handle: newContent.cellHandle,
1269
- content: sameContent ? undefined : newContent.content,
1270
- top: newContent.offset,
1271
- metadata: sameMetadata ? undefined : newContent.metadata
1272
- });
1273
- }
1274
- entry.metadata = newContent.metadata;
1275
- entry.content = newContent.content;
1276
- entry.offset = newContent.offset;
1277
- entry.visible = true;
1278
- }
1279
- async hideMarkupPreviews(cellIds) {
1280
- if (this._disposed) {
1281
- return;
1282
- }
1283
- const cellsToHide = [];
1284
- for (const cellId of cellIds) {
1285
- const entry = this.markupPreviewMapping.get(cellId);
1286
- if (entry) {
1287
- if (entry.visible) {
1288
- cellsToHide.push(cellId);
1289
- entry.visible = false;
1290
- }
1291
- }
1292
- }
1293
- if (cellsToHide.length) {
1294
- this._sendMessageToWebview({
1295
- type: "hideMarkupCells",
1296
- ids: cellsToHide
1297
- });
1298
- }
1299
- }
1300
- async unhideMarkupPreviews(cellIds) {
1301
- if (this._disposed) {
1302
- return;
1303
- }
1304
- const toUnhide = [];
1305
- for (const cellId of cellIds) {
1306
- const entry = this.markupPreviewMapping.get(cellId);
1307
- if (entry) {
1308
- if (!entry.visible) {
1309
- entry.visible = true;
1310
- toUnhide.push(cellId);
1311
- }
1312
- } else {
1313
- console.error(`Trying to unhide a preview that does not exist: ${cellId}`);
1314
- }
1315
- }
1316
- this._sendMessageToWebview({
1317
- type: "unhideMarkupCells",
1318
- ids: toUnhide
1319
- });
1320
- }
1321
- async deleteMarkupPreviews(cellIds) {
1322
- if (this._disposed) {
1323
- return;
1324
- }
1325
- for (const id of cellIds) {
1326
- if (!( this.markupPreviewMapping.has(id))) {
1327
- console.error(`Trying to delete a preview that does not exist: ${id}`);
1328
- }
1329
- this.markupPreviewMapping.delete(id);
1330
- }
1331
- if (cellIds.length) {
1332
- this._sendMessageToWebview({
1333
- type: "deleteMarkupCell",
1334
- ids: cellIds
1335
- });
1336
- }
1337
- }
1338
- async updateMarkupPreviewSelections(selectedCellsIds) {
1339
- if (this._disposed) {
1340
- return;
1341
- }
1342
- this._sendMessageToWebview({
1343
- type: "updateSelectedMarkupCells",
1344
- selectedCellIds: selectedCellsIds.filter(id => ( this.markupPreviewMapping.has(id)))
1345
- });
1346
- }
1347
- async initializeMarkup(cells) {
1348
- if (this._disposed) {
1349
- return;
1350
- }
1351
- this.initializeMarkupPromise?.p.complete();
1352
- const requestId = generateUuid();
1353
- this.initializeMarkupPromise = {
1354
- p: ( new DeferredPromise()),
1355
- requestId,
1356
- isFirstInit: this.firstInit
1357
- };
1358
- this.firstInit = false;
1359
- for (const cell of cells) {
1360
- this.markupPreviewMapping.set(cell.cellId, cell);
1361
- }
1362
- this._sendMessageToWebview({
1363
- type: "initializeMarkup",
1364
- cells,
1365
- requestId
1366
- });
1367
- return this.initializeMarkupPromise.p.p;
1368
- }
1369
- _cachedInsetEqual(cachedInset, content) {
1370
- if (content.type === RenderOutputType.Extension) {
1371
- return cachedInset.renderer?.id === content.renderer.id;
1372
- } else {
1373
- return cachedInset.cachedCreation.type === "html";
1374
- }
1375
- }
1376
- requestCreateOutputWhenWebviewIdle(cellInfo, content, cellTop, offset) {
1377
- if (this._disposed) {
1378
- return;
1379
- }
1380
- if (( this.insetMapping.has(content.source))) {
1381
- return;
1382
- }
1383
- if (( this.pendingWebviewIdleCreationRequest.has(content.source))) {
1384
- return;
1385
- }
1386
- if (( this.pendingWebviewIdleInsetMapping.has(content.source))) {
1387
- return;
1388
- }
1389
- this.pendingWebviewIdleCreationRequest.set(content.source, runWhenGlobalIdle(() => {
1390
- const {
1391
- message,
1392
- renderer,
1393
- transfer: transferable
1394
- } = this._createOutputCreationMessage(cellInfo, content, cellTop, offset, true, true);
1395
- this._sendMessageToWebview(message, transferable);
1396
- this.pendingWebviewIdleInsetMapping.set(content.source, {
1397
- outputId: message.outputId,
1398
- versionId: content.source.model.versionId,
1399
- cellInfo: cellInfo,
1400
- renderer,
1401
- cachedCreation: message
1402
- });
1403
- this.reversedPendingWebviewIdleInsetMapping.set(message.outputId, content.source);
1404
- this.pendingWebviewIdleCreationRequest.delete(content.source);
1405
- }));
1406
- }
1407
- createOutput(cellInfo, content, cellTop, offset) {
1408
- if (this._disposed) {
1409
- return;
1410
- }
1411
- const cachedInset = this.insetMapping.get(content.source);
1412
- this.pendingWebviewIdleCreationRequest.get(content.source)?.dispose();
1413
- this.pendingWebviewIdleCreationRequest.delete(content.source);
1414
- this.pendingWebviewIdleInsetMapping.delete(content.source);
1415
- if (cachedInset) {
1416
- this.reversedPendingWebviewIdleInsetMapping.delete(cachedInset.outputId);
1417
- }
1418
- if (cachedInset && this._cachedInsetEqual(cachedInset, content)) {
1419
- this.hiddenInsetMapping.delete(content.source);
1420
- this._sendMessageToWebview({
1421
- type: "showOutput",
1422
- cellId: cachedInset.cellInfo.cellId,
1423
- outputId: cachedInset.outputId,
1424
- cellTop: cellTop,
1425
- outputOffset: offset
1426
- });
1427
- return;
1428
- }
1429
- const {
1430
- message,
1431
- renderer,
1432
- transfer: transferable
1433
- } = this._createOutputCreationMessage(cellInfo, content, cellTop, offset, false, false);
1434
- this._sendMessageToWebview(message, transferable);
1435
- this.insetMapping.set(content.source, {
1436
- outputId: message.outputId,
1437
- versionId: content.source.model.versionId,
1438
- cellInfo: cellInfo,
1439
- renderer,
1440
- cachedCreation: message
1441
- });
1442
- this.hiddenInsetMapping.delete(content.source);
1443
- this.reversedInsetMapping.set(message.outputId, content.source);
1444
- }
1445
- createMetadata(output, mimeType) {
1446
- if (mimeType.startsWith("image")) {
1447
- const buffer = output.outputs.find(out => out.mime === "text/plain")?.data.buffer;
1448
- if (buffer?.length && buffer?.length > 0) {
1449
- const altText = ( new TextDecoder()).decode(buffer);
1450
- return {
1451
- ...output.metadata,
1452
- vscode_altText: altText
1453
- };
1454
- }
1455
- }
1456
- return output.metadata;
1457
- }
1458
- _createOutputCreationMessage(cellInfo, content, cellTop, offset, createOnIdle, initiallyHidden) {
1459
- const messageBase = {
1460
- type: "html",
1461
- executionId: cellInfo.executionId,
1462
- cellId: cellInfo.cellId,
1463
- cellTop: cellTop,
1464
- outputOffset: offset,
1465
- left: 0,
1466
- requiredPreloads: [],
1467
- createOnIdle: createOnIdle
1468
- };
1469
- const transfer = [];
1470
- let message;
1471
- let renderer;
1472
- if (content.type === RenderOutputType.Extension) {
1473
- const output = content.source.model;
1474
- renderer = content.renderer;
1475
- const first = output.outputs.find(op => op.mime === content.mimeType);
1476
- const metadata = this.createMetadata(output, content.mimeType);
1477
- const valueBytes = copyBufferIfNeeded(first.data.buffer, transfer);
1478
- message = {
1479
- ...messageBase,
1480
- outputId: output.outputId,
1481
- rendererId: content.renderer.id,
1482
- content: {
1483
- type: RenderOutputType.Extension,
1484
- outputId: output.outputId,
1485
- metadata: metadata,
1486
- output: {
1487
- mime: first.mime,
1488
- valueBytes
1489
- },
1490
- allOutputs: ( output.outputs.map(output => ({
1491
- mime: output.mime
1492
- })))
1493
- },
1494
- initiallyHidden: initiallyHidden
1495
- };
1496
- } else {
1497
- message = {
1498
- ...messageBase,
1499
- outputId: generateUuid(),
1500
- content: {
1501
- type: content.type,
1502
- htmlContent: content.htmlContent
1503
- },
1504
- initiallyHidden: initiallyHidden
1505
- };
1506
- }
1507
- return {
1508
- message,
1509
- renderer,
1510
- transfer
1511
- };
1512
- }
1513
- updateOutput(cellInfo, content, cellTop, offset) {
1514
- if (this._disposed) {
1515
- return;
1516
- }
1517
- if (!( this.insetMapping.has(content.source))) {
1518
- this.createOutput(cellInfo, content, cellTop, offset);
1519
- return;
1520
- }
1521
- const outputCache = this.insetMapping.get(content.source);
1522
- if (outputCache.versionId === content.source.model.versionId) {
1523
- return;
1524
- }
1525
- this.hiddenInsetMapping.delete(content.source);
1526
- let updatedContent = undefined;
1527
- const transfer = [];
1528
- if (content.type === RenderOutputType.Extension) {
1529
- const output = content.source.model;
1530
- const firstBuffer = output.outputs.find(op => op.mime === content.mimeType);
1531
- const appenededData = output.appendedSinceVersion(outputCache.versionId, content.mimeType);
1532
- const appended = appenededData ? {
1533
- valueBytes: appenededData.buffer,
1534
- previousVersion: outputCache.versionId
1535
- } : undefined;
1536
- const valueBytes = copyBufferIfNeeded(firstBuffer.data.buffer, transfer);
1537
- updatedContent = {
1538
- type: RenderOutputType.Extension,
1539
- outputId: outputCache.outputId,
1540
- metadata: output.metadata,
1541
- output: {
1542
- mime: content.mimeType,
1543
- valueBytes,
1544
- appended: appended
1545
- },
1546
- allOutputs: ( output.outputs.map(output => ({
1547
- mime: output.mime
1548
- })))
1549
- };
1550
- }
1551
- this._sendMessageToWebview({
1552
- type: "showOutput",
1553
- cellId: outputCache.cellInfo.cellId,
1554
- outputId: outputCache.outputId,
1555
- cellTop: cellTop,
1556
- outputOffset: offset,
1557
- content: updatedContent
1558
- }, transfer);
1559
- outputCache.versionId = content.source.model.versionId;
1560
- return;
1561
- }
1562
- async copyImage(output) {
1563
- const textAlternates = [];
1564
- const cellOutput = output.model;
1565
- for (const outputItem of cellOutput.outputs) {
1566
- if (TEXT_BASED_MIMETYPES.includes(outputItem.mime)) {
1567
- const text = isTextStreamMime(outputItem.mime) ? getOutputStreamText(output).text : getOutputText(outputItem.mime, outputItem);
1568
- textAlternates.push({
1569
- mimeType: outputItem.mime,
1570
- content: text
1571
- });
1572
- }
1573
- }
1574
- this._sendMessageToWebview({
1575
- type: "copyImage",
1576
- outputId: output.model.outputId,
1577
- altOutputId: output.model.alternativeOutputId,
1578
- textAlternates: textAlternates.length > 0 ? textAlternates : undefined
1579
- });
1580
- }
1581
- removeInsets(outputs) {
1582
- if (this._disposed) {
1583
- return;
1584
- }
1585
- for (const output of outputs) {
1586
- const outputCache = this.insetMapping.get(output);
1587
- if (!outputCache) {
1588
- continue;
1589
- }
1590
- const id = outputCache.outputId;
1591
- this._sendMessageToWebview({
1592
- type: "clearOutput",
1593
- rendererId: outputCache.cachedCreation.rendererId,
1594
- cellUri: ( outputCache.cellInfo.cellUri.toString()),
1595
- outputId: id,
1596
- cellId: outputCache.cellInfo.cellId
1597
- });
1598
- this.insetMapping.delete(output);
1599
- this.pendingWebviewIdleCreationRequest.get(output)?.dispose();
1600
- this.pendingWebviewIdleCreationRequest.delete(output);
1601
- this.pendingWebviewIdleInsetMapping.delete(output);
1602
- this.reversedPendingWebviewIdleInsetMapping.delete(id);
1603
- this.reversedInsetMapping.delete(id);
1604
- }
1605
- }
1606
- hideInset(output) {
1607
- if (this._disposed) {
1608
- return;
1609
- }
1610
- const outputCache = this.insetMapping.get(output);
1611
- if (!outputCache) {
1612
- return;
1613
- }
1614
- this.hiddenInsetMapping.add(output);
1615
- this._sendMessageToWebview({
1616
- type: "hideOutput",
1617
- outputId: outputCache.outputId,
1618
- cellId: outputCache.cellInfo.cellId
1619
- });
1620
- }
1621
- focusWebview() {
1622
- if (this._disposed) {
1623
- return;
1624
- }
1625
- this.webview?.focus();
1626
- }
1627
- selectOutputContents(cell) {
1628
- if (this._disposed) {
1629
- return;
1630
- }
1631
- const output = cell.outputsViewModels.find(o => o.model.outputId === cell.focusedOutputId);
1632
- const outputId = output ? this.insetMapping.get(output)?.outputId : undefined;
1633
- this._sendMessageToWebview({
1634
- type: "select-output-contents",
1635
- cellOrOutputId: outputId || cell.id
1636
- });
1637
- }
1638
- selectInputContents(cell) {
1639
- if (this._disposed) {
1640
- return;
1641
- }
1642
- const output = cell.outputsViewModels.find(o => o.model.outputId === cell.focusedOutputId);
1643
- const outputId = output ? this.insetMapping.get(output)?.outputId : undefined;
1644
- this._sendMessageToWebview({
1645
- type: "select-input-contents",
1646
- cellOrOutputId: outputId || cell.id
1647
- });
1648
- }
1649
- focusOutput(cellOrOutputId, alternateId, viewFocused) {
1650
- if (this._disposed) {
1651
- return;
1652
- }
1653
- if (!viewFocused) {
1654
- this.webview?.focus();
1655
- }
1656
- this._sendMessageToWebview({
1657
- type: "focus-output",
1658
- cellOrOutputId: cellOrOutputId,
1659
- alternateId: alternateId
1660
- });
1661
- }
1662
- blurOutput() {
1663
- if (this._disposed) {
1664
- return;
1665
- }
1666
- this._sendMessageToWebview({
1667
- type: "blur-output"
1668
- });
1669
- }
1670
- async find(query, options) {
1671
- if (query === "") {
1672
- this._sendMessageToWebview({
1673
- type: "findStop",
1674
- ownerID: options.ownerID
1675
- });
1676
- return [];
1677
- }
1678
- const p = ( new Promise(resolve => {
1679
- const sub = this.webview?.onMessage(e => {
1680
- if (e.message.type === "didFind") {
1681
- resolve(e.message.matches);
1682
- sub?.dispose();
1683
- }
1684
- });
1685
- }));
1686
- this._sendMessageToWebview({
1687
- type: "find",
1688
- query: query,
1689
- options
1690
- });
1691
- const ret = await p;
1692
- return ret;
1693
- }
1694
- findStop(ownerID) {
1695
- this._sendMessageToWebview({
1696
- type: "findStop",
1697
- ownerID
1698
- });
1699
- }
1700
- async findHighlightCurrent(index, ownerID) {
1701
- const p = ( new Promise(resolve => {
1702
- const sub = this.webview?.onMessage(e => {
1703
- if (e.message.type === "didFindHighlightCurrent") {
1704
- resolve(e.message.offset);
1705
- sub?.dispose();
1706
- }
1707
- });
1708
- }));
1709
- this._sendMessageToWebview({
1710
- type: "findHighlightCurrent",
1711
- index,
1712
- ownerID
1713
- });
1714
- const ret = await p;
1715
- return ret;
1716
- }
1717
- async findUnHighlightCurrent(index, ownerID) {
1718
- this._sendMessageToWebview({
1719
- type: "findUnHighlightCurrent",
1720
- index,
1721
- ownerID
1722
- });
1723
- }
1724
- deltaCellOutputContainerClassNames(cellId, added, removed) {
1725
- this._sendMessageToWebview({
1726
- type: "decorations",
1727
- cellId,
1728
- addedClassNames: added,
1729
- removedClassNames: removed
1730
- });
1731
- }
1732
- deltaMarkupPreviewClassNames(cellId, added, removed) {
1733
- if (this.markupPreviewMapping.get(cellId)) {
1734
- this._sendMessageToWebview({
1735
- type: "markupDecorations",
1736
- cellId,
1737
- addedClassNames: added,
1738
- removedClassNames: removed
1739
- });
1740
- }
1741
- }
1742
- updateOutputRenderers() {
1743
- if (!this.webview) {
1744
- return;
1745
- }
1746
- const renderersData = this.getRendererData();
1747
- this.localResourceRootsCache = this._getResourceRootsCache();
1748
- const mixedResourceRoots = [
1749
- ...(this.localResourceRootsCache || []),
1750
- ...(this._currentKernel ? [this._currentKernel.localResourceRoot] : [])
1751
- ];
1752
- this.webview.localResourcesRoot = mixedResourceRoots;
1753
- this._sendMessageToWebview({
1754
- type: "updateRenderers",
1755
- rendererData: renderersData
1756
- });
1757
- }
1758
- async updateKernelPreloads(kernel) {
1759
- if (this._disposed || kernel === this._currentKernel) {
1760
- return;
1761
- }
1762
- const previousKernel = this._currentKernel;
1763
- this._currentKernel = kernel;
1764
- if (previousKernel && previousKernel.preloadUris.length > 0) {
1765
- this.webview?.reload();
1766
- } else if (kernel) {
1767
- this._updatePreloadsFromKernel(kernel);
1768
- }
1769
- }
1770
- _updatePreloadsFromKernel(kernel) {
1771
- const resources = [];
1772
- for (const preload of kernel.preloadUris) {
1773
- const uri = this.environmentService.isExtensionDevelopment && (preload.scheme === "http" || preload.scheme === "https") ? preload : this.asWebviewUri(preload, undefined);
1774
- if (!( this._preloadsCache.has(( uri.toString())))) {
1775
- resources.push({
1776
- uri: ( uri.toString()),
1777
- originalUri: ( preload.toString())
1778
- });
1779
- this._preloadsCache.add(( uri.toString()));
1780
- }
1781
- }
1782
- if (!resources.length) {
1783
- return;
1784
- }
1785
- this._updatePreloads(resources);
1786
- }
1787
- _updatePreloads(resources) {
1788
- if (!this.webview) {
1789
- return;
1790
- }
1791
- const mixedResourceRoots = [
1792
- ...(this.localResourceRootsCache || []),
1793
- ...(this._currentKernel ? [this._currentKernel.localResourceRoot] : [])
1794
- ];
1795
- this.webview.localResourcesRoot = mixedResourceRoots;
1796
- this._sendMessageToWebview({
1797
- type: "preload",
1798
- resources: resources
1799
- });
1800
- }
1801
- _sendMessageToWebview(message, transfer) {
1802
- if (this._disposed) {
1803
- return;
1804
- }
1805
- this.webview?.postMessage(message, transfer);
1806
- }
1807
- dispose() {
1808
- this._disposed = true;
1809
- this.webview?.dispose();
1810
- this.webview = undefined;
1811
- this.notebookEditor = null;
1812
- this.insetMapping.clear();
1813
- this.pendingWebviewIdleCreationRequest.clear();
1814
- super.dispose();
1815
- }
1816
- };
1817
- BackLayerWebView = BackLayerWebView_1 = ( __decorate([( __param(6, IWebviewService)), ( __param(7, IOpenerService)), ( __param(8, INotebookService)), ( __param(9, IWorkspaceContextService)), ( __param(10, IWorkbenchEnvironmentService)), ( __param(11, IFileDialogService)), ( __param(12, IFileService)), ( __param(13, IContextMenuService)), ( __param(14, IContextKeyService)), ( __param(15, IWorkspaceTrustManagementService)), ( __param(16, IConfigurationService)), ( __param(17, ILanguageService)), ( __param(18, IWorkspaceContextService)), ( __param(19, IEditorGroupsService)), ( __param(20, IEditorService)), ( __param(21, IStorageService)), ( __param(22, IPathService)), ( __param(23, INotebookLoggingService)), ( __param(24, IThemeService)), ( __param(25, ITelemetryService))], BackLayerWebView));
1818
- function copyBufferIfNeeded(buffer, transfer) {
1819
- if (buffer.byteLength === buffer.buffer.byteLength) {
1820
- return buffer;
1821
- } else {
1822
- const valueBytes = ( new Uint8Array(buffer));
1823
- transfer.push(valueBytes.buffer);
1824
- return valueBytes;
1825
- }
1826
- }
1827
- function getTokenizationCss() {
1828
- const colorMap = TokenizationRegistry.getColorMap();
1829
- const tokenizationCss = colorMap ? generateTokensCSSForColorMap(colorMap) : "";
1830
- return tokenizationCss;
1831
- }
1832
- function tryDecodeURIComponent(uri) {
1833
- try {
1834
- return decodeURIComponent(uri);
1835
- } catch {
1836
- return uri;
1837
- }
1838
- }
1839
-
1840
- export { BackLayerWebView };