@codingame/monaco-vscode-api 1.85.0 → 1.85.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -13
- package/contributions.js +1 -0
- package/missing-services.js +396 -68
- package/monaco-editor-treemending.patch +957 -950
- package/package.json +8 -7
- package/service-override/tools/editor.js +1 -1
- package/services.js +10 -6
- package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +14 -0
- package/vscode/src/vs/base/common/jsonFormatter.js +8 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +128 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionEnablementService.js +140 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1062 -93
- package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.js +220 -0
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +58 -0
- package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +102 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +56 -1
- package/vscode/src/vs/platform/userDataSync/common/content.js +9 -0
- package/vscode/src/vs/platform/userDataSync/common/settingsMerge.js +514 -0
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +154 -2
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncAccount.js +43 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncMachines.js +177 -0
- package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostWebview.js +2 -2
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +186 -4
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +105 -0
- package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +1614 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +191 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +238 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +205 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +168 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +340 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +81 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +583 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +290 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +167 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +562 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +31 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +24 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +22 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +52 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +258 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +25 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +388 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +61 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +49 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +647 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +300 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +60 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +107 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +333 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +99 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +55 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +2 -0
- package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +20 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +855 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +410 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1591 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1485 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +125 -0
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +29 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +41 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +102 -0
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +73 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +988 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +431 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +417 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +806 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +915 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +19 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +129 -10
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +205 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +150 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +480 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +90 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +258 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +614 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +44 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +169 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +64 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard.js +49 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +120 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +416 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +663 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +593 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +72 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +326 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +539 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +265 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +348 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +95 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +437 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2730 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +139 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +564 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +119 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +135 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +178 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +35 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +377 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +97 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +194 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +71 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +85 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +652 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +59 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +303 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +228 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +302 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +438 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +45 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +435 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +95 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +107 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +59 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +430 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +54 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +1131 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +1591 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +341 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +2155 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +95 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +507 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +85 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +47 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +435 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +31 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +257 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +239 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +103 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +211 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +808 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +381 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +527 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +163 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +651 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +173 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +98 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +62 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +346 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +152 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +296 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +261 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKeymapService.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookLoggingService.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +16 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +66 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWorkerService.js +4 -0
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +130 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +847 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +89 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +1942 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +107 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +49 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +387 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/common/constants.js +66 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +24 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +95 -0
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +6 -6
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +12 -2
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +712 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +130 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +159 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +375 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +563 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +932 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +20 -1
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +205 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +11 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +9 -9
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +1 -1
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +2 -2
- package/vscode/src/vs/workbench/services/languageStatus/common/languageStatusService.js +24 -1
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +15 -1
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +41 -0
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +588 -0
- package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +43 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +2 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +190 -2
- package/vscode/src/vs/workbench/services/search/common/search.js +3 -3
- package/vscode/src/vs/workbench/services/terminal/common/embedderTerminalService.js +75 -1
- package/vscode/src/vs/workbench/services/timer/browser/timerService.js +240 -1
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +31 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +25 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +75 -1
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +74 -4
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +77 -0
- package/assets/break.mp3 +0 -0
- package/assets/chatRequestSent.mp3 +0 -0
- package/assets/chatResponsePending.mp3 +0 -0
- package/assets/chatResponseReceived1.mp3 +0 -0
- package/assets/chatResponseReceived2.mp3 +0 -0
- package/assets/chatResponseReceived3.mp3 +0 -0
- package/assets/chatResponseReceived4.mp3 +0 -0
- package/assets/clear.mp3 +0 -0
- package/assets/defaultIcon.png +0 -0
- package/assets/diffLineDeleted.mp3 +0 -0
- package/assets/diffLineInserted.mp3 +0 -0
- package/assets/diffLineModified.mp3 +0 -0
- package/assets/error.mp3 +0 -0
- package/assets/fake.html +0 -10
- package/assets/foldedAreas.mp3 +0 -0
- package/assets/format.mp3 +0 -0
- package/assets/index-no-csp.html +0 -1226
- package/assets/index.html +0 -1227
- package/assets/quickFixes.mp3 +0 -0
- package/assets/save.mp3 +0 -0
- package/assets/service-worker.js +0 -457
- package/assets/taskCompleted.mp3 +0 -0
- package/assets/taskFailed.mp3 +0 -0
- package/assets/terminalBell.mp3 +0 -0
- package/assets/warning.mp3 +0 -0
- package/assets/webWorkerExtensionHostIframe.html +0 -123
- package/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
- package/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2
- package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -5
- package/vscode/src/vs/base/parts/request/browser/request.js +0 -60
- package/vscode/src/vs/platform/request/browser/requestService.js +0 -28
- package/vscode/src/vs/platform/request/common/requestIpc.js +0 -17
- package/vscode/src/vs/platform/url/common/urlService.js +0 -17
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +0 -120
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +0 -319
- package/vscode/src/vs/workbench/services/files/browser/elevatedFileService.js +0 -9
- package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +0 -408
- package/vscode/src/vs/workbench/services/request/browser/requestService.js +0 -48
- package/vscode/src/vs/workbench/services/textfile/browser/browserTextFileService.js +0 -56
- package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +0 -639
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +0 -402
- package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +0 -62
- package/vscode/src/vs/workbench/services/themes/browser/browserHostColorSchemeService.js +0 -38
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +0 -295
- package/vscode/src/vs/workbench/services/url/browser/urlService.js +0 -47
- package/vscode/src/vs/workbench/services/views/common/treeViewsService.js +0 -20
- package/vscode/src/vs/workbench/services/workspaces/common/canonicalUriService.js +0 -19
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
3
|
+
import { toAction } from 'monaco-editor/esm/vs/base/common/actions.js';
|
|
4
|
+
import { timeout } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
5
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
6
|
+
import { DisposableStore, MutableDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
7
|
+
import { extname, isEqual } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
8
|
+
import { generateUuid } from 'monaco-editor/esm/vs/base/common/uuid.js';
|
|
9
|
+
import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
10
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
11
|
+
import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
12
|
+
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
13
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
14
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
15
|
+
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
16
|
+
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
17
|
+
import { EditorPane } from '../../../browser/parts/editor/editorPane.js';
|
|
18
|
+
import { createEditorOpenError, DEFAULT_EDITOR_ASSOCIATION, isEditorOpenError, EditorResourceAccessor } from '../../../common/editor.js';
|
|
19
|
+
import { SELECT_KERNEL_ID } from './controller/coreActions.js';
|
|
20
|
+
import { INotebookEditorService } from './services/notebookEditorService.js';
|
|
21
|
+
import { NotebooKernelActionViewItem } from './viewParts/notebookKernelView.js';
|
|
22
|
+
import { NOTEBOOK_EDITOR_ID, NotebookWorkingCopyTypeIdentifier } from '../common/notebookCommon.js';
|
|
23
|
+
import { NotebookEditorInput } from '../common/notebookEditorInput.js';
|
|
24
|
+
import { NotebookPerfMarks } from '../common/notebookPerformance.js';
|
|
25
|
+
import { IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.js';
|
|
26
|
+
import { IEditorService } from '../../../services/editor/common/editorService.js';
|
|
27
|
+
import { IEditorProgressService } from 'monaco-editor/esm/vs/platform/progress/common/progress.js';
|
|
28
|
+
import { InstallRecommendedExtensionAction } from '../../extensions/browser/extensionsActions.js';
|
|
29
|
+
import { INotebookService } from '../common/notebookService.js';
|
|
30
|
+
import { IExtensionsWorkbenchService } from '../../extensions/common/extensions.js';
|
|
31
|
+
import { IWorkingCopyBackupService } from '../../../services/workingCopy/common/workingCopyBackup.js';
|
|
32
|
+
import { streamToBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
33
|
+
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
34
|
+
import { INotebookEditorWorkerService } from '../common/services/notebookWorkerService.js';
|
|
35
|
+
var NotebookEditor_1;
|
|
36
|
+
const NOTEBOOK_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'NotebookEditorViewState';
|
|
37
|
+
let NotebookEditor = class NotebookEditor extends EditorPane {
|
|
38
|
+
static { NotebookEditor_1 = this; }
|
|
39
|
+
static { this.ID = NOTEBOOK_EDITOR_ID; }
|
|
40
|
+
get onDidFocus() { return this._onDidFocusWidget.event; }
|
|
41
|
+
get onDidBlur() { return this._onDidBlurWidget.event; }
|
|
42
|
+
constructor(telemetryService, themeService, _instantiationService, storageService, _editorService, _editorGroupService, _notebookWidgetService, _contextKeyService, _fileService, configurationService, _editorProgressService, _notebookService, _extensionsWorkbenchService, _workingCopyBackupService, logService, _notebookEditorWorkerService) {
|
|
43
|
+
super(NotebookEditor_1.ID, telemetryService, themeService, storageService);
|
|
44
|
+
this._instantiationService = _instantiationService;
|
|
45
|
+
this._editorService = _editorService;
|
|
46
|
+
this._editorGroupService = _editorGroupService;
|
|
47
|
+
this._notebookWidgetService = _notebookWidgetService;
|
|
48
|
+
this._contextKeyService = _contextKeyService;
|
|
49
|
+
this._fileService = _fileService;
|
|
50
|
+
this._editorProgressService = _editorProgressService;
|
|
51
|
+
this._notebookService = _notebookService;
|
|
52
|
+
this._extensionsWorkbenchService = _extensionsWorkbenchService;
|
|
53
|
+
this._workingCopyBackupService = _workingCopyBackupService;
|
|
54
|
+
this.logService = logService;
|
|
55
|
+
this._notebookEditorWorkerService = _notebookEditorWorkerService;
|
|
56
|
+
this._groupListener = this._register(( new DisposableStore()));
|
|
57
|
+
this._widgetDisposableStore = this._register(( new DisposableStore()));
|
|
58
|
+
this._widget = { value: undefined };
|
|
59
|
+
this._inputListener = this._register(( new MutableDisposable()));
|
|
60
|
+
this._onDidFocusWidget = this._register(( new Emitter()));
|
|
61
|
+
this._onDidBlurWidget = this._register(( new Emitter()));
|
|
62
|
+
this._onDidChangeModel = this._register(( new Emitter()));
|
|
63
|
+
this.onDidChangeModel = this._onDidChangeModel.event;
|
|
64
|
+
this._onDidChangeSelection = this._register(( new Emitter()));
|
|
65
|
+
this.onDidChangeSelection = this._onDidChangeSelection.event;
|
|
66
|
+
this._editorMemento = this.getEditorMemento(_editorGroupService, configurationService, NOTEBOOK_EDITOR_VIEW_STATE_PREFERENCE_KEY);
|
|
67
|
+
this._register(this._fileService.onDidChangeFileSystemProviderCapabilities(e => this._onDidChangeFileSystemProvider(e.scheme)));
|
|
68
|
+
this._register(this._fileService.onDidChangeFileSystemProviderRegistrations(e => this._onDidChangeFileSystemProvider(e.scheme)));
|
|
69
|
+
}
|
|
70
|
+
_onDidChangeFileSystemProvider(scheme) {
|
|
71
|
+
if (this.input instanceof NotebookEditorInput && this.input.resource?.scheme === scheme) {
|
|
72
|
+
this._updateReadonly(this.input);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
_onDidChangeInputCapabilities(input) {
|
|
76
|
+
if (this.input === input) {
|
|
77
|
+
this._updateReadonly(input);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
_updateReadonly(input) {
|
|
81
|
+
this._widget.value?.setOptions({ isReadOnly: !!input.isReadonly() });
|
|
82
|
+
}
|
|
83
|
+
get textModel() {
|
|
84
|
+
return this._widget.value?.textModel;
|
|
85
|
+
}
|
|
86
|
+
get minimumWidth() { return 220; }
|
|
87
|
+
get maximumWidth() { return Number.POSITIVE_INFINITY; }
|
|
88
|
+
set minimumWidth(value) { }
|
|
89
|
+
set maximumWidth(value) { }
|
|
90
|
+
get scopedContextKeyService() {
|
|
91
|
+
return this._widget.value?.scopedContextKeyService;
|
|
92
|
+
}
|
|
93
|
+
createEditor(parent) {
|
|
94
|
+
this._rootElement = dom.append(parent, dom.$('.notebook-editor'));
|
|
95
|
+
this._rootElement.id = `notebook-editor-element-${generateUuid()}`;
|
|
96
|
+
}
|
|
97
|
+
getActionViewItem(action) {
|
|
98
|
+
if (action.id === SELECT_KERNEL_ID) {
|
|
99
|
+
return this._instantiationService.createInstance(NotebooKernelActionViewItem, action, this);
|
|
100
|
+
}
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
103
|
+
getControl() {
|
|
104
|
+
return this._widget.value;
|
|
105
|
+
}
|
|
106
|
+
setEditorVisible(visible, group) {
|
|
107
|
+
super.setEditorVisible(visible, group);
|
|
108
|
+
if (group) {
|
|
109
|
+
this._groupListener.clear();
|
|
110
|
+
this._groupListener.add(group.onWillCloseEditor(e => this._saveEditorViewState(e.editor)));
|
|
111
|
+
this._groupListener.add(group.onDidModelChange(() => {
|
|
112
|
+
if (this._editorGroupService.activeGroup !== group) {
|
|
113
|
+
this._widget?.value?.updateEditorFocus();
|
|
114
|
+
}
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
if (!visible) {
|
|
118
|
+
this._saveEditorViewState(this.input);
|
|
119
|
+
if (this.input && this._widget.value) {
|
|
120
|
+
this._widget.value.onWillHide();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
focus() {
|
|
125
|
+
super.focus();
|
|
126
|
+
this._widget.value?.focus();
|
|
127
|
+
}
|
|
128
|
+
hasFocus() {
|
|
129
|
+
const value = this._widget.value;
|
|
130
|
+
if (!value) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
return !!value && (dom.isAncestorOfActiveElement(value.getDomNode() || dom.isAncestorOfActiveElement(value.getOverflowContainerDomNode())));
|
|
134
|
+
}
|
|
135
|
+
async setInput(input, options, context, token, noRetry) {
|
|
136
|
+
try {
|
|
137
|
+
let perfMarksCaptured = false;
|
|
138
|
+
const fileOpenMonitor = timeout(10000);
|
|
139
|
+
fileOpenMonitor.then(() => {
|
|
140
|
+
perfMarksCaptured = true;
|
|
141
|
+
this._handlePerfMark(perf, input);
|
|
142
|
+
});
|
|
143
|
+
const perf = ( new NotebookPerfMarks());
|
|
144
|
+
perf.mark('startTime');
|
|
145
|
+
const group = this.group;
|
|
146
|
+
this._inputListener.value = input.onDidChangeCapabilities(() => this._onDidChangeInputCapabilities(input));
|
|
147
|
+
this._widgetDisposableStore.clear();
|
|
148
|
+
this._widget.value?.onWillHide();
|
|
149
|
+
this._widget = this._instantiationService.invokeFunction(this._notebookWidgetService.retrieveWidget, group, input, undefined, this._pagePosition?.dimension);
|
|
150
|
+
if (this._rootElement && this._widget.value.getDomNode()) {
|
|
151
|
+
this._rootElement.setAttribute('aria-flowto', this._widget.value.getDomNode().id || '');
|
|
152
|
+
dom.setParentFlowTo(this._widget.value.getDomNode(), this._rootElement);
|
|
153
|
+
}
|
|
154
|
+
this._widgetDisposableStore.add(this._widget.value.onDidChangeModel(() => this._onDidChangeModel.fire()));
|
|
155
|
+
this._widgetDisposableStore.add(this._widget.value.onDidChangeActiveCell(() => this._onDidChangeSelection.fire({ reason: 2 })));
|
|
156
|
+
if (this._pagePosition) {
|
|
157
|
+
this._widget.value.layout(this._pagePosition.dimension, this._rootElement, this._pagePosition.position);
|
|
158
|
+
}
|
|
159
|
+
await super.setInput(input, options, context, token);
|
|
160
|
+
const model = await input.resolve(options, perf);
|
|
161
|
+
perf.mark('inputLoaded');
|
|
162
|
+
if (token.isCancellationRequested) {
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
if (!this._widget.value) {
|
|
166
|
+
if (noRetry) {
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
return this.setInput(input, options, context, token, true);
|
|
170
|
+
}
|
|
171
|
+
if (model === null) {
|
|
172
|
+
const knownProvider = this._notebookService.getViewTypeProvider(input.viewType);
|
|
173
|
+
if (!knownProvider) {
|
|
174
|
+
throw new Error(localizeWithPath('vs/workbench/contrib/notebook/browser/notebookEditor', 'fail.noEditor', "Cannot open resource with notebook editor type '{0}', please check if you have the right extension installed and enabled.", input.viewType));
|
|
175
|
+
}
|
|
176
|
+
await this._extensionsWorkbenchService.whenInitialized;
|
|
177
|
+
const extensionInfo = this._extensionsWorkbenchService.local.find(e => e.identifier.id === knownProvider);
|
|
178
|
+
throw createEditorOpenError(new Error(localizeWithPath('vs/workbench/contrib/notebook/browser/notebookEditor', 'fail.noEditor.extensionMissing', "Cannot open resource with notebook editor type '{0}', please check if you have the right extension installed and enabled.", input.viewType)), [
|
|
179
|
+
toAction({
|
|
180
|
+
id: 'workbench.notebook.action.installOrEnableMissing', label: extensionInfo
|
|
181
|
+
? localizeWithPath('vs/workbench/contrib/notebook/browser/notebookEditor', 'notebookOpenEnableMissingViewType', "Enable extension for '{0}'", input.viewType)
|
|
182
|
+
: localizeWithPath('vs/workbench/contrib/notebook/browser/notebookEditor', 'notebookOpenInstallMissingViewType', "Install extension for '{0}'", input.viewType),
|
|
183
|
+
run: async () => {
|
|
184
|
+
const d = this._notebookService.onAddViewType(viewType => {
|
|
185
|
+
if (viewType === input.viewType) {
|
|
186
|
+
this._editorService.openEditor({ resource: input.resource });
|
|
187
|
+
d.dispose();
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
const extensionInfo = this._extensionsWorkbenchService.local.find(e => e.identifier.id === knownProvider);
|
|
191
|
+
try {
|
|
192
|
+
if (extensionInfo) {
|
|
193
|
+
await this._extensionsWorkbenchService.setEnablement(extensionInfo, extensionInfo.enablementState === 7 ? 9 : 8 );
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
await this._instantiationService.createInstance(InstallRecommendedExtensionAction, knownProvider).run();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
catch (ex) {
|
|
200
|
+
this.logService.error(`Failed to install or enable extension ${knownProvider}`, ex);
|
|
201
|
+
d.dispose();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}),
|
|
205
|
+
toAction({
|
|
206
|
+
id: 'workbench.notebook.action.openAsText', label: localizeWithPath('vs/workbench/contrib/notebook/browser/notebookEditor', 'notebookOpenAsText', "Open As Text"), run: async () => {
|
|
207
|
+
const backup = await this._workingCopyBackupService.resolve({ resource: input.resource, typeId: NotebookWorkingCopyTypeIdentifier.create(input.viewType) });
|
|
208
|
+
if (backup) {
|
|
209
|
+
const contents = await streamToBuffer(backup.value);
|
|
210
|
+
this._editorService.openEditor({ resource: undefined, contents: contents.toString() });
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
this._editorService.openEditor({ resource: input.resource, options: { override: DEFAULT_EDITOR_ASSOCIATION.id, pinned: true } });
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
})
|
|
217
|
+
], { allowDialog: true });
|
|
218
|
+
}
|
|
219
|
+
this._widgetDisposableStore.add(model.notebook.onDidChangeContent(() => this._onDidChangeSelection.fire({ reason: 3 })));
|
|
220
|
+
const viewState = options?.viewState ?? this._loadNotebookEditorViewState(input);
|
|
221
|
+
this._widget.value.setParentContextKeyService(this._contextKeyService);
|
|
222
|
+
this._widget.value.setEditorProgressService(this._editorProgressService);
|
|
223
|
+
await this._widget.value.setModel(model.notebook, viewState, perf);
|
|
224
|
+
const isReadOnly = !!input.isReadonly();
|
|
225
|
+
await this._widget.value.setOptions({ ...options, isReadOnly });
|
|
226
|
+
this._widgetDisposableStore.add(this._widget.value.onDidFocusWidget(() => this._onDidFocusWidget.fire()));
|
|
227
|
+
this._widgetDisposableStore.add(this._widget.value.onDidBlurWidget(() => this._onDidBlurWidget.fire()));
|
|
228
|
+
this._widgetDisposableStore.add(this._editorGroupService.createEditorDropTarget(this._widget.value.getDomNode(), {
|
|
229
|
+
containsGroup: (group) => this.group?.id === group.id
|
|
230
|
+
}));
|
|
231
|
+
perf.mark('editorLoaded');
|
|
232
|
+
fileOpenMonitor.cancel();
|
|
233
|
+
if (perfMarksCaptured) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
this._handlePerfMark(perf, input);
|
|
237
|
+
this._handlePromptRecommendations(model.notebook);
|
|
238
|
+
}
|
|
239
|
+
catch (e) {
|
|
240
|
+
this.logService.warn('NotebookEditorWidget#setInput failed', e);
|
|
241
|
+
if (isEditorOpenError(e)) {
|
|
242
|
+
throw e;
|
|
243
|
+
}
|
|
244
|
+
const error = createEditorOpenError(e instanceof Error ? e : ( new Error((e ? e.message : ''))), [
|
|
245
|
+
toAction({
|
|
246
|
+
id: 'workbench.notebook.action.openInTextEditor', label: ( localizeWithPath(
|
|
247
|
+
'vs/workbench/contrib/notebook/browser/notebookEditor',
|
|
248
|
+
'notebookOpenInTextEditor',
|
|
249
|
+
"Open in Text Editor"
|
|
250
|
+
)), run: async () => {
|
|
251
|
+
const activeEditorPane = this._editorService.activeEditorPane;
|
|
252
|
+
if (!activeEditorPane) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const activeEditorResource = EditorResourceAccessor.getCanonicalUri(activeEditorPane.input);
|
|
256
|
+
if (!activeEditorResource) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
if (( activeEditorResource.toString()) === input.resource?.toString()) {
|
|
260
|
+
return this._editorService.openEditor({
|
|
261
|
+
resource: activeEditorResource,
|
|
262
|
+
options: {
|
|
263
|
+
override: DEFAULT_EDITOR_ASSOCIATION.id,
|
|
264
|
+
pinned: true
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
})
|
|
271
|
+
], { allowDialog: true });
|
|
272
|
+
throw error;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
_handlePerfMark(perf, input) {
|
|
276
|
+
const perfMarks = perf.value;
|
|
277
|
+
const startTime = perfMarks['startTime'];
|
|
278
|
+
const extensionActivated = perfMarks['extensionActivated'];
|
|
279
|
+
const inputLoaded = perfMarks['inputLoaded'];
|
|
280
|
+
const customMarkdownLoaded = perfMarks['customMarkdownLoaded'];
|
|
281
|
+
const editorLoaded = perfMarks['editorLoaded'];
|
|
282
|
+
let extensionActivationTimespan = -1;
|
|
283
|
+
let inputLoadingTimespan = -1;
|
|
284
|
+
let webviewCommLoadingTimespan = -1;
|
|
285
|
+
let customMarkdownLoadingTimespan = -1;
|
|
286
|
+
let editorLoadingTimespan = -1;
|
|
287
|
+
if (startTime !== undefined && extensionActivated !== undefined) {
|
|
288
|
+
extensionActivationTimespan = extensionActivated - startTime;
|
|
289
|
+
if (inputLoaded !== undefined) {
|
|
290
|
+
inputLoadingTimespan = inputLoaded - extensionActivated;
|
|
291
|
+
webviewCommLoadingTimespan = inputLoaded - extensionActivated;
|
|
292
|
+
}
|
|
293
|
+
if (customMarkdownLoaded !== undefined) {
|
|
294
|
+
customMarkdownLoadingTimespan = customMarkdownLoaded - startTime;
|
|
295
|
+
}
|
|
296
|
+
if (editorLoaded !== undefined) {
|
|
297
|
+
editorLoadingTimespan = editorLoaded - startTime;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
this.telemetryService.publicLog2('notebook/editorOpenPerf', {
|
|
301
|
+
scheme: input.resource.scheme,
|
|
302
|
+
ext: extname(input.resource),
|
|
303
|
+
viewType: input.viewType,
|
|
304
|
+
extensionActivated: extensionActivationTimespan,
|
|
305
|
+
inputLoaded: inputLoadingTimespan,
|
|
306
|
+
webviewCommLoaded: webviewCommLoadingTimespan,
|
|
307
|
+
customMarkdownLoaded: customMarkdownLoadingTimespan,
|
|
308
|
+
editorLoaded: editorLoadingTimespan
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
_handlePromptRecommendations(model) {
|
|
312
|
+
this._notebookEditorWorkerService.canPromptRecommendation(model.uri).then(shouldPrompt => {
|
|
313
|
+
this.telemetryService.publicLog2('notebook/shouldPromptRecommendation', {
|
|
314
|
+
shouldPrompt: shouldPrompt
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
clearInput() {
|
|
319
|
+
this._inputListener.clear();
|
|
320
|
+
if (this._widget.value) {
|
|
321
|
+
this._saveEditorViewState(this.input);
|
|
322
|
+
this._widget.value.onWillHide();
|
|
323
|
+
}
|
|
324
|
+
super.clearInput();
|
|
325
|
+
}
|
|
326
|
+
setOptions(options) {
|
|
327
|
+
this._widget.value?.setOptions(options);
|
|
328
|
+
super.setOptions(options);
|
|
329
|
+
}
|
|
330
|
+
saveState() {
|
|
331
|
+
this._saveEditorViewState(this.input);
|
|
332
|
+
super.saveState();
|
|
333
|
+
}
|
|
334
|
+
getViewState() {
|
|
335
|
+
const input = this.input;
|
|
336
|
+
if (!(input instanceof NotebookEditorInput)) {
|
|
337
|
+
return undefined;
|
|
338
|
+
}
|
|
339
|
+
this._saveEditorViewState(input);
|
|
340
|
+
return this._loadNotebookEditorViewState(input);
|
|
341
|
+
}
|
|
342
|
+
getSelection() {
|
|
343
|
+
if (this._widget.value) {
|
|
344
|
+
const activeCell = this._widget.value.getActiveCell();
|
|
345
|
+
if (activeCell) {
|
|
346
|
+
const cellUri = activeCell.uri;
|
|
347
|
+
return ( new NotebookEditorSelection(cellUri, activeCell.getSelections()));
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return undefined;
|
|
351
|
+
}
|
|
352
|
+
_saveEditorViewState(input) {
|
|
353
|
+
if (this.group && this._widget.value && input instanceof NotebookEditorInput) {
|
|
354
|
+
if (this._widget.value.isDisposed) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
const state = this._widget.value.getEditorViewState();
|
|
358
|
+
this._editorMemento.saveEditorState(this.group, input.resource, state);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
_loadNotebookEditorViewState(input) {
|
|
362
|
+
let result;
|
|
363
|
+
if (this.group) {
|
|
364
|
+
result = this._editorMemento.loadEditorState(this.group, input.resource);
|
|
365
|
+
}
|
|
366
|
+
if (result) {
|
|
367
|
+
return result;
|
|
368
|
+
}
|
|
369
|
+
for (const group of this._editorGroupService.getGroups(1 )) {
|
|
370
|
+
if (group.activeEditorPane !== this && group.activeEditorPane instanceof NotebookEditor_1 && group.activeEditor?.matches(input)) {
|
|
371
|
+
return group.activeEditorPane._widget.value?.getEditorViewState();
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
layout(dimension, position) {
|
|
377
|
+
this._rootElement.classList.toggle('mid-width', dimension.width < 1000 && dimension.width >= 600);
|
|
378
|
+
this._rootElement.classList.toggle('narrow-width', dimension.width < 600);
|
|
379
|
+
this._pagePosition = { dimension, position };
|
|
380
|
+
if (!this._widget.value || !(this._input instanceof NotebookEditorInput)) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
if (( this._input.resource.toString()) !== this.textModel?.uri.toString() && this._widget.value?.hasModel()) {
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
this._widget.value.layout(dimension, this._rootElement, position);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
NotebookEditor = NotebookEditor_1 = ( __decorate([
|
|
390
|
+
( __param(0, ITelemetryService)),
|
|
391
|
+
( __param(1, IThemeService)),
|
|
392
|
+
( __param(2, IInstantiationService)),
|
|
393
|
+
( __param(3, IStorageService)),
|
|
394
|
+
( __param(4, IEditorService)),
|
|
395
|
+
( __param(5, IEditorGroupsService)),
|
|
396
|
+
( __param(6, INotebookEditorService)),
|
|
397
|
+
( __param(7, IContextKeyService)),
|
|
398
|
+
( __param(8, IFileService)),
|
|
399
|
+
( __param(9, ITextResourceConfigurationService)),
|
|
400
|
+
( __param(10, IEditorProgressService)),
|
|
401
|
+
( __param(11, INotebookService)),
|
|
402
|
+
( __param(12, IExtensionsWorkbenchService)),
|
|
403
|
+
( __param(13, IWorkingCopyBackupService)),
|
|
404
|
+
( __param(14, ILogService)),
|
|
405
|
+
( __param(15, INotebookEditorWorkerService))
|
|
406
|
+
], NotebookEditor));
|
|
407
|
+
class NotebookEditorSelection {
|
|
408
|
+
constructor(cellUri, selections) {
|
|
409
|
+
this.cellUri = cellUri;
|
|
410
|
+
this.selections = selections;
|
|
411
|
+
}
|
|
412
|
+
compare(other) {
|
|
413
|
+
if (!(other instanceof NotebookEditorSelection)) {
|
|
414
|
+
return 3 ;
|
|
415
|
+
}
|
|
416
|
+
if (isEqual(this.cellUri, other.cellUri)) {
|
|
417
|
+
return 1 ;
|
|
418
|
+
}
|
|
419
|
+
return 3 ;
|
|
420
|
+
}
|
|
421
|
+
restore(options) {
|
|
422
|
+
const notebookOptions = {
|
|
423
|
+
cellOptions: {
|
|
424
|
+
resource: this.cellUri,
|
|
425
|
+
options: {
|
|
426
|
+
selection: this.selections[0]
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
Object.assign(notebookOptions, options);
|
|
431
|
+
return notebookOptions;
|
|
432
|
+
}
|
|
433
|
+
log() {
|
|
434
|
+
return this.cellUri.fragment;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
export { NotebookEditor };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
class EditorContributionRegistry {
|
|
2
|
+
static { this.INSTANCE = ( new EditorContributionRegistry()); }
|
|
3
|
+
constructor() {
|
|
4
|
+
this.editorContributions = [];
|
|
5
|
+
}
|
|
6
|
+
registerEditorContribution(id, ctor) {
|
|
7
|
+
this.editorContributions.push({ id, ctor: ctor });
|
|
8
|
+
}
|
|
9
|
+
getEditorContributions() {
|
|
10
|
+
return this.editorContributions.slice(0);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function registerNotebookContribution(id, ctor) {
|
|
14
|
+
EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor);
|
|
15
|
+
}
|
|
16
|
+
var NotebookEditorExtensionsRegistry;
|
|
17
|
+
( (function(NotebookEditorExtensionsRegistry) {
|
|
18
|
+
function getEditorContributions() {
|
|
19
|
+
return EditorContributionRegistry.INSTANCE.getEditorContributions();
|
|
20
|
+
}
|
|
21
|
+
NotebookEditorExtensionsRegistry.getEditorContributions = getEditorContributions;
|
|
22
|
+
function getSomeEditorContributions(ids) {
|
|
23
|
+
return EditorContributionRegistry.INSTANCE.getEditorContributions().filter(c => ids.indexOf(c.id) >= 0);
|
|
24
|
+
}
|
|
25
|
+
NotebookEditorExtensionsRegistry.getSomeEditorContributions = getSomeEditorContributions;
|
|
26
|
+
})(
|
|
27
|
+
NotebookEditorExtensionsRegistry || (NotebookEditorExtensionsRegistry = {})
|
|
28
|
+
));
|
|
29
|
+
export { NotebookEditorExtensionsRegistry, registerNotebookContribution };
|