monaco-editor-core 0.55.0 → 0.56.0-dev-20251121
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/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +27 -8
- package/esm/vs/base/browser/dom.js +31 -34
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +0 -1
- package/esm/vs/base/browser/keyboardEvent.js +3 -3
- package/esm/vs/base/browser/keyboardEvent.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +5 -2
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/pixelRatio.js +5 -5
- package/esm/vs/base/browser/pixelRatio.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js +1 -1
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionbar.js +3 -0
- package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +7 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
- package/esm/vs/base/browser/ui/hover/hoverWidget.css +0 -13
- package/esm/vs/base/browser/ui/inputbox/inputBox.js +7 -0
- package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
- package/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +4 -2
- package/esm/vs/base/browser/ui/list/listView.js +7 -2
- package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBox.js +4 -0
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css +12 -32
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +8 -18
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +41 -14
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +11 -0
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/arrays.js +10 -0
- package/esm/vs/base/common/arrays.js.map +1 -1
- package/esm/vs/base/common/async.js +34 -0
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/buffer.js +1 -1
- package/esm/vs/base/common/buffer.js.map +1 -1
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +3 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/collections.js.map +1 -1
- package/esm/vs/base/common/equals.js.map +1 -1
- package/esm/vs/base/common/event.js +32 -15
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/filters.js +22 -3
- package/esm/vs/base/common/filters.js.map +1 -1
- package/esm/vs/base/common/hotReload.js +2 -2
- package/esm/vs/base/common/hotReload.js.map +1 -1
- package/esm/vs/base/common/iterator.js +1 -1
- package/esm/vs/base/common/iterator.js.map +1 -1
- package/esm/vs/base/common/keyCodes.js +7 -6
- package/esm/vs/base/common/keyCodes.js.map +1 -1
- package/esm/vs/base/common/linkedList.js.map +1 -1
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/marked/marked.js +0 -1
- package/esm/vs/base/common/network.js +26 -1
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/normalization.js +19 -6
- package/esm/vs/base/common/normalization.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js +1 -2
- package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugName.js +0 -1
- package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
- package/esm/vs/base/common/observableInternal/index.js +4 -4
- package/esm/vs/base/common/observableInternal/index.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +38 -10
- package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/baseObservable.js +3 -3
- package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
- package/esm/vs/base/common/observableInternal/utils/utils.js +46 -5
- package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
- package/esm/vs/base/common/path.js +1 -0
- package/esm/vs/base/common/path.js.map +1 -1
- package/esm/vs/base/common/strings.js +27 -19
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/config/elementSizeObserver.js +5 -5
- package/esm/vs/editor/browser/config/elementSizeObserver.js.map +1 -1
- package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js +6 -0
- package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
- package/esm/vs/editor/browser/config/tabFocus.js +4 -2
- package/esm/vs/editor/browser/config/tabFocus.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -0
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/coreCommands.js +1 -2
- package/esm/vs/editor/browser/coreCommands.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +32 -1
- package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
- package/esm/vs/editor/browser/services/contribution.js +9 -0
- package/esm/vs/editor/browser/services/contribution.js.map +1 -0
- package/esm/vs/editor/browser/services/editorWorkerService.js +27 -14
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js +5 -1
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
- package/esm/vs/editor/browser/view/renderingContext.js +1 -1
- package/esm/vs/editor/browser/view/renderingContext.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +10 -3
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -4
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +1 -1
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +4 -2
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +1 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js +2 -1
- package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +6 -18
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +0 -7
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +7 -2
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js.map +1 -1
- package/esm/vs/editor/common/commands/replaceCommand.js +2 -2
- package/esm/vs/editor/common/commands/replaceCommand.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +374 -360
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/2d/rect.js +7 -0
- package/esm/vs/editor/common/core/2d/rect.js.map +1 -1
- package/esm/vs/editor/common/core/2d/size.js +20 -0
- package/esm/vs/editor/common/core/2d/size.js.map +1 -0
- package/esm/vs/editor/common/core/editorColorRegistry.js +69 -68
- package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
- package/esm/vs/editor/common/core/ranges/offsetRange.js +9 -0
- package/esm/vs/editor/common/core/ranges/offsetRange.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/editorContextKeys.js +47 -47
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/services/languagesAssociations.js +6 -8
- package/esm/vs/editor/common/services/languagesAssociations.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -10
- package/esm/vs/editor/common/standaloneStrings.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +1 -1
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelens.js.map +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +14 -0
- package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/format.js +21 -6
- package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +5 -10
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +11 -6
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverUtils.js +24 -0
- package/esm/vs/editor/contrib/hover/browser/hoverUtils.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -16
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +42 -37
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +54 -43
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +74 -48
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +8 -36
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +10 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +105 -119
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +8 -36
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js +95 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +17 -9
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +415 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +253 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js +103 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js +32 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +44 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +181 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -0
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -31
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +2 -2
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +18 -13
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +12 -12
- package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -29
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +4 -4
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/editor/editor.all.js +1 -0
- package/esm/vs/editor/editor.all.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +9 -5
- package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js +22 -2
- package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js.map +1 -1
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +39 -0
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -0
- package/esm/vs/editor/standalone/browser/standaloneEditor.js +2 -1
- package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js +3 -21
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js +4 -4
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +7 -9
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +2 -0
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configuration.js +5 -4
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationModels.js +21 -10
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +3 -3
- package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +11 -32
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +9 -3
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +35 -14
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +4 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +71 -40
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +21 -8
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
- package/esm/vs/platform/telemetry/common/gdprTypings.js.map +1 -1
- package/esm/vs/platform/telemetry/common/telemetry.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/editorColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/miscColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js +12 -0
- package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -0
- package/esm/vs/platform/webWorker/browser/webWorkerService.js +7 -0
- package/esm/vs/platform/webWorker/browser/webWorkerService.js.map +1 -0
- package/esm/vs/{base/browser/webWorkerFactory.js → platform/webWorker/browser/webWorkerServiceImpl.js} +47 -66
- package/esm/vs/platform/webWorker/browser/webWorkerServiceImpl.js.map +1 -0
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +9 -5
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/base/browser/webWorkerFactory.js.map +0 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +0 -82
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js.map +0 -1
|
@@ -14,7 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
var AbstractCommandsQuickAccessProvider_1, CommandsHistory_1;
|
|
15
15
|
import { toErrorMessage } from '../../../base/common/errorMessage.js';
|
|
16
16
|
import { isCancellationError } from '../../../base/common/errors.js';
|
|
17
|
-
import {
|
|
17
|
+
import { matchesBaseContiguousSubString, matchesWords, or } from '../../../base/common/filters.js';
|
|
18
18
|
import { createSingleCallFunction } from '../../../base/common/functional.js';
|
|
19
19
|
import { Disposable } from '../../../base/common/lifecycle.js';
|
|
20
20
|
import { LRUCache } from '../../../base/common/map.js';
|
|
@@ -29,14 +29,13 @@ import { ILogService } from '../../log/common/log.js';
|
|
|
29
29
|
import { PickerQuickAccessProvider } from './pickerQuickAccess.js';
|
|
30
30
|
import { IStorageService, WillSaveStateReason } from '../../storage/common/storage.js';
|
|
31
31
|
import { ITelemetryService } from '../../telemetry/common/telemetry.js';
|
|
32
|
-
import { removeAccents } from '../../../base/common/normalization.js';
|
|
33
32
|
import { Categories } from '../../action/common/actionCommonCategories.js';
|
|
34
33
|
let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider {
|
|
35
34
|
static { AbstractCommandsQuickAccessProvider_1 = this; }
|
|
36
35
|
static { this.PREFIX = '>'; }
|
|
37
36
|
static { this.TFIDF_THRESHOLD = 0.5; }
|
|
38
37
|
static { this.TFIDF_MAX_RESULTS = 5; }
|
|
39
|
-
static { this.WORD_FILTER = or(
|
|
38
|
+
static { this.WORD_FILTER = or(matchesBaseContiguousSubString, matchesWords); }
|
|
40
39
|
constructor(options, instantiationService, keybindingService, commandService, telemetryService, dialogService) {
|
|
41
40
|
super(AbstractCommandsQuickAccessProvider_1.PREFIX, options);
|
|
42
41
|
this.keybindingService = keybindingService;
|
|
@@ -63,16 +62,13 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
63
62
|
.filter(score => score.score > AbstractCommandsQuickAccessProvider_1.TFIDF_THRESHOLD)
|
|
64
63
|
.slice(0, AbstractCommandsQuickAccessProvider_1.TFIDF_MAX_RESULTS);
|
|
65
64
|
});
|
|
66
|
-
const noAccentsFilter = this.normalizeForFiltering(filter);
|
|
67
65
|
// Filter
|
|
68
66
|
const filteredCommandPicks = [];
|
|
69
67
|
for (const commandPick of allCommandPicks) {
|
|
70
|
-
|
|
71
|
-
const labelHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(noAccentsFilter, commandPick.labelNoAccents) ?? undefined;
|
|
68
|
+
const labelHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(filter, commandPick.label) ?? undefined;
|
|
72
69
|
let aliasHighlights;
|
|
73
70
|
if (commandPick.commandAlias) {
|
|
74
|
-
|
|
75
|
-
aliasHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(noAccentsFilter, commandPick.aliasNoAccents) ?? undefined;
|
|
71
|
+
aliasHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(filter, commandPick.commandAlias) ?? undefined;
|
|
76
72
|
}
|
|
77
73
|
// Add if matching in label or alias
|
|
78
74
|
if (labelHighlights || aliasHighlights) {
|
|
@@ -171,22 +167,22 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
171
167
|
const commandPick = filteredCommandPicks[i];
|
|
172
168
|
// Separator: recently used
|
|
173
169
|
if (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {
|
|
174
|
-
commandPicks.push({ type: 'separator', label: localize(
|
|
170
|
+
commandPicks.push({ type: 'separator', label: localize(1747, "recently used") });
|
|
175
171
|
addOtherSeparator = true;
|
|
176
172
|
}
|
|
177
173
|
if (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {
|
|
178
|
-
commandPicks.push({ type: 'separator', label: localize(
|
|
174
|
+
commandPicks.push({ type: 'separator', label: localize(1748, "similar commands") });
|
|
179
175
|
addSuggestedSeparator = false;
|
|
180
176
|
}
|
|
181
177
|
// Separator: commonly used
|
|
182
178
|
if (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && this.options.suggestedCommandIds?.has(commandPick.commandId)) {
|
|
183
|
-
commandPicks.push({ type: 'separator', label: localize(
|
|
179
|
+
commandPicks.push({ type: 'separator', label: localize(1749, "commonly used") });
|
|
184
180
|
addOtherSeparator = true;
|
|
185
181
|
addCommonlyUsedSeparator = false;
|
|
186
182
|
}
|
|
187
183
|
// Separator: other commands
|
|
188
184
|
if (addOtherSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {
|
|
189
|
-
commandPicks.push({ type: 'separator', label: localize(
|
|
185
|
+
commandPicks.push({ type: 'separator', label: localize(1750, "other commands") });
|
|
190
186
|
addOtherSeparator = false;
|
|
191
187
|
}
|
|
192
188
|
// Command
|
|
@@ -206,7 +202,7 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
206
202
|
// Basically, if we haven't already added a separator, we add one before the additional picks so long
|
|
207
203
|
// as one hasn't been added to the start of the array.
|
|
208
204
|
if (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {
|
|
209
|
-
commandPicks.unshift({ type: 'separator', label: localize(
|
|
205
|
+
commandPicks.unshift({ type: 'separator', label: localize(1751, "similar commands") });
|
|
210
206
|
}
|
|
211
207
|
return commandPicks;
|
|
212
208
|
})()
|
|
@@ -218,7 +214,7 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
218
214
|
}
|
|
219
215
|
const keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);
|
|
220
216
|
const ariaLabel = keybinding ?
|
|
221
|
-
localize(
|
|
217
|
+
localize(1752, "{0}, {1}", commandPick.label, keybinding.getAriaLabel()) :
|
|
222
218
|
commandPick.label;
|
|
223
219
|
return {
|
|
224
220
|
...commandPick,
|
|
@@ -241,7 +237,7 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
241
237
|
}
|
|
242
238
|
catch (error) {
|
|
243
239
|
if (!isCancellationError(error)) {
|
|
244
|
-
this.dialogService.error(localize(
|
|
240
|
+
this.dialogService.error(localize(1753, "Command '{0}' resulted in an error", commandPick.label), toErrorMessage(error));
|
|
245
241
|
}
|
|
246
242
|
}
|
|
247
243
|
}
|
|
@@ -259,23 +255,6 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
259
255
|
}
|
|
260
256
|
return chunk;
|
|
261
257
|
}
|
|
262
|
-
/**
|
|
263
|
-
* Normalizes a string for filtering by removing accents, but only if
|
|
264
|
-
* the result has the same length, otherwise returns the original string.
|
|
265
|
-
*/
|
|
266
|
-
normalizeForFiltering(value) {
|
|
267
|
-
const withoutAccents = removeAccents(value);
|
|
268
|
-
if (withoutAccents.length !== value.length) {
|
|
269
|
-
this.telemetryService.publicLog2('QuickAccess:FilterLengthMismatch', {
|
|
270
|
-
originalLength: value.length,
|
|
271
|
-
normalizedLength: withoutAccents.length
|
|
272
|
-
});
|
|
273
|
-
return value;
|
|
274
|
-
}
|
|
275
|
-
else {
|
|
276
|
-
return withoutAccents;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
258
|
};
|
|
280
259
|
AbstractCommandsQuickAccessProvider = AbstractCommandsQuickAccessProvider_1 = __decorate([
|
|
281
260
|
__param(1, IInstantiationService),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/platform/quickinput/browser/commandsQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAIhG,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAU,0BAA0B,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACtH,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AA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eAAe,CAAA;IACf,WAAA,qBAAqB,CAAA;IACrB,WAAA,WAAW,CAAA;GAhBD,eAAe,CAoH3B","file":"commandsQuickAccess.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { WorkbenchActionExecutedClassification, WorkbenchActionExecutedEvent } from '../../../base/common/actions.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { toErrorMessage } from '../../../base/common/errorMessage.js';\nimport { isCancellationError } from '../../../base/common/errors.js';\nimport { IMatch, matchesContiguousSubString, matchesPrefix, matchesWords, or } from '../../../base/common/filters.js';\nimport { createSingleCallFunction } from '../../../base/common/functional.js';\nimport { Disposable, DisposableStore, IDisposable } from '../../../base/common/lifecycle.js';\nimport { LRUCache } from '../../../base/common/map.js';\nimport { TfIdfCalculator, normalizeTfIdfScores } from '../../../base/common/tfIdf.js';\nimport { localize } from '../../../nls.js';\nimport { ILocalizedString } from '../../action/common/action.js';\nimport { ICommandService } from '../../commands/common/commands.js';\nimport { IConfigurationChangeEvent, IConfigurationService } from '../../configuration/common/configuration.js';\nimport { IDialogService } from '../../dialogs/common/dialogs.js';\nimport { IInstantiationService } from '../../instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../keybinding/common/keybinding.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { FastAndSlowPicks, IPickerQuickAccessItem, IPickerQuickAccessProviderOptions, PickerQuickAccessProvider, Picks } from './pickerQuickAccess.js';\nimport { IQuickAccessProviderRunOptions } from '../common/quickAccess.js';\nimport { IQuickPickSeparator } from '../common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget, WillSaveStateReason } from '../../storage/common/storage.js';\nimport { ITelemetryService } from '../../telemetry/common/telemetry.js';\nimport { removeAccents } from '../../../base/common/normalization.js';\nimport { Categories } from '../../action/common/actionCommonCategories.js';\n\nexport interface ICommandQuickPick extends IPickerQuickAccessItem {\n\treadonly commandId: string;\n\treadonly commandAlias?: string;\n\treadonly commandDescription?: ILocalizedString;\n\treadonly commandCategory?: string;\n\n\treadonly args?: unknown[];\n\n\ttfIdfScore?: number;\n\n\t// These fields are lazy initialized during filtering process.\n\tlabelNoAccents?: string;\n\taliasNoAccents?: string;\n}\n\nexport interface ICommandsQuickAccessOptions extends IPickerQuickAccessProviderOptions<ICommandQuickPick> {\n\treadonly showAlias: boolean;\n\tsuggestedCommandIds?: Set<string>;\n}\n\nexport abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider<ICommandQuickPick> implements IDisposable {\n\n\tstatic PREFIX = '>';\n\n\tprivate static readonly TFIDF_THRESHOLD = 0.5;\n\tprivate static readonly TFIDF_MAX_RESULTS = 5;\n\n\tprivate static WORD_FILTER = or(matchesPrefix, matchesWords, matchesContiguousSubString);\n\n\tprivate readonly commandsHistory: CommandsHistory;\n\n\tprotected override readonly options: ICommandsQuickAccessOptions;\n\n\tconstructor(\n\t\toptions: ICommandsQuickAccessOptions,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IKeybindingService protected readonly keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly commandService: ICommandService,\n\t\t@ITelemetryService private readonly telemetryService: ITelemetryService,\n\t\t@IDialogService private readonly dialogService: IDialogService\n\t) {\n\t\tsuper(AbstractCommandsQuickAccessProvider.PREFIX, options);\n\n\t\tthis.commandsHistory = this._register(instantiationService.createInstance(CommandsHistory));\n\n\t\tthis.options = options;\n\t}\n\n\tprotected async _getPicks(filter: string, _disposables: DisposableStore, token: CancellationToken, runOptions?: IQuickAccessProviderRunOptions): Promise<Picks<ICommandQuickPick> | FastAndSlowPicks<ICommandQuickPick>> {\n\n\t\t// Ask subclass for all command picks\n\t\tconst allCommandPicks = await this.getCommandPicks(token);\n\n\t\tif (token.isCancellationRequested) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst runTfidf = createSingleCallFunction(() => {\n\t\t\tconst tfidf = new TfIdfCalculator();\n\t\t\ttfidf.updateDocuments(allCommandPicks.map(commandPick => ({\n\t\t\t\tkey: commandPick.commandId,\n\t\t\t\ttextChunks: [this.getTfIdfChunk(commandPick)]\n\t\t\t})));\n\t\t\tconst result = tfidf.calculateScores(filter, token);\n\n\t\t\treturn normalizeTfIdfScores(result)\n\t\t\t\t.filter(score => score.score > AbstractCommandsQuickAccessProvider.TFIDF_THRESHOLD)\n\t\t\t\t.slice(0, AbstractCommandsQuickAccessProvider.TFIDF_MAX_RESULTS);\n\t\t});\n\n\t\tconst noAccentsFilter = this.normalizeForFiltering(filter);\n\n\t\t// Filter\n\t\tconst filteredCommandPicks: ICommandQuickPick[] = [];\n\t\tfor (const commandPick of allCommandPicks) {\n\t\t\tcommandPick.labelNoAccents ??= this.normalizeForFiltering(commandPick.label);\n\t\t\tconst labelHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(noAccentsFilter, commandPick.labelNoAccents) ?? undefined;\n\n\t\t\tlet aliasHighlights: IMatch[] | undefined;\n\t\t\tif (commandPick.commandAlias) {\n\t\t\t\tcommandPick.aliasNoAccents ??= this.normalizeForFiltering(commandPick.commandAlias);\n\t\t\t\taliasHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(noAccentsFilter, commandPick.aliasNoAccents) ?? undefined;\n\t\t\t}\n\n\t\t\t// Add if matching in label or alias\n\t\t\tif (labelHighlights || aliasHighlights) {\n\t\t\t\tcommandPick.highlights = {\n\t\t\t\t\tlabel: labelHighlights,\n\t\t\t\t\tdetail: this.options.showAlias ? aliasHighlights : undefined\n\t\t\t\t};\n\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Also add if we have a 100% command ID match\n\t\t\telse if (filter === commandPick.commandId) {\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Handle tf-idf scoring for the rest if there's a filter\n\t\t\telse if (filter.length >= 3) {\n\t\t\t\tconst tfidf = runTfidf();\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// Add if we have a tf-idf score\n\t\t\t\tconst tfidfScore = tfidf.find(score => score.key === commandPick.commandId);\n\t\t\t\tif (tfidfScore) {\n\t\t\t\t\tcommandPick.tfIdfScore = tfidfScore.score;\n\t\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add description to commands that have duplicate labels\n\t\tconst mapLabelToCommand = new Map<string, ICommandQuickPick>();\n\t\tfor (const commandPick of filteredCommandPicks) {\n\t\t\tconst existingCommandForLabel = mapLabelToCommand.get(commandPick.label);\n\t\t\tif (existingCommandForLabel) {\n\t\t\t\tcommandPick.description = commandPick.commandId;\n\t\t\t\texistingCommandForLabel.description = existingCommandForLabel.commandId;\n\t\t\t} else {\n\t\t\t\tmapLabelToCommand.set(commandPick.label, commandPick);\n\t\t\t}\n\t\t}\n\n\t\t// Sort by MRU order and fallback to name otherwise\n\t\tfilteredCommandPicks.sort((commandPickA, commandPickB) => {\n\n\t\t\t// If a result came from tf-idf, we want to put that towards the bottom\n\t\t\tif (commandPickA.tfIdfScore && commandPickB.tfIdfScore) {\n\t\t\t\tif (commandPickA.tfIdfScore === commandPickB.tfIdfScore) {\n\t\t\t\t\treturn commandPickA.label.localeCompare(commandPickB.label); // prefer lexicographically smaller command\n\t\t\t\t}\n\n\t\t\t\treturn commandPickB.tfIdfScore - commandPickA.tfIdfScore; // prefer higher tf-idf score\n\t\t\t} else if (commandPickA.tfIdfScore) {\n\t\t\t\treturn 1; // first command has a score but other doesn't so other wins\n\t\t\t} else if (commandPickB.tfIdfScore) {\n\t\t\t\treturn -1; // other command has a score but first doesn't so first wins\n\t\t\t}\n\n\t\t\tconst commandACounter = this.commandsHistory.peek(commandPickA.commandId);\n\t\t\tconst commandBCounter = this.commandsHistory.peek(commandPickB.commandId);\n\n\t\t\tif (commandACounter && commandBCounter) {\n\t\t\t\treturn commandACounter > commandBCounter ? -1 : 1; // use more recently used command before older\n\t\t\t}\n\n\t\t\tif (commandACounter) {\n\t\t\t\treturn -1; // first command was used, so it wins over the non used one\n\t\t\t}\n\n\t\t\tif (commandBCounter) {\n\t\t\t\treturn 1; // other command was used so it wins over the command\n\t\t\t}\n\n\t\t\tif (this.options.suggestedCommandIds) {\n\t\t\t\tconst commandASuggestion = this.options.suggestedCommandIds.has(commandPickA.commandId);\n\t\t\t\tconst commandBSuggestion = this.options.suggestedCommandIds.has(commandPickB.commandId);\n\t\t\t\tif (commandASuggestion && commandBSuggestion) {\n\t\t\t\t\treturn 0; // honor the order of the array\n\t\t\t\t}\n\n\t\t\t\tif (commandASuggestion) {\n\t\t\t\t\treturn -1; // first command was suggested, so it wins over the non suggested one\n\t\t\t\t}\n\n\t\t\t\tif (commandBSuggestion) {\n\t\t\t\t\treturn 1; // other command was suggested so it wins over the command\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if one is Developer and the other isn't, put non-Developer first\n\t\t\tconst isDeveloperA = commandPickA.commandCategory === Categories.Developer.value;\n\t\t\tconst isDeveloperB = commandPickB.commandCategory === Categories.Developer.value;\n\t\t\tif (isDeveloperA && !isDeveloperB) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (!isDeveloperA && isDeveloperB) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// both commands were never used, so we sort by name\n\t\t\treturn commandPickA.label.localeCompare(commandPickB.label);\n\t\t});\n\n\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = [];\n\n\t\tlet addOtherSeparator = false;\n\t\tlet addSuggestedSeparator = true;\n\t\tlet addCommonlyUsedSeparator = !!this.options.suggestedCommandIds;\n\t\tfor (let i = 0; i < filteredCommandPicks.length; i++) {\n\t\t\tconst commandPick = filteredCommandPicks[i];\n\n\t\t\t// Separator: recently used\n\t\t\tif (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('recentlyUsed', \"recently used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t}\n\n\t\t\tif (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\taddSuggestedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: commonly used\n\t\t\tif (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('commonlyUsed', \"commonly used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t\taddCommonlyUsedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: other commands\n\t\t\tif (addOtherSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('morecCommands', \"other commands\") });\n\t\t\t\taddOtherSeparator = false;\n\t\t\t}\n\n\t\t\t// Command\n\t\t\tcommandPicks.push(this.toCommandPick(commandPick, runOptions));\n\t\t}\n\n\t\tif (!this.hasAdditionalCommandPicks(filter, token)) {\n\t\t\treturn commandPicks;\n\t\t}\n\n\t\treturn {\n\t\t\tpicks: commandPicks,\n\t\t\tadditionalPicks: (async (): Promise<Picks<ICommandQuickPick>> => {\n\t\t\t\tconst additionalCommandPicks = await this.getAdditionalCommandPicks(allCommandPicks, filteredCommandPicks, filter, token);\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = additionalCommandPicks.map(commandPick => this.toCommandPick(commandPick, runOptions));\n\t\t\t\t// Basically, if we haven't already added a separator, we add one before the additional picks so long\n\t\t\t\t// as one hasn't been added to the start of the array.\n\t\t\t\tif (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {\n\t\t\t\t\tcommandPicks.unshift({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\t}\n\t\t\t\treturn commandPicks;\n\t\t\t})()\n\t\t};\n\t}\n\n\tprivate toCommandPick(commandPick: ICommandQuickPick | IQuickPickSeparator, runOptions?: IQuickAccessProviderRunOptions): ICommandQuickPick | IQuickPickSeparator {\n\t\tif (commandPick.type === 'separator') {\n\t\t\treturn commandPick;\n\t\t}\n\n\t\tconst keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);\n\t\tconst ariaLabel = keybinding ?\n\t\t\tlocalize('commandPickAriaLabelWithKeybinding', \"{0}, {1}\", commandPick.label, keybinding.getAriaLabel()) :\n\t\t\tcommandPick.label;\n\n\t\treturn {\n\t\t\t...commandPick,\n\t\t\tariaLabel,\n\t\t\tdetail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined,\n\t\t\tkeybinding,\n\t\t\taccept: async () => {\n\n\t\t\t\t// Add to history\n\t\t\t\tthis.commandsHistory.push(commandPick.commandId);\n\n\t\t\t\t// Telementry\n\t\t\t\tthis.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', {\n\t\t\t\t\tid: commandPick.commandId,\n\t\t\t\t\tfrom: runOptions?.from ?? 'quick open'\n\t\t\t\t});\n\n\t\t\t\t// Run\n\t\t\t\ttry {\n\t\t\t\t\tcommandPick.args?.length\n\t\t\t\t\t\t? await this.commandService.executeCommand(commandPick.commandId, ...commandPick.args)\n\t\t\t\t\t\t: await this.commandService.executeCommand(commandPick.commandId);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isCancellationError(error)) {\n\t\t\t\t\t\tthis.dialogService.error(localize('canNotRun', \"Command '{0}' resulted in an error\", commandPick.label), toErrorMessage(error));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\t// TF-IDF string to be indexed\n\tprivate getTfIdfChunk({ label, commandAlias, commandDescription }: ICommandQuickPick) {\n\t\tlet chunk = label;\n\t\tif (commandAlias && commandAlias !== label) {\n\t\t\tchunk += ` - ${commandAlias}`;\n\t\t}\n\t\tif (commandDescription && commandDescription.value !== label) {\n\t\t\t// If the original is the same as the value, don't add it\n\t\t\tchunk += ` - ${commandDescription.value === commandDescription.original ? commandDescription.value : `${commandDescription.value} (${commandDescription.original})`}`;\n\t\t}\n\t\treturn chunk;\n\t}\n\n\t/**\n\t * Normalizes a string for filtering by removing accents, but only if\n\t * the result has the same length, otherwise returns the original string.\n\t */\n\tprivate normalizeForFiltering(value: string): string {\n\t\tconst withoutAccents = removeAccents(value);\n\t\tif (withoutAccents.length !== value.length) {\n\t\t\ttype QuickAccessTelemetry = {\n\t\t\t\toriginalLength: number;\n\t\t\t\tnormalizedLength: number;\n\t\t\t};\n\n\t\t\ttype QuickAccessTelemetryMeta = {\n\t\t\t\toriginalLength: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Length of the original filter string' };\n\t\t\t\tnormalizedLength: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Length of the normalized filter string' };\n\t\t\t\towner: 'dmitriv';\n\t\t\t\tcomment: 'Helps to gain insights on cases where the normalized filter string length differs from the original';\n\t\t\t};\n\n\t\t\tthis.telemetryService.publicLog2<QuickAccessTelemetry, QuickAccessTelemetryMeta>('QuickAccess:FilterLengthMismatch', {\n\t\t\t\toriginalLength: value.length,\n\t\t\t\tnormalizedLength: withoutAccents.length\n\t\t\t});\n\n\t\t\treturn value;\n\t\t} else {\n\t\t\treturn withoutAccents;\n\t\t}\n\t}\n\n\tprotected abstract getCommandPicks(token: CancellationToken): Promise<Array<ICommandQuickPick>>;\n\n\tprotected abstract hasAdditionalCommandPicks(filter: string, token: CancellationToken): boolean;\n\tprotected abstract getAdditionalCommandPicks(allPicks: ICommandQuickPick[], picksSoFar: ICommandQuickPick[], filter: string, token: CancellationToken): Promise<Array<ICommandQuickPick | IQuickPickSeparator>>;\n}\n\ninterface ISerializedCommandHistory {\n\treadonly usesLRU?: boolean;\n\treadonly entries: { key: string; value: number }[];\n}\n\ninterface ICommandsQuickAccessConfiguration {\n\treadonly workbench: {\n\t\treadonly commandPalette: {\n\t\t\treadonly history: number;\n\t\t\treadonly preserveInput: boolean;\n\t\t};\n\t};\n}\n\nexport class CommandsHistory extends Disposable {\n\n\tstatic readonly DEFAULT_COMMANDS_HISTORY_LENGTH = 50;\n\n\tprivate static readonly PREF_KEY_CACHE = 'commandPalette.mru.cache';\n\tprivate static readonly PREF_KEY_COUNTER = 'commandPalette.mru.counter';\n\n\tprivate static cache: LRUCache<string, number> | undefined;\n\tprivate static counter = 1;\n\tprivate static hasChanges = false;\n\n\tprivate configuredCommandsHistoryLength = 0;\n\n\tconstructor(\n\t\t@IStorageService private readonly storageService: IStorageService,\n\t\t@IConfigurationService private readonly configurationService: IConfigurationService,\n\t\t@ILogService private readonly logService: ILogService\n\t) {\n\t\tsuper();\n\n\t\tthis.updateConfiguration();\n\t\tthis.load();\n\n\t\tthis.registerListeners();\n\t}\n\n\tprivate registerListeners(): void {\n\t\tthis._register(this.configurationService.onDidChangeConfiguration(e => this.updateConfiguration(e)));\n\t\tthis._register(this.storageService.onWillSaveState(e => {\n\t\t\tif (e.reason === WillSaveStateReason.SHUTDOWN) {\n\t\t\t\t// Commands history is very dynamic and so we limit impact\n\t\t\t\t// on storage to only save on shutdown. This helps reduce\n\t\t\t\t// the overhead of syncing this data across machines.\n\t\t\t\tthis.saveState();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate updateConfiguration(e?: IConfigurationChangeEvent): void {\n\t\tif (e && !e.affectsConfiguration('workbench.commandPalette.history')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.configuredCommandsHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(this.configurationService);\n\n\t\tif (CommandsHistory.cache && CommandsHistory.cache.limit !== this.configuredCommandsHistoryLength) {\n\t\t\tCommandsHistory.cache.limit = this.configuredCommandsHistoryLength;\n\t\t\tCommandsHistory.hasChanges = true;\n\t\t}\n\t}\n\n\tprivate load(): void {\n\t\tconst raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE, StorageScope.PROFILE);\n\t\tlet serializedCache: ISerializedCommandHistory | undefined;\n\t\tif (raw) {\n\t\t\ttry {\n\t\t\t\tserializedCache = JSON.parse(raw);\n\t\t\t} catch (error) {\n\t\t\t\tthis.logService.error(`[CommandsHistory] invalid data: ${error}`);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = CommandsHistory.cache = new LRUCache<string, number>(this.configuredCommandsHistoryLength, 1);\n\t\tif (serializedCache) {\n\t\t\tlet entries: { key: string; value: number }[];\n\t\t\tif (serializedCache.usesLRU) {\n\t\t\t\tentries = serializedCache.entries;\n\t\t\t} else {\n\t\t\t\tentries = serializedCache.entries.sort((a, b) => a.value - b.value);\n\t\t\t}\n\t\t\tentries.forEach(entry => cache.set(entry.key, entry.value));\n\t\t}\n\n\t\tCommandsHistory.counter = this.storageService.getNumber(CommandsHistory.PREF_KEY_COUNTER, StorageScope.PROFILE, CommandsHistory.counter);\n\t}\n\n\tpush(commandId: string): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tCommandsHistory.cache.set(commandId, CommandsHistory.counter++); // set counter to command\n\t\tCommandsHistory.hasChanges = true;\n\t}\n\n\tpeek(commandId: string): number | undefined {\n\t\treturn CommandsHistory.cache?.peek(commandId);\n\t}\n\n\tprivate saveState(): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!CommandsHistory.hasChanges) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst serializedCache: ISerializedCommandHistory = { usesLRU: true, entries: [] };\n\t\tCommandsHistory.cache.forEach((value, key) => serializedCache.entries.push({ key, value }));\n\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(serializedCache), StorageScope.PROFILE, StorageTarget.USER);\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_COUNTER, CommandsHistory.counter, StorageScope.PROFILE, StorageTarget.USER);\n\t\tCommandsHistory.hasChanges = false;\n\t}\n\n\tstatic getConfiguredCommandHistoryLength(configurationService: IConfigurationService): number {\n\t\tconst config = configurationService.getValue<ICommandsQuickAccessConfiguration>();\n\n\t\tconst configuredCommandHistoryLength = config.workbench?.commandPalette?.history;\n\t\tif (typeof configuredCommandHistoryLength === 'number') {\n\t\t\treturn configuredCommandHistoryLength;\n\t\t}\n\n\t\treturn CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/platform/quickinput/browser/commandsQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAIhG,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAU,8BAA8B,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AAC3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAgC,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAA6B,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAA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AO,8BAA8B,CAAC;QACvC,CAAC;QAED,OAAO,iBAAe,CAAC,+BAA+B,CAAC;IACxD,CAAC;;AAnHW,eAAe;IAczB,WAAA,eAAe,CAAA;IACf,WAAA,qBAAqB,CAAA;IACrB,WAAA,WAAW,CAAA;GAhBD,eAAe,CAoH3B","file":"commandsQuickAccess.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { WorkbenchActionExecutedClassification, WorkbenchActionExecutedEvent } from '../../../base/common/actions.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { toErrorMessage } from '../../../base/common/errorMessage.js';\nimport { isCancellationError } from '../../../base/common/errors.js';\nimport { IMatch, matchesBaseContiguousSubString, matchesWords, or } from '../../../base/common/filters.js';\nimport { createSingleCallFunction } from '../../../base/common/functional.js';\nimport { Disposable, DisposableStore, IDisposable } from '../../../base/common/lifecycle.js';\nimport { LRUCache } from '../../../base/common/map.js';\nimport { TfIdfCalculator, normalizeTfIdfScores } from '../../../base/common/tfIdf.js';\nimport { localize } from '../../../nls.js';\nimport { ILocalizedString } from '../../action/common/action.js';\nimport { ICommandService } from '../../commands/common/commands.js';\nimport { IConfigurationChangeEvent, IConfigurationService } from '../../configuration/common/configuration.js';\nimport { IDialogService } from '../../dialogs/common/dialogs.js';\nimport { IInstantiationService } from '../../instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../keybinding/common/keybinding.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { FastAndSlowPicks, IPickerQuickAccessItem, IPickerQuickAccessProviderOptions, PickerQuickAccessProvider, Picks } from './pickerQuickAccess.js';\nimport { IQuickAccessProviderRunOptions } from '../common/quickAccess.js';\nimport { IQuickPickSeparator } from '../common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget, WillSaveStateReason } from '../../storage/common/storage.js';\nimport { ITelemetryService } from '../../telemetry/common/telemetry.js';\nimport { Categories } from '../../action/common/actionCommonCategories.js';\n\nexport interface ICommandQuickPick extends IPickerQuickAccessItem {\n\treadonly commandId: string;\n\treadonly commandAlias?: string;\n\treadonly commandDescription?: ILocalizedString;\n\treadonly commandCategory?: string;\n\n\treadonly args?: unknown[];\n\n\ttfIdfScore?: number;\n}\n\nexport interface ICommandsQuickAccessOptions extends IPickerQuickAccessProviderOptions<ICommandQuickPick> {\n\treadonly showAlias: boolean;\n\tsuggestedCommandIds?: Set<string>;\n}\n\nexport abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider<ICommandQuickPick> implements IDisposable {\n\n\tstatic PREFIX = '>';\n\n\tprivate static readonly TFIDF_THRESHOLD = 0.5;\n\tprivate static readonly TFIDF_MAX_RESULTS = 5;\n\n\tprivate static WORD_FILTER = or(matchesBaseContiguousSubString, matchesWords);\n\n\tprivate readonly commandsHistory: CommandsHistory;\n\n\tprotected override readonly options: ICommandsQuickAccessOptions;\n\n\tconstructor(\n\t\toptions: ICommandsQuickAccessOptions,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IKeybindingService protected readonly keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly commandService: ICommandService,\n\t\t@ITelemetryService private readonly telemetryService: ITelemetryService,\n\t\t@IDialogService private readonly dialogService: IDialogService\n\t) {\n\t\tsuper(AbstractCommandsQuickAccessProvider.PREFIX, options);\n\n\t\tthis.commandsHistory = this._register(instantiationService.createInstance(CommandsHistory));\n\n\t\tthis.options = options;\n\t}\n\n\tprotected async _getPicks(filter: string, _disposables: DisposableStore, token: CancellationToken, runOptions?: IQuickAccessProviderRunOptions): Promise<Picks<ICommandQuickPick> | FastAndSlowPicks<ICommandQuickPick>> {\n\n\t\t// Ask subclass for all command picks\n\t\tconst allCommandPicks = await this.getCommandPicks(token);\n\n\t\tif (token.isCancellationRequested) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst runTfidf = createSingleCallFunction(() => {\n\t\t\tconst tfidf = new TfIdfCalculator();\n\t\t\ttfidf.updateDocuments(allCommandPicks.map(commandPick => ({\n\t\t\t\tkey: commandPick.commandId,\n\t\t\t\ttextChunks: [this.getTfIdfChunk(commandPick)]\n\t\t\t})));\n\t\t\tconst result = tfidf.calculateScores(filter, token);\n\n\t\t\treturn normalizeTfIdfScores(result)\n\t\t\t\t.filter(score => score.score > AbstractCommandsQuickAccessProvider.TFIDF_THRESHOLD)\n\t\t\t\t.slice(0, AbstractCommandsQuickAccessProvider.TFIDF_MAX_RESULTS);\n\t\t});\n\n\t\t// Filter\n\t\tconst filteredCommandPicks: ICommandQuickPick[] = [];\n\t\tfor (const commandPick of allCommandPicks) {\n\t\t\tconst labelHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.label) ?? undefined;\n\n\t\t\tlet aliasHighlights: IMatch[] | undefined;\n\t\t\tif (commandPick.commandAlias) {\n\t\t\t\taliasHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.commandAlias) ?? undefined;\n\t\t\t}\n\n\t\t\t// Add if matching in label or alias\n\t\t\tif (labelHighlights || aliasHighlights) {\n\t\t\t\tcommandPick.highlights = {\n\t\t\t\t\tlabel: labelHighlights,\n\t\t\t\t\tdetail: this.options.showAlias ? aliasHighlights : undefined\n\t\t\t\t};\n\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Also add if we have a 100% command ID match\n\t\t\telse if (filter === commandPick.commandId) {\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Handle tf-idf scoring for the rest if there's a filter\n\t\t\telse if (filter.length >= 3) {\n\t\t\t\tconst tfidf = runTfidf();\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// Add if we have a tf-idf score\n\t\t\t\tconst tfidfScore = tfidf.find(score => score.key === commandPick.commandId);\n\t\t\t\tif (tfidfScore) {\n\t\t\t\t\tcommandPick.tfIdfScore = tfidfScore.score;\n\t\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add description to commands that have duplicate labels\n\t\tconst mapLabelToCommand = new Map<string, ICommandQuickPick>();\n\t\tfor (const commandPick of filteredCommandPicks) {\n\t\t\tconst existingCommandForLabel = mapLabelToCommand.get(commandPick.label);\n\t\t\tif (existingCommandForLabel) {\n\t\t\t\tcommandPick.description = commandPick.commandId;\n\t\t\t\texistingCommandForLabel.description = existingCommandForLabel.commandId;\n\t\t\t} else {\n\t\t\t\tmapLabelToCommand.set(commandPick.label, commandPick);\n\t\t\t}\n\t\t}\n\n\t\t// Sort by MRU order and fallback to name otherwise\n\t\tfilteredCommandPicks.sort((commandPickA, commandPickB) => {\n\n\t\t\t// If a result came from tf-idf, we want to put that towards the bottom\n\t\t\tif (commandPickA.tfIdfScore && commandPickB.tfIdfScore) {\n\t\t\t\tif (commandPickA.tfIdfScore === commandPickB.tfIdfScore) {\n\t\t\t\t\treturn commandPickA.label.localeCompare(commandPickB.label); // prefer lexicographically smaller command\n\t\t\t\t}\n\n\t\t\t\treturn commandPickB.tfIdfScore - commandPickA.tfIdfScore; // prefer higher tf-idf score\n\t\t\t} else if (commandPickA.tfIdfScore) {\n\t\t\t\treturn 1; // first command has a score but other doesn't so other wins\n\t\t\t} else if (commandPickB.tfIdfScore) {\n\t\t\t\treturn -1; // other command has a score but first doesn't so first wins\n\t\t\t}\n\n\t\t\tconst commandACounter = this.commandsHistory.peek(commandPickA.commandId);\n\t\t\tconst commandBCounter = this.commandsHistory.peek(commandPickB.commandId);\n\n\t\t\tif (commandACounter && commandBCounter) {\n\t\t\t\treturn commandACounter > commandBCounter ? -1 : 1; // use more recently used command before older\n\t\t\t}\n\n\t\t\tif (commandACounter) {\n\t\t\t\treturn -1; // first command was used, so it wins over the non used one\n\t\t\t}\n\n\t\t\tif (commandBCounter) {\n\t\t\t\treturn 1; // other command was used so it wins over the command\n\t\t\t}\n\n\t\t\tif (this.options.suggestedCommandIds) {\n\t\t\t\tconst commandASuggestion = this.options.suggestedCommandIds.has(commandPickA.commandId);\n\t\t\t\tconst commandBSuggestion = this.options.suggestedCommandIds.has(commandPickB.commandId);\n\t\t\t\tif (commandASuggestion && commandBSuggestion) {\n\t\t\t\t\treturn 0; // honor the order of the array\n\t\t\t\t}\n\n\t\t\t\tif (commandASuggestion) {\n\t\t\t\t\treturn -1; // first command was suggested, so it wins over the non suggested one\n\t\t\t\t}\n\n\t\t\t\tif (commandBSuggestion) {\n\t\t\t\t\treturn 1; // other command was suggested so it wins over the command\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if one is Developer and the other isn't, put non-Developer first\n\t\t\tconst isDeveloperA = commandPickA.commandCategory === Categories.Developer.value;\n\t\t\tconst isDeveloperB = commandPickB.commandCategory === Categories.Developer.value;\n\t\t\tif (isDeveloperA && !isDeveloperB) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (!isDeveloperA && isDeveloperB) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// both commands were never used, so we sort by name\n\t\t\treturn commandPickA.label.localeCompare(commandPickB.label);\n\t\t});\n\n\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = [];\n\n\t\tlet addOtherSeparator = false;\n\t\tlet addSuggestedSeparator = true;\n\t\tlet addCommonlyUsedSeparator = !!this.options.suggestedCommandIds;\n\t\tfor (let i = 0; i < filteredCommandPicks.length; i++) {\n\t\t\tconst commandPick = filteredCommandPicks[i];\n\n\t\t\t// Separator: recently used\n\t\t\tif (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('recentlyUsed', \"recently used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t}\n\n\t\t\tif (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\taddSuggestedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: commonly used\n\t\t\tif (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('commonlyUsed', \"commonly used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t\taddCommonlyUsedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: other commands\n\t\t\tif (addOtherSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('morecCommands', \"other commands\") });\n\t\t\t\taddOtherSeparator = false;\n\t\t\t}\n\n\t\t\t// Command\n\t\t\tcommandPicks.push(this.toCommandPick(commandPick, runOptions));\n\t\t}\n\n\t\tif (!this.hasAdditionalCommandPicks(filter, token)) {\n\t\t\treturn commandPicks;\n\t\t}\n\n\t\treturn {\n\t\t\tpicks: commandPicks,\n\t\t\tadditionalPicks: (async (): Promise<Picks<ICommandQuickPick>> => {\n\t\t\t\tconst additionalCommandPicks = await this.getAdditionalCommandPicks(allCommandPicks, filteredCommandPicks, filter, token);\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = additionalCommandPicks.map(commandPick => this.toCommandPick(commandPick, runOptions));\n\t\t\t\t// Basically, if we haven't already added a separator, we add one before the additional picks so long\n\t\t\t\t// as one hasn't been added to the start of the array.\n\t\t\t\tif (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {\n\t\t\t\t\tcommandPicks.unshift({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\t}\n\t\t\t\treturn commandPicks;\n\t\t\t})()\n\t\t};\n\t}\n\n\tprivate toCommandPick(commandPick: ICommandQuickPick | IQuickPickSeparator, runOptions?: IQuickAccessProviderRunOptions): ICommandQuickPick | IQuickPickSeparator {\n\t\tif (commandPick.type === 'separator') {\n\t\t\treturn commandPick;\n\t\t}\n\n\t\tconst keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);\n\t\tconst ariaLabel = keybinding ?\n\t\t\tlocalize('commandPickAriaLabelWithKeybinding', \"{0}, {1}\", commandPick.label, keybinding.getAriaLabel()) :\n\t\t\tcommandPick.label;\n\n\t\treturn {\n\t\t\t...commandPick,\n\t\t\tariaLabel,\n\t\t\tdetail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined,\n\t\t\tkeybinding,\n\t\t\taccept: async () => {\n\n\t\t\t\t// Add to history\n\t\t\t\tthis.commandsHistory.push(commandPick.commandId);\n\n\t\t\t\t// Telementry\n\t\t\t\tthis.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', {\n\t\t\t\t\tid: commandPick.commandId,\n\t\t\t\t\tfrom: runOptions?.from ?? 'quick open'\n\t\t\t\t});\n\n\t\t\t\t// Run\n\t\t\t\ttry {\n\t\t\t\t\tcommandPick.args?.length\n\t\t\t\t\t\t? await this.commandService.executeCommand(commandPick.commandId, ...commandPick.args)\n\t\t\t\t\t\t: await this.commandService.executeCommand(commandPick.commandId);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isCancellationError(error)) {\n\t\t\t\t\t\tthis.dialogService.error(localize('canNotRun', \"Command '{0}' resulted in an error\", commandPick.label), toErrorMessage(error));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\t// TF-IDF string to be indexed\n\tprivate getTfIdfChunk({ label, commandAlias, commandDescription }: ICommandQuickPick) {\n\t\tlet chunk = label;\n\t\tif (commandAlias && commandAlias !== label) {\n\t\t\tchunk += ` - ${commandAlias}`;\n\t\t}\n\t\tif (commandDescription && commandDescription.value !== label) {\n\t\t\t// If the original is the same as the value, don't add it\n\t\t\tchunk += ` - ${commandDescription.value === commandDescription.original ? commandDescription.value : `${commandDescription.value} (${commandDescription.original})`}`;\n\t\t}\n\t\treturn chunk;\n\t}\n\n\tprotected abstract getCommandPicks(token: CancellationToken): Promise<Array<ICommandQuickPick>>;\n\n\tprotected abstract hasAdditionalCommandPicks(filter: string, token: CancellationToken): boolean;\n\tprotected abstract getAdditionalCommandPicks(allPicks: ICommandQuickPick[], picksSoFar: ICommandQuickPick[], filter: string, token: CancellationToken): Promise<Array<ICommandQuickPick | IQuickPickSeparator>>;\n}\n\ninterface ISerializedCommandHistory {\n\treadonly usesLRU?: boolean;\n\treadonly entries: { key: string; value: number }[];\n}\n\ninterface ICommandsQuickAccessConfiguration {\n\treadonly workbench: {\n\t\treadonly commandPalette: {\n\t\t\treadonly history: number;\n\t\t\treadonly preserveInput: boolean;\n\t\t};\n\t};\n}\n\nexport class CommandsHistory extends Disposable {\n\n\tstatic readonly DEFAULT_COMMANDS_HISTORY_LENGTH = 50;\n\n\tprivate static readonly PREF_KEY_CACHE = 'commandPalette.mru.cache';\n\tprivate static readonly PREF_KEY_COUNTER = 'commandPalette.mru.counter';\n\n\tprivate static cache: LRUCache<string, number> | undefined;\n\tprivate static counter = 1;\n\tprivate static hasChanges = false;\n\n\tprivate configuredCommandsHistoryLength = 0;\n\n\tconstructor(\n\t\t@IStorageService private readonly storageService: IStorageService,\n\t\t@IConfigurationService private readonly configurationService: IConfigurationService,\n\t\t@ILogService private readonly logService: ILogService\n\t) {\n\t\tsuper();\n\n\t\tthis.updateConfiguration();\n\t\tthis.load();\n\n\t\tthis.registerListeners();\n\t}\n\n\tprivate registerListeners(): void {\n\t\tthis._register(this.configurationService.onDidChangeConfiguration(e => this.updateConfiguration(e)));\n\t\tthis._register(this.storageService.onWillSaveState(e => {\n\t\t\tif (e.reason === WillSaveStateReason.SHUTDOWN) {\n\t\t\t\t// Commands history is very dynamic and so we limit impact\n\t\t\t\t// on storage to only save on shutdown. This helps reduce\n\t\t\t\t// the overhead of syncing this data across machines.\n\t\t\t\tthis.saveState();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate updateConfiguration(e?: IConfigurationChangeEvent): void {\n\t\tif (e && !e.affectsConfiguration('workbench.commandPalette.history')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.configuredCommandsHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(this.configurationService);\n\n\t\tif (CommandsHistory.cache && CommandsHistory.cache.limit !== this.configuredCommandsHistoryLength) {\n\t\t\tCommandsHistory.cache.limit = this.configuredCommandsHistoryLength;\n\t\t\tCommandsHistory.hasChanges = true;\n\t\t}\n\t}\n\n\tprivate load(): void {\n\t\tconst raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE, StorageScope.PROFILE);\n\t\tlet serializedCache: ISerializedCommandHistory | undefined;\n\t\tif (raw) {\n\t\t\ttry {\n\t\t\t\tserializedCache = JSON.parse(raw);\n\t\t\t} catch (error) {\n\t\t\t\tthis.logService.error(`[CommandsHistory] invalid data: ${error}`);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = CommandsHistory.cache = new LRUCache<string, number>(this.configuredCommandsHistoryLength, 1);\n\t\tif (serializedCache) {\n\t\t\tlet entries: { key: string; value: number }[];\n\t\t\tif (serializedCache.usesLRU) {\n\t\t\t\tentries = serializedCache.entries;\n\t\t\t} else {\n\t\t\t\tentries = serializedCache.entries.sort((a, b) => a.value - b.value);\n\t\t\t}\n\t\t\tentries.forEach(entry => cache.set(entry.key, entry.value));\n\t\t}\n\n\t\tCommandsHistory.counter = this.storageService.getNumber(CommandsHistory.PREF_KEY_COUNTER, StorageScope.PROFILE, CommandsHistory.counter);\n\t}\n\n\tpush(commandId: string): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tCommandsHistory.cache.set(commandId, CommandsHistory.counter++); // set counter to command\n\t\tCommandsHistory.hasChanges = true;\n\t}\n\n\tpeek(commandId: string): number | undefined {\n\t\treturn CommandsHistory.cache?.peek(commandId);\n\t}\n\n\tprivate saveState(): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!CommandsHistory.hasChanges) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst serializedCache: ISerializedCommandHistory = { usesLRU: true, entries: [] };\n\t\tCommandsHistory.cache.forEach((value, key) => serializedCache.entries.push({ key, value }));\n\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(serializedCache), StorageScope.PROFILE, StorageTarget.USER);\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_COUNTER, CommandsHistory.counter, StorageScope.PROFILE, StorageTarget.USER);\n\t\tCommandsHistory.hasChanges = false;\n\t}\n\n\tstatic getConfiguredCommandHistoryLength(configurationService: IConfigurationService): number {\n\t\tconst config = configurationService.getValue<ICommandsQuickAccessConfiguration>();\n\n\t\tconst configuredCommandHistoryLength = config.workbench?.commandPalette?.history;\n\t\tif (typeof configuredCommandHistoryLength === 'number') {\n\t\t\treturn configuredCommandHistoryLength;\n\t\t}\n\n\t\treturn CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH;\n\t}\n}\n"]}
|
|
@@ -62,7 +62,7 @@ let HelpQuickAccessProvider = class HelpQuickAccessProvider {
|
|
|
62
62
|
prefix,
|
|
63
63
|
label,
|
|
64
64
|
keybinding: helpEntry.commandId ? this.keybindingService.lookupKeybinding(helpEntry.commandId) : undefined,
|
|
65
|
-
ariaLabel: localize(
|
|
65
|
+
ariaLabel: localize(1754, "{0}, {1}", label, helpEntry.description),
|
|
66
66
|
description: helpEntry.description
|
|
67
67
|
};
|
|
68
68
|
});
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
.quick-input-left-action-bar {
|
|
24
24
|
display: flex;
|
|
25
25
|
margin-left: 4px;
|
|
26
|
-
flex: 1;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
/* give some space between input and action bar */
|
|
@@ -42,12 +41,12 @@
|
|
|
42
41
|
text-align: center;
|
|
43
42
|
text-overflow: ellipsis;
|
|
44
43
|
overflow: hidden;
|
|
44
|
+
flex: 1;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.quick-input-right-action-bar {
|
|
48
48
|
display: flex;
|
|
49
49
|
margin-right: 4px;
|
|
50
|
-
flex: 1;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
.quick-input-right-action-bar > .actions-container {
|
|
@@ -349,6 +348,8 @@
|
|
|
349
348
|
|
|
350
349
|
.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {
|
|
351
350
|
background: none;
|
|
351
|
+
border-color: inherit;
|
|
352
|
+
opacity: 0.8;
|
|
352
353
|
}
|
|
353
354
|
|
|
354
355
|
.quick-input-list .quick-input-list-separator-as-item {
|
|
@@ -389,11 +390,16 @@
|
|
|
389
390
|
padding-bottom: 5px;
|
|
390
391
|
}
|
|
391
392
|
|
|
393
|
+
.quick-input-tree.quick-input-tree-flat .monaco-tl-indent,
|
|
394
|
+
.quick-input-tree.quick-input-tree-flat .monaco-tl-twistie {
|
|
395
|
+
display: none !important;
|
|
396
|
+
}
|
|
397
|
+
|
|
392
398
|
.quick-input-tree .quick-input-tree-entry {
|
|
393
399
|
box-sizing: border-box;
|
|
394
400
|
overflow: hidden;
|
|
395
401
|
display: flex;
|
|
396
|
-
padding:
|
|
402
|
+
padding-right: 6px;
|
|
397
403
|
}
|
|
398
404
|
|
|
399
405
|
.quick-input-tree .quick-input-tree-label {
|
|
@@ -31,22 +31,22 @@ import { IHoverService, WorkbenchHoverDelegate } from '../../hover/browser/hover
|
|
|
31
31
|
import { ContextKeyExpr, RawContextKey } from '../../contextkey/common/contextkey.js';
|
|
32
32
|
import { observableValue } from '../../../base/common/observable.js';
|
|
33
33
|
export const inQuickInputContextKeyValue = 'inQuickInput';
|
|
34
|
-
export const InQuickInputContextKey = new RawContextKey(inQuickInputContextKeyValue, false, localize(
|
|
34
|
+
export const InQuickInputContextKey = new RawContextKey(inQuickInputContextKeyValue, false, localize(1755, "Whether keyboard focus is inside the quick input control"));
|
|
35
35
|
export const inQuickInputContext = ContextKeyExpr.has(inQuickInputContextKeyValue);
|
|
36
36
|
export const quickInputAlignmentContextKeyValue = 'quickInputAlignment';
|
|
37
|
-
export const QuickInputAlignmentContextKey = new RawContextKey(quickInputAlignmentContextKeyValue, 'top', localize(
|
|
37
|
+
export const QuickInputAlignmentContextKey = new RawContextKey(quickInputAlignmentContextKeyValue, 'top', localize(1756, "The alignment of the quick input"));
|
|
38
38
|
export const quickInputTypeContextKeyValue = 'quickInputType';
|
|
39
|
-
export const QuickInputTypeContextKey = new RawContextKey(quickInputTypeContextKeyValue, undefined, localize(
|
|
39
|
+
export const QuickInputTypeContextKey = new RawContextKey(quickInputTypeContextKeyValue, undefined, localize(1757, "The type of the currently visible quick input"));
|
|
40
40
|
export const endOfQuickInputBoxContextKeyValue = 'cursorAtEndOfQuickInputBox';
|
|
41
|
-
export const EndOfQuickInputBoxContextKey = new RawContextKey(endOfQuickInputBoxContextKeyValue, false, localize(
|
|
41
|
+
export const EndOfQuickInputBoxContextKey = new RawContextKey(endOfQuickInputBoxContextKeyValue, false, localize(1758, "Whether the cursor in the quick input is at the end of the input box"));
|
|
42
42
|
export const endOfQuickInputBoxContext = ContextKeyExpr.has(endOfQuickInputBoxContextKeyValue);
|
|
43
43
|
export const backButton = {
|
|
44
44
|
iconClass: ThemeIcon.asClassName(Codicon.quickInputBack),
|
|
45
|
-
tooltip: localize(
|
|
45
|
+
tooltip: localize(1759, "Back"),
|
|
46
46
|
handle: -1 // TODO
|
|
47
47
|
};
|
|
48
48
|
export class QuickInput extends Disposable {
|
|
49
|
-
static { this.noPromptMessage = localize(
|
|
49
|
+
static { this.noPromptMessage = localize(1760, "Press 'Enter' to confirm your input or 'Escape' to cancel"); }
|
|
50
50
|
constructor(ui) {
|
|
51
51
|
super();
|
|
52
52
|
this.ui = ui;
|
|
@@ -322,7 +322,7 @@ export class QuickInput extends Disposable {
|
|
|
322
322
|
}
|
|
323
323
|
getSteps() {
|
|
324
324
|
if (this.step && this.totalSteps) {
|
|
325
|
-
return localize(
|
|
325
|
+
return localize(1761, "{0}/{1}", this.step, this.totalSteps);
|
|
326
326
|
}
|
|
327
327
|
if (this.step) {
|
|
328
328
|
return String(this.step);
|
|
@@ -352,7 +352,7 @@ export class QuickInput extends Disposable {
|
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
export class QuickPick extends QuickInput {
|
|
355
|
-
static { this.DEFAULT_ARIA_LABEL = localize(
|
|
355
|
+
static { this.DEFAULT_ARIA_LABEL = localize(1762, "Type to narrow down results."); }
|
|
356
356
|
constructor(ui) {
|
|
357
357
|
super(ui);
|
|
358
358
|
this._value = '';
|
|
@@ -586,7 +586,7 @@ export class QuickPick extends QuickInput {
|
|
|
586
586
|
this.update();
|
|
587
587
|
}
|
|
588
588
|
get okLabel() {
|
|
589
|
-
return this._okLabel ?? localize(
|
|
589
|
+
return this._okLabel ?? localize(1763, "OK");
|
|
590
590
|
}
|
|
591
591
|
set okLabel(okLabel) {
|
|
592
592
|
this._okLabel = okLabel;
|
|
@@ -932,7 +932,7 @@ export class InputBox extends QuickInput {
|
|
|
932
932
|
set prompt(prompt) {
|
|
933
933
|
this._prompt = prompt;
|
|
934
934
|
this.noValidationMessage = prompt
|
|
935
|
-
? localize(
|
|
935
|
+
? localize(1764, "{0} (Press 'Enter' to confirm or 'Escape' to cancel)", prompt)
|
|
936
936
|
: QuickInput.noPromptMessage;
|
|
937
937
|
this.update();
|
|
938
938
|
}
|
|
@@ -13,7 +13,7 @@ function registerQuickInputCommandAndKeybindingRule(rule, options = {}) {
|
|
|
13
13
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
14
14
|
weight: 200 /* KeybindingWeight.WorkbenchContrib */,
|
|
15
15
|
when: inQuickInputContext,
|
|
16
|
-
metadata: { description: localize(
|
|
16
|
+
metadata: { description: localize(1765, "Used while in the context of any kind of quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
|
|
17
17
|
...rule,
|
|
18
18
|
secondary: getSecondary(rule.primary, rule.secondary ?? [], options)
|
|
19
19
|
});
|
|
@@ -24,7 +24,7 @@ function registerQuickPickCommandAndKeybindingRule(rule, options = {}) {
|
|
|
24
24
|
when: ContextKeyExpr.and(ContextKeyExpr.or(
|
|
25
25
|
// Only things that use Tree widgets
|
|
26
26
|
ContextKeyExpr.equals(quickInputTypeContextKeyValue, "quickPick" /* QuickInputType.QuickPick */), ContextKeyExpr.equals(quickInputTypeContextKeyValue, "quickTree" /* QuickInputType.QuickTree */)), inQuickInputContext),
|
|
27
|
-
metadata: { description: localize(
|
|
27
|
+
metadata: { description: localize(1766, "Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
|
|
28
28
|
...rule,
|
|
29
29
|
secondary: getSecondary(rule.primary, rule.secondary ?? [], options)
|
|
30
30
|
});
|
|
@@ -79,8 +79,8 @@ registerQuickPickCommandAndKeybindingRule({ id: 'quickInput.previous', primary:
|
|
|
79
79
|
// In this case, we want that modifier key+up/down to navigate to the next/previous item, not the next/previous separator.
|
|
80
80
|
// To handle this, we have a separate command for navigating to the next/previous separator when we are not in quick access mode.
|
|
81
81
|
// If, however, we are in quick access mode, and you hold down an additional modifier key, we will navigate to the next/previous separator.
|
|
82
|
-
const nextSeparatorFallbackDesc = localize(
|
|
83
|
-
const prevSeparatorFallbackDesc = localize(
|
|
82
|
+
const nextSeparatorFallbackDesc = localize(1767, "If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator.");
|
|
83
|
+
const prevSeparatorFallbackDesc = localize(1768, "If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");
|
|
84
84
|
if (isMacintosh) {
|
|
85
85
|
registerQuickPickCommandAndKeybindingRule({
|
|
86
86
|
id: 'quickInput.nextSeparatorWithQuickAccessFallback',
|
|
@@ -145,7 +145,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
145
145
|
// All other kinds of Quick things handle Accept, except Widget. In other words, Accepting is a detail on the things
|
|
146
146
|
// that extend IQuickInput
|
|
147
147
|
ContextKeyExpr.notEquals(quickInputTypeContextKeyValue, "quickWidget" /* QuickInputType.QuickWidget */), inQuickInputContext, ContextKeyExpr.not('isComposing')),
|
|
148
|
-
metadata: { description: localize(
|
|
148
|
+
metadata: { description: localize(1769, "Used while in the context of some quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
|
|
149
149
|
handler: (accessor) => {
|
|
150
150
|
const currentQuickPick = accessor.get(IQuickInputService).currentQuickInput;
|
|
151
151
|
currentQuickPick?.accept();
|
|
@@ -23,6 +23,7 @@ import { Emitter, Event } from '../../../base/common/event.js';
|
|
|
23
23
|
import { Disposable, dispose } from '../../../base/common/lifecycle.js';
|
|
24
24
|
import Severity from '../../../base/common/severity.js';
|
|
25
25
|
import { isString } from '../../../base/common/types.js';
|
|
26
|
+
import { isModifierKey } from '../../../base/common/keyCodes.js';
|
|
26
27
|
import { localize } from '../../../nls.js';
|
|
27
28
|
import { QuickInputHideReason } from '../common/quickInput.js';
|
|
28
29
|
import { QuickInputBox } from './quickInputBox.js';
|
|
@@ -117,7 +118,7 @@ let QuickInputController = class QuickInputController extends Disposable {
|
|
|
117
118
|
const rightActionBar = this._register(new ActionBar(titleBar, { hoverDelegate: this.options.hoverDelegate }));
|
|
118
119
|
rightActionBar.domNode.classList.add('quick-input-right-action-bar');
|
|
119
120
|
const headerContainer = dom.append(container, $('.quick-input-header'));
|
|
120
|
-
const checkAll = this._register(new TriStateCheckbox(localize(
|
|
121
|
+
const checkAll = this._register(new TriStateCheckbox(localize(1770, "Toggle all checkboxes"), false, { ...defaultCheckboxStyles, size: 15 }));
|
|
121
122
|
dom.append(headerContainer, checkAll.domNode);
|
|
122
123
|
this._register(checkAll.onChange(() => {
|
|
123
124
|
const checked = checkAll.checked;
|
|
@@ -136,21 +137,21 @@ let QuickInputController = class QuickInputController extends Disposable {
|
|
|
136
137
|
const visibleCountContainer = dom.append(filterContainer, $('.quick-input-visible-count'));
|
|
137
138
|
visibleCountContainer.setAttribute('aria-live', 'polite');
|
|
138
139
|
visibleCountContainer.setAttribute('aria-atomic', 'true');
|
|
139
|
-
const visibleCount = this._register(new CountBadge(visibleCountContainer, { countFormat: localize(
|
|
140
|
+
const visibleCount = this._register(new CountBadge(visibleCountContainer, { countFormat: localize(1771, "{0} Results") }, this.styles.countBadge));
|
|
140
141
|
const countContainer = dom.append(filterContainer, $('.quick-input-count'));
|
|
141
142
|
countContainer.setAttribute('aria-live', 'polite');
|
|
142
|
-
const count = this._register(new CountBadge(countContainer, { countFormat: localize(
|
|
143
|
+
const count = this._register(new CountBadge(countContainer, { countFormat: localize(1772, "{0} Selected") }, this.styles.countBadge));
|
|
143
144
|
const inlineActionBar = this._register(new ActionBar(headerContainer, { hoverDelegate: this.options.hoverDelegate }));
|
|
144
145
|
inlineActionBar.domNode.classList.add('quick-input-inline-action-bar');
|
|
145
146
|
const okContainer = dom.append(headerContainer, $('.quick-input-action'));
|
|
146
147
|
const ok = this._register(new Button(okContainer, this.styles.button));
|
|
147
|
-
ok.label = localize(
|
|
148
|
+
ok.label = localize(1773, "OK");
|
|
148
149
|
this._register(ok.onDidClick(e => {
|
|
149
150
|
this.onDidAcceptEmitter.fire();
|
|
150
151
|
}));
|
|
151
152
|
const customButtonContainer = dom.append(headerContainer, $('.quick-input-action'));
|
|
152
153
|
const customButton = this._register(new Button(customButtonContainer, { ...this.styles.button, supportIcons: true }));
|
|
153
|
-
customButton.label = localize(
|
|
154
|
+
customButton.label = localize(1774, "Custom");
|
|
154
155
|
this._register(customButton.onDidClick(e => {
|
|
155
156
|
this.onDidCustomEmitter.fire();
|
|
156
157
|
}));
|
|
@@ -166,7 +167,13 @@ let QuickInputController = class QuickInputController extends Disposable {
|
|
|
166
167
|
inputBox.setAttribute('aria-controls', listId);
|
|
167
168
|
this._register(list.onDidChangeFocus(() => {
|
|
168
169
|
if (inputBox.hasFocus()) {
|
|
169
|
-
|
|
170
|
+
const activeDescendant = list.getActiveDescendant();
|
|
171
|
+
if (activeDescendant) {
|
|
172
|
+
inputBox.setAttribute('aria-activedescendant', activeDescendant);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
inputBox.removeAttribute('aria-activedescendant');
|
|
176
|
+
}
|
|
170
177
|
}
|
|
171
178
|
}));
|
|
172
179
|
this._register(list.onChangedAllVisibleChecked(checked => {
|
|
@@ -199,7 +206,13 @@ let QuickInputController = class QuickInputController extends Disposable {
|
|
|
199
206
|
const tree = this._register(this.instantiationService.createInstance(QuickInputTreeController, container, this.options.hoverDelegate));
|
|
200
207
|
this._register(tree.tree.onDidChangeFocus(() => {
|
|
201
208
|
if (inputBox.hasFocus()) {
|
|
202
|
-
|
|
209
|
+
const activeDescendant = tree.getActiveDescendant();
|
|
210
|
+
if (activeDescendant) {
|
|
211
|
+
inputBox.setAttribute('aria-activedescendant', activeDescendant);
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
inputBox.removeAttribute('aria-activedescendant');
|
|
215
|
+
}
|
|
203
216
|
}
|
|
204
217
|
}));
|
|
205
218
|
this._register(tree.onLeave(() => {
|
|
@@ -243,16 +256,21 @@ let QuickInputController = class QuickInputController extends Disposable {
|
|
|
243
256
|
this.endOfQuickInputBoxContext.set(false);
|
|
244
257
|
this.previousFocusElement = undefined;
|
|
245
258
|
}));
|
|
246
|
-
this._register(inputBox.onKeyDown(
|
|
259
|
+
this._register(inputBox.onKeyDown(e => {
|
|
247
260
|
const value = this.getUI().inputBox.isSelectionAtEnd();
|
|
248
261
|
if (this.endOfQuickInputBoxContext.get() !== value) {
|
|
249
262
|
this.endOfQuickInputBoxContext.set(value);
|
|
250
263
|
}
|
|
251
|
-
// Allow
|
|
264
|
+
// Allow screen readers to read what's in the input
|
|
252
265
|
// Note: this works for arrow keys and selection changes,
|
|
253
266
|
// but not for deletions since that often triggers a
|
|
254
267
|
// change in the list.
|
|
255
|
-
|
|
268
|
+
// Don't remove aria-activedescendant when only modifier keys are pressed
|
|
269
|
+
// to prevent screen reader re-announcements when users press Ctrl to silence speech.
|
|
270
|
+
// See: https://github.com/microsoft/vscode/issues/271032
|
|
271
|
+
if (!isModifierKey(e.keyCode)) {
|
|
272
|
+
inputBox.removeAttribute('aria-activedescendant');
|
|
273
|
+
}
|
|
256
274
|
}));
|
|
257
275
|
this._register(dom.addDisposableListener(container, dom.EventType.FOCUS, (e) => {
|
|
258
276
|
inputBox.setFocus();
|
|
@@ -261,7 +279,8 @@ let QuickInputController = class QuickInputController extends Disposable {
|
|
|
261
279
|
this.dndController = this._register(this.instantiationService.createInstance(QuickInputDragAndDropController, this._container, container, [
|
|
262
280
|
{
|
|
263
281
|
node: titleBar,
|
|
264
|
-
includeChildren: true
|
|
282
|
+
includeChildren: true,
|
|
283
|
+
excludeNodes: [leftActionBar.domNode, rightActionBar.domNode]
|
|
265
284
|
},
|
|
266
285
|
{
|
|
267
286
|
node: headerContainer,
|
|
@@ -569,7 +588,7 @@ let QuickInputController = class QuickInputController extends Disposable {
|
|
|
569
588
|
ui.ignoreFocusOut = false;
|
|
570
589
|
ui.inputBox.toggles = undefined;
|
|
571
590
|
const backKeybindingLabel = this.options.backKeybindingLabel();
|
|
572
|
-
backButton.tooltip = backKeybindingLabel ? localize(
|
|
591
|
+
backButton.tooltip = backKeybindingLabel ? localize(1775, "Back ({0})", backKeybindingLabel) : localize(1776, "Back");
|
|
573
592
|
ui.container.style.display = '';
|
|
574
593
|
this.updateLayout();
|
|
575
594
|
this.dndController?.layoutContainer();
|
|
@@ -802,7 +821,8 @@ let QuickInputDragAndDropController = class QuickInputDragAndDropController exte
|
|
|
802
821
|
return;
|
|
803
822
|
}
|
|
804
823
|
// Ignore event if the target is not the drag area
|
|
805
|
-
|
|
824
|
+
const area = this._quickInputDragAreas.find(({ node, includeChildren }) => includeChildren ? dom.isAncestor(originEvent.target, node) : originEvent.target === node);
|
|
825
|
+
if (!area || area.excludeNodes?.some(node => dom.isAncestor(originEvent.target, node))) {
|
|
806
826
|
return;
|
|
807
827
|
}
|
|
808
828
|
this.dndViewState.set({ top: undefined, left: undefined, done: true }, undefined);
|
|
@@ -812,7 +832,8 @@ let QuickInputDragAndDropController = class QuickInputDragAndDropController exte
|
|
|
812
832
|
const activeWindow = dom.getWindow(this._layoutService.activeContainer);
|
|
813
833
|
const originEvent = new StandardMouseEvent(activeWindow, e);
|
|
814
834
|
// Ignore event if the target is not the drag area
|
|
815
|
-
|
|
835
|
+
const area = this._quickInputDragAreas.find(({ node, includeChildren }) => includeChildren ? dom.isAncestor(originEvent.target, node) : originEvent.target === node);
|
|
836
|
+
if (!area || area.excludeNodes?.some(node => dom.isAncestor(originEvent.target, node))) {
|
|
816
837
|
return;
|
|
817
838
|
}
|
|
818
839
|
// Mouse position offset relative to dragArea
|