@codingame/monaco-vscode-api 20.4.1 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/missing-services.js +136 -50
- package/package.json +8 -8
- package/services.d.ts +8 -4
- package/services.js +8 -4
- package/vscode/product.json.js +1 -1
- package/vscode/src/vs/base/browser/dom.js +3 -3
- package/vscode/src/vs/base/browser/domSanitize.d.ts +23 -11
- package/vscode/src/vs/base/browser/domSanitize.js +86 -7
- package/vscode/src/vs/base/browser/domStylesheets.js +2 -2
- package/vscode/src/vs/base/browser/event.d.ts +1 -1
- package/vscode/src/vs/base/browser/markdownRenderer.d.ts +8 -4
- package/vscode/src/vs/base/browser/markdownRenderer.js +72 -126
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.d.ts +10 -10
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +5 -2
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.css +2 -2
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +4 -4
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +32 -7
- package/vscode/src/vs/base/browser/ui/button/button.d.ts +2 -2
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +4 -2
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -1
- package/vscode/src/vs/base/browser/ui/findinput/findInput.d.ts +7 -7
- package/vscode/src/vs/base/browser/ui/findinput/findInput.js +7 -7
- package/vscode/src/vs/base/browser/ui/findinput/replaceInput.d.ts +6 -6
- package/vscode/src/vs/base/browser/ui/findinput/replaceInput.js +6 -6
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css +5 -0
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +2 -1
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +4 -4
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.d.ts +2 -2
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +2 -2
- package/vscode/src/vs/base/browser/ui/list/listWidget.d.ts +3 -3
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +3 -3
- package/vscode/src/vs/base/browser/ui/menu/menu.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/menu/menu.js +21 -16
- package/vscode/src/vs/base/browser/ui/resizable/resizable.d.ts +2 -2
- package/vscode/src/vs/base/browser/ui/resizable/resizable.js +2 -2
- package/vscode/src/vs/base/browser/ui/sash/sash.d.ts +4 -4
- package/vscode/src/vs/base/browser/ui/sash/sash.js +16 -22
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.d.ts +2 -2
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +2 -2
- package/vscode/src/vs/base/browser/ui/selectBox/selectBox.css +2 -1
- package/vscode/src/vs/base/browser/ui/selectBox/selectBox.d.ts +4 -4
- package/vscode/src/vs/base/browser/ui/selectBox/selectBox.js +3 -3
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.d.ts +2 -2
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +12 -12
- package/vscode/src/vs/base/browser/ui/toggle/toggle.d.ts +2 -2
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +2 -2
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +1 -1
- package/vscode/src/vs/base/common/actions.d.ts +3 -3
- package/vscode/src/vs/base/common/actions.js +3 -3
- package/vscode/src/vs/base/common/async.d.ts +18 -7
- package/vscode/src/vs/base/common/async.js +71 -14
- package/vscode/src/vs/base/common/codicons.d.ts +3 -0
- package/vscode/src/vs/base/common/codiconsLibrary.d.ts +3 -0
- package/vscode/src/vs/base/common/codiconsLibrary.js +3 -0
- package/vscode/src/vs/base/common/defaultAccount.d.ts +23 -0
- package/vscode/src/vs/base/common/event.d.ts +0 -5
- package/vscode/src/vs/base/common/event.js +0 -12
- package/vscode/src/vs/base/common/hotReloadHelpers.js +2 -33
- package/vscode/src/vs/base/common/htmlContent.d.ts +1 -1
- package/vscode/src/vs/base/common/htmlContent.js +2 -2
- package/vscode/src/vs/base/common/lazy.d.ts +1 -1
- package/vscode/src/vs/base/common/lazy.js +14 -4
- package/vscode/src/vs/base/common/lifecycle.d.ts +7 -11
- package/vscode/src/vs/base/common/lifecycle.js +19 -2
- package/vscode/src/vs/base/common/marshallingIds.d.ts +5 -4
- package/vscode/src/vs/base/common/marshallingIds.js +5 -4
- package/vscode/src/vs/base/common/mime.d.ts +4 -0
- package/vscode/src/vs/base/common/mime.js +4 -1
- package/vscode/src/vs/base/common/network.d.ts +5 -0
- package/vscode/src/vs/base/common/network.js +2 -0
- package/vscode/src/vs/base/common/oauth.d.ts +18 -2
- package/vscode/src/vs/base/common/oauth.js +113 -18
- package/vscode/src/vs/base/common/observableInternal/debugLocation.d.ts +20 -0
- package/vscode/src/vs/base/common/observableInternal/debugLocation.js +63 -0
- package/vscode/src/vs/base/common/observableInternal/experimental/reducer.js +2 -1
- package/vscode/src/vs/base/common/observableInternal/index.d.ts +2 -1
- package/vscode/src/vs/base/common/observableInternal/index.js +2 -1
- package/vscode/src/vs/base/common/observableInternal/logging/debugger/devToolsLogger.d.ts +3 -2
- package/vscode/src/vs/base/common/observableInternal/logging/debugger/devToolsLogger.js +15 -33
- package/vscode/src/vs/base/common/observableInternal/logging/debugger/utils.d.ts +0 -7
- package/vscode/src/vs/base/common/observableInternal/logging/debugger/utils.js +1 -42
- package/vscode/src/vs/base/common/observableInternal/logging/logging.d.ts +3 -2
- package/vscode/src/vs/base/common/observableInternal/logging/logging.js +4 -4
- package/vscode/src/vs/base/common/observableInternal/observables/baseObservable.d.ts +2 -1
- package/vscode/src/vs/base/common/observableInternal/observables/baseObservable.js +6 -5
- package/vscode/src/vs/base/common/observableInternal/observables/derived.d.ts +4 -3
- package/vscode/src/vs/base/common/observableInternal/observables/derived.js +12 -11
- package/vscode/src/vs/base/common/observableInternal/observables/derivedImpl.d.ts +3 -2
- package/vscode/src/vs/base/common/observableInternal/observables/derivedImpl.js +4 -4
- package/vscode/src/vs/base/common/observableInternal/observables/lazyObservableValue.d.ts +2 -1
- package/vscode/src/vs/base/common/observableInternal/observables/lazyObservableValue.js +2 -2
- package/vscode/src/vs/base/common/observableInternal/observables/observableFromEvent.d.ts +4 -3
- package/vscode/src/vs/base/common/observableInternal/observables/observableFromEvent.js +10 -8
- package/vscode/src/vs/base/common/observableInternal/observables/observableSignal.js +6 -5
- package/vscode/src/vs/base/common/observableInternal/observables/observableSignalFromEvent.d.ts +2 -1
- package/vscode/src/vs/base/common/observableInternal/observables/observableSignalFromEvent.js +5 -4
- package/vscode/src/vs/base/common/observableInternal/observables/observableValue.d.ts +3 -2
- package/vscode/src/vs/base/common/observableInternal/observables/observableValue.js +7 -6
- package/vscode/src/vs/base/common/observableInternal/observables/observableValueOpts.d.ts +2 -1
- package/vscode/src/vs/base/common/observableInternal/observables/observableValueOpts.js +4 -3
- package/vscode/src/vs/base/common/observableInternal/reactions/autorun.d.ts +11 -3
- package/vscode/src/vs/base/common/observableInternal/reactions/autorun.js +27 -7
- package/vscode/src/vs/base/common/observableInternal/reactions/autorunImpl.d.ts +2 -1
- package/vscode/src/vs/base/common/observableInternal/reactions/autorunImpl.js +2 -2
- package/vscode/src/vs/base/common/observableInternal/utils/utilsCancellation.js +1 -0
- package/vscode/src/vs/base/common/policy.d.ts +29 -0
- package/vscode/src/vs/base/common/product.d.ts +15 -1
- package/vscode/src/vs/base/common/strings.d.ts +0 -6
- package/vscode/src/vs/base/common/strings.js +1 -8
- package/vscode/src/vs/base/common/types.js +1 -4
- package/vscode/src/vs/base/common/uuid.d.ts +2 -0
- package/vscode/src/vs/base/common/uuid.js +4 -1
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.d.ts +1 -0
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.js +9 -2
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.d.ts +2 -1
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +10 -3
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +1 -0
- package/vscode/src/vs/editor/browser/controller/mouseHandler.js +2 -3
- package/vscode/src/vs/editor/browser/editorDom.d.ts +1 -0
- package/vscode/src/vs/editor/browser/editorDom.js +7 -4
- package/vscode/src/vs/editor/browser/observableCodeEditor.d.ts +2 -2
- package/vscode/src/vs/editor/browser/observableCodeEditor.js +3 -2
- package/vscode/src/vs/editor/browser/services/hoverService/hoverWidget.js +1 -4
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.d.ts +3 -0
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.js +14 -1
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.service.d.ts +4 -0
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.css +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +12 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +8 -8
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +3 -1
- package/vscode/src/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.d.ts +2 -2
- package/vscode/src/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +31 -44
- package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +10 -10
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +6 -4
- package/vscode/src/vs/editor/common/config/editorOptions.js +302 -275
- package/vscode/src/vs/editor/common/core/2d/rect.js +5 -2
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/vscode/src/vs/editor/common/core/edits/lineEdit.d.ts +2 -2
- package/vscode/src/vs/editor/common/core/edits/lineEdit.js +1 -1
- package/vscode/src/vs/editor/common/core/edits/stringEdit.d.ts +1 -1
- package/vscode/src/vs/editor/common/core/edits/stringEdit.js +9 -3
- package/vscode/src/vs/editor/common/core/edits/textEdit.d.ts +2 -2
- package/vscode/src/vs/editor/common/core/text/textLength.d.ts +3 -0
- package/vscode/src/vs/editor/common/core/text/textLength.js +6 -0
- package/vscode/src/vs/editor/common/editorContextKeys.js +46 -46
- package/vscode/src/vs/editor/common/languageFeatureRegistry.d.ts +1 -1
- package/vscode/src/vs/editor/common/languageFeatureRegistry.js +1 -1
- package/vscode/src/vs/editor/common/languages/modesRegistry.js +1 -1
- package/vscode/src/vs/editor/common/languages.d.ts +19 -1
- package/vscode/src/vs/editor/common/languages.js +77 -57
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper.d.ts +1 -1
- package/vscode/src/vs/editor/common/model/editStack.js +1 -1
- package/vscode/src/vs/editor/common/model/mirrorTextModel.d.ts +19 -1
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.d.ts +1 -1
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js +1 -1
- package/vscode/src/vs/editor/common/model/textModel.d.ts +4 -4
- package/vscode/src/vs/editor/common/model/textModel.js +4 -4
- package/vscode/src/vs/editor/common/model/textModelStringEdit.d.ts +1 -1
- package/vscode/src/vs/editor/common/model/textModelTokens.d.ts +1 -1
- package/vscode/src/vs/editor/common/model.d.ts +2 -1
- package/vscode/src/vs/editor/common/services/editorWebWorker.d.ts +7 -1
- package/vscode/src/vs/editor/common/services/editorWebWorker.js +13 -10
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.d.ts +4 -0
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +6 -1
- package/vscode/src/vs/editor/common/standaloneStrings.js +47 -47
- package/vscode/src/vs/editor/common/textModelEditSource.d.ts +48 -2
- package/vscode/src/vs/editor/common/textModelEditSource.js +54 -1
- package/vscode/src/vs/editor/common/textModelEvents.d.ts +1 -18
- package/vscode/src/vs/editor/common/tokens/sparseMultilineTokens.js +6 -1
- package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/vscode/src/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/vscode/src/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/vscode/src/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +28 -17
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/codelens/browser/codelens.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +3 -2
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.d.ts +5 -5
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +3 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/vscode/src/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
- package/vscode/src/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/vscode/src/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +16 -16
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/vscode/src/vs/editor/contrib/folding/browser/folding.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +21 -21
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/vscode/src/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverComputer.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverComputer.js +4 -4
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +3 -3
- package/vscode/src/vs/editor/contrib/hover/browser/getHover.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/vscode/src/vs/editor/contrib/hover/browser/hoverOperation.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverOperation.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +12 -12
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +9 -5
- package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -1
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +11 -11
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +19 -19
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +56 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.d.ts +7 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +76 -18
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +7 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.d.ts +6 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +9 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.d.ts +18 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +31 -9
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.js +4 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/typingSpeed.d.ts +0 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/typingSpeed.js +6 -10
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/structuredLogger.d.ts +5 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +11 -15
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +8 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +3 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +36 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +17 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +3 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +10 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +7 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +15 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +49 -13
- package/vscode/src/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +8 -3
- package/vscode/src/vs/editor/contrib/links/browser/links.js +10 -10
- package/vscode/src/vs/editor/contrib/message/browser/messageController.d.ts +0 -1
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +11 -14
- package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +10 -10
- package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.d.ts +2 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +26 -15
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +4 -0
- package/vscode/src/vs/platform/accessibility/browser/accessibleView.d.ts +1 -1
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/vscode/src/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/vscode/src/vs/platform/actions/browser/floatingMenu.d.ts +1 -1
- package/vscode/src/vs/platform/actions/browser/floatingMenu.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.d.ts +11 -11
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +1 -6
- package/vscode/src/vs/platform/actions/browser/toolbar.js +3 -6
- package/vscode/src/vs/platform/actions/common/actions.d.ts +2 -1
- package/vscode/src/vs/platform/actions/common/actions.js +2 -1
- package/vscode/src/vs/platform/actions/common/menuResetAction.js +1 -1
- package/vscode/src/vs/platform/actions/common/menuService.js +2 -2
- package/vscode/src/vs/platform/assignment/common/assignment.d.ts +70 -0
- package/vscode/src/vs/platform/configuration/common/configurationModels.js +11 -8
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.d.ts +1 -1
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/vscode/src/vs/platform/configuration/common/configurations.js +2 -3
- package/vscode/src/vs/platform/contextkey/browser/contextKeyService.d.ts +1 -1
- package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +2 -2
- package/vscode/src/vs/platform/contextkey/common/contextkey.js +11 -11
- package/vscode/src/vs/platform/contextkey/common/contextkeys.d.ts +1 -0
- package/vscode/src/vs/platform/contextkey/common/contextkeys.js +11 -10
- package/vscode/src/vs/platform/contextkey/common/scanner.js +5 -5
- package/vscode/src/vs/platform/dataChannel/common/dataChannel.d.ts +14 -0
- package/vscode/src/vs/platform/dataChannel/common/dataChannel.js +15 -0
- package/vscode/src/vs/{workbench/services → platform}/dataChannel/common/dataChannel.service.d.ts +2 -2
- package/vscode/src/vs/{workbench/services → platform}/dataChannel/common/dataChannel.service.js +1 -1
- package/vscode/src/vs/platform/debug/common/extensionHostDebug.d.ts +1 -1
- package/vscode/src/vs/platform/debug/common/extensionHostDebug.service.d.ts +1 -0
- package/vscode/src/vs/platform/diagnostics/common/diagnostics.d.ts +1 -1
- package/vscode/src/vs/platform/dialogs/common/dialogs.service.d.ts +1 -1
- package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
- package/vscode/src/vs/platform/environment/common/argv.d.ts +0 -1
- package/vscode/src/vs/platform/environment/common/environment.service.d.ts +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +2 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +21 -19
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +7 -7
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +20 -20
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +11 -0
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +12 -1
- package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +2 -2
- package/vscode/src/vs/platform/files/common/files.js +6 -6
- package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/vscode/src/vs/platform/instantiation/common/instantiation.d.ts +1 -0
- package/vscode/src/vs/platform/instantiation/common/instantiationService.js +7 -0
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/vscode/src/vs/platform/list/browser/listService.js +27 -27
- package/vscode/src/vs/platform/log/common/log.d.ts +1 -1
- package/vscode/src/vs/platform/log/common/log.js +7 -7
- package/vscode/src/vs/platform/markers/common/markerService.js +2 -2
- package/vscode/src/vs/platform/markers/common/markers.js +6 -6
- package/vscode/src/vs/platform/mcp/common/mcpGalleryManifest.d.ts +18 -0
- package/vscode/src/vs/platform/mcp/common/mcpGalleryManifest.js +28 -0
- package/vscode/src/vs/platform/mcp/common/mcpGalleryManifest.service.d.ts +10 -0
- package/vscode/src/vs/platform/mcp/common/mcpGalleryManifest.service.js +6 -0
- package/vscode/src/vs/platform/mcp/common/mcpManagement.service.d.ts +8 -4
- package/vscode/src/vs/platform/notification/common/notification.js +3 -3
- package/vscode/src/vs/platform/observable/common/platformObservableUtils.d.ts +4 -4
- package/vscode/src/vs/platform/observable/common/platformObservableUtils.js +15 -20
- package/vscode/src/vs/platform/observable/common/wrapInHotClass.js +2 -28
- package/vscode/src/vs/platform/observable/common/wrapInReloadableClass.js +3 -42
- package/vscode/src/vs/platform/policy/common/policy.d.ts +3 -3
- package/vscode/src/vs/platform/policy/common/policy.service.d.ts +1 -1
- package/vscode/src/vs/platform/product/common/product.js +3 -3
- package/vscode/src/vs/platform/progress/common/progress.d.ts +0 -12
- package/vscode/src/vs/platform/quickinput/browser/media/quickInput.css +13 -12
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +3 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +10 -7
- package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +1 -2
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +2 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputDelegate.d.ts +1 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputDelegate.js +2 -2
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTree.d.ts +0 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +2 -2
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeController.d.ts +0 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeController.js +5 -17
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeFilter.d.ts +0 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeFilter.js +3 -6
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.d.ts +1 -2
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +5 -30
- package/vscode/src/vs/platform/quickinput/browser/tree/quickTree.d.ts +0 -3
- package/vscode/src/vs/platform/quickinput/browser/tree/quickTree.js +2 -6
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +53 -26
- package/vscode/src/vs/platform/request/common/request.d.ts +2 -0
- package/vscode/src/vs/platform/request/common/request.js +25 -19
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +2 -1
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +5 -0
- package/vscode/src/vs/platform/theme/common/colorUtils.js +2 -2
- package/vscode/src/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/vscode/src/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/vscode/src/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/vscode/src/vs/platform/theme/common/colors/listColors.js +36 -36
- package/vscode/src/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/vscode/src/vs/platform/theme/common/colors/miscColors.js +15 -15
- package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/vscode/src/vs/platform/theme/common/iconRegistry.js +6 -6
- package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
- package/vscode/src/vs/platform/window/common/window.d.ts +6 -2
- package/vscode/src/vs/platform/window/common/window.js +3 -2
- package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +37 -9
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +53 -26
- package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +7 -1
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.d.ts +6 -4
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +67 -13
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +2 -3
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +23 -30
- package/vscode/src/vs/workbench/api/common/extHostChatSessions.d.ts +12 -4
- package/vscode/src/vs/workbench/api/common/extHostChatSessions.js +73 -12
- package/vscode/src/vs/workbench/api/common/extHostCommands.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostComments.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostCustomEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +3 -1
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +3 -2
- package/vscode/src/vs/workbench/api/common/extHostDocumentData.d.ts +7 -4
- package/vscode/src/vs/workbench/api/common/extHostDocumentData.js +27 -6
- package/vscode/src/vs/workbench/api/common/extHostDocumentSaveParticipant.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.d.ts +8 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +39 -14
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.d.ts +5 -5
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +52 -84
- package/vscode/src/vs/workbench/api/common/extHostLanguages.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostMcp.js +36 -33
- package/vscode/src/vs/workbench/api/common/extHostNotebook.d.ts +5 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +69 -53
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocument.js +4 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebookEditor.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +14 -12
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +6 -4
- package/vscode/src/vs/workbench/api/common/extHostTextEditor.js +5 -1
- package/vscode/src/vs/workbench/api/common/extHostTimeline.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +3 -2
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.d.ts +16 -8
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +93 -20
- package/vscode/src/vs/workbench/api/common/extHostTypes/codeActionKind.d.ts +19 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/codeActionKind.js +37 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/diagnostic.d.ts +31 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/diagnostic.js +91 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/es5ClassCompat.d.ts +7 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/es5ClassCompat.js +27 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/location.d.ts +11 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/location.js +44 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/markdownString.d.ts +20 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/markdownString.js +65 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/notebooks.d.ts +84 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/notebooks.js +229 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/position.d.ts +29 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/position.js +169 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/range.d.ts +26 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/range.js +137 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/selection.d.ts +20 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/selection.js +76 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/snippetString.d.ts +12 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/snippetString.js +84 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/snippetTextEdit.d.ts +13 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/snippetTextEdit.js +28 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/symbolInformation.d.ts +45 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/symbolInformation.js +75 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/textEdit.d.ts +24 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/textEdit.js +82 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/workspaceEdit.d.ts +99 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes/workspaceEdit.js +146 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +86 -420
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +65 -1186
- package/vscode/src/vs/workbench/api/common/extHostWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +3 -2
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +12 -12
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +31 -31
- package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
- package/vscode/src/vs/workbench/browser/contextkeys.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/contextkeys.js +13 -9
- package/vscode/src/vs/workbench/browser/parts/editor/editor.js +7 -0
- package/vscode/src/vs/workbench/common/configuration.js +9 -9
- package/vscode/src/vs/workbench/common/contextkeys.d.ts +1 -0
- package/vscode/src/vs/workbench/common/contextkeys.js +74 -73
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +1 -1
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +1 -1
- package/vscode/src/vs/workbench/common/editor/textEditorModel.js +1 -1
- package/vscode/src/vs/workbench/common/editor.d.ts +2 -0
- package/vscode/src/vs/workbench/common/editor.js +4 -4
- package/vscode/src/vs/workbench/common/theme.js +160 -160
- package/vscode/src/vs/workbench/common/views.js +4 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +157 -157
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.service.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.d.ts +13 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +64 -56
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementService.service.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatLayoutService.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatLayoutService.service.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatLayoutService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModes.service.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModes.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.d.ts +71 -15
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.service.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.d.ts +49 -22
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.js +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.service.d.ts +24 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.service.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.js +13 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariables.service.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +14 -1
- package/vscode/src/vs/workbench/contrib/chat/common/constants.js +18 -1
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.d.ts +25 -7
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +15 -8
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.d.ts +36 -18
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +46 -36
- package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/confirmationTool.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/confirmationTool.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/editFileTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/tools/manageTodoListTool.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/manageTodoListTool.js +205 -107
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +14 -8
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +1 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +65 -65
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +4 -7
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.d.ts +10 -7
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +12 -6
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.service.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +1 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.service.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/terminal/common/environmentVariable.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/constants.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +13 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.d.ts +2 -21
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.js +34 -6
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/activity/common/activity.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationUsageService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +48 -1
- package/vscode/src/vs/workbench/services/authentication/common/authentication.js +7 -1
- package/vscode/src/vs/workbench/services/authentication/common/authentication.service.d.ts +7 -6
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/environment/common/environmentService.service.d.ts +0 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +94 -86
- package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.service.d.ts +8 -0
- package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.service.js +6 -0
- package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +4 -0
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.service.d.ts +1 -1
- package/vscode-dts/vscode.d.ts +218 -2
- package/vscode-dts/vscode.proposed.authenticationChallenges.d.ts +161 -0
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +47 -1
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +3 -1
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +28 -108
- package/vscode-dts/vscode.proposed.chatSessionsProvider.d.ts +101 -12
- package/vscode-dts/vscode.proposed.contribSecondarySidebar.d.ts +6 -0
- package/vscode-dts/vscode.proposed.d.ts +3 -0
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +0 -5
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +31 -0
- package/vscode-dts/vscode.proposed.languageModelDataPart.d.ts +2 -2
- package/vscode-dts/vscode.proposed.languageModelThinkingPart.d.ts +49 -0
- package/vscode-dts/vscode.proposed.languageModelToolResultAudience.d.ts +16 -5
- package/vscode-dts/vscode.proposed.terminalCompletionProvider.d.ts +7 -0
- package/workers/editor.worker.d.ts +2 -5
- package/workers/editor.worker.js +16 -18
- package/vscode/src/vs/base/browser/dompurify/dompurify.d.ts +0 -114
- package/vscode/src/vs/base/common/hotReload.js +0 -80
- package/vscode/src/vs/workbench/services/coreExperimentation/common/coreExperimentationService.service.d.ts +0 -6
- package/vscode/src/vs/workbench/services/coreExperimentation/common/coreExperimentationService.service.js +0 -6
- package/vscode/src/vs/workbench/services/dataChannel/common/dataChannel.d.ts +0 -7
|
@@ -144,20 +144,56 @@ function sanitizeHtml(untrusted, config) {
|
|
|
144
144
|
resolvedConfig.ALLOWED_TAGS = [...(resolvedConfig.ALLOWED_TAGS ?? []), ...config.allowedTags.augment];
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
+
let resolvedAttributes = [...defaultAllowedAttrs];
|
|
147
148
|
if (config?.allowedAttributes) {
|
|
148
149
|
if (config.allowedAttributes.override) {
|
|
149
|
-
|
|
150
|
+
resolvedAttributes = [...config.allowedAttributes.override];
|
|
150
151
|
}
|
|
151
152
|
if (config.allowedAttributes.augment) {
|
|
152
|
-
|
|
153
|
+
resolvedAttributes = [...resolvedAttributes, ...config.allowedAttributes.augment];
|
|
153
154
|
}
|
|
154
155
|
}
|
|
156
|
+
resolvedAttributes = ( resolvedAttributes.map((attr) => {
|
|
157
|
+
if (typeof attr === 'string') {
|
|
158
|
+
return attr.toLowerCase();
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
attributeName: attr.attributeName.toLowerCase(),
|
|
162
|
+
shouldKeep: attr.shouldKeep,
|
|
163
|
+
};
|
|
164
|
+
}));
|
|
165
|
+
const allowedAttrNames = ( new Set(( resolvedAttributes.map(attr => typeof attr === 'string' ? attr : attr.attributeName))));
|
|
166
|
+
const allowedAttrPredicates = ( new Map());
|
|
167
|
+
for (const attr of resolvedAttributes) {
|
|
168
|
+
if (typeof attr === 'string') {
|
|
169
|
+
allowedAttrPredicates.delete(attr);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
allowedAttrPredicates.set(attr.attributeName, attr);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
resolvedConfig.ALLOWED_ATTR = Array.from(allowedAttrNames);
|
|
155
176
|
store.add(hookDomPurifyHrefAndSrcSanitizer(config?.allowedLinkProtocols?.override ?? [Schemas.http, Schemas.https], config?.allowedMediaProtocols?.override ?? [Schemas.http, Schemas.https]));
|
|
156
|
-
if (config?.
|
|
157
|
-
store.add(addDompurifyHook('uponSanitizeElement',
|
|
177
|
+
if (config?.replaceWithPlaintext) {
|
|
178
|
+
store.add(addDompurifyHook('uponSanitizeElement', replaceWithPlainTextHook));
|
|
158
179
|
}
|
|
159
|
-
if (
|
|
160
|
-
store.add(addDompurifyHook('uponSanitizeAttribute',
|
|
180
|
+
if (allowedAttrPredicates.size) {
|
|
181
|
+
store.add(addDompurifyHook('uponSanitizeAttribute', (node, e) => {
|
|
182
|
+
const predicate = allowedAttrPredicates.get(e.attrName);
|
|
183
|
+
if (predicate) {
|
|
184
|
+
const result = predicate.shouldKeep(node, e);
|
|
185
|
+
if (typeof result === 'string') {
|
|
186
|
+
e.keepAttr = true;
|
|
187
|
+
e.attrValue = result;
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
e.keepAttr = result;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
e.keepAttr = ( allowedAttrNames.has(e.attrName));
|
|
195
|
+
}
|
|
196
|
+
}));
|
|
161
197
|
}
|
|
162
198
|
return dompurify.sanitize(untrusted, {
|
|
163
199
|
...resolvedConfig,
|
|
@@ -168,8 +204,51 @@ function sanitizeHtml(untrusted, config) {
|
|
|
168
204
|
store.dispose();
|
|
169
205
|
}
|
|
170
206
|
}
|
|
207
|
+
const selfClosingTags = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
|
|
208
|
+
function replaceWithPlainTextHook(element, data, _config) {
|
|
209
|
+
if (!data.allowedTags[data.tagName] && data.tagName !== 'body') {
|
|
210
|
+
const replacement = convertTagToPlaintext(element);
|
|
211
|
+
if (element.nodeType === Node.COMMENT_NODE) {
|
|
212
|
+
element.parentElement?.insertBefore(replacement, element);
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
element.parentElement?.replaceChild(replacement, element);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function convertTagToPlaintext(element) {
|
|
220
|
+
let startTagText;
|
|
221
|
+
let endTagText;
|
|
222
|
+
if (element.nodeType === Node.COMMENT_NODE) {
|
|
223
|
+
startTagText = `<!--${element.textContent}-->`;
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
const tagName = element.tagName.toLowerCase();
|
|
227
|
+
const isSelfClosing = selfClosingTags.includes(tagName);
|
|
228
|
+
const attrString = element.attributes.length ?
|
|
229
|
+
' ' + ( Array.from(element.attributes)
|
|
230
|
+
.map(attr => `${attr.name}="${attr.value}"`))
|
|
231
|
+
.join(' ')
|
|
232
|
+
: '';
|
|
233
|
+
startTagText = `<${tagName}${attrString}>`;
|
|
234
|
+
if (!isSelfClosing) {
|
|
235
|
+
endTagText = `</${tagName}>`;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const fragment = document.createDocumentFragment();
|
|
239
|
+
const textNode = element.ownerDocument.createTextNode(startTagText);
|
|
240
|
+
fragment.appendChild(textNode);
|
|
241
|
+
while (element.firstChild) {
|
|
242
|
+
fragment.appendChild(element.firstChild);
|
|
243
|
+
}
|
|
244
|
+
const endTagTextNode = endTagText ? element.ownerDocument.createTextNode(endTagText) : undefined;
|
|
245
|
+
if (endTagTextNode) {
|
|
246
|
+
fragment.appendChild(endTagTextNode);
|
|
247
|
+
}
|
|
248
|
+
return fragment;
|
|
249
|
+
}
|
|
171
250
|
function safeSetInnerHtml(node, untrusted, config) {
|
|
172
251
|
node.innerHTML = sanitizeHtml(untrusted, config);
|
|
173
252
|
}
|
|
174
253
|
|
|
175
|
-
export { basicMarkupHtmlTags, defaultAllowedAttrs, safeSetInnerHtml, sanitizeHtml };
|
|
254
|
+
export { basicMarkupHtmlTags, convertTagToPlaintext, defaultAllowedAttrs, safeSetInnerHtml, sanitizeHtml };
|
|
@@ -24,10 +24,10 @@ class WrappedStyleElement {
|
|
|
24
24
|
}
|
|
25
25
|
this._currentCssStyle = cssStyle;
|
|
26
26
|
if (!this._styleSheet) {
|
|
27
|
-
this._styleSheet = createStyleSheet(mainWindow.document.head, (s) => s.
|
|
27
|
+
this._styleSheet = createStyleSheet(mainWindow.document.head, (s) => s.textContent = cssStyle);
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
this._styleSheet.
|
|
30
|
+
this._styleSheet.textContent = cssStyle;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
dispose() {
|
|
@@ -17,7 +17,7 @@ export interface DOMEventMap extends HTMLElementEventMap, DocumentEventMap, Wind
|
|
|
17
17
|
"compositionend": CompositionEvent;
|
|
18
18
|
}
|
|
19
19
|
export declare class DomEmitter<K extends keyof DOMEventMap> implements IDisposable {
|
|
20
|
-
private emitter;
|
|
20
|
+
private readonly emitter;
|
|
21
21
|
get event(): BaseEvent<DOMEventMap[K]>;
|
|
22
22
|
constructor(element: Window & typeof globalThis, type: WindowEventMap, useCapture?: boolean);
|
|
23
23
|
constructor(element: Document, type: DocumentEventMap, useCapture?: boolean);
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { IMarkdownString } from "../common/htmlContent.js";
|
|
2
2
|
import * as marked from "../common/marked/marked.js";
|
|
3
3
|
import { URI } from "../common/uri.js";
|
|
4
|
-
import
|
|
4
|
+
import * as domSanitize from "./domSanitize.js";
|
|
5
|
+
export type MarkdownActionHandler = (linkContent: string, mdStr: IMarkdownString) => void;
|
|
5
6
|
/**
|
|
6
7
|
* Options for the rendering of markdown with {@link renderMarkdown}.
|
|
7
8
|
*/
|
|
8
|
-
export interface MarkdownRenderOptions
|
|
9
|
+
export interface MarkdownRenderOptions {
|
|
9
10
|
readonly codeBlockRenderer?: (languageId: string, value: string) => Promise<HTMLElement>;
|
|
10
11
|
readonly codeBlockRendererSync?: (languageId: string, value: string, raw?: string) => HTMLElement;
|
|
11
12
|
readonly asyncRenderCallback?: () => void;
|
|
13
|
+
readonly actionHandler?: MarkdownActionHandler;
|
|
12
14
|
readonly fillInIncompleteTokens?: boolean;
|
|
13
15
|
readonly sanitizerConfig?: MarkdownSanitizerConfig;
|
|
14
16
|
readonly markedOptions?: MarkdownRendererMarkedOptions;
|
|
@@ -26,7 +28,9 @@ export interface MarkdownSanitizerConfig {
|
|
|
26
28
|
readonly allowedTags?: {
|
|
27
29
|
readonly override: readonly string[];
|
|
28
30
|
};
|
|
29
|
-
readonly
|
|
31
|
+
readonly allowedAttributes?: {
|
|
32
|
+
readonly override: ReadonlyArray<string | domSanitize.SanitizeAttributeRule>;
|
|
33
|
+
};
|
|
30
34
|
readonly allowedLinkSchemes?: {
|
|
31
35
|
readonly augment: readonly string[];
|
|
32
36
|
};
|
|
@@ -43,7 +47,7 @@ export declare function renderMarkdown(markdown: IMarkdownString, options?: Mark
|
|
|
43
47
|
dispose: () => void;
|
|
44
48
|
};
|
|
45
49
|
export declare const allowedMarkdownHtmlTags: readonly string[];
|
|
46
|
-
export declare const allowedMarkdownHtmlAttributes: string[];
|
|
50
|
+
export declare const allowedMarkdownHtmlAttributes: readonly (string | domSanitize.SanitizeAttributeRule)[];
|
|
47
51
|
/**
|
|
48
52
|
* Renders `str` as plaintext, stripping out Markdown syntax if it's a {@link IMarkdownString}.
|
|
49
53
|
*
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { onUnexpectedError } from '../common/errors.js';
|
|
3
|
-
import { Event } from '../common/event.js';
|
|
4
3
|
import { removeMarkdownEscapes, escapeDoubleQuotes, parseHrefAndDimensions } from '../common/htmlContent.js';
|
|
5
4
|
import { markdownEscapeEscapedIcons } from '../common/iconLabels.js';
|
|
6
5
|
import { defaultGenerator } from '../common/idGenerator.js';
|
|
@@ -15,8 +14,7 @@ import { resolvePath, dirname } from '../common/resources.js';
|
|
|
15
14
|
import { escape } from '../common/strings.js';
|
|
16
15
|
import { URI } from '../common/uri.js';
|
|
17
16
|
import { createElement, reset, addDisposableListener, getWindow, $, isHTMLElement } from './dom.js';
|
|
18
|
-
import { sanitizeHtml, basicMarkupHtmlTags } from './domSanitize.js';
|
|
19
|
-
import { DomEmitter } from './event.js';
|
|
17
|
+
import { safeSetInnerHtml, convertTagToPlaintext, sanitizeHtml, basicMarkupHtmlTags } from './domSanitize.js';
|
|
20
18
|
import { StandardKeyboardEvent } from './keyboardEvent.js';
|
|
21
19
|
import { StandardMouseEvent } from './mouseEvent.js';
|
|
22
20
|
import { renderLabelWithIcons } from './ui/iconLabel/iconLabels.js';
|
|
@@ -85,18 +83,25 @@ function renderMarkdown(markdown, options = {}, target) {
|
|
|
85
83
|
const elements = renderLabelWithIcons(renderedMarkdown);
|
|
86
84
|
renderedMarkdown = ( elements.map(e => typeof e === 'string' ? e : e.outerHTML)).join('');
|
|
87
85
|
}
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
const renderedContent = createElement('div');
|
|
87
|
+
const sanitizerConfig = getDomSanitizerConfig(markdown.isTrusted ?? false, options.sanitizerConfig ?? {});
|
|
88
|
+
safeSetInnerHtml(renderedContent, renderedMarkdown, sanitizerConfig);
|
|
89
|
+
rewriteRenderedLinks(markdown, options, renderedContent);
|
|
90
|
+
let outElement;
|
|
91
|
+
if (target) {
|
|
92
|
+
outElement = target;
|
|
93
|
+
reset(target, ...renderedContent.children);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
outElement = renderedContent;
|
|
97
|
+
}
|
|
93
98
|
if (codeBlocks.length > 0) {
|
|
94
99
|
Promise.all(codeBlocks).then((tuples) => {
|
|
95
100
|
if (isDisposed) {
|
|
96
101
|
return;
|
|
97
102
|
}
|
|
98
103
|
const renderedElements = ( new Map(tuples));
|
|
99
|
-
const placeholderElements =
|
|
104
|
+
const placeholderElements = outElement.querySelectorAll(`div[data-code]`);
|
|
100
105
|
for (const placeholderElement of placeholderElements) {
|
|
101
106
|
const renderedElement = renderedElements.get(placeholderElement.dataset['code'] ?? '');
|
|
102
107
|
if (renderedElement) {
|
|
@@ -108,7 +113,7 @@ function renderMarkdown(markdown, options = {}, target) {
|
|
|
108
113
|
}
|
|
109
114
|
else if (syncCodeBlocks.length > 0) {
|
|
110
115
|
const renderedElements = ( new Map(syncCodeBlocks));
|
|
111
|
-
const placeholderElements =
|
|
116
|
+
const placeholderElements = outElement.querySelectorAll(`div[data-code]`);
|
|
112
117
|
for (const placeholderElement of placeholderElements) {
|
|
113
118
|
const renderedElement = renderedElements.get(placeholderElement.dataset['code'] ?? '');
|
|
114
119
|
if (renderedElement) {
|
|
@@ -117,7 +122,7 @@ function renderMarkdown(markdown, options = {}, target) {
|
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
124
|
if (options.asyncRenderCallback) {
|
|
120
|
-
for (const img of
|
|
125
|
+
for (const img of outElement.getElementsByTagName('img')) {
|
|
121
126
|
const listener = disposables.add(addDisposableListener(img, 'load', () => {
|
|
122
127
|
listener.dispose();
|
|
123
128
|
options.asyncRenderCallback();
|
|
@@ -125,16 +130,16 @@ function renderMarkdown(markdown, options = {}, target) {
|
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
132
|
if (options.actionHandler) {
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
options.actionHandler.disposables.add(Event.any(onClick.event, onAuxClick.event)(e => {
|
|
131
|
-
const mouseEvent = ( new StandardMouseEvent(getWindow(element), e));
|
|
133
|
+
const clickCb = (e) => {
|
|
134
|
+
const mouseEvent = ( new StandardMouseEvent(getWindow(outElement), e));
|
|
132
135
|
if (!mouseEvent.leftButton && !mouseEvent.middleButton) {
|
|
133
136
|
return;
|
|
134
137
|
}
|
|
135
138
|
activateLink(markdown, options, mouseEvent);
|
|
136
|
-
}
|
|
137
|
-
|
|
139
|
+
};
|
|
140
|
+
disposables.add(addDisposableListener(outElement, 'click', clickCb));
|
|
141
|
+
disposables.add(addDisposableListener(outElement, 'auxclick', clickCb));
|
|
142
|
+
disposables.add(addDisposableListener(outElement, 'keydown', (e) => {
|
|
138
143
|
const keyboardEvent = ( new StandardKeyboardEvent(e));
|
|
139
144
|
if (!keyboardEvent.equals(KeyCode.Space) && !keyboardEvent.equals(KeyCode.Enter)) {
|
|
140
145
|
return;
|
|
@@ -142,8 +147,22 @@ function renderMarkdown(markdown, options = {}, target) {
|
|
|
142
147
|
activateLink(markdown, options, keyboardEvent);
|
|
143
148
|
}));
|
|
144
149
|
}
|
|
150
|
+
for (const input of [...outElement.getElementsByTagName('input')]) {
|
|
151
|
+
if (input.attributes.getNamedItem('type')?.value === 'checkbox') {
|
|
152
|
+
input.setAttribute('disabled', '');
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
if (options.sanitizerConfig?.replaceWithPlaintext) {
|
|
156
|
+
const replacement = convertTagToPlaintext(input);
|
|
157
|
+
input.parentElement?.replaceChild(replacement, input);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
input.remove();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
145
164
|
return {
|
|
146
|
-
element,
|
|
165
|
+
element: outElement,
|
|
147
166
|
dispose: () => {
|
|
148
167
|
isDisposed = true;
|
|
149
168
|
disposables.dispose();
|
|
@@ -232,7 +251,7 @@ function preprocessMarkdownString(markdown) {
|
|
|
232
251
|
}
|
|
233
252
|
return value;
|
|
234
253
|
}
|
|
235
|
-
function activateLink(
|
|
254
|
+
function activateLink(mdStr, options, event) {
|
|
236
255
|
const target = event.target.closest('a[data-href]');
|
|
237
256
|
if (!isHTMLElement(target)) {
|
|
238
257
|
return;
|
|
@@ -240,10 +259,10 @@ function activateLink(markdown, options, event) {
|
|
|
240
259
|
try {
|
|
241
260
|
let href = target.dataset['href'];
|
|
242
261
|
if (href) {
|
|
243
|
-
if (
|
|
244
|
-
href = resolveWithBaseUri(( URI.from(
|
|
262
|
+
if (mdStr.baseUri) {
|
|
263
|
+
href = resolveWithBaseUri(( URI.from(mdStr.baseUri)), href);
|
|
245
264
|
}
|
|
246
|
-
options.actionHandler
|
|
265
|
+
options.actionHandler?.(href, mdStr);
|
|
247
266
|
}
|
|
248
267
|
}
|
|
249
268
|
catch (err) {
|
|
@@ -318,24 +337,20 @@ function resolveWithBaseUri(baseUri, href) {
|
|
|
318
337
|
return ( resolvePath(dirname(baseUri), href).toString());
|
|
319
338
|
}
|
|
320
339
|
}
|
|
321
|
-
const selfClosingTags = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
|
|
322
340
|
function sanitizeRenderedMarkdown(renderedMarkdown, isTrusted, options = {}) {
|
|
323
|
-
const sanitizerConfig =
|
|
341
|
+
const sanitizerConfig = getDomSanitizerConfig(isTrusted, options);
|
|
324
342
|
return sanitizeHtml(renderedMarkdown, sanitizerConfig);
|
|
325
343
|
}
|
|
326
344
|
const allowedMarkdownHtmlTags = ( Object.freeze([
|
|
327
345
|
...basicMarkupHtmlTags,
|
|
328
346
|
'input',
|
|
329
347
|
]));
|
|
330
|
-
const allowedMarkdownHtmlAttributes = [
|
|
348
|
+
const allowedMarkdownHtmlAttributes = ( Object.freeze([
|
|
331
349
|
'align',
|
|
332
350
|
'autoplay',
|
|
333
351
|
'alt',
|
|
334
|
-
'checked',
|
|
335
|
-
'class',
|
|
336
352
|
'colspan',
|
|
337
353
|
'controls',
|
|
338
|
-
'disabled',
|
|
339
354
|
'draggable',
|
|
340
355
|
'height',
|
|
341
356
|
'href',
|
|
@@ -350,12 +365,35 @@ const allowedMarkdownHtmlAttributes = [
|
|
|
350
365
|
'type',
|
|
351
366
|
'width',
|
|
352
367
|
'start',
|
|
368
|
+
'checked',
|
|
369
|
+
'disabled',
|
|
370
|
+
'value',
|
|
353
371
|
'data-code',
|
|
354
372
|
'data-href',
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
373
|
+
{
|
|
374
|
+
attributeName: 'style',
|
|
375
|
+
shouldKeep: (element, data) => {
|
|
376
|
+
if (element.tagName === 'SPAN') {
|
|
377
|
+
if (data.attrName === 'style') {
|
|
378
|
+
return /^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(border-radius:[0-9]+px;)?$/.test(data.attrValue);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
attributeName: 'class',
|
|
386
|
+
shouldKeep: (element, data) => {
|
|
387
|
+
if (element.tagName === 'SPAN') {
|
|
388
|
+
if (data.attrName === 'class') {
|
|
389
|
+
return /^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(data.attrValue);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
return false;
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
]));
|
|
396
|
+
function getDomSanitizerConfig(isTrusted, options) {
|
|
359
397
|
const allowedLinkSchemes = [
|
|
360
398
|
Schemas.http,
|
|
361
399
|
Schemas.https,
|
|
@@ -377,7 +415,7 @@ function getSanitizerOptions(isTrusted, options) {
|
|
|
377
415
|
override: options.allowedTags?.override ?? allowedMarkdownHtmlTags
|
|
378
416
|
},
|
|
379
417
|
allowedAttributes: {
|
|
380
|
-
override: allowedMarkdownHtmlAttributes,
|
|
418
|
+
override: options.allowedAttributes?.override ?? allowedMarkdownHtmlAttributes,
|
|
381
419
|
},
|
|
382
420
|
allowedLinkProtocols: {
|
|
383
421
|
override: allowedLinkSchemes,
|
|
@@ -393,99 +431,7 @@ function getSanitizerOptions(isTrusted, options) {
|
|
|
393
431
|
Schemas.vscodeRemoteResource,
|
|
394
432
|
]
|
|
395
433
|
},
|
|
396
|
-
|
|
397
|
-
uponSanitizeAttribute: (element, e) => {
|
|
398
|
-
if (options.customAttrSanitizer) {
|
|
399
|
-
const result = options.customAttrSanitizer(e.attrName, e.attrValue);
|
|
400
|
-
if (typeof result === 'string') {
|
|
401
|
-
if (result) {
|
|
402
|
-
e.attrValue = result;
|
|
403
|
-
e.keepAttr = true;
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
e.keepAttr = false;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
else {
|
|
410
|
-
e.keepAttr = result;
|
|
411
|
-
}
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
if (e.attrName === 'style' || e.attrName === 'class') {
|
|
415
|
-
if (element.tagName === 'SPAN') {
|
|
416
|
-
if (e.attrName === 'style') {
|
|
417
|
-
e.keepAttr = /^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(border-radius:[0-9]+px;)?$/.test(e.attrValue);
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
else if (e.attrName === 'class') {
|
|
421
|
-
e.keepAttr = /^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(e.attrValue);
|
|
422
|
-
return;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
e.keepAttr = false;
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
else if (element.tagName === 'INPUT' && element.attributes.getNamedItem('type')?.value === 'checkbox') {
|
|
429
|
-
if ((e.attrName === 'type' && e.attrValue === 'checkbox') || e.attrName === 'disabled' || e.attrName === 'checked') {
|
|
430
|
-
e.keepAttr = true;
|
|
431
|
-
return;
|
|
432
|
-
}
|
|
433
|
-
e.keepAttr = false;
|
|
434
|
-
}
|
|
435
|
-
},
|
|
436
|
-
uponSanitizeElement: (element, e) => {
|
|
437
|
-
let wantsReplaceWithPlaintext = false;
|
|
438
|
-
if (e.tagName === 'input') {
|
|
439
|
-
if (element.attributes.getNamedItem('type')?.value === 'checkbox') {
|
|
440
|
-
element.setAttribute('disabled', '');
|
|
441
|
-
}
|
|
442
|
-
else if (options.replaceWithPlaintext) {
|
|
443
|
-
wantsReplaceWithPlaintext = true;
|
|
444
|
-
}
|
|
445
|
-
else {
|
|
446
|
-
element.remove();
|
|
447
|
-
return;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
if (options.replaceWithPlaintext && (wantsReplaceWithPlaintext || (!e.allowedTags[e.tagName] && e.tagName !== 'body'))) {
|
|
451
|
-
if (element.parentElement) {
|
|
452
|
-
let startTagText;
|
|
453
|
-
let endTagText;
|
|
454
|
-
if (e.tagName === '#comment') {
|
|
455
|
-
startTagText = `<!--${element.textContent}-->`;
|
|
456
|
-
}
|
|
457
|
-
else {
|
|
458
|
-
const isSelfClosing = selfClosingTags.includes(e.tagName);
|
|
459
|
-
const attrString = element.attributes.length ?
|
|
460
|
-
' ' + ( Array.from(element.attributes)
|
|
461
|
-
.map(attr => `${attr.name}="${attr.value}"`))
|
|
462
|
-
.join(' ')
|
|
463
|
-
: '';
|
|
464
|
-
startTagText = `<${e.tagName}${attrString}>`;
|
|
465
|
-
if (!isSelfClosing) {
|
|
466
|
-
endTagText = `</${e.tagName}>`;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
const fragment = document.createDocumentFragment();
|
|
470
|
-
const textNode = element.parentElement.ownerDocument.createTextNode(startTagText);
|
|
471
|
-
fragment.appendChild(textNode);
|
|
472
|
-
const endTagTextNode = endTagText ? element.parentElement.ownerDocument.createTextNode(endTagText) : undefined;
|
|
473
|
-
while (element.firstChild) {
|
|
474
|
-
fragment.appendChild(element.firstChild);
|
|
475
|
-
}
|
|
476
|
-
if (endTagTextNode) {
|
|
477
|
-
fragment.appendChild(endTagTextNode);
|
|
478
|
-
}
|
|
479
|
-
if (element.nodeType === Node.COMMENT_NODE) {
|
|
480
|
-
element.parentElement.insertBefore(fragment, element);
|
|
481
|
-
}
|
|
482
|
-
else {
|
|
483
|
-
element.parentElement.replaceChild(fragment, element);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
434
|
+
replaceWithPlaintext: options.replaceWithPlaintext,
|
|
489
435
|
};
|
|
490
436
|
}
|
|
491
437
|
function renderAsPlaintext(str, options) {
|
|
@@ -8,14 +8,14 @@ import { IAction, IActionRunner } from "../../../common/actions.js";
|
|
|
8
8
|
import { Disposable } from "../../../common/lifecycle.js";
|
|
9
9
|
import type { IManagedHoverContent } from "../hover/hover.js";
|
|
10
10
|
export interface IBaseActionViewItemOptions {
|
|
11
|
-
draggable?: boolean;
|
|
12
|
-
isMenu?: boolean;
|
|
13
|
-
isTabList?: boolean;
|
|
14
|
-
useEventAsContext?: boolean;
|
|
15
|
-
hoverDelegate?: IHoverDelegate;
|
|
11
|
+
readonly draggable?: boolean;
|
|
12
|
+
readonly isMenu?: boolean;
|
|
13
|
+
readonly isTabList?: boolean;
|
|
14
|
+
readonly useEventAsContext?: boolean;
|
|
15
|
+
readonly hoverDelegate?: IHoverDelegate;
|
|
16
16
|
}
|
|
17
17
|
export declare class BaseActionViewItem extends Disposable implements IActionViewItem {
|
|
18
|
-
protected options: IBaseActionViewItemOptions;
|
|
18
|
+
protected readonly options: IBaseActionViewItemOptions;
|
|
19
19
|
element: HTMLElement | undefined;
|
|
20
20
|
_context: unknown;
|
|
21
21
|
readonly _action: IAction;
|
|
@@ -49,13 +49,13 @@ export declare class BaseActionViewItem extends Disposable implements IActionVie
|
|
|
49
49
|
export interface IActionViewItemOptions extends IBaseActionViewItemOptions {
|
|
50
50
|
icon?: boolean;
|
|
51
51
|
label?: boolean;
|
|
52
|
-
keybinding?: string | null;
|
|
53
|
-
keybindingNotRenderedWithLabel?: boolean;
|
|
54
|
-
toggleStyles?: IToggleStyles;
|
|
52
|
+
readonly keybinding?: string | null;
|
|
53
|
+
readonly keybindingNotRenderedWithLabel?: boolean;
|
|
54
|
+
readonly toggleStyles?: IToggleStyles;
|
|
55
55
|
}
|
|
56
56
|
export declare class ActionViewItem extends BaseActionViewItem {
|
|
57
57
|
protected label: HTMLElement | undefined;
|
|
58
|
-
protected options: IActionViewItemOptions;
|
|
58
|
+
protected readonly options: IActionViewItemOptions;
|
|
59
59
|
private cssClass?;
|
|
60
60
|
constructor(context: unknown, action: IAction, options: IActionViewItemOptions);
|
|
61
61
|
render(container: HTMLElement): void;
|
|
@@ -186,10 +186,13 @@ class BaseActionViewItem extends Disposable {
|
|
|
186
186
|
}
|
|
187
187
|
class ActionViewItem extends BaseActionViewItem {
|
|
188
188
|
constructor(context, action, options) {
|
|
189
|
+
options = {
|
|
190
|
+
...options,
|
|
191
|
+
icon: options.icon !== undefined ? options.icon : false,
|
|
192
|
+
label: options.label !== undefined ? options.label : true,
|
|
193
|
+
};
|
|
189
194
|
super(context, action, options);
|
|
190
195
|
this.options = options;
|
|
191
|
-
this.options.icon = options.icon !== undefined ? options.icon : false;
|
|
192
|
-
this.options.label = options.label !== undefined ? options.label : true;
|
|
193
196
|
this.cssClass = '';
|
|
194
197
|
}
|
|
195
198
|
render(container) {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
|
|
78
78
|
.monaco-action-bar.vertical .action-label.separator {
|
|
79
79
|
display: block;
|
|
80
|
-
border-bottom: 1px solid
|
|
80
|
+
border-bottom: 1px solid var(--vscode-disabledForeground);
|
|
81
81
|
padding-top: 1px;
|
|
82
82
|
margin-left: .8em;
|
|
83
83
|
margin-right: .8em;
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
cursor: default;
|
|
91
91
|
min-width: 1px;
|
|
92
92
|
padding: 0;
|
|
93
|
-
background-color:
|
|
93
|
+
background-color: var(--vscode-disabledForeground);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
.secondary-actions .monaco-action-bar .action-label {
|
|
@@ -64,14 +64,14 @@ export declare class ActionBar extends Disposable implements IActionRunner {
|
|
|
64
64
|
domNode: HTMLElement;
|
|
65
65
|
protected readonly actionsList: HTMLElement;
|
|
66
66
|
private readonly _onDidBlur;
|
|
67
|
-
|
|
67
|
+
get onDidBlur(): import("../../../common/event.js").Event<void>;
|
|
68
68
|
private readonly _onDidCancel;
|
|
69
|
-
|
|
69
|
+
get onDidCancel(): import("../../../common/event.js").Event<void>;
|
|
70
70
|
private cancelHasListener;
|
|
71
71
|
private readonly _onDidRun;
|
|
72
|
-
|
|
72
|
+
get onDidRun(): import("../../../common/event.js").Event<IRunEvent>;
|
|
73
73
|
private readonly _onWillRun;
|
|
74
|
-
|
|
74
|
+
get onWillRun(): import("../../../common/event.js").Event<IRunEvent>;
|
|
75
75
|
constructor(container: HTMLElement, options?: IActionBarOptions);
|
|
76
76
|
private refreshRole;
|
|
77
77
|
setAriaLabel(label: string): void;
|
|
@@ -18,6 +18,10 @@ var ActionsOrientation;
|
|
|
18
18
|
ActionsOrientation[ActionsOrientation["VERTICAL"] = 1] = "VERTICAL";
|
|
19
19
|
})(ActionsOrientation || (ActionsOrientation = {}));
|
|
20
20
|
class ActionBar extends Disposable {
|
|
21
|
+
get onDidBlur() { return this._onDidBlur.event; }
|
|
22
|
+
get onDidCancel() { return this._onDidCancel.event; }
|
|
23
|
+
get onDidRun() { return this._onDidRun.event; }
|
|
24
|
+
get onWillRun() { return this._onWillRun.event; }
|
|
21
25
|
constructor(container, options = {}) {
|
|
22
26
|
super();
|
|
23
27
|
this._actionRunnerDisposables = this._register(( new DisposableStore()));
|
|
@@ -25,14 +29,10 @@ class ActionBar extends Disposable {
|
|
|
25
29
|
this.triggerKeyDown = false;
|
|
26
30
|
this.focusable = true;
|
|
27
31
|
this._onDidBlur = this._register(( new Emitter()));
|
|
28
|
-
this.onDidBlur = this._onDidBlur.event;
|
|
29
32
|
this._onDidCancel = this._register(( new Emitter({ onWillAddFirstListener: () => this.cancelHasListener = true })));
|
|
30
|
-
this.onDidCancel = this._onDidCancel.event;
|
|
31
33
|
this.cancelHasListener = false;
|
|
32
34
|
this._onDidRun = this._register(( new Emitter()));
|
|
33
|
-
this.onDidRun = this._onDidRun.event;
|
|
34
35
|
this._onWillRun = this._register(( new Emitter()));
|
|
35
|
-
this.onWillRun = this._onWillRun.event;
|
|
36
36
|
this.options = options;
|
|
37
37
|
this._context = options.context ?? null;
|
|
38
38
|
this._orientation = this.options.orientation ?? ActionsOrientation.HORIZONTAL;
|
|
@@ -255,9 +255,6 @@ class ActionBar extends Disposable {
|
|
|
255
255
|
item.actionRunner = this._actionRunner;
|
|
256
256
|
item.setActionContext(this.context);
|
|
257
257
|
item.render(actionViewItemElement);
|
|
258
|
-
if (this.focusable && item instanceof BaseActionViewItem && this.viewItems.length === 0) {
|
|
259
|
-
item.setFocusable(true);
|
|
260
|
-
}
|
|
261
258
|
if (index === null || index < 0 || index >= this.actionsList.children.length) {
|
|
262
259
|
this.actionsList.appendChild(actionViewItemElement);
|
|
263
260
|
this.viewItems.push(item);
|
|
@@ -268,6 +265,34 @@ class ActionBar extends Disposable {
|
|
|
268
265
|
index++;
|
|
269
266
|
}
|
|
270
267
|
});
|
|
268
|
+
if (this.focusable) {
|
|
269
|
+
let didFocus = false;
|
|
270
|
+
for (const item of this.viewItems) {
|
|
271
|
+
if (!(item instanceof BaseActionViewItem)) {
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
let focus;
|
|
275
|
+
if (didFocus) {
|
|
276
|
+
focus = false;
|
|
277
|
+
}
|
|
278
|
+
else if (item.action.id === Separator.ID) {
|
|
279
|
+
focus = false;
|
|
280
|
+
}
|
|
281
|
+
else if (!item.isEnabled() && this.options.focusOnlyEnabledItems) {
|
|
282
|
+
focus = false;
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
focus = true;
|
|
286
|
+
}
|
|
287
|
+
if (focus) {
|
|
288
|
+
item.setFocusable(true);
|
|
289
|
+
didFocus = true;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
item.setFocusable(false);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
271
296
|
if (typeof this.focusedItem === 'number') {
|
|
272
297
|
this.focus(this.focusedItem);
|
|
273
298
|
}
|
|
@@ -145,8 +145,8 @@ export declare class ButtonBar {
|
|
|
145
145
|
* This is a Button that supports an icon to the left, and markdown to the right, with proper separation and wrapping the markdown label, which Button doesn't do.
|
|
146
146
|
*/
|
|
147
147
|
export declare class ButtonWithIcon extends Button {
|
|
148
|
-
private _iconElement;
|
|
149
|
-
private _mdlabelElement;
|
|
148
|
+
private readonly _iconElement;
|
|
149
|
+
private readonly _mdlabelElement;
|
|
150
150
|
get labelElement(): HTMLElement;
|
|
151
151
|
constructor(container: HTMLElement, options: IButtonOptions);
|
|
152
152
|
get label(): IMarkdownString | string;
|