@codingame/monaco-vscode-api 26.2.1 → 27.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 +454 -301
- package/package.json +9 -9
- package/service-override/tools/editor.d.ts +4 -2
- package/service-override/tools/editor.js +1 -0
- package/services.d.ts +16 -1
- package/services.js +21 -4
- package/vscode/product.json.js +1 -1
- package/vscode/src/vs/base/browser/dom.d.ts +0 -15
- package/vscode/src/vs/base/browser/dom.js +3 -30
- package/vscode/src/vs/base/browser/pixelRatio.js +4 -1
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +3 -3
- package/vscode/src/vs/base/browser/ui/animations/animations.d.ts +40 -0
- package/vscode/src/vs/base/browser/ui/animations/animations.js +373 -0
- package/vscode/src/vs/base/browser/ui/button/button.js +11 -4
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/vscode/src/vs/base/browser/ui/contextview/contextview.d.ts +3 -42
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +48 -126
- package/vscode/src/vs/base/browser/ui/dialog/dialog.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/dialog/dialog.js +2 -0
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +2 -1
- package/vscode/src/vs/base/browser/ui/grid/grid.d.ts +2 -1
- package/vscode/src/vs/base/browser/ui/grid/grid.js +2 -2
- package/vscode/src/vs/base/browser/ui/grid/gridview.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +6 -2
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +11 -5
- package/vscode/src/vs/base/browser/ui/list/listView.js +9 -2
- package/vscode/src/vs/base/browser/ui/menu/menu.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/menu/menu.js +3 -3
- package/vscode/src/vs/base/browser/ui/progressbar/progressbar.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/progressbar/progressbar.js +6 -0
- package/vscode/src/vs/base/browser/ui/selectBox/selectBox.css +2 -2
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.css +4 -4
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +3 -2
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +1 -1
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +1 -1
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +5 -6
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.d.ts +3 -0
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +24 -19
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +3 -1
- package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +1 -1
- package/vscode/src/vs/base/common/actions.js +1 -1
- package/vscode/src/vs/base/common/codicons.d.ts +2 -0
- package/vscode/src/vs/base/common/codiconsLibrary.d.ts +2 -0
- package/vscode/src/vs/base/common/codiconsLibrary.js +2 -0
- package/vscode/src/vs/base/common/date.js +40 -40
- package/vscode/src/vs/base/common/defaultAccount.d.ts +5 -0
- package/vscode/src/vs/base/common/errorMessage.js +6 -6
- package/vscode/src/vs/base/common/jsonErrorMessages.js +9 -9
- package/vscode/src/vs/base/common/keyCodes.js +4 -2
- package/vscode/src/vs/base/common/keybindingLabels.js +20 -20
- package/vscode/src/vs/base/common/layout.d.ts +67 -0
- package/vscode/src/vs/base/common/layout.js +96 -0
- package/vscode/src/vs/base/common/lifecycle.d.ts +32 -0
- package/vscode/src/vs/base/common/lifecycle.js +58 -1
- package/vscode/src/vs/base/common/mime.js +7 -5
- package/vscode/src/vs/base/common/platform.d.ts +1 -0
- package/vscode/src/vs/base/common/product.d.ts +2 -0
- package/vscode/src/vs/base/common/strings.d.ts +0 -30
- package/vscode/src/vs/base/common/strings.js +0 -11
- package/vscode/src/vs/base/common/uri.js +5 -1
- package/vscode/src/vs/base/common/yaml.d.ts +29 -53
- package/vscode/src/vs/base/common/yaml.js +1119 -502
- package/vscode/src/vs/base/parts/ipc/common/ipc.js +1 -0
- package/vscode/src/vs/base/parts/ipc/common/ipc.net.js +2 -2
- package/vscode/src/vs/editor/browser/config/elementSizeObserver.d.ts +0 -1
- package/vscode/src/vs/editor/browser/config/elementSizeObserver.js +4 -8
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +1 -1
- package/vscode/src/vs/editor/browser/controller/editContext/screenReaderUtils.js +4 -4
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +1 -1
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +1 -1
- package/vscode/src/vs/editor/browser/coreCommands.js +3 -3
- package/vscode/src/vs/editor/browser/editorExtensions.js +9 -9
- package/vscode/src/vs/editor/browser/gpu/renderStrategy/fullFileRenderStrategy.js +3 -0
- package/vscode/src/vs/editor/browser/gpu/renderStrategy/viewportRenderStrategy.js +3 -0
- package/vscode/src/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/vscode/src/vs/editor/browser/observableCodeEditor.js +3 -5
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.js +4 -4
- package/vscode/src/vs/editor/browser/view/viewController.js +29 -9
- package/vscode/src/vs/editor/browser/view.d.ts +3 -1
- package/vscode/src/vs/editor/browser/view.js +10 -7
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.d.ts +3 -1
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +8 -4
- package/vscode/src/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget.d.ts +2 -1
- package/vscode/src/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget.js +4 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +12 -12
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +12 -12
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +4 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +4 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +5 -6
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +1 -1
- package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +50 -50
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +5 -3
- package/vscode/src/vs/editor/common/config/editorOptions.js +416 -383
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +72 -72
- package/vscode/src/vs/editor/common/core/edits/stringEdit.d.ts +5 -0
- package/vscode/src/vs/editor/common/core/edits/stringEdit.js +19 -21
- package/vscode/src/vs/editor/common/core/ranges/offsetRange.d.ts +4 -0
- package/vscode/src/vs/editor/common/editorContextKeys.d.ts +1 -0
- package/vscode/src/vs/editor/common/editorContextKeys.js +49 -48
- package/vscode/src/vs/editor/common/languageFeatureRegistry.d.ts +1 -0
- package/vscode/src/vs/editor/common/languageFeatureRegistry.js +8 -1
- package/vscode/src/vs/editor/common/languageSelector.d.ts +1 -0
- package/vscode/src/vs/editor/common/languageSelector.js +15 -1
- package/vscode/src/vs/editor/common/languages/modesRegistry.js +1 -1
- package/vscode/src/vs/editor/common/languages.d.ts +13 -0
- package/vscode/src/vs/editor/common/languages.js +56 -56
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js +1 -1
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.js +1 -1
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider.js +1 -1
- package/vscode/src/vs/editor/common/model/editStack.js +1 -1
- package/vscode/src/vs/editor/common/model/prefixSumComputer.js +6 -1
- package/vscode/src/vs/editor/common/model/textModel.d.ts +9 -4
- package/vscode/src/vs/editor/common/model/textModel.js +99 -34
- package/vscode/src/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.d.ts +3 -2
- package/vscode/src/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +3 -0
- package/vscode/src/vs/editor/common/model/tokens/annotations.js +9 -1
- package/vscode/src/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +2 -2
- package/vscode/src/vs/editor/common/model.d.ts +2 -1
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.d.ts +2 -1
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +1 -0
- package/vscode/src/vs/editor/common/standaloneStrings.d.ts +1 -0
- package/vscode/src/vs/editor/common/standaloneStrings.js +55 -49
- package/vscode/src/vs/editor/common/textModelEvents.d.ts +25 -5
- package/vscode/src/vs/editor/common/textModelEvents.js +13 -4
- package/vscode/src/vs/editor/common/viewLayout/lineHeights.d.ts +14 -4
- package/vscode/src/vs/editor/common/viewLayout/lineHeights.js +192 -91
- package/vscode/src/vs/editor/common/viewLayout/linesLayout.d.ts +3 -3
- package/vscode/src/vs/editor/common/viewLayout/linesLayout.js +11 -15
- package/vscode/src/vs/editor/common/viewLayout/viewLayout.d.ts +3 -3
- package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/vscode/src/vs/editor/common/viewModel/inlineDecorations.d.ts +71 -7
- package/vscode/src/vs/editor/common/viewModel/inlineDecorations.js +180 -14
- package/vscode/src/vs/editor/common/viewModel/minimapTokensColorTracker.js +8 -2
- package/vscode/src/vs/editor/common/viewModel/modelLineProjection.d.ts +2 -2
- package/vscode/src/vs/editor/common/viewModel/modelLineProjection.js +31 -82
- package/vscode/src/vs/editor/common/viewModel/viewModelDecorations.d.ts +2 -23
- package/vscode/src/vs/editor/common/viewModel/viewModelDecorations.js +19 -114
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.d.ts +11 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +174 -141
- package/vscode/src/vs/editor/common/viewModel/viewModelLines.d.ts +1 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelLines.js +16 -3
- package/vscode/src/vs/editor/common/viewModel.d.ts +6 -3
- 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 +19 -19
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.d.ts +9 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +56 -13
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.d.ts +2 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +23 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.d.ts +2 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +59 -52
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +3 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerModel.d.ts +2 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerModel.js +6 -4
- 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/colorPickerParts/colorPickerSaturationBox.js +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerStrip.js +2 -2
- 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 +5 -5
- 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.d.ts +25 -1
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +38 -20
- package/vscode/src/vs/editor/contrib/find/browser/findModel.d.ts +5 -0
- package/vscode/src/vs/editor/contrib/find/browser/findModel.js +2 -1
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.d.ts +29 -1
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +101 -33
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/vscode/src/vs/editor/contrib/folding/browser/foldingModel.d.ts +2 -1
- package/vscode/src/vs/editor/contrib/folding/browser/foldingModel.js +1 -0
- package/vscode/src/vs/editor/contrib/folding/browser/hiddenRangeModel.d.ts +2 -1
- package/vscode/src/vs/editor/contrib/folding/browser/hiddenRangeModel.js +1 -0
- 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 -13
- package/vscode/src/vs/editor/contrib/gotoError/browser/markerSelectionStatus.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/gotoError/browser/markerSelectionStatus.js +60 -0
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +33 -33
- 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 +4 -4
- 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/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 +22 -22
- package/vscode/src/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverUtils.js +8 -4
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +7 -7
- 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 +18 -18
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +5 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/common.d.ts +4 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/common.js +11 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +4 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +4 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.d.ts +6 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +41 -13
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.d.ts +10 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +44 -9
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.d.ts +18 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +79 -37
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +53 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +5 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/textModelValueReference.d.ts +30 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/textModelValueReference.js +65 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +27 -20
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.d.ts +9 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +30 -15
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.d.ts +3 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +20 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +4 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.d.ts +3 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +6 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.d.ts +4 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +17 -9
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.d.ts +7 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +74 -39
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.d.ts +6 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +3 -2
- 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.js +2 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +14 -0
- 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 +2 -2
- package/vscode/src/vs/editor/contrib/links/browser/links.js +6 -6
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +1 -1
- 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/parameterHintsModel.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 +19 -18
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/vscode/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +9 -1
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +20 -10
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- 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 +8 -8
- 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/stickyScroll/browser/stickyScrollController.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +5 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +5 -5
- package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +9 -9
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +11 -11
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestModel.js +3 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -17
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +4 -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.css +34 -34
- 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 +3 -3
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.d.ts +3 -2
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +10 -6
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.d.ts +3 -3
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +68 -65
- package/vscode/src/vs/platform/accessibility/browser/accessibilityService.d.ts +7 -0
- package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +38 -4
- package/vscode/src/vs/platform/accessibility/browser/accessibleView.d.ts +7 -1
- package/vscode/src/vs/platform/accessibility/browser/accessibleView.js +6 -0
- package/vscode/src/vs/platform/accessibility/common/accessibility.service.d.ts +2 -0
- 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.d.ts +99 -4
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +530 -56
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css +63 -13
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.d.ts +6 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +133 -10
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.service.d.ts +2 -2
- package/vscode/src/vs/platform/actions/browser/floatingMenu.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.d.ts +2 -0
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +15 -4
- package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -2
- package/vscode/src/vs/platform/actions/common/actions.d.ts +7 -1
- package/vscode/src/vs/platform/actions/common/actions.js +19 -2
- 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/configuration/common/configurationRegistry.d.ts +11 -4
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +24 -12
- package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/vscode/src/vs/platform/contextkey/common/contextkey.js +26 -12
- package/vscode/src/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/vscode/src/vs/platform/contextkey/common/scanner.js +5 -5
- package/vscode/src/vs/platform/contextview/browser/contextView.d.ts +2 -0
- package/vscode/src/vs/platform/contextview/browser/contextView.service.d.ts +2 -1
- package/vscode/src/vs/platform/defaultAccount/common/defaultAccount.d.ts +4 -1
- package/vscode/src/vs/platform/defaultAccount/common/defaultAccount.service.d.ts +4 -1
- package/vscode/src/vs/platform/dialogs/common/dialogs.js +9 -9
- package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
- package/vscode/src/vs/platform/editor/common/editor.d.ts +32 -0
- 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/environment/common/environmentService.d.ts +0 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionEnablementService.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +14 -14
- 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 +21 -21
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1 -0
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +12 -1
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +15 -4
- 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/hover/browser/hoverService.js +0 -1
- package/vscode/src/vs/platform/hover/browser/hoverWidget.js +3 -2
- package/vscode/src/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
- package/vscode/src/vs/platform/languagePacks/common/languagePacks.js +1 -1
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +3 -3
- package/vscode/src/vs/platform/list/browser/listService.js +25 -25
- 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/mcpManagementIpc.d.ts +42 -0
- package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.js +105 -0
- package/vscode/src/vs/platform/mcp/common/mcpManagementService.d.ts +130 -0
- package/vscode/src/vs/platform/mcp/common/mcpManagementService.js +665 -0
- package/vscode/src/vs/platform/mcp/common/mcpPlatformTypes.d.ts +13 -0
- package/vscode/src/vs/platform/mcp/common/modelContextProtocol.d.ts +2917 -0
- package/vscode/src/vs/platform/meteredConnection/common/meteredConnection.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/meteredConnection/common/meteredConnection.config.contribution.js +32 -0
- package/vscode/src/vs/platform/meteredConnection/common/meteredConnection.d.ts +44 -0
- package/vscode/src/vs/platform/meteredConnection/common/meteredConnection.js +62 -0
- package/vscode/src/vs/platform/meteredConnection/common/meteredConnection.service.d.ts +18 -0
- package/vscode/src/vs/platform/meteredConnection/common/meteredConnection.service.js +6 -0
- package/vscode/src/vs/platform/native/common/native.d.ts +43 -5
- package/vscode/src/vs/platform/notification/common/notification.js +3 -3
- package/vscode/src/vs/platform/observable/common/platformObservableUtils.js +10 -2
- package/vscode/src/vs/platform/product/common/product.js +3 -3
- package/vscode/src/vs/platform/quickinput/browser/media/quickInput.css +5 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/vscode/src/vs/platform/quickinput/browser/quickInputBox.d.ts +9 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputBox.js +15 -4
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +76 -12
- package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +6 -6
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +2 -2
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeController.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +14 -0
- package/vscode/src/vs/platform/remote/common/remoteHosts.d.ts +13 -0
- package/vscode/src/vs/platform/remote/common/remoteHosts.js +11 -1
- package/vscode/src/vs/platform/request/common/request.js +19 -19
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +8 -2
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +12 -2
- package/vscode/src/vs/platform/terminal/common/terminal.js +1 -0
- package/vscode/src/vs/platform/terminal/common/terminal.service.d.ts +1 -1
- package/vscode/src/vs/platform/terminal/common/terminalPlatformConfiguration.js +31 -31
- package/vscode/src/vs/platform/terminal/common/terminalProfiles.js +1 -1
- package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.d.ts +0 -13
- package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +2 -2
- package/vscode/src/vs/platform/theme/common/colorUtils.js +2 -2
- package/vscode/src/vs/platform/theme/common/colors/baseColors.js +18 -18
- 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 +51 -51
- 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 +16 -16
- 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/theme/common/sizeRegistry.d.ts +2 -0
- package/vscode/src/vs/platform/theme/common/sizeUtils.d.ts +90 -0
- package/vscode/src/vs/platform/theme/common/sizeUtils.js +142 -0
- package/vscode/src/vs/platform/theme/common/sizes/baseSizes.d.ts +11 -0
- package/vscode/src/vs/platform/theme/common/sizes/baseSizes.js +18 -0
- package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +42 -42
- package/vscode/src/vs/platform/tunnel/common/tunnel.js +4 -3
- package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/vscode/src/vs/platform/update/common/update.d.ts +14 -6
- package/vscode/src/vs/platform/update/common/update.js +4 -3
- package/vscode/src/vs/platform/update/common/update.service.d.ts +5 -2
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
- package/vscode/src/vs/platform/userDataSync/common/abstractSynchronizer.js +2 -2
- package/vscode/src/vs/platform/userDataSync/common/keybindingsSync.js +2 -2
- package/vscode/src/vs/platform/userDataSync/common/settingsSync.js +1 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncMachines.js +1 -1
- package/vscode/src/vs/platform/userInteraction/browser/userInteractionService.d.ts +25 -0
- package/vscode/src/vs/platform/userInteraction/browser/userInteractionService.service.d.ts +28 -0
- package/vscode/src/vs/platform/userInteraction/browser/userInteractionService.service.js +6 -0
- package/vscode/src/vs/platform/userInteraction/browser/userInteractionServiceImpl.d.ts +13 -0
- package/vscode/src/vs/platform/userInteraction/browser/userInteractionServiceImpl.js +62 -0
- package/vscode/src/vs/platform/window/common/window.d.ts +1 -0
- package/vscode/src/vs/platform/workspace/common/workspace.d.ts +1 -7
- package/vscode/src/vs/platform/workspace/common/workspace.js +3 -16
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.service.d.ts +47 -0
- package/vscode/src/vs/{workbench/services/layout/common/workbenchModeService.service.js → sessions/contrib/agentFeedback/browser/agentFeedbackService.service.js} +2 -2
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionTargetPicker.d.ts +64 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.service.d.ts +37 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.service.js +6 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.service.d.ts +47 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.service.js +6 -0
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +12 -12
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +121 -7
- package/vscode/src/vs/workbench/api/common/extHost.common.services.js +6 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +237 -11
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +17 -3
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +6 -5
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +7 -2
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +32 -5
- package/vscode/src/vs/workbench/api/common/extHostChatContext.js +34 -13
- package/vscode/src/vs/workbench/api/common/extHostChatDebug.d.ts +22 -0
- package/vscode/src/vs/workbench/api/common/extHostChatDebug.js +287 -0
- package/vscode/src/vs/workbench/api/common/extHostChatSessions.d.ts +4 -12
- package/vscode/src/vs/workbench/api/common/extHostChatSessions.js +158 -139
- package/vscode/src/vs/workbench/api/common/extHostComments.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDocuments.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDocuments.js +6 -6
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostGitExtensionService.d.ts +31 -0
- package/vscode/src/vs/workbench/api/common/extHostGitExtensionService.js +167 -0
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.d.ts +1 -0
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +41 -3
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +0 -3
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +4 -2
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostMcp.d.ts +4 -0
- package/vscode/src/vs/workbench/api/common/extHostMcp.js +15 -1
- package/vscode/src/vs/workbench/api/common/extHostMeteredConnection.d.ts +19 -0
- package/vscode/src/vs/workbench/api/common/extHostMeteredConnection.js +28 -0
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +6 -3
- package/vscode/src/vs/workbench/api/common/extHostPower.d.ts +45 -0
- package/vscode/src/vs/workbench/api/common/extHostPower.js +88 -0
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +3 -0
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +4 -2
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +46 -12
- package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostTextEditors.js +7 -7
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +10 -22
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.d.ts +9 -3
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +167 -14
- package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +158 -7
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +132 -7
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.d.ts +0 -1
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +3 -10
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +11 -11
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +32 -32
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +130 -130
- package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +29 -29
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +21 -21
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +4 -4
- package/vscode/src/vs/workbench/browser/contextkeys.d.ts +2 -8
- package/vscode/src/vs/workbench/browser/contextkeys.js +8 -26
- package/vscode/src/vs/workbench/browser/editor.js +2 -2
- package/vscode/src/vs/workbench/browser/labels.js +4 -4
- package/vscode/src/vs/workbench/browser/media/style.css +2 -1
- package/vscode/src/vs/workbench/browser/panecomposite.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/panecomposite.js +3 -1
- package/vscode/src/vs/workbench/browser/part.d.ts +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.d.ts +15 -4
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +112 -33
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css +26 -6
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css +1 -1
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +44 -40
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.d.ts +2 -0
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +39 -6
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +13 -13
- package/vscode/src/vs/workbench/browser/parts/compositePart.d.ts +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +23 -17
- package/vscode/src/vs/workbench/browser/parts/dialogs/dialog.d.ts +11 -0
- package/vscode/src/vs/{platform/dialogs/browser → workbench/browser/parts/dialogs}/dialog.js +12 -10
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +19 -7
- package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +37 -37
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +12 -12
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +8 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editor.d.ts +3 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editor.js +2 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +135 -135
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.d.ts +6 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +216 -20
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.d.ts +3 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +14 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +7 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +13 -13
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.d.ts +5 -5
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +10 -9
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.d.ts +9 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +79 -22
- package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +5 -5
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +66 -66
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +4 -3
- package/vscode/src/vs/workbench/browser/parts/editor/media/modalEditorPart.css +142 -0
- package/vscode/src/vs/workbench/browser/parts/editor/modalEditorPart.d.ts +65 -0
- package/vscode/src/vs/workbench/browser/parts/editor/modalEditorPart.js +407 -0
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +21 -20
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css +9 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsCenter.css +10 -0
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsToasts.css +14 -0
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.d.ts +12 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.js +49 -18
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsAlerts.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.d.ts +10 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +87 -15
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +92 -11
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsList.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsStatus.d.ts +5 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsStatus.js +58 -25
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.d.ts +8 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +62 -7
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.d.ts +3 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +24 -8
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.d.ts +3 -2
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +9 -8
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +13 -7
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +89 -68
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +38 -50
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +6 -4
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.d.ts +2 -0
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +44 -7
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +21 -21
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarActions.js +23 -14
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/media/paneviewlet.css +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/media/views.css +33 -2
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +8 -7
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.d.ts +19 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +27 -4
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +7 -5
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +178 -174
- package/vscode/src/vs/workbench/browser/parts/visibleViewContainersTracker.d.ts +29 -0
- package/vscode/src/vs/workbench/browser/parts/visibleViewContainersTracker.js +104 -0
- package/vscode/src/vs/workbench/browser/quickaccess.js +1 -1
- package/vscode/src/vs/workbench/browser/window.js +14 -14
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +317 -225
- package/vscode/src/vs/workbench/common/configuration.js +9 -9
- package/vscode/src/vs/workbench/common/contextkeys.d.ts +4 -2
- package/vscode/src/vs/workbench/common/contextkeys.js +78 -76
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +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 +1 -0
- package/vscode/src/vs/workbench/common/editor.js +4 -4
- package/vscode/src/vs/workbench/common/notifications.d.ts +11 -0
- package/vscode/src/vs/workbench/common/notifications.js +19 -1
- package/vscode/src/vs/workbench/common/theme.js +160 -160
- package/vscode/src/vs/workbench/common/views.d.ts +32 -5
- package/vscode/src/vs/workbench/common/views.js +16 -12
- package/vscode/src/vs/workbench/common/views.service.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +170 -152
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +498 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +26 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +37 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.service.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.service.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +243 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatScreenshotContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.service.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.service.d.ts +55 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileRewriter.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.js +118 -65
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.d.ts +32 -4
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.service.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModes.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModes.js +38 -11
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +122 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.service.d.ts +27 -12
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.d.ts +10 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.service.d.ts +34 -11
- package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +19 -5
- package/vscode/src/vs/workbench/contrib/chat/common/constants.js +19 -4
- package/vscode/src/vs/workbench/contrib/chat/common/contextContrib/chatContext.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/editing/chatEditingService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.d.ts +49 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +253 -32
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.service.d.ts +32 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.d.ts +11 -5
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.js +94 -12
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatQuestionCarouselData.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatQuestionCarouselData.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +298 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatUri.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatUri.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatAgents.d.ts +7 -30
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatAgents.js +10 -73
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatAgents.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.service.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +35 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookSchema.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookSchema.js +190 -89
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser.d.ts +14 -28
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser.js +95 -98
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +52 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service.d.ts +22 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptEditHelper.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptEditHelper.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +478 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +40 -2
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +19 -26
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +8 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.service.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsConfirmationService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +45 -25
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.d.ts +9 -11
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/promptTsxTypes.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/promptTsxTypes.js +12 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/input/modelPickerWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +11 -11
- 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/find/simpleFindWidget.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +35 -11
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +9 -11
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +3 -3
- 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 +6 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/common/languageConfigurationExtensionPoint.js +65 -65
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +5 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +6 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +7 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +30 -28
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +9 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +14 -14
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +16 -16
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +4 -1
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +12 -12
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +29 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +75 -75
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +9 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +38 -38
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +5 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +4 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +57 -57
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css +7 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +19 -19
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +3 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +68 -68
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +7 -9
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +1 -1
- 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/extensions/browser/abstractRuntimeExtensionsEditor.js +18 -18
- package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +49 -47
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +15 -15
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +14 -14
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +159 -147
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +181 -181
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.js +5 -5
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +29 -25
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsList.js +4 -3
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.js +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +93 -13
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +92 -91
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +24 -6
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +58 -31
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +134 -82
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extension.css +24 -3
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionEditor.css +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionsViewlet.css +29 -9
- package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionQuery.js +2 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +3 -2
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +5 -5
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -4
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +3 -3
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +8 -8
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +18 -18
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +14 -14
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +39 -39
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +84 -84
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands._save.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +27 -27
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +50 -50
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +7 -7
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +18 -17
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +7 -7
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/common/explorerModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/files/common/files.js +16 -16
- 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/git/browser/gitService.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/git/browser/gitService.js +61 -0
- package/vscode/src/vs/workbench/contrib/git/common/gitService.service.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/git/common/gitService.service.js +6 -0
- 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/browser/mcpCommandsAddConfiguration.js +71 -69
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.d.ts +259 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +1225 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.d.ts +72 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +996 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +49 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +12 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.d.ts +88 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +464 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/media/mcpServerEditor.css +94 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpConfiguration.js +118 -31
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpGatewayService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpGatewayService.service.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpGatewayService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.service.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +14 -13
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTaskManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +9 -6
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypesUtils.js +1 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocol.d.ts +1 -2917
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +23 -23
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +8 -8
- package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnection.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnection.contribution.js +55 -0
- package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnectionStatus.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnectionStatus.js +62 -0
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +19 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +2 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +29 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +3 -3
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +13 -13
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +10 -10
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +151 -57
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +16 -4
- package/vscode/src/vs/workbench/contrib/preferences/common/preferences.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +5 -6
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +21 -21
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +18 -17
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +17 -17
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +84 -84
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.d.ts +15 -2
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +28 -5
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistory.js +11 -11
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.js +6 -6
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.js +14 -14
- package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +9 -9
- package/vscode/src/vs/workbench/contrib/search/browser/media/searchview.css +3 -3
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +12 -12
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +9 -9
- package/vscode/src/vs/workbench/contrib/search/browser/searchChatContext.js +6 -6
- package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +20 -20
- package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +14 -14
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/fileMatch.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +55 -55
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +33 -10
- package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +2 -2
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +5 -5
- 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.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +6 -6
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.d.ts +17 -13
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +30 -27
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +13 -13
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +40 -40
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +17 -9
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -23
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +17 -17
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +26 -26
- package/vscode/src/vs/workbench/contrib/terminal/terminalContribExports.js +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/common/terminalAccessibilityConfiguration.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/autoReplies/common/terminalAutoRepliesConfiguration.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.js +71 -61
- package/vscode/src/vs/workbench/contrib/terminalContrib/commandGuide/common/terminalCommandGuideConfiguration.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/history/common/terminal.history.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/inlineHint/common/terminalInitialHintConfiguration.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/notification/common/terminalNotificationConfiguration.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/notification/common/terminalNotificationConfiguration.js +21 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/common/terminalStickyScrollConfiguration.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/suggest/common/terminalSuggestConfiguration.js +30 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/typeAhead/common/terminalTypeAheadConfiguration.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/zoom/common/terminal.zoom.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomains.js +6 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +6 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindAccessibilityHelp.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindAccessibilityHelp.js +118 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +10 -4
- package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +2 -2
- package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +6 -2
- package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +193 -100
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.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/authenticationService.js +11 -11
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +5 -5
- package/vscode/src/vs/workbench/services/banner/browser/bannerService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/browserElements/browser/browserElementsService.service.d.ts +2 -0
- package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.d.ts +9 -0
- package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.js +34 -17
- package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.service.d.ts +3 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +16 -16
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +1 -1
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/editor/common/editorGroupColumn.js +2 -2
- package/vscode/src/vs/workbench/services/editor/common/editorGroupFinder.d.ts +7 -7
- package/vscode/src/vs/workbench/services/editor/common/editorGroupFinder.js +39 -20
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +59 -3
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.js +6 -1
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.service.d.ts +14 -1
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +6 -1
- package/vscode/src/vs/workbench/services/editor/common/editorService.js +2 -1
- package/vscode/src/vs/workbench/services/editor/common/editorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/environment/browser/environmentService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/environment/browser/environmentService.js +9 -9
- package/vscode/src/vs/workbench/services/environment/common/environmentService.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionsIcons.js +3 -3
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +6 -6
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +10 -10
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +90 -90
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +5 -5
- package/vscode/src/vs/workbench/services/host/browser/host.d.ts +11 -0
- package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +11 -0
- package/vscode/src/vs/workbench/services/language/common/languageService.js +24 -24
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +3 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +3 -0
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.d.ts +87 -0
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.js +702 -0
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/panecomposite/browser/panecomposite.service.d.ts +3 -0
- package/vscode/src/vs/workbench/services/power/common/powerService.d.ts +12 -0
- package/vscode/src/vs/workbench/services/power/common/powerService.service.d.ts +25 -0
- package/vscode/src/vs/workbench/services/power/common/powerService.service.js +6 -0
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +2 -2
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +7 -7
- package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +1 -0
- package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +4 -4
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.d.ts +1 -1
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +13 -13
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +16 -14
- package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +9 -9
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +3 -3
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +18 -18
- package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +8 -8
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +24 -24
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -3
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +16 -16
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceEditing.d.ts +12 -0
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceEditing.service.d.ts +7 -0
- package/vscode-dts/vscode.d.ts +26 -1
- package/vscode-dts/vscode.proposed.chatContextProvider.d.ts +47 -11
- package/vscode-dts/vscode.proposed.chatDebug.d.ts +657 -0
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +92 -12
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +29 -6
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +14 -0
- package/vscode-dts/vscode.proposed.chatSessionsProvider.d.ts +90 -15
- package/vscode-dts/vscode.proposed.d.ts +4 -1
- package/vscode-dts/{vscode.proposed.envIsAppPortable.d.ts → vscode.proposed.envIsConnectionMetered.d.ts} +7 -7
- package/vscode-dts/vscode.proposed.environmentPower.d.ts +166 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +17 -0
- package/vscode-dts/vscode.proposed.mcpServerDefinitions.d.ts +28 -0
- package/vscode-dts/vscode.proposed.terminalTitle.d.ts +37 -0
- package/vscode/src/vs/platform/assignment/common/assignment.d.ts +0 -85
- package/vscode/src/vs/platform/dialogs/browser/dialog.d.ts +0 -10
- package/vscode/src/vs/workbench/services/layout/common/workbenchModeService.d.ts +0 -16
- package/vscode/src/vs/workbench/services/layout/common/workbenchModeService.js +0 -20
- package/vscode/src/vs/workbench/services/layout/common/workbenchModeService.service.d.ts +0 -27
- package/vscode/src/vs/workbench/services/views/browser/viewsService.d.ts +0 -77
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +0 -733
- /package/vscode/src/vs/{workbench/contrib → platform}/mcp/common/modelContextProtocol.js +0 -0
- /package/vscode/src/vs/workbench/contrib/url/{browser → common}/trustedDomainService.service.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/url/{browser → common}/trustedDomainService.service.js +0 -0
|
@@ -1,618 +1,1235 @@
|
|
|
1
1
|
|
|
2
|
+
import { localize } from '../../nls.js';
|
|
2
3
|
|
|
3
4
|
function parse(input, errors = [], options = {}) {
|
|
4
|
-
const
|
|
5
|
-
const
|
|
5
|
+
const scanner = ( new YamlScanner(input));
|
|
6
|
+
const tokens = scanner.scan();
|
|
7
|
+
const parser = ( new YamlParser(tokens, input, errors, options));
|
|
6
8
|
return parser.parse();
|
|
7
9
|
}
|
|
8
|
-
|
|
10
|
+
var TokenType;
|
|
11
|
+
(function(TokenType) {
|
|
12
|
+
TokenType[TokenType["Scalar"] = 0] = "Scalar";
|
|
13
|
+
TokenType[TokenType["Colon"] = 1] = "Colon";
|
|
14
|
+
TokenType[TokenType["Dash"] = 2] = "Dash";
|
|
15
|
+
TokenType[TokenType["Comma"] = 3] = "Comma";
|
|
16
|
+
TokenType[TokenType["FlowMapStart"] = 4] = "FlowMapStart";
|
|
17
|
+
TokenType[TokenType["FlowMapEnd"] = 5] = "FlowMapEnd";
|
|
18
|
+
TokenType[TokenType["FlowSeqStart"] = 6] = "FlowSeqStart";
|
|
19
|
+
TokenType[TokenType["FlowSeqEnd"] = 7] = "FlowSeqEnd";
|
|
20
|
+
TokenType[TokenType["Newline"] = 8] = "Newline";
|
|
21
|
+
TokenType[TokenType["Indent"] = 9] = "Indent";
|
|
22
|
+
TokenType[TokenType["Comment"] = 10] = "Comment";
|
|
23
|
+
TokenType[TokenType["DocumentStart"] = 11] = "DocumentStart";
|
|
24
|
+
TokenType[TokenType["DocumentEnd"] = 12] = "DocumentEnd";
|
|
25
|
+
TokenType[TokenType["EOF"] = 13] = "EOF";
|
|
26
|
+
})(TokenType || (TokenType = {}));
|
|
27
|
+
function makeToken(type, startOffset, endOffset, extra) {
|
|
9
28
|
return {
|
|
10
|
-
|
|
11
|
-
|
|
29
|
+
type,
|
|
30
|
+
startOffset,
|
|
31
|
+
endOffset,
|
|
32
|
+
rawValue: extra?.rawValue ?? "",
|
|
33
|
+
value: extra?.value ?? "",
|
|
34
|
+
format: extra?.format ?? "none",
|
|
35
|
+
indent: extra?.indent ?? 0
|
|
12
36
|
};
|
|
13
37
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
function createNumberNode(value, start, end) {
|
|
23
|
-
return {
|
|
24
|
-
type: "number",
|
|
25
|
-
value,
|
|
26
|
-
start,
|
|
27
|
-
end
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function createBooleanNode(value, start, end) {
|
|
31
|
-
return {
|
|
32
|
-
type: "boolean",
|
|
33
|
-
value,
|
|
34
|
-
start,
|
|
35
|
-
end
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function createNullNode(start, end) {
|
|
39
|
-
return {
|
|
40
|
-
type: "null",
|
|
41
|
-
value: null,
|
|
42
|
-
start,
|
|
43
|
-
end
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function createObjectNode(properties, start, end) {
|
|
47
|
-
return {
|
|
48
|
-
type: "object",
|
|
49
|
-
start,
|
|
50
|
-
end,
|
|
51
|
-
properties
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function createArrayNode(items, start, end) {
|
|
55
|
-
return {
|
|
56
|
-
type: "array",
|
|
57
|
-
start,
|
|
58
|
-
end,
|
|
59
|
-
items
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function isWhitespace(char) {
|
|
63
|
-
return char === " " || char === "\t";
|
|
64
|
-
}
|
|
65
|
-
function isValidNumber(value) {
|
|
66
|
-
return /^-?\d*\.?\d+$/.test(value);
|
|
67
|
-
}
|
|
68
|
-
class YamlLexer {
|
|
69
|
-
constructor(lines) {
|
|
70
|
-
this.currentLine = 0;
|
|
71
|
-
this.currentChar = 0;
|
|
72
|
-
this.lines = lines;
|
|
38
|
+
class YamlScanner {
|
|
39
|
+
constructor(input) {
|
|
40
|
+
this.input = input;
|
|
41
|
+
this.pos = 0;
|
|
42
|
+
this.tokens = [];
|
|
43
|
+
this.flowDepth = 0;
|
|
44
|
+
this.seenBlockColon = false;
|
|
73
45
|
}
|
|
74
|
-
|
|
75
|
-
|
|
46
|
+
scan() {
|
|
47
|
+
while (this.pos < this.input.length) {
|
|
48
|
+
this.scanLine();
|
|
49
|
+
}
|
|
50
|
+
this.tokens.push(makeToken(TokenType.EOF, this.pos, this.pos));
|
|
51
|
+
return this.tokens;
|
|
76
52
|
}
|
|
77
|
-
|
|
78
|
-
|
|
53
|
+
scanLine() {
|
|
54
|
+
this.seenBlockColon = false;
|
|
55
|
+
if (this.peekChar() === "\n") {
|
|
56
|
+
this.tokens.push(makeToken(TokenType.Newline, this.pos, this.pos + 1));
|
|
57
|
+
this.pos++;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (this.peekChar() === "\r") {
|
|
61
|
+
const end = this.pos + (this.input[this.pos + 1] === "\n" ? 2 : 1);
|
|
62
|
+
this.tokens.push(makeToken(TokenType.Newline, this.pos, end));
|
|
63
|
+
this.pos = end;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const indentStart = this.pos;
|
|
67
|
+
let indent = 0;
|
|
68
|
+
while (this.pos < this.input.length && (this.input[this.pos] === " " || this.input[this.pos] === "\t")) {
|
|
69
|
+
indent++;
|
|
70
|
+
this.pos++;
|
|
71
|
+
}
|
|
72
|
+
if (indent > 0) {
|
|
73
|
+
this.tokens.push(makeToken(TokenType.Indent, indentStart, this.pos, {
|
|
74
|
+
indent
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
if (this.pos >= this.input.length || this.peekChar() === "\n" || this.peekChar() === "\r") {
|
|
78
|
+
if (this.pos < this.input.length) {
|
|
79
|
+
const nlStart = this.pos;
|
|
80
|
+
const end = this.peekChar() === "\r" && this.input[this.pos + 1] === "\n" ? this.pos + 2 : this.pos + 1;
|
|
81
|
+
this.tokens.push(makeToken(TokenType.Newline, nlStart, end));
|
|
82
|
+
this.pos = end;
|
|
83
|
+
}
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (indent === 0 && this.input.length - this.pos >= 3) {
|
|
87
|
+
const c0 = this.input[this.pos];
|
|
88
|
+
const c1 = this.input[this.pos + 1];
|
|
89
|
+
const c2 = this.input[this.pos + 2];
|
|
90
|
+
const c3 = this.input[this.pos + 3];
|
|
91
|
+
const isTerminator = c3 === undefined || c3 === " " || c3 === "\t" || c3 === "\n" || c3 === "\r";
|
|
92
|
+
if (c0 === "-" && c1 === "-" && c2 === "-" && isTerminator) {
|
|
93
|
+
this.tokens.push(makeToken(TokenType.DocumentStart, this.pos, this.pos + 3));
|
|
94
|
+
this.pos += 3;
|
|
95
|
+
this.scanLineContent();
|
|
96
|
+
this.scanNewline();
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (c0 === "." && c1 === "." && c2 === "." && isTerminator) {
|
|
100
|
+
this.tokens.push(makeToken(TokenType.DocumentEnd, this.pos, this.pos + 3));
|
|
101
|
+
this.pos += 3;
|
|
102
|
+
this.scanLineContent();
|
|
103
|
+
this.scanNewline();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (this.peekChar() === "#") {
|
|
108
|
+
this.scanComment();
|
|
109
|
+
this.scanNewline();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (this.peekChar() === "%") {
|
|
113
|
+
while (this.pos < this.input.length && this.input[this.pos] !== "\n" && this.input[this.pos] !== "\r") {
|
|
114
|
+
this.pos++;
|
|
115
|
+
}
|
|
116
|
+
this.scanNewline();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this.scanLineContent();
|
|
120
|
+
this.scanNewline();
|
|
79
121
|
}
|
|
80
|
-
|
|
81
|
-
|
|
122
|
+
scanLineContent() {
|
|
123
|
+
while (this.pos < this.input.length && this.peekChar() !== "\n" && this.peekChar() !== "\r") {
|
|
124
|
+
this.skipInlineWhitespace();
|
|
125
|
+
if (this.pos >= this.input.length || this.peekChar() === "\n" || this.peekChar() === "\r") {
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
const ch = this.peekChar();
|
|
129
|
+
if (ch === "#") {
|
|
130
|
+
this.scanComment();
|
|
131
|
+
break;
|
|
132
|
+
} else if (ch === "{") {
|
|
133
|
+
this.flowDepth++;
|
|
134
|
+
this.tokens.push(makeToken(TokenType.FlowMapStart, this.pos, this.pos + 1));
|
|
135
|
+
this.pos++;
|
|
136
|
+
} else if (ch === "}" && this.flowDepth > 0) {
|
|
137
|
+
this.flowDepth--;
|
|
138
|
+
this.tokens.push(makeToken(TokenType.FlowMapEnd, this.pos, this.pos + 1));
|
|
139
|
+
this.pos++;
|
|
140
|
+
} else if (ch === "[") {
|
|
141
|
+
this.flowDepth++;
|
|
142
|
+
this.tokens.push(makeToken(TokenType.FlowSeqStart, this.pos, this.pos + 1));
|
|
143
|
+
this.pos++;
|
|
144
|
+
} else if (ch === "]" && this.flowDepth > 0) {
|
|
145
|
+
this.flowDepth--;
|
|
146
|
+
this.tokens.push(makeToken(TokenType.FlowSeqEnd, this.pos, this.pos + 1));
|
|
147
|
+
this.pos++;
|
|
148
|
+
} else if (ch === "," && this.flowDepth > 0) {
|
|
149
|
+
this.tokens.push(makeToken(TokenType.Comma, this.pos, this.pos + 1));
|
|
150
|
+
this.pos++;
|
|
151
|
+
} else if (ch === "-" && this.isBlockDash()) {
|
|
152
|
+
this.tokens.push(makeToken(TokenType.Dash, this.pos, this.pos + 1));
|
|
153
|
+
this.pos++;
|
|
154
|
+
} else if (ch === ":" && this.isBlockColon()) {
|
|
155
|
+
this.tokens.push(makeToken(TokenType.Colon, this.pos, this.pos + 1));
|
|
156
|
+
this.pos++;
|
|
157
|
+
if (this.flowDepth === 0) {
|
|
158
|
+
this.seenBlockColon = true;
|
|
159
|
+
}
|
|
160
|
+
} else if (ch === ":" && this.flowDepth > 0 && this.lastTokenIsJsonLike()) {
|
|
161
|
+
this.tokens.push(makeToken(TokenType.Colon, this.pos, this.pos + 1));
|
|
162
|
+
this.pos++;
|
|
163
|
+
} else if (ch === "'" || ch === "\"") {
|
|
164
|
+
this.scanQuotedScalar(ch);
|
|
165
|
+
} else if ((ch === "|" || ch === ">") && this.flowDepth === 0 && this.isBlockScalarStart()) {
|
|
166
|
+
this.scanBlockScalar(ch);
|
|
167
|
+
break;
|
|
168
|
+
} else {
|
|
169
|
+
this.scanUnquotedScalar();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
82
172
|
}
|
|
83
|
-
|
|
84
|
-
|
|
173
|
+
isBlockDash() {
|
|
174
|
+
const next = this.input[this.pos + 1];
|
|
175
|
+
return next === undefined || next === " " || next === "\t" || next === "\n" || next === "\r";
|
|
85
176
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
177
|
+
isBlockColon() {
|
|
178
|
+
if (this.seenBlockColon && this.flowDepth === 0) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
const next = this.input[this.pos + 1];
|
|
182
|
+
if (next === undefined || next === " " || next === "\t" || next === "\n" || next === "\r") {
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
if (this.flowDepth > 0 && (next === "," || next === "}" || next === "]")) {
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
return false;
|
|
91
189
|
}
|
|
92
|
-
|
|
93
|
-
this.
|
|
94
|
-
|
|
190
|
+
lastTokenIsJsonLike() {
|
|
191
|
+
for (let i = this.tokens.length - 1; i >= 0; i--) {
|
|
192
|
+
const t = this.tokens[i];
|
|
193
|
+
if (t.type === TokenType.Newline || t.type === TokenType.Indent || t.type === TokenType.Comment) {
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (t.type === TokenType.Scalar && t.format !== "none") {
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
if (t.type === TokenType.FlowMapEnd || t.type === TokenType.FlowSeqEnd) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
return false;
|
|
95
205
|
}
|
|
96
|
-
|
|
97
|
-
|
|
206
|
+
scanQuotedScalar(quote) {
|
|
207
|
+
const start = this.pos;
|
|
208
|
+
this.pos++;
|
|
209
|
+
let value = "";
|
|
210
|
+
let trailingLiteralWs = 0;
|
|
211
|
+
while (this.pos < this.input.length) {
|
|
212
|
+
const ch = this.input[this.pos];
|
|
213
|
+
if (ch === quote) {
|
|
214
|
+
if (quote === "'" && this.input[this.pos + 1] === "'") {
|
|
215
|
+
value += "'";
|
|
216
|
+
this.pos += 2;
|
|
217
|
+
trailingLiteralWs = 0;
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
this.pos++;
|
|
221
|
+
const rawValue = this.input.substring(start, this.pos);
|
|
222
|
+
this.tokens.push(makeToken(TokenType.Scalar, start, this.pos, {
|
|
223
|
+
rawValue,
|
|
224
|
+
value,
|
|
225
|
+
format: quote === "'" ? "single" : "double"
|
|
226
|
+
}));
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
if (quote === "\"" && ch === "\\") {
|
|
230
|
+
const next = this.input[this.pos + 1];
|
|
231
|
+
if (next === "\n" || next === "\r") {
|
|
232
|
+
this.pos++;
|
|
233
|
+
this.consumeNewline();
|
|
234
|
+
this.skipInlineWhitespace();
|
|
235
|
+
trailingLiteralWs = 0;
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
switch (next) {
|
|
239
|
+
case "n":
|
|
240
|
+
value += "\n";
|
|
241
|
+
break;
|
|
242
|
+
case "t":
|
|
243
|
+
value += "\t";
|
|
244
|
+
break;
|
|
245
|
+
case "\\":
|
|
246
|
+
value += "\\";
|
|
247
|
+
break;
|
|
248
|
+
case "\"":
|
|
249
|
+
value += "\"";
|
|
250
|
+
break;
|
|
251
|
+
case "/":
|
|
252
|
+
value += "/";
|
|
253
|
+
break;
|
|
254
|
+
case "r":
|
|
255
|
+
value += "\r";
|
|
256
|
+
break;
|
|
257
|
+
case "0":
|
|
258
|
+
value += "\u0000";
|
|
259
|
+
break;
|
|
260
|
+
case "a":
|
|
261
|
+
value += "\u0007";
|
|
262
|
+
break;
|
|
263
|
+
case "b":
|
|
264
|
+
value += "\b";
|
|
265
|
+
break;
|
|
266
|
+
case "e":
|
|
267
|
+
value += "\u001b";
|
|
268
|
+
break;
|
|
269
|
+
case "v":
|
|
270
|
+
value += "\u000b";
|
|
271
|
+
break;
|
|
272
|
+
case "f":
|
|
273
|
+
value += "\f";
|
|
274
|
+
break;
|
|
275
|
+
case " ":
|
|
276
|
+
value += " ";
|
|
277
|
+
break;
|
|
278
|
+
case "_":
|
|
279
|
+
value += " ";
|
|
280
|
+
break;
|
|
281
|
+
case "x":
|
|
282
|
+
{
|
|
283
|
+
const hex = this.input.substring(this.pos + 2, this.pos + 4);
|
|
284
|
+
const code = parseInt(hex, 16);
|
|
285
|
+
if (hex.length === 2 && !isNaN(code)) {
|
|
286
|
+
value += String.fromCharCode(code);
|
|
287
|
+
this.pos += 4;
|
|
288
|
+
} else {
|
|
289
|
+
value += "\\x";
|
|
290
|
+
this.pos += 2;
|
|
291
|
+
}
|
|
292
|
+
trailingLiteralWs = 0;
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
case "u":
|
|
296
|
+
{
|
|
297
|
+
const hex = this.input.substring(this.pos + 2, this.pos + 6);
|
|
298
|
+
const code = parseInt(hex, 16);
|
|
299
|
+
if (hex.length === 4 && !isNaN(code)) {
|
|
300
|
+
value += String.fromCodePoint(code);
|
|
301
|
+
this.pos += 6;
|
|
302
|
+
} else {
|
|
303
|
+
value += "\\u";
|
|
304
|
+
this.pos += 2;
|
|
305
|
+
}
|
|
306
|
+
trailingLiteralWs = 0;
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
case "U":
|
|
310
|
+
{
|
|
311
|
+
const hex = this.input.substring(this.pos + 2, this.pos + 10);
|
|
312
|
+
const code = parseInt(hex, 16);
|
|
313
|
+
if (hex.length === 8 && !isNaN(code)) {
|
|
314
|
+
value += String.fromCodePoint(code);
|
|
315
|
+
this.pos += 10;
|
|
316
|
+
} else {
|
|
317
|
+
value += "\\U";
|
|
318
|
+
this.pos += 2;
|
|
319
|
+
}
|
|
320
|
+
trailingLiteralWs = 0;
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
default:
|
|
324
|
+
value += "\\" + (next ?? "");
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
this.pos += 2;
|
|
328
|
+
trailingLiteralWs = 0;
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
if (ch === "\n" || ch === "\r") {
|
|
332
|
+
if (trailingLiteralWs > 0) {
|
|
333
|
+
value = value.substring(0, value.length - trailingLiteralWs);
|
|
334
|
+
}
|
|
335
|
+
trailingLiteralWs = 0;
|
|
336
|
+
this.consumeNewline();
|
|
337
|
+
let emptyLineCount = 0;
|
|
338
|
+
while (this.pos < this.input.length) {
|
|
339
|
+
this.skipInlineWhitespace();
|
|
340
|
+
const c = this.input[this.pos];
|
|
341
|
+
if (c === "\n" || c === "\r") {
|
|
342
|
+
emptyLineCount++;
|
|
343
|
+
this.consumeNewline();
|
|
344
|
+
} else {
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
if (emptyLineCount > 0) {
|
|
349
|
+
value += "\n".repeat(emptyLineCount);
|
|
350
|
+
} else {
|
|
351
|
+
value += " ";
|
|
352
|
+
}
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
if (ch === " " || ch === "\t") {
|
|
356
|
+
trailingLiteralWs++;
|
|
357
|
+
} else {
|
|
358
|
+
trailingLiteralWs = 0;
|
|
359
|
+
}
|
|
360
|
+
value += ch;
|
|
361
|
+
this.pos++;
|
|
362
|
+
}
|
|
363
|
+
const rawValue = this.input.substring(start, this.pos);
|
|
364
|
+
this.tokens.push(makeToken(TokenType.Scalar, start, this.pos, {
|
|
365
|
+
rawValue,
|
|
366
|
+
value,
|
|
367
|
+
format: quote === "'" ? "single" : "double"
|
|
368
|
+
}));
|
|
98
369
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
370
|
+
scanUnquotedScalar() {
|
|
371
|
+
const start = this.pos;
|
|
372
|
+
let end = this.pos;
|
|
373
|
+
while (this.pos < this.input.length) {
|
|
374
|
+
const ch = this.input[this.pos];
|
|
375
|
+
if (ch === "\n" || ch === "\r") {
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
if (this.flowDepth > 0 && (ch === "," || ch === "}" || ch === "]")) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
if (this.flowDepth > 0 && (ch === "{" || ch === "[")) {
|
|
382
|
+
break;
|
|
383
|
+
}
|
|
384
|
+
if (ch === ":" && this.isBlockColon()) {
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
if (ch === "#" && this.pos > start && (this.input[this.pos - 1] === " " || this.input[this.pos - 1] === "\t")) {
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
this.pos++;
|
|
391
|
+
if (ch !== " " && ch !== "\t") {
|
|
392
|
+
end = this.pos;
|
|
393
|
+
}
|
|
102
394
|
}
|
|
103
|
-
|
|
395
|
+
const rawValue = this.input.substring(start, end);
|
|
396
|
+
this.tokens.push(makeToken(TokenType.Scalar, start, end, {
|
|
397
|
+
rawValue,
|
|
398
|
+
value: rawValue,
|
|
399
|
+
format: "none"
|
|
400
|
+
}));
|
|
104
401
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
402
|
+
isBlockScalarStart() {
|
|
403
|
+
let p = this.pos + 1;
|
|
404
|
+
while (p < this.input.length) {
|
|
405
|
+
const c = this.input[p];
|
|
406
|
+
if (c >= "1" && c <= "9") {
|
|
407
|
+
p++;
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
if (c === "+" || c === "-") {
|
|
411
|
+
p++;
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
while (p < this.input.length && (this.input[p] === " " || this.input[p] === "\t")) {
|
|
417
|
+
p++;
|
|
109
418
|
}
|
|
110
|
-
|
|
419
|
+
if (p >= this.input.length) {
|
|
420
|
+
return true;
|
|
421
|
+
}
|
|
422
|
+
const c = this.input[p];
|
|
423
|
+
return c === "\n" || c === "\r" || c === "#";
|
|
111
424
|
}
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
425
|
+
scanBlockScalar(style) {
|
|
426
|
+
const start = this.pos;
|
|
427
|
+
this.pos++;
|
|
428
|
+
let explicitIndent = 0;
|
|
429
|
+
let chomping = "clip";
|
|
430
|
+
for (let i = 0; i < 2; i++) {
|
|
431
|
+
if (this.pos < this.input.length) {
|
|
432
|
+
const c = this.input[this.pos];
|
|
433
|
+
if (c >= "1" && c <= "9" && explicitIndent === 0) {
|
|
434
|
+
explicitIndent = parseInt(c, 10);
|
|
435
|
+
this.pos++;
|
|
436
|
+
} else if (c === "-" && chomping === "clip") {
|
|
437
|
+
chomping = "strip";
|
|
438
|
+
this.pos++;
|
|
439
|
+
} else if (c === "+" && chomping === "clip") {
|
|
440
|
+
chomping = "keep";
|
|
441
|
+
this.pos++;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
while (this.pos < this.input.length && (this.input[this.pos] === " " || this.input[this.pos] === "\t")) {
|
|
446
|
+
this.pos++;
|
|
447
|
+
}
|
|
448
|
+
if (this.pos < this.input.length && this.input[this.pos] === "#") {
|
|
449
|
+
while (this.pos < this.input.length && this.input[this.pos] !== "\n" && this.input[this.pos] !== "\r") {
|
|
450
|
+
this.pos++;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
this.consumeNewline();
|
|
454
|
+
const parentBlockIndent = this.getParentBlockIndent(start);
|
|
455
|
+
let contentIndent = explicitIndent > 0 ? parentBlockIndent + explicitIndent : 0;
|
|
456
|
+
const lines = [];
|
|
457
|
+
let trailingNewlines = 0;
|
|
458
|
+
while (this.pos < this.input.length) {
|
|
459
|
+
const lineStart = this.pos;
|
|
460
|
+
let lineIndent = 0;
|
|
461
|
+
while (this.pos < this.input.length && this.input[this.pos] === " ") {
|
|
462
|
+
lineIndent++;
|
|
463
|
+
this.pos++;
|
|
464
|
+
}
|
|
465
|
+
if (this.pos >= this.input.length || this.input[this.pos] === "\n" || this.input[this.pos] === "\r") {
|
|
466
|
+
if (contentIndent > 0 && lineIndent >= contentIndent) {
|
|
467
|
+
const preserved = this.input.substring(lineStart + contentIndent, this.pos);
|
|
468
|
+
lines.push(preserved);
|
|
469
|
+
if (preserved === "") {
|
|
470
|
+
trailingNewlines++;
|
|
471
|
+
} else {
|
|
472
|
+
trailingNewlines = 0;
|
|
473
|
+
}
|
|
474
|
+
} else {
|
|
475
|
+
lines.push("");
|
|
476
|
+
trailingNewlines++;
|
|
477
|
+
}
|
|
478
|
+
this.consumeNewline();
|
|
479
|
+
continue;
|
|
480
|
+
}
|
|
481
|
+
if (lineIndent === 0 && this.input.length - this.pos >= 3) {
|
|
482
|
+
const c0 = this.input[this.pos];
|
|
483
|
+
const c1 = this.input[this.pos + 1];
|
|
484
|
+
const c2 = this.input[this.pos + 2];
|
|
485
|
+
const c3 = this.input[this.pos + 3];
|
|
486
|
+
const isTerm = c3 === undefined || c3 === " " || c3 === "\t" || c3 === "\n" || c3 === "\r";
|
|
487
|
+
if ((c0 === "-" && c1 === "-" && c2 === "-" && isTerm) || (c0 === "." && c1 === "." && c2 === "." && isTerm)) {
|
|
488
|
+
this.pos = lineStart;
|
|
489
|
+
break;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
if (contentIndent === 0) {
|
|
493
|
+
if (lineIndent <= parentBlockIndent) {
|
|
494
|
+
this.pos = lineStart;
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
contentIndent = lineIndent;
|
|
498
|
+
}
|
|
499
|
+
if (lineIndent < contentIndent) {
|
|
500
|
+
this.pos = lineStart;
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
const contentStart = lineStart + contentIndent;
|
|
504
|
+
while (this.pos < this.input.length && this.input[this.pos] !== "\n" && this.input[this.pos] !== "\r") {
|
|
505
|
+
this.pos++;
|
|
506
|
+
}
|
|
507
|
+
const lineContent = this.input.substring(contentStart, this.pos);
|
|
508
|
+
lines.push(lineContent);
|
|
509
|
+
trailingNewlines = 0;
|
|
510
|
+
this.consumeNewline();
|
|
511
|
+
}
|
|
512
|
+
let value;
|
|
513
|
+
if (style === "|") {
|
|
514
|
+
value = lines.join("\n");
|
|
117
515
|
} else {
|
|
118
|
-
|
|
516
|
+
value = "";
|
|
517
|
+
let lastNonEmptyIsMoreIndented = false;
|
|
518
|
+
let inEmptyRun = false;
|
|
519
|
+
let seenNonEmpty = false;
|
|
520
|
+
for (let i = 0; i < lines.length; i++) {
|
|
521
|
+
const line = lines[i];
|
|
522
|
+
const isMoreIndented = line.length > 0 && (line[0] === " " || line[0] === "\t");
|
|
523
|
+
if (line === "") {
|
|
524
|
+
value += "\n";
|
|
525
|
+
inEmptyRun = true;
|
|
526
|
+
} else if (i === 0) {
|
|
527
|
+
value = line;
|
|
528
|
+
lastNonEmptyIsMoreIndented = isMoreIndented;
|
|
529
|
+
seenNonEmpty = true;
|
|
530
|
+
} else if (inEmptyRun) {
|
|
531
|
+
if ((lastNonEmptyIsMoreIndented || isMoreIndented) && seenNonEmpty) {
|
|
532
|
+
value += "\n" + line;
|
|
533
|
+
} else {
|
|
534
|
+
value += line;
|
|
535
|
+
}
|
|
536
|
+
lastNonEmptyIsMoreIndented = isMoreIndented;
|
|
537
|
+
inEmptyRun = false;
|
|
538
|
+
seenNonEmpty = true;
|
|
539
|
+
} else if (isMoreIndented || lastNonEmptyIsMoreIndented) {
|
|
540
|
+
value += "\n" + line;
|
|
541
|
+
lastNonEmptyIsMoreIndented = isMoreIndented;
|
|
542
|
+
seenNonEmpty = true;
|
|
543
|
+
} else {
|
|
544
|
+
value += " " + line;
|
|
545
|
+
lastNonEmptyIsMoreIndented = false;
|
|
546
|
+
seenNonEmpty = true;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
if (trailingNewlines > 0) {
|
|
551
|
+
let end = value.length;
|
|
552
|
+
while (end > 0 && value[end - 1] === "\n") {
|
|
553
|
+
end--;
|
|
554
|
+
}
|
|
555
|
+
value = value.substring(0, end);
|
|
119
556
|
}
|
|
120
|
-
|
|
557
|
+
const hasContent = ( lines.some(l => l !== ""));
|
|
558
|
+
switch (chomping) {
|
|
559
|
+
case "clip":
|
|
560
|
+
if (hasContent) {
|
|
561
|
+
value += "\n";
|
|
562
|
+
}
|
|
563
|
+
break;
|
|
564
|
+
case "keep":
|
|
565
|
+
if (hasContent) {
|
|
566
|
+
value += "\n".repeat(trailingNewlines + 1);
|
|
567
|
+
} else {
|
|
568
|
+
value = "\n".repeat(trailingNewlines);
|
|
569
|
+
}
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
const rawValue = this.input.substring(start, this.pos);
|
|
573
|
+
this.tokens.push(makeToken(TokenType.Scalar, start, this.pos, {
|
|
574
|
+
rawValue,
|
|
575
|
+
value,
|
|
576
|
+
format: style === "|" ? "literal" : "folded"
|
|
577
|
+
}));
|
|
121
578
|
}
|
|
122
|
-
|
|
123
|
-
this.
|
|
124
|
-
|
|
579
|
+
getParentBlockIndent(blockScalarPos) {
|
|
580
|
+
for (let i = this.tokens.length - 1; i >= 0; i--) {
|
|
581
|
+
const t = this.tokens[i];
|
|
582
|
+
if (t.type === TokenType.Newline || t.type === TokenType.Comment || t.type === TokenType.Indent) {
|
|
583
|
+
continue;
|
|
584
|
+
}
|
|
585
|
+
if (t.type === TokenType.Colon) {
|
|
586
|
+
for (let j = i - 1; j >= 0; j--) {
|
|
587
|
+
const kt = this.tokens[j];
|
|
588
|
+
if (kt.type === TokenType.Newline || kt.type === TokenType.Comment || kt.type === TokenType.Indent) {
|
|
589
|
+
continue;
|
|
590
|
+
}
|
|
591
|
+
return this.getColumnAt(kt.startOffset);
|
|
592
|
+
}
|
|
593
|
+
return 0;
|
|
594
|
+
}
|
|
595
|
+
if (t.type === TokenType.Dash) {
|
|
596
|
+
return this.getColumnAt(t.startOffset);
|
|
597
|
+
}
|
|
598
|
+
if (t.type === TokenType.DocumentStart) {
|
|
599
|
+
return -1;
|
|
600
|
+
}
|
|
601
|
+
break;
|
|
602
|
+
}
|
|
603
|
+
return 0;
|
|
125
604
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
605
|
+
getColumnAt(offset) {
|
|
606
|
+
let col = 0;
|
|
607
|
+
let p = offset - 1;
|
|
608
|
+
while (p >= 0 && this.input[p] !== "\n" && this.input[p] !== "\r") {
|
|
609
|
+
col++;
|
|
610
|
+
p--;
|
|
129
611
|
}
|
|
612
|
+
return col;
|
|
130
613
|
}
|
|
131
|
-
|
|
132
|
-
|
|
614
|
+
scanComment() {
|
|
615
|
+
const start = this.pos;
|
|
616
|
+
while (this.pos < this.input.length && this.input[this.pos] !== "\n" && this.input[this.pos] !== "\r") {
|
|
617
|
+
this.pos++;
|
|
618
|
+
}
|
|
619
|
+
this.tokens.push(makeToken(TokenType.Comment, start, this.pos, {
|
|
620
|
+
rawValue: this.input.substring(start, this.pos),
|
|
621
|
+
value: this.input.substring(start, this.pos)
|
|
622
|
+
}));
|
|
133
623
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
624
|
+
scanNewline() {
|
|
625
|
+
const start = this.pos;
|
|
626
|
+
if (this.consumeNewline()) {
|
|
627
|
+
this.tokens.push(makeToken(TokenType.Newline, start, this.pos));
|
|
137
628
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
629
|
+
}
|
|
630
|
+
skipInlineWhitespace() {
|
|
631
|
+
while (this.pos < this.input.length) {
|
|
632
|
+
const ch = this.input[this.pos];
|
|
633
|
+
if (ch === " " || ch === "\t") {
|
|
634
|
+
this.pos++;
|
|
144
635
|
} else {
|
|
145
636
|
break;
|
|
146
637
|
}
|
|
147
638
|
}
|
|
148
|
-
return indent;
|
|
149
639
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const remainingLine = this.lines[this.currentLine].substring(this.currentChar).trim();
|
|
154
|
-
if (remainingLine.length > 0 && !remainingLine.startsWith("#")) {
|
|
155
|
-
this.skipWhitespace();
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
this.currentLine++;
|
|
160
|
-
this.currentChar = 0;
|
|
161
|
-
if (this.currentLine < this.lines.length) {
|
|
162
|
-
const line = this.lines[this.currentLine].trim();
|
|
163
|
-
if (line.length > 0 && !line.startsWith("#")) {
|
|
164
|
-
this.skipWhitespace();
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
640
|
+
consumeNewline() {
|
|
641
|
+
if (this.pos >= this.input.length) {
|
|
642
|
+
return false;
|
|
168
643
|
}
|
|
644
|
+
if (this.input[this.pos] === "\r" && this.input[this.pos + 1] === "\n") {
|
|
645
|
+
this.pos += 2;
|
|
646
|
+
return true;
|
|
647
|
+
}
|
|
648
|
+
if (this.input[this.pos] === "\n" || this.input[this.pos] === "\r") {
|
|
649
|
+
this.pos++;
|
|
650
|
+
return true;
|
|
651
|
+
}
|
|
652
|
+
return false;
|
|
653
|
+
}
|
|
654
|
+
peekChar() {
|
|
655
|
+
return this.input[this.pos];
|
|
169
656
|
}
|
|
170
657
|
}
|
|
171
658
|
class YamlParser {
|
|
172
|
-
constructor(
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
659
|
+
constructor(tokens, input, errors, options) {
|
|
660
|
+
this.tokens = tokens;
|
|
661
|
+
this.input = input;
|
|
175
662
|
this.errors = errors;
|
|
176
663
|
this.options = options;
|
|
664
|
+
this.pos = 0;
|
|
177
665
|
}
|
|
178
|
-
|
|
179
|
-
this.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
end
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
parseValue(expectedIndent) {
|
|
187
|
-
this.lexer.skipWhitespace();
|
|
188
|
-
if (this.lexer.isAtEnd()) {
|
|
189
|
-
const pos = this.lexer.getCurrentPosition();
|
|
190
|
-
return createStringNode("", pos, pos);
|
|
666
|
+
parse() {
|
|
667
|
+
this.skipNewlinesAndComments();
|
|
668
|
+
if (this.currentToken().type === TokenType.DocumentStart) {
|
|
669
|
+
this.advance();
|
|
670
|
+
this.skipNewlinesAndComments();
|
|
191
671
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
return this.parseQuotedString(char);
|
|
672
|
+
if (this.currentToken().type === TokenType.EOF || this.currentToken().type === TokenType.DocumentEnd) {
|
|
673
|
+
return undefined;
|
|
195
674
|
}
|
|
196
|
-
|
|
197
|
-
|
|
675
|
+
const result = this.parseValue(-1);
|
|
676
|
+
return result;
|
|
677
|
+
}
|
|
678
|
+
currentToken() {
|
|
679
|
+
return this.tokens[this.pos];
|
|
680
|
+
}
|
|
681
|
+
peek(offset = 0) {
|
|
682
|
+
return this.tokens[Math.min(this.pos + offset, this.tokens.length - 1)];
|
|
683
|
+
}
|
|
684
|
+
advance() {
|
|
685
|
+
const t = this.tokens[this.pos];
|
|
686
|
+
if (t.type !== TokenType.EOF) {
|
|
687
|
+
this.pos++;
|
|
198
688
|
}
|
|
199
|
-
|
|
200
|
-
|
|
689
|
+
return t;
|
|
690
|
+
}
|
|
691
|
+
expect(type) {
|
|
692
|
+
const t = this.currentToken();
|
|
693
|
+
if (t.type === type) {
|
|
694
|
+
return this.advance();
|
|
201
695
|
}
|
|
202
|
-
return
|
|
696
|
+
return t;
|
|
203
697
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
698
|
+
emitError(message, startOffset, endOffset, code) {
|
|
699
|
+
this.errors.push({
|
|
700
|
+
message,
|
|
701
|
+
startOffset,
|
|
702
|
+
endOffset,
|
|
703
|
+
code
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
skipNewlinesAndComments() {
|
|
707
|
+
while (this.currentToken().type === TokenType.Newline || this.currentToken().type === TokenType.Comment || (this.currentToken().type === TokenType.Indent && this.isFollowedByNewlineOrComment())) {
|
|
708
|
+
this.advance();
|
|
210
709
|
}
|
|
211
|
-
|
|
212
|
-
|
|
710
|
+
}
|
|
711
|
+
isFollowedByNewlineOrComment() {
|
|
712
|
+
const next = this.peek(1);
|
|
713
|
+
return next.type === TokenType.Newline || next.type === TokenType.Comment || next.type === TokenType.EOF;
|
|
714
|
+
}
|
|
715
|
+
currentIndent() {
|
|
716
|
+
if (this.currentToken().type === TokenType.Indent) {
|
|
717
|
+
return this.currentToken().indent;
|
|
213
718
|
}
|
|
214
|
-
|
|
215
|
-
return createStringNode(value, start, end);
|
|
719
|
+
return 0;
|
|
216
720
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
if (
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
if (this.flowLevel > 0 && (char === "," || char === "]" || char === "}")) {
|
|
226
|
-
return true;
|
|
227
|
-
}
|
|
228
|
-
return false;
|
|
229
|
-
};
|
|
230
|
-
const firstChar = this.lexer.getCurrentChar();
|
|
231
|
-
if (firstChar === "\"" || firstChar === `'`) {
|
|
232
|
-
value += this.lexer.advance();
|
|
233
|
-
endPos = this.lexer.getCurrentPosition();
|
|
234
|
-
while (!this.lexer.isAtEnd() && this.lexer.getCurrentChar() !== "") {
|
|
235
|
-
const char = this.lexer.getCurrentChar();
|
|
236
|
-
if (char === firstChar || isTerminator(char)) {
|
|
237
|
-
break;
|
|
238
|
-
}
|
|
239
|
-
value += this.lexer.advance();
|
|
240
|
-
endPos = this.lexer.getCurrentPosition();
|
|
721
|
+
parseValue(parentIndent) {
|
|
722
|
+
this.skipNewlinesAndComments();
|
|
723
|
+
const token = this.currentToken();
|
|
724
|
+
const flowToken = token.type === TokenType.Indent ? this.peek(1) : token;
|
|
725
|
+
if (flowToken.type === TokenType.FlowMapStart || flowToken.type === TokenType.FlowSeqStart) {
|
|
726
|
+
if (token.type === TokenType.Indent) {
|
|
727
|
+
this.advance();
|
|
241
728
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
const char = this.lexer.getCurrentChar();
|
|
245
|
-
if (isTerminator(char)) {
|
|
246
|
-
break;
|
|
247
|
-
}
|
|
248
|
-
value += this.lexer.advance();
|
|
249
|
-
endPos = this.lexer.getCurrentPosition();
|
|
729
|
+
if (flowToken.type === TokenType.FlowMapStart) {
|
|
730
|
+
return this.parseFlowMap();
|
|
250
731
|
}
|
|
732
|
+
return this.parseFlowSeq();
|
|
251
733
|
}
|
|
252
|
-
const
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
255
|
-
|
|
734
|
+
const indent = this.currentIndent();
|
|
735
|
+
const firstContentToken = this.peekPastIndent();
|
|
736
|
+
if (firstContentToken.type === TokenType.Dash) {
|
|
737
|
+
return this.parseBlockSequence(indent);
|
|
256
738
|
}
|
|
257
|
-
|
|
258
|
-
|
|
739
|
+
if (this.looksLikeMapping()) {
|
|
740
|
+
return this.parseBlockMapping(indent);
|
|
741
|
+
}
|
|
742
|
+
if (token.type === TokenType.Scalar || token.type === TokenType.Indent) {
|
|
743
|
+
return this.parseScalar(parentIndent);
|
|
744
|
+
}
|
|
745
|
+
return undefined;
|
|
259
746
|
}
|
|
260
|
-
|
|
261
|
-
if (
|
|
262
|
-
return
|
|
747
|
+
peekPastIndent() {
|
|
748
|
+
if (this.currentToken().type === TokenType.Indent) {
|
|
749
|
+
return this.peek(1);
|
|
263
750
|
}
|
|
264
|
-
|
|
265
|
-
|
|
751
|
+
return this.currentToken();
|
|
752
|
+
}
|
|
753
|
+
looksLikeMapping() {
|
|
754
|
+
let offset = 0;
|
|
755
|
+
if (this.peek(offset).type === TokenType.Indent) {
|
|
756
|
+
offset++;
|
|
266
757
|
}
|
|
267
|
-
if (
|
|
268
|
-
|
|
758
|
+
if (this.peek(offset).type === TokenType.Scalar) {
|
|
759
|
+
offset++;
|
|
760
|
+
if (this.peek(offset).type === TokenType.Colon) {
|
|
761
|
+
return true;
|
|
762
|
+
}
|
|
269
763
|
}
|
|
270
|
-
|
|
271
|
-
|
|
764
|
+
return false;
|
|
765
|
+
}
|
|
766
|
+
parseScalar(parentIndent = -1) {
|
|
767
|
+
if (this.currentToken().type === TokenType.Indent) {
|
|
768
|
+
this.advance();
|
|
272
769
|
}
|
|
273
|
-
const
|
|
274
|
-
if (
|
|
275
|
-
return
|
|
770
|
+
const token = this.expect(TokenType.Scalar);
|
|
771
|
+
if (token.format !== "none") {
|
|
772
|
+
return this.scalarFromToken(token);
|
|
276
773
|
}
|
|
277
|
-
return
|
|
774
|
+
return this.parsePlainMultiline(token, parentIndent);
|
|
278
775
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
this.
|
|
776
|
+
parsePlainMultiline(firstToken, parentIndent) {
|
|
777
|
+
let value = firstToken.value;
|
|
778
|
+
let endOffset = firstToken.endOffset;
|
|
779
|
+
while (true) {
|
|
780
|
+
const savedPos = this.pos;
|
|
781
|
+
let emptyLineCount = 0;
|
|
782
|
+
let foundContent = false;
|
|
783
|
+
while (this.pos < this.tokens.length) {
|
|
784
|
+
const t = this.currentToken();
|
|
785
|
+
if (t.type === TokenType.Comment) {
|
|
786
|
+
break;
|
|
787
|
+
}
|
|
788
|
+
if (t.type === TokenType.Newline) {
|
|
789
|
+
this.advance();
|
|
790
|
+
const afterNewline = this.currentToken();
|
|
791
|
+
if (afterNewline.type === TokenType.Newline) {
|
|
792
|
+
emptyLineCount++;
|
|
793
|
+
continue;
|
|
794
|
+
}
|
|
795
|
+
if (afterNewline.type === TokenType.Indent) {
|
|
796
|
+
const afterIndent = this.peek(1);
|
|
797
|
+
if (afterIndent.type === TokenType.Newline || afterIndent.type === TokenType.EOF) {
|
|
798
|
+
emptyLineCount++;
|
|
799
|
+
this.advance();
|
|
800
|
+
continue;
|
|
801
|
+
}
|
|
802
|
+
if (afterIndent.type === TokenType.Comment) {
|
|
803
|
+
break;
|
|
804
|
+
}
|
|
805
|
+
if (afterNewline.indent > parentIndent) {
|
|
806
|
+
foundContent = true;
|
|
807
|
+
break;
|
|
808
|
+
} else {
|
|
809
|
+
break;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
if (afterNewline.type === TokenType.EOF) {
|
|
813
|
+
break;
|
|
814
|
+
}
|
|
815
|
+
if (afterNewline.type === TokenType.DocumentStart || afterNewline.type === TokenType.DocumentEnd) {
|
|
816
|
+
break;
|
|
817
|
+
}
|
|
818
|
+
if (parentIndent < 0) {
|
|
819
|
+
foundContent = true;
|
|
820
|
+
break;
|
|
821
|
+
}
|
|
822
|
+
break;
|
|
823
|
+
}
|
|
824
|
+
if (t.type === TokenType.Indent) {
|
|
825
|
+
break;
|
|
826
|
+
}
|
|
288
827
|
break;
|
|
289
828
|
}
|
|
290
|
-
if (
|
|
291
|
-
this.
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
if (this.lexer.getCurrentChar() === "#") {
|
|
295
|
-
this.lexer.skipToEndOfLine();
|
|
296
|
-
this.lexer.advanceLine();
|
|
297
|
-
continue;
|
|
829
|
+
if (!foundContent) {
|
|
830
|
+
this.pos = savedPos;
|
|
831
|
+
break;
|
|
298
832
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
if (!(item.type === "string" && item.value === "" && item.start.line === item.end.line && item.start.character === item.end.character)) {
|
|
302
|
-
items.push(item);
|
|
833
|
+
if (this.currentToken().type === TokenType.Indent) {
|
|
834
|
+
this.advance();
|
|
303
835
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
836
|
+
if (this.currentToken().type !== TokenType.Scalar) {
|
|
837
|
+
if (this.currentToken().type === TokenType.Dash) {
|
|
838
|
+
const dashToken = this.advance();
|
|
839
|
+
let lineText = "-";
|
|
840
|
+
if (this.currentToken().type === TokenType.Scalar) {
|
|
841
|
+
const restToken = this.advance();
|
|
842
|
+
lineText = "- " + restToken.value;
|
|
843
|
+
endOffset = restToken.endOffset;
|
|
844
|
+
} else {
|
|
845
|
+
endOffset = dashToken.endOffset;
|
|
846
|
+
}
|
|
847
|
+
if (emptyLineCount > 0) {
|
|
848
|
+
value += "\n".repeat(emptyLineCount);
|
|
849
|
+
} else {
|
|
850
|
+
value += " ";
|
|
851
|
+
}
|
|
852
|
+
value += lineText;
|
|
853
|
+
continue;
|
|
310
854
|
}
|
|
855
|
+
this.pos = savedPos;
|
|
856
|
+
break;
|
|
857
|
+
}
|
|
858
|
+
if (this.peek(1).type === TokenType.Colon) {
|
|
859
|
+
this.pos = savedPos;
|
|
860
|
+
break;
|
|
311
861
|
}
|
|
312
|
-
this.
|
|
313
|
-
if (
|
|
314
|
-
|
|
862
|
+
const contToken = this.advance();
|
|
863
|
+
if (emptyLineCount > 0) {
|
|
864
|
+
value += "\n".repeat(emptyLineCount);
|
|
865
|
+
} else {
|
|
866
|
+
value += " ";
|
|
315
867
|
}
|
|
868
|
+
value += contToken.value;
|
|
869
|
+
endOffset = contToken.endOffset;
|
|
316
870
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
871
|
+
return {
|
|
872
|
+
type: "scalar",
|
|
873
|
+
value,
|
|
874
|
+
rawValue: this.input.substring(firstToken.startOffset, endOffset),
|
|
875
|
+
startOffset: firstToken.startOffset,
|
|
876
|
+
endOffset,
|
|
877
|
+
format: "none"
|
|
878
|
+
};
|
|
320
879
|
}
|
|
321
|
-
|
|
322
|
-
const
|
|
323
|
-
this.lexer.advance();
|
|
324
|
-
this.flowLevel++;
|
|
880
|
+
parseBlockMapping(baseIndent, inlineFirstEntry = false) {
|
|
881
|
+
const startOffset = this.currentToken().startOffset;
|
|
325
882
|
const properties = [];
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if (this.lexer.getCurrentChar() === "#") {
|
|
333
|
-
this.lexer.skipToEndOfLine();
|
|
334
|
-
this.lexer.advanceLine();
|
|
335
|
-
continue;
|
|
883
|
+
const seenKeys = ( new Set());
|
|
884
|
+
if (inlineFirstEntry) {
|
|
885
|
+
const firstEntry = this.parseMappingEntry(baseIndent);
|
|
886
|
+
if (firstEntry) {
|
|
887
|
+
seenKeys.add(firstEntry.key.value);
|
|
888
|
+
properties.push(firstEntry);
|
|
336
889
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
if (this.
|
|
341
|
-
|
|
342
|
-
this.lexer.advance();
|
|
343
|
-
while (!this.lexer.isAtEnd() && this.lexer.getCurrentChar() !== "" && this.lexer.getCurrentChar() !== quote) {
|
|
344
|
-
keyValue += this.lexer.advance();
|
|
345
|
-
}
|
|
346
|
-
if (this.lexer.getCurrentChar() === quote) {
|
|
347
|
-
this.lexer.advance();
|
|
348
|
-
}
|
|
349
|
-
} else {
|
|
350
|
-
while (!this.lexer.isAtEnd() && this.lexer.getCurrentChar() !== "" && this.lexer.getCurrentChar() !== ":") {
|
|
351
|
-
keyValue += this.lexer.advance();
|
|
352
|
-
}
|
|
890
|
+
}
|
|
891
|
+
while (this.currentToken().type !== TokenType.EOF) {
|
|
892
|
+
this.skipNewlinesAndComments();
|
|
893
|
+
if (this.currentToken().type === TokenType.EOF) {
|
|
894
|
+
break;
|
|
353
895
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
this.lexer.skipWhitespace();
|
|
358
|
-
if (this.lexer.getCurrentChar() === ":") {
|
|
359
|
-
this.lexer.advance();
|
|
896
|
+
const indent = this.currentIndent();
|
|
897
|
+
if (indent < baseIndent) {
|
|
898
|
+
break;
|
|
360
899
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
key,
|
|
365
|
-
value
|
|
366
|
-
});
|
|
367
|
-
const positionAfter = this.lexer.savePosition();
|
|
368
|
-
if (positionBefore.line === positionAfter.line && positionBefore.char === positionAfter.char) {
|
|
369
|
-
if (!this.lexer.isAtEnd() && this.lexer.getCurrentChar() !== "") {
|
|
370
|
-
this.lexer.advance();
|
|
900
|
+
if (indent !== baseIndent) {
|
|
901
|
+
if (indent > baseIndent) {
|
|
902
|
+
this.emitError(( localize(136, "Unexpected indentation (expected {0}, got {1})", baseIndent, indent)), this.currentToken().startOffset, this.currentToken().endOffset, "unexpected-indentation");
|
|
371
903
|
} else {
|
|
372
904
|
break;
|
|
373
905
|
}
|
|
374
906
|
}
|
|
375
|
-
this.
|
|
376
|
-
|
|
377
|
-
|
|
907
|
+
if (!this.looksLikeMapping()) {
|
|
908
|
+
break;
|
|
909
|
+
}
|
|
910
|
+
const entry = this.parseMappingEntry(baseIndent);
|
|
911
|
+
if (!entry) {
|
|
912
|
+
break;
|
|
378
913
|
}
|
|
914
|
+
if (!this.options.allowDuplicateKeys && ( seenKeys.has(entry.key.value))) {
|
|
915
|
+
this.emitError(( localize(137, "Duplicate key: \"{0}\"", entry.key.value)), entry.key.startOffset, entry.key.endOffset, "duplicate-key");
|
|
916
|
+
}
|
|
917
|
+
seenKeys.add(entry.key.value);
|
|
918
|
+
properties.push(entry);
|
|
379
919
|
}
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
|
|
920
|
+
const endOffset = properties.length > 0 ? properties[properties.length - 1].value.endOffset : startOffset;
|
|
921
|
+
return {
|
|
922
|
+
type: "map",
|
|
923
|
+
properties,
|
|
924
|
+
style: "block",
|
|
925
|
+
startOffset,
|
|
926
|
+
endOffset
|
|
927
|
+
};
|
|
383
928
|
}
|
|
384
|
-
|
|
385
|
-
|
|
929
|
+
parseMappingEntry(baseIndent) {
|
|
930
|
+
if (this.currentToken().type === TokenType.Indent) {
|
|
931
|
+
this.advance();
|
|
932
|
+
}
|
|
933
|
+
const keyToken = this.expect(TokenType.Scalar);
|
|
934
|
+
const key = this.scalarFromToken(keyToken);
|
|
935
|
+
const colon = this.expect(TokenType.Colon);
|
|
936
|
+
if (colon.type !== TokenType.Colon) {
|
|
937
|
+
this.emitError(( localize(138, "Expected \":\"")), colon.startOffset, colon.endOffset, "expected-colon");
|
|
938
|
+
return undefined;
|
|
939
|
+
}
|
|
940
|
+
const value = this.parseMappingValue(baseIndent, colon);
|
|
941
|
+
return {
|
|
942
|
+
key,
|
|
943
|
+
value
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
parseMappingValue(baseIndent, colonToken) {
|
|
947
|
+
const next = this.currentToken();
|
|
948
|
+
if (next.type === TokenType.FlowMapStart) {
|
|
949
|
+
return this.parseFlowMap();
|
|
950
|
+
}
|
|
951
|
+
if (next.type === TokenType.FlowSeqStart) {
|
|
952
|
+
return this.parseFlowSeq();
|
|
953
|
+
}
|
|
954
|
+
if (next.type === TokenType.Scalar) {
|
|
955
|
+
if (this.currentToken().type === TokenType.Indent) {
|
|
956
|
+
this.advance();
|
|
957
|
+
}
|
|
958
|
+
const token = this.advance();
|
|
959
|
+
if (token.format !== "none") {
|
|
960
|
+
return this.scalarFromToken(token);
|
|
961
|
+
}
|
|
962
|
+
return this.parsePlainMultiline(token, baseIndent);
|
|
963
|
+
}
|
|
964
|
+
this.skipNewlinesAndComments();
|
|
965
|
+
const afterNewline = this.currentToken();
|
|
966
|
+
if (afterNewline.type === TokenType.EOF) {
|
|
967
|
+
this.emitError(( localize(139, "Missing value")), colonToken.startOffset, colonToken.endOffset, "missing-value");
|
|
968
|
+
return this.makeEmptyScalar(colonToken.endOffset);
|
|
969
|
+
}
|
|
970
|
+
const nextIndent = this.currentIndent();
|
|
971
|
+
if (nextIndent === baseIndent && this.peekPastIndent().type === TokenType.Dash) {
|
|
972
|
+
return this.parseValue(baseIndent) ?? this.makeEmptyScalar(colonToken.endOffset);
|
|
973
|
+
}
|
|
974
|
+
if (nextIndent <= baseIndent) {
|
|
975
|
+
this.emitError(( localize(139, "Missing value")), colonToken.startOffset, colonToken.endOffset, "missing-value");
|
|
976
|
+
return this.makeEmptyScalar(colonToken.endOffset);
|
|
977
|
+
}
|
|
978
|
+
return this.parseValue(baseIndent) ?? this.makeEmptyScalar(colonToken.endOffset);
|
|
979
|
+
}
|
|
980
|
+
parseBlockSequence(baseIndent) {
|
|
386
981
|
const items = [];
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
982
|
+
const startOffset = this.currentToken().startOffset;
|
|
983
|
+
let endOffset = startOffset;
|
|
984
|
+
let isFirstItem = true;
|
|
985
|
+
while (this.currentToken().type !== TokenType.EOF) {
|
|
986
|
+
this.skipNewlinesAndComments();
|
|
987
|
+
if (this.currentToken().type === TokenType.EOF) {
|
|
390
988
|
break;
|
|
391
989
|
}
|
|
392
|
-
|
|
393
|
-
if (
|
|
990
|
+
let indent;
|
|
991
|
+
if (isFirstItem && this.currentToken().type === TokenType.Dash) {
|
|
992
|
+
indent = this.currentToken().startOffset - this.getLineStart(this.currentToken().startOffset);
|
|
993
|
+
} else {
|
|
994
|
+
indent = this.currentIndent();
|
|
995
|
+
}
|
|
996
|
+
isFirstItem = false;
|
|
997
|
+
if (indent < baseIndent) {
|
|
394
998
|
break;
|
|
395
999
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
this.lexer.skipWhitespace();
|
|
400
|
-
const itemStart = this.lexer.getCurrentPosition();
|
|
401
|
-
if (this.lexer.getCurrentChar() === "" || this.lexer.getCurrentChar() === "#") {
|
|
402
|
-
this.lexer.advanceLine();
|
|
403
|
-
if (!this.lexer.isAtEnd()) {
|
|
404
|
-
const nextIndent = this.lexer.getIndentation();
|
|
405
|
-
if (nextIndent > currentIndent) {
|
|
406
|
-
this.lexer.skipWhitespace();
|
|
407
|
-
if (this.lexer.getCurrentChar() === "-") {
|
|
408
|
-
const nestedArray = this.parseBlockArray(nextIndent);
|
|
409
|
-
items.push(nestedArray);
|
|
410
|
-
} else {
|
|
411
|
-
const currentLine = this.lexer.getCurrentLineText();
|
|
412
|
-
const currentPos = this.lexer.getCurrentCharNumber();
|
|
413
|
-
const remainingLine = currentLine.substring(currentPos);
|
|
414
|
-
if (remainingLine.includes(":") && !remainingLine.trim().startsWith("#")) {
|
|
415
|
-
const nestedObject = this.parseBlockObject(nextIndent, this.lexer.getCurrentCharNumber());
|
|
416
|
-
items.push(nestedObject);
|
|
417
|
-
} else {
|
|
418
|
-
items.push(createStringNode("", itemStart, itemStart));
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
} else {
|
|
422
|
-
items.push(createStringNode("", itemStart, itemStart));
|
|
423
|
-
}
|
|
424
|
-
} else {
|
|
425
|
-
items.push(createStringNode("", itemStart, itemStart));
|
|
426
|
-
}
|
|
1000
|
+
if (indent !== baseIndent) {
|
|
1001
|
+
if (indent > baseIndent) {
|
|
1002
|
+
this.emitError(( localize(136, "Unexpected indentation (expected {0}, got {1})", baseIndent, indent)), this.currentToken().startOffset, this.currentToken().endOffset, "unexpected-indentation");
|
|
427
1003
|
} else {
|
|
428
|
-
|
|
429
|
-
const currentPos = this.lexer.getCurrentCharNumber();
|
|
430
|
-
const remainingLine = currentLine.substring(currentPos);
|
|
431
|
-
const hasColon = remainingLine.includes(":");
|
|
432
|
-
if (hasColon) {
|
|
433
|
-
const item = this.parseBlockObject(itemStart.character, itemStart.character);
|
|
434
|
-
items.push(item);
|
|
435
|
-
} else {
|
|
436
|
-
const item = this.parseValue();
|
|
437
|
-
items.push(item);
|
|
438
|
-
while (!this.lexer.isAtEnd() && this.lexer.getCurrentChar() !== "" && this.lexer.getCurrentChar() !== "#") {
|
|
439
|
-
this.lexer.advance();
|
|
440
|
-
}
|
|
441
|
-
this.lexer.advanceLine();
|
|
442
|
-
}
|
|
1004
|
+
break;
|
|
443
1005
|
}
|
|
444
|
-
}
|
|
1006
|
+
}
|
|
1007
|
+
const contentToken = this.peekPastIndent();
|
|
1008
|
+
if (contentToken.type !== TokenType.Dash) {
|
|
445
1009
|
break;
|
|
446
1010
|
}
|
|
1011
|
+
if (this.currentToken().type === TokenType.Indent) {
|
|
1012
|
+
this.advance();
|
|
1013
|
+
}
|
|
1014
|
+
const dashToken = this.advance();
|
|
1015
|
+
const itemValue = this.parseSequenceItemValue(baseIndent, dashToken);
|
|
1016
|
+
items.push(itemValue);
|
|
1017
|
+
endOffset = itemValue.endOffset;
|
|
447
1018
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
1019
|
+
return {
|
|
1020
|
+
type: "sequence",
|
|
1021
|
+
items,
|
|
1022
|
+
style: "block",
|
|
1023
|
+
startOffset,
|
|
1024
|
+
endOffset
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
parseSequenceItemValue(baseIndent, dashToken) {
|
|
1028
|
+
const next = this.currentToken();
|
|
1029
|
+
if (next.type === TokenType.Comment) {
|
|
1030
|
+
this.advance();
|
|
1031
|
+
}
|
|
1032
|
+
if (next.type === TokenType.FlowMapStart) {
|
|
1033
|
+
return this.parseFlowMap();
|
|
1034
|
+
}
|
|
1035
|
+
if (next.type === TokenType.FlowSeqStart) {
|
|
1036
|
+
return this.parseFlowSeq();
|
|
1037
|
+
}
|
|
1038
|
+
if (next.type === TokenType.Dash) {
|
|
1039
|
+
const nestedIndent = next.startOffset - this.getLineStart(next.startOffset);
|
|
1040
|
+
return this.parseBlockSequence(nestedIndent);
|
|
1041
|
+
}
|
|
1042
|
+
if (next.type === TokenType.Scalar) {
|
|
1043
|
+
if (this.peek(1).type === TokenType.Colon) {
|
|
1044
|
+
const itemIndent = next.startOffset - this.getLineStart(next.startOffset);
|
|
1045
|
+
return this.parseBlockMapping(itemIndent, true);
|
|
1046
|
+
}
|
|
1047
|
+
return this.parseScalar(baseIndent);
|
|
1048
|
+
}
|
|
1049
|
+
this.skipNewlinesAndComments();
|
|
1050
|
+
if (this.currentToken().type === TokenType.EOF) {
|
|
1051
|
+
this.emitError(( localize(140, "Missing sequence item value")), dashToken.startOffset, dashToken.endOffset, "missing-value");
|
|
1052
|
+
return this.makeEmptyScalar(dashToken.endOffset);
|
|
1053
|
+
}
|
|
1054
|
+
const nextIndent = this.currentIndent();
|
|
1055
|
+
if (nextIndent <= baseIndent) {
|
|
1056
|
+
this.emitError(( localize(140, "Missing sequence item value")), dashToken.startOffset, dashToken.endOffset, "missing-value");
|
|
1057
|
+
return this.makeEmptyScalar(dashToken.endOffset);
|
|
454
1058
|
}
|
|
455
|
-
return
|
|
1059
|
+
return this.parseValue(baseIndent) ?? this.makeEmptyScalar(dashToken.endOffset);
|
|
456
1060
|
}
|
|
457
|
-
|
|
458
|
-
|
|
1061
|
+
getLineStart(offset) {
|
|
1062
|
+
let i = offset - 1;
|
|
1063
|
+
while (i >= 0 && this.input[i] !== "\n" && this.input[i] !== "\r") {
|
|
1064
|
+
i--;
|
|
1065
|
+
}
|
|
1066
|
+
return i + 1;
|
|
1067
|
+
}
|
|
1068
|
+
parseFlowMap() {
|
|
1069
|
+
const startToken = this.advance();
|
|
459
1070
|
const properties = [];
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
this.lexer.moveToNextNonEmptyLine();
|
|
466
|
-
}
|
|
467
|
-
firstIteration = false;
|
|
468
|
-
if (this.lexer.isAtEnd()) {
|
|
469
|
-
break;
|
|
470
|
-
}
|
|
471
|
-
const currentIndent = this.lexer.getIndentation();
|
|
472
|
-
if (fromCurrentPosition) {
|
|
473
|
-
this.lexer.skipWhitespace();
|
|
474
|
-
const currentCharPosition = this.lexer.getCurrentCharNumber();
|
|
475
|
-
if (currentCharPosition < baseCharPosition) {
|
|
476
|
-
break;
|
|
477
|
-
}
|
|
1071
|
+
this.skipFlowWhitespace();
|
|
1072
|
+
while (this.currentToken().type !== TokenType.FlowMapEnd && this.currentToken().type !== TokenType.EOF) {
|
|
1073
|
+
let key;
|
|
1074
|
+
if (this.currentToken().type === TokenType.Scalar) {
|
|
1075
|
+
key = this.parseFlowScalar();
|
|
478
1076
|
} else {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
}
|
|
482
|
-
if (currentIndent > baseIndent) {
|
|
483
|
-
const lineStart = createPosition(this.lexer.getCurrentLineNumber(), 0);
|
|
484
|
-
const lineEnd = createPosition(this.lexer.getCurrentLineNumber(), this.lexer.getCurrentLineText().length);
|
|
485
|
-
this.addError("Unexpected indentation", "indentation", lineStart, lineEnd);
|
|
486
|
-
this.lexer.skipWhitespace();
|
|
487
|
-
} else {
|
|
488
|
-
this.lexer.skipWhitespace();
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
const keyStart = this.lexer.getCurrentPosition();
|
|
492
|
-
let keyValue = "";
|
|
493
|
-
while (!this.lexer.isAtEnd() && this.lexer.getCurrentChar() !== "" && this.lexer.getCurrentChar() !== ":") {
|
|
494
|
-
keyValue += this.lexer.advance();
|
|
495
|
-
}
|
|
496
|
-
keyValue = keyValue.trim();
|
|
497
|
-
const keyEnd = this.lexer.getCurrentPosition();
|
|
498
|
-
const key = createStringNode(keyValue, keyStart, keyEnd);
|
|
499
|
-
if (!this.options.allowDuplicateKeys && ( localKeysSeen.has(keyValue))) {
|
|
500
|
-
this.addError(`Duplicate key '${keyValue}'`, "duplicateKey", keyStart, keyEnd);
|
|
501
|
-
}
|
|
502
|
-
localKeysSeen.add(keyValue);
|
|
503
|
-
if (this.lexer.getCurrentChar() === ":") {
|
|
504
|
-
this.lexer.advance();
|
|
1077
|
+
this.emitError(( localize(141, "Expected mapping key")), this.currentToken().startOffset, this.currentToken().endOffset, "expected-key");
|
|
1078
|
+
break;
|
|
505
1079
|
}
|
|
506
|
-
this.
|
|
1080
|
+
this.skipFlowWhitespace();
|
|
507
1081
|
let value;
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
this.
|
|
511
|
-
|
|
512
|
-
const nextIndent = this.lexer.getIndentation();
|
|
513
|
-
if (nextIndent > currentIndent) {
|
|
514
|
-
this.lexer.skipWhitespace();
|
|
515
|
-
if (this.lexer.getCurrentChar() === "-") {
|
|
516
|
-
value = this.parseBlockArray(nextIndent);
|
|
517
|
-
} else {
|
|
518
|
-
const currentLine = this.lexer.getCurrentLineText();
|
|
519
|
-
const currentPos = this.lexer.getCurrentCharNumber();
|
|
520
|
-
const remainingLine = currentLine.substring(currentPos);
|
|
521
|
-
if (remainingLine.includes(":") && !remainingLine.trim().startsWith("#")) {
|
|
522
|
-
value = this.parseBlockObject(nextIndent);
|
|
523
|
-
} else {
|
|
524
|
-
value = this.parseValue();
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
} else if (!fromCurrentPosition && nextIndent === currentIndent) {
|
|
528
|
-
this.lexer.skipWhitespace();
|
|
529
|
-
if (this.lexer.getCurrentChar() === "-") {
|
|
530
|
-
value = this.parseBlockArray(currentIndent);
|
|
531
|
-
} else {
|
|
532
|
-
value = createStringNode("", valueStart, valueStart);
|
|
533
|
-
}
|
|
534
|
-
} else {
|
|
535
|
-
value = createStringNode("", valueStart, valueStart);
|
|
536
|
-
}
|
|
537
|
-
} else {
|
|
538
|
-
value = createStringNode("", valueStart, valueStart);
|
|
539
|
-
}
|
|
1082
|
+
if (this.currentToken().type === TokenType.Colon) {
|
|
1083
|
+
this.advance();
|
|
1084
|
+
this.skipFlowWhitespace();
|
|
1085
|
+
value = this.parseFlowValue();
|
|
540
1086
|
} else {
|
|
541
|
-
value = this.
|
|
542
|
-
while (!this.lexer.isAtEnd() && this.lexer.getCurrentChar() !== "" && this.lexer.getCurrentChar() !== "#") {
|
|
543
|
-
if (isWhitespace(this.lexer.getCurrentChar())) {
|
|
544
|
-
this.lexer.advance();
|
|
545
|
-
} else {
|
|
546
|
-
break;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
if (this.lexer.getCurrentChar() === "#") {
|
|
550
|
-
this.lexer.skipToEndOfLine();
|
|
551
|
-
}
|
|
552
|
-
if (!this.lexer.isAtEnd() && this.lexer.getCurrentChar() === "") {
|
|
553
|
-
this.lexer.advanceLine();
|
|
554
|
-
}
|
|
1087
|
+
value = this.makeEmptyScalar(key.endOffset);
|
|
555
1088
|
}
|
|
556
1089
|
properties.push({
|
|
557
1090
|
key,
|
|
558
1091
|
value
|
|
559
1092
|
});
|
|
1093
|
+
this.skipFlowWhitespace();
|
|
1094
|
+
if (this.currentToken().type === TokenType.Comma) {
|
|
1095
|
+
this.advance();
|
|
1096
|
+
this.skipFlowWhitespace();
|
|
1097
|
+
}
|
|
560
1098
|
}
|
|
561
|
-
|
|
562
|
-
if (
|
|
563
|
-
|
|
564
|
-
|
|
1099
|
+
const endToken = this.currentToken();
|
|
1100
|
+
if (endToken.type === TokenType.FlowMapEnd) {
|
|
1101
|
+
this.advance();
|
|
1102
|
+
} else {
|
|
1103
|
+
this.emitError(( localize(142, "Expected \"}\"")), endToken.startOffset, endToken.endOffset, "expected-flow-map-end");
|
|
565
1104
|
}
|
|
566
|
-
return
|
|
1105
|
+
return {
|
|
1106
|
+
type: "map",
|
|
1107
|
+
properties,
|
|
1108
|
+
style: "flow",
|
|
1109
|
+
startOffset: startToken.startOffset,
|
|
1110
|
+
endOffset: endToken.type === TokenType.FlowMapEnd ? endToken.endOffset : endToken.startOffset
|
|
1111
|
+
};
|
|
567
1112
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
this.
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
return this.parseBlockArray(0);
|
|
1113
|
+
parseFlowSeq() {
|
|
1114
|
+
const startToken = this.advance();
|
|
1115
|
+
const items = [];
|
|
1116
|
+
this.skipFlowWhitespace();
|
|
1117
|
+
while (this.currentToken().type !== TokenType.FlowSeqEnd && this.currentToken().type !== TokenType.EOF) {
|
|
1118
|
+
let item;
|
|
1119
|
+
if (this.currentToken().type === TokenType.FlowMapStart) {
|
|
1120
|
+
item = this.parseFlowMap();
|
|
1121
|
+
} else if (this.currentToken().type === TokenType.FlowSeqStart) {
|
|
1122
|
+
item = this.parseFlowSeq();
|
|
1123
|
+
} else if (this.currentToken().type === TokenType.Scalar) {
|
|
1124
|
+
item = this.parseFlowScalar();
|
|
581
1125
|
} else {
|
|
582
|
-
|
|
1126
|
+
this.emitError(( localize(143, "Unexpected token in flow sequence")), this.currentToken().startOffset, this.currentToken().endOffset, "unexpected-token");
|
|
1127
|
+
this.advance();
|
|
1128
|
+
continue;
|
|
1129
|
+
}
|
|
1130
|
+
items.push(item);
|
|
1131
|
+
this.skipFlowWhitespace();
|
|
1132
|
+
if (this.currentToken().type === TokenType.Comma) {
|
|
1133
|
+
this.advance();
|
|
1134
|
+
this.skipFlowWhitespace();
|
|
583
1135
|
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
1136
|
+
}
|
|
1137
|
+
const endToken = this.currentToken();
|
|
1138
|
+
if (endToken.type === TokenType.FlowSeqEnd) {
|
|
1139
|
+
this.advance();
|
|
588
1140
|
} else {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
1141
|
+
this.emitError(( localize(144, "Expected \"]\"")), endToken.startOffset, endToken.endOffset, "expected-flow-seq-end");
|
|
1142
|
+
}
|
|
1143
|
+
return {
|
|
1144
|
+
type: "sequence",
|
|
1145
|
+
items,
|
|
1146
|
+
style: "flow",
|
|
1147
|
+
startOffset: startToken.startOffset,
|
|
1148
|
+
endOffset: endToken.type === TokenType.FlowSeqEnd ? endToken.endOffset : endToken.startOffset
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
parseFlowScalar() {
|
|
1152
|
+
const token = this.advance();
|
|
1153
|
+
if (token.format !== "none") {
|
|
1154
|
+
return this.scalarFromToken(token);
|
|
1155
|
+
}
|
|
1156
|
+
let value = token.value;
|
|
1157
|
+
let endOffset = token.endOffset;
|
|
1158
|
+
while (true) {
|
|
1159
|
+
let hasNewline = false;
|
|
1160
|
+
let p = this.pos;
|
|
1161
|
+
while (p < this.tokens.length) {
|
|
1162
|
+
const t = this.tokens[p];
|
|
1163
|
+
if (t.type === TokenType.Newline) {
|
|
1164
|
+
hasNewline = true;
|
|
1165
|
+
p++;
|
|
1166
|
+
} else if (t.type === TokenType.Indent || t.type === TokenType.Comment) {
|
|
1167
|
+
p++;
|
|
1168
|
+
} else {
|
|
607
1169
|
break;
|
|
608
1170
|
}
|
|
609
1171
|
}
|
|
610
|
-
if (
|
|
611
|
-
|
|
1172
|
+
if (!hasNewline || p >= this.tokens.length) {
|
|
1173
|
+
break;
|
|
1174
|
+
}
|
|
1175
|
+
const nextToken = this.tokens[p];
|
|
1176
|
+
if (nextToken.type === TokenType.Scalar && nextToken.format === "none") {
|
|
1177
|
+
this.pos = p + 1;
|
|
1178
|
+
value += " " + nextToken.value;
|
|
1179
|
+
endOffset = nextToken.endOffset;
|
|
612
1180
|
} else {
|
|
613
|
-
|
|
1181
|
+
break;
|
|
614
1182
|
}
|
|
615
1183
|
}
|
|
1184
|
+
return {
|
|
1185
|
+
type: "scalar",
|
|
1186
|
+
value,
|
|
1187
|
+
rawValue: this.input.substring(token.startOffset, endOffset),
|
|
1188
|
+
startOffset: token.startOffset,
|
|
1189
|
+
endOffset,
|
|
1190
|
+
format: "none"
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
parseFlowValue() {
|
|
1194
|
+
if (this.currentToken().type === TokenType.FlowMapStart) {
|
|
1195
|
+
return this.parseFlowMap();
|
|
1196
|
+
} else if (this.currentToken().type === TokenType.FlowSeqStart) {
|
|
1197
|
+
return this.parseFlowSeq();
|
|
1198
|
+
} else if (this.currentToken().type === TokenType.Scalar) {
|
|
1199
|
+
return this.parseFlowScalar();
|
|
1200
|
+
} else {
|
|
1201
|
+
return this.makeEmptyScalar(this.currentToken().startOffset);
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
skipFlowWhitespace() {
|
|
1205
|
+
while (true) {
|
|
1206
|
+
const t = this.currentToken().type;
|
|
1207
|
+
if (t === TokenType.Newline || t === TokenType.Indent || t === TokenType.Comment) {
|
|
1208
|
+
this.advance();
|
|
1209
|
+
} else {
|
|
1210
|
+
break;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
scalarFromToken(token) {
|
|
1215
|
+
return {
|
|
1216
|
+
type: "scalar",
|
|
1217
|
+
value: token.value,
|
|
1218
|
+
rawValue: token.rawValue,
|
|
1219
|
+
startOffset: token.startOffset,
|
|
1220
|
+
endOffset: token.endOffset,
|
|
1221
|
+
format: token.format
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
makeEmptyScalar(offset) {
|
|
1225
|
+
return {
|
|
1226
|
+
type: "scalar",
|
|
1227
|
+
value: "",
|
|
1228
|
+
rawValue: "",
|
|
1229
|
+
startOffset: offset,
|
|
1230
|
+
endOffset: offset,
|
|
1231
|
+
format: "none"
|
|
1232
|
+
};
|
|
616
1233
|
}
|
|
617
1234
|
}
|
|
618
1235
|
|