@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,296 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import * as glob from 'monaco-editor/esm/vs/base/common/glob.js';
|
|
3
|
+
import { SimpleNotebookProviderInfo, INotebookService } from './notebookService.js';
|
|
4
|
+
import { joinPath, isEqual } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
5
|
+
import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
6
|
+
import { INotebookEditorModelResolverService } from './notebookEditorModelResolverService.js';
|
|
7
|
+
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
8
|
+
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
9
|
+
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
10
|
+
import { AbstractResourceEditorInput } from '../../../common/editor/resourceEditorInput.js';
|
|
11
|
+
import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
12
|
+
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
13
|
+
import { IFilesConfigurationService } from '../../../services/filesConfiguration/common/filesConfigurationService.js';
|
|
14
|
+
import { IExtensionService } from '../../../services/extensions/common/extensions.js';
|
|
15
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
16
|
+
import { IEditorService } from '../../../services/editor/common/editorService.js';
|
|
17
|
+
import { IFileDialogService } from '../../../../platform/dialogs/common/dialogs.js';
|
|
18
|
+
var NotebookEditorInput_1;
|
|
19
|
+
let NotebookEditorInput = class NotebookEditorInput extends AbstractResourceEditorInput {
|
|
20
|
+
static { NotebookEditorInput_1 = this; }
|
|
21
|
+
static { this.EditorCache = {}; }
|
|
22
|
+
static getOrCreate(instantiationService, resource, preferredResource, viewType, options = {}) {
|
|
23
|
+
const cacheId = `${( resource.toString())}|${viewType}|${options._workingCopy?.typeId}`;
|
|
24
|
+
let editor = NotebookEditorInput_1.EditorCache[cacheId];
|
|
25
|
+
if (!editor) {
|
|
26
|
+
editor = instantiationService.createInstance(NotebookEditorInput_1, resource, preferredResource, viewType, options);
|
|
27
|
+
NotebookEditorInput_1.EditorCache[cacheId] = editor;
|
|
28
|
+
editor.onWillDispose(() => {
|
|
29
|
+
delete NotebookEditorInput_1.EditorCache[cacheId];
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
else if (preferredResource) {
|
|
33
|
+
editor.setPreferredResource(preferredResource);
|
|
34
|
+
}
|
|
35
|
+
return editor;
|
|
36
|
+
}
|
|
37
|
+
static { this.ID = 'workbench.input.notebook'; }
|
|
38
|
+
constructor(resource, preferredResource, viewType, options, _notebookService, _notebookModelResolverService, _fileDialogService, labelService, fileService, filesConfigurationService, extensionService, editorService) {
|
|
39
|
+
super(resource, preferredResource, labelService, fileService, filesConfigurationService);
|
|
40
|
+
this.viewType = viewType;
|
|
41
|
+
this.options = options;
|
|
42
|
+
this._notebookService = _notebookService;
|
|
43
|
+
this._notebookModelResolverService = _notebookModelResolverService;
|
|
44
|
+
this._fileDialogService = _fileDialogService;
|
|
45
|
+
this._editorModelReference = null;
|
|
46
|
+
this._defaultDirtyState = false;
|
|
47
|
+
this._defaultDirtyState = !!options.startDirty;
|
|
48
|
+
this._sideLoadedListener = _notebookService.onDidAddNotebookDocument(e => {
|
|
49
|
+
if (e.viewType === this.viewType && ( e.uri.toString()) === ( this.resource.toString())) {
|
|
50
|
+
this.resolve().catch(onUnexpectedError);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
this._register(extensionService.onWillStop(e => {
|
|
54
|
+
if (!this.isDirty()) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
e.veto((async () => {
|
|
58
|
+
const editors = editorService.findEditors(this);
|
|
59
|
+
if (editors.length > 0) {
|
|
60
|
+
const result = await editorService.save(editors[0]);
|
|
61
|
+
if (result.success) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return true;
|
|
66
|
+
})(), ( localizeWithPath(
|
|
67
|
+
'vs/workbench/contrib/notebook/common/notebookEditorInput',
|
|
68
|
+
'vetoExtHostRestart',
|
|
69
|
+
"Notebook '{0}' could not be saved.",
|
|
70
|
+
this.resource.path
|
|
71
|
+
)));
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
dispose() {
|
|
75
|
+
this._sideLoadedListener.dispose();
|
|
76
|
+
this._editorModelReference?.dispose();
|
|
77
|
+
this._editorModelReference = null;
|
|
78
|
+
super.dispose();
|
|
79
|
+
}
|
|
80
|
+
get typeId() {
|
|
81
|
+
return NotebookEditorInput_1.ID;
|
|
82
|
+
}
|
|
83
|
+
get editorId() {
|
|
84
|
+
return this.viewType;
|
|
85
|
+
}
|
|
86
|
+
get capabilities() {
|
|
87
|
+
let capabilities = 1024 ;
|
|
88
|
+
if (this.resource.scheme === Schemas.untitled) {
|
|
89
|
+
capabilities |= 4 ;
|
|
90
|
+
}
|
|
91
|
+
if (this._editorModelReference) {
|
|
92
|
+
if (this._editorModelReference.object.isReadonly()) {
|
|
93
|
+
capabilities |= 2 ;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
if (this.filesConfigurationService.isReadonly(this.resource)) {
|
|
98
|
+
capabilities |= 2 ;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (!((capabilities & 2) )) {
|
|
102
|
+
capabilities |= 128 ;
|
|
103
|
+
}
|
|
104
|
+
return capabilities;
|
|
105
|
+
}
|
|
106
|
+
getDescription(verbosity = 1 ) {
|
|
107
|
+
if (!this.hasCapability(4 ) || this._editorModelReference?.object.hasAssociatedFilePath()) {
|
|
108
|
+
return super.getDescription(verbosity);
|
|
109
|
+
}
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
isReadonly() {
|
|
113
|
+
if (!this._editorModelReference) {
|
|
114
|
+
return this.filesConfigurationService.isReadonly(this.resource);
|
|
115
|
+
}
|
|
116
|
+
return this._editorModelReference.object.isReadonly();
|
|
117
|
+
}
|
|
118
|
+
isDirty() {
|
|
119
|
+
if (!this._editorModelReference) {
|
|
120
|
+
return this._defaultDirtyState;
|
|
121
|
+
}
|
|
122
|
+
return this._editorModelReference.object.isDirty();
|
|
123
|
+
}
|
|
124
|
+
isSaving() {
|
|
125
|
+
const model = this._editorModelReference?.object;
|
|
126
|
+
if (!model || !model.isDirty() || model.hasErrorState || this.hasCapability(4 )) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
return this.filesConfigurationService.getAutoSaveMode() === 1 ;
|
|
130
|
+
}
|
|
131
|
+
async save(group, options) {
|
|
132
|
+
if (this._editorModelReference) {
|
|
133
|
+
if (this.hasCapability(4 )) {
|
|
134
|
+
return this.saveAs(group, options);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
await this._editorModelReference.object.save(options);
|
|
138
|
+
}
|
|
139
|
+
return this;
|
|
140
|
+
}
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
async saveAs(group, options) {
|
|
144
|
+
if (!this._editorModelReference) {
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
const provider = this._notebookService.getContributedNotebookType(this.viewType);
|
|
148
|
+
if (!provider) {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
const pathCandidate = this.hasCapability(4 ) ? await this._suggestName(provider, this.labelService.getUriBasenameLabel(this.resource)) : this._editorModelReference.object.resource;
|
|
152
|
+
let target;
|
|
153
|
+
if (this._editorModelReference.object.hasAssociatedFilePath()) {
|
|
154
|
+
target = pathCandidate;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
target = await this._fileDialogService.pickFileToSave(pathCandidate, options?.availableFileSystems);
|
|
158
|
+
if (!target) {
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (!provider.matches(target)) {
|
|
163
|
+
const patterns = ( provider.selectors.map(pattern => {
|
|
164
|
+
if (typeof pattern === 'string') {
|
|
165
|
+
return pattern;
|
|
166
|
+
}
|
|
167
|
+
if (glob.isRelativePattern(pattern)) {
|
|
168
|
+
return `${pattern} (base ${pattern.base})`;
|
|
169
|
+
}
|
|
170
|
+
if (pattern.exclude) {
|
|
171
|
+
return `${pattern.include} (exclude: ${pattern.exclude})`;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
return `${pattern.include}`;
|
|
175
|
+
}
|
|
176
|
+
})).join(', ');
|
|
177
|
+
throw new Error(`File name ${target} is not supported by ${provider.providerDisplayName}.\n\nPlease make sure the file name matches following patterns:\n${patterns}`);
|
|
178
|
+
}
|
|
179
|
+
return await this._editorModelReference.object.saveAs(target);
|
|
180
|
+
}
|
|
181
|
+
async _suggestName(provider, suggestedFilename) {
|
|
182
|
+
const firstSelector = provider.selectors[0];
|
|
183
|
+
let selectorStr = firstSelector && typeof firstSelector === 'string' ? firstSelector : undefined;
|
|
184
|
+
if (!selectorStr && firstSelector) {
|
|
185
|
+
const include = firstSelector.include;
|
|
186
|
+
if (typeof include === 'string') {
|
|
187
|
+
selectorStr = include;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (selectorStr) {
|
|
191
|
+
const matches = /^\*\.([A-Za-z_-]*)$/.exec(selectorStr);
|
|
192
|
+
if (matches && matches.length > 1) {
|
|
193
|
+
const fileExt = matches[1];
|
|
194
|
+
if (!suggestedFilename.endsWith(fileExt)) {
|
|
195
|
+
return joinPath(await this._fileDialogService.defaultFilePath(), suggestedFilename + '.' + fileExt);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return joinPath(await this._fileDialogService.defaultFilePath(), suggestedFilename);
|
|
200
|
+
}
|
|
201
|
+
async rename(group, target) {
|
|
202
|
+
if (this._editorModelReference) {
|
|
203
|
+
return { editor: { resource: target }, options: { override: this.viewType } };
|
|
204
|
+
}
|
|
205
|
+
return undefined;
|
|
206
|
+
}
|
|
207
|
+
async revert(_group, options) {
|
|
208
|
+
if (this._editorModelReference && this._editorModelReference.object.isDirty()) {
|
|
209
|
+
await this._editorModelReference.object.revert(options);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
async resolve(_options, perf) {
|
|
213
|
+
if (!(await this._notebookService.canResolve(this.viewType))) {
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
perf?.mark('extensionActivated');
|
|
217
|
+
this._sideLoadedListener.dispose();
|
|
218
|
+
if (!this._editorModelReference) {
|
|
219
|
+
const ref = await this._notebookModelResolverService.resolve(this.resource, this.viewType);
|
|
220
|
+
if (this._editorModelReference) {
|
|
221
|
+
ref.dispose();
|
|
222
|
+
return this._editorModelReference.object;
|
|
223
|
+
}
|
|
224
|
+
this._editorModelReference = ref;
|
|
225
|
+
if (this.isDisposed()) {
|
|
226
|
+
this._editorModelReference.dispose();
|
|
227
|
+
this._editorModelReference = null;
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
this._register(this._editorModelReference.object.onDidChangeDirty(() => this._onDidChangeDirty.fire()));
|
|
231
|
+
this._register(this._editorModelReference.object.onDidChangeReadonly(() => this._onDidChangeCapabilities.fire()));
|
|
232
|
+
this._register(this._editorModelReference.object.onDidRevertUntitled(() => this.dispose()));
|
|
233
|
+
if (this._editorModelReference.object.isDirty()) {
|
|
234
|
+
this._onDidChangeDirty.fire();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
this._editorModelReference.object.load();
|
|
239
|
+
}
|
|
240
|
+
if (this.options._backupId) {
|
|
241
|
+
const info = await this._notebookService.withNotebookDataProvider(this._editorModelReference.object.notebook.viewType);
|
|
242
|
+
if (!(info instanceof SimpleNotebookProviderInfo)) {
|
|
243
|
+
throw new Error('CANNOT open file notebook with this provider');
|
|
244
|
+
}
|
|
245
|
+
const data = await info.serializer.dataToNotebook(VSBuffer.fromString(JSON.stringify({ __webview_backup: this.options._backupId })));
|
|
246
|
+
this._editorModelReference.object.notebook.applyEdits([
|
|
247
|
+
{
|
|
248
|
+
editType: 1 ,
|
|
249
|
+
index: 0,
|
|
250
|
+
count: this._editorModelReference.object.notebook.length,
|
|
251
|
+
cells: data.cells
|
|
252
|
+
}
|
|
253
|
+
], true, undefined, () => undefined, undefined, false);
|
|
254
|
+
if (this.options._workingCopy) {
|
|
255
|
+
this.options._backupId = undefined;
|
|
256
|
+
this.options._workingCopy = undefined;
|
|
257
|
+
this.options.startDirty = undefined;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return this._editorModelReference.object;
|
|
261
|
+
}
|
|
262
|
+
toUntyped() {
|
|
263
|
+
return {
|
|
264
|
+
resource: this.resource,
|
|
265
|
+
options: {
|
|
266
|
+
override: this.viewType
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
matches(otherInput) {
|
|
271
|
+
if (super.matches(otherInput)) {
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
if (otherInput instanceof NotebookEditorInput_1) {
|
|
275
|
+
return this.viewType === otherInput.viewType && isEqual(this.resource, otherInput.resource);
|
|
276
|
+
}
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
NotebookEditorInput = NotebookEditorInput_1 = ( __decorate([
|
|
281
|
+
( __param(4, INotebookService)),
|
|
282
|
+
( __param(5, INotebookEditorModelResolverService)),
|
|
283
|
+
( __param(6, IFileDialogService)),
|
|
284
|
+
( __param(7, ILabelService)),
|
|
285
|
+
( __param(8, IFileService)),
|
|
286
|
+
( __param(9, IFilesConfigurationService)),
|
|
287
|
+
( __param(10, IExtensionService)),
|
|
288
|
+
( __param(11, IEditorService))
|
|
289
|
+
], NotebookEditorInput));
|
|
290
|
+
function isCompositeNotebookEditorInput(thing) {
|
|
291
|
+
return !!thing
|
|
292
|
+
&& typeof thing === 'object'
|
|
293
|
+
&& Array.isArray(thing.editorInputs)
|
|
294
|
+
&& (thing.editorInputs.every(input => input instanceof NotebookEditorInput));
|
|
295
|
+
}
|
|
296
|
+
export { NotebookEditorInput, isCompositeNotebookEditorInput };
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { bufferToStream, streamToBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
3
|
+
import { CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
4
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
5
|
+
import { Disposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
6
|
+
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
7
|
+
import { filter } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
8
|
+
import { assertType } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
9
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
10
|
+
import { EditorModel } from '../../../common/editor/editorModel.js';
|
|
11
|
+
import { NotebookCellsChangeType, NotebookSetting } from './notebookCommon.js';
|
|
12
|
+
import { SimpleNotebookProviderInfo, INotebookService } from './notebookService.js';
|
|
13
|
+
import { IFilesConfigurationService } from '../../../services/filesConfiguration/common/filesConfigurationService.js';
|
|
14
|
+
var SimpleNotebookEditorModel_1;
|
|
15
|
+
let SimpleNotebookEditorModel = SimpleNotebookEditorModel_1 = class SimpleNotebookEditorModel extends EditorModel {
|
|
16
|
+
constructor(resource, _hasAssociatedFilePath, viewType, _workingCopyManager, _filesConfigurationService) {
|
|
17
|
+
super();
|
|
18
|
+
this.resource = resource;
|
|
19
|
+
this._hasAssociatedFilePath = _hasAssociatedFilePath;
|
|
20
|
+
this.viewType = viewType;
|
|
21
|
+
this._workingCopyManager = _workingCopyManager;
|
|
22
|
+
this._filesConfigurationService = _filesConfigurationService;
|
|
23
|
+
this._onDidChangeDirty = this._register(( new Emitter()));
|
|
24
|
+
this._onDidSave = this._register(( new Emitter()));
|
|
25
|
+
this._onDidChangeOrphaned = this._register(( new Emitter()));
|
|
26
|
+
this._onDidChangeReadonly = this._register(( new Emitter()));
|
|
27
|
+
this._onDidRevertUntitled = this._register(( new Emitter()));
|
|
28
|
+
this.onDidChangeDirty = this._onDidChangeDirty.event;
|
|
29
|
+
this.onDidSave = this._onDidSave.event;
|
|
30
|
+
this.onDidChangeOrphaned = this._onDidChangeOrphaned.event;
|
|
31
|
+
this.onDidChangeReadonly = this._onDidChangeReadonly.event;
|
|
32
|
+
this.onDidRevertUntitled = this._onDidRevertUntitled.event;
|
|
33
|
+
this._workingCopyListeners = this._register(( new DisposableStore()));
|
|
34
|
+
this.scratchPad = viewType === 'interactive';
|
|
35
|
+
}
|
|
36
|
+
dispose() {
|
|
37
|
+
this._workingCopy?.dispose();
|
|
38
|
+
super.dispose();
|
|
39
|
+
}
|
|
40
|
+
get notebook() {
|
|
41
|
+
return this._workingCopy?.model?.notebookModel;
|
|
42
|
+
}
|
|
43
|
+
isResolved() {
|
|
44
|
+
return Boolean(this._workingCopy?.model?.notebookModel);
|
|
45
|
+
}
|
|
46
|
+
async canDispose() {
|
|
47
|
+
if (!this._workingCopy) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
if (SimpleNotebookEditorModel_1._isStoredFileWorkingCopy(this._workingCopy)) {
|
|
51
|
+
return this._workingCopyManager.stored.canDispose(this._workingCopy);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
isDirty() {
|
|
58
|
+
return this._workingCopy?.isDirty() ?? false;
|
|
59
|
+
}
|
|
60
|
+
isModified() {
|
|
61
|
+
return this._workingCopy?.isModified() ?? false;
|
|
62
|
+
}
|
|
63
|
+
isOrphaned() {
|
|
64
|
+
return SimpleNotebookEditorModel_1._isStoredFileWorkingCopy(this._workingCopy) && this._workingCopy.hasState(4 );
|
|
65
|
+
}
|
|
66
|
+
hasAssociatedFilePath() {
|
|
67
|
+
return !SimpleNotebookEditorModel_1._isStoredFileWorkingCopy(this._workingCopy) && !!this._workingCopy?.hasAssociatedFilePath;
|
|
68
|
+
}
|
|
69
|
+
isReadonly() {
|
|
70
|
+
if (SimpleNotebookEditorModel_1._isStoredFileWorkingCopy(this._workingCopy)) {
|
|
71
|
+
return this._workingCopy?.isReadonly();
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
return this._filesConfigurationService.isReadonly(this.resource);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
get hasErrorState() {
|
|
78
|
+
if (this._workingCopy && 'hasState' in this._workingCopy) {
|
|
79
|
+
return this._workingCopy.hasState(5 );
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
revert(options) {
|
|
84
|
+
assertType(this.isResolved());
|
|
85
|
+
return this._workingCopy.revert(options);
|
|
86
|
+
}
|
|
87
|
+
save(options) {
|
|
88
|
+
assertType(this.isResolved());
|
|
89
|
+
return this._workingCopy.save(options);
|
|
90
|
+
}
|
|
91
|
+
async load(options) {
|
|
92
|
+
if (!this._workingCopy || !this._workingCopy.model) {
|
|
93
|
+
if (this.resource.scheme === Schemas.untitled) {
|
|
94
|
+
if (this._hasAssociatedFilePath) {
|
|
95
|
+
this._workingCopy = await this._workingCopyManager.resolve({ associatedResource: this.resource });
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this._workingCopy = await this._workingCopyManager.resolve({ untitledResource: this.resource, isScratchpad: this.scratchPad });
|
|
99
|
+
}
|
|
100
|
+
this._workingCopy.onDidRevert(() => this._onDidRevertUntitled.fire());
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this._workingCopy = await this._workingCopyManager.resolve(this.resource, options?.forceReadFromFile ? { reload: { async: false, force: true } } : undefined);
|
|
104
|
+
this._workingCopyListeners.add(this._workingCopy.onDidSave(e => this._onDidSave.fire(e)));
|
|
105
|
+
this._workingCopyListeners.add(this._workingCopy.onDidChangeOrphaned(() => this._onDidChangeOrphaned.fire()));
|
|
106
|
+
this._workingCopyListeners.add(this._workingCopy.onDidChangeReadonly(() => this._onDidChangeReadonly.fire()));
|
|
107
|
+
}
|
|
108
|
+
this._workingCopyListeners.add(this._workingCopy.onDidChangeDirty(() => this._onDidChangeDirty.fire(), undefined));
|
|
109
|
+
this._workingCopyListeners.add(this._workingCopy.onWillDispose(() => {
|
|
110
|
+
this._workingCopyListeners.clear();
|
|
111
|
+
this._workingCopy?.model?.dispose();
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
await this._workingCopyManager.resolve(this.resource, {
|
|
116
|
+
reload: {
|
|
117
|
+
async: !options?.forceReadFromFile,
|
|
118
|
+
force: options?.forceReadFromFile
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
assertType(this.isResolved());
|
|
123
|
+
return this;
|
|
124
|
+
}
|
|
125
|
+
async saveAs(target) {
|
|
126
|
+
const newWorkingCopy = await this._workingCopyManager.saveAs(this.resource, target);
|
|
127
|
+
if (!newWorkingCopy) {
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
return { resource: newWorkingCopy.resource };
|
|
131
|
+
}
|
|
132
|
+
static _isStoredFileWorkingCopy(candidate) {
|
|
133
|
+
const isUntitled = candidate && candidate.capabilities & 2 ;
|
|
134
|
+
return !isUntitled;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
SimpleNotebookEditorModel = SimpleNotebookEditorModel_1 = ( __decorate([
|
|
138
|
+
( __param(4, IFilesConfigurationService))
|
|
139
|
+
], SimpleNotebookEditorModel));
|
|
140
|
+
class NotebookFileWorkingCopyModel extends Disposable {
|
|
141
|
+
constructor(_notebookModel, _notebookService, _configurationService) {
|
|
142
|
+
super();
|
|
143
|
+
this._notebookModel = _notebookModel;
|
|
144
|
+
this._notebookService = _notebookService;
|
|
145
|
+
this._configurationService = _configurationService;
|
|
146
|
+
this._onDidChangeContent = this._register(( new Emitter()));
|
|
147
|
+
this.onDidChangeContent = this._onDidChangeContent.event;
|
|
148
|
+
this.configuration = undefined;
|
|
149
|
+
this.onWillDispose = _notebookModel.onWillDispose.bind(_notebookModel);
|
|
150
|
+
this._register(_notebookModel.onDidChangeContent(e => {
|
|
151
|
+
for (const rawEvent of e.rawEvents) {
|
|
152
|
+
if (rawEvent.kind === NotebookCellsChangeType.Initialize) {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
if (rawEvent.transient) {
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
this._onDidChangeContent.fire({
|
|
159
|
+
isRedoing: false,
|
|
160
|
+
isUndoing: false,
|
|
161
|
+
isInitial: false,
|
|
162
|
+
});
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}));
|
|
166
|
+
if (_notebookModel.uri.scheme === Schemas.vscodeRemote) {
|
|
167
|
+
this.configuration = {
|
|
168
|
+
backupDelay: 10000
|
|
169
|
+
};
|
|
170
|
+
if (this._configurationService.getValue(NotebookSetting.remoteSaving)) {
|
|
171
|
+
this.save = async (options, token) => {
|
|
172
|
+
const serializer = await this.getNotebookSerializer();
|
|
173
|
+
if (token.isCancellationRequested) {
|
|
174
|
+
throw new CancellationError();
|
|
175
|
+
}
|
|
176
|
+
const stat = await serializer.save(this._notebookModel.uri, this._notebookModel.versionId, options, token);
|
|
177
|
+
return stat;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
dispose() {
|
|
183
|
+
this._notebookModel.dispose();
|
|
184
|
+
super.dispose();
|
|
185
|
+
}
|
|
186
|
+
get notebookModel() {
|
|
187
|
+
return this._notebookModel;
|
|
188
|
+
}
|
|
189
|
+
async snapshot(token) {
|
|
190
|
+
const serializer = await this.getNotebookSerializer();
|
|
191
|
+
const data = {
|
|
192
|
+
metadata: filter(this._notebookModel.metadata, key => !serializer.options.transientDocumentMetadata[key]),
|
|
193
|
+
cells: [],
|
|
194
|
+
};
|
|
195
|
+
for (const cell of this._notebookModel.cells) {
|
|
196
|
+
const cellData = {
|
|
197
|
+
cellKind: cell.cellKind,
|
|
198
|
+
language: cell.language,
|
|
199
|
+
mime: cell.mime,
|
|
200
|
+
source: cell.getValue(),
|
|
201
|
+
outputs: [],
|
|
202
|
+
internalMetadata: cell.internalMetadata
|
|
203
|
+
};
|
|
204
|
+
cellData.outputs = !serializer.options.transientOutputs ? cell.outputs : [];
|
|
205
|
+
cellData.metadata = filter(cell.metadata, key => !serializer.options.transientCellMetadata[key]);
|
|
206
|
+
data.cells.push(cellData);
|
|
207
|
+
}
|
|
208
|
+
const bytes = await serializer.notebookToData(data);
|
|
209
|
+
if (token.isCancellationRequested) {
|
|
210
|
+
throw new CancellationError();
|
|
211
|
+
}
|
|
212
|
+
return bufferToStream(bytes);
|
|
213
|
+
}
|
|
214
|
+
async update(stream, token) {
|
|
215
|
+
const serializer = await this.getNotebookSerializer();
|
|
216
|
+
const bytes = await streamToBuffer(stream);
|
|
217
|
+
const data = await serializer.dataToNotebook(bytes);
|
|
218
|
+
if (token.isCancellationRequested) {
|
|
219
|
+
throw new CancellationError();
|
|
220
|
+
}
|
|
221
|
+
this._notebookModel.reset(data.cells, data.metadata, serializer.options);
|
|
222
|
+
}
|
|
223
|
+
async getNotebookSerializer() {
|
|
224
|
+
const info = await this._notebookService.withNotebookDataProvider(this.notebookModel.viewType);
|
|
225
|
+
if (!(info instanceof SimpleNotebookProviderInfo)) {
|
|
226
|
+
throw new Error('CANNOT open file notebook with this provider');
|
|
227
|
+
}
|
|
228
|
+
return info.serializer;
|
|
229
|
+
}
|
|
230
|
+
get versionId() {
|
|
231
|
+
return this._notebookModel.alternativeVersionId;
|
|
232
|
+
}
|
|
233
|
+
pushStackElement() {
|
|
234
|
+
this._notebookModel.pushStackElement('save', undefined, undefined);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
let NotebookFileWorkingCopyModelFactory = class NotebookFileWorkingCopyModelFactory {
|
|
238
|
+
constructor(_viewType, _notebookService, _configurationService) {
|
|
239
|
+
this._viewType = _viewType;
|
|
240
|
+
this._notebookService = _notebookService;
|
|
241
|
+
this._configurationService = _configurationService;
|
|
242
|
+
}
|
|
243
|
+
async createModel(resource, stream, token) {
|
|
244
|
+
const info = await this._notebookService.withNotebookDataProvider(this._viewType);
|
|
245
|
+
if (!(info instanceof SimpleNotebookProviderInfo)) {
|
|
246
|
+
throw new Error('CANNOT open file notebook with this provider');
|
|
247
|
+
}
|
|
248
|
+
const bytes = await streamToBuffer(stream);
|
|
249
|
+
const data = await info.serializer.dataToNotebook(bytes);
|
|
250
|
+
if (token.isCancellationRequested) {
|
|
251
|
+
throw new CancellationError();
|
|
252
|
+
}
|
|
253
|
+
const notebookModel = this._notebookService.createNotebookTextModel(info.viewType, resource, data, info.serializer.options);
|
|
254
|
+
return ( new NotebookFileWorkingCopyModel(notebookModel, this._notebookService, this._configurationService));
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
NotebookFileWorkingCopyModelFactory = ( __decorate([
|
|
258
|
+
( __param(1, INotebookService)),
|
|
259
|
+
( __param(2, IConfigurationService))
|
|
260
|
+
], NotebookFileWorkingCopyModelFactory));
|
|
261
|
+
export { NotebookFileWorkingCopyModel, NotebookFileWorkingCopyModelFactory, SimpleNotebookEditorModel };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
1
2
|
var CellExecutionUpdateType;
|
|
2
3
|
( (function(CellExecutionUpdateType) {
|
|
3
4
|
CellExecutionUpdateType[CellExecutionUpdateType["Output"] = 1] = "Output";
|
|
4
5
|
CellExecutionUpdateType[CellExecutionUpdateType["OutputItems"] = 2] = "OutputItems";
|
|
5
6
|
CellExecutionUpdateType[CellExecutionUpdateType["ExecutionState"] = 3] = "ExecutionState";
|
|
6
7
|
})(CellExecutionUpdateType || (CellExecutionUpdateType = {})));
|
|
7
|
-
|
|
8
|
+
const INotebookExecutionService = ( createDecorator('INotebookExecutionService'));
|
|
9
|
+
export { CellExecutionUpdateType, INotebookExecutionService };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
2
2
|
const INotebookKernelService = ( createDecorator('INotebookKernelService'));
|
|
3
|
-
|
|
3
|
+
const INotebookKernelHistoryService = ( createDecorator('INotebookKernelHistoryService'));
|
|
4
|
+
export { INotebookKernelHistoryService, INotebookKernelService };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class NotebookPerfMarks {
|
|
2
|
+
constructor() {
|
|
3
|
+
this._marks = {};
|
|
4
|
+
}
|
|
5
|
+
get value() {
|
|
6
|
+
return { ...this._marks };
|
|
7
|
+
}
|
|
8
|
+
mark(name) {
|
|
9
|
+
if (this._marks[name]) {
|
|
10
|
+
console.error(`Skipping overwrite of notebook perf value: ${name}`);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
this._marks[name] = Date.now();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export { NotebookPerfMarks };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
function isICellRange(candidate) {
|
|
2
|
+
if (!candidate || typeof candidate !== 'object') {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
5
|
+
return typeof candidate.start === 'number'
|
|
6
|
+
&& typeof candidate.end === 'number';
|
|
7
|
+
}
|
|
8
|
+
function cellIndexesToRanges(indexes) {
|
|
9
|
+
indexes.sort((a, b) => a - b);
|
|
10
|
+
const first = indexes.shift();
|
|
11
|
+
if (first === undefined) {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
return ( indexes.reduce(function (ranges, num) {
|
|
15
|
+
if (num <= ranges[0][1]) {
|
|
16
|
+
ranges[0][1] = num + 1;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
ranges.unshift([num, num + 1]);
|
|
20
|
+
}
|
|
21
|
+
return ranges;
|
|
22
|
+
}, [[first, first + 1]]).reverse().map(val => ({ start: val[0], end: val[1] })));
|
|
23
|
+
}
|
|
24
|
+
function cellRangesToIndexes(ranges) {
|
|
25
|
+
const indexes = ranges.reduce((a, b) => {
|
|
26
|
+
for (let i = b.start; i < b.end; i++) {
|
|
27
|
+
a.push(i);
|
|
28
|
+
}
|
|
29
|
+
return a;
|
|
30
|
+
}, []);
|
|
31
|
+
return indexes;
|
|
32
|
+
}
|
|
33
|
+
function reduceCellRanges(ranges) {
|
|
34
|
+
const sorted = ranges.sort((a, b) => a.start - b.start);
|
|
35
|
+
const first = sorted[0];
|
|
36
|
+
if (!first) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
return sorted.reduce((prev, curr) => {
|
|
40
|
+
const last = prev[prev.length - 1];
|
|
41
|
+
if (last.end >= curr.start) {
|
|
42
|
+
last.end = Math.max(last.end, curr.end);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
prev.push(curr);
|
|
46
|
+
}
|
|
47
|
+
return prev;
|
|
48
|
+
}, [first]);
|
|
49
|
+
}
|
|
50
|
+
function cellRangesEqual(a, b) {
|
|
51
|
+
a = reduceCellRanges(a);
|
|
52
|
+
b = reduceCellRanges(b);
|
|
53
|
+
if (a.length !== b.length) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
for (let i = 0; i < a.length; i++) {
|
|
57
|
+
if (a[i].start !== b[i].start || a[i].end !== b[i].end) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
function cellRangeContains(range, other) {
|
|
64
|
+
return other.start >= range.start && other.end <= range.end;
|
|
65
|
+
}
|
|
66
|
+
export { cellIndexesToRanges, cellRangeContains, cellRangesEqual, cellRangesToIndexes, isICellRange, reduceCellRanges };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
2
|
+
const ID_NOTEBOOK_EDITOR_WORKER_SERVICE = 'notebookEditorWorkerService';
|
|
3
|
+
const INotebookEditorWorkerService = ( createDecorator(ID_NOTEBOOK_EDITOR_WORKER_SERVICE));
|
|
4
|
+
export { ID_NOTEBOOK_EDITOR_WORKER_SERVICE, INotebookEditorWorkerService };
|