@codingame/monaco-vscode-api 18.4.0 → 19.0.1
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 +1217 -2932
- package/monaco.js +0 -3
- package/package.json +8 -8
- package/services.d.ts +12 -8
- package/services.js +12 -7
- package/vscode/product.json.js +1 -1
- package/vscode/src/vs/base/browser/dom.d.ts +83 -2
- package/vscode/src/vs/base/browser/dom.js +280 -3
- package/vscode/src/vs/base/browser/domStylesheets.d.ts +2 -0
- package/vscode/src/vs/base/browser/domStylesheets.js +11 -1
- package/vscode/src/vs/base/browser/markdownRenderer.d.ts +1 -0
- package/vscode/src/vs/base/browser/markdownRenderer.js +34 -18
- package/vscode/src/vs/base/browser/ui/button/button.js +4 -1
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/vscode/src/vs/base/browser/ui/list/list.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/list/listView.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/list/listView.js +5 -5
- package/vscode/src/vs/base/browser/ui/list/listWidget.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +5 -1
- package/vscode/src/vs/base/browser/ui/toggle/toggle.d.ts +3 -1
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +21 -4
- package/vscode/src/vs/base/common/arrays.d.ts +0 -1
- package/vscode/src/vs/base/common/arrays.js +1 -6
- package/vscode/src/vs/base/common/async.d.ts +1 -0
- package/vscode/src/vs/base/common/async.js +2 -1
- package/vscode/src/vs/base/common/buffer.d.ts +1 -0
- package/vscode/src/vs/base/common/buffer.js +3 -0
- package/vscode/src/vs/base/common/codicons.d.ts +7 -0
- package/vscode/src/vs/base/common/codiconsLibrary.d.ts +7 -0
- package/vscode/src/vs/base/common/codiconsLibrary.js +7 -0
- package/vscode/src/vs/base/common/collections.d.ts +1 -0
- package/vscode/src/vs/base/common/collections.js +14 -1
- package/vscode/src/vs/base/common/color.js +2 -2
- package/vscode/src/vs/base/common/dataTransfer.d.ts +1 -1
- package/vscode/src/vs/base/common/decorators.d.ts +1 -1
- package/vscode/src/vs/base/common/event.d.ts +1 -1
- package/vscode/src/vs/base/common/glob.d.ts +1 -1
- package/vscode/src/vs/base/common/glob.js +2 -2
- package/vscode/src/vs/base/common/hotReloadHelpers.js +1 -1
- package/vscode/src/vs/base/common/iterator.d.ts +1 -1
- package/vscode/src/vs/base/common/network.d.ts +1 -0
- package/vscode/src/vs/base/common/network.js +1 -0
- package/vscode/src/vs/base/common/oauth.d.ts +34 -4
- package/vscode/src/vs/base/common/oauth.js +77 -6
- package/vscode/src/vs/base/common/observableInternal/index.d.ts +2 -2
- package/vscode/src/vs/base/common/observableInternal/logging/debugger/utils.js +8 -1
- package/vscode/src/vs/base/common/observableInternal/set.js +0 -1
- package/vscode/src/vs/base/common/performance.js +1 -1
- package/vscode/src/vs/base/common/product.d.ts +2 -1
- package/vscode/src/vs/base/common/types.d.ts +4 -8
- package/vscode/src/vs/base/common/types.js +3 -3
- package/vscode/src/vs/base/common/worker/webWorker.js +1 -1
- package/vscode/src/vs/editor/browser/config/migrateOptions.js +8 -0
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.d.ts +2 -0
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.js +18 -14
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +5 -3
- package/vscode/src/vs/editor/browser/editorBrowser.d.ts +3 -1
- package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlas.d.ts +3 -1
- package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlas.js +5 -4
- package/vscode/src/vs/editor/browser/gpu/raster/glyphRasterizer.d.ts +3 -1
- package/vscode/src/vs/editor/browser/gpu/raster/glyphRasterizer.js +3 -3
- package/vscode/src/vs/editor/browser/gpu/viewGpuContext.js +2 -3
- package/vscode/src/vs/editor/browser/observableCodeEditor.d.ts +6 -0
- package/vscode/src/vs/editor/browser/observableCodeEditor.js +38 -1
- package/vscode/src/vs/editor/browser/services/abstractCodeEditorService.js +9 -1
- package/vscode/src/vs/editor/browser/services/bulkEditService.d.ts +2 -0
- package/vscode/src/vs/editor/browser/services/editorWorkerService.d.ts +4 -0
- package/vscode/src/vs/editor/browser/services/editorWorkerService.js +18 -2
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.d.ts +32 -0
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.js +141 -0
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.service.d.ts +11 -0
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.service.js +6 -0
- package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.js +2 -2
- package/vscode/src/vs/editor/browser/view/viewController.js +5 -1
- package/vscode/src/vs/editor/browser/view.d.ts +1 -1
- package/vscode/src/vs/editor/browser/view.js +5 -5
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursors.d.ts +1 -1
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursors.js +3 -3
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLine.js +14 -6
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLineOptions.d.ts +1 -0
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +3 -7
- package/vscode/src/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +12 -2
- package/vscode/src/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -2
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.d.ts +8 -2
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +39 -9
- package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +12 -12
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.css +52 -49
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +15 -15
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +3 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +7 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +7 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +5 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +54 -54
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +173 -160
- package/vscode/src/vs/editor/common/config/editorOptions.js +645 -570
- package/vscode/src/vs/editor/common/config/fontInfo.js +1 -1
- package/vscode/src/vs/editor/common/core/2d/point.d.ts +5 -0
- package/vscode/src/vs/editor/common/core/2d/point.js +23 -0
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/vscode/src/vs/editor/common/core/edits/edit.d.ts +6 -0
- package/vscode/src/vs/editor/common/core/edits/edit.js +41 -0
- package/vscode/src/vs/editor/common/core/edits/lineEdit.d.ts +17 -11
- package/vscode/src/vs/editor/common/core/edits/lineEdit.js +36 -9
- package/vscode/src/vs/editor/common/core/edits/stringEdit.d.ts +63 -16
- package/vscode/src/vs/editor/common/core/edits/stringEdit.js +205 -48
- package/vscode/src/vs/editor/common/core/edits/textEdit.d.ts +5 -1
- package/vscode/src/vs/editor/common/core/edits/textEdit.js +18 -2
- package/vscode/src/vs/editor/common/core/text/abstractText.d.ts +3 -1
- package/vscode/src/vs/editor/common/core/text/abstractText.js +10 -1
- package/vscode/src/vs/editor/common/core/text/getPositionOffsetTransformerFromTextModel.js +2 -1
- package/vscode/src/vs/editor/common/core/text/positionToOffset.d.ts +2 -28
- package/vscode/src/vs/editor/common/core/text/positionToOffset.js +11 -92
- package/vscode/src/vs/editor/common/core/text/positionToOffsetImpl.d.ts +37 -0
- package/vscode/src/vs/editor/common/core/text/positionToOffsetImpl.js +104 -0
- package/vscode/src/vs/editor/common/cursor/cursor.d.ts +3 -2
- package/vscode/src/vs/editor/common/cursor/cursor.js +24 -16
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +3 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +1 -0
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +11 -1
- package/vscode/src/vs/editor/common/editorCommon.d.ts +2 -1
- package/vscode/src/vs/editor/common/editorContextKeys.js +46 -46
- package/vscode/src/vs/editor/common/languages/defaultDocumentColorsComputer.js +1 -1
- package/vscode/src/vs/editor/common/languages/languageConfiguration.d.ts +5 -1
- package/vscode/src/vs/editor/common/languages/languageConfigurationRegistry.d.ts +1 -0
- package/vscode/src/vs/editor/common/languages/languageConfigurationRegistry.js +7 -1
- package/vscode/src/vs/editor/common/languages/modesRegistry.js +1 -1
- package/vscode/src/vs/editor/common/languages.d.ts +31 -27
- package/vscode/src/vs/editor/common/languages.js +57 -62
- package/vscode/src/vs/editor/common/model/editStack.d.ts +2 -1
- package/vscode/src/vs/editor/common/model/editStack.js +4 -3
- package/vscode/src/vs/editor/common/model/intervalTree.d.ts +2 -2
- package/vscode/src/vs/editor/common/model/intervalTree.js +24 -7
- package/vscode/src/vs/editor/common/model/textModel.d.ts +24 -10
- package/vscode/src/vs/editor/common/model/textModel.js +114 -53
- package/vscode/src/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +1 -1
- package/vscode/src/vs/editor/common/model/tokens/treeSitter/treeSitterSyntaxTokenBackend.d.ts +0 -3
- package/vscode/src/vs/editor/common/model/tokens/treeSitter/treeSitterSyntaxTokenBackend.js +1 -13
- package/vscode/src/vs/editor/common/model/tokens/treeSitter/treeSitterTree.d.ts +2 -0
- package/vscode/src/vs/editor/common/model/tokens/treeSitter/treeSitterTree.js +13 -2
- package/vscode/src/vs/editor/common/model.d.ts +8 -2
- package/vscode/src/vs/editor/common/services/editorWebWorker.d.ts +4 -0
- package/vscode/src/vs/editor/common/services/editorWebWorker.js +14 -0
- package/vscode/src/vs/editor/common/services/editorWorker.service.d.ts +4 -0
- package/vscode/src/vs/editor/common/services/findSectionHeaders.js +7 -0
- package/vscode/src/vs/editor/common/services/languageFeatures.service.d.ts +1 -2
- package/vscode/src/vs/editor/common/services/languageFeaturesService.d.ts +1 -2
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +0 -1
- package/vscode/src/vs/editor/common/services/model.service.d.ts +2 -1
- package/vscode/src/vs/editor/common/services/modelService.d.ts +2 -1
- package/vscode/src/vs/editor/common/services/modelService.js +3 -2
- package/vscode/src/vs/editor/common/services/textResourceConfiguration.service.d.ts +1 -1
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.d.ts +159 -157
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +160 -159
- package/vscode/src/vs/editor/common/standaloneStrings.js +50 -49
- package/vscode/src/vs/editor/common/textModelEditReason.d.ts +94 -12
- package/vscode/src/vs/editor/common/textModelEditReason.js +86 -20
- package/vscode/src/vs/editor/common/textModelEvents.d.ts +24 -0
- package/vscode/src/vs/editor/common/textModelEvents.js +33 -1
- package/vscode/src/vs/editor/common/tokens/lineTokens.d.ts +22 -1
- package/vscode/src/vs/editor/common/tokens/lineTokens.js +79 -2
- package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/vscode/src/vs/editor/common/viewModel/viewModelDecorations.d.ts +5 -1
- package/vscode/src/vs/editor/common/viewModel/viewModelDecorations.js +10 -4
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.d.ts +3 -1
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +39 -12
- package/vscode/src/vs/editor/common/viewModel/viewModelLines.d.ts +3 -3
- package/vscode/src/vs/editor/common/viewModel/viewModelLines.js +6 -6
- package/vscode/src/vs/editor/common/viewModel.d.ts +3 -1
- package/vscode/src/vs/editor/common/viewModel.js +2 -1
- package/vscode/src/vs/editor/common/viewModelEventDispatcher.d.ts +11 -3
- package/vscode/src/vs/editor/common/viewModelEventDispatcher.js +14 -1
- 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 +20 -20
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +3 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.css +2 -7
- 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/defaultDocumentColorProvider.js +3 -3
- 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/comment/browser/lineCommentCommand.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/comment/browser/lineCommentCommand.js +9 -5
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
- package/vscode/src/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/vscode/src/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +16 -16
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +29 -29
- 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/fontZoom/browser/fontZoom.js +3 -3
- package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/vscode/src/vs/editor/contrib/gpu/browser/gpuActions.js +10 -5
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +3 -3
- package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +10 -6
- package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.d.ts +0 -1
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +22 -47
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +19 -19
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +11 -11
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +11 -12
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +3 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/animation.d.ts +7 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/animation.js +5 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/changeRecorder.d.ts +3 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/changeRecorder.js +35 -30
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/ghostText.js +2 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/graph.d.ts +9 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/graph.js +66 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.d.ts +12 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +144 -100
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.d.ts +7 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +100 -49
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.d.ts +3 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.d.ts +4 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +37 -29
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.d.ts +39 -13
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +150 -162
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/structuredLogger.d.ts +0 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +2 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.d.ts +2 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +12 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +9 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +13 -10
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +2 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.d.ts +5 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.d.ts +5 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +5 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.d.ts +0 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +103 -62
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.d.ts +25 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +13 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +1 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +4 -6
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +7 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +16 -12
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.d.ts +3 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +34 -34
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +13 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +6 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.d.ts +2 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +20 -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 +4 -11
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +10 -7
- 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 +30 -30
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/vscode/src/vs/editor/contrib/links/browser/links.js +10 -10
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/vscode/src/vs/editor/contrib/middleScroll/browser/middleScroll.contribution.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/middleScroll/browser/middleScroll.contribution.js +5 -0
- package/vscode/src/vs/editor/contrib/middleScroll/browser/middleScroll.css +20 -0
- package/vscode/src/vs/editor/contrib/middleScroll/browser/middleScrollController.d.ts +9 -0
- package/vscode/src/vs/editor/contrib/middleScroll/browser/middleScrollController.js +132 -0
- package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +21 -17
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.css +0 -1
- package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +14 -12
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +6 -6
- package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.d.ts +2 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.d.ts +2 -1
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.js +3 -2
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css +24 -24
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +13 -13
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +18 -10
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.d.ts +4 -3
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +34 -39
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.d.ts +5 -6
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +65 -70
- package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +13 -11
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestInlineCompletions.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -18
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +4 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetStatus.js +1 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.d.ts +1 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +5 -2
- package/vscode/src/vs/platform/accessibility/browser/accessibleView.d.ts +1 -1
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +79 -69
- package/vscode/src/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -2
- package/vscode/src/vs/platform/actions/common/actions.d.ts +0 -1
- package/vscode/src/vs/platform/actions/common/actions.js +0 -1
- package/vscode/src/vs/platform/actions/common/menuResetAction.js +1 -1
- package/vscode/src/vs/platform/actions/common/menuService.js +2 -2
- package/vscode/src/vs/platform/configuration/common/configuration.js +4 -1
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +11 -11
- package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/vscode/src/vs/platform/contextkey/common/contextkey.js +11 -11
- 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/dialogs/common/dialogs.service.d.ts +1 -1
- package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
- package/vscode/src/vs/platform/environment/common/argv.d.ts +11 -0
- package/vscode/src/vs/platform/environment/common/environment.service.d.ts +0 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +19 -19
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.service.d.ts +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +7 -7
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +20 -20
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +9 -3
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +9 -3
- package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +2 -2
- package/vscode/src/vs/platform/files/common/files.d.ts +6 -1
- package/vscode/src/vs/platform/files/common/files.js +11 -7
- package/vscode/src/vs/platform/files/common/files.service.d.ts +1 -0
- package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.d.ts +2 -2
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/vscode/src/vs/platform/keybinding/common/keybinding.service.d.ts +2 -1
- package/vscode/src/vs/platform/languagePacks/common/languagePacks.service.d.ts +1 -1
- package/vscode/src/vs/platform/list/browser/listService.d.ts +1 -7
- package/vscode/src/vs/platform/list/browser/listService.js +27 -27
- package/vscode/src/vs/platform/log/common/log.d.ts +4 -0
- package/vscode/src/vs/platform/log/common/log.js +15 -7
- package/vscode/src/vs/platform/markers/common/markerService.js +4 -3
- package/vscode/src/vs/platform/markers/common/markers.d.ts +2 -0
- package/vscode/src/vs/platform/markers/common/markers.js +6 -6
- package/vscode/src/vs/platform/mcp/common/mcpManagement.service.d.ts +9 -4
- package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.service.d.ts +10 -0
- package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.service.js +6 -0
- package/vscode/src/vs/platform/notification/common/notification.d.ts +1 -0
- package/vscode/src/vs/platform/notification/common/notification.js +12 -2
- package/vscode/src/vs/platform/product/common/product.js +3 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +3 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +7 -6
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +7 -12
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +2 -1
- package/vscode/src/vs/platform/remote/common/remoteAgentEnvironment.d.ts +1 -0
- package/vscode/src/vs/platform/remote/common/remoteAuthorityResolver.d.ts +2 -2
- package/vscode/src/vs/platform/request/common/request.d.ts +1 -1
- package/vscode/src/vs/platform/request/common/request.js +18 -18
- package/vscode/src/vs/platform/request/common/request.service.d.ts +1 -1
- package/vscode/src/vs/platform/telemetry/common/commonProperties.d.ts +1 -1
- package/vscode/src/vs/platform/telemetry/common/telemetry.d.ts +2 -0
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -1
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -1
- package/vscode/src/vs/platform/terminal/common/terminal.service.d.ts +2 -1
- package/vscode/src/vs/platform/theme/browser/defaultStyles.d.ts +1 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.js +2 -2
- package/vscode/src/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/vscode/src/vs/platform/theme/common/colors/editorColors.d.ts +1 -0
- package/vscode/src/vs/platform/theme/common/colors/editorColors.js +95 -94
- package/vscode/src/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/vscode/src/vs/platform/theme/common/colors/listColors.js +36 -36
- package/vscode/src/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/vscode/src/vs/platform/theme/common/colors/miscColors.js +15 -15
- package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/vscode/src/vs/platform/theme/common/iconRegistry.js +6 -6
- package/vscode/src/vs/platform/theme/common/themeService.d.ts +1 -1
- package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +3 -1
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +6 -2
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.d.ts +2 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +7 -6
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.service.d.ts +1 -1
- package/vscode/src/vs/platform/window/common/window.d.ts +1 -0
- package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +5 -7
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +25 -24
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.d.ts +10 -4
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +109 -77
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +2 -1
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +22 -0
- package/vscode/src/vs/workbench/api/common/extHostCommands.js +3 -0
- package/vscode/src/vs/workbench/api/common/extHostCustomEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDocuments.d.ts +4 -2
- package/vscode/src/vs/workbench/api/common/extHostDocuments.js +35 -5
- package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +3 -4
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.d.ts +1 -5
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +34 -182
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +7 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +2 -3
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostMcp.d.ts +3 -1
- package/vscode/src/vs/workbench/api/common/extHostMcp.js +71 -20
- package/vscode/src/vs/workbench/api/common/extHostNotebook.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +7 -5
- package/vscode/src/vs/workbench/api/common/extHostNotebookEditor.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostSCM.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +7 -3
- package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.d.ts +4 -3
- package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.js +5 -2
- package/vscode/src/vs/workbench/api/common/extHostTextEditor.js +3 -0
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.d.ts +16 -7
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +20 -8
- package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +16 -13
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +11 -12
- package/vscode/src/vs/workbench/api/common/extHostWebviewMessaging.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHostWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +12 -12
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +31 -31
- package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
- package/vscode/src/vs/workbench/browser/contextkeys.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/contextkeys.js +6 -1
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.service.d.ts +1 -1
- package/vscode/src/vs/workbench/common/configuration.js +9 -9
- package/vscode/src/vs/workbench/common/contextkeys.d.ts +1 -0
- package/vscode/src/vs/workbench/common/contextkeys.js +73 -72
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/common/editor.d.ts +2 -1
- package/vscode/src/vs/workbench/common/editor.js +6 -6
- package/vscode/src/vs/workbench/common/theme.js +160 -160
- package/vscode/src/vs/workbench/common/views.js +4 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +157 -160
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.service.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.service.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +62 -41
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.d.ts +24 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.d.ts +29 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.d.ts +152 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariables.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/constants.js +11 -24
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +22 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/index.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/types.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/types.d.ts +2 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/{types.d.ts → promptsService.d.ts} +14 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/{types.service.d.ts → promptsService.service.d.ts} +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/tools/editFileTool.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/tools/editFileTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +15 -15
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +73 -65
- package/vscode/src/vs/workbench/contrib/debug/common/debugUtils.js +7 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/files/browser/files.service.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.d.ts +55 -9
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +29 -13
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.service.d.ts +16 -6
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.service.js +2 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocol.d.ts +119 -31
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocol.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/preferences/common/preferences.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.service.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/constants.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +10 -0
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +13 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalCompletionService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/constants.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +13 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webview.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.d.ts +1 -0
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.js +6 -4
- package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +4 -0
- package/vscode/src/vs/workbench/services/authentication/common/authentication.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/authentication/common/authenticationQuery.d.ts +132 -0
- package/vscode/src/vs/workbench/services/authentication/common/authenticationQuery.service.d.ts +20 -0
- package/vscode/src/vs/workbench/services/authentication/common/authenticationQuery.service.js +6 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.service.d.ts +2 -2
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/coreExperimentation/common/coreExperimentationService.service.d.ts +6 -0
- package/vscode/src/vs/workbench/services/coreExperimentation/common/coreExperimentationService.service.js +6 -0
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/services/environment/common/environmentService.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +84 -84
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +2 -2
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +17 -17
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.service.d.ts +5 -1
- package/vscode/src/vs/workbench/services/localization/common/locale.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.service.d.ts +16 -0
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.service.js +6 -0
- package/vscode/src/vs/workbench/services/outline/browser/outline.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/preferences/common/preferences.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +3 -3
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +1 -1
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyBackup.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyBackup.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyEditorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyService.service.d.ts +1 -1
- package/vscode-dts/vscode.proposed.authProviderSpecific.d.ts +30 -0
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +10 -0
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +10 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +139 -10
- package/vscode-dts/vscode.proposed.d.ts +3 -1
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +5 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +21 -4
- package/vscode-dts/vscode.proposed.languageModelDataPart.d.ts +1 -0
- package/vscode-dts/vscode.proposed.remoteCodingAgents.d.ts +8 -0
- package/vscode-dts/vscode.proposed.terminalCompletionProvider.d.ts +2 -0
- package/vscode-dts/vscode.proposed.textDocumentChangeReason.d.ts +30 -0
- package/workbench.d.ts +1 -1
- package/vscode/src/vs/base/browser/domImpl/domObservable.d.ts +0 -3
- package/vscode/src/vs/base/browser/domImpl/domObservable.js +0 -16
- package/vscode/src/vs/base/browser/domImpl/n.d.ts +0 -83
- package/vscode/src/vs/base/browser/domImpl/n.js +0 -283
- package/vscode/src/vs/editor/common/codecs/frontMatterCodec/tokens/index.d.ts +0 -5
- package/vscode/src/vs/editor/common/codecs/simpleCodec/tokens/index.d.ts +0 -20
- package/vscode/src/vs/editor/common/tokens/tokenArray.d.ts +0 -25
- package/vscode/src/vs/editor/common/tokens/tokenArray.js +0 -84
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineEditsAdapter.d.ts +0 -16
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineEditsAdapter.js +0 -94
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.d.ts +0 -243
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +0 -426
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.d.ts +0 -601
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +0 -1185
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.d.ts +0 -130
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +0 -235
- package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/index.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpConfigPathsService.service.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpConfigPathsService.service.js +0 -6
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExpService.service.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExpService.service.js +0 -6
- package/vscode-dts/vscode.proposed.inlineEdit.d.ts +0 -103
- /package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/{types.service.js → promptsService.service.js} +0 -0
|
@@ -13,15 +13,15 @@ import { URI } from '../../../base/common/uri.js';
|
|
|
13
13
|
import { generateUuid } from '../../../base/common/uuid.js';
|
|
14
14
|
import { Range as Range$1 } from '../../../editor/common/core/range.js';
|
|
15
15
|
import { Selection } from '../../../editor/common/core/selection.js';
|
|
16
|
-
import { NewSymbolNameTriggerKind as NewSymbolNameTriggerKind$1, CompletionItemInsertTextRule, InlineCompletionTriggerKind as InlineCompletionTriggerKind$1
|
|
16
|
+
import { NewSymbolNameTriggerKind as NewSymbolNameTriggerKind$1, CompletionItemInsertTextRule, InlineCompletionTriggerKind as InlineCompletionTriggerKind$1 } from '../../../editor/common/languages.js';
|
|
17
17
|
import { encodeSemanticTokensDto } from '../../../editor/common/services/semanticTokensDto.js';
|
|
18
18
|
import { localize } from '../../../nls.js';
|
|
19
19
|
import { ExtensionIdentifier } from '../../../platform/extensions/common/extensions.js';
|
|
20
|
-
import { isProposedApiEnabled
|
|
20
|
+
import { isProposedApiEnabled } from '../../services/extensions/common/extensions.js';
|
|
21
21
|
import { Cache } from './cache.js';
|
|
22
22
|
import { ISuggestResultDtoField, ISuggestDataDtoField, MainContext } from './extHost.protocol.js';
|
|
23
|
-
import { DocumentSymbol as DocumentSymbol$1, Range, SymbolTag, SymbolKind, DefinitionLink, Position, Hover, EvaluatableExpression, InlineValueContext, InlineValue, DocumentHighlight, MultiDocumentHighlight, location, Selection as Selection$1, CodeActionTriggerKind, WorkspaceEdit, Diagnostic, DataTransfer, DataTransferItem, TextEdit, WorkspaceSymbol, CompletionContext, MarkdownString, CompletionItemTag, CompletionItemKind, IconPath, PartialAcceptInfo, InlineCompletionEndOfLifeReason, SignatureHelp, InlayHintKind, DocumentLink, Color, ColorPresentation, FoldingRange, SelectionRange, CallHierarchyItem, TypeHierarchyItem, DocumentSelector } from './extHostTypeConverters.js';
|
|
24
|
-
import { DocumentSymbol, Range as Range$2, CodeActionKind, CodeAction, InternalDataTransferItem, DataTransfer as DataTransfer$1, DocumentDropOrPasteEditKind, NewSymbolNameTriggerKind, SemanticTokens, SemanticTokensEdits, SemanticTokensEdit, CompletionList, SnippetString, InlineCompletionTriggerKind,
|
|
23
|
+
import { DocumentSymbol as DocumentSymbol$1, Range, SymbolTag, SymbolKind, DefinitionLink, Position, Hover, EvaluatableExpression, InlineValueContext, InlineValue, DocumentHighlight, MultiDocumentHighlight, location, Selection as Selection$1, CodeActionTriggerKind, WorkspaceEdit, Diagnostic, DataTransfer, DataTransferItem, TextEdit, WorkspaceSymbol, CompletionContext, MarkdownString, CompletionItemTag, CompletionItemKind, CompletionCommand, IconPath, PartialAcceptInfo, InlineCompletionEndOfLifeReason, SignatureHelp, InlayHintKind, DocumentLink, Color, ColorPresentation, FoldingRange, SelectionRange, CallHierarchyItem, TypeHierarchyItem, DocumentSelector } from './extHostTypeConverters.js';
|
|
24
|
+
import { DocumentSymbol, Range as Range$2, CodeActionKind, CodeAction, InternalDataTransferItem, DataTransfer as DataTransfer$1, DocumentDropOrPasteEditKind, NewSymbolNameTriggerKind, SemanticTokens, SemanticTokensEdits, SemanticTokensEdit, CompletionList, SnippetString, InlineCompletionTriggerKind, InlineCompletionsDisposeReasonKind, Location, Disposable, SyntaxTokenType } from './extHostTypes.js';
|
|
25
25
|
|
|
26
26
|
class DocumentSymbolAdapter {
|
|
27
27
|
constructor(_documents, _provider) {
|
|
@@ -541,7 +541,7 @@ class DocumentPasteEditProvider {
|
|
|
541
541
|
return (edits.map((edit, i) => ({
|
|
542
542
|
_cacheId: [cacheId, i],
|
|
543
543
|
title: edit.title ?? ( localize(
|
|
544
|
-
|
|
544
|
+
2598,
|
|
545
545
|
"Paste using '{0}' extension",
|
|
546
546
|
this._extension.displayName || this._extension.name
|
|
547
547
|
)),
|
|
@@ -1109,10 +1109,7 @@ class InlineCompletionAdapter {
|
|
|
1109
1109
|
if (!result) {
|
|
1110
1110
|
return undefined;
|
|
1111
1111
|
}
|
|
1112
|
-
|
|
1113
|
-
return undefined;
|
|
1114
|
-
}
|
|
1115
|
-
const normalizedResult = Array.isArray(result) ? result : result.items;
|
|
1112
|
+
const { resultItems, list } = Array.isArray(result) ? { resultItems: result, list: undefined } : { resultItems: result.items, list: result };
|
|
1116
1113
|
const commands = this._isAdditionsProposedApiEnabled ? Array.isArray(result) ? [] : result.commands || [] : [];
|
|
1117
1114
|
const enableForwardStability = this._isAdditionsProposedApiEnabled && !Array.isArray(result) ? result.enableForwardStability : undefined;
|
|
1118
1115
|
let disposableStore = undefined;
|
|
@@ -1120,11 +1117,12 @@ class InlineCompletionAdapter {
|
|
|
1120
1117
|
dispose() {
|
|
1121
1118
|
disposableStore?.dispose();
|
|
1122
1119
|
},
|
|
1123
|
-
items:
|
|
1120
|
+
items: resultItems,
|
|
1121
|
+
list,
|
|
1124
1122
|
});
|
|
1125
1123
|
return {
|
|
1126
1124
|
pid,
|
|
1127
|
-
items: (
|
|
1125
|
+
items: ( resultItems.map((item, idx) => {
|
|
1128
1126
|
let command = undefined;
|
|
1129
1127
|
if (item.command) {
|
|
1130
1128
|
if (!disposableStore) {
|
|
@@ -1165,85 +1163,33 @@ class InlineCompletionAdapter {
|
|
|
1165
1163
|
if (!disposableStore) {
|
|
1166
1164
|
disposableStore = ( new DisposableStore());
|
|
1167
1165
|
}
|
|
1168
|
-
return
|
|
1166
|
+
return CompletionCommand.from(c, this._commands, disposableStore);
|
|
1169
1167
|
})),
|
|
1170
1168
|
suppressSuggestions: false,
|
|
1171
1169
|
enableForwardStability,
|
|
1172
1170
|
};
|
|
1173
1171
|
}
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1172
|
+
disposeCompletions(pid, reason) {
|
|
1173
|
+
const completionList = this._references.get(pid);
|
|
1174
|
+
if (this._provider.handleListEndOfLifetime && this._isAdditionsProposedApiEnabled && completionList?.list) {
|
|
1175
|
+
function translateReason(reason) {
|
|
1176
|
+
switch (reason.kind) {
|
|
1177
|
+
case 'lostRace':
|
|
1178
|
+
return { kind: InlineCompletionsDisposeReasonKind.LostRace };
|
|
1179
|
+
case 'tokenCancellation':
|
|
1180
|
+
return { kind: InlineCompletionsDisposeReasonKind.TokenCancellation };
|
|
1181
|
+
case 'other':
|
|
1182
|
+
return { kind: InlineCompletionsDisposeReasonKind.Other };
|
|
1183
|
+
case 'empty':
|
|
1184
|
+
return { kind: InlineCompletionsDisposeReasonKind.Empty };
|
|
1185
|
+
case 'notTaken':
|
|
1186
|
+
return { kind: InlineCompletionsDisposeReasonKind.NotTaken };
|
|
1187
|
+
default:
|
|
1188
|
+
return { kind: InlineCompletionsDisposeReasonKind.Other };
|
|
1186
1189
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
userPrompt: context.userPrompt,
|
|
1190
|
-
requestUuid: context.requestUuid,
|
|
1191
|
-
}, token);
|
|
1192
|
-
if (!result) {
|
|
1193
|
-
return undefined;
|
|
1194
|
-
}
|
|
1195
|
-
if (token.isCancellationRequested) {
|
|
1196
|
-
return undefined;
|
|
1190
|
+
}
|
|
1191
|
+
this._provider.handleListEndOfLifetime(completionList.list, translateReason(reason));
|
|
1197
1192
|
}
|
|
1198
|
-
const normalizedResult = Array.isArray(result) ? result : result.items;
|
|
1199
|
-
const commands = this._isAdditionsProposedApiEnabled ? Array.isArray(result) ? [] : result.commands || [] : [];
|
|
1200
|
-
const enableForwardStability = this._isAdditionsProposedApiEnabled && !Array.isArray(result) ? result.enableForwardStability : undefined;
|
|
1201
|
-
let disposableStore = undefined;
|
|
1202
|
-
const pid = this._references.createReferenceId({
|
|
1203
|
-
dispose() {
|
|
1204
|
-
disposableStore?.dispose();
|
|
1205
|
-
},
|
|
1206
|
-
items: normalizedResult
|
|
1207
|
-
});
|
|
1208
|
-
return {
|
|
1209
|
-
pid,
|
|
1210
|
-
items: ( normalizedResult.map((item, idx) => {
|
|
1211
|
-
let command = undefined;
|
|
1212
|
-
if (item.command) {
|
|
1213
|
-
if (!disposableStore) {
|
|
1214
|
-
disposableStore = ( new DisposableStore());
|
|
1215
|
-
}
|
|
1216
|
-
command = this._commands.toInternal(item.command, disposableStore);
|
|
1217
|
-
}
|
|
1218
|
-
let action = undefined;
|
|
1219
|
-
if (item.action) {
|
|
1220
|
-
if (!disposableStore) {
|
|
1221
|
-
disposableStore = ( new DisposableStore());
|
|
1222
|
-
}
|
|
1223
|
-
action = this._commands.toInternal(item.action, disposableStore);
|
|
1224
|
-
}
|
|
1225
|
-
const insertText = item.insertText;
|
|
1226
|
-
return ({
|
|
1227
|
-
insertText: typeof insertText === 'string' ? insertText : { snippet: insertText.value },
|
|
1228
|
-
filterText: item.filterText,
|
|
1229
|
-
range: item.range ? Range.from(item.range) : undefined,
|
|
1230
|
-
command,
|
|
1231
|
-
action,
|
|
1232
|
-
idx: idx,
|
|
1233
|
-
completeBracketPairs: this._isAdditionsProposedApiEnabled ? item.completeBracketPairs : false,
|
|
1234
|
-
});
|
|
1235
|
-
})),
|
|
1236
|
-
commands: ( commands.map(c => {
|
|
1237
|
-
if (!disposableStore) {
|
|
1238
|
-
disposableStore = ( new DisposableStore());
|
|
1239
|
-
}
|
|
1240
|
-
return this._commands.toInternal(c, disposableStore);
|
|
1241
|
-
})),
|
|
1242
|
-
suppressSuggestions: false,
|
|
1243
|
-
enableForwardStability,
|
|
1244
|
-
};
|
|
1245
|
-
}
|
|
1246
|
-
disposeCompletions(pid) {
|
|
1247
1193
|
const data = this._references.disposeReferenceId(pid);
|
|
1248
1194
|
data?.dispose();
|
|
1249
1195
|
}
|
|
@@ -1282,85 +1228,6 @@ class InlineCompletionAdapter {
|
|
|
1282
1228
|
}
|
|
1283
1229
|
}
|
|
1284
1230
|
}
|
|
1285
|
-
class InlineEditAdapter {
|
|
1286
|
-
async provideInlineEdits(uri, context, token) {
|
|
1287
|
-
const doc = this._documents.getDocument(uri);
|
|
1288
|
-
const result = await this._provider.provideInlineEdit(doc, {
|
|
1289
|
-
triggerKind: this.languageTriggerKindToVSCodeTriggerKind[context.triggerKind],
|
|
1290
|
-
requestUuid: context.requestUuid,
|
|
1291
|
-
}, token);
|
|
1292
|
-
if (!result) {
|
|
1293
|
-
return undefined;
|
|
1294
|
-
}
|
|
1295
|
-
if (token.isCancellationRequested) {
|
|
1296
|
-
return undefined;
|
|
1297
|
-
}
|
|
1298
|
-
let disposableStore = undefined;
|
|
1299
|
-
const pid = this._references.createReferenceId({
|
|
1300
|
-
dispose() {
|
|
1301
|
-
disposableStore?.dispose();
|
|
1302
|
-
},
|
|
1303
|
-
item: result
|
|
1304
|
-
});
|
|
1305
|
-
let acceptCommand = undefined;
|
|
1306
|
-
if (result.accepted) {
|
|
1307
|
-
if (!disposableStore) {
|
|
1308
|
-
disposableStore = ( new DisposableStore());
|
|
1309
|
-
}
|
|
1310
|
-
acceptCommand = this._commands.toInternal(result.accepted, disposableStore);
|
|
1311
|
-
}
|
|
1312
|
-
let rejectCommand = undefined;
|
|
1313
|
-
if (result.rejected) {
|
|
1314
|
-
if (!disposableStore) {
|
|
1315
|
-
disposableStore = ( new DisposableStore());
|
|
1316
|
-
}
|
|
1317
|
-
rejectCommand = this._commands.toInternal(result.rejected, disposableStore);
|
|
1318
|
-
}
|
|
1319
|
-
let shownCommand = undefined;
|
|
1320
|
-
if (result.shown) {
|
|
1321
|
-
if (!disposableStore) {
|
|
1322
|
-
disposableStore = ( new DisposableStore());
|
|
1323
|
-
}
|
|
1324
|
-
shownCommand = this._commands.toInternal(result.shown, disposableStore);
|
|
1325
|
-
}
|
|
1326
|
-
let action = undefined;
|
|
1327
|
-
if (result.action) {
|
|
1328
|
-
if (!disposableStore) {
|
|
1329
|
-
disposableStore = ( new DisposableStore());
|
|
1330
|
-
}
|
|
1331
|
-
action = this._commands.toInternal(result.action, disposableStore);
|
|
1332
|
-
}
|
|
1333
|
-
if (!disposableStore) {
|
|
1334
|
-
disposableStore = ( new DisposableStore());
|
|
1335
|
-
}
|
|
1336
|
-
const langResult = {
|
|
1337
|
-
pid,
|
|
1338
|
-
text: result.text,
|
|
1339
|
-
range: Range.from(result.range),
|
|
1340
|
-
showRange: Range.from(result.showRange),
|
|
1341
|
-
accepted: acceptCommand,
|
|
1342
|
-
rejected: rejectCommand,
|
|
1343
|
-
shown: shownCommand,
|
|
1344
|
-
action,
|
|
1345
|
-
commands: result.commands?.map(c => this._commands.toInternal(c, disposableStore)),
|
|
1346
|
-
};
|
|
1347
|
-
return langResult;
|
|
1348
|
-
}
|
|
1349
|
-
disposeEdit(pid) {
|
|
1350
|
-
const data = this._references.disposeReferenceId(pid);
|
|
1351
|
-
data?.dispose();
|
|
1352
|
-
}
|
|
1353
|
-
constructor(_extension, _documents, _provider, _commands) {
|
|
1354
|
-
this._documents = _documents;
|
|
1355
|
-
this._provider = _provider;
|
|
1356
|
-
this._commands = _commands;
|
|
1357
|
-
this._references = ( new ReferenceMap());
|
|
1358
|
-
this.languageTriggerKindToVSCodeTriggerKind = {
|
|
1359
|
-
[InlineEditTriggerKind$1.Automatic]: InlineEditTriggerKind.Automatic,
|
|
1360
|
-
[InlineEditTriggerKind$1.Invoke]: InlineEditTriggerKind.Invoke,
|
|
1361
|
-
};
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
1231
|
class ReferenceMap {
|
|
1365
1232
|
constructor() {
|
|
1366
1233
|
this._references = ( new Map());
|
|
@@ -1818,7 +1685,7 @@ class DocumentDropEditAdapter {
|
|
|
1818
1685
|
return (editsArray.map((edit, i) => ({
|
|
1819
1686
|
_cacheId: [cacheId, i],
|
|
1820
1687
|
title: edit.title ?? ( localize(
|
|
1821
|
-
|
|
1688
|
+
2599,
|
|
1822
1689
|
"Drop using '{0}' extension",
|
|
1823
1690
|
this._extension.displayName || this._extension.name
|
|
1824
1691
|
)),
|
|
@@ -2201,14 +2068,11 @@ class ExtHostLanguageFeatures {
|
|
|
2201
2068
|
const subscription = provider.onDidChange(_ => this._proxy.$emitInlineCompletionsChange(eventHandle));
|
|
2202
2069
|
result = Disposable.from(result, subscription);
|
|
2203
2070
|
}
|
|
2204
|
-
this._proxy.$registerInlineCompletionsSupport(handle, this._transformDocumentSelector(selector, extension), adapter.supportsHandleEvents, ExtensionIdentifier.toKey(extension.identifier.value), metadata?.yieldTo?.map(extId => ExtensionIdentifier.toKey(extId)) || [], metadata?.displayName, metadata?.debounceDelayMs, eventHandle);
|
|
2071
|
+
this._proxy.$registerInlineCompletionsSupport(handle, this._transformDocumentSelector(selector, extension), adapter.supportsHandleEvents, ExtensionIdentifier.toKey(extension.identifier.value), extension.version, metadata?.groupId ? ExtensionIdentifier.toKey(metadata.groupId) : undefined, metadata?.yieldTo?.map(extId => ExtensionIdentifier.toKey(extId)) || [], metadata?.displayName, metadata?.debounceDelayMs, eventHandle);
|
|
2205
2072
|
return result;
|
|
2206
2073
|
}
|
|
2207
2074
|
$provideInlineCompletions(handle, resource, position, context, token) {
|
|
2208
|
-
return this._withAdapter(handle, InlineCompletionAdapter, adapter => adapter.provideInlineCompletions(URI.revive(resource), position, context, token), undefined,
|
|
2209
|
-
}
|
|
2210
|
-
$provideInlineEditsForRange(handle, resource, range, context, token) {
|
|
2211
|
-
return this._withAdapter(handle, InlineCompletionAdapter, adapter => adapter.provideInlineEditsForRange(URI.revive(resource), range, context, token), undefined, token);
|
|
2075
|
+
return this._withAdapter(handle, InlineCompletionAdapter, adapter => adapter.provideInlineCompletions(URI.revive(resource), position, context, token), undefined, undefined);
|
|
2212
2076
|
}
|
|
2213
2077
|
$handleInlineCompletionDidShow(handle, pid, idx, updatedInsertText) {
|
|
2214
2078
|
this._withAdapter(handle, InlineCompletionAdapter, async (adapter) => {
|
|
@@ -2230,20 +2094,8 @@ class ExtHostLanguageFeatures {
|
|
|
2230
2094
|
adapter.handleRejection(pid, idx);
|
|
2231
2095
|
}, undefined, undefined);
|
|
2232
2096
|
}
|
|
2233
|
-
$freeInlineCompletionsList(handle, pid) {
|
|
2234
|
-
this._withAdapter(handle, InlineCompletionAdapter, async (adapter) => { adapter.disposeCompletions(pid); }, undefined, undefined);
|
|
2235
|
-
}
|
|
2236
|
-
registerInlineEditProvider(extension, selector, provider) {
|
|
2237
|
-
const adapter = ( new InlineEditAdapter(extension, this._documents, provider, this._commands.converter));
|
|
2238
|
-
const handle = this._addNewAdapter(adapter, extension);
|
|
2239
|
-
this._proxy.$registerInlineEditProvider(handle, this._transformDocumentSelector(selector, extension), extension.identifier, provider.displayName || extension.name);
|
|
2240
|
-
return this._createDisposable(handle);
|
|
2241
|
-
}
|
|
2242
|
-
$provideInlineEdit(handle, resource, context, token) {
|
|
2243
|
-
return this._withAdapter(handle, InlineEditAdapter, adapter => adapter.provideInlineEdits(URI.revive(resource), context, token), undefined, token);
|
|
2244
|
-
}
|
|
2245
|
-
$freeInlineEdit(handle, pid) {
|
|
2246
|
-
this._withAdapter(handle, InlineEditAdapter, async (adapter) => { adapter.disposeEdit(pid); }, undefined, undefined);
|
|
2097
|
+
$freeInlineCompletionsList(handle, pid, reason) {
|
|
2098
|
+
this._withAdapter(handle, InlineCompletionAdapter, async (adapter) => { adapter.disposeCompletions(pid, reason); }, undefined, undefined);
|
|
2247
2099
|
}
|
|
2248
2100
|
registerSignatureHelpProvider(extension, selector, provider, metadataOrTriggerChars) {
|
|
2249
2101
|
const metadata = Array.isArray(metadataOrTriggerChars)
|
|
@@ -2,7 +2,7 @@ import type * as vscode from "vscode";
|
|
|
2
2
|
import { CancellationToken } from "../../../base/common/cancellation.js";
|
|
3
3
|
import { IDisposable } from "../../../base/common/lifecycle.js";
|
|
4
4
|
import { IExtensionDescription } from "../../../platform/extensions/common/extensions.js";
|
|
5
|
-
import { IPreparedToolInvocation, IToolInvocation, IToolResult } from "../../contrib/chat/common/languageModelToolsService.js";
|
|
5
|
+
import { IPreparedToolInvocation, IToolInvocation, IToolInvocationPreparationContext, IToolResult } from "../../contrib/chat/common/languageModelToolsService.js";
|
|
6
6
|
import { Dto, SerializableObjectWithBuffers } from "../../services/extensions/common/proxyIdentifier.js";
|
|
7
7
|
import { ExtHostLanguageModelToolsShape, IMainContext, IToolDataDto } from "./extHost.protocol.js";
|
|
8
8
|
import { ExtHostLanguageModels } from "./extHostLanguageModels.js";
|
|
@@ -19,6 +19,6 @@ export declare class ExtHostLanguageModelTools implements ExtHostLanguageModelTo
|
|
|
19
19
|
getTools(extension: IExtensionDescription): vscode.LanguageModelToolInformation[];
|
|
20
20
|
$invokeTool(dto: IToolInvocation, token: CancellationToken): Promise<Dto<IToolResult> | SerializableObjectWithBuffers<Dto<IToolResult>>>;
|
|
21
21
|
private getModel;
|
|
22
|
-
$prepareToolInvocation(toolId: string,
|
|
22
|
+
$prepareToolInvocation(toolId: string, context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
23
23
|
registerTool(extension: IExtensionDescription, id: string, tool: vscode.LanguageModelTool<any>): IDisposable;
|
|
24
24
|
}
|
|
@@ -173,12 +173,17 @@ class ExtHostLanguageModelTools {
|
|
|
173
173
|
}
|
|
174
174
|
return model;
|
|
175
175
|
}
|
|
176
|
-
async $prepareToolInvocation(toolId,
|
|
176
|
+
async $prepareToolInvocation(toolId, context, token) {
|
|
177
177
|
const item = this._registeredTools.get(toolId);
|
|
178
178
|
if (!item) {
|
|
179
179
|
throw ( new Error(`Unknown tool ${toolId}`));
|
|
180
180
|
}
|
|
181
|
-
const options = {
|
|
181
|
+
const options = {
|
|
182
|
+
input: context.parameters,
|
|
183
|
+
chatRequestId: context.chatRequestId,
|
|
184
|
+
chatSessionId: context.chatSessionId,
|
|
185
|
+
chatInteractionId: context.chatInteractionId
|
|
186
|
+
};
|
|
182
187
|
if (isProposedApiEnabled(item.extension, 'chatParticipantPrivate') && item.tool.prepareInvocation2) {
|
|
183
188
|
const result = await item.tool.prepareInvocation2(options, token);
|
|
184
189
|
if (!result) {
|
|
@@ -21,7 +21,6 @@ import { LanguageModelChatMessage2 } from './extHostTypeConverters.js';
|
|
|
21
21
|
import { LanguageModelTextPart, LanguageModelToolCallPart, LanguageModelDataPart, LanguageModelError, LanguageModelChatMessageRole } from './extHostTypes.js';
|
|
22
22
|
import { SerializableObjectWithBuffers } from '../../services/extensions/common/proxyIdentifier.js';
|
|
23
23
|
import { VSBuffer } from '../../../base/common/buffer.js';
|
|
24
|
-
import { DEFAULT_MODEL_PICKER_CATEGORY } from '../../contrib/chat/common/modelPicker/modelPickerWidget.js';
|
|
25
24
|
|
|
26
25
|
var ExtHostLanguageModels_1;
|
|
27
26
|
const IExtHostLanguageModels = ( createDecorator('IExtHostLanguageModels'));
|
|
@@ -161,7 +160,7 @@ let ExtHostLanguageModels = class ExtHostLanguageModels {
|
|
|
161
160
|
targetExtensions: metadata.extensions,
|
|
162
161
|
isDefault: metadata.isDefault,
|
|
163
162
|
isUserSelectable: metadata.isUserSelectable,
|
|
164
|
-
modelPickerCategory: metadata.category
|
|
163
|
+
modelPickerCategory: metadata.category,
|
|
165
164
|
capabilities: metadata.capabilities,
|
|
166
165
|
});
|
|
167
166
|
const responseReceivedListener = provider.onDidReceiveLanguageModelResponse2?.(({ extensionId, participant, tokenCount }) => {
|
|
@@ -382,7 +381,7 @@ let ExtHostLanguageModels = class ExtHostLanguageModels {
|
|
|
382
381
|
}
|
|
383
382
|
try {
|
|
384
383
|
const detail = justification
|
|
385
|
-
? ( localize(
|
|
384
|
+
? ( localize(2600, "Justification: {1}", to.displayName, justification))
|
|
386
385
|
: undefined;
|
|
387
386
|
await this._extHostAuthentication.getSession(from, providerId, [], { forceNewSession: { detail } });
|
|
388
387
|
this.$updateModelAccesslist([{ from: from.identifier, to: to.identifier, enabled: true }]);
|
|
@@ -8,7 +8,7 @@ import { IExtHostInitDataService } from './extHostInitDataService.js';
|
|
|
8
8
|
let ExtHostLogService = class ExtHostLogService extends LogService {
|
|
9
9
|
constructor(isWorker, loggerService, initData) {
|
|
10
10
|
const id = initData.remote.isRemote ? 'remoteexthost' : isWorker ? 'workerexthost' : 'exthost';
|
|
11
|
-
const name = initData.remote.isRemote ? ( localize(
|
|
11
|
+
const name = initData.remote.isRemote ? ( localize(2601, "Extension Host (Remote)")) : isWorker ? ( localize(2602, "Extension Host (Worker)")) : ( localize(2603, "Extension Host"));
|
|
12
12
|
super(loggerService.createLogger(id, { name }));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as vscode from "vscode";
|
|
2
2
|
import { Disposable, IDisposable } from "../../../base/common/lifecycle.js";
|
|
3
3
|
import { IExtensionDescription } from "../../../platform/extensions/common/extensions.js";
|
|
4
|
+
import { ILogService } from "../../../platform/log/common/log.service.js";
|
|
4
5
|
import { McpServerLaunch } from "../../contrib/mcp/common/mcpTypes.js";
|
|
5
6
|
import { ExtHostMcpShape, MainThreadMcpShape } from "./extHost.protocol.js";
|
|
6
7
|
import { IExtHostRpcService } from "./extHostRpcService.js";
|
|
@@ -10,12 +11,13 @@ export interface IExtHostMpcService extends ExtHostMcpShape {
|
|
|
10
11
|
registerMcpConfigurationProvider(extension: IExtensionDescription, id: string, provider: vscode.McpServerDefinitionProvider): IDisposable;
|
|
11
12
|
}
|
|
12
13
|
export declare class ExtHostMcpService extends Disposable implements IExtHostMpcService {
|
|
14
|
+
private readonly _logService;
|
|
13
15
|
private readonly _extHostInitData;
|
|
14
16
|
protected _proxy: MainThreadMcpShape;
|
|
15
17
|
private readonly _initialProviderPromises;
|
|
16
18
|
private readonly _sseEventSources;
|
|
17
19
|
private readonly _unresolvedMcpServers;
|
|
18
|
-
constructor(extHostRpc: IExtHostRpcService, _extHostInitData: IExtHostInitDataService);
|
|
20
|
+
constructor(extHostRpc: IExtHostRpcService, _logService: ILogService, _extHostInitData: IExtHostInitDataService);
|
|
19
21
|
$startMcp(id: number, launch: McpServerLaunch.Serialized): void;
|
|
20
22
|
protected _startMcp(id: number, launch: McpServerLaunch): void;
|
|
21
23
|
$stopMcp(id: number): void;
|
|
@@ -6,13 +6,14 @@ import { Disposable, DisposableMap, DisposableStore, toDisposable } from '../../
|
|
|
6
6
|
import { SSEParser } from '../../../base/common/sseParser.js';
|
|
7
7
|
import { ExtensionIdentifier } from '../../../platform/extensions/common/extensions.js';
|
|
8
8
|
import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';
|
|
9
|
-
import { LogLevel } from '../../../platform/log/common/log.js';
|
|
9
|
+
import { LogLevel, canLog } from '../../../platform/log/common/log.js';
|
|
10
|
+
import { ILogService } from '../../../platform/log/common/log.service.js';
|
|
10
11
|
import { StorageScope } from '../../../platform/storage/common/storage.js';
|
|
11
12
|
import { McpServerLaunch, McpServerTransportType, McpConnectionState, extensionPrefixedIdentifier } from '../../contrib/mcp/common/mcpTypes.js';
|
|
12
13
|
import { MainContext } from './extHost.protocol.js';
|
|
13
14
|
import { IExtHostRpcService } from './extHostRpcService.js';
|
|
14
15
|
import { McpServerDefinition } from './extHostTypeConverters.js';
|
|
15
|
-
import { parseWWWAuthenticateHeader, getMetadataWithDefaultValues, getDefaultMetadataForUrl, isAuthorizationProtectedResourceMetadata, AUTH_SERVER_METADATA_DISCOVERY_PATH, isAuthorizationServerMetadata } from '../../../base/common/oauth.js';
|
|
16
|
+
import { parseWWWAuthenticateHeader, getMetadataWithDefaultValues, getDefaultMetadataForUrl, isAuthorizationProtectedResourceMetadata, getResourceServerBaseUrlFromDiscoveryUrl, AUTH_SERVER_METADATA_DISCOVERY_PATH, isAuthorizationServerMetadata } from '../../../base/common/oauth.js';
|
|
16
17
|
import { URI } from '../../../base/common/uri.js';
|
|
17
18
|
import { MCP } from '../../contrib/mcp/common/modelContextProtocol.js';
|
|
18
19
|
import { CancellationError } from '../../../base/common/errors.js';
|
|
@@ -21,8 +22,9 @@ import { IExtHostInitDataService } from './extHostInitDataService.js';
|
|
|
21
22
|
|
|
22
23
|
const IExtHostMpcService = ( createDecorator('IExtHostMpcService'));
|
|
23
24
|
let ExtHostMcpService = class ExtHostMcpService extends Disposable {
|
|
24
|
-
constructor(extHostRpc, _extHostInitData) {
|
|
25
|
+
constructor(extHostRpc, _logService, _extHostInitData) {
|
|
25
26
|
super();
|
|
27
|
+
this._logService = _logService;
|
|
26
28
|
this._extHostInitData = _extHostInitData;
|
|
27
29
|
this._initialProviderPromises = ( new Set());
|
|
28
30
|
this._sseEventSources = this._register(( new DisposableMap()));
|
|
@@ -34,7 +36,7 @@ let ExtHostMcpService = class ExtHostMcpService extends Disposable {
|
|
|
34
36
|
}
|
|
35
37
|
_startMcp(id, launch) {
|
|
36
38
|
if (launch.type === McpServerTransportType.HTTP) {
|
|
37
|
-
this._sseEventSources.set(id, ( new McpHTTPHandle(id, launch, this._proxy)));
|
|
39
|
+
this._sseEventSources.set(id, ( new McpHTTPHandle(id, launch, this._proxy, this._logService)));
|
|
38
40
|
return;
|
|
39
41
|
}
|
|
40
42
|
throw ( new Error('not implemented'));
|
|
@@ -130,7 +132,8 @@ let ExtHostMcpService = class ExtHostMcpService extends Disposable {
|
|
|
130
132
|
};
|
|
131
133
|
ExtHostMcpService = ( __decorate([
|
|
132
134
|
( __param(0, IExtHostRpcService)),
|
|
133
|
-
( __param(1,
|
|
135
|
+
( __param(1, ILogService)),
|
|
136
|
+
( __param(2, IExtHostInitDataService))
|
|
134
137
|
], ExtHostMcpService));
|
|
135
138
|
var HttpMode;
|
|
136
139
|
(function (HttpMode) {
|
|
@@ -138,12 +141,15 @@ var HttpMode;
|
|
|
138
141
|
HttpMode[HttpMode["Http"] = 1] = "Http";
|
|
139
142
|
HttpMode[HttpMode["SSE"] = 2] = "SSE";
|
|
140
143
|
})(HttpMode || (HttpMode = {}));
|
|
144
|
+
const MAX_FOLLOW_REDIRECTS = 5;
|
|
145
|
+
const REDIRECT_STATUS_CODES = [301, 302, 303, 307, 308];
|
|
141
146
|
class McpHTTPHandle extends Disposable {
|
|
142
|
-
constructor(_id, _launch, _proxy) {
|
|
147
|
+
constructor(_id, _launch, _proxy, _logService) {
|
|
143
148
|
super();
|
|
144
149
|
this._id = _id;
|
|
145
150
|
this._launch = _launch;
|
|
146
151
|
this._proxy = _proxy;
|
|
152
|
+
this._logService = _logService;
|
|
147
153
|
this._requestSequencer = ( new Sequencer());
|
|
148
154
|
this._postEndpoint = ( new DeferredPromise());
|
|
149
155
|
this._mode = { value: HttpMode.Unknown };
|
|
@@ -185,7 +191,6 @@ class McpHTTPHandle extends Disposable {
|
|
|
185
191
|
await this._addAuthHeader(headers);
|
|
186
192
|
const res = await this._fetchWithAuthRetry(( this._launch.uri.toString(true)), {
|
|
187
193
|
method: 'POST',
|
|
188
|
-
signal: this._abortCtrl.signal,
|
|
189
194
|
headers,
|
|
190
195
|
body: asBytes,
|
|
191
196
|
}, headers);
|
|
@@ -205,7 +210,7 @@ class McpHTTPHandle extends Disposable {
|
|
|
205
210
|
const retryWithSessionId = this._mode.value === HttpMode.Http && !!this._mode.sessionId && (res.status === 400 || res.status === 404);
|
|
206
211
|
this._proxy.$onDidChangeState(this._id, {
|
|
207
212
|
state: McpConnectionState.Kind.Error,
|
|
208
|
-
message: `${res.status} status sending message to ${this._launch.uri}: ${await this._getErrText(res)}` + retryWithSessionId ? `; will retry with new session ID` : '',
|
|
213
|
+
message: `${res.status} status sending message to ${this._launch.uri}: ${await this._getErrText(res)}` + (retryWithSessionId ? `; will retry with new session ID` : ''),
|
|
209
214
|
shouldRetry: retryWithSessionId,
|
|
210
215
|
});
|
|
211
216
|
return;
|
|
@@ -281,9 +286,8 @@ class McpHTTPHandle extends Disposable {
|
|
|
281
286
|
...Object.fromEntries(this._launch.headers)
|
|
282
287
|
};
|
|
283
288
|
}
|
|
284
|
-
const resourceMetadataResponse = await
|
|
289
|
+
const resourceMetadataResponse = await this._fetch(resourceMetadata, {
|
|
285
290
|
method: 'GET',
|
|
286
|
-
signal: this._abortCtrl.signal,
|
|
287
291
|
headers: {
|
|
288
292
|
...additionalHeaders,
|
|
289
293
|
'Accept': 'application/json',
|
|
@@ -297,6 +301,12 @@ class McpHTTPHandle extends Disposable {
|
|
|
297
301
|
}
|
|
298
302
|
const body = await resourceMetadataResponse.json();
|
|
299
303
|
if (isAuthorizationProtectedResourceMetadata(body)) {
|
|
304
|
+
const resolvedResource = getResourceServerBaseUrlFromDiscoveryUrl(resourceMetadata);
|
|
305
|
+
if (body.resource !== resolvedResource) {
|
|
306
|
+
throw ( new Error(
|
|
307
|
+
`Protected Resource Metadata resource "${body.resource}" does not match MCP server resolved resource "${resolvedResource}". The MCP server must follow OAuth spec https://datatracker.ietf.org/doc/html/rfc9728#PRConfigurationValidation`
|
|
308
|
+
));
|
|
309
|
+
}
|
|
300
310
|
return body;
|
|
301
311
|
}
|
|
302
312
|
else {
|
|
@@ -307,9 +317,8 @@ class McpHTTPHandle extends Disposable {
|
|
|
307
317
|
const authorizationServerUrl = ( new URL(authorizationServer));
|
|
308
318
|
const extraPath = authorizationServerUrl.pathname === '/' ? '' : authorizationServerUrl.pathname;
|
|
309
319
|
const pathToFetch = ( ( new URL(AUTH_SERVER_METADATA_DISCOVERY_PATH, authorizationServer)).toString()) + extraPath;
|
|
310
|
-
let authServerMetadataResponse = await
|
|
320
|
+
let authServerMetadataResponse = await this._fetch(pathToFetch, {
|
|
311
321
|
method: 'GET',
|
|
312
|
-
signal: this._abortCtrl.signal,
|
|
313
322
|
headers: {
|
|
314
323
|
...addtionalHeaders,
|
|
315
324
|
'Accept': 'application/json',
|
|
@@ -317,9 +326,8 @@ class McpHTTPHandle extends Disposable {
|
|
|
317
326
|
}
|
|
318
327
|
});
|
|
319
328
|
if (authServerMetadataResponse.status !== 200) {
|
|
320
|
-
authServerMetadataResponse = await
|
|
329
|
+
authServerMetadataResponse = await this._fetch(( URI.joinPath(( URI.parse(authorizationServer)), '.well-known', 'openid-configuration').toString(true)), {
|
|
321
330
|
method: 'GET',
|
|
322
|
-
signal: this._abortCtrl.signal,
|
|
323
331
|
headers: {
|
|
324
332
|
...addtionalHeaders,
|
|
325
333
|
'Accept': 'application/json',
|
|
@@ -395,7 +403,6 @@ class McpHTTPHandle extends Disposable {
|
|
|
395
403
|
}
|
|
396
404
|
res = await this._fetchWithAuthRetry(( this._launch.uri.toString(true)), {
|
|
397
405
|
method: 'GET',
|
|
398
|
-
signal: this._abortCtrl.signal,
|
|
399
406
|
headers,
|
|
400
407
|
}, headers);
|
|
401
408
|
}
|
|
@@ -407,7 +414,9 @@ class McpHTTPHandle extends Disposable {
|
|
|
407
414
|
this._log(LogLevel.Debug, `${res.status} status connecting to ${this._launch.uri} for async notifications; they will be disabled: ${await this._getErrText(res)}`);
|
|
408
415
|
return;
|
|
409
416
|
}
|
|
410
|
-
|
|
417
|
+
if (res.headers.get('content-type')?.toLowerCase().includes('text/event-stream')) {
|
|
418
|
+
retry = 0;
|
|
419
|
+
}
|
|
411
420
|
const parser = ( new SSEParser(event => {
|
|
412
421
|
if (event.type === 'message') {
|
|
413
422
|
this._proxy.$onDidReceiveMessage(this._id, event.data);
|
|
@@ -435,7 +444,6 @@ class McpHTTPHandle extends Disposable {
|
|
|
435
444
|
try {
|
|
436
445
|
res = await this._fetchWithAuthRetry(( this._launch.uri.toString(true)), {
|
|
437
446
|
method: 'GET',
|
|
438
|
-
signal: this._abortCtrl.signal,
|
|
439
447
|
headers,
|
|
440
448
|
}, headers);
|
|
441
449
|
if (res.status >= 300) {
|
|
@@ -469,9 +477,8 @@ class McpHTTPHandle extends Disposable {
|
|
|
469
477
|
'Content-Length': String(asBytes.length),
|
|
470
478
|
};
|
|
471
479
|
await this._addAuthHeader(headers);
|
|
472
|
-
const res = await
|
|
480
|
+
const res = await this._fetch(url, {
|
|
473
481
|
method: 'POST',
|
|
474
|
-
signal: this._abortCtrl.signal,
|
|
475
482
|
headers,
|
|
476
483
|
body: asBytes,
|
|
477
484
|
});
|
|
@@ -531,7 +538,7 @@ class McpHTTPHandle extends Disposable {
|
|
|
531
538
|
}
|
|
532
539
|
}
|
|
533
540
|
async _fetchWithAuthRetry(url, init, headers) {
|
|
534
|
-
const doFetch = () =>
|
|
541
|
+
const doFetch = () => this._fetch(url, init);
|
|
535
542
|
let res = await doFetch();
|
|
536
543
|
if (res.status === 401) {
|
|
537
544
|
if (!this._authMetadata) {
|
|
@@ -545,6 +552,50 @@ class McpHTTPHandle extends Disposable {
|
|
|
545
552
|
}
|
|
546
553
|
return res;
|
|
547
554
|
}
|
|
555
|
+
async _fetch(url, init) {
|
|
556
|
+
if (canLog(this._logService.getLevel(), LogLevel.Trace)) {
|
|
557
|
+
const traceObj = { ...init, headers: { ...init.headers } };
|
|
558
|
+
if (traceObj.body) {
|
|
559
|
+
traceObj.body = ( new TextDecoder()).decode(traceObj.body);
|
|
560
|
+
}
|
|
561
|
+
if (traceObj.headers?.Authorization) {
|
|
562
|
+
traceObj.headers.Authorization = '***';
|
|
563
|
+
}
|
|
564
|
+
this._log(LogLevel.Trace, `Fetching ${url} with options: ${JSON.stringify(traceObj)}`);
|
|
565
|
+
}
|
|
566
|
+
let currentUrl = url;
|
|
567
|
+
let response;
|
|
568
|
+
for (let redirectCount = 0; redirectCount < MAX_FOLLOW_REDIRECTS; redirectCount++) {
|
|
569
|
+
response = await fetch(currentUrl, {
|
|
570
|
+
...init,
|
|
571
|
+
signal: this._abortCtrl.signal,
|
|
572
|
+
redirect: 'manual'
|
|
573
|
+
});
|
|
574
|
+
if (!REDIRECT_STATUS_CODES.includes(response.status)) {
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
577
|
+
const location = response.headers.get('location');
|
|
578
|
+
if (!location) {
|
|
579
|
+
break;
|
|
580
|
+
}
|
|
581
|
+
const nextUrl = ( ( new URL(location, currentUrl)).toString());
|
|
582
|
+
this._log(LogLevel.Trace, `Redirect (${response.status}) from ${currentUrl} to ${nextUrl}`);
|
|
583
|
+
currentUrl = nextUrl;
|
|
584
|
+
if (response.status === 303 || ((response.status === 301 || response.status === 302) && init.method === 'POST')) {
|
|
585
|
+
init.method = 'GET';
|
|
586
|
+
delete init.body;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
if (canLog(this._logService.getLevel(), LogLevel.Trace)) {
|
|
590
|
+
const headers = {};
|
|
591
|
+
response.headers.forEach((value, key) => { headers[key] = value; });
|
|
592
|
+
this._log(LogLevel.Trace, `Fetched ${currentUrl}: ${JSON.stringify({
|
|
593
|
+
status: response.status,
|
|
594
|
+
headers: headers,
|
|
595
|
+
})}`);
|
|
596
|
+
}
|
|
597
|
+
return response;
|
|
598
|
+
}
|
|
548
599
|
}
|
|
549
600
|
function isJSON(str) {
|
|
550
601
|
try {
|
|
@@ -17,7 +17,7 @@ import { IExtHostConsumerFileSystem } from "./extHostFileSystemConsumer.js";
|
|
|
17
17
|
import { ITextQuery } from "../../services/search/common/search.js";
|
|
18
18
|
import { IExtHostSearch } from "./extHostSearch.js";
|
|
19
19
|
import { IRawClosedNotebookFileMatch } from "../../contrib/search/common/searchNotebookHelpers.js";
|
|
20
|
-
import { NotebookPriorityInfo } from "@codingame/monaco-vscode-
|
|
20
|
+
import { NotebookPriorityInfo } from "@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common/vscode/vs/workbench/contrib/search/common/search";
|
|
21
21
|
import { ILogService } from "../../../platform/log/common/log.service.js";
|
|
22
22
|
export declare class ExtHostNotebookController implements ExtHostNotebookShape {
|
|
23
23
|
private _textDocumentsAndEditors;
|