@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
|
@@ -15,6 +15,7 @@ import { MenuEntryActionViewItem, createAndFillInActionBarActions } from '../../
|
|
|
15
15
|
import { WorkbenchToolBar } from '../../../../platform/actions/browser/toolbar.js';
|
|
16
16
|
import { MenuId, MenuItemAction } from '../../../../platform/actions/common/actions.js';
|
|
17
17
|
import { IMenuService } from '../../../../platform/actions/common/actions.service.js';
|
|
18
|
+
import { ICommandService } from '../../../../platform/commands/common/commands.service.js';
|
|
18
19
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
19
20
|
import { IContextMenuService } from '../../../../platform/contextview/browser/contextView.service.js';
|
|
20
21
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
@@ -148,8 +149,8 @@ class StatusBarViewItem extends MenuEntryActionViewItem {
|
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
151
|
let CustomizedMenuWorkbenchToolBar = class CustomizedMenuWorkbenchToolBar extends WorkbenchToolBar {
|
|
151
|
-
constructor(container, editor, menuId, options2, menuService, contextKeyService, contextMenuService, keybindingService, telemetryService) {
|
|
152
|
-
super(container, { resetMenu: menuId, ...options2 }, menuService, contextKeyService, contextMenuService, keybindingService, telemetryService);
|
|
152
|
+
constructor(container, editor, menuId, options2, menuService, contextKeyService, contextMenuService, keybindingService, commandService, telemetryService) {
|
|
153
|
+
super(container, { resetMenu: menuId, ...options2 }, menuService, contextKeyService, contextMenuService, keybindingService, commandService, telemetryService);
|
|
153
154
|
this.editor = editor;
|
|
154
155
|
this.menuId = menuId;
|
|
155
156
|
this.options2 = options2;
|
|
@@ -190,6 +191,7 @@ CustomizedMenuWorkbenchToolBar = ( __decorate([
|
|
|
190
191
|
( __param(5, IContextKeyService)),
|
|
191
192
|
( __param(6, IContextMenuService)),
|
|
192
193
|
( __param(7, IKeybindingService)),
|
|
193
|
-
( __param(8,
|
|
194
|
+
( __param(8, ICommandService)),
|
|
195
|
+
( __param(9, ITelemetryService))
|
|
194
196
|
], CustomizedMenuWorkbenchToolBar));
|
|
195
197
|
export { CustomizedMenuWorkbenchToolBar, InlineEditHintsContentWidget, InlineEditHintsWidget };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import n from '../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
-
var css = ".inline-editor-progress-decoration{display:inline-block;height:1em;width:1em}.inline-progress-widget{align-items:center;display:flex!important;justify-content:center}.inline-progress-widget .icon{font-size:80%!important}.inline-progress-widget:hover .icon{animation:none;font-size:90%!important}.inline-progress-widget:hover .icon:before{content
|
|
2
|
+
var css = ".inline-editor-progress-decoration{display:inline-block;height:1em;width:1em}.inline-progress-widget{align-items:center;display:flex!important;justify-content:center}.inline-progress-widget .icon{font-size:80%!important}.inline-progress-widget:hover .icon{animation:none;font-size:90%!important}.inline-progress-widget:hover .icon:before{content:var(--vscode-icon-x-content);font-family:var(--vscode-icon-x-font-family)}";
|
|
3
3
|
n(css,{});
|
|
4
4
|
export { css, css as default };
|
|
@@ -13,6 +13,7 @@ import { ICodeEditorService } from '../../../browser/services/codeEditorService.
|
|
|
13
13
|
import { Position } from '../../../common/core/position.js';
|
|
14
14
|
import { Range } from '../../../common/core/range.js';
|
|
15
15
|
import { EditorContextKeys } from '../../../common/editorContextKeys.js';
|
|
16
|
+
import { NewSymbolNameTriggerKind } from '../../../common/languages.js';
|
|
16
17
|
import { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';
|
|
17
18
|
import { ITextResourceConfigurationService } from '../../../common/services/textResourceConfiguration.js';
|
|
18
19
|
import { EditorStateCancellationTokenSource } from '../../editorState/browser/editorState.js';
|
|
@@ -198,10 +199,21 @@ let RenameController = class RenameController {
|
|
|
198
199
|
)));
|
|
199
200
|
const model = this.editor.getModel();
|
|
200
201
|
const newSymbolNamesProviders = this._languageFeaturesService.newSymbolNamesProvider.all(model);
|
|
201
|
-
const
|
|
202
|
+
const resolvedNewSymbolnamesProviders = await Promise.all(( (newSymbolNamesProviders.map(
|
|
203
|
+
async (p) => [p, (await p.supportsAutomaticNewSymbolNamesTriggerKind) ?? false]
|
|
204
|
+
))));
|
|
205
|
+
const requestRenameSuggestions = (triggerKind, cts) => {
|
|
206
|
+
let providers = resolvedNewSymbolnamesProviders.slice();
|
|
207
|
+
if (triggerKind === NewSymbolNameTriggerKind.Automatic) {
|
|
208
|
+
providers = providers.filter(([_, supportsAutomatic]) => supportsAutomatic);
|
|
209
|
+
}
|
|
210
|
+
return (
|
|
211
|
+
(providers.map(([p,]) => p.provideNewSymbolNames(model, loc.range, triggerKind, cts)))
|
|
212
|
+
);
|
|
213
|
+
};
|
|
202
214
|
trace('creating rename input field and awaiting its result');
|
|
203
215
|
const supportPreview = this._bulkEditService.hasPreviewHandler() && this._configService.getValue(this.editor.getModel().uri, 'editor.rename.enablePreview');
|
|
204
|
-
const inputFieldResult = await this._renameWidget.getInput(loc.range, loc.text, supportPreview, requestRenameSuggestions, cts2);
|
|
216
|
+
const inputFieldResult = await this._renameWidget.getInput(loc.range, loc.text, supportPreview, newSymbolNamesProviders.length > 0 ? requestRenameSuggestions : undefined, cts2);
|
|
205
217
|
trace('received response from rename input field');
|
|
206
218
|
if (newSymbolNamesProviders.length > 0) {
|
|
207
219
|
this._reportTelemetry(newSymbolNamesProviders.length, model.getLanguageId(), inputFieldResult);
|
|
@@ -300,6 +312,8 @@ let RenameController = class RenameController {
|
|
|
300
312
|
nRenameSuggestions: inputFieldResult.stats.nRenameSuggestions,
|
|
301
313
|
timeBeforeFirstInputFieldEdit: inputFieldResult.stats.timeBeforeFirstInputFieldEdit,
|
|
302
314
|
wantsPreview: inputFieldResult.wantsPreview,
|
|
315
|
+
nRenameSuggestionsInvocations: inputFieldResult.stats.nRenameSuggestionsInvocations,
|
|
316
|
+
hadAutomaticRenameSuggestionsInvocation: inputFieldResult.stats.hadAutomaticRenameSuggestionsInvocation,
|
|
303
317
|
};
|
|
304
318
|
this._telemetryService.publicLog2('renameInvokedEvent', value);
|
|
305
319
|
}
|
|
@@ -407,8 +421,7 @@ registerAction2(class FocusNextRenameSuggestion extends Action2 {
|
|
|
407
421
|
precondition: CONTEXT_RENAME_INPUT_VISIBLE,
|
|
408
422
|
keybinding: [
|
|
409
423
|
{
|
|
410
|
-
primary:
|
|
411
|
-
secondary: [18 ],
|
|
424
|
+
primary: 18 ,
|
|
412
425
|
weight: 100 + 99,
|
|
413
426
|
}
|
|
414
427
|
]
|
|
@@ -436,8 +449,7 @@ registerAction2(class FocusPreviousRenameSuggestion extends Action2 {
|
|
|
436
449
|
precondition: CONTEXT_RENAME_INPUT_VISIBLE,
|
|
437
450
|
keybinding: [
|
|
438
451
|
{
|
|
439
|
-
primary:
|
|
440
|
-
secondary: [16 ],
|
|
452
|
+
primary: 16 ,
|
|
441
453
|
weight: 100 + 99,
|
|
442
454
|
}
|
|
443
455
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import n from '../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
-
var css = ".monaco-editor .rename-box{border-radius:4px;color:inherit;z-index:100}.monaco-editor .rename-box.preview{padding:4px 4px 0}.monaco-editor .rename-box .rename-input{border-radius:2px;padding:3px;width:calc(100% - 8px)}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}";
|
|
2
|
+
var css = ".monaco-editor .rename-box{border-radius:4px;color:inherit;z-index:100}.monaco-editor .rename-box.preview{padding:4px 4px 0}.monaco-editor .rename-box .rename-input-with-button{border-radius:2px;padding:3px;width:calc(100% - 8px)}.monaco-editor .rename-box .rename-input{padding:0;width:calc(100% - 8px)}.monaco-editor .rename-box .rename-input:focus{outline:none}.monaco-editor .rename-box .rename-suggestions-button{align-items:center;background-color:transparent;border:none;border-radius:5px;cursor:pointer;display:flex;padding:3px}.monaco-editor .rename-box .rename-suggestions-button:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-editor .rename-box .rename-candidate-list-container .monaco-list-row{border-radius:2px}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}";
|
|
3
3
|
n(css,{});
|
|
4
4
|
export { css, css as default };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { getClientArea, getDomNodePagePosition, getTotalHeight, getTotalWidth, addDisposableListener } from '../../../../base/browser/dom.js';
|
|
2
|
+
import { getClientArea, getDomNodePagePosition, getTotalHeight, getTotalWidth, addDisposableListener, EventType, clearNode } from '../../../../base/browser/dom.js';
|
|
3
|
+
import { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';
|
|
3
4
|
import { status } from '../../../../base/browser/ui/aria/aria.js';
|
|
5
|
+
import { getBaseLayerHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegate2.js';
|
|
6
|
+
import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
4
7
|
import { renderIcon } from '../../../../base/browser/ui/iconLabel/iconLabels.js';
|
|
5
8
|
import { List } from '../../../../base/browser/ui/list/listWidget.js';
|
|
6
9
|
import { distinct } from '../../../../base/common/arrays.js';
|
|
@@ -15,7 +18,7 @@ import './renameWidget.css.js';
|
|
|
15
18
|
import { applyFontInfo } from '../../../browser/config/domFontInfo.js';
|
|
16
19
|
import { Position } from '../../../common/core/position.js';
|
|
17
20
|
import { Range } from '../../../common/core/range.js';
|
|
18
|
-
import { NewSymbolNameTag } from '../../../common/languages.js';
|
|
21
|
+
import { NewSymbolNameTriggerKind, NewSymbolNameTag } from '../../../common/languages.js';
|
|
19
22
|
import { localizeWithPath } from '../../../../nls.js';
|
|
20
23
|
import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
|
|
21
24
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
@@ -26,7 +29,7 @@ import '../../../../platform/theme/common/colorUtils.js';
|
|
|
26
29
|
import '../../../../platform/theme/common/colors/baseColors.js';
|
|
27
30
|
import '../../../../platform/theme/common/colors/chartsColors.js';
|
|
28
31
|
import { widgetShadow, widgetBorder, editorWidgetBackground } from '../../../../platform/theme/common/colors/editorColors.js';
|
|
29
|
-
import { inputForeground,
|
|
32
|
+
import { inputForeground, inputBorder, inputBackground } from '../../../../platform/theme/common/colors/inputColors.js';
|
|
30
33
|
import '../../../../platform/theme/common/colors/listColors.js';
|
|
31
34
|
import '../../../../platform/theme/common/colors/menuColors.js';
|
|
32
35
|
import '../../../../platform/theme/common/colors/minimapColors.js';
|
|
@@ -47,9 +50,12 @@ let RenameWidget = class RenameWidget {
|
|
|
47
50
|
this._disposables = ( (new DisposableStore()));
|
|
48
51
|
this._visibleContextKey = CONTEXT_RENAME_INPUT_VISIBLE.bindTo(contextKeyService);
|
|
49
52
|
this._isEditingRenameCandidate = false;
|
|
53
|
+
this._nRenameSuggestionsInvocations = 0;
|
|
54
|
+
this._hadAutomaticRenameSuggestionsInvocation = false;
|
|
55
|
+
this._candidates = ( (new Set()));
|
|
50
56
|
this._beforeFirstInputFieldEditSW = ( (new StopWatch()));
|
|
51
|
-
this.
|
|
52
|
-
this._disposables.add(this.
|
|
57
|
+
this._inputWithButton = ( (new InputWithButton()));
|
|
58
|
+
this._disposables.add(this._inputWithButton);
|
|
53
59
|
this._editor.addContentWidget(this);
|
|
54
60
|
this._disposables.add(this._editor.onDidChangeConfiguration(e => {
|
|
55
61
|
if (e.hasChanged(50 )) {
|
|
@@ -69,11 +75,11 @@ let RenameWidget = class RenameWidget {
|
|
|
69
75
|
if (!this._domNode) {
|
|
70
76
|
this._domNode = document.createElement('div');
|
|
71
77
|
this._domNode.className = 'monaco-editor rename-box';
|
|
72
|
-
this._domNode.appendChild(this.
|
|
78
|
+
this._domNode.appendChild(this._inputWithButton.domNode);
|
|
73
79
|
this._renameCandidateListView = this._disposables.add(( (new RenameCandidateListView(this._domNode, {
|
|
74
80
|
fontInfo: this._editor.getOption(50 ),
|
|
75
81
|
onFocusChange: (newSymbolName) => {
|
|
76
|
-
this.
|
|
82
|
+
this._inputWithButton.input.value = newSymbolName;
|
|
77
83
|
this._isEditingRenameCandidate = false;
|
|
78
84
|
},
|
|
79
85
|
onSelectionChange: () => {
|
|
@@ -81,7 +87,7 @@ let RenameWidget = class RenameWidget {
|
|
|
81
87
|
this.acceptInput(false);
|
|
82
88
|
}
|
|
83
89
|
}))));
|
|
84
|
-
this._disposables.add(this.
|
|
90
|
+
this._disposables.add(this._inputWithButton.onDidInputChange(() => {
|
|
85
91
|
if (this._renameCandidateListView?.focusedCandidate !== undefined) {
|
|
86
92
|
this._isEditingRenameCandidate = true;
|
|
87
93
|
}
|
|
@@ -109,18 +115,19 @@ let RenameWidget = class RenameWidget {
|
|
|
109
115
|
this._domNode.style.boxShadow = widgetShadowColor ? ` 0 0 8px 2px ${widgetShadowColor}` : '';
|
|
110
116
|
this._domNode.style.border = widgetBorderColor ? `1px solid ${widgetBorderColor}` : '';
|
|
111
117
|
this._domNode.style.color = String(theme.getColor(inputForeground) ?? '');
|
|
112
|
-
this._input.domNode.style.backgroundColor = String(theme.getColor(inputBackground) ?? '');
|
|
113
118
|
const border = theme.getColor(inputBorder);
|
|
114
|
-
this.
|
|
115
|
-
this.
|
|
116
|
-
this.
|
|
119
|
+
this._inputWithButton.domNode.style.backgroundColor = String(theme.getColor(inputBackground) ?? '');
|
|
120
|
+
this._inputWithButton.input.style.backgroundColor = String(theme.getColor(inputBackground) ?? '');
|
|
121
|
+
this._inputWithButton.domNode.style.borderWidth = border ? '1px' : '0px';
|
|
122
|
+
this._inputWithButton.domNode.style.borderStyle = border ? 'solid' : 'none';
|
|
123
|
+
this._inputWithButton.domNode.style.borderColor = border?.toString() ?? 'none';
|
|
117
124
|
}
|
|
118
125
|
_updateFont() {
|
|
119
126
|
if (this._domNode === undefined) {
|
|
120
127
|
return;
|
|
121
128
|
}
|
|
122
129
|
assertType(this._label !== undefined, 'RenameWidget#_updateFont: _label must not be undefined given _domNode is defined');
|
|
123
|
-
this._editor.applyFontInfo(this.
|
|
130
|
+
this._editor.applyFontInfo(this._inputWithButton.input);
|
|
124
131
|
const fontInfo = this._editor.getOption(50 );
|
|
125
132
|
this._label.style.fontSize = `${this._computeLabelFontSize(fontInfo.fontSize)}px`;
|
|
126
133
|
}
|
|
@@ -177,7 +184,7 @@ let RenameWidget = class RenameWidget {
|
|
|
177
184
|
assertType(this._renameCandidateListView);
|
|
178
185
|
assertType(this._nPxAvailableAbove !== undefined);
|
|
179
186
|
assertType(this._nPxAvailableBelow !== undefined);
|
|
180
|
-
const inputBoxHeight = getTotalHeight(this.
|
|
187
|
+
const inputBoxHeight = getTotalHeight(this._inputWithButton.domNode);
|
|
181
188
|
const labelHeight = getTotalHeight(this._label);
|
|
182
189
|
let totalHeightAvailable;
|
|
183
190
|
if (position === 2 ) {
|
|
@@ -188,7 +195,7 @@ let RenameWidget = class RenameWidget {
|
|
|
188
195
|
}
|
|
189
196
|
this._renameCandidateListView.layout({
|
|
190
197
|
height: totalHeightAvailable - labelHeight - inputBoxHeight,
|
|
191
|
-
width: getTotalWidth(this.
|
|
198
|
+
width: getTotalWidth(this._inputWithButton.domNode),
|
|
192
199
|
});
|
|
193
200
|
}
|
|
194
201
|
acceptInput(wantsPreview) {
|
|
@@ -201,36 +208,57 @@ let RenameWidget = class RenameWidget {
|
|
|
201
208
|
}
|
|
202
209
|
focusNextRenameSuggestion() {
|
|
203
210
|
if (!this._renameCandidateListView?.focusNext()) {
|
|
204
|
-
this.
|
|
211
|
+
this._inputWithButton.input.value = this._currentName;
|
|
205
212
|
}
|
|
206
213
|
}
|
|
207
214
|
focusPreviousRenameSuggestion() {
|
|
208
215
|
if (!this._renameCandidateListView?.focusPrevious()) {
|
|
209
|
-
this.
|
|
216
|
+
this._inputWithButton.input.value = this._currentName;
|
|
210
217
|
}
|
|
211
218
|
}
|
|
212
219
|
getInput(where, currentName, supportPreview, requestRenameCandidates, cts) {
|
|
213
220
|
const { start: selectionStart, end: selectionEnd } = this._getSelection(where, currentName);
|
|
214
|
-
this.
|
|
215
|
-
const
|
|
216
|
-
this.
|
|
221
|
+
this._renameCts = cts;
|
|
222
|
+
const disposeOnDone = ( (new DisposableStore()));
|
|
223
|
+
this._nRenameSuggestionsInvocations = 0;
|
|
224
|
+
this._hadAutomaticRenameSuggestionsInvocation = false;
|
|
225
|
+
if (requestRenameCandidates === undefined) {
|
|
226
|
+
this._inputWithButton.button.style.display = 'none';
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
this._inputWithButton.button.style.display = 'flex';
|
|
230
|
+
this._requestRenameCandidatesOnce = requestRenameCandidates;
|
|
231
|
+
this._requestRenameCandidates(currentName, false);
|
|
232
|
+
disposeOnDone.add(addDisposableListener(this._inputWithButton.button, 'click', () => this._requestRenameCandidates(currentName, true)));
|
|
233
|
+
disposeOnDone.add(addDisposableListener(this._inputWithButton.button, EventType.KEY_DOWN, (e) => {
|
|
234
|
+
const keyEvent = ( (new StandardKeyboardEvent(e)));
|
|
235
|
+
if (keyEvent.equals(3 ) || keyEvent.equals(10 )) {
|
|
236
|
+
keyEvent.stopPropagation();
|
|
237
|
+
keyEvent.preventDefault();
|
|
238
|
+
this._requestRenameCandidates(currentName, true);
|
|
239
|
+
}
|
|
240
|
+
}));
|
|
241
|
+
}
|
|
217
242
|
this._isEditingRenameCandidate = false;
|
|
218
243
|
this._domNode.classList.toggle('preview', supportPreview);
|
|
219
244
|
this._position = ( (new Position(where.startLineNumber, where.startColumn)));
|
|
220
245
|
this._currentName = currentName;
|
|
221
|
-
this.
|
|
222
|
-
this.
|
|
223
|
-
this.
|
|
224
|
-
this.
|
|
246
|
+
this._inputWithButton.input.value = currentName;
|
|
247
|
+
this._inputWithButton.input.setAttribute('selectionStart', ( (selectionStart.toString())));
|
|
248
|
+
this._inputWithButton.input.setAttribute('selectionEnd', ( (selectionEnd.toString())));
|
|
249
|
+
this._inputWithButton.input.size = Math.max((where.endColumn - where.startColumn) * 1.1, 20);
|
|
225
250
|
this._beforeFirstInputFieldEditSW.reset();
|
|
226
|
-
|
|
227
|
-
|
|
251
|
+
disposeOnDone.add(toDisposable(() => {
|
|
252
|
+
this._renameCts = undefined;
|
|
253
|
+
cts.dispose(true);
|
|
254
|
+
}));
|
|
228
255
|
disposeOnDone.add(toDisposable(() => {
|
|
229
256
|
if (this._renameCandidateProvidersCts !== undefined) {
|
|
230
257
|
this._renameCandidateProvidersCts.dispose(true);
|
|
231
258
|
this._renameCandidateProvidersCts = undefined;
|
|
232
259
|
}
|
|
233
260
|
}));
|
|
261
|
+
disposeOnDone.add(toDisposable(() => this._candidates.clear()));
|
|
234
262
|
const inputResult = ( (new DeferredPromise()));
|
|
235
263
|
inputResult.p.finally(() => {
|
|
236
264
|
disposeOnDone.dispose();
|
|
@@ -258,7 +286,7 @@ let RenameWidget = class RenameWidget {
|
|
|
258
286
|
}
|
|
259
287
|
else {
|
|
260
288
|
this._trace('using new name from inputField');
|
|
261
|
-
newName = this.
|
|
289
|
+
newName = this._inputWithButton.input.value;
|
|
262
290
|
source = this._isEditingRenameCandidate ? { k: 'userEditedRenameSuggestion' } : { k: 'inputField' };
|
|
263
291
|
}
|
|
264
292
|
if (newName === currentName || newName.trim().length === 0 ) {
|
|
@@ -275,6 +303,8 @@ let RenameWidget = class RenameWidget {
|
|
|
275
303
|
source,
|
|
276
304
|
nRenameSuggestions,
|
|
277
305
|
timeBeforeFirstInputFieldEdit: this._timeBeforeFirstInputFieldEdit,
|
|
306
|
+
nRenameSuggestionsInvocations: this._nRenameSuggestionsInvocations,
|
|
307
|
+
hadAutomaticRenameSuggestionsInvocation: this._hadAutomaticRenameSuggestionsInvocation,
|
|
278
308
|
}
|
|
279
309
|
});
|
|
280
310
|
};
|
|
@@ -285,6 +315,30 @@ let RenameWidget = class RenameWidget {
|
|
|
285
315
|
this._show();
|
|
286
316
|
return inputResult.p;
|
|
287
317
|
}
|
|
318
|
+
_requestRenameCandidates(currentName, isManuallyTriggered) {
|
|
319
|
+
if (this._requestRenameCandidatesOnce === undefined) {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if (this._renameCandidateProvidersCts !== undefined) {
|
|
323
|
+
this._renameCandidateProvidersCts.dispose(true);
|
|
324
|
+
}
|
|
325
|
+
assertType(this._renameCts);
|
|
326
|
+
if (this._inputWithButton.buttonState !== 'stop') {
|
|
327
|
+
this._renameCandidateProvidersCts = ( (new CancellationTokenSource()));
|
|
328
|
+
const triggerKind = isManuallyTriggered ? NewSymbolNameTriggerKind.Invoke : NewSymbolNameTriggerKind.Automatic;
|
|
329
|
+
const candidates = this._requestRenameCandidatesOnce(triggerKind, this._renameCandidateProvidersCts.token);
|
|
330
|
+
if (candidates.length === 0) {
|
|
331
|
+
this._inputWithButton.setSparkleButton();
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
if (!isManuallyTriggered) {
|
|
335
|
+
this._hadAutomaticRenameSuggestionsInvocation = true;
|
|
336
|
+
}
|
|
337
|
+
this._nRenameSuggestionsInvocations += 1;
|
|
338
|
+
this._inputWithButton.setStopButton();
|
|
339
|
+
this._updateRenameCandidates(candidates, currentName, this._renameCts.token);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
288
342
|
_getSelection(where, currentName) {
|
|
289
343
|
assertType(this._editor.hasModel());
|
|
290
344
|
const selection = this._editor.getSelection();
|
|
@@ -303,14 +357,15 @@ let RenameWidget = class RenameWidget {
|
|
|
303
357
|
this._visibleContextKey.set(true);
|
|
304
358
|
this._editor.layoutContentWidget(this);
|
|
305
359
|
setTimeout(() => {
|
|
306
|
-
this.
|
|
307
|
-
this.
|
|
360
|
+
this._inputWithButton.input.focus();
|
|
361
|
+
this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute('selectionStart')), parseInt(this._inputWithButton.input.getAttribute('selectionEnd')));
|
|
308
362
|
}, 100);
|
|
309
363
|
}
|
|
310
364
|
async _updateRenameCandidates(candidates, currentName, token) {
|
|
311
365
|
const trace = (...args) => this._trace('_updateRenameCandidates', ...args);
|
|
312
366
|
trace('start');
|
|
313
367
|
const namesListResults = await raceCancellation(Promise.allSettled(candidates), token);
|
|
368
|
+
this._inputWithButton.setSparkleButton();
|
|
314
369
|
if (namesListResults === undefined) {
|
|
315
370
|
trace('returning early - received updateRenameCandidates results - undefined');
|
|
316
371
|
return;
|
|
@@ -321,8 +376,9 @@ let RenameWidget = class RenameWidget {
|
|
|
321
376
|
trace(`received updateRenameCandidates results - total (unfiltered) ${newNames.length} candidates.`);
|
|
322
377
|
const distinctNames = distinct(newNames, v => v.newSymbolName);
|
|
323
378
|
trace(`distinct candidates - ${distinctNames.length} candidates.`);
|
|
324
|
-
const validDistinctNames = distinctNames.filter(({ newSymbolName }) => newSymbolName.trim().length > 0 && newSymbolName !== this.
|
|
379
|
+
const validDistinctNames = distinctNames.filter(({ newSymbolName }) => newSymbolName.trim().length > 0 && newSymbolName !== this._inputWithButton.input.value && newSymbolName !== currentName && !( (this._candidates.has(newSymbolName))));
|
|
325
380
|
trace(`valid distinct candidates - ${newNames.length} candidates.`);
|
|
381
|
+
validDistinctNames.forEach(n => this._candidates.add(n.newSymbolName));
|
|
326
382
|
if (validDistinctNames.length < 1) {
|
|
327
383
|
trace('returning early - no valid distinct candidates');
|
|
328
384
|
return;
|
|
@@ -368,6 +424,7 @@ class RenameCandidateListView {
|
|
|
368
424
|
this._lineHeight = opts.fontInfo.lineHeight;
|
|
369
425
|
this._typicalHalfwidthCharacterWidth = opts.fontInfo.typicalHalfwidthCharacterWidth;
|
|
370
426
|
this._listContainer = document.createElement('div');
|
|
427
|
+
this._listContainer.className = 'rename-box rename-candidate-list-container';
|
|
371
428
|
parent.appendChild(this._listContainer);
|
|
372
429
|
this._listWidget = RenameCandidateListView._createListWidget(this._listContainer, this._candidateViewHeight, opts.fontInfo);
|
|
373
430
|
this._listWidget.onDidChangeFocus(e => {
|
|
@@ -398,7 +455,7 @@ class RenameCandidateListView {
|
|
|
398
455
|
}
|
|
399
456
|
setCandidates(candidates) {
|
|
400
457
|
this._listWidget.splice(0, 0, candidates);
|
|
401
|
-
const height = this._pickListHeight(
|
|
458
|
+
const height = this._pickListHeight(this._listWidget.length);
|
|
402
459
|
const width = this._pickListWidth(candidates);
|
|
403
460
|
this._listWidget.layout(height, width);
|
|
404
461
|
this._listContainer.style.height = `${height}px`;
|
|
@@ -434,15 +491,19 @@ class RenameCandidateListView {
|
|
|
434
491
|
const focusedIxs = this._listWidget.getFocus();
|
|
435
492
|
if (focusedIxs.length === 0) {
|
|
436
493
|
this._listWidget.focusFirst();
|
|
494
|
+
this._listWidget.reveal(0);
|
|
437
495
|
return true;
|
|
438
496
|
}
|
|
439
497
|
else {
|
|
440
498
|
if (focusedIxs[0] === this._listWidget.length - 1) {
|
|
441
499
|
this._listWidget.setFocus([]);
|
|
500
|
+
this._listWidget.reveal(0);
|
|
442
501
|
return false;
|
|
443
502
|
}
|
|
444
503
|
else {
|
|
445
504
|
this._listWidget.focusNext();
|
|
505
|
+
const focused = this._listWidget.getFocus()[0];
|
|
506
|
+
this._listWidget.reveal(focused);
|
|
446
507
|
return true;
|
|
447
508
|
}
|
|
448
509
|
}
|
|
@@ -454,6 +515,8 @@ class RenameCandidateListView {
|
|
|
454
515
|
const focusedIxs = this._listWidget.getFocus();
|
|
455
516
|
if (focusedIxs.length === 0) {
|
|
456
517
|
this._listWidget.focusLast();
|
|
518
|
+
const focused = this._listWidget.getFocus()[0];
|
|
519
|
+
this._listWidget.reveal(focused);
|
|
457
520
|
return true;
|
|
458
521
|
}
|
|
459
522
|
else {
|
|
@@ -463,6 +526,8 @@ class RenameCandidateListView {
|
|
|
463
526
|
}
|
|
464
527
|
else {
|
|
465
528
|
this._listWidget.focusPrevious();
|
|
529
|
+
const focused = this._listWidget.getFocus()[0];
|
|
530
|
+
this._listWidget.reveal(focused);
|
|
466
531
|
return true;
|
|
467
532
|
}
|
|
468
533
|
}
|
|
@@ -520,24 +585,83 @@ class RenameCandidateListView {
|
|
|
520
585
|
);
|
|
521
586
|
}
|
|
522
587
|
}
|
|
523
|
-
class
|
|
588
|
+
class InputWithButton {
|
|
524
589
|
constructor() {
|
|
525
|
-
this.
|
|
526
|
-
this.
|
|
590
|
+
this._onDidInputChange = ( (new Emitter()));
|
|
591
|
+
this.onDidInputChange = this._onDidInputChange.event;
|
|
527
592
|
this._disposables = ( (new DisposableStore()));
|
|
528
593
|
}
|
|
529
594
|
get domNode() {
|
|
530
595
|
if (!this._domNode) {
|
|
531
|
-
this._domNode = document.createElement('
|
|
532
|
-
this._domNode.className = 'rename-input';
|
|
533
|
-
this._domNode.
|
|
534
|
-
this._domNode.
|
|
535
|
-
this.
|
|
596
|
+
this._domNode = document.createElement('div');
|
|
597
|
+
this._domNode.className = 'rename-input-with-button';
|
|
598
|
+
this._domNode.style.display = 'flex';
|
|
599
|
+
this._domNode.style.flexDirection = 'row';
|
|
600
|
+
this._domNode.style.alignItems = 'center';
|
|
601
|
+
this._inputNode = document.createElement('input');
|
|
602
|
+
this._inputNode.className = 'rename-input';
|
|
603
|
+
this._inputNode.type = 'text';
|
|
604
|
+
this._inputNode.style.border = 'none';
|
|
605
|
+
this._inputNode.setAttribute('aria-label', ( localizeWithPath(_moduleId, 4, "Rename input. Type new name and press Enter to commit.")));
|
|
606
|
+
this._domNode.appendChild(this._inputNode);
|
|
607
|
+
this._buttonNode = document.createElement('div');
|
|
608
|
+
this._buttonNode.className = 'rename-suggestions-button';
|
|
609
|
+
this._buttonNode.setAttribute('tabindex', '0');
|
|
610
|
+
this._buttonGenHoverText = ( localizeWithPath(_moduleId, 5, "Generate new name suggestions"));
|
|
611
|
+
this._buttonCancelHoverText = ( localizeWithPath(_moduleId, 6, "Cancel"));
|
|
612
|
+
this._buttonHover = getBaseLayerHoverDelegate().setupUpdatableHover(getDefaultHoverDelegate('element'), this._buttonNode, this._buttonGenHoverText);
|
|
613
|
+
this._disposables.add(this._buttonHover);
|
|
614
|
+
this._domNode.appendChild(this._buttonNode);
|
|
615
|
+
this._disposables.add(addDisposableListener(this.input, EventType.INPUT, () => this._onDidInputChange.fire()));
|
|
616
|
+
this._disposables.add(addDisposableListener(this.input, EventType.KEY_DOWN, (e) => {
|
|
617
|
+
const keyEvent = ( (new StandardKeyboardEvent(e)));
|
|
618
|
+
if (keyEvent.keyCode === 15 || keyEvent.keyCode === 17 ) {
|
|
619
|
+
this._onDidInputChange.fire();
|
|
620
|
+
}
|
|
621
|
+
}));
|
|
622
|
+
this._disposables.add(addDisposableListener(this.input, EventType.CLICK, () => this._onDidInputChange.fire()));
|
|
623
|
+
this._disposables.add(addDisposableListener(this.input, EventType.FOCUS, () => {
|
|
624
|
+
this.domNode.style.outlineWidth = '1px';
|
|
625
|
+
this.domNode.style.outlineStyle = 'solid';
|
|
626
|
+
this.domNode.style.outlineOffset = '-1px';
|
|
627
|
+
this.domNode.style.outlineColor = 'var(--vscode-focusBorder)';
|
|
628
|
+
}));
|
|
629
|
+
this._disposables.add(addDisposableListener(this.input, EventType.BLUR, () => {
|
|
630
|
+
this.domNode.style.outline = 'none';
|
|
631
|
+
}));
|
|
536
632
|
}
|
|
537
633
|
return this._domNode;
|
|
538
634
|
}
|
|
635
|
+
get input() {
|
|
636
|
+
assertType(this._inputNode);
|
|
637
|
+
return this._inputNode;
|
|
638
|
+
}
|
|
639
|
+
get button() {
|
|
640
|
+
assertType(this._buttonNode);
|
|
641
|
+
return this._buttonNode;
|
|
642
|
+
}
|
|
643
|
+
get buttonState() {
|
|
644
|
+
return this._buttonState;
|
|
645
|
+
}
|
|
646
|
+
setSparkleButton() {
|
|
647
|
+
this._buttonState = 'sparkle';
|
|
648
|
+
this._sparkleIcon ??= renderIcon(Codicon.sparkle);
|
|
649
|
+
clearNode(this.button);
|
|
650
|
+
this.button.appendChild(this._sparkleIcon);
|
|
651
|
+
this.button.setAttribute('aria-label', 'Generating new name suggestions');
|
|
652
|
+
this._buttonHover?.update(this._buttonGenHoverText);
|
|
653
|
+
this.input.focus();
|
|
654
|
+
}
|
|
655
|
+
setStopButton() {
|
|
656
|
+
this._buttonState = 'stop';
|
|
657
|
+
this._stopIcon ??= renderIcon(Codicon.primitiveSquare);
|
|
658
|
+
clearNode(this.button);
|
|
659
|
+
this.button.appendChild(this._stopIcon);
|
|
660
|
+
this.button.setAttribute('aria-label', 'Cancel generating new name suggestions');
|
|
661
|
+
this._buttonHover?.update(this._buttonCancelHoverText);
|
|
662
|
+
this.input.focus();
|
|
663
|
+
}
|
|
539
664
|
dispose() {
|
|
540
|
-
this._onDidChange.dispose();
|
|
541
665
|
this._disposables.dispose();
|
|
542
666
|
}
|
|
543
667
|
}
|
|
@@ -545,6 +669,7 @@ class RenameCandidateView {
|
|
|
545
669
|
static { this._PADDING = 2; }
|
|
546
670
|
constructor(parent, fontInfo) {
|
|
547
671
|
this._domNode = document.createElement('div');
|
|
672
|
+
this._domNode.className = 'rename-box rename-candidate';
|
|
548
673
|
this._domNode.style.display = `flex`;
|
|
549
674
|
this._domNode.style.columnGap = `5px`;
|
|
550
675
|
this._domNode.style.alignItems = `center`;
|
|
@@ -49,6 +49,11 @@ let SectionHeaderDetector = class SectionHeaderDetector extends Disposable {
|
|
|
49
49
|
this._register(this.editor.onDidChangeModelContent(e => {
|
|
50
50
|
this.computeSectionHeaders.schedule();
|
|
51
51
|
}));
|
|
52
|
+
this._register(editor.onDidChangeModelTokens((e) => {
|
|
53
|
+
if (!this.computeSectionHeaders.isScheduled()) {
|
|
54
|
+
this.computeSectionHeaders.schedule(1000);
|
|
55
|
+
}
|
|
56
|
+
}));
|
|
52
57
|
this.computeSectionHeaders = this._register(( new RunOnceScheduler(() => {
|
|
53
58
|
this.findSectionHeaders();
|
|
54
59
|
}, 250)));
|
|
@@ -240,7 +240,7 @@ registerEditorCommand(( (new CommandCtor({
|
|
|
240
240
|
handler: ctrl => ctrl.next(),
|
|
241
241
|
kbOpts: {
|
|
242
242
|
weight: 100 + 30,
|
|
243
|
-
kbExpr: EditorContextKeys.
|
|
243
|
+
kbExpr: EditorContextKeys.textInputFocus,
|
|
244
244
|
primary: 2
|
|
245
245
|
}
|
|
246
246
|
}))));
|
|
@@ -250,7 +250,7 @@ registerEditorCommand(( (new CommandCtor({
|
|
|
250
250
|
handler: ctrl => ctrl.prev(),
|
|
251
251
|
kbOpts: {
|
|
252
252
|
weight: 100 + 30,
|
|
253
|
-
kbExpr: EditorContextKeys.
|
|
253
|
+
kbExpr: EditorContextKeys.textInputFocus,
|
|
254
254
|
primary: 1024 | 2
|
|
255
255
|
}
|
|
256
256
|
}))));
|
|
@@ -260,7 +260,7 @@ registerEditorCommand(( (new CommandCtor({
|
|
|
260
260
|
handler: ctrl => ctrl.cancel(true),
|
|
261
261
|
kbOpts: {
|
|
262
262
|
weight: 100 + 30,
|
|
263
|
-
kbExpr: EditorContextKeys.
|
|
263
|
+
kbExpr: EditorContextKeys.textInputFocus,
|
|
264
264
|
primary: 9 ,
|
|
265
265
|
secondary: [1024 | 9 ]
|
|
266
266
|
}
|
|
@@ -15,11 +15,18 @@ class ToggleStickyScroll extends Action2 {
|
|
|
15
15
|
...( localize2WithPath(_moduleId, 0, "Toggle Editor Sticky Scroll")),
|
|
16
16
|
mnemonicTitle: ( localizeWithPath(_moduleId, 1, "&&Toggle Editor Sticky Scroll")),
|
|
17
17
|
},
|
|
18
|
+
metadata: {
|
|
19
|
+
description: ( localize2WithPath(
|
|
20
|
+
_moduleId,
|
|
21
|
+
2,
|
|
22
|
+
"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport"
|
|
23
|
+
)),
|
|
24
|
+
},
|
|
18
25
|
category: Categories.View,
|
|
19
26
|
toggled: {
|
|
20
27
|
condition: ( (ContextKeyExpr.equals('config.editor.stickyScroll.enabled', true))),
|
|
21
|
-
title: ( localizeWithPath(_moduleId,
|
|
22
|
-
mnemonicTitle: ( localizeWithPath(_moduleId,
|
|
28
|
+
title: ( localizeWithPath(_moduleId, 3, "Sticky Scroll")),
|
|
29
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 4, "&&Sticky Scroll")),
|
|
23
30
|
},
|
|
24
31
|
menu: [
|
|
25
32
|
{ id: MenuId.CommandPalette },
|
|
@@ -40,8 +47,8 @@ class FocusStickyScroll extends EditorAction2 {
|
|
|
40
47
|
super({
|
|
41
48
|
id: 'editor.action.focusStickyScroll',
|
|
42
49
|
title: {
|
|
43
|
-
...( localize2WithPath(_moduleId,
|
|
44
|
-
mnemonicTitle: ( localizeWithPath(_moduleId,
|
|
50
|
+
...( localize2WithPath(_moduleId, 5, "Focus on the editor sticky scroll")),
|
|
51
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 6, "&&Focus Sticky Scroll")),
|
|
45
52
|
},
|
|
46
53
|
precondition: ( (ContextKeyExpr.and(
|
|
47
54
|
(ContextKeyExpr.has('config.editor.stickyScroll.enabled')),
|
|
@@ -60,7 +67,7 @@ class SelectNextStickyScrollLine extends EditorAction2 {
|
|
|
60
67
|
constructor() {
|
|
61
68
|
super({
|
|
62
69
|
id: 'editor.action.selectNextStickyScrollLine',
|
|
63
|
-
title: ( localize2WithPath(_moduleId,
|
|
70
|
+
title: ( localize2WithPath(_moduleId, 7, "Select the next editor sticky scroll line")),
|
|
64
71
|
precondition: ( (EditorContextKeys.stickyScrollFocused.isEqualTo(true))),
|
|
65
72
|
keybinding: {
|
|
66
73
|
weight,
|
|
@@ -76,7 +83,7 @@ class SelectPreviousStickyScrollLine extends EditorAction2 {
|
|
|
76
83
|
constructor() {
|
|
77
84
|
super({
|
|
78
85
|
id: 'editor.action.selectPreviousStickyScrollLine',
|
|
79
|
-
title: ( localize2WithPath(_moduleId,
|
|
86
|
+
title: ( localize2WithPath(_moduleId, 8, "Select the previous sticky scroll line")),
|
|
80
87
|
precondition: ( (EditorContextKeys.stickyScrollFocused.isEqualTo(true))),
|
|
81
88
|
keybinding: {
|
|
82
89
|
weight,
|
|
@@ -92,7 +99,7 @@ class GoToStickyScrollLine extends EditorAction2 {
|
|
|
92
99
|
constructor() {
|
|
93
100
|
super({
|
|
94
101
|
id: 'editor.action.goToFocusedStickyScrollLine',
|
|
95
|
-
title: ( localize2WithPath(_moduleId,
|
|
102
|
+
title: ( localize2WithPath(_moduleId, 9, "Go to the focused sticky scroll line")),
|
|
96
103
|
precondition: ( (EditorContextKeys.stickyScrollFocused.isEqualTo(true))),
|
|
97
104
|
keybinding: {
|
|
98
105
|
weight,
|
|
@@ -108,7 +115,7 @@ class SelectEditor extends EditorAction2 {
|
|
|
108
115
|
constructor() {
|
|
109
116
|
super({
|
|
110
117
|
id: 'editor.action.selectEditor',
|
|
111
|
-
title: ( localize2WithPath(_moduleId,
|
|
118
|
+
title: ( localize2WithPath(_moduleId, 10, "Select Editor")),
|
|
112
119
|
precondition: ( (EditorContextKeys.stickyScrollFocused.isEqualTo(true))),
|
|
113
120
|
keybinding: {
|
|
114
121
|
weight,
|