@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,514 @@
|
|
|
1
|
+
import { distinct } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
2
|
+
import { parse, visit } from 'monaco-editor/esm/vs/base/common/json.js';
|
|
3
|
+
import { setProperty, applyEdits, withFormatting } from '../../../base/common/jsonEdit.js';
|
|
4
|
+
import { getEOL } from '../../../base/common/jsonFormatter.js';
|
|
5
|
+
import * as Objects from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
6
|
+
import { edit } from './content.js';
|
|
7
|
+
import { getDisallowedIgnoredSettings } from './userDataSync.js';
|
|
8
|
+
function getIgnoredSettings(defaultIgnoredSettings, configurationService, settingsContent) {
|
|
9
|
+
let value = [];
|
|
10
|
+
if (settingsContent) {
|
|
11
|
+
value = getIgnoredSettingsFromContent(settingsContent);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
value = getIgnoredSettingsFromConfig(configurationService);
|
|
15
|
+
}
|
|
16
|
+
const added = [], removed = [...getDisallowedIgnoredSettings()];
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
for (const key of value) {
|
|
19
|
+
if (key.startsWith('-')) {
|
|
20
|
+
removed.push(key.substring(1));
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
added.push(key);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return distinct([...defaultIgnoredSettings, ...added,].filter(setting => !removed.includes(setting)));
|
|
28
|
+
}
|
|
29
|
+
function getIgnoredSettingsFromConfig(configurationService) {
|
|
30
|
+
let userValue = configurationService.inspect('settingsSync.ignoredSettings').userValue;
|
|
31
|
+
if (userValue !== undefined) {
|
|
32
|
+
return userValue;
|
|
33
|
+
}
|
|
34
|
+
userValue = configurationService.inspect('sync.ignoredSettings').userValue;
|
|
35
|
+
if (userValue !== undefined) {
|
|
36
|
+
return userValue;
|
|
37
|
+
}
|
|
38
|
+
return configurationService.getValue('settingsSync.ignoredSettings') || [];
|
|
39
|
+
}
|
|
40
|
+
function getIgnoredSettingsFromContent(settingsContent) {
|
|
41
|
+
const parsed = parse(settingsContent);
|
|
42
|
+
return parsed ? parsed['settingsSync.ignoredSettings'] || parsed['sync.ignoredSettings'] || [] : [];
|
|
43
|
+
}
|
|
44
|
+
function updateIgnoredSettings(targetContent, sourceContent, ignoredSettings, formattingOptions) {
|
|
45
|
+
if (ignoredSettings.length) {
|
|
46
|
+
const sourceTree = parseSettings(sourceContent);
|
|
47
|
+
const source = parse(sourceContent) || {};
|
|
48
|
+
const target = parse(targetContent);
|
|
49
|
+
if (!target) {
|
|
50
|
+
return targetContent;
|
|
51
|
+
}
|
|
52
|
+
const settingsToAdd = [];
|
|
53
|
+
for (const key of ignoredSettings) {
|
|
54
|
+
const sourceValue = source[key];
|
|
55
|
+
const targetValue = target[key];
|
|
56
|
+
if (sourceValue === undefined) {
|
|
57
|
+
targetContent = edit(targetContent, [key], undefined, formattingOptions);
|
|
58
|
+
}
|
|
59
|
+
else if (targetValue !== undefined) {
|
|
60
|
+
targetContent = edit(targetContent, [key], sourceValue, formattingOptions);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
settingsToAdd.push(findSettingNode(key, sourceTree));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
settingsToAdd.sort((a, b) => a.startOffset - b.startOffset);
|
|
67
|
+
settingsToAdd.forEach(s => targetContent = addSetting(s.setting.key, sourceContent, targetContent, formattingOptions));
|
|
68
|
+
}
|
|
69
|
+
return targetContent;
|
|
70
|
+
}
|
|
71
|
+
function merge(originalLocalContent, originalRemoteContent, baseContent, ignoredSettings, resolvedConflicts, formattingOptions) {
|
|
72
|
+
const localContentWithoutIgnoredSettings = updateIgnoredSettings(originalLocalContent, originalRemoteContent, ignoredSettings, formattingOptions);
|
|
73
|
+
const localForwarded = baseContent !== localContentWithoutIgnoredSettings;
|
|
74
|
+
const remoteForwarded = baseContent !== originalRemoteContent;
|
|
75
|
+
if (!localForwarded && !remoteForwarded) {
|
|
76
|
+
return { conflictsSettings: [], localContent: null, remoteContent: null, hasConflicts: false };
|
|
77
|
+
}
|
|
78
|
+
if (localForwarded && !remoteForwarded) {
|
|
79
|
+
return { conflictsSettings: [], localContent: null, remoteContent: localContentWithoutIgnoredSettings, hasConflicts: false };
|
|
80
|
+
}
|
|
81
|
+
if (remoteForwarded && !localForwarded) {
|
|
82
|
+
return { conflictsSettings: [], localContent: updateIgnoredSettings(originalRemoteContent, originalLocalContent, ignoredSettings, formattingOptions), remoteContent: null, hasConflicts: false };
|
|
83
|
+
}
|
|
84
|
+
if (baseContent === null && isEmpty(originalLocalContent)) {
|
|
85
|
+
const localContent = areSame(originalLocalContent, originalRemoteContent, ignoredSettings) ? null : updateIgnoredSettings(originalRemoteContent, originalLocalContent, ignoredSettings, formattingOptions);
|
|
86
|
+
return { conflictsSettings: [], localContent, remoteContent: null, hasConflicts: false };
|
|
87
|
+
}
|
|
88
|
+
let localContent = originalLocalContent;
|
|
89
|
+
let remoteContent = originalRemoteContent;
|
|
90
|
+
const local = parse(originalLocalContent);
|
|
91
|
+
const remote = parse(originalRemoteContent);
|
|
92
|
+
const base = baseContent ? parse(baseContent) : null;
|
|
93
|
+
const ignored = ignoredSettings.reduce((set, key) => { set.add(key); return set; }, ( new Set()));
|
|
94
|
+
const localToRemote = compare(local, remote, ignored);
|
|
95
|
+
const baseToLocal = compare(base, local, ignored);
|
|
96
|
+
const baseToRemote = compare(base, remote, ignored);
|
|
97
|
+
const conflicts = ( new Map());
|
|
98
|
+
const handledConflicts = ( new Set());
|
|
99
|
+
const handleConflict = (conflictKey) => {
|
|
100
|
+
handledConflicts.add(conflictKey);
|
|
101
|
+
const resolvedConflict = resolvedConflicts.filter(({ key }) => key === conflictKey)[0];
|
|
102
|
+
if (resolvedConflict) {
|
|
103
|
+
localContent = edit(localContent, [conflictKey], resolvedConflict.value, formattingOptions);
|
|
104
|
+
remoteContent = edit(remoteContent, [conflictKey], resolvedConflict.value, formattingOptions);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
conflicts.set(conflictKey, { key: conflictKey, localValue: local[conflictKey], remoteValue: remote[conflictKey] });
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
for (const key of ( baseToLocal.removed.values())) {
|
|
111
|
+
if (( baseToRemote.updated.has(key))) {
|
|
112
|
+
handleConflict(key);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
remoteContent = edit(remoteContent, [key], undefined, formattingOptions);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
for (const key of ( baseToRemote.removed.values())) {
|
|
119
|
+
if (( handledConflicts.has(key))) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (( baseToLocal.updated.has(key))) {
|
|
123
|
+
handleConflict(key);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
localContent = edit(localContent, [key], undefined, formattingOptions);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
for (const key of ( baseToLocal.updated.values())) {
|
|
130
|
+
if (( handledConflicts.has(key))) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if (( baseToRemote.updated.has(key))) {
|
|
134
|
+
if (( localToRemote.updated.has(key))) {
|
|
135
|
+
handleConflict(key);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
remoteContent = edit(remoteContent, [key], local[key], formattingOptions);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
for (const key of ( baseToRemote.updated.values())) {
|
|
143
|
+
if (( handledConflicts.has(key))) {
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (( baseToLocal.updated.has(key))) {
|
|
147
|
+
if (( localToRemote.updated.has(key))) {
|
|
148
|
+
handleConflict(key);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
localContent = edit(localContent, [key], remote[key], formattingOptions);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
for (const key of ( baseToLocal.added.values())) {
|
|
156
|
+
if (( handledConflicts.has(key))) {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (( baseToRemote.added.has(key))) {
|
|
160
|
+
if (( localToRemote.updated.has(key))) {
|
|
161
|
+
handleConflict(key);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
remoteContent = addSetting(key, localContent, remoteContent, formattingOptions);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
for (const key of ( baseToRemote.added.values())) {
|
|
169
|
+
if (( handledConflicts.has(key))) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (( baseToLocal.added.has(key))) {
|
|
173
|
+
if (( localToRemote.updated.has(key))) {
|
|
174
|
+
handleConflict(key);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
localContent = addSetting(key, remoteContent, localContent, formattingOptions);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
const hasConflicts = conflicts.size > 0 || !areSame(localContent, remoteContent, ignoredSettings);
|
|
182
|
+
const hasLocalChanged = hasConflicts || !areSame(localContent, originalLocalContent, []);
|
|
183
|
+
const hasRemoteChanged = hasConflicts || !areSame(remoteContent, originalRemoteContent, []);
|
|
184
|
+
return { localContent: hasLocalChanged ? localContent : null, remoteContent: hasRemoteChanged ? remoteContent : null, conflictsSettings: [...( conflicts.values())], hasConflicts };
|
|
185
|
+
}
|
|
186
|
+
function areSame(localContent, remoteContent, ignoredSettings) {
|
|
187
|
+
if (localContent === remoteContent) {
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
const local = parse(localContent);
|
|
191
|
+
const remote = parse(remoteContent);
|
|
192
|
+
const ignored = ignoredSettings.reduce((set, key) => { set.add(key); return set; }, ( new Set()));
|
|
193
|
+
const localTree = parseSettings(localContent).filter(node => !(node.setting && ( ignored.has(node.setting.key))));
|
|
194
|
+
const remoteTree = parseSettings(remoteContent).filter(node => !(node.setting && ( ignored.has(node.setting.key))));
|
|
195
|
+
if (localTree.length !== remoteTree.length) {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
for (let index = 0; index < localTree.length; index++) {
|
|
199
|
+
const localNode = localTree[index];
|
|
200
|
+
const remoteNode = remoteTree[index];
|
|
201
|
+
if (localNode.setting && remoteNode.setting) {
|
|
202
|
+
if (localNode.setting.key !== remoteNode.setting.key) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
if (!Objects.equals(local[localNode.setting.key], remote[localNode.setting.key])) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
else if (!localNode.setting && !remoteNode.setting) {
|
|
210
|
+
if (localNode.value !== remoteNode.value) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
function isEmpty(content) {
|
|
221
|
+
if (content) {
|
|
222
|
+
const nodes = parseSettings(content);
|
|
223
|
+
return nodes.length === 0;
|
|
224
|
+
}
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
function compare(from, to, ignored) {
|
|
228
|
+
const fromKeys = from ? ( Object.keys(from)).filter(key => !( ignored.has(key))) : [];
|
|
229
|
+
const toKeys = ( Object.keys(to)).filter(key => !( ignored.has(key)));
|
|
230
|
+
const added = toKeys.filter(key => !fromKeys.includes(key)).reduce((r, key) => { r.add(key); return r; }, ( new Set()));
|
|
231
|
+
const removed = fromKeys.filter(key => !toKeys.includes(key)).reduce((r, key) => { r.add(key); return r; }, ( new Set()));
|
|
232
|
+
const updated = ( new Set());
|
|
233
|
+
if (from) {
|
|
234
|
+
for (const key of fromKeys) {
|
|
235
|
+
if (( removed.has(key))) {
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
const value1 = from[key];
|
|
239
|
+
const value2 = to[key];
|
|
240
|
+
if (!Objects.equals(value1, value2)) {
|
|
241
|
+
updated.add(key);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return { added, removed, updated };
|
|
246
|
+
}
|
|
247
|
+
function addSetting(key, sourceContent, targetContent, formattingOptions) {
|
|
248
|
+
const source = parse(sourceContent);
|
|
249
|
+
const sourceTree = parseSettings(sourceContent);
|
|
250
|
+
const targetTree = parseSettings(targetContent);
|
|
251
|
+
const insertLocation = getInsertLocation(key, sourceTree, targetTree);
|
|
252
|
+
return insertAtLocation(targetContent, key, source[key], insertLocation, targetTree, formattingOptions);
|
|
253
|
+
}
|
|
254
|
+
function getInsertLocation(key, sourceTree, targetTree) {
|
|
255
|
+
const sourceNodeIndex = sourceTree.findIndex(node => node.setting?.key === key);
|
|
256
|
+
const sourcePreviousNode = sourceTree[sourceNodeIndex - 1];
|
|
257
|
+
if (sourcePreviousNode) {
|
|
258
|
+
if (sourcePreviousNode.setting) {
|
|
259
|
+
const targetPreviousSetting = findSettingNode(sourcePreviousNode.setting.key, targetTree);
|
|
260
|
+
if (targetPreviousSetting) {
|
|
261
|
+
return { index: targetTree.indexOf(targetPreviousSetting), insertAfter: true };
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
const sourcePreviousSettingNode = findPreviousSettingNode(sourceNodeIndex, sourceTree);
|
|
266
|
+
if (sourcePreviousSettingNode) {
|
|
267
|
+
const targetPreviousSetting = findSettingNode(sourcePreviousSettingNode.setting.key, targetTree);
|
|
268
|
+
if (targetPreviousSetting) {
|
|
269
|
+
const targetNextSetting = findNextSettingNode(targetTree.indexOf(targetPreviousSetting), targetTree);
|
|
270
|
+
const sourceCommentNodes = findNodesBetween(sourceTree, sourcePreviousSettingNode, sourceTree[sourceNodeIndex]);
|
|
271
|
+
if (targetNextSetting) {
|
|
272
|
+
const targetCommentNodes = findNodesBetween(targetTree, targetPreviousSetting, targetNextSetting);
|
|
273
|
+
const targetCommentNode = findLastMatchingTargetCommentNode(sourceCommentNodes, targetCommentNodes);
|
|
274
|
+
if (targetCommentNode) {
|
|
275
|
+
return { index: targetTree.indexOf(targetCommentNode), insertAfter: true };
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
return { index: targetTree.indexOf(targetNextSetting), insertAfter: false };
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
const targetCommentNodes = findNodesBetween(targetTree, targetPreviousSetting, targetTree[targetTree.length - 1]);
|
|
283
|
+
const targetCommentNode = findLastMatchingTargetCommentNode(sourceCommentNodes, targetCommentNodes);
|
|
284
|
+
if (targetCommentNode) {
|
|
285
|
+
return { index: targetTree.indexOf(targetCommentNode), insertAfter: true };
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
return { index: targetTree.length - 1, insertAfter: true };
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
const sourceNextNode = sourceTree[sourceNodeIndex + 1];
|
|
295
|
+
if (sourceNextNode) {
|
|
296
|
+
if (sourceNextNode.setting) {
|
|
297
|
+
const targetNextSetting = findSettingNode(sourceNextNode.setting.key, targetTree);
|
|
298
|
+
if (targetNextSetting) {
|
|
299
|
+
return { index: targetTree.indexOf(targetNextSetting), insertAfter: false };
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
const sourceNextSettingNode = findNextSettingNode(sourceNodeIndex, sourceTree);
|
|
304
|
+
if (sourceNextSettingNode) {
|
|
305
|
+
const targetNextSetting = findSettingNode(sourceNextSettingNode.setting.key, targetTree);
|
|
306
|
+
if (targetNextSetting) {
|
|
307
|
+
const targetPreviousSetting = findPreviousSettingNode(targetTree.indexOf(targetNextSetting), targetTree);
|
|
308
|
+
const sourceCommentNodes = findNodesBetween(sourceTree, sourceTree[sourceNodeIndex], sourceNextSettingNode);
|
|
309
|
+
if (targetPreviousSetting) {
|
|
310
|
+
const targetCommentNodes = findNodesBetween(targetTree, targetPreviousSetting, targetNextSetting);
|
|
311
|
+
const targetCommentNode = findLastMatchingTargetCommentNode(sourceCommentNodes.reverse(), targetCommentNodes.reverse());
|
|
312
|
+
if (targetCommentNode) {
|
|
313
|
+
return { index: targetTree.indexOf(targetCommentNode), insertAfter: false };
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
return { index: targetTree.indexOf(targetPreviousSetting), insertAfter: true };
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
const targetCommentNodes = findNodesBetween(targetTree, targetTree[0], targetNextSetting);
|
|
321
|
+
const targetCommentNode = findLastMatchingTargetCommentNode(sourceCommentNodes.reverse(), targetCommentNodes.reverse());
|
|
322
|
+
if (targetCommentNode) {
|
|
323
|
+
return { index: targetTree.indexOf(targetCommentNode), insertAfter: false };
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
return { index: 0, insertAfter: false };
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return { index: targetTree.length - 1, insertAfter: true };
|
|
335
|
+
}
|
|
336
|
+
function insertAtLocation(content, key, value, location, tree, formattingOptions) {
|
|
337
|
+
let edits;
|
|
338
|
+
if (location.index === -1) {
|
|
339
|
+
edits = setProperty(content, [key], value, formattingOptions);
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
edits = ( getEditToInsertAtLocation(content, key, value, location, tree, formattingOptions).map(edit => withFormatting(content, edit, formattingOptions)[0]));
|
|
343
|
+
}
|
|
344
|
+
return applyEdits(content, edits);
|
|
345
|
+
}
|
|
346
|
+
function getEditToInsertAtLocation(content, key, value, location, tree, formattingOptions) {
|
|
347
|
+
const newProperty = `${JSON.stringify(key)}: ${JSON.stringify(value)}`;
|
|
348
|
+
const eol = getEOL(formattingOptions, content);
|
|
349
|
+
const node = tree[location.index];
|
|
350
|
+
if (location.insertAfter) {
|
|
351
|
+
const edits = [];
|
|
352
|
+
if (node.setting) {
|
|
353
|
+
edits.push({ offset: node.endOffset, length: 0, content: ',' + newProperty });
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
const nextSettingNode = findNextSettingNode(location.index, tree);
|
|
357
|
+
const previousSettingNode = findPreviousSettingNode(location.index, tree);
|
|
358
|
+
const previousSettingCommaOffset = previousSettingNode?.setting?.commaOffset;
|
|
359
|
+
if (previousSettingNode && previousSettingCommaOffset === undefined) {
|
|
360
|
+
edits.push({ offset: previousSettingNode.endOffset, length: 0, content: ',' });
|
|
361
|
+
}
|
|
362
|
+
const isPreviouisSettingIncludesComment = previousSettingCommaOffset !== undefined && previousSettingCommaOffset > node.endOffset;
|
|
363
|
+
edits.push({
|
|
364
|
+
offset: isPreviouisSettingIncludesComment ? previousSettingCommaOffset + 1 : node.endOffset,
|
|
365
|
+
length: 0,
|
|
366
|
+
content: nextSettingNode ? eol + newProperty + ',' : eol + newProperty
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
return edits;
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
if (node.setting) {
|
|
373
|
+
return [{ offset: node.startOffset, length: 0, content: newProperty + ',' }];
|
|
374
|
+
}
|
|
375
|
+
const content = (tree[location.index - 1] && !tree[location.index - 1].setting ? eol : '')
|
|
376
|
+
+ newProperty
|
|
377
|
+
+ (findNextSettingNode(location.index, tree) ? ',' : '')
|
|
378
|
+
+ eol;
|
|
379
|
+
return [{ offset: node.startOffset, length: 0, content }];
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function findSettingNode(key, tree) {
|
|
383
|
+
return tree.filter(node => node.setting?.key === key)[0];
|
|
384
|
+
}
|
|
385
|
+
function findPreviousSettingNode(index, tree) {
|
|
386
|
+
for (let i = index - 1; i >= 0; i--) {
|
|
387
|
+
if (tree[i].setting) {
|
|
388
|
+
return tree[i];
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return undefined;
|
|
392
|
+
}
|
|
393
|
+
function findNextSettingNode(index, tree) {
|
|
394
|
+
for (let i = index + 1; i < tree.length; i++) {
|
|
395
|
+
if (tree[i].setting) {
|
|
396
|
+
return tree[i];
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
return undefined;
|
|
400
|
+
}
|
|
401
|
+
function findNodesBetween(nodes, from, till) {
|
|
402
|
+
const fromIndex = nodes.indexOf(from);
|
|
403
|
+
const tillIndex = nodes.indexOf(till);
|
|
404
|
+
return nodes.filter((node, index) => fromIndex < index && index < tillIndex);
|
|
405
|
+
}
|
|
406
|
+
function findLastMatchingTargetCommentNode(sourceComments, targetComments) {
|
|
407
|
+
if (sourceComments.length && targetComments.length) {
|
|
408
|
+
let index = 0;
|
|
409
|
+
for (; index < targetComments.length && index < sourceComments.length; index++) {
|
|
410
|
+
if (sourceComments[index].value !== targetComments[index].value) {
|
|
411
|
+
return targetComments[index - 1];
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
return targetComments[index - 1];
|
|
415
|
+
}
|
|
416
|
+
return undefined;
|
|
417
|
+
}
|
|
418
|
+
function parseSettings(content) {
|
|
419
|
+
const nodes = [];
|
|
420
|
+
let hierarchyLevel = -1;
|
|
421
|
+
let startOffset;
|
|
422
|
+
let key;
|
|
423
|
+
const visitor = {
|
|
424
|
+
onObjectBegin: (offset) => {
|
|
425
|
+
hierarchyLevel++;
|
|
426
|
+
},
|
|
427
|
+
onObjectProperty: (name, offset, length) => {
|
|
428
|
+
if (hierarchyLevel === 0) {
|
|
429
|
+
startOffset = offset;
|
|
430
|
+
key = name;
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
onObjectEnd: (offset, length) => {
|
|
434
|
+
hierarchyLevel--;
|
|
435
|
+
if (hierarchyLevel === 0) {
|
|
436
|
+
nodes.push({
|
|
437
|
+
startOffset,
|
|
438
|
+
endOffset: offset + length,
|
|
439
|
+
value: content.substring(startOffset, offset + length),
|
|
440
|
+
setting: {
|
|
441
|
+
key,
|
|
442
|
+
commaOffset: undefined
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
onArrayBegin: (offset, length) => {
|
|
448
|
+
hierarchyLevel++;
|
|
449
|
+
},
|
|
450
|
+
onArrayEnd: (offset, length) => {
|
|
451
|
+
hierarchyLevel--;
|
|
452
|
+
if (hierarchyLevel === 0) {
|
|
453
|
+
nodes.push({
|
|
454
|
+
startOffset,
|
|
455
|
+
endOffset: offset + length,
|
|
456
|
+
value: content.substring(startOffset, offset + length),
|
|
457
|
+
setting: {
|
|
458
|
+
key,
|
|
459
|
+
commaOffset: undefined
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
onLiteralValue: (value, offset, length) => {
|
|
465
|
+
if (hierarchyLevel === 0) {
|
|
466
|
+
nodes.push({
|
|
467
|
+
startOffset,
|
|
468
|
+
endOffset: offset + length,
|
|
469
|
+
value: content.substring(startOffset, offset + length),
|
|
470
|
+
setting: {
|
|
471
|
+
key,
|
|
472
|
+
commaOffset: undefined
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
onSeparator: (sep, offset, length) => {
|
|
478
|
+
if (hierarchyLevel === 0) {
|
|
479
|
+
if (sep === ',') {
|
|
480
|
+
let index = nodes.length - 1;
|
|
481
|
+
for (; index >= 0; index--) {
|
|
482
|
+
if (nodes[index].setting) {
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
const node = nodes[index];
|
|
487
|
+
if (node) {
|
|
488
|
+
nodes.splice(index, 1, {
|
|
489
|
+
startOffset: node.startOffset,
|
|
490
|
+
endOffset: node.endOffset,
|
|
491
|
+
value: node.value,
|
|
492
|
+
setting: {
|
|
493
|
+
key: node.setting.key,
|
|
494
|
+
commaOffset: offset
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
onComment: (offset, length) => {
|
|
502
|
+
if (hierarchyLevel === 0) {
|
|
503
|
+
nodes.push({
|
|
504
|
+
startOffset: offset,
|
|
505
|
+
endOffset: offset + length,
|
|
506
|
+
value: content.substring(offset, offset + length),
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
visit(content, visitor);
|
|
512
|
+
return nodes;
|
|
513
|
+
}
|
|
514
|
+
export { addSetting, getIgnoredSettings, isEmpty, merge, updateIgnoredSettings };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { distinct } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
2
|
-
import {
|
|
2
|
+
import { isObject, isString } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
3
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
4
|
+
import { Extensions, allSettings } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
|
5
|
+
import { EXTENSION_IDENTIFIER_PATTERN } from '../../extensionManagement/common/extensionManagement.js';
|
|
3
6
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
7
|
+
import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
4
8
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
5
9
|
function getDisallowedIgnoredSettings() {
|
|
6
10
|
const allSettings = ( Registry.as(Extensions.Configuration)).getConfigurationProperties();
|
|
@@ -13,7 +17,155 @@ function getDefaultIgnoredSettings() {
|
|
|
13
17
|
const disallowedSettings = getDisallowedIgnoredSettings();
|
|
14
18
|
return distinct([...ignoreSyncSettings, ...machineSettings, ...disallowedSettings]);
|
|
15
19
|
}
|
|
20
|
+
const USER_DATA_SYNC_CONFIGURATION_SCOPE = 'settingsSync';
|
|
21
|
+
const CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM = 'settingsSync.keybindingsPerPlatform';
|
|
22
|
+
function registerConfiguration() {
|
|
23
|
+
const ignoredSettingsSchemaId = 'vscode://schemas/ignoredSettings';
|
|
24
|
+
const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
25
|
+
configurationRegistry.registerConfiguration({
|
|
26
|
+
id: 'settingsSync',
|
|
27
|
+
order: 30,
|
|
28
|
+
title: ( localizeWithPath(
|
|
29
|
+
'vs/platform/userDataSync/common/userDataSync',
|
|
30
|
+
'settings sync',
|
|
31
|
+
"Settings Sync"
|
|
32
|
+
)),
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
[CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM]: {
|
|
36
|
+
type: 'boolean',
|
|
37
|
+
description: ( localizeWithPath(
|
|
38
|
+
'vs/platform/userDataSync/common/userDataSync',
|
|
39
|
+
'settingsSync.keybindingsPerPlatform',
|
|
40
|
+
"Synchronize keybindings for each platform."
|
|
41
|
+
)),
|
|
42
|
+
default: true,
|
|
43
|
+
scope: 1 ,
|
|
44
|
+
tags: ['sync', 'usesOnlineServices']
|
|
45
|
+
},
|
|
46
|
+
'settingsSync.ignoredExtensions': {
|
|
47
|
+
'type': 'array',
|
|
48
|
+
markdownDescription: ( localizeWithPath(
|
|
49
|
+
'vs/platform/userDataSync/common/userDataSync',
|
|
50
|
+
'settingsSync.ignoredExtensions',
|
|
51
|
+
"List of extensions to be ignored while synchronizing. The identifier of an extension is always `${publisher}.${name}`. For example: `vscode.csharp`."
|
|
52
|
+
)),
|
|
53
|
+
items: [{
|
|
54
|
+
type: 'string',
|
|
55
|
+
pattern: EXTENSION_IDENTIFIER_PATTERN,
|
|
56
|
+
errorMessage: ( localizeWithPath(
|
|
57
|
+
'vs/platform/userDataSync/common/userDataSync',
|
|
58
|
+
'app.extension.identifier.errorMessage',
|
|
59
|
+
"Expected format '${publisher}.${name}'. Example: 'vscode.csharp'."
|
|
60
|
+
))
|
|
61
|
+
}],
|
|
62
|
+
'default': [],
|
|
63
|
+
'scope': 1 ,
|
|
64
|
+
uniqueItems: true,
|
|
65
|
+
disallowSyncIgnore: true,
|
|
66
|
+
tags: ['sync', 'usesOnlineServices']
|
|
67
|
+
},
|
|
68
|
+
'settingsSync.ignoredSettings': {
|
|
69
|
+
'type': 'array',
|
|
70
|
+
description: ( localizeWithPath(
|
|
71
|
+
'vs/platform/userDataSync/common/userDataSync',
|
|
72
|
+
'settingsSync.ignoredSettings',
|
|
73
|
+
"Configure settings to be ignored while synchronizing."
|
|
74
|
+
)),
|
|
75
|
+
'default': [],
|
|
76
|
+
'scope': 1 ,
|
|
77
|
+
$ref: ignoredSettingsSchemaId,
|
|
78
|
+
additionalProperties: true,
|
|
79
|
+
uniqueItems: true,
|
|
80
|
+
disallowSyncIgnore: true,
|
|
81
|
+
tags: ['sync', 'usesOnlineServices']
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const jsonRegistry = ( Registry.as(Extensions$1.JSONContribution));
|
|
86
|
+
const registerIgnoredSettingsSchema = () => {
|
|
87
|
+
const disallowedIgnoredSettings = getDisallowedIgnoredSettings();
|
|
88
|
+
const defaultIgnoredSettings = getDefaultIgnoredSettings();
|
|
89
|
+
const settings = ( Object.keys(allSettings.properties)).filter(setting => !defaultIgnoredSettings.includes(setting));
|
|
90
|
+
const ignoredSettings = defaultIgnoredSettings.filter(setting => !disallowedIgnoredSettings.includes(setting));
|
|
91
|
+
const ignoredSettingsSchema = {
|
|
92
|
+
items: {
|
|
93
|
+
type: 'string',
|
|
94
|
+
enum: [...settings, ...( ignoredSettings.map(setting => `-${setting}`))]
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
jsonRegistry.registerSchema(ignoredSettingsSchemaId, ignoredSettingsSchema);
|
|
98
|
+
};
|
|
99
|
+
return configurationRegistry.onDidUpdateConfiguration(() => registerIgnoredSettingsSchema());
|
|
100
|
+
}
|
|
101
|
+
function isAuthenticationProvider(thing) {
|
|
102
|
+
return thing
|
|
103
|
+
&& isObject(thing)
|
|
104
|
+
&& isString(thing.id)
|
|
105
|
+
&& Array.isArray(thing.scopes);
|
|
106
|
+
}
|
|
107
|
+
const ALL_SYNC_RESOURCES = ["settings" , "keybindings" , "snippets" , "tasks" , "extensions" , "globalState" , "profiles" ];
|
|
108
|
+
function getPathSegments(collection, ...paths) {
|
|
109
|
+
return collection ? [collection, ...paths] : paths;
|
|
110
|
+
}
|
|
111
|
+
function getLastSyncResourceUri(collection, syncResource, environmentService, extUri) {
|
|
112
|
+
return extUri.joinPath(environmentService.userDataSyncHome, ...getPathSegments(collection, syncResource, `lastSync${syncResource}.json`));
|
|
113
|
+
}
|
|
114
|
+
const IUserDataSyncStoreManagementService = ( createDecorator('IUserDataSyncStoreManagementService'));
|
|
115
|
+
const IUserDataSyncStoreService = ( createDecorator('IUserDataSyncStoreService'));
|
|
116
|
+
const IUserDataSyncLocalStoreService = ( createDecorator('IUserDataSyncLocalStoreService'));
|
|
117
|
+
const HEADER_OPERATION_ID = 'x-operation-id';
|
|
118
|
+
const HEADER_EXECUTION_ID = 'X-Execution-Id';
|
|
119
|
+
function createSyncHeaders(executionId) {
|
|
120
|
+
const headers = {};
|
|
121
|
+
headers[HEADER_EXECUTION_ID] = executionId;
|
|
122
|
+
return headers;
|
|
123
|
+
}
|
|
124
|
+
class UserDataSyncError extends Error {
|
|
125
|
+
constructor(message, code, resource, operationId) {
|
|
126
|
+
super(message);
|
|
127
|
+
this.code = code;
|
|
128
|
+
this.resource = resource;
|
|
129
|
+
this.operationId = operationId;
|
|
130
|
+
this.name = `${this.code} (UserDataSyncError) syncResource:${this.resource || 'unknown'} operationId:${this.operationId || 'unknown'}`;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
class UserDataSyncStoreError extends UserDataSyncError {
|
|
134
|
+
constructor(message, url, code, serverCode, operationId) {
|
|
135
|
+
super(message, code, undefined, operationId);
|
|
136
|
+
this.url = url;
|
|
137
|
+
this.serverCode = serverCode;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
class UserDataAutoSyncError extends UserDataSyncError {
|
|
141
|
+
constructor(message, code) {
|
|
142
|
+
super(message, code);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
( (function(UserDataSyncError) {
|
|
146
|
+
function toUserDataSyncError(error) {
|
|
147
|
+
if (error instanceof UserDataSyncError) {
|
|
148
|
+
return error;
|
|
149
|
+
}
|
|
150
|
+
const match = /^(.+) \(UserDataSyncError\) syncResource:(.+) operationId:(.+)$/.exec(error.name);
|
|
151
|
+
if (match && match[1]) {
|
|
152
|
+
const syncResource = match[2] === 'unknown' ? undefined : match[2];
|
|
153
|
+
const operationId = match[3] === 'unknown' ? undefined : match[3];
|
|
154
|
+
return ( new UserDataSyncError(error.message, match[1], syncResource, operationId));
|
|
155
|
+
}
|
|
156
|
+
return ( new UserDataSyncError(error.message, "Unknown" ));
|
|
157
|
+
}
|
|
158
|
+
UserDataSyncError.toUserDataSyncError = toUserDataSyncError;
|
|
159
|
+
})(UserDataSyncError || (UserDataSyncError = {})));
|
|
160
|
+
const SYNC_SERVICE_URL_TYPE = 'sync.store.url.type';
|
|
161
|
+
function getEnablementKey(resource) { return `sync.enable.${resource}`; }
|
|
16
162
|
const IUserDataSyncEnablementService = ( createDecorator('IUserDataSyncEnablementService'));
|
|
17
163
|
const IUserDataSyncService = ( createDecorator('IUserDataSyncService'));
|
|
164
|
+
const IUserDataSyncResourceProviderService = ( createDecorator('IUserDataSyncResourceProviderService'));
|
|
18
165
|
const IUserDataAutoSyncService = ( createDecorator('IUserDataAutoSyncService'));
|
|
19
|
-
|
|
166
|
+
const IUserDataSyncUtilService = ( createDecorator('IUserDataSyncUtilService'));
|
|
167
|
+
const IUserDataSyncLogService = ( createDecorator('IUserDataSyncLogService'));
|
|
168
|
+
const USER_DATA_SYNC_LOG_ID = 'userDataSync';
|
|
169
|
+
const USER_DATA_SYNC_SCHEME = 'vscode-userdata-sync';
|
|
170
|
+
const PREVIEW_DIR_NAME = 'preview';
|
|
171
|
+
export { ALL_SYNC_RESOURCES, CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM, HEADER_EXECUTION_ID, HEADER_OPERATION_ID, IUserDataAutoSyncService, IUserDataSyncEnablementService, IUserDataSyncLocalStoreService, IUserDataSyncLogService, IUserDataSyncResourceProviderService, IUserDataSyncService, IUserDataSyncStoreManagementService, IUserDataSyncStoreService, IUserDataSyncUtilService, PREVIEW_DIR_NAME, SYNC_SERVICE_URL_TYPE, USER_DATA_SYNC_CONFIGURATION_SCOPE, USER_DATA_SYNC_LOG_ID, USER_DATA_SYNC_SCHEME, UserDataAutoSyncError, UserDataSyncError, UserDataSyncStoreError, createSyncHeaders, getDefaultIgnoredSettings, getDisallowedIgnoredSettings, getEnablementKey, getLastSyncResourceUri, getPathSegments, isAuthenticationProvider, registerConfiguration };
|