@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ServiceIdentifier } from '../../../platform/instantiation/common/instantiation.js';
|
|
2
2
|
import { LanguageFeatureRegistry, NotebookInfoResolver } from '../languageFeatureRegistry.js';
|
|
3
|
-
import { ReferenceProvider, DefinitionProvider, TypeDefinitionProvider, DeclarationProvider, ImplementationProvider, CodeActionProvider, DocumentPasteEditProvider, RenameProvider, NewSymbolNamesProvider, DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, DocumentSymbolProvider, InlayHintsProvider, DocumentColorProvider, CodeLensProvider, SignatureHelpProvider, HoverProvider, DocumentHighlightProvider, MultiDocumentHighlightProvider, DocumentRangeSemanticTokensProvider, DocumentSemanticTokensProvider, SelectionRangeProvider, FoldingRangeProvider, LinkProvider, InlineCompletionsProvider, InlineEditProvider, CompletionItemProvider, LinkedEditingRangeProvider, InlineValuesProvider, EvaluatableExpressionProvider,
|
|
3
|
+
import { ReferenceProvider, DefinitionProvider, TypeDefinitionProvider, DeclarationProvider, ImplementationProvider, CodeActionProvider, DocumentPasteEditProvider, RenameProvider, NewSymbolNamesProvider, DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, DocumentSymbolProvider, InlayHintsProvider, DocumentColorProvider, CodeLensProvider, SignatureHelpProvider, HoverProvider, DocumentHighlightProvider, MultiDocumentHighlightProvider, DocumentRangeSemanticTokensProvider, DocumentSemanticTokensProvider, SelectionRangeProvider, FoldingRangeProvider, LinkProvider, InlineCompletionsProvider, InlineEditProvider, CompletionItemProvider, LinkedEditingRangeProvider, InlineValuesProvider, EvaluatableExpressionProvider, DocumentDropEditProvider, MappedEditsProvider } from '../languages.js';
|
|
4
4
|
|
|
5
5
|
declare const ILanguageFeaturesService: ServiceIdentifier<ILanguageFeaturesService>;
|
|
6
6
|
interface ILanguageFeaturesService {
|
|
@@ -36,7 +36,7 @@ interface ILanguageFeaturesService {
|
|
|
36
36
|
readonly linkedEditingRangeProvider: LanguageFeatureRegistry<LinkedEditingRangeProvider>;
|
|
37
37
|
readonly inlineValuesProvider: LanguageFeatureRegistry<InlineValuesProvider>;
|
|
38
38
|
readonly evaluatableExpressionProvider: LanguageFeatureRegistry<EvaluatableExpressionProvider>;
|
|
39
|
-
readonly
|
|
39
|
+
readonly documentDropEditProvider: LanguageFeatureRegistry<DocumentDropEditProvider>;
|
|
40
40
|
readonly mappedEditsProvider: LanguageFeatureRegistry<MappedEditsProvider>;
|
|
41
41
|
setNotebookTypeResolver(resolver: NotebookInfoResolver | undefined): void;
|
|
42
42
|
}
|
|
@@ -33,7 +33,7 @@ class LanguageFeaturesService {
|
|
|
33
33
|
this.evaluatableExpressionProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
34
34
|
this.documentRangeSemanticTokensProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
35
35
|
this.documentSemanticTokensProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
36
|
-
this.
|
|
36
|
+
this.documentDropEditProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
37
37
|
this.documentPasteEditProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
38
38
|
this.mappedEditsProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
39
39
|
}
|
|
@@ -261,6 +261,11 @@ var GlyphMarginLane;
|
|
|
261
261
|
GlyphMarginLane[GlyphMarginLane["Center"] = 2] = "Center";
|
|
262
262
|
GlyphMarginLane[GlyphMarginLane["Right"] = 3] = "Right";
|
|
263
263
|
})(GlyphMarginLane || (GlyphMarginLane = {})));
|
|
264
|
+
var HoverVerbosityAction;
|
|
265
|
+
( (function(HoverVerbosityAction) {
|
|
266
|
+
HoverVerbosityAction[HoverVerbosityAction["Increase"] = 0] = "Increase";
|
|
267
|
+
HoverVerbosityAction[HoverVerbosityAction["Decrease"] = 1] = "Decrease";
|
|
268
|
+
})(HoverVerbosityAction || (HoverVerbosityAction = {})));
|
|
264
269
|
var IndentAction;
|
|
265
270
|
( (function(IndentAction) {
|
|
266
271
|
IndentAction[IndentAction["None"] = 0] = "None";
|
|
@@ -470,6 +475,11 @@ var NewSymbolNameTag;
|
|
|
470
475
|
( (function(NewSymbolNameTag) {
|
|
471
476
|
NewSymbolNameTag[NewSymbolNameTag["AIGenerated"] = 1] = "AIGenerated";
|
|
472
477
|
})(NewSymbolNameTag || (NewSymbolNameTag = {})));
|
|
478
|
+
var NewSymbolNameTriggerKind;
|
|
479
|
+
( (function(NewSymbolNameTriggerKind) {
|
|
480
|
+
NewSymbolNameTriggerKind[NewSymbolNameTriggerKind["Invoke"] = 0] = "Invoke";
|
|
481
|
+
NewSymbolNameTriggerKind[NewSymbolNameTriggerKind["Automatic"] = 1] = "Automatic";
|
|
482
|
+
})(NewSymbolNameTriggerKind || (NewSymbolNameTriggerKind = {})));
|
|
473
483
|
var OverlayWidgetPositionPreference;
|
|
474
484
|
( (function(OverlayWidgetPositionPreference) {
|
|
475
485
|
OverlayWidgetPositionPreference[OverlayWidgetPositionPreference["TOP_RIGHT_CORNER"] = 0] = "TOP_RIGHT_CORNER";
|
|
@@ -604,4 +614,4 @@ var WrappingIndent;
|
|
|
604
614
|
WrappingIndent[WrappingIndent["Indent"] = 2] = "Indent";
|
|
605
615
|
WrappingIndent[WrappingIndent["DeepIndent"] = 3] = "DeepIndent";
|
|
606
616
|
})(WrappingIndent || (WrappingIndent = {})));
|
|
607
|
-
export { AccessibilitySupport, CodeActionTriggerType, CompletionItemInsertTextRule, CompletionItemKind, CompletionItemTag, CompletionTriggerKind, ContentWidgetPositionPreference, CursorChangeReason, DefaultEndOfLine, DocumentHighlightKind, EditorAutoIndentStrategy, EditorOption, EndOfLinePreference, EndOfLineSequence, GlyphMarginLane, IndentAction, InjectedTextCursorStops, InlayHintKind, InlineCompletionTriggerKind, InlineEditTriggerKind, KeyCode, MarkerSeverity, MarkerTag, MinimapPosition, MinimapSectionHeaderStyle, MouseTargetType, NewSymbolNameTag, OverlayWidgetPositionPreference, OverviewRulerLane, PartialAcceptTriggerKind, PositionAffinity, RenderLineNumbersType, RenderMinimap, ScrollType, ScrollbarVisibility, SelectionDirection, ShowLightbulbIconMode, SignatureHelpTriggerKind, SymbolKind, SymbolTag, TextEditorCursorBlinkingStyle, TextEditorCursorStyle, TrackedRangeStickiness, WrappingIndent };
|
|
617
|
+
export { AccessibilitySupport, CodeActionTriggerType, CompletionItemInsertTextRule, CompletionItemKind, CompletionItemTag, CompletionTriggerKind, ContentWidgetPositionPreference, CursorChangeReason, DefaultEndOfLine, DocumentHighlightKind, EditorAutoIndentStrategy, EditorOption, EndOfLinePreference, EndOfLineSequence, GlyphMarginLane, HoverVerbosityAction, IndentAction, InjectedTextCursorStops, InlayHintKind, InlineCompletionTriggerKind, InlineEditTriggerKind, KeyCode, MarkerSeverity, MarkerTag, MinimapPosition, MinimapSectionHeaderStyle, MouseTargetType, NewSymbolNameTag, NewSymbolNameTriggerKind, OverlayWidgetPositionPreference, OverviewRulerLane, PartialAcceptTriggerKind, PositionAffinity, RenderLineNumbersType, RenderMinimap, ScrollType, ScrollbarVisibility, SelectionDirection, ShowLightbulbIconMode, SignatureHelpTriggerKind, SymbolKind, SymbolTag, TextEditorCursorBlinkingStyle, TextEditorCursorStyle, TrackedRangeStickiness, WrappingIndent };
|
|
@@ -966,6 +966,9 @@ class ViewModel extends Disposable {
|
|
|
966
966
|
this._eventDispatcher.endEmitViewEvents();
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
+
batchEvents(callback) {
|
|
970
|
+
this._withViewEventsCollector(() => { callback(); });
|
|
971
|
+
}
|
|
969
972
|
normalizePosition(position, affinity) {
|
|
970
973
|
return this._lines.normalizePosition(position, affinity);
|
|
971
974
|
}
|
|
@@ -36,6 +36,7 @@ import { registerThemingParticipant } from '../../../../platform/theme/common/th
|
|
|
36
36
|
import { CodeActionTriggerSource, CodeActionKind } from '../common/types.js';
|
|
37
37
|
import { CodeActionModel } from './codeActionModel.js';
|
|
38
38
|
import { HierarchicalKind } from '../../../../base/common/hierarchicalKind.js';
|
|
39
|
+
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.service.js';
|
|
39
40
|
var CodeActionController_1;
|
|
40
41
|
const _moduleId = "vs/editor/contrib/codeAction/browser/codeActionController";
|
|
41
42
|
const DECORATION_CLASS_NAME = 'quickfix-edit-highlight';
|
|
@@ -45,12 +46,13 @@ let CodeActionController = class CodeActionController extends Disposable {
|
|
|
45
46
|
static get(editor) {
|
|
46
47
|
return editor.getContribution(CodeActionController_1.ID);
|
|
47
48
|
}
|
|
48
|
-
constructor(editor, markerService, contextKeyService, instantiationService, languageFeaturesService, progressService, _commandService, _configurationService, _actionWidgetService, _instantiationService) {
|
|
49
|
+
constructor(editor, markerService, contextKeyService, instantiationService, languageFeaturesService, progressService, _commandService, _configurationService, _actionWidgetService, _instantiationService, _telemetryService) {
|
|
49
50
|
super();
|
|
50
51
|
this._commandService = _commandService;
|
|
51
52
|
this._configurationService = _configurationService;
|
|
52
53
|
this._actionWidgetService = _actionWidgetService;
|
|
53
54
|
this._instantiationService = _instantiationService;
|
|
55
|
+
this._telemetryService = _telemetryService;
|
|
54
56
|
this._activeCodeActions = this._register(( (new MutableDisposable())));
|
|
55
57
|
this._showDisabled = false;
|
|
56
58
|
this._disposed = false;
|
|
@@ -79,6 +81,11 @@ let CodeActionController = class CodeActionController extends Disposable {
|
|
|
79
81
|
super.dispose();
|
|
80
82
|
}
|
|
81
83
|
async showCodeActionsFromLightbulb(actions, at) {
|
|
84
|
+
this._telemetryService.publicLog2('codeAction.showCodeActionsFromLightbulb', {
|
|
85
|
+
codeActionListLength: actions.validActions.length,
|
|
86
|
+
codeActions: ( (actions.validActions.map(action => action.action.title))),
|
|
87
|
+
codeActionProviders: ( (actions.validActions.map(action => action.provider?.displayName ?? ''))),
|
|
88
|
+
});
|
|
82
89
|
if (actions.allAIFixes && actions.validActions.length === 1) {
|
|
83
90
|
const actionItem = actions.validActions[0];
|
|
84
91
|
const command = actionItem.action.command;
|
|
@@ -219,13 +226,19 @@ let CodeActionController = class CodeActionController extends Disposable {
|
|
|
219
226
|
const anchor = Position.isIPosition(at) ? this.toCoords(at) : at;
|
|
220
227
|
const delegate = {
|
|
221
228
|
onSelect: async (action, preview) => {
|
|
222
|
-
this._applyCodeAction(action, true, !!preview, ApplyCodeActionReason.FromCodeActions);
|
|
223
|
-
this._actionWidgetService.hide();
|
|
229
|
+
this._applyCodeAction(action, true, !!preview, options.fromLightbulb ? ApplyCodeActionReason.FromAILightbulb : ApplyCodeActionReason.FromCodeActions);
|
|
230
|
+
this._actionWidgetService.hide(false);
|
|
224
231
|
currentDecorations.clear();
|
|
225
232
|
},
|
|
226
|
-
onHide: () => {
|
|
233
|
+
onHide: (didCancel) => {
|
|
227
234
|
this._editor?.focus();
|
|
228
235
|
currentDecorations.clear();
|
|
236
|
+
if (options.fromLightbulb && didCancel !== undefined) {
|
|
237
|
+
this._telemetryService.publicLog2('codeAction.showCodeActionList.onHide', {
|
|
238
|
+
codeActionListLength: actions.validActions.length,
|
|
239
|
+
didCancel: didCancel,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
229
242
|
},
|
|
230
243
|
onHover: async (action, token) => {
|
|
231
244
|
if (token.isCancellationRequested) {
|
|
@@ -238,7 +251,9 @@ let CodeActionController = class CodeActionController extends Disposable {
|
|
|
238
251
|
const refactorKinds = [
|
|
239
252
|
CodeActionKind.RefactorExtract,
|
|
240
253
|
CodeActionKind.RefactorInline,
|
|
241
|
-
CodeActionKind.RefactorRewrite
|
|
254
|
+
CodeActionKind.RefactorRewrite,
|
|
255
|
+
CodeActionKind.RefactorMove,
|
|
256
|
+
CodeActionKind.Source
|
|
242
257
|
];
|
|
243
258
|
canPreview = ( (refactorKinds.some(refactorKind => refactorKind.contains(hierarchicalKind))));
|
|
244
259
|
}
|
|
@@ -346,7 +361,8 @@ CodeActionController = CodeActionController_1 = ( (__decorate([
|
|
|
346
361
|
( (__param(6, ICommandService))),
|
|
347
362
|
( (__param(7, IConfigurationService))),
|
|
348
363
|
( (__param(8, IActionWidgetService))),
|
|
349
|
-
( (__param(9, IInstantiationService)))
|
|
364
|
+
( (__param(9, IInstantiationService))),
|
|
365
|
+
( (__param(10, ITelemetryService)))
|
|
350
366
|
], CodeActionController)));
|
|
351
367
|
registerThemingParticipant((theme, collector) => {
|
|
352
368
|
const addBackgroundColorRule = (selector, color) => {
|
|
@@ -273,6 +273,11 @@ class CodeActionModel extends Disposable {
|
|
|
273
273
|
if (!isManualToAutoTransition) {
|
|
274
274
|
this.setState(newState);
|
|
275
275
|
}
|
|
276
|
+
else {
|
|
277
|
+
setTimeout(() => {
|
|
278
|
+
this.setState(newState);
|
|
279
|
+
}, 500);
|
|
280
|
+
}
|
|
276
281
|
}, undefined));
|
|
277
282
|
this._codeActionOracle.value.trigger({ type: 2 , triggerAction: CodeActionTriggerSource.Default });
|
|
278
283
|
}
|
|
@@ -44,6 +44,7 @@ let LightBulbWidget = class LightBulbWidget extends Disposable {
|
|
|
44
44
|
this._state = LightBulbState.Hidden;
|
|
45
45
|
this._iconClasses = [];
|
|
46
46
|
this._domNode = $('div.lightBulbWidget');
|
|
47
|
+
this._domNode.role = 'listbox';
|
|
47
48
|
this._register(Gesture.ignoreTarget(this._domNode));
|
|
48
49
|
this._editor.addContentWidget(this);
|
|
49
50
|
this._register(this._editor.onDidChangeModelContent(_ => {
|
|
@@ -3,7 +3,7 @@ import { registerEditorContribution } from '../../../browser/editorExtensions.js
|
|
|
3
3
|
import { Range } from '../../../common/core/range.js';
|
|
4
4
|
import { ColorDecorationInjectedTextMarker } from './colorDetector.js';
|
|
5
5
|
import { ColorHoverParticipant } from './colorHoverParticipant.js';
|
|
6
|
-
import { HoverController } from '../../hover/browser/
|
|
6
|
+
import { HoverController } from '../../hover/browser/hoverController.js';
|
|
7
7
|
import { HoverParticipantRegistry } from '../../hover/browser/hoverTypes.js';
|
|
8
8
|
class ColorContribution extends Disposable {
|
|
9
9
|
static { this.ID = 'editor.contrib.colorContribution'; }
|
|
@@ -16,7 +16,14 @@ class ShowOrFocusStandaloneColorPicker extends EditorAction2 {
|
|
|
16
16
|
precondition: undefined,
|
|
17
17
|
menu: [
|
|
18
18
|
{ id: MenuId.CommandPalette },
|
|
19
|
-
]
|
|
19
|
+
],
|
|
20
|
+
metadata: {
|
|
21
|
+
description: ( localize2WithPath(
|
|
22
|
+
_moduleId,
|
|
23
|
+
2,
|
|
24
|
+
"Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors."
|
|
25
|
+
)),
|
|
26
|
+
}
|
|
20
27
|
});
|
|
21
28
|
}
|
|
22
29
|
runEditorCommand(_accessor, editor) {
|
|
@@ -27,12 +34,15 @@ class HideStandaloneColorPicker extends EditorAction {
|
|
|
27
34
|
constructor() {
|
|
28
35
|
super({
|
|
29
36
|
id: 'editor.action.hideColorPicker',
|
|
30
|
-
label: ( localizeWithPath(_moduleId,
|
|
37
|
+
label: ( localizeWithPath(_moduleId, 3, "Hide the Color Picker")),
|
|
31
38
|
alias: 'Hide the Color Picker',
|
|
32
39
|
precondition: ( (EditorContextKeys.standaloneColorPickerVisible.isEqualTo(true))),
|
|
33
40
|
kbOpts: {
|
|
34
41
|
primary: 9 ,
|
|
35
42
|
weight: 100
|
|
43
|
+
},
|
|
44
|
+
metadata: {
|
|
45
|
+
description: ( localize2WithPath(_moduleId, 4, "Hide the standalone color picker.")),
|
|
36
46
|
}
|
|
37
47
|
});
|
|
38
48
|
}
|
|
@@ -44,12 +54,19 @@ class InsertColorWithStandaloneColorPicker extends EditorAction {
|
|
|
44
54
|
constructor() {
|
|
45
55
|
super({
|
|
46
56
|
id: 'editor.action.insertColorWithStandaloneColorPicker',
|
|
47
|
-
label: ( localizeWithPath(_moduleId,
|
|
57
|
+
label: ( localizeWithPath(_moduleId, 5, "Insert Color with Standalone Color Picker")),
|
|
48
58
|
alias: 'Insert Color with Standalone Color Picker',
|
|
49
59
|
precondition: ( (EditorContextKeys.standaloneColorPickerFocused.isEqualTo(true))),
|
|
50
60
|
kbOpts: {
|
|
51
61
|
primary: 3 ,
|
|
52
62
|
weight: 100
|
|
63
|
+
},
|
|
64
|
+
metadata: {
|
|
65
|
+
description: ( localize2WithPath(
|
|
66
|
+
_moduleId,
|
|
67
|
+
6,
|
|
68
|
+
"Insert hex/rgb/hsl colors with the focused standalone color picker."
|
|
69
|
+
)),
|
|
53
70
|
}
|
|
54
71
|
});
|
|
55
72
|
}
|
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
3
3
|
import { StandaloneColorPickerParticipant } from './colorHoverParticipant.js';
|
|
4
4
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
5
|
-
import { EditorHoverStatusBar } from '../../hover/browser/
|
|
5
|
+
import { EditorHoverStatusBar } from '../../hover/browser/contentHoverStatusBar.js';
|
|
6
6
|
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
7
7
|
import { Emitter } from '../../../../base/common/event.js';
|
|
8
8
|
import { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';
|
|
@@ -7,7 +7,7 @@ import { isIOS } from '../../../../base/common/platform.js';
|
|
|
7
7
|
import { registerEditorContribution, registerEditorAction, EditorAction } from '../../../browser/editorExtensions.js';
|
|
8
8
|
import { EditorContextKeys } from '../../../common/editorContextKeys.js';
|
|
9
9
|
import { localizeWithPath } from '../../../../nls.js';
|
|
10
|
-
import {
|
|
10
|
+
import { SubmenuItemAction } from '../../../../platform/actions/common/actions.js';
|
|
11
11
|
import { IMenuService } from '../../../../platform/actions/common/actions.service.js';
|
|
12
12
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
13
13
|
import { IContextMenuService, IContextViewService } from '../../../../platform/contextview/browser/contextView.service.js';
|
|
@@ -106,7 +106,7 @@ let ContextMenuController = class ContextMenuController {
|
|
|
106
106
|
if (!this._editor.hasModel()) {
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
const menuActions = this._getMenuActions(this._editor.getModel(), this._editor.
|
|
109
|
+
const menuActions = this._getMenuActions(this._editor.getModel(), this._editor.contextMenuId);
|
|
110
110
|
if (menuActions.length > 0) {
|
|
111
111
|
this._doShowContextMenu(menuActions, anchor);
|
|
112
112
|
}
|
|
@@ -23,7 +23,7 @@ class SimplePasteAndDropProvider {
|
|
|
23
23
|
edits: [{ insertText: edit.insertText, title: edit.title, kind: edit.kind, handledMimeType: edit.handledMimeType, yieldTo: edit.yieldTo }]
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
async
|
|
26
|
+
async provideDocumentDropEdits(_model, _position, dataTransfer, token) {
|
|
27
27
|
const edit = await this.getEdit(dataTransfer, token);
|
|
28
28
|
return edit ? [{ insertText: edit.insertText, title: edit.title, kind: edit.kind, handledMimeType: edit.handledMimeType, yieldTo: edit.yieldTo }] : undefined;
|
|
29
29
|
}
|
|
@@ -176,9 +176,9 @@ async function extractUriList(dataTransfer) {
|
|
|
176
176
|
let DefaultDropProvidersFeature = class DefaultDropProvidersFeature extends Disposable {
|
|
177
177
|
constructor(languageFeaturesService, workspaceContextService) {
|
|
178
178
|
super();
|
|
179
|
-
this._register(languageFeaturesService.
|
|
180
|
-
this._register(languageFeaturesService.
|
|
181
|
-
this._register(languageFeaturesService.
|
|
179
|
+
this._register(languageFeaturesService.documentDropEditProvider.register('*', ( (new DefaultTextPasteOrDropEditProvider()))));
|
|
180
|
+
this._register(languageFeaturesService.documentDropEditProvider.register('*', ( (new PathProvider()))));
|
|
181
|
+
this._register(languageFeaturesService.documentDropEditProvider.register('*', ( (new RelativePathProvider(workspaceContextService)))));
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
184
|
DefaultDropProvidersFeature = ( (__decorate([
|
|
@@ -63,7 +63,7 @@ let DropIntoEditorController = class DropIntoEditorController extends Disposable
|
|
|
63
63
|
if (!model) {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
const providers = this._languageFeaturesService.
|
|
66
|
+
const providers = this._languageFeaturesService.documentDropEditProvider
|
|
67
67
|
.ordered(model)
|
|
68
68
|
.filter(provider => {
|
|
69
69
|
if (!provider.dropMimeTypes) {
|
|
@@ -96,7 +96,7 @@ let DropIntoEditorController = class DropIntoEditorController extends Disposable
|
|
|
96
96
|
async getDropEdits(providers, model, position, dataTransfer, tokenSource) {
|
|
97
97
|
const results = await raceCancellation(Promise.all(( (providers.map(async (provider) => {
|
|
98
98
|
try {
|
|
99
|
-
const edits = await provider.
|
|
99
|
+
const edits = await provider.provideDocumentDropEdits(model, position, dataTransfer, tokenSource.token);
|
|
100
100
|
return edits?.map(edit => ({ ...edit, providerId: provider.id }));
|
|
101
101
|
}
|
|
102
102
|
catch (err) {
|
|
@@ -115,12 +115,16 @@ let PostEditWidgetManager = class PostEditWidgetManager extends Disposable {
|
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
const resolvedEdit = await resolve(edit, token);
|
|
118
|
+
if (token.isCancellationRequested) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
118
121
|
const combinedWorkspaceEdit = createCombinedWorkspaceEdit(model.uri, ranges, resolvedEdit);
|
|
119
122
|
const primaryRange = ranges[0];
|
|
120
123
|
const editTrackingDecoration = model.deltaDecorations([], [{
|
|
121
124
|
range: primaryRange,
|
|
122
125
|
options: { description: 'paste-line-suffix', stickiness: 0 }
|
|
123
126
|
}]);
|
|
127
|
+
this._editor.focus();
|
|
124
128
|
let editResult;
|
|
125
129
|
let editRange;
|
|
126
130
|
try {
|
|
@@ -130,6 +134,9 @@ let PostEditWidgetManager = class PostEditWidgetManager extends Disposable {
|
|
|
130
134
|
finally {
|
|
131
135
|
model.deltaDecorations(editTrackingDecoration, []);
|
|
132
136
|
}
|
|
137
|
+
if (token.isCancellationRequested) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
133
140
|
if (canShowWidget && editResult.isApplied && edits.allEdits.length > 1) {
|
|
134
141
|
this.show(editRange ?? primaryRange, edits, async (newEditIndex) => {
|
|
135
142
|
const model = this._editor.getModel();
|
|
@@ -23,6 +23,7 @@ import { IQuickInputService } from '../../../../platform/quickinput/common/quick
|
|
|
23
23
|
import { IStorageService } from '../../../../platform/storage/common/storage.service.js';
|
|
24
24
|
import { themeColorFromId } from '../../../../platform/theme/common/themeService.js';
|
|
25
25
|
import { IThemeService } from '../../../../platform/theme/common/themeService.service.js';
|
|
26
|
+
import { IHoverService } from '../../../../platform/hover/browser/hover.service.js';
|
|
26
27
|
import Severity$1 from '../../../../base/common/severity.js';
|
|
27
28
|
var CommonFindController_1;
|
|
28
29
|
const _moduleId = "vs/editor/contrib/find/browser/findController";
|
|
@@ -57,7 +58,7 @@ let CommonFindController = class CommonFindController extends Disposable {
|
|
|
57
58
|
static get(editor) {
|
|
58
59
|
return editor.getContribution(CommonFindController_1.ID);
|
|
59
60
|
}
|
|
60
|
-
constructor(editor, contextKeyService, storageService, clipboardService, notificationService) {
|
|
61
|
+
constructor(editor, contextKeyService, storageService, clipboardService, notificationService, hoverService) {
|
|
61
62
|
super();
|
|
62
63
|
this._editor = editor;
|
|
63
64
|
this._findWidgetVisible = CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService);
|
|
@@ -65,6 +66,7 @@ let CommonFindController = class CommonFindController extends Disposable {
|
|
|
65
66
|
this._storageService = storageService;
|
|
66
67
|
this._clipboardService = clipboardService;
|
|
67
68
|
this._notificationService = notificationService;
|
|
69
|
+
this._hoverService = hoverService;
|
|
68
70
|
this._updateHistoryDelayer = ( (new Delayer(500)));
|
|
69
71
|
this._state = this._register(( (new FindReplaceState())));
|
|
70
72
|
this.loadQueryState();
|
|
@@ -331,11 +333,12 @@ CommonFindController = CommonFindController_1 = ( (__decorate([
|
|
|
331
333
|
( (__param(1, IContextKeyService))),
|
|
332
334
|
( (__param(2, IStorageService))),
|
|
333
335
|
( (__param(3, IClipboardService))),
|
|
334
|
-
( (__param(4, INotificationService)))
|
|
336
|
+
( (__param(4, INotificationService))),
|
|
337
|
+
( (__param(5, IHoverService)))
|
|
335
338
|
], CommonFindController)));
|
|
336
339
|
let FindController = class FindController extends CommonFindController {
|
|
337
|
-
constructor(editor, _contextViewService, _contextKeyService, _keybindingService, _themeService, notificationService, _storageService, clipboardService) {
|
|
338
|
-
super(editor, _contextKeyService, _storageService, clipboardService, notificationService);
|
|
340
|
+
constructor(editor, _contextViewService, _contextKeyService, _keybindingService, _themeService, notificationService, _storageService, clipboardService, hoverService) {
|
|
341
|
+
super(editor, _contextKeyService, _storageService, clipboardService, notificationService, hoverService);
|
|
339
342
|
this._contextViewService = _contextViewService;
|
|
340
343
|
this._keybindingService = _keybindingService;
|
|
341
344
|
this._themeService = _themeService;
|
|
@@ -393,7 +396,8 @@ let FindController = class FindController extends CommonFindController {
|
|
|
393
396
|
this._contextKeyService,
|
|
394
397
|
this._themeService,
|
|
395
398
|
this._storageService,
|
|
396
|
-
this._notificationService
|
|
399
|
+
this._notificationService,
|
|
400
|
+
this._hoverService
|
|
397
401
|
))));
|
|
398
402
|
this._findOptionsWidget = this._register(( (new FindOptionsWidget(this._editor, this._state, this._keybindingService))));
|
|
399
403
|
}
|
|
@@ -411,7 +415,8 @@ FindController = ( (__decorate([
|
|
|
411
415
|
( (__param(4, IThemeService))),
|
|
412
416
|
( (__param(5, INotificationService))),
|
|
413
417
|
( (__param(6, IStorageService))),
|
|
414
|
-
( (__param(7, IClipboardService)))
|
|
418
|
+
( (__param(7, IClipboardService))),
|
|
419
|
+
( (__param(8, IHoverService)))
|
|
415
420
|
], FindController)));
|
|
416
421
|
const StartFindAction = registerMultiEditorAction(( (new MultiEditorAction({
|
|
417
422
|
id: FIND_IDS.StartFindAction,
|
|
@@ -32,7 +32,6 @@ import { ThemeIcon } from '../../../../base/common/themables.js';
|
|
|
32
32
|
import { isHighContrast } from '../../../../platform/theme/common/theme.js';
|
|
33
33
|
import { assertIsDefined } from '../../../../base/common/types.js';
|
|
34
34
|
import { defaultInputBoxStyles, defaultToggleStyles } from '../../../../platform/theme/browser/defaultStyles.js';
|
|
35
|
-
import { setupCustomHover } from '../../../../base/browser/ui/hover/updatableHoverWidget.js';
|
|
36
35
|
import { createInstantHoverDelegate, getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
37
36
|
const _moduleId = "vs/editor/contrib/find/browser/findWidget";
|
|
38
37
|
const findSelectionIcon = registerIcon('find-selection', Codicon.selection, ( localizeWithPath(_moduleId, 0, 'Icon for \'Find in Selection\' in the editor find widget.')));
|
|
@@ -94,8 +93,9 @@ function stopPropagationForMultiLineDownwards(event, value, textarea) {
|
|
|
94
93
|
}
|
|
95
94
|
class FindWidget extends Widget {
|
|
96
95
|
static { this.ID = 'editor.contrib.findWidget'; }
|
|
97
|
-
constructor(codeEditor, controller, state, contextViewProvider, keybindingService, contextKeyService, themeService, storageService, notificationService) {
|
|
96
|
+
constructor(codeEditor, controller, state, contextViewProvider, keybindingService, contextKeyService, themeService, storageService, notificationService, _hoverService) {
|
|
98
97
|
super();
|
|
98
|
+
this._hoverService = _hoverService;
|
|
99
99
|
this._cachedHeight = null;
|
|
100
100
|
this._revealTimeouts = [];
|
|
101
101
|
this._codeEditor = codeEditor;
|
|
@@ -811,7 +811,7 @@ class FindWidget extends Widget {
|
|
|
811
811
|
onTrigger: () => {
|
|
812
812
|
assertIsDefined(this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction)).run().then(undefined, onUnexpectedError);
|
|
813
813
|
}
|
|
814
|
-
}))));
|
|
814
|
+
}, this._hoverService))));
|
|
815
815
|
this._nextBtn = this._register(( (new SimpleButton({
|
|
816
816
|
label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.NextMatchFindAction),
|
|
817
817
|
icon: findNextMatchIcon,
|
|
@@ -819,7 +819,7 @@ class FindWidget extends Widget {
|
|
|
819
819
|
onTrigger: () => {
|
|
820
820
|
assertIsDefined(this._codeEditor.getAction(FIND_IDS.NextMatchFindAction)).run().then(undefined, onUnexpectedError);
|
|
821
821
|
}
|
|
822
|
-
}))));
|
|
822
|
+
}, this._hoverService))));
|
|
823
823
|
const findPart = document.createElement('div');
|
|
824
824
|
findPart.className = 'find-part';
|
|
825
825
|
findPart.appendChild(this._findInput.domNode);
|
|
@@ -881,7 +881,7 @@ class FindWidget extends Widget {
|
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
}))));
|
|
884
|
+
}, this._hoverService))));
|
|
885
885
|
this._replaceInput = this._register(( (new ContextScopedReplaceInput(null, undefined, {
|
|
886
886
|
label: NLS_REPLACE_INPUT_LABEL,
|
|
887
887
|
placeholder: NLS_REPLACE_INPUT_PLACEHOLDER,
|
|
@@ -940,7 +940,7 @@ class FindWidget extends Widget {
|
|
|
940
940
|
e.preventDefault();
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
|
-
}))));
|
|
943
|
+
}, this._hoverService))));
|
|
944
944
|
this._replaceAllBtn = this._register(( (new SimpleButton({
|
|
945
945
|
label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceAllAction),
|
|
946
946
|
icon: findReplaceAllIcon,
|
|
@@ -948,7 +948,7 @@ class FindWidget extends Widget {
|
|
|
948
948
|
onTrigger: () => {
|
|
949
949
|
this._controller.replaceAll();
|
|
950
950
|
}
|
|
951
|
-
}))));
|
|
951
|
+
}, this._hoverService))));
|
|
952
952
|
const replacePart = document.createElement('div');
|
|
953
953
|
replacePart.className = 'replace-part';
|
|
954
954
|
replacePart.appendChild(this._replaceInput.domNode);
|
|
@@ -968,7 +968,7 @@ class FindWidget extends Widget {
|
|
|
968
968
|
}
|
|
969
969
|
this._showViewZone();
|
|
970
970
|
}
|
|
971
|
-
}))));
|
|
971
|
+
}, this._hoverService))));
|
|
972
972
|
this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
|
|
973
973
|
this._domNode = document.createElement('div');
|
|
974
974
|
this._domNode.className = 'editor-widget find-widget';
|
|
@@ -1049,7 +1049,7 @@ class FindWidget extends Widget {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
1051
|
class SimpleButton extends Widget {
|
|
1052
|
-
constructor(opts) {
|
|
1052
|
+
constructor(opts, hoverService) {
|
|
1053
1053
|
super();
|
|
1054
1054
|
this._opts = opts;
|
|
1055
1055
|
let className = 'button';
|
|
@@ -1064,7 +1064,7 @@ class SimpleButton extends Widget {
|
|
|
1064
1064
|
this._domNode.className = className;
|
|
1065
1065
|
this._domNode.setAttribute('role', 'button');
|
|
1066
1066
|
this._domNode.setAttribute('aria-label', this._opts.label);
|
|
1067
|
-
this._register(
|
|
1067
|
+
this._register(hoverService.setupUpdatableHover(opts.hoverDelegate ?? getDefaultHoverDelegate('element'), this._domNode, this._opts.label));
|
|
1068
1068
|
this.onclick(this._domNode, (e) => {
|
|
1069
1069
|
this._opts.onTrigger();
|
|
1070
1070
|
e.preventDefault();
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { coalesce } from '../../../../base/common/arrays.js';
|
|
2
|
+
import { AsyncIterableObject } from '../../../../base/common/async.js';
|
|
3
|
+
class ContentHoverComputer {
|
|
4
|
+
get anchor() { return this._anchor; }
|
|
5
|
+
set anchor(value) { this._anchor = value; }
|
|
6
|
+
get shouldFocus() { return this._shouldFocus; }
|
|
7
|
+
set shouldFocus(value) { this._shouldFocus = value; }
|
|
8
|
+
get source() { return this._source; }
|
|
9
|
+
set source(value) { this._source = value; }
|
|
10
|
+
get insistOnKeepingHoverVisible() { return this._insistOnKeepingHoverVisible; }
|
|
11
|
+
set insistOnKeepingHoverVisible(value) { this._insistOnKeepingHoverVisible = value; }
|
|
12
|
+
constructor(_editor, _participants) {
|
|
13
|
+
this._editor = _editor;
|
|
14
|
+
this._participants = _participants;
|
|
15
|
+
this._anchor = null;
|
|
16
|
+
this._shouldFocus = false;
|
|
17
|
+
this._source = 0 ;
|
|
18
|
+
this._insistOnKeepingHoverVisible = false;
|
|
19
|
+
}
|
|
20
|
+
static _getLineDecorations(editor, anchor) {
|
|
21
|
+
if (anchor.type !== 1 && !anchor.supportsMarkerHover) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const model = editor.getModel();
|
|
25
|
+
const lineNumber = anchor.range.startLineNumber;
|
|
26
|
+
if (lineNumber > model.getLineCount()) {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
const maxColumn = model.getLineMaxColumn(lineNumber);
|
|
30
|
+
return editor.getLineDecorations(lineNumber).filter((d) => {
|
|
31
|
+
if (d.options.isWholeLine) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;
|
|
35
|
+
const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;
|
|
36
|
+
if (d.options.showIfCollapsed) {
|
|
37
|
+
if (startColumn > anchor.range.startColumn + 1 || anchor.range.endColumn - 1 > endColumn) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
if (startColumn > anchor.range.startColumn || anchor.range.endColumn > endColumn) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
computeAsync(token) {
|
|
50
|
+
const anchor = this._anchor;
|
|
51
|
+
if (!this._editor.hasModel() || !anchor) {
|
|
52
|
+
return AsyncIterableObject.EMPTY;
|
|
53
|
+
}
|
|
54
|
+
const lineDecorations = ContentHoverComputer._getLineDecorations(this._editor, anchor);
|
|
55
|
+
return AsyncIterableObject.merge(( this._participants.map((participant) => {
|
|
56
|
+
if (!participant.computeAsync) {
|
|
57
|
+
return AsyncIterableObject.EMPTY;
|
|
58
|
+
}
|
|
59
|
+
return participant.computeAsync(anchor, lineDecorations, token);
|
|
60
|
+
})));
|
|
61
|
+
}
|
|
62
|
+
computeSync() {
|
|
63
|
+
if (!this._editor.hasModel() || !this._anchor) {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
const lineDecorations = ContentHoverComputer._getLineDecorations(this._editor, this._anchor);
|
|
67
|
+
let result = [];
|
|
68
|
+
for (const participant of this._participants) {
|
|
69
|
+
result = result.concat(participant.computeSync(this._anchor, lineDecorations));
|
|
70
|
+
}
|
|
71
|
+
return coalesce(result);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export { ContentHoverComputer };
|