@codingame/monaco-vscode-api 21.5.1 → 22.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/README.md +0 -5
- package/missing-services.js +68 -78
- package/package.json +8 -8
- package/services.d.ts +4 -4
- package/services.js +5 -4
- package/vscode/product.json.js +1 -1
- package/vscode/src/vs/base/browser/dom.js +6 -3
- package/vscode/src/vs/base/browser/domSanitize.d.ts +8 -0
- package/vscode/src/vs/base/browser/domSanitize.js +49 -27
- package/vscode/src/vs/base/browser/domStylesheets.js +5 -1
- package/vscode/src/vs/base/browser/markdownRenderer.js +7 -5
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +2 -2
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +1 -1
- package/vscode/src/vs/base/browser/ui/menu/menu.js +1 -0
- package/vscode/src/vs/base/browser/ui/progressbar/progressbar.d.ts +1 -1
- package/vscode/src/vs/base/common/async.js +6 -0
- package/vscode/src/vs/base/common/cancellation.d.ts +21 -0
- package/vscode/src/vs/base/common/cancellation.js +42 -1
- 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/decorators/cancelPreviousCalls.d.ts +84 -0
- package/vscode/src/vs/base/common/decorators.d.ts +1 -1
- package/vscode/src/vs/base/common/htmlContent.d.ts +2 -0
- package/vscode/src/vs/base/common/htmlContent.js +9 -6
- package/vscode/src/vs/base/common/lifecycle.js +21 -7
- package/vscode/src/vs/base/common/numbers.d.ts +0 -45
- package/vscode/src/vs/base/common/oauth.d.ts +33 -0
- package/vscode/src/vs/base/common/oauth.js +79 -3
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +4 -0
- package/vscode/src/vs/base/common/observableInternal/index.js +3 -0
- package/vscode/src/vs/base/common/observableInternal/logging/debugGetDependencyGraph.d.ts +4 -0
- package/vscode/src/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +98 -0
- package/vscode/src/vs/base/common/observableInternal/observables/baseObservable.d.ts +4 -0
- package/vscode/src/vs/base/common/observableInternal/observables/baseObservable.js +8 -1
- package/vscode/src/vs/base/common/observableInternal/observables/derivedImpl.d.ts +1 -0
- package/vscode/src/vs/base/common/observableInternal/observables/derivedImpl.js +10 -0
- package/vscode/src/vs/base/common/observableInternal/observables/observableFromEvent.d.ts +4 -0
- package/vscode/src/vs/base/common/observableInternal/observables/observableFromEvent.js +3 -0
- package/vscode/src/vs/base/common/observableInternal/reactions/autorunImpl.d.ts +1 -0
- package/vscode/src/vs/base/common/observableInternal/reactions/autorunImpl.js +9 -0
- package/vscode/src/vs/base/common/product.d.ts +7 -1
- package/vscode/src/vs/base/common/strings.d.ts +0 -1
- package/vscode/src/vs/base/common/strings.js +9 -4
- package/vscode/src/vs/base/common/uriIpc.js +24 -1
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +26 -16
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentSimple.js +3 -3
- package/vscode/src/vs/editor/browser/services/hoverService/hover.css +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/commands.d.ts +3 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +12 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +8 -8
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +4 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.d.ts +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +26 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +1 -1
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +93 -85
- package/vscode/src/vs/editor/common/config/editorOptions.js +386 -351
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/vscode/src/vs/editor/common/core/ranges/lineRange.d.ts +3 -3
- package/vscode/src/vs/editor/common/editorContextKeys.js +46 -46
- package/vscode/src/vs/editor/common/languages/modesRegistry.js +1 -1
- package/vscode/src/vs/editor/common/languages.d.ts +5 -1
- package/vscode/src/vs/editor/common/languages.js +56 -56
- package/vscode/src/vs/editor/common/model/editStack.js +1 -1
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.d.ts +86 -85
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +86 -85
- package/vscode/src/vs/editor/common/standaloneStrings.js +47 -47
- package/vscode/src/vs/editor/common/textModelEditSource.d.ts +1 -0
- package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/vscode/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +9 -7
- package/vscode/src/vs/editor/common/viewModel/screenReaderSimpleModel.d.ts +1 -0
- 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 +17 -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/codelensController.js +2 -2
- 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.js +1 -1
- 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/floatingMenu/browser/floatingMenu.contribution.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.contribution.js +8 -0
- package/vscode/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +44 -0
- package/vscode/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.d.ts +10 -0
- package/vscode/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.js +81 -0
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +21 -20
- 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/format.js +3 -0
- 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/clickLinkGesture.d.ts +4 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +20 -11
- 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/contentHoverController.js +2 -1
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +3 -3
- 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/markdownHoverParticipant.js +9 -9
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -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/inlayHints.js +2 -7
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- 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 +18 -13
- 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 +3 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +14 -6
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.d.ts +7 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +154 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +3 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.d.ts +7 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +18 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/telemetry.d.ts +45 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/telemetry.js +7 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +16 -15
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +5 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +24 -21
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +13 -4
- 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.d.ts +2 -1
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +36 -35
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/vscode/src/vs/editor/contrib/links/browser/links.js +11 -11
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/vscode/src/vs/editor/contrib/middleScroll/browser/middleScrollController.js +3 -3
- 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 +6 -6
- package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.d.ts +3 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +13 -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/stickyScroll/browser/stickyScrollController.js +12 -19
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +10 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -18
- 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 +26 -26
- 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/quickInput/standaloneQuickInputService.js +1 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +0 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneThemeService.js +1 -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 +9 -6
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css +13 -14
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +1 -1
- package/vscode/src/vs/platform/actions/browser/toolbar.js +5 -5
- package/vscode/src/vs/platform/actions/common/actions.d.ts +2 -0
- package/vscode/src/vs/platform/actions/common/actions.js +2 -0
- 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 +6 -1
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +2 -2
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/vscode/src/vs/platform/contextkey/browser/contextKeyService.d.ts +2 -0
- package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +32 -3
- package/vscode/src/vs/platform/contextkey/common/contextkey.js +11 -11
- package/vscode/src/vs/platform/contextkey/common/contextkeys.d.ts +0 -1
- package/vscode/src/vs/platform/contextkey/common/contextkeys.js +10 -11
- package/vscode/src/vs/platform/contextkey/common/scanner.js +5 -5
- package/vscode/src/vs/platform/dataChannel/browser/forwardingTelemetryService.d.ts +32 -0
- package/vscode/src/vs/platform/dataChannel/browser/forwardingTelemetryService.js +86 -0
- 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 +1 -0
- package/vscode/src/vs/platform/environment/common/environment.service.d.ts +0 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +19 -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/extensionManagement/common/implicitActivationEvents.d.ts +1 -3
- package/vscode/src/vs/platform/extensionManagement/common/implicitActivationEvents.js +1 -1
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +20 -20
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +2 -1
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +4 -3
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +4 -3
- 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/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.js +6 -6
- 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 +10 -2
- package/vscode/src/vs/platform/mcp/common/mcpGalleryManifest.js +10 -2
- package/vscode/src/vs/platform/mcp/common/mcpManagement.service.d.ts +3 -3
- package/vscode/src/vs/platform/notification/common/notification.js +3 -3
- package/vscode/src/vs/platform/product/common/product.js +3 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInput.d.ts +1 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +23 -15
- package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +47 -13
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +10 -61
- package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeController.d.ts +6 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeController.js +10 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +10 -5
- package/vscode/src/vs/platform/quickinput/browser/tree/quickTree.js +4 -1
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +10 -1
- package/vscode/src/vs/platform/request/common/request.js +34 -18
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -1
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -3
- package/vscode/src/vs/platform/terminal/common/terminal.js +6 -7
- 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/workspace/common/workspace.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +11 -10
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +25 -24
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.d.ts +4 -4
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +10 -18
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +5 -0
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +16 -4
- package/vscode/src/vs/workbench/api/common/extHostChatSessions.d.ts +1 -3
- package/vscode/src/vs/workbench/api/common/extHostChatSessions.js +9 -5
- package/vscode/src/vs/workbench/api/common/extHostCustomEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +0 -3
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +9 -4
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +7 -2
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostMcp.d.ts +97 -9
- package/vscode/src/vs/workbench/api/common/extHostMcp.js +66 -62
- package/vscode/src/vs/workbench/api/common/extHostNotebook.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSCM.d.ts +2 -0
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +22 -0
- package/vscode/src/vs/workbench/api/common/extHostSecrets.d.ts +0 -1
- package/vscode/src/vs/workbench/api/common/extHostSecrets.js +0 -3
- 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 +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +8 -8
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +53 -3
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.d.ts +2 -0
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +5 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.d.ts +6 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +60 -9
- package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +18 -14
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +7 -7
- package/vscode/src/vs/workbench/api/common/extHostWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +12 -12
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +262 -31
- package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
- package/vscode/src/vs/workbench/browser/contextkeys.d.ts +5 -7
- package/vscode/src/vs/workbench/browser/contextkeys.js +15 -43
- package/vscode/src/vs/workbench/common/configuration.js +9 -9
- package/vscode/src/vs/workbench/common/contextkeys.js +73 -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.js +4 -4
- package/vscode/src/vs/workbench/common/theme.js +167 -167
- package/vscode/src/vs/workbench/common/views.js +4 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +175 -158
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.service.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextPickService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +15 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +61 -66
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatLayoutService.service.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.d.ts +24 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.service.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.service.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.d.ts +28 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.js +35 -6
- package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +16 -6
- package/vscode/src/vs/workbench/contrib/chat/common/constants.js +11 -8
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +50 -42
- package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service.d.ts +23 -8
- package/vscode/src/vs/workbench/contrib/chat/common/tools/manageTodoListTool.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/tools/manageTodoListTool.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +4 -3
- 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 +7 -6
- 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/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/dropOrPasteInto/browser/commands.js +2 -2
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +4 -4
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +4 -4
- 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/mcpRegistryTypes.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +16 -5
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocol.d.ts +217 -60
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/common/history.d.ts +2 -0
- 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 +7 -7
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.d.ts +16 -3
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +18 -6
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +42 -8
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.js +2 -1
- package/vscode/src/vs/workbench/contrib/testing/common/constants.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +12 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.js +2 -2
- package/vscode/src/vs/workbench/services/activity/common/activity.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +4 -4
- package/vscode/src/vs/workbench/services/authentication/common/authentication.js +2 -2
- package/vscode/src/vs/workbench/services/authentication/common/authentication.service.d.ts +6 -6
- package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.d.ts +286 -0
- package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.js +861 -0
- package/vscode/src/vs/workbench/{contrib → services}/chat/common/chatEntitlementService.service.d.ts +8 -2
- 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/extensions/common/extensionsRegistry.js +87 -87
- package/vscode/src/vs/workbench/services/language/common/languageService.js +30 -30
- package/vscode/src/vs/workbench/services/lifecycle/common/lifecycle.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/lifecycle/common/lifecycleService.d.ts +1 -0
- package/vscode/src/vs/workbench/services/lifecycle/common/lifecycleService.js +4 -1
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/preferences/common/preferences.service.d.ts +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/textfile/common/encoding.js +1 -1
- 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-dts/vscode.d.ts +92 -47
- package/vscode-dts/vscode.proposed.authenticationChallenges.d.ts +7 -80
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +14 -1
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +12 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +19 -0
- package/vscode-dts/vscode.proposed.chatSessionsProvider.d.ts +19 -11
- package/vscode-dts/vscode.proposed.d.ts +1 -1
- package/vscode-dts/{vscode.proposed.secretStorageKeys.d.ts → vscode.proposed.devDeviceId.d.ts} +3 -4
- package/vscode-dts/vscode.proposed.languageModelCapabilities.d.ts +5 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +2 -0
- package/vscode-dts/vscode.proposed.terminalCompletionProvider.d.ts +70 -16
- package/vscode/src/vs/workbench/contrib/chat/common/chatLayoutService.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/index.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/types.d.ts +0 -55
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/types.d.ts +0 -91
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +0 -125
- /package/vscode/src/vs/workbench/{contrib → services}/chat/common/chatEntitlementService.service.js +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { decodeBase64 } from './buffer.js';
|
|
3
3
|
|
|
4
4
|
const WELL_KNOWN_ROUTE = '/.well-known';
|
|
5
|
+
const AUTH_PROTECTED_RESOURCE_METADATA_DISCOVERY_PATH = `${WELL_KNOWN_ROUTE}/oauth-protected-resource`;
|
|
5
6
|
const AUTH_SERVER_METADATA_DISCOVERY_PATH = `${WELL_KNOWN_ROUTE}/oauth-authorization-server`;
|
|
6
7
|
const OPENID_CONNECT_DISCOVERY_PATH = `${WELL_KNOWN_ROUTE}/openid-configuration`;
|
|
7
8
|
const AUTH_SCOPE_SEPARATOR = ' ';
|
|
@@ -129,9 +130,7 @@ async function fetchDynamicRegistration(serverMetadata, clientName, scopes) {
|
|
|
129
130
|
redirect_uris: [
|
|
130
131
|
'https://insiders.vscode.dev/redirect',
|
|
131
132
|
'https://vscode.dev/redirect',
|
|
132
|
-
'http://localhost/',
|
|
133
133
|
'http://127.0.0.1/',
|
|
134
|
-
`http://localhost:${DEFAULT_AUTH_FLOW_PORT}/`,
|
|
135
134
|
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}/`
|
|
136
135
|
],
|
|
137
136
|
scope: scopes?.join(AUTH_SCOPE_SEPARATOR),
|
|
@@ -265,5 +264,82 @@ function scopesMatch(scopes1, scopes2) {
|
|
|
265
264
|
const sortedScopes2 = [...scopes2].sort();
|
|
266
265
|
return sortedScopes1.every((scope, index) => scope === sortedScopes2[index]);
|
|
267
266
|
}
|
|
267
|
+
async function fetchResourceMetadata(targetResource, resourceMetadataUrl, options = {}) {
|
|
268
|
+
const { sameOriginHeaders = {}, fetch: fetchImpl = fetch } = options;
|
|
269
|
+
const targetResourceUrlObj = ( new URL(targetResource));
|
|
270
|
+
let urlsToTry;
|
|
271
|
+
if (!resourceMetadataUrl) {
|
|
272
|
+
const pathComponent = targetResourceUrlObj.pathname === '/' ? undefined : targetResourceUrlObj.pathname;
|
|
273
|
+
const rootUrl = `${targetResourceUrlObj.origin}${AUTH_PROTECTED_RESOURCE_METADATA_DISCOVERY_PATH}`;
|
|
274
|
+
if (pathComponent) {
|
|
275
|
+
urlsToTry = [
|
|
276
|
+
`${rootUrl}${pathComponent}`,
|
|
277
|
+
rootUrl
|
|
278
|
+
];
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
urlsToTry = [rootUrl];
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
urlsToTry = [resourceMetadataUrl];
|
|
286
|
+
}
|
|
287
|
+
const errors = [];
|
|
288
|
+
for (const urlToTry of urlsToTry) {
|
|
289
|
+
try {
|
|
290
|
+
let headers = {
|
|
291
|
+
'Accept': 'application/json'
|
|
292
|
+
};
|
|
293
|
+
const resourceMetadataUrlObj = ( new URL(urlToTry));
|
|
294
|
+
if (resourceMetadataUrlObj.origin === targetResourceUrlObj.origin) {
|
|
295
|
+
headers = {
|
|
296
|
+
...headers,
|
|
297
|
+
...sameOriginHeaders
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
const response = await fetchImpl(urlToTry, { method: 'GET', headers });
|
|
301
|
+
if (response.status !== 200) {
|
|
302
|
+
let errorText;
|
|
303
|
+
try {
|
|
304
|
+
errorText = await response.text();
|
|
305
|
+
}
|
|
306
|
+
catch {
|
|
307
|
+
errorText = response.statusText;
|
|
308
|
+
}
|
|
309
|
+
errors.push(( new Error(
|
|
310
|
+
`Failed to fetch resource metadata from ${urlToTry}: ${response.status} ${errorText}`
|
|
311
|
+
)));
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
const body = await response.json();
|
|
315
|
+
if (isAuthorizationProtectedResourceMetadata(body)) {
|
|
316
|
+
const prmValue = ( ( new URL(body.resource)).toString());
|
|
317
|
+
const targetValue = ( targetResourceUrlObj.toString());
|
|
318
|
+
if (prmValue !== targetValue) {
|
|
319
|
+
throw ( new Error(
|
|
320
|
+
`Protected Resource Metadata resource property value "${prmValue}" (length: ${prmValue.length}) does not match target server url "${targetValue}" (length: ${targetValue.length}). These MUST match to follow OAuth spec https://datatracker.ietf.org/doc/html/rfc9728#PRConfigurationValidation`
|
|
321
|
+
));
|
|
322
|
+
}
|
|
323
|
+
return body;
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
errors.push(( new Error(
|
|
327
|
+
`Invalid resource metadata from ${urlToTry}. Expected to follow shape of https://datatracker.ietf.org/doc/html/rfc9728#name-protected-resource-metadata (Hints: is scopes_supported an array? Is resource a string?). Current payload: ${JSON.stringify(body)}`
|
|
328
|
+
)));
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
catch (e) {
|
|
333
|
+
errors.push(e instanceof Error ? e : ( new Error(String(e))));
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (errors.length === 1) {
|
|
338
|
+
throw errors[0];
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
throw ( new AggregateError(errors, 'Failed to fetch resource metadata from all attempted URLs'));
|
|
342
|
+
}
|
|
343
|
+
}
|
|
268
344
|
|
|
269
|
-
export { AUTH_SCOPE_SEPARATOR, AUTH_SERVER_METADATA_DISCOVERY_PATH, AuthorizationDeviceCodeErrorType, AuthorizationErrorType, AuthorizationRegistrationErrorType, DEFAULT_AUTH_FLOW_PORT, OPENID_CONNECT_DISCOVERY_PATH, fetchDynamicRegistration, getClaimsFromJWT, getDefaultMetadataForUrl, isAuthorizationDynamicClientRegistrationResponse, isAuthorizationErrorResponse, isAuthorizationProtectedResourceMetadata, isAuthorizationRegistrationErrorResponse, isAuthorizationServerMetadata, isAuthorizationTokenResponse, parseWWWAuthenticateHeader, scopesMatch };
|
|
345
|
+
export { AUTH_PROTECTED_RESOURCE_METADATA_DISCOVERY_PATH, AUTH_SCOPE_SEPARATOR, AUTH_SERVER_METADATA_DISCOVERY_PATH, AuthorizationDeviceCodeErrorType, AuthorizationErrorType, AuthorizationRegistrationErrorType, DEFAULT_AUTH_FLOW_PORT, OPENID_CONNECT_DISCOVERY_PATH, fetchDynamicRegistration, fetchResourceMetadata, getClaimsFromJWT, getDefaultMetadataForUrl, isAuthorizationDynamicClientRegistrationResponse, isAuthorizationErrorResponse, isAuthorizationProtectedResourceMetadata, isAuthorizationRegistrationErrorResponse, isAuthorizationServerMetadata, isAuthorizationTokenResponse, parseWWWAuthenticateHeader, scopesMatch };
|
|
@@ -74,6 +74,10 @@ export interface IObservableWithChange<T, TChange = unknown> {
|
|
|
74
74
|
* A human-readable name for debugging purposes.
|
|
75
75
|
*/
|
|
76
76
|
readonly debugName: string;
|
|
77
|
+
/**
|
|
78
|
+
* ONLY FOR DEBUGGING!
|
|
79
|
+
*/
|
|
80
|
+
debugGetDependencyGraph(): string;
|
|
77
81
|
/**
|
|
78
82
|
* This property captures the type of the change object. Do not use it at runtime!
|
|
79
83
|
*/
|
|
@@ -4,6 +4,7 @@ import '../arrays.js';
|
|
|
4
4
|
import '../event.js';
|
|
5
5
|
import '../lifecycle.js';
|
|
6
6
|
import { setLogObservableFn, addLogger } from './logging/logging.js';
|
|
7
|
+
import { _setDebugGetDependencyGraph } from './observables/baseObservable.js';
|
|
7
8
|
export { DebugLocation } from './debugLocation.js';
|
|
8
9
|
import './reactions/autorunImpl.js';
|
|
9
10
|
export { derived, derivedDisposable, derivedHandleChanges, derivedOpts, derivedWithSetter } from './observables/derived.js';
|
|
@@ -14,7 +15,9 @@ export { observableFromEvent, observableFromEventOpts } from './observables/obse
|
|
|
14
15
|
import { logObservableToConsole } from './logging/consoleObservableLogger.js';
|
|
15
16
|
import { DevToolsLogger } from './logging/debugger/devToolsLogger.js';
|
|
16
17
|
import { env } from '../process.js';
|
|
18
|
+
import { debugGetDependencyGraph } from './logging/debugGetDependencyGraph.js';
|
|
17
19
|
|
|
20
|
+
_setDebugGetDependencyGraph(debugGetDependencyGraph);
|
|
18
21
|
setLogObservableFn(logObservableToConsole);
|
|
19
22
|
if (env && env['VSCODE_DEV_DEBUG_OBSERVABLES']) {
|
|
20
23
|
addLogger(DevToolsLogger.getInstance());
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
|
|
2
|
+
import { Derived } from '../observables/derivedImpl.js';
|
|
3
|
+
import { FromEventObservable } from '../observables/observableFromEvent.js';
|
|
4
|
+
import { ObservableValue } from '../observables/observableValue.js';
|
|
5
|
+
import { AutorunObserver } from '../reactions/autorunImpl.js';
|
|
6
|
+
import { formatValue } from './consoleObservableLogger.js';
|
|
7
|
+
|
|
8
|
+
function debugGetDependencyGraph(obs, options) {
|
|
9
|
+
const debugNamePostProcessor = options?.debugNamePostProcessor ?? ((str) => str);
|
|
10
|
+
const info = Info.from(obs, debugNamePostProcessor);
|
|
11
|
+
if (!info) {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
const alreadyListed = ( new Set());
|
|
15
|
+
return formatObservableInfo(info, 0, alreadyListed).trim();
|
|
16
|
+
}
|
|
17
|
+
function formatObservableInfo(info, indentLevel, alreadyListed) {
|
|
18
|
+
const indent = '\t\t'.repeat(indentLevel);
|
|
19
|
+
const lines = [];
|
|
20
|
+
const isAlreadyListed = ( alreadyListed.has(info.sourceObj));
|
|
21
|
+
if (isAlreadyListed) {
|
|
22
|
+
lines.push(`${indent}* ${info.type} ${info.name} (already listed)`);
|
|
23
|
+
return lines.join('\n');
|
|
24
|
+
}
|
|
25
|
+
alreadyListed.add(info.sourceObj);
|
|
26
|
+
lines.push(`${indent}* ${info.type} ${info.name}:`);
|
|
27
|
+
lines.push(`${indent} value: ${formatValue(info.value, 50)}`);
|
|
28
|
+
lines.push(`${indent} state: ${info.state}`);
|
|
29
|
+
if (info.dependencies.length > 0) {
|
|
30
|
+
lines.push(`${indent} dependencies:`);
|
|
31
|
+
for (const dep of info.dependencies) {
|
|
32
|
+
lines.push(formatObservableInfo(dep, indentLevel + 1, alreadyListed));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return lines.join('\n');
|
|
36
|
+
}
|
|
37
|
+
class Info {
|
|
38
|
+
static from(obs, debugNamePostProcessor) {
|
|
39
|
+
if (obs instanceof AutorunObserver) {
|
|
40
|
+
const state = obs.debugGetState();
|
|
41
|
+
return ( new Info(
|
|
42
|
+
obs,
|
|
43
|
+
debugNamePostProcessor(obs.debugName),
|
|
44
|
+
'autorun',
|
|
45
|
+
undefined,
|
|
46
|
+
state.stateStr,
|
|
47
|
+
( Array.from(state.dependencies).map(dep => Info.from(dep, debugNamePostProcessor) || Info.unknown(dep)))
|
|
48
|
+
));
|
|
49
|
+
}
|
|
50
|
+
else if (obs instanceof Derived) {
|
|
51
|
+
const state = obs.debugGetState();
|
|
52
|
+
return ( new Info(
|
|
53
|
+
obs,
|
|
54
|
+
debugNamePostProcessor(obs.debugName),
|
|
55
|
+
'derived',
|
|
56
|
+
state.value,
|
|
57
|
+
state.stateStr,
|
|
58
|
+
( Array.from(state.dependencies).map(dep => Info.from(dep, debugNamePostProcessor) || Info.unknown(dep)))
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
else if (obs instanceof ObservableValue) {
|
|
62
|
+
const state = obs.debugGetState();
|
|
63
|
+
return ( new Info(
|
|
64
|
+
obs,
|
|
65
|
+
debugNamePostProcessor(obs.debugName),
|
|
66
|
+
'observableValue',
|
|
67
|
+
state.value,
|
|
68
|
+
'upToDate',
|
|
69
|
+
[]
|
|
70
|
+
));
|
|
71
|
+
}
|
|
72
|
+
else if (obs instanceof FromEventObservable) {
|
|
73
|
+
const state = obs.debugGetState();
|
|
74
|
+
return ( new Info(
|
|
75
|
+
obs,
|
|
76
|
+
debugNamePostProcessor(obs.debugName),
|
|
77
|
+
'fromEvent',
|
|
78
|
+
state.value,
|
|
79
|
+
state.hasValue ? 'upToDate' : 'initial',
|
|
80
|
+
[]
|
|
81
|
+
));
|
|
82
|
+
}
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
static unknown(obs) {
|
|
86
|
+
return ( new Info(obs, '(unknown)', 'unknown', undefined, 'unknown', []));
|
|
87
|
+
}
|
|
88
|
+
constructor(sourceObj, name, type, value, state, dependencies) {
|
|
89
|
+
this.sourceObj = sourceObj;
|
|
90
|
+
this.name = name;
|
|
91
|
+
this.type = type;
|
|
92
|
+
this.value = value;
|
|
93
|
+
this.state = state;
|
|
94
|
+
this.dependencies = dependencies;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { debugGetDependencyGraph };
|
|
@@ -2,6 +2,7 @@ import { IObservableWithChange, IObserver, IReader, IObservable } from "../base.
|
|
|
2
2
|
import { DisposableStore } from "../commonFacade/deps.js";
|
|
3
3
|
import { DebugLocation } from "../debugLocation.js";
|
|
4
4
|
import { DebugOwner } from "../debugName.js";
|
|
5
|
+
import { debugGetDependencyGraph } from "../logging/debugGetDependencyGraph.js";
|
|
5
6
|
import type { keepObserved, recomputeInitiallyAndOnChange } from "../utils/utils.js";
|
|
6
7
|
import { derivedOpts } from "./derived.js";
|
|
7
8
|
declare let _derived: typeof derivedOpts;
|
|
@@ -14,6 +15,8 @@ declare let _recomputeInitiallyAndOnChange: typeof recomputeInitiallyAndOnChange
|
|
|
14
15
|
export declare function _setRecomputeInitiallyAndOnChange(recomputeInitiallyAndOnChange: typeof _recomputeInitiallyAndOnChange): void;
|
|
15
16
|
declare let _keepObserved: typeof keepObserved;
|
|
16
17
|
export declare function _setKeepObserved(keepObserved: typeof _keepObserved): void;
|
|
18
|
+
declare let _debugGetDependencyGraph: typeof debugGetDependencyGraph;
|
|
19
|
+
export declare function _setDebugGetDependencyGraph(debugGetDependencyGraph: typeof _debugGetDependencyGraph): void;
|
|
17
20
|
export declare abstract class ConvenientObservable<T, TChange> implements IObservableWithChange<T, TChange> {
|
|
18
21
|
get TChange(): TChange;
|
|
19
22
|
abstract get(): T;
|
|
@@ -40,6 +43,7 @@ export declare abstract class ConvenientObservable<T, TChange> implements IObser
|
|
|
40
43
|
keepObserved(store: DisposableStore): IObservable<T>;
|
|
41
44
|
abstract get debugName(): string;
|
|
42
45
|
protected get debugValue(): T;
|
|
46
|
+
debugGetDependencyGraph(): string;
|
|
43
47
|
}
|
|
44
48
|
export declare abstract class BaseObservable<T, TChange = void> extends ConvenientObservable<T, TChange> {
|
|
45
49
|
protected readonly _observers: Set<IObserver>;
|
|
@@ -15,6 +15,10 @@ let _keepObserved;
|
|
|
15
15
|
function _setKeepObserved(keepObserved) {
|
|
16
16
|
_keepObserved = keepObserved;
|
|
17
17
|
}
|
|
18
|
+
let _debugGetDependencyGraph;
|
|
19
|
+
function _setDebugGetDependencyGraph(debugGetDependencyGraph) {
|
|
20
|
+
_debugGetDependencyGraph = debugGetDependencyGraph;
|
|
21
|
+
}
|
|
18
22
|
class ConvenientObservable {
|
|
19
23
|
get TChange() { return null; }
|
|
20
24
|
reportChanges() {
|
|
@@ -68,6 +72,9 @@ class ConvenientObservable {
|
|
|
68
72
|
get debugValue() {
|
|
69
73
|
return this.get();
|
|
70
74
|
}
|
|
75
|
+
debugGetDependencyGraph() {
|
|
76
|
+
return _debugGetDependencyGraph(this);
|
|
77
|
+
}
|
|
71
78
|
}
|
|
72
79
|
class BaseObservable extends ConvenientObservable {
|
|
73
80
|
constructor(debugLocation) {
|
|
@@ -109,4 +116,4 @@ class BaseObservable extends ConvenientObservable {
|
|
|
109
116
|
}
|
|
110
117
|
}
|
|
111
118
|
|
|
112
|
-
export { BaseObservable, ConvenientObservable, _setDerivedOpts, _setKeepObserved, _setRecomputeInitiallyAndOnChange };
|
|
119
|
+
export { BaseObservable, ConvenientObservable, _setDebugGetDependencyGraph, _setDerivedOpts, _setKeepObserved, _setRecomputeInitiallyAndOnChange };
|
|
@@ -67,6 +67,7 @@ export declare class Derived<T, TChangeSummary = any, TChange = void> extends Ba
|
|
|
67
67
|
removeObserver(observer: IObserver): void;
|
|
68
68
|
debugGetState(): {
|
|
69
69
|
state: DerivedState;
|
|
70
|
+
stateStr: string;
|
|
70
71
|
updateCount: number;
|
|
71
72
|
isComputing: boolean;
|
|
72
73
|
dependencies: Set<IObservable<any>>;
|
|
@@ -14,6 +14,15 @@ var DerivedState;
|
|
|
14
14
|
DerivedState[DerivedState["stale"] = 2] = "stale";
|
|
15
15
|
DerivedState[DerivedState["upToDate"] = 3] = "upToDate";
|
|
16
16
|
})(DerivedState || (DerivedState = {}));
|
|
17
|
+
function derivedStateToString(state) {
|
|
18
|
+
switch (state) {
|
|
19
|
+
case DerivedState.initial: return 'initial';
|
|
20
|
+
case DerivedState.dependenciesMightHaveChanged: return 'dependenciesMightHaveChanged';
|
|
21
|
+
case DerivedState.stale: return 'stale';
|
|
22
|
+
case DerivedState.upToDate: return 'upToDate';
|
|
23
|
+
default: return '<unknown>';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
17
26
|
class Derived extends BaseObservable {
|
|
18
27
|
get debugName() {
|
|
19
28
|
return this._debugNameData.getDebugName(this) ?? '(anonymous)';
|
|
@@ -296,6 +305,7 @@ class Derived extends BaseObservable {
|
|
|
296
305
|
debugGetState() {
|
|
297
306
|
return {
|
|
298
307
|
state: this._state,
|
|
308
|
+
stateStr: derivedStateToString(this._state),
|
|
299
309
|
updateCount: this._updateCount,
|
|
300
310
|
isComputing: this._isComputing,
|
|
301
311
|
dependencies: this._dependencies,
|
|
@@ -26,6 +26,10 @@ export declare class FromEventObservable<TArgs, T> extends BaseObservable<T> {
|
|
|
26
26
|
protected onLastObserverRemoved(): void;
|
|
27
27
|
get(): T;
|
|
28
28
|
debugSetValue(value: unknown): void;
|
|
29
|
+
debugGetState(): {
|
|
30
|
+
value: T | undefined;
|
|
31
|
+
hasValue: boolean;
|
|
32
|
+
};
|
|
29
33
|
}
|
|
30
34
|
export declare namespace observableFromEvent {
|
|
31
35
|
const Observer: typeof FromEventObservable;
|
|
@@ -92,6 +92,9 @@ class FromEventObservable extends BaseObservable {
|
|
|
92
92
|
debugSetValue(value) {
|
|
93
93
|
this._value = value;
|
|
94
94
|
}
|
|
95
|
+
debugGetState() {
|
|
96
|
+
return { value: this._value, hasValue: this._hasValue };
|
|
97
|
+
}
|
|
95
98
|
}
|
|
96
99
|
(function (observableFromEvent) {
|
|
97
100
|
observableFromEvent.Observer = FromEventObservable;
|
|
@@ -12,6 +12,14 @@ var AutorunState;
|
|
|
12
12
|
AutorunState[AutorunState["stale"] = 2] = "stale";
|
|
13
13
|
AutorunState[AutorunState["upToDate"] = 3] = "upToDate";
|
|
14
14
|
})(AutorunState || (AutorunState = {}));
|
|
15
|
+
function autorunStateToString(state) {
|
|
16
|
+
switch (state) {
|
|
17
|
+
case AutorunState.dependenciesMightHaveChanged: return 'dependenciesMightHaveChanged';
|
|
18
|
+
case AutorunState.stale: return 'stale';
|
|
19
|
+
case AutorunState.upToDate: return 'upToDate';
|
|
20
|
+
default: return '<unknown>';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
15
23
|
class AutorunObserver {
|
|
16
24
|
get debugName() {
|
|
17
25
|
return this._debugNameData.getDebugName(this) ?? '(anonymous)';
|
|
@@ -198,6 +206,7 @@ class AutorunObserver {
|
|
|
198
206
|
updateCount: this._updateCount,
|
|
199
207
|
dependencies: this._dependencies,
|
|
200
208
|
state: this._state,
|
|
209
|
+
stateStr: autorunStateToString(this._state),
|
|
201
210
|
};
|
|
202
211
|
}
|
|
203
212
|
debugRerun() {
|
|
@@ -98,7 +98,6 @@ export interface IProductConfiguration {
|
|
|
98
98
|
readonly extensionsGallery?: {
|
|
99
99
|
readonly serviceUrl: string;
|
|
100
100
|
readonly controlUrl: string;
|
|
101
|
-
readonly mcpUrl: string;
|
|
102
101
|
readonly extensionUrlTemplate: string;
|
|
103
102
|
readonly resourceUrlTemplate: string;
|
|
104
103
|
readonly nlsBaseUrl: string;
|
|
@@ -106,6 +105,12 @@ export interface IProductConfiguration {
|
|
|
106
105
|
};
|
|
107
106
|
readonly mcpGallery?: {
|
|
108
107
|
readonly serviceUrl: string;
|
|
108
|
+
readonly itemWebUrl: string;
|
|
109
|
+
readonly publisherUrl: string;
|
|
110
|
+
readonly supportUrl: string;
|
|
111
|
+
readonly privacyPolicyUrl: string;
|
|
112
|
+
readonly termsOfServiceUrl: string;
|
|
113
|
+
readonly reportUrl: string;
|
|
109
114
|
};
|
|
110
115
|
readonly extensionPublisherOrgs?: readonly string[];
|
|
111
116
|
readonly trustedExtensionPublishers?: readonly string[];
|
|
@@ -359,6 +364,7 @@ export interface IDefaultChatAgent {
|
|
|
359
364
|
readonly completionsRefreshTokenCommand: string;
|
|
360
365
|
readonly chatRefreshTokenCommand: string;
|
|
361
366
|
readonly generateCommitMessageCommand: string;
|
|
367
|
+
readonly resolveMergeConflictsCommand: string;
|
|
362
368
|
readonly completionsAdvancedSetting: string;
|
|
363
369
|
readonly completionsEnablementSetting: string;
|
|
364
370
|
readonly nextEditSuggestionsSetting: string;
|
|
@@ -52,7 +52,6 @@ export declare function ltrim(haystack: string, needle: string): string;
|
|
|
52
52
|
*/
|
|
53
53
|
export declare function rtrim(haystack: string, needle: string): string;
|
|
54
54
|
export declare function convertSimple2RegExpPattern(pattern: string): string;
|
|
55
|
-
export declare function stripWildcards(pattern: string): string;
|
|
56
55
|
export interface RegExpOptions {
|
|
57
56
|
matchCase?: boolean;
|
|
58
57
|
wholeWord?: boolean;
|
|
@@ -119,9 +119,6 @@ function rtrim(haystack, needle) {
|
|
|
119
119
|
function convertSimple2RegExpPattern(pattern) {
|
|
120
120
|
return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&').replace(/[\*]/g, '.*');
|
|
121
121
|
}
|
|
122
|
-
function stripWildcards(pattern) {
|
|
123
|
-
return pattern.replace(/\*/g, '');
|
|
124
|
-
}
|
|
125
122
|
function createRegExp(searchString, isRegex, options = {}) {
|
|
126
123
|
if (!searchString) {
|
|
127
124
|
throw ( new Error('Cannot create regex from empty string'));
|
|
@@ -165,6 +162,14 @@ function joinStrings(items, separator) {
|
|
|
165
162
|
function splitLines(str) {
|
|
166
163
|
return str.split(/\r\n|\r|\n/);
|
|
167
164
|
}
|
|
165
|
+
function splitLinesIncludeSeparators(str) {
|
|
166
|
+
const linesWithSeparators = [];
|
|
167
|
+
const splitLinesAndSeparators = str.split(/(\r\n|\r|\n)/);
|
|
168
|
+
for (let i = 0; i < Math.ceil(splitLinesAndSeparators.length / 2); i++) {
|
|
169
|
+
linesWithSeparators.push(splitLinesAndSeparators[2 * i] + (splitLinesAndSeparators[2 * i + 1] ?? ''));
|
|
170
|
+
}
|
|
171
|
+
return linesWithSeparators;
|
|
172
|
+
}
|
|
168
173
|
function firstNonWhitespaceIndex(str) {
|
|
169
174
|
for (let i = 0, len = str.length; i < len; i++) {
|
|
170
175
|
const chCode = str.charCodeAt(i);
|
|
@@ -827,4 +832,4 @@ function multibyteAwareBtoa(str) {
|
|
|
827
832
|
return btoa(toBinary(str));
|
|
828
833
|
}
|
|
829
834
|
|
|
830
|
-
export { AmbiguousCharacters, CodePointIterator, Ellipsis, GraphemeBreakType, GraphemeIterator, InvisibleCharacters, UNUSUAL_LINE_TERMINATORS, UTF8_BOM_CHARACTER, commonPrefixLength, commonSuffixLength, compare, compareIgnoreCase, compareSubstring, compareSubstringIgnoreCase, computeCodePoint, containsRTL, containsUnusualLineTerminators, containsUppercaseCharacter, convertSimple2RegExpPattern, count, createRegExp, equalsIgnoreCase, escape, escapeRegExpCharacters, firstNonWhitespaceIndex, forAnsiStringParts, format, format2, fuzzyContains, getCharContainingOffset, getLeadingWhitespace, getLeftDeleteOffset, getNLines, getNextCodePoint, htmlAttributeEncodeValue, isAsciiDigit, isBasicASCII, isEmojiImprecise, isFalsyOrWhitespace, isFullWidthCharacter, isHighSurrogate, isLowSurrogate, isLowerAsciiLetter, isUpperAsciiLetter, joinStrings, lastNonWhitespaceIndex, lcut, ltrim, multibyteAwareBtoa, nextCharLength, noBreakWhitespace, prevCharLength, regExpLeadsToEndlessLoop, removeAnsiEscapeCodes, removeAnsiEscapeCodesFromPrompt, rtrim, singleLetterHash, splitLines, startsWithIgnoreCase, startsWithUTF8BOM,
|
|
835
|
+
export { AmbiguousCharacters, CodePointIterator, Ellipsis, GraphemeBreakType, GraphemeIterator, InvisibleCharacters, UNUSUAL_LINE_TERMINATORS, UTF8_BOM_CHARACTER, commonPrefixLength, commonSuffixLength, compare, compareIgnoreCase, compareSubstring, compareSubstringIgnoreCase, computeCodePoint, containsRTL, containsUnusualLineTerminators, containsUppercaseCharacter, convertSimple2RegExpPattern, count, createRegExp, equalsIgnoreCase, escape, escapeRegExpCharacters, firstNonWhitespaceIndex, forAnsiStringParts, format, format2, fuzzyContains, getCharContainingOffset, getLeadingWhitespace, getLeftDeleteOffset, getNLines, getNextCodePoint, htmlAttributeEncodeValue, isAsciiDigit, isBasicASCII, isEmojiImprecise, isFalsyOrWhitespace, isFullWidthCharacter, isHighSurrogate, isLowSurrogate, isLowerAsciiLetter, isUpperAsciiLetter, joinStrings, lastNonWhitespaceIndex, lcut, ltrim, multibyteAwareBtoa, nextCharLength, noBreakWhitespace, prevCharLength, regExpLeadsToEndlessLoop, removeAnsiEscapeCodes, removeAnsiEscapeCodesFromPrompt, rtrim, singleLetterHash, splitLines, splitLinesIncludeSeparators, startsWithIgnoreCase, startsWithUTF8BOM, trim, truncate, truncateMiddle, uppercaseFirstLetter };
|
|
@@ -3,6 +3,29 @@ import { VSBuffer } from './buffer.js';
|
|
|
3
3
|
import { MarshalledId } from './marshallingIds.js';
|
|
4
4
|
import { URI } from './uri.js';
|
|
5
5
|
|
|
6
|
+
function toJSON(uri) {
|
|
7
|
+
return uri.toJSON();
|
|
8
|
+
}
|
|
9
|
+
class URITransformer {
|
|
10
|
+
constructor(uriTransformer) {
|
|
11
|
+
this._uriTransformer = uriTransformer;
|
|
12
|
+
}
|
|
13
|
+
transformIncoming(uri) {
|
|
14
|
+
const result = this._uriTransformer.transformIncoming(uri);
|
|
15
|
+
return (result === uri ? uri : toJSON(( URI.from(result))));
|
|
16
|
+
}
|
|
17
|
+
transformOutgoing(uri) {
|
|
18
|
+
const result = this._uriTransformer.transformOutgoing(uri);
|
|
19
|
+
return (result === uri ? uri : toJSON(( URI.from(result))));
|
|
20
|
+
}
|
|
21
|
+
transformOutgoingURI(uri) {
|
|
22
|
+
const result = this._uriTransformer.transformOutgoing(uri);
|
|
23
|
+
return (result === uri ? uri : ( URI.from(result)));
|
|
24
|
+
}
|
|
25
|
+
transformOutgoingScheme(scheme) {
|
|
26
|
+
return this._uriTransformer.transformOutgoingScheme(scheme);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
6
29
|
const DefaultURITransformer = new class {
|
|
7
30
|
transformIncoming(uri) {
|
|
8
31
|
return uri;
|
|
@@ -54,4 +77,4 @@ function transformAndReviveIncomingURIs(obj, transformer) {
|
|
|
54
77
|
return result;
|
|
55
78
|
}
|
|
56
79
|
|
|
57
|
-
export { DefaultURITransformer, transformAndReviveIncomingURIs, transformIncomingURIs };
|
|
80
|
+
export { DefaultURITransformer, URITransformer, transformAndReviveIncomingURIs, transformIncomingURIs };
|
package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import {
|
|
3
|
+
import { getActiveElement, addDisposableListener, createElement, getActiveWindow, isHTMLElement } from '../../../../../base/browser/dom.js';
|
|
4
4
|
import { createTrustedTypesPolicy } from '../../../../../base/browser/trustedTypes.js';
|
|
5
5
|
import { IAccessibilityService } from '../../../../../platform/accessibility/common/accessibility.service.js';
|
|
6
6
|
import { EditorOption, EditorFontLigatures } from '../../../../common/config/editorOptions.js';
|
|
@@ -25,14 +25,14 @@ let RichScreenReaderContent = class RichScreenReaderContent extends Disposable {
|
|
|
25
25
|
this._selectionChangeListener = this._register(( new MutableDisposable()));
|
|
26
26
|
this._accessibilityPageSize = 1;
|
|
27
27
|
this._ignoreSelectionChangeTime = 0;
|
|
28
|
-
this._state =
|
|
28
|
+
this._state = RichScreenReaderState.NULL;
|
|
29
29
|
this._strategy = ( new RichPagedScreenReaderStrategy());
|
|
30
30
|
this._renderedLines = ( new Map());
|
|
31
31
|
this._renderedSelection = ( new Selection(1, 1, 1, 1));
|
|
32
32
|
this.onConfigurationChanged(this._context.configuration.options);
|
|
33
33
|
}
|
|
34
34
|
updateScreenReaderContent(primarySelection) {
|
|
35
|
-
const focusedElement =
|
|
35
|
+
const focusedElement = getActiveElement();
|
|
36
36
|
if (!focusedElement || focusedElement !== this._domNode.domNode) {
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
@@ -49,7 +49,7 @@ let RichScreenReaderContent = class RichScreenReaderContent extends Disposable {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
this._state =
|
|
52
|
+
this._state = RichScreenReaderState.NULL;
|
|
53
53
|
this._setIgnoreSelectionChangeTime('setValue');
|
|
54
54
|
this._domNode.domNode.textContent = '';
|
|
55
55
|
}
|
|
@@ -88,7 +88,7 @@ let RichScreenReaderContent = class RichScreenReaderContent extends Disposable {
|
|
|
88
88
|
_setSelectionChangeListener() {
|
|
89
89
|
let previousSelectionChangeEventTime = 0;
|
|
90
90
|
return addDisposableListener(this._domNode.domNode.ownerDocument, 'selectionchange', () => {
|
|
91
|
-
const activeElement =
|
|
91
|
+
const activeElement = getActiveElement();
|
|
92
92
|
const isFocused = activeElement === this._domNode.domNode;
|
|
93
93
|
if (!isFocused) {
|
|
94
94
|
return;
|
|
@@ -287,19 +287,29 @@ class LineInterval {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
class RichScreenReaderState {
|
|
290
|
-
constructor(intervals) {
|
|
290
|
+
constructor(model, intervals) {
|
|
291
291
|
this.intervals = intervals;
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
for (let i = 0; i < this.intervals.length; i++) {
|
|
298
|
-
if (this.intervals[i].startLine !== other.intervals[i].startLine || this.intervals[i].endLine !== other.intervals[i].endLine) {
|
|
299
|
-
return false;
|
|
292
|
+
let value = '';
|
|
293
|
+
for (const interval of intervals) {
|
|
294
|
+
for (let lineNumber = interval.startLine; lineNumber <= interval.endLine; lineNumber++) {
|
|
295
|
+
value += model.getLineContent(lineNumber) + '\n';
|
|
300
296
|
}
|
|
301
297
|
}
|
|
302
|
-
|
|
298
|
+
this.value = value;
|
|
299
|
+
}
|
|
300
|
+
equals(other) {
|
|
301
|
+
return this.value === other.value;
|
|
302
|
+
}
|
|
303
|
+
static get NULL() {
|
|
304
|
+
const nullModel = {
|
|
305
|
+
getLineContent: () => '',
|
|
306
|
+
getLineCount: () => 1,
|
|
307
|
+
getLineMaxColumn: () => 1,
|
|
308
|
+
getValueInRange: () => '',
|
|
309
|
+
getValueLengthInRange: () => 0,
|
|
310
|
+
modifyPosition: (position, offset) => position
|
|
311
|
+
};
|
|
312
|
+
return ( new RichScreenReaderState(nullModel, []));
|
|
303
313
|
}
|
|
304
314
|
}
|
|
305
315
|
class RichPagedScreenReaderStrategy {
|
|
@@ -322,7 +332,7 @@ class RichPagedScreenReaderStrategy {
|
|
|
322
332
|
if (selectionStartPage + 1 < selectionEndPage) {
|
|
323
333
|
lineIntervals.push({ startLine: selectionEndPageRange.startLine, endLine: selectionEndPageRange.endLine });
|
|
324
334
|
}
|
|
325
|
-
return ( new RichScreenReaderState(lineIntervals));
|
|
335
|
+
return ( new RichScreenReaderState(context, lineIntervals));
|
|
326
336
|
}
|
|
327
337
|
}
|
|
328
338
|
|
package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentSimple.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { getActiveWindow, addDisposableListener } from '../../../../../base/browser/dom.js';
|
|
3
|
+
import { getActiveElement, getActiveWindow, addDisposableListener } from '../../../../../base/browser/dom.js';
|
|
4
4
|
import { AccessibilitySupport } from '../../../../../platform/accessibility/common/accessibility.js';
|
|
5
5
|
import { IAccessibilityService } from '../../../../../platform/accessibility/common/accessibility.service.js';
|
|
6
6
|
import { EditorOption } from '../../../../common/config/editorOptions.js';
|
|
@@ -27,7 +27,7 @@ let SimpleScreenReaderContent = class SimpleScreenReaderContent extends Disposab
|
|
|
27
27
|
}
|
|
28
28
|
updateScreenReaderContent(primarySelection) {
|
|
29
29
|
const domNode = this._domNode.domNode;
|
|
30
|
-
const focusedElement =
|
|
30
|
+
const focusedElement = getActiveElement();
|
|
31
31
|
if (!focusedElement || focusedElement !== domNode) {
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
@@ -92,7 +92,7 @@ let SimpleScreenReaderContent = class SimpleScreenReaderContent extends Disposab
|
|
|
92
92
|
if (!this._state || !isScreenReaderOptimized || !IME.enabled) {
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
const activeElement =
|
|
95
|
+
const activeElement = getActiveElement();
|
|
96
96
|
const isFocused = activeElement === this._domNode.domNode;
|
|
97
97
|
if (!isFocused) {
|
|
98
98
|
return;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
max-width: 700px;
|
|
14
14
|
background: var(--vscode-editorHoverWidget-background);
|
|
15
15
|
border: 1px solid var(--vscode-editorHoverWidget-border);
|
|
16
|
-
border-radius:
|
|
16
|
+
border-radius: 5px;
|
|
17
17
|
color: var(--vscode-editorHoverWidget-foreground);
|
|
18
18
|
box-shadow: 0 2px 8px var(--vscode-widget-shadow);
|
|
19
19
|
}
|
|
@@ -35,7 +35,9 @@ export declare class ShowAllUnchangedRegions extends EditorAction2 {
|
|
|
35
35
|
}
|
|
36
36
|
export declare class RevertHunkOrSelection extends Action2 {
|
|
37
37
|
constructor();
|
|
38
|
-
run(accessor: ServicesAccessor, arg
|
|
38
|
+
run(accessor: ServicesAccessor, arg?: DiffEditorSelectionHunkToolbarContext): unknown;
|
|
39
|
+
runViaCursorOrSelection(accessor: ServicesAccessor): unknown;
|
|
40
|
+
runViaToolbarContext(accessor: ServicesAccessor, arg: DiffEditorSelectionHunkToolbarContext): unknown;
|
|
39
41
|
}
|
|
40
42
|
export declare class AccessibleDiffViewerNext extends Action2 {
|
|
41
43
|
static id: string;
|
|
@@ -152,11 +152,22 @@ class RevertHunkOrSelection extends Action2 {
|
|
|
152
152
|
super({
|
|
153
153
|
id: 'diffEditor.revert',
|
|
154
154
|
title: ( localize2(161, 'Revert')),
|
|
155
|
-
f1:
|
|
155
|
+
f1: true,
|
|
156
156
|
category: diffEditorCategory,
|
|
157
|
+
precondition: ( ContextKeyExpr.has('isInDiffEditor')),
|
|
157
158
|
});
|
|
158
159
|
}
|
|
159
160
|
run(accessor, arg) {
|
|
161
|
+
return arg ? this.runViaToolbarContext(accessor, arg) : this.runViaCursorOrSelection(accessor);
|
|
162
|
+
}
|
|
163
|
+
runViaCursorOrSelection(accessor) {
|
|
164
|
+
const diffEditor = findFocusedDiffEditor(accessor);
|
|
165
|
+
if (diffEditor instanceof DiffEditorWidget) {
|
|
166
|
+
diffEditor.revertFocusedRangeMappings();
|
|
167
|
+
}
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
170
|
+
runViaToolbarContext(accessor, arg) {
|
|
160
171
|
const diffEditor = findDiffEditor(accessor, arg.originalUri, arg.modifiedUri);
|
|
161
172
|
if (diffEditor instanceof DiffEditorWidget) {
|
|
162
173
|
diffEditor.revertRangeMappings(arg.mapping.innerChanges ?? []);
|