@codingame/monaco-vscode-api 4.5.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +1 -1
- package/extensions.d.ts +2 -3
- package/lifecycle.js +6 -0
- package/localExtensionHost.d.ts +4 -1
- package/missing-services.js +41 -25
- package/package.json +8 -8
- package/service-override/tools/editor.js +31 -8
- package/service-override/tools/views.d.ts +1 -1
- package/service-override/tools/views.js +2 -3
- package/service-override/views.d.ts +0 -1
- package/services.d.ts +3 -3
- package/services.js +3 -3
- package/vscode/src/vs/base/browser/markdownRenderer.js +9 -3
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +2 -2
- package/vscode/src/vs/base/browser/ui/button/button.js +3 -3
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -1
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +2 -2
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +2 -2
- package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +2 -2
- package/vscode/src/vs/{platform/hover/browser → base/browser/ui/hover}/hover.d.ts +64 -4
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js +13 -0
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +30 -14
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +15 -2
- package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +2 -2
- package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.js +239 -0
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +2 -2
- package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +2 -2
- package/vscode/src/vs/base/browser/ui/list/listView.js +5 -3
- package/vscode/src/vs/base/browser/ui/list/listWidget.d.ts +33 -0
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +4 -1
- package/vscode/src/vs/base/browser/ui/menu/menu.js +1 -0
- package/vscode/src/vs/base/browser/ui/menu/menubar.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/progressbar/progressAccessibilitySignal.js +13 -0
- package/vscode/src/vs/base/browser/ui/progressbar/progressbar.js +7 -1
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +2 -2
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +2 -2
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +8 -2
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +11 -4
- package/vscode/src/vs/base/browser/ui/tree/media/tree.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/tree/objectTree.js +6 -4
- package/vscode/src/vs/base/common/arraysFind.js +7 -7
- package/vscode/src/vs/base/common/async.js +8 -3
- package/vscode/src/vs/base/common/cache.js +29 -10
- package/vscode/src/vs/base/common/cancellation.js +6 -1
- package/vscode/src/vs/base/common/codicons.d.ts +3 -0
- package/vscode/src/vs/base/common/codiconsLibrary.js +3 -0
- package/vscode/src/vs/base/common/controlFlow.js +48 -0
- package/vscode/src/vs/base/common/equals.js +44 -0
- package/vscode/src/vs/base/common/event.d.ts +11 -1
- package/vscode/src/vs/base/common/event.js +26 -1
- package/vscode/src/vs/base/common/jsonEdit.js +1 -1
- package/vscode/src/vs/base/common/lifecycle.js +1 -1
- package/vscode/src/vs/base/common/map.js +53 -4
- package/vscode/src/vs/base/common/network.js +2 -0
- package/vscode/src/vs/base/common/objects.js +3 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.js +1 -10
- package/vscode/src/vs/base/common/observableInternal/base.js +22 -10
- package/vscode/src/vs/base/common/observableInternal/derived.js +8 -8
- package/vscode/src/vs/base/common/observableInternal/promise.js +19 -1
- package/vscode/src/vs/base/common/observableInternal/utils.js +30 -52
- package/vscode/src/vs/base/common/product.d.ts +1 -0
- package/vscode/src/vs/base/common/strings.js +1 -1
- package/vscode/src/vs/base/common/types.d.ts +5 -1
- package/vscode/src/vs/editor/browser/config/editorConfiguration.js +3 -2
- package/vscode/src/vs/editor/browser/observableUtilities.js +58 -0
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +121 -2
- package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +80 -0
- package/vscode/src/vs/editor/browser/stableEditorScroll.js +37 -1
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -3
- package/vscode/src/vs/editor/browser/widget/codeEditor/editor.css.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +7 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorSash.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +3 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +3 -10
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +8 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +6 -6
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +1 -0
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +3 -2
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.js +17 -8
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget.js +1 -0
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +27 -19
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/style.css.js +1 -1
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +4 -4
- package/vscode/src/vs/editor/common/core/lineRange.d.ts +12 -0
- package/vscode/src/vs/editor/common/core/lineRange.js +28 -0
- package/vscode/src/vs/editor/common/core/textEdit.d.ts +21 -0
- package/vscode/src/vs/editor/common/core/textEdit.js +13 -1
- package/vscode/src/vs/editor/common/core/textLength.d.ts +29 -0
- package/vscode/src/vs/editor/common/core/textLength.js +6 -0
- package/vscode/src/vs/editor/common/cursor/cursorCollection.js +3 -3
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +11 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +11 -0
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +34 -3
- package/vscode/src/vs/editor/common/languages.d.ts +50 -10
- package/vscode/src/vs/editor/common/languages.js +11 -1
- package/vscode/src/vs/editor/common/services/languageFeatureDebounce.js +1 -1
- package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +2 -2
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +1 -1
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +11 -1
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +3 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +22 -6
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +5 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +1 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions.js +20 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +2 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +4 -4
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +2 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +7 -0
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +11 -6
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +10 -10
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverComputer.js +74 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +332 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverStatusBar.js +34 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverTypes.js +39 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +355 -0
- package/vscode/src/vs/editor/contrib/hover/browser/getHover.js +11 -14
- package/vscode/src/vs/editor/contrib/hover/browser/hover.css.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +13 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +354 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverContribution.js +42 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverController.js +320 -0
- package/vscode/src/vs/editor/contrib/hover/browser/marginHoverComputer.js +48 -0
- package/vscode/src/vs/editor/contrib/hover/browser/{marginHover.js → marginHoverWidget.js} +14 -48
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +250 -41
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +1 -0
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +44 -20
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +11 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/commands.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +2 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +26 -13
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +5 -11
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +24 -22
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +39 -70
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +3 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +4 -2
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +5 -3
- package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgressWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +18 -6
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +165 -40
- package/vscode/src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +5 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +3 -3
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +15 -8
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +13 -6
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +0 -2
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +9 -2
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +23 -18
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +33 -11
- package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +1 -9
- package/vscode/src/vs/platform/accessibility/common/accessibility.js +2 -1
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.d.ts +15 -9
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +133 -132
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service.d.ts +12 -5
- package/vscode/src/vs/platform/accessibilitySignal/browser/progressAccessibilitySignalScheduler.js +25 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +4 -4
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +10 -7
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +1 -1
- package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +4 -1
- package/vscode/src/vs/platform/actions/browser/toolbar.js +53 -36
- package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -1
- package/vscode/src/vs/platform/actions/common/actions.js +14 -4
- package/vscode/src/vs/platform/actions/common/menuService.js +30 -8
- package/vscode/src/vs/platform/configuration/common/configuration.js +4 -0
- package/vscode/src/vs/platform/configuration/common/configurationModels.js +43 -32
- package/vscode/src/vs/platform/configuration/common/configurations.js +12 -10
- package/vscode/src/vs/platform/contextview/browser/contextView.d.ts +4 -1
- package/vscode/src/vs/platform/contextview/browser/contextView.service.d.ts +2 -3
- package/vscode/src/vs/platform/contextview/browser/contextViewService.js +10 -8
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +0 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +1 -0
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +5 -0
- package/vscode/src/vs/platform/files/common/files.d.ts +14 -1
- package/vscode/src/vs/platform/hover/browser/hover.service.d.ts +2 -31
- package/vscode/src/vs/platform/instantiation/common/instantiation.d.ts +9 -0
- package/vscode/src/vs/platform/instantiation/common/instantiationService.js +42 -8
- package/vscode/src/vs/platform/log/common/log.js +3 -1
- package/vscode/src/vs/platform/markers/common/markerService.js +7 -3
- package/vscode/src/vs/platform/opener/browser/link.js +6 -4
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +2 -2
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +15 -7
- package/vscode/src/vs/platform/telemetry/common/gdprTypings.d.ts +0 -1
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +5 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.d.ts +30 -0
- package/vscode/src/vs/platform/theme/browser/defaultStyles.js +6 -0
- package/vscode/src/vs/platform/theme/browser/iconsStyleSheet.js +13 -11
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +28 -28
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostBulkEdits.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +104 -96
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostConfiguration.js +9 -3
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostDocumentSaveParticipant.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +19 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +87 -17
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +39 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.js +52 -36
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +10 -28
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +132 -136
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +72 -18
- package/vscode/src/vs/workbench/api/common/extHostWindow.js +3 -5
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +86 -76
- package/vscode/src/vs/workbench/browser/actions/media/actions.css.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/widgetNavigationCommands.js +30 -6
- package/vscode/src/vs/workbench/browser/labels.js +4 -1
- package/vscode/src/vs/workbench/browser/parts/compositePart.d.ts +3 -1
- package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +19 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +16 -3
- package/vscode/src/vs/workbench/browser/parts/editor/media/editorquickaccess.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +14 -33
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +33 -13
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +7 -5
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +4 -3
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.d.ts +2 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.d.ts +3 -1
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +182 -63
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +14 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +61 -34
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +16 -10
- package/vscode/src/vs/workbench/common/theme.js +144 -98
- package/vscode/src/vs/workbench/common/views.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +190 -138
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +876 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +59 -7
- package/vscode/src/vs/workbench/contrib/accessibility/browser/{accessibilityContributions.js → accessibleViewContributions.js} +160 -6
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +66 -150
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +21 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +30 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +201 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +42 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +13 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +366 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +35 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/annotations.js +4 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +95 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.service.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +94 -79
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/chatParticipantContribTypes.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +7 -9
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +1 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +30 -26
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +30 -29
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +5 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +13 -13
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +26 -16
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +107 -26
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +23 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +2 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +39 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +53 -33
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +967 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +101 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +4 -1
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +82 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +10 -9
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +79 -45
- package/vscode/src/vs/workbench/contrib/files/browser/{fileCommands.save.js → fileCommands._save.js} +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/{files.configuration.contribution.js → files.contribution._configuration.js} +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/{files.editorPane.contribution.js → files.contribution._editorPane.js} +18 -18
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +5 -3
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +19 -14
- package/vscode/src/vs/workbench/contrib/files/browser/views/media/openeditors.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +8 -8
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +15 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +29 -112
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +10 -7
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +99 -91
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +9 -31
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +345 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +62 -69
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +63 -46
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +18 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +1 -31
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +7 -3
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +5 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +4 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +2 -48
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +28 -23
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.js +5 -9
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +112 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +18 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +7 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +4 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +8 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +36 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +17 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +5 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +2 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +22 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +34 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +15 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProviderFactory.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +17 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +52 -16
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +25 -12
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +6 -4
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +0 -2
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +6 -4
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +24 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +38 -8
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +0 -1
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +1 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +7 -14
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +24 -6
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.js +2 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +8 -9
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +2 -20
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +1 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testItemCollection.js +10 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +15 -3
- package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.service.d.ts +9 -0
- package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.service.js +3 -0
- package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +30 -16
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +15 -4
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.service.d.ts +20 -1
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +0 -1
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocation.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +8 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +2 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.service.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +3 -3
- package/vscode/src/vs/workbench/services/language/common/languageService.js +23 -18
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +6 -4
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +50 -9
- package/vscode/src/vs/workbench/services/themes/common/workbenchThemeService.js +1 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/iconSelectBox.js +97 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopy.d.ts +7 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +2 -2
- package/vscode-dts/vscode.proposed.chatParticipant.d.ts +23 -45
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +65 -91
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +9 -0
- package/vscode-dts/vscode.proposed.chatTab.d.ts +1 -5
- package/vscode-dts/vscode.proposed.contribAccessibilityHelpContent.d.ts +15 -0
- package/vscode-dts/vscode.proposed.debugFocus.d.ts +4 -4
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +2 -2
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +144 -43
- package/vscode-dts/vscode.proposed.editorHoverVerbosityLevel.d.ts +76 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +1 -17
- package/vscode-dts/vscode.proposed.languageModels.d.ts +56 -11
- package/vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts +12 -1
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +4 -4
- package/vscode-dts/vscode.proposed.speech.d.ts +2 -1
- package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +144 -38
- package/vscode-dts/vscode.proposed.testPreserveFocus.d.ts +28 -0
- package/vscode/src/vs/base/browser/ui/hover/updatableHoverWidget.d.ts +0 -21
- package/vscode/src/vs/base/browser/ui/hover/updatableHoverWidget.js +0 -214
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.d.ts +0 -32
- package/vscode/src/vs/editor/contrib/hover/browser/contentHover.js +0 -838
- package/vscode/src/vs/editor/contrib/hover/browser/hover.js +0 -621
- package/vscode/src/vs/platform/accessibility/common/accessibility.service.d.ts +0 -19
- package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -54
- package/vscode/src/vs/workbench/api/common/extHostIssueReporter.js +0 -70
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.js +0 -237
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalDebuggerContribution.js +0 -49
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalLineFeatureContribution.js +0 -178
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +0 -141
- package/vscode/src/vs/workbench/contrib/chat/common/chatContributionService.service.js +0 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatFileCreationWidget.js +0 -212
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +0 -95
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +0 -110
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +0 -224
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.d.ts +0 -48
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEvents.js +0 -47
- package/vscode-dts/vscode.proposed.dropMetadata.d.ts +0 -65
- package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +0 -57
- package/vscode-dts/vscode.proposed.windowActivity.d.ts +0 -17
- /package/vscode/src/vs/workbench/browser/parts/editor/{editor.autosave.contribution.js → editor.contribution._autosave.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/files/browser/{files.fileEditorFactory.contribution.js → files.contribution._fileEditorFactory.js} +0 -0
|
@@ -2,6 +2,7 @@ import { ToolBar, IToolBarOptions } from '../../../base/browser/ui/toolbar/toolb
|
|
|
2
2
|
import { IAction } from '../../../base/common/actions.js';
|
|
3
3
|
import { MenuId, IMenuActionOptions } from '../common/actions.js';
|
|
4
4
|
import { IMenuService } from '../common/actions.service.js';
|
|
5
|
+
import { ICommandService } from '../../commands/common/commands.service.js';
|
|
5
6
|
import { IContextKeyService } from '../../contextkey/common/contextkey.service.js';
|
|
6
7
|
import { IContextMenuService } from '../../contextview/browser/contextView.service.js';
|
|
7
8
|
import { IKeybindingService } from '../../keybinding/common/keybinding.service.js';
|
|
@@ -65,8 +66,10 @@ declare class WorkbenchToolBar extends ToolBar {
|
|
|
65
66
|
private readonly _menuService;
|
|
66
67
|
private readonly _contextKeyService;
|
|
67
68
|
private readonly _contextMenuService;
|
|
69
|
+
private readonly _keybindingService;
|
|
70
|
+
private readonly _commandService;
|
|
68
71
|
private readonly _sessionDisposables;
|
|
69
|
-
constructor(container: HTMLElement, _options: IWorkbenchToolBarOptions | undefined, _menuService: IMenuService, _contextKeyService: IContextKeyService, _contextMenuService: IContextMenuService,
|
|
72
|
+
constructor(container: HTMLElement, _options: IWorkbenchToolBarOptions | undefined, _menuService: IMenuService, _contextKeyService: IContextKeyService, _contextMenuService: IContextMenuService, _keybindingService: IKeybindingService, _commandService: ICommandService, telemetryService: ITelemetryService);
|
|
70
73
|
setActions(_primary: readonly IAction[], _secondary?: readonly IAction[], menuIds?: readonly MenuId[]): void;
|
|
71
74
|
}
|
|
72
75
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { addDisposableListener, getWindow } from '../../../base/browser/dom.js';
|
|
3
3
|
import { StandardMouseEvent } from '../../../base/browser/mouseEvent.js';
|
|
4
|
-
import { ToolBar } from '../../../base/browser/ui/toolbar/toolbar.js';
|
|
4
|
+
import { ToolBar, ToggleMenuAction } from '../../../base/browser/ui/toolbar/toolbar.js';
|
|
5
5
|
import { Separator, toAction } from '../../../base/common/actions.js';
|
|
6
6
|
import { coalesceInPlace } from '../../../base/common/arrays.js';
|
|
7
7
|
import { intersection } from '../../../base/common/collections.js';
|
|
@@ -13,15 +13,17 @@ import { localizeWithPath } from '../../../nls.js';
|
|
|
13
13
|
import { createAndFillInActionBarActions } from './menuEntryActionViewItem.js';
|
|
14
14
|
import { MenuItemAction, SubmenuItemAction } from '../common/actions.js';
|
|
15
15
|
import { IMenuService } from '../common/actions.service.js';
|
|
16
|
+
import { createConfigureKeybindingAction } from '../common/menuService.js';
|
|
17
|
+
import { ICommandService } from '../../commands/common/commands.service.js';
|
|
16
18
|
import { IContextKeyService } from '../../contextkey/common/contextkey.service.js';
|
|
17
19
|
import { IContextMenuService } from '../../contextview/browser/contextView.service.js';
|
|
18
20
|
import { IKeybindingService } from '../../keybinding/common/keybinding.service.js';
|
|
19
21
|
import { ITelemetryService } from '../../telemetry/common/telemetry.service.js';
|
|
20
22
|
const _moduleId = "vs/platform/actions/browser/toolbar";
|
|
21
23
|
let WorkbenchToolBar = class WorkbenchToolBar extends ToolBar {
|
|
22
|
-
constructor(container, _options, _menuService, _contextKeyService, _contextMenuService,
|
|
24
|
+
constructor(container, _options, _menuService, _contextKeyService, _contextMenuService, _keybindingService, _commandService, telemetryService) {
|
|
23
25
|
super(container, _contextMenuService, {
|
|
24
|
-
getKeyBinding: (action) =>
|
|
26
|
+
getKeyBinding: (action) => _keybindingService.lookupKeybinding(action.id) ?? undefined,
|
|
25
27
|
..._options,
|
|
26
28
|
allowContextMenu: true,
|
|
27
29
|
skipTelemetry: typeof _options?.telemetrySource === 'string',
|
|
@@ -30,6 +32,8 @@ let WorkbenchToolBar = class WorkbenchToolBar extends ToolBar {
|
|
|
30
32
|
this._menuService = _menuService;
|
|
31
33
|
this._contextKeyService = _contextKeyService;
|
|
32
34
|
this._contextMenuService = _contextMenuService;
|
|
35
|
+
this._keybindingService = _keybindingService;
|
|
36
|
+
this._commandService = _commandService;
|
|
33
37
|
this._sessionDisposables = this._store.add(( (new DisposableStore())));
|
|
34
38
|
const telemetrySource = _options?.telemetrySource;
|
|
35
39
|
if (telemetrySource) {
|
|
@@ -88,7 +92,7 @@ let WorkbenchToolBar = class WorkbenchToolBar extends ToolBar {
|
|
|
88
92
|
coalesceInPlace(primary);
|
|
89
93
|
coalesceInPlace(extraSecondary);
|
|
90
94
|
super.setActions(primary, Separator.join(extraSecondary, secondary));
|
|
91
|
-
if (toggleActions.length > 0) {
|
|
95
|
+
if (toggleActions.length > 0 || primary.length > 0) {
|
|
92
96
|
this._sessionDisposables.add(addDisposableListener(this.getElement(), 'contextmenu', e => {
|
|
93
97
|
const event = ( (new StandardMouseEvent(getWindow(this.getElement()), e)));
|
|
94
98
|
const action = this.getItemAction(event.target);
|
|
@@ -97,38 +101,46 @@ let WorkbenchToolBar = class WorkbenchToolBar extends ToolBar {
|
|
|
97
101
|
}
|
|
98
102
|
event.preventDefault();
|
|
99
103
|
event.stopPropagation();
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
const primaryActions = [];
|
|
105
|
+
if (action instanceof MenuItemAction && action.menuKeybinding) {
|
|
106
|
+
primaryActions.push(action.menuKeybinding);
|
|
107
|
+
}
|
|
108
|
+
else if (!(action instanceof SubmenuItemAction || action instanceof ToggleMenuAction)) {
|
|
109
|
+
primaryActions.push(createConfigureKeybindingAction(action.id, undefined, this._commandService, this._keybindingService));
|
|
110
|
+
}
|
|
111
|
+
if (toggleActions.length > 0) {
|
|
112
|
+
let noHide = false;
|
|
113
|
+
if (toggleActionsCheckedCount === 1 && this._options?.hiddenItemStrategy === 0 ) {
|
|
114
|
+
noHide = true;
|
|
115
|
+
for (let i = 0; i < toggleActions.length; i++) {
|
|
116
|
+
if (toggleActions[i].checked) {
|
|
117
|
+
toggleActions[i] = toAction({
|
|
118
|
+
id: action.id,
|
|
119
|
+
label: action.label,
|
|
120
|
+
checked: true,
|
|
121
|
+
enabled: false,
|
|
122
|
+
run() { }
|
|
123
|
+
});
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
113
126
|
}
|
|
114
127
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
128
|
+
if (!noHide && (action instanceof MenuItemAction || action instanceof SubmenuItemAction)) {
|
|
129
|
+
if (!action.hideActions) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
primaryActions.push(action.hideActions.hide);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
primaryActions.push(toAction({
|
|
136
|
+
id: 'label',
|
|
137
|
+
label: ( localizeWithPath(_moduleId, 0, "Hide")),
|
|
138
|
+
enabled: false,
|
|
139
|
+
run() { }
|
|
140
|
+
}));
|
|
120
141
|
}
|
|
121
|
-
hideAction = action.hideActions.hide;
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
hideAction = toAction({
|
|
125
|
-
id: 'label',
|
|
126
|
-
label: ( localizeWithPath(_moduleId, 0, "Hide")),
|
|
127
|
-
enabled: false,
|
|
128
|
-
run() { }
|
|
129
|
-
});
|
|
130
142
|
}
|
|
131
|
-
const actions = Separator.join(
|
|
143
|
+
const actions = Separator.join(primaryActions, toggleActions);
|
|
132
144
|
if (this._options?.resetMenu && !menuIds) {
|
|
133
145
|
menuIds = [this._options.resetMenu];
|
|
134
146
|
}
|
|
@@ -140,6 +152,9 @@ let WorkbenchToolBar = class WorkbenchToolBar extends ToolBar {
|
|
|
140
152
|
run: () => this._menuService.resetHiddenStates(menuIds)
|
|
141
153
|
}));
|
|
142
154
|
}
|
|
155
|
+
if (actions.length === 0) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
143
158
|
this._contextMenuService.showContextMenu({
|
|
144
159
|
getAnchor: () => event,
|
|
145
160
|
getActions: () => actions,
|
|
@@ -157,11 +172,12 @@ WorkbenchToolBar = ( (__decorate([
|
|
|
157
172
|
( (__param(3, IContextKeyService))),
|
|
158
173
|
( (__param(4, IContextMenuService))),
|
|
159
174
|
( (__param(5, IKeybindingService))),
|
|
160
|
-
( (__param(6,
|
|
175
|
+
( (__param(6, ICommandService))),
|
|
176
|
+
( (__param(7, ITelemetryService)))
|
|
161
177
|
], WorkbenchToolBar)));
|
|
162
178
|
let MenuWorkbenchToolBar = class MenuWorkbenchToolBar extends WorkbenchToolBar {
|
|
163
|
-
constructor(container, menuId, options, menuService, contextKeyService, contextMenuService, keybindingService, telemetryService) {
|
|
164
|
-
super(container, { resetMenu: menuId, ...options }, menuService, contextKeyService, contextMenuService, keybindingService, telemetryService);
|
|
179
|
+
constructor(container, menuId, options, menuService, contextKeyService, contextMenuService, keybindingService, commandService, telemetryService) {
|
|
180
|
+
super(container, { resetMenu: menuId, ...options }, menuService, contextKeyService, contextMenuService, keybindingService, commandService, telemetryService);
|
|
165
181
|
this._onDidChangeMenuItems = this._store.add(( (new Emitter())));
|
|
166
182
|
this.onDidChangeMenuItems = this._onDidChangeMenuItems.event;
|
|
167
183
|
const menu = this._store.add(menuService.createMenu(menuId, contextKeyService, { emitEventsForSubmenuChanges: true }));
|
|
@@ -187,6 +203,7 @@ MenuWorkbenchToolBar = ( (__decorate([
|
|
|
187
203
|
( (__param(4, IContextKeyService))),
|
|
188
204
|
( (__param(5, IContextMenuService))),
|
|
189
205
|
( (__param(6, IKeybindingService))),
|
|
190
|
-
( (__param(7,
|
|
206
|
+
( (__param(7, ICommandService))),
|
|
207
|
+
( (__param(8, ITelemetryService)))
|
|
191
208
|
], MenuWorkbenchToolBar)));
|
|
192
209
|
export { MenuWorkbenchToolBar, WorkbenchToolBar };
|
|
@@ -195,6 +195,7 @@ declare class MenuId {
|
|
|
195
195
|
static readonly InlineEditToolbar: MenuId;
|
|
196
196
|
static readonly ChatContext: MenuId;
|
|
197
197
|
static readonly ChatCodeBlock: MenuId;
|
|
198
|
+
static readonly ChatCompareBlock: MenuId;
|
|
198
199
|
static readonly ChatMessageTitle: MenuId;
|
|
199
200
|
static readonly ChatExecute: MenuId;
|
|
200
201
|
static readonly ChatExecuteSecondary: MenuId;
|
|
@@ -270,6 +271,7 @@ interface IMenuItemHide {
|
|
|
270
271
|
}
|
|
271
272
|
declare class MenuItemAction implements IAction {
|
|
272
273
|
readonly hideActions: IMenuItemHide | undefined;
|
|
274
|
+
readonly menuKeybinding: IAction | undefined;
|
|
273
275
|
private _commandService;
|
|
274
276
|
static label(action: ICommandAction, options?: IMenuActionOptions): string;
|
|
275
277
|
readonly item: ICommandAction;
|
|
@@ -281,7 +283,7 @@ declare class MenuItemAction implements IAction {
|
|
|
281
283
|
readonly class: string | undefined;
|
|
282
284
|
readonly enabled: boolean;
|
|
283
285
|
readonly checked?: boolean;
|
|
284
|
-
constructor(item: ICommandAction, alt: ICommandAction | undefined, options: IMenuActionOptions | undefined, hideActions: IMenuItemHide | undefined, contextKeyService: IContextKeyService, _commandService: ICommandService);
|
|
286
|
+
constructor(item: ICommandAction, alt: ICommandAction | undefined, options: IMenuActionOptions | undefined, hideActions: IMenuItemHide | undefined, menuKeybinding: IAction | undefined, contextKeyService: IContextKeyService, _commandService: ICommandService);
|
|
285
287
|
run(...args: any[]): Promise<void>;
|
|
286
288
|
}
|
|
287
289
|
|
|
@@ -187,6 +187,7 @@ class MenuId {
|
|
|
187
187
|
static { this.InlineEditToolbar = ( new MenuId('InlineEditToolbar')); }
|
|
188
188
|
static { this.ChatContext = ( new MenuId('ChatContext')); }
|
|
189
189
|
static { this.ChatCodeBlock = ( new MenuId('ChatCodeblock')); }
|
|
190
|
+
static { this.ChatCompareBlock = ( new MenuId('ChatCompareBlock')); }
|
|
190
191
|
static { this.ChatMessageTitle = ( new MenuId('ChatMessageTitle')); }
|
|
191
192
|
static { this.ChatExecute = ( new MenuId('ChatExecute')); }
|
|
192
193
|
static { this.ChatExecuteSecondary = ( new MenuId('ChatExecuteSecondary')); }
|
|
@@ -321,8 +322,9 @@ let MenuItemAction = MenuItemAction_1 = class MenuItemAction {
|
|
|
321
322
|
? (typeof action.shortTitle === 'string' ? action.shortTitle : action.shortTitle.value)
|
|
322
323
|
: (typeof action.title === 'string' ? action.title : action.title.value);
|
|
323
324
|
}
|
|
324
|
-
constructor(item, alt, options, hideActions, contextKeyService, _commandService) {
|
|
325
|
+
constructor(item, alt, options, hideActions, menuKeybinding, contextKeyService, _commandService) {
|
|
325
326
|
this.hideActions = hideActions;
|
|
327
|
+
this.menuKeybinding = menuKeybinding;
|
|
326
328
|
this._commandService = _commandService;
|
|
327
329
|
this.id = item.id;
|
|
328
330
|
this.label = MenuItemAction_1.label(item, options);
|
|
@@ -347,7 +349,15 @@ let MenuItemAction = MenuItemAction_1 = class MenuItemAction {
|
|
|
347
349
|
icon = ThemeIcon.isThemeIcon(item.icon) ? item.icon : undefined;
|
|
348
350
|
}
|
|
349
351
|
this.item = item;
|
|
350
|
-
this.alt = alt ? ( new MenuItemAction_1(
|
|
352
|
+
this.alt = alt ? ( new MenuItemAction_1(
|
|
353
|
+
alt,
|
|
354
|
+
undefined,
|
|
355
|
+
options,
|
|
356
|
+
hideActions,
|
|
357
|
+
undefined,
|
|
358
|
+
contextKeyService,
|
|
359
|
+
_commandService
|
|
360
|
+
)) : undefined;
|
|
351
361
|
this._options = options;
|
|
352
362
|
this.class = icon && ThemeIcon.asClassName(icon);
|
|
353
363
|
}
|
|
@@ -363,8 +373,8 @@ let MenuItemAction = MenuItemAction_1 = class MenuItemAction {
|
|
|
363
373
|
}
|
|
364
374
|
};
|
|
365
375
|
MenuItemAction = MenuItemAction_1 = ( __decorate([
|
|
366
|
-
( __param(
|
|
367
|
-
( __param(
|
|
376
|
+
( __param(5, IContextKeyService)),
|
|
377
|
+
( __param(6, ICommandService))
|
|
368
378
|
], MenuItemAction));
|
|
369
379
|
class Action2 {
|
|
370
380
|
constructor(desc) {
|
|
@@ -5,15 +5,17 @@ import { DisposableStore } from '../../../base/common/lifecycle.js';
|
|
|
5
5
|
import { MenuRegistry, isIMenuItem, MenuItemAction, SubmenuItemAction, isISubmenuItem } from './actions.js';
|
|
6
6
|
import { ICommandService } from '../../commands/common/commands.service.js';
|
|
7
7
|
import { IContextKeyService } from '../../contextkey/common/contextkey.service.js';
|
|
8
|
-
import {
|
|
8
|
+
import { toAction, Separator } from '../../../base/common/actions.js';
|
|
9
9
|
import { IStorageService } from '../../storage/common/storage.service.js';
|
|
10
10
|
import { removeFastWithoutKeepingOrder } from '../../../base/common/arrays.js';
|
|
11
11
|
import { localizeWithPath } from '../../../nls.js';
|
|
12
|
+
import { IKeybindingService } from '../../keybinding/common/keybinding.service.js';
|
|
12
13
|
var PersistedMenuHideState_1, MenuInfo_1;
|
|
13
14
|
const _moduleId = "vs/platform/actions/common/menuService";
|
|
14
15
|
let MenuService = class MenuService {
|
|
15
|
-
constructor(_commandService, storageService) {
|
|
16
|
+
constructor(_commandService, _keybindingService, storageService) {
|
|
16
17
|
this._commandService = _commandService;
|
|
18
|
+
this._keybindingService = _keybindingService;
|
|
17
19
|
this._hiddenStates = ( (new PersistedMenuHideState(storageService)));
|
|
18
20
|
}
|
|
19
21
|
createMenu(id, contextKeyService, options) {
|
|
@@ -23,6 +25,7 @@ let MenuService = class MenuService {
|
|
|
23
25
|
this._hiddenStates,
|
|
24
26
|
{ emitEventsForSubmenuChanges: false, eventDebounceDelay: 50, ...options },
|
|
25
27
|
this._commandService,
|
|
28
|
+
this._keybindingService,
|
|
26
29
|
contextKeyService
|
|
27
30
|
))
|
|
28
31
|
);
|
|
@@ -33,7 +36,8 @@ let MenuService = class MenuService {
|
|
|
33
36
|
};
|
|
34
37
|
MenuService = ( (__decorate([
|
|
35
38
|
( (__param(0, ICommandService))),
|
|
36
|
-
( (__param(1,
|
|
39
|
+
( (__param(1, IKeybindingService))),
|
|
40
|
+
( (__param(2, IStorageService)))
|
|
37
41
|
], MenuService)));
|
|
38
42
|
let PersistedMenuHideState = class PersistedMenuHideState {
|
|
39
43
|
static { PersistedMenuHideState_1 = this; }
|
|
@@ -139,11 +143,12 @@ PersistedMenuHideState = PersistedMenuHideState_1 = ( (__decorate([
|
|
|
139
143
|
( (__param(0, IStorageService)))
|
|
140
144
|
], PersistedMenuHideState)));
|
|
141
145
|
let MenuInfo = MenuInfo_1 = class MenuInfo {
|
|
142
|
-
constructor(_id, _hiddenStates, _collectContextKeysForSubmenus, _commandService, _contextKeyService) {
|
|
146
|
+
constructor(_id, _hiddenStates, _collectContextKeysForSubmenus, _commandService, _keybindingService, _contextKeyService) {
|
|
143
147
|
this._id = _id;
|
|
144
148
|
this._hiddenStates = _hiddenStates;
|
|
145
149
|
this._collectContextKeysForSubmenus = _collectContextKeysForSubmenus;
|
|
146
150
|
this._commandService = _commandService;
|
|
151
|
+
this._keybindingService = _keybindingService;
|
|
147
152
|
this._contextKeyService = _contextKeyService;
|
|
148
153
|
this._menuGroups = [];
|
|
149
154
|
this._structureContextKeys = ( (new Set()));
|
|
@@ -206,11 +211,13 @@ let MenuInfo = MenuInfo_1 = class MenuInfo {
|
|
|
206
211
|
}
|
|
207
212
|
const menuHide = createMenuHide(this._id, isMenuItem ? item.command : item, this._hiddenStates);
|
|
208
213
|
if (isMenuItem) {
|
|
214
|
+
const menuKeybinding = createConfigureKeybindingAction(item.command.id, item.when, this._commandService, this._keybindingService);
|
|
209
215
|
activeActions.push(( (new MenuItemAction(
|
|
210
216
|
item.command,
|
|
211
217
|
item.alt,
|
|
212
218
|
options,
|
|
213
219
|
menuHide,
|
|
220
|
+
menuKeybinding,
|
|
214
221
|
this._contextKeyService,
|
|
215
222
|
this._commandService
|
|
216
223
|
))));
|
|
@@ -221,6 +228,7 @@ let MenuInfo = MenuInfo_1 = class MenuInfo {
|
|
|
221
228
|
this._hiddenStates,
|
|
222
229
|
this._collectContextKeysForSubmenus,
|
|
223
230
|
this._commandService,
|
|
231
|
+
this._keybindingService,
|
|
224
232
|
this._contextKeyService
|
|
225
233
|
))).createActionGroups(options);
|
|
226
234
|
const submenuActions = Separator.join(...( (groups.map(g => g[1]))));
|
|
@@ -282,16 +290,18 @@ let MenuInfo = MenuInfo_1 = class MenuInfo {
|
|
|
282
290
|
};
|
|
283
291
|
MenuInfo = MenuInfo_1 = ( (__decorate([
|
|
284
292
|
( (__param(3, ICommandService))),
|
|
285
|
-
( (__param(4,
|
|
293
|
+
( (__param(4, IKeybindingService))),
|
|
294
|
+
( (__param(5, IContextKeyService)))
|
|
286
295
|
], MenuInfo)));
|
|
287
296
|
let MenuImpl = class MenuImpl {
|
|
288
|
-
constructor(id, hiddenStates, options, commandService, contextKeyService) {
|
|
297
|
+
constructor(id, hiddenStates, options, commandService, keybindingService, contextKeyService) {
|
|
289
298
|
this._disposables = ( (new DisposableStore()));
|
|
290
299
|
this._menuInfo = ( (new MenuInfo(
|
|
291
300
|
id,
|
|
292
301
|
hiddenStates,
|
|
293
302
|
options.emitEventsForSubmenuChanges,
|
|
294
303
|
commandService,
|
|
304
|
+
keybindingService,
|
|
295
305
|
contextKeyService
|
|
296
306
|
)));
|
|
297
307
|
const rebuildMenuSoon = ( (new RunOnceScheduler(() => {
|
|
@@ -350,7 +360,8 @@ let MenuImpl = class MenuImpl {
|
|
|
350
360
|
};
|
|
351
361
|
MenuImpl = ( (__decorate([
|
|
352
362
|
( (__param(3, ICommandService))),
|
|
353
|
-
( (__param(4,
|
|
363
|
+
( (__param(4, IKeybindingService))),
|
|
364
|
+
( (__param(5, IContextKeyService)))
|
|
354
365
|
], MenuImpl)));
|
|
355
366
|
function createMenuHide(menu, command, states) {
|
|
356
367
|
const id = isISubmenuItem(command) ? command.submenu.id : command.id;
|
|
@@ -372,4 +383,15 @@ function createMenuHide(menu, command, states) {
|
|
|
372
383
|
get isHidden() { return !toggle.checked; },
|
|
373
384
|
};
|
|
374
385
|
}
|
|
375
|
-
|
|
386
|
+
function createConfigureKeybindingAction(commandId, when = undefined, commandService, keybindingService) {
|
|
387
|
+
return toAction({
|
|
388
|
+
id: `configureKeybinding/${commandId}`,
|
|
389
|
+
label: ( localizeWithPath(_moduleId, 1, "Configure Keybinding")),
|
|
390
|
+
run() {
|
|
391
|
+
const hasKeybinding = !!keybindingService.lookupKeybinding(commandId);
|
|
392
|
+
const whenValue = !hasKeybinding && when ? when.serialize() : undefined;
|
|
393
|
+
commandService.executeCommand('workbench.action.openGlobalKeybindings', `@command:${commandId}` + (whenValue ? ` +when:${whenValue}` : ''));
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
export { MenuService, createConfigureKeybindingAction };
|
|
@@ -51,6 +51,10 @@ function addToValueTree(settingsTreeRoot, key, value, conflictReporter) {
|
|
|
51
51
|
obj = curr[s] = Object.create(null);
|
|
52
52
|
break;
|
|
53
53
|
case 'object':
|
|
54
|
+
if (obj === null) {
|
|
55
|
+
conflictReporter(`Ignoring ${key} as ${segments.slice(0, i + 1).join('.')} is null`);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
54
58
|
break;
|
|
55
59
|
default:
|
|
56
60
|
conflictReporter(`Ignoring ${key} as ${segments.slice(0, i + 1).join('.')} is ${JSON.stringify(obj)}`);
|
|
@@ -13,11 +13,15 @@ function freeze(data) {
|
|
|
13
13
|
return Object.isFrozen(data) ? data : deepFreeze(data);
|
|
14
14
|
}
|
|
15
15
|
class ConfigurationModel {
|
|
16
|
-
|
|
16
|
+
static createEmptyModel(logService) {
|
|
17
|
+
return ( new ConfigurationModel({}, [], [], undefined, logService));
|
|
18
|
+
}
|
|
19
|
+
constructor(_contents, _keys, _overrides, raw, logService) {
|
|
17
20
|
this._contents = _contents;
|
|
18
21
|
this._keys = _keys;
|
|
19
22
|
this._overrides = _overrides;
|
|
20
23
|
this.raw = raw;
|
|
24
|
+
this.logService = logService;
|
|
21
25
|
this.overrideConfigurations = ( new Map());
|
|
22
26
|
}
|
|
23
27
|
get rawConfiguration() {
|
|
@@ -27,7 +31,7 @@ class ConfigurationModel {
|
|
|
27
31
|
if (raw instanceof ConfigurationModel) {
|
|
28
32
|
return raw;
|
|
29
33
|
}
|
|
30
|
-
const parser = ( new ConfigurationModelParser(''));
|
|
34
|
+
const parser = ( new ConfigurationModelParser('', this.logService));
|
|
31
35
|
parser.parseRaw(raw);
|
|
32
36
|
return parser.configurationModel;
|
|
33
37
|
}));
|
|
@@ -69,7 +73,7 @@ class ConfigurationModel {
|
|
|
69
73
|
get overrides() {
|
|
70
74
|
const overrides = [];
|
|
71
75
|
for (const { contents, identifiers, keys } of that.rawConfiguration.overrides) {
|
|
72
|
-
const value = ( new ConfigurationModel(contents, keys)).getValue(section);
|
|
76
|
+
const value = ( new ConfigurationModel(contents, keys, [], undefined, that.logService)).getValue(section);
|
|
73
77
|
if (value !== undefined) {
|
|
74
78
|
overrides.push({ identifiers, value });
|
|
75
79
|
}
|
|
@@ -140,7 +144,8 @@ class ConfigurationModel {
|
|
|
140
144
|
contents,
|
|
141
145
|
keys,
|
|
142
146
|
overrides,
|
|
143
|
-
raws.every(raw => raw instanceof ConfigurationModel) ? undefined : raws
|
|
147
|
+
raws.every(raw => raw instanceof ConfigurationModel) ? undefined : raws,
|
|
148
|
+
this.logService
|
|
144
149
|
));
|
|
145
150
|
}
|
|
146
151
|
createOverrideConfigurationModel(identifier) {
|
|
@@ -163,7 +168,7 @@ class ConfigurationModel {
|
|
|
163
168
|
}
|
|
164
169
|
contents[key] = contentsForKey;
|
|
165
170
|
}
|
|
166
|
-
return ( new ConfigurationModel(contents, this.keys, this.overrides));
|
|
171
|
+
return ( new ConfigurationModel(contents, this.keys, this.overrides, undefined, this.logService));
|
|
167
172
|
}
|
|
168
173
|
mergeContents(source, target) {
|
|
169
174
|
for (const key of ( Object.keys(target))) {
|
|
@@ -225,7 +230,7 @@ class ConfigurationModel {
|
|
|
225
230
|
}
|
|
226
231
|
}
|
|
227
232
|
updateValue(key, value, add) {
|
|
228
|
-
addToValueTree(this.contents, key, value, e =>
|
|
233
|
+
addToValueTree(this.contents, key, value, e => this.logService.error(e));
|
|
229
234
|
add = add || this.keys.indexOf(key) === -1;
|
|
230
235
|
if (add) {
|
|
231
236
|
this.keys.push(key);
|
|
@@ -234,21 +239,22 @@ class ConfigurationModel {
|
|
|
234
239
|
this.overrides.push({
|
|
235
240
|
identifiers: overrideIdentifiersFromKey(key),
|
|
236
241
|
keys: ( Object.keys(this.contents[key])),
|
|
237
|
-
contents: toValuesTree(this.contents[key], message =>
|
|
242
|
+
contents: toValuesTree(this.contents[key], message => this.logService.error(message)),
|
|
238
243
|
});
|
|
239
244
|
}
|
|
240
245
|
}
|
|
241
246
|
}
|
|
242
247
|
class ConfigurationModelParser {
|
|
243
|
-
constructor(_name) {
|
|
248
|
+
constructor(_name, logService) {
|
|
244
249
|
this._name = _name;
|
|
250
|
+
this.logService = logService;
|
|
245
251
|
this._raw = null;
|
|
246
252
|
this._configurationModel = null;
|
|
247
253
|
this._restrictedConfigurations = [];
|
|
248
254
|
this._parseErrors = [];
|
|
249
255
|
}
|
|
250
256
|
get configurationModel() {
|
|
251
|
-
return this._configurationModel ||
|
|
257
|
+
return this._configurationModel || ConfigurationModel.createEmptyModel(this.logService);
|
|
252
258
|
}
|
|
253
259
|
get restrictedConfigurations() {
|
|
254
260
|
return this._restrictedConfigurations;
|
|
@@ -274,7 +280,8 @@ class ConfigurationModelParser {
|
|
|
274
280
|
contents,
|
|
275
281
|
keys,
|
|
276
282
|
overrides,
|
|
277
|
-
hasExcludedProperties ? [raw] : undefined
|
|
283
|
+
hasExcludedProperties ? [raw] : undefined ,
|
|
284
|
+
this.logService
|
|
278
285
|
));
|
|
279
286
|
this._restrictedConfigurations = restricted || [];
|
|
280
287
|
}
|
|
@@ -325,7 +332,7 @@ class ConfigurationModelParser {
|
|
|
325
332
|
raw = currentParent[0] || {};
|
|
326
333
|
}
|
|
327
334
|
catch (e) {
|
|
328
|
-
|
|
335
|
+
this.logService.error(`Error while parsing settings file ${this._name}: ${e}`);
|
|
329
336
|
this._parseErrors = [e];
|
|
330
337
|
}
|
|
331
338
|
}
|
|
@@ -335,9 +342,9 @@ class ConfigurationModelParser {
|
|
|
335
342
|
const configurationProperties = ( Registry.as(Extensions.Configuration)).getConfigurationProperties();
|
|
336
343
|
const filtered = this.filter(raw, configurationProperties, true, options);
|
|
337
344
|
raw = filtered.raw;
|
|
338
|
-
const contents = toValuesTree(raw, message =>
|
|
345
|
+
const contents = toValuesTree(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));
|
|
339
346
|
const keys = ( Object.keys(raw));
|
|
340
|
-
const overrides = this.toOverrides(raw, message =>
|
|
347
|
+
const overrides = this.toOverrides(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));
|
|
341
348
|
return { contents, keys, overrides, restricted: filtered.restricted, hasExcludedProperties: filtered.hasExcludedProperties };
|
|
342
349
|
}
|
|
343
350
|
filter(properties, configurationProperties, filterOverriddenProperties, options) {
|
|
@@ -392,14 +399,15 @@ class ConfigurationModelParser {
|
|
|
392
399
|
}
|
|
393
400
|
}
|
|
394
401
|
class UserSettings extends Disposable {
|
|
395
|
-
constructor(userSettingsResource, parseOptions, extUri, fileService) {
|
|
402
|
+
constructor(userSettingsResource, parseOptions, extUri, fileService, logService) {
|
|
396
403
|
super();
|
|
397
404
|
this.userSettingsResource = userSettingsResource;
|
|
398
405
|
this.parseOptions = parseOptions;
|
|
399
406
|
this.fileService = fileService;
|
|
407
|
+
this.logService = logService;
|
|
400
408
|
this._onDidChange = this._register(( new Emitter()));
|
|
401
409
|
this.onDidChange = this._onDidChange.event;
|
|
402
|
-
this.parser = ( new ConfigurationModelParser(( this.userSettingsResource.toString())));
|
|
410
|
+
this.parser = ( new ConfigurationModelParser(( this.userSettingsResource.toString()), logService));
|
|
403
411
|
this._register(this.fileService.watch(extUri.dirname(this.userSettingsResource)));
|
|
404
412
|
this._register(this.fileService.watch(this.userSettingsResource));
|
|
405
413
|
this._register(Event.any(Event.filter(this.fileService.onDidFilesChange, e => e.contains(this.userSettingsResource)), Event.filter(this.fileService.onDidRunOperation, e => (e.isOperation(0 ) || e.isOperation(3 ) || e.isOperation(1 ) || e.isOperation(4 )) && extUri.isEqual(e.resource, userSettingsResource)))(() => this._onDidChange.fire()));
|
|
@@ -411,7 +419,7 @@ class UserSettings extends Disposable {
|
|
|
411
419
|
return this.parser.configurationModel;
|
|
412
420
|
}
|
|
413
421
|
catch (e) {
|
|
414
|
-
return
|
|
422
|
+
return ConfigurationModel.createEmptyModel(this.logService);
|
|
415
423
|
}
|
|
416
424
|
}
|
|
417
425
|
reparse(parseOptions) {
|
|
@@ -557,7 +565,7 @@ class ConfigurationInspectValue {
|
|
|
557
565
|
}
|
|
558
566
|
}
|
|
559
567
|
let Configuration$1 = class Configuration {
|
|
560
|
-
constructor(_defaultConfiguration, _policyConfiguration, _applicationConfiguration, _localUserConfiguration, _remoteUserConfiguration
|
|
568
|
+
constructor(_defaultConfiguration, _policyConfiguration, _applicationConfiguration, _localUserConfiguration, _remoteUserConfiguration, _workspaceConfiguration, _folderConfigurations, _memoryConfiguration, _memoryConfigurationByResource, logService) {
|
|
561
569
|
this._defaultConfiguration = _defaultConfiguration;
|
|
562
570
|
this._policyConfiguration = _policyConfiguration;
|
|
563
571
|
this._applicationConfiguration = _applicationConfiguration;
|
|
@@ -567,6 +575,7 @@ let Configuration$1 = class Configuration {
|
|
|
567
575
|
this._folderConfigurations = _folderConfigurations;
|
|
568
576
|
this._memoryConfiguration = _memoryConfiguration;
|
|
569
577
|
this._memoryConfigurationByResource = _memoryConfigurationByResource;
|
|
578
|
+
this.logService = logService;
|
|
570
579
|
this._workspaceConsolidatedConfiguration = null;
|
|
571
580
|
this._foldersConsolidatedConfigurations = ( new ResourceMap());
|
|
572
581
|
this._userConfiguration = null;
|
|
@@ -580,7 +589,7 @@ let Configuration$1 = class Configuration {
|
|
|
580
589
|
if (overrides.resource) {
|
|
581
590
|
memoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource);
|
|
582
591
|
if (!memoryConfiguration) {
|
|
583
|
-
memoryConfiguration =
|
|
592
|
+
memoryConfiguration = ConfigurationModel.createEmptyModel(this.logService);
|
|
584
593
|
this._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration);
|
|
585
594
|
}
|
|
586
595
|
}
|
|
@@ -887,14 +896,14 @@ let Configuration$1 = class Configuration {
|
|
|
887
896
|
this._folderConfigurations.forEach(folderConfiguration => folderConfiguration.getKeysForOverrideIdentifier(overrideIdentifier).forEach(key => keys.add(key)));
|
|
888
897
|
return [...( keys.values())];
|
|
889
898
|
}
|
|
890
|
-
static parse(data) {
|
|
891
|
-
const defaultConfiguration = this.parseConfigurationModel(data.defaults);
|
|
892
|
-
const policyConfiguration = this.parseConfigurationModel(data.policy);
|
|
893
|
-
const applicationConfiguration = this.parseConfigurationModel(data.application);
|
|
894
|
-
const userConfiguration = this.parseConfigurationModel(data.user);
|
|
895
|
-
const workspaceConfiguration = this.parseConfigurationModel(data.workspace);
|
|
899
|
+
static parse(data, logService) {
|
|
900
|
+
const defaultConfiguration = this.parseConfigurationModel(data.defaults, logService);
|
|
901
|
+
const policyConfiguration = this.parseConfigurationModel(data.policy, logService);
|
|
902
|
+
const applicationConfiguration = this.parseConfigurationModel(data.application, logService);
|
|
903
|
+
const userConfiguration = this.parseConfigurationModel(data.user, logService);
|
|
904
|
+
const workspaceConfiguration = this.parseConfigurationModel(data.workspace, logService);
|
|
896
905
|
const folders = data.folders.reduce((result, value) => {
|
|
897
|
-
result.set(URI.revive(value[0]), this.parseConfigurationModel(value[1]));
|
|
906
|
+
result.set(URI.revive(value[0]), this.parseConfigurationModel(value[1], logService));
|
|
898
907
|
return result;
|
|
899
908
|
}, ( new ResourceMap()));
|
|
900
909
|
return ( new Configuration(
|
|
@@ -902,15 +911,16 @@ let Configuration$1 = class Configuration {
|
|
|
902
911
|
policyConfiguration,
|
|
903
912
|
applicationConfiguration,
|
|
904
913
|
userConfiguration,
|
|
905
|
-
|
|
914
|
+
ConfigurationModel.createEmptyModel(logService),
|
|
906
915
|
workspaceConfiguration,
|
|
907
916
|
folders,
|
|
908
|
-
|
|
909
|
-
( new ResourceMap())
|
|
917
|
+
ConfigurationModel.createEmptyModel(logService),
|
|
918
|
+
( new ResourceMap()),
|
|
919
|
+
logService
|
|
910
920
|
));
|
|
911
921
|
}
|
|
912
|
-
static parseConfigurationModel(model) {
|
|
913
|
-
return ( new ConfigurationModel(model.contents, model.keys, model.overrides));
|
|
922
|
+
static parseConfigurationModel(model, logService) {
|
|
923
|
+
return ( new ConfigurationModel(model.contents, model.keys, model.overrides, undefined, logService));
|
|
914
924
|
}
|
|
915
925
|
};
|
|
916
926
|
function mergeChanges(...changes) {
|
|
@@ -934,11 +944,12 @@ function mergeChanges(...changes) {
|
|
|
934
944
|
return { keys: [...( keysSet.values())], overrides };
|
|
935
945
|
}
|
|
936
946
|
class ConfigurationChangeEvent {
|
|
937
|
-
constructor(change, previous, currentConfiguraiton, currentWorkspace) {
|
|
947
|
+
constructor(change, previous, currentConfiguraiton, currentWorkspace, logService) {
|
|
938
948
|
this.change = change;
|
|
939
949
|
this.previous = previous;
|
|
940
950
|
this.currentConfiguraiton = currentConfiguraiton;
|
|
941
951
|
this.currentWorkspace = currentWorkspace;
|
|
952
|
+
this.logService = logService;
|
|
942
953
|
this._marker = '\n';
|
|
943
954
|
this._markerCode1 = this._marker.charCodeAt(0);
|
|
944
955
|
this._markerCode2 = '.'.charCodeAt(0);
|
|
@@ -959,7 +970,7 @@ class ConfigurationChangeEvent {
|
|
|
959
970
|
}
|
|
960
971
|
get previousConfiguration() {
|
|
961
972
|
if (!this._previousConfiguration && this.previous) {
|
|
962
|
-
this._previousConfiguration = Configuration$1.parse(this.previous.data);
|
|
973
|
+
this._previousConfiguration = Configuration$1.parse(this.previous.data, this.logService);
|
|
963
974
|
}
|
|
964
975
|
return this._previousConfiguration;
|
|
965
976
|
}
|