@codingame/monaco-vscode-api 13.1.7 → 14.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/extensions.d.ts +3 -2
- package/missing-services.js +177 -63
- package/monaco.d.ts +2 -1
- package/package.json +8 -8
- package/services.d.ts +2 -2
- package/services.js +2 -3
- package/vscode/src/vs/base/browser/cssValue.js +1 -1
- package/vscode/src/vs/base/browser/dom.js +4 -1
- package/vscode/src/vs/base/browser/markdownRenderer.js +12 -0
- package/vscode/src/vs/base/browser/touch.js +2 -1
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/button/button.d.ts +2 -1
- package/vscode/src/vs/base/browser/ui/button/button.js +10 -6
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/findinput/replaceInput.d.ts +2 -1
- package/vscode/src/vs/base/browser/ui/findinput/replaceInput.js +2 -2
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +1 -1
- package/vscode/src/vs/base/browser/ui/list/listView.d.ts +10 -0
- package/vscode/src/vs/base/browser/ui/list/listView.js +102 -6
- package/vscode/src/vs/base/browser/ui/list/listWidget.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/menu/menu.js +4 -1
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +6 -6
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.d.ts +1 -2
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +18 -8
- package/vscode/src/vs/base/browser/ui/tree/indexTreeModel.js +2 -2
- package/vscode/src/vs/base/common/actions.d.ts +1 -1
- package/vscode/src/vs/base/common/arrays.d.ts +1 -2
- package/vscode/src/vs/base/common/arrays.js +2 -2
- package/vscode/src/vs/base/common/assert.d.ts +1 -1
- package/vscode/src/vs/base/common/assert.js +5 -2
- package/vscode/src/vs/base/common/async.js +16 -2
- package/vscode/src/vs/base/common/codicons.d.ts +1 -0
- package/vscode/src/vs/base/common/codiconsLibrary.d.ts +1 -0
- package/vscode/src/vs/base/common/codiconsLibrary.js +1 -0
- package/vscode/src/vs/base/common/color.d.ts +2 -2
- package/vscode/src/vs/base/common/color.js +4 -4
- package/vscode/src/vs/base/common/decorators.d.ts +1 -0
- package/vscode/src/vs/base/common/decorators.js +2 -0
- package/vscode/src/vs/base/common/errors.d.ts +2 -0
- package/vscode/src/vs/base/common/errors.js +10 -2
- package/vscode/src/vs/base/common/event.d.ts +3 -3
- package/vscode/src/vs/base/common/event.js +2 -2
- package/vscode/src/vs/base/common/filters.js +1 -1
- package/vscode/src/vs/base/common/iterator.d.ts +1 -1
- package/vscode/src/vs/base/common/iterator.js +8 -2
- package/vscode/src/vs/base/common/lifecycle.d.ts +7 -0
- package/vscode/src/vs/base/common/map.d.ts +8 -16
- package/vscode/src/vs/base/common/map.js +43 -30
- package/vscode/src/vs/base/common/network.d.ts +2 -2
- package/vscode/src/vs/base/common/network.js +4 -4
- package/vscode/src/vs/base/common/numbers.d.ts +1 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.d.ts +2 -2
- package/vscode/src/vs/base/common/observableInternal/autorun.js +14 -1
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +13 -9
- package/vscode/src/vs/base/common/observableInternal/base.js +7 -1
- package/vscode/src/vs/base/common/observableInternal/derived.d.ts +5 -3
- package/vscode/src/vs/base/common/observableInternal/derived.js +31 -4
- package/vscode/src/vs/base/common/observableInternal/index.d.ts +2 -2
- package/vscode/src/vs/base/common/observableInternal/lazyObservableValue.js +5 -2
- package/vscode/src/vs/base/common/observableInternal/logging.d.ts +10 -4
- package/vscode/src/vs/base/common/observableInternal/logging.js +310 -1
- package/vscode/src/vs/base/common/observableInternal/utils.d.ts +9 -9
- package/vscode/src/vs/base/common/observableInternal/utils.js +13 -4
- package/vscode/src/vs/base/common/path.js +1 -2
- package/vscode/src/vs/base/common/product.d.ts +5 -0
- package/vscode/src/vs/base/common/stream.d.ts +1 -1
- package/vscode/src/vs/base/common/stream.js +13 -5
- package/vscode/src/vs/base/common/strings.d.ts +1 -0
- package/vscode/src/vs/base/common/strings.js +19 -9
- package/vscode/src/vs/base/common/types.d.ts +2 -1
- package/vscode/src/vs/base/common/types.js +9 -4
- package/vscode/src/vs/base/common/uuid.js +1 -50
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.d.ts +2 -1
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.js +26 -12
- package/vscode/src/vs/editor/browser/editorDom.js +3 -3
- package/vscode/src/vs/editor/browser/editorExtensions.js +15 -0
- package/vscode/src/vs/editor/browser/gpu/atlas/atlas.d.ts +7 -2
- package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlas.d.ts +1 -1
- package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlas.js +34 -27
- package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlasPage.d.ts +1 -1
- package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlasPage.js +8 -8
- package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.js +3 -3
- package/vscode/src/vs/editor/browser/gpu/contentSegmenter.d.ts +7 -0
- package/vscode/src/vs/editor/browser/gpu/contentSegmenter.js +49 -0
- package/vscode/src/vs/editor/browser/gpu/{decorationCssRuleExtractor.d.ts → css/decorationCssRuleExtractor.d.ts} +1 -1
- package/vscode/src/vs/editor/browser/gpu/{decorationCssRuleExtractor.js → css/decorationCssRuleExtractor.js} +2 -2
- package/vscode/src/vs/editor/browser/gpu/css/decorationStyleCache.d.ts +15 -0
- package/vscode/src/vs/editor/browser/gpu/css/decorationStyleCache.js +37 -0
- package/vscode/src/vs/editor/browser/gpu/{media → css/media}/decorationCssRuleExtractor.css.js +1 -1
- package/vscode/src/vs/editor/browser/gpu/gpu.d.ts +6 -2
- package/vscode/src/vs/editor/browser/gpu/raster/glyphRasterizer.d.ts +5 -2
- package/vscode/src/vs/editor/browser/gpu/raster/glyphRasterizer.js +57 -14
- package/vscode/src/vs/editor/browser/gpu/raster/raster.d.ts +2 -1
- package/vscode/src/vs/editor/browser/gpu/rectangleRenderer.d.ts +4 -1
- package/vscode/src/vs/editor/browser/gpu/rectangleRenderer.js +5 -1
- package/vscode/src/vs/editor/browser/gpu/renderStrategy/baseRenderStrategy.d.ts +25 -0
- package/vscode/src/vs/editor/browser/gpu/renderStrategy/baseRenderStrategy.js +16 -0
- package/vscode/src/vs/editor/browser/gpu/{fullFileRenderStrategy.d.ts → renderStrategy/fullFileRenderStrategy.d.ts} +14 -13
- package/vscode/src/vs/editor/browser/gpu/{fullFileRenderStrategy.js → renderStrategy/fullFileRenderStrategy.js} +100 -57
- package/vscode/src/vs/editor/browser/gpu/{fullFileRenderStrategy.wgsl.js → renderStrategy/fullFileRenderStrategy.wgsl.js} +3 -3
- package/vscode/src/vs/editor/browser/gpu/renderStrategy/viewportRenderStrategy.d.ts +40 -0
- package/vscode/src/vs/editor/browser/gpu/renderStrategy/viewportRenderStrategy.js +287 -0
- package/vscode/src/vs/editor/browser/gpu/taskQueue.d.ts +4 -3
- package/vscode/src/vs/editor/browser/gpu/taskQueue.js +17 -2
- package/vscode/src/vs/editor/browser/gpu/viewGpuContext.d.ts +8 -9
- package/vscode/src/vs/editor/browser/gpu/viewGpuContext.js +45 -34
- package/vscode/src/vs/editor/browser/observableCodeEditor.d.ts +28 -21
- package/vscode/src/vs/editor/browser/observableCodeEditor.js +68 -2
- package/vscode/src/vs/editor/browser/point.d.ts +9 -0
- package/vscode/src/vs/editor/browser/point.js +22 -0
- package/vscode/src/vs/editor/browser/rect.d.ts +30 -0
- package/vscode/src/vs/editor/browser/rect.js +131 -0
- package/vscode/src/vs/editor/browser/services/editorWorkerService.d.ts +1 -1
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +1 -1
- package/vscode/src/vs/editor/browser/view/viewLayer.d.ts +1 -1
- package/vscode/src/vs/editor/browser/view/viewLayer.js +8 -1
- package/vscode/src/vs/editor/browser/view.d.ts +1 -0
- package/vscode/src/vs/editor/browser/view.js +9 -5
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLines.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.d.ts +7 -3
- package/vscode/src/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +140 -56
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.d.ts +1 -0
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +5 -0
- package/vscode/src/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget.d.ts +2 -1
- package/vscode/src/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget.js +8 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/commands.d.ts +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +14 -9
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.d.ts +12 -10
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +12 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorSash.d.ts +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.d.ts +4 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +29 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.d.ts +28 -28
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.d.ts +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +0 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.d.ts +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.d.ts +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.d.ts +2 -2
- package/vscode/src/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.d.ts +3 -6
- package/vscode/src/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +3 -10
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +8 -6
- package/vscode/src/vs/editor/common/config/editorOptions.js +409 -392
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/vscode/src/vs/editor/common/core/offsetEdit.d.ts +3 -0
- package/vscode/src/vs/editor/common/core/offsetEdit.js +9 -0
- package/vscode/src/vs/editor/common/core/offsetRange.d.ts +1 -0
- package/vscode/src/vs/editor/common/core/offsetRange.js +3 -0
- package/vscode/src/vs/editor/common/core/position.js +1 -1
- package/vscode/src/vs/editor/common/core/positionToOffset.d.ts +1 -0
- package/vscode/src/vs/editor/common/core/positionToOffset.js +20 -1
- package/vscode/src/vs/editor/common/core/range.d.ts +1 -0
- package/vscode/src/vs/editor/common/core/range.js +3 -0
- package/vscode/src/vs/editor/common/core/textEdit.d.ts +0 -6
- package/vscode/src/vs/editor/common/core/textEdit.js +0 -1
- package/vscode/src/vs/editor/common/core/textLength.js +1 -1
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +10 -7
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.d.ts +2 -1
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js +6 -6
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.d.ts +1 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.js +20 -0
- package/vscode/src/vs/editor/common/diff/linesDiffComputer.d.ts +1 -0
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +1 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +1 -22
- 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/languageConfigurationRegistry.js +5 -5
- package/vscode/src/vs/editor/common/languages/modesRegistry.js +1 -1
- package/vscode/src/vs/editor/common/languages.d.ts +21 -25
- package/vscode/src/vs/editor/common/languages.js +27 -27
- package/vscode/src/vs/editor/common/model/editStack.js +1 -1
- package/vscode/src/vs/editor/common/model/textModel.d.ts +1 -0
- package/vscode/src/vs/editor/common/model/textModel.js +6 -3
- package/vscode/src/vs/editor/common/model/textModelTokens.d.ts +2 -2
- package/vscode/src/vs/editor/common/model/textModelTokens.js +11 -18
- package/vscode/src/vs/editor/common/model/tokenStore.d.ts +59 -0
- package/vscode/src/vs/editor/common/model/tokenStore.js +384 -0
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.d.ts +5 -5
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +10 -15
- package/vscode/src/vs/editor/common/model/tokens.d.ts +2 -2
- package/vscode/src/vs/editor/common/model/treeSitterTokenStoreService.d.ts +44 -0
- package/vscode/src/vs/editor/common/model/treeSitterTokenStoreService.js +114 -0
- package/vscode/src/vs/editor/common/model/treeSitterTokens.d.ts +4 -5
- package/vscode/src/vs/editor/common/model/treeSitterTokens.js +18 -10
- package/vscode/src/vs/editor/common/services/editorSimpleWorker.d.ts +1 -1
- package/vscode/src/vs/editor/common/services/editorWorker.d.ts +1 -1
- package/vscode/src/vs/editor/common/services/languageFeatures.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/treeSitterParserService.d.ts +18 -5
- package/vscode/src/vs/editor/common/standaloneStrings.d.ts +3 -0
- package/vscode/src/vs/editor/common/standaloneStrings.js +54 -38
- package/vscode/src/vs/editor/common/tokenizationTextModelPart.d.ts +1 -13
- package/vscode/src/vs/editor/common/tokenizationTextModelPart.js +1 -13
- package/vscode/src/vs/editor/common/tokens/lineTokens.d.ts +1 -0
- package/vscode/src/vs/editor/common/tokens/lineTokens.js +3 -0
- package/vscode/src/vs/editor/common/tokens/tokenArray.d.ts +5 -0
- package/vscode/src/vs/editor/common/tokens/tokenArray.js +24 -0
- package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/vscode/src/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/vscode/src/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/vscode/src/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +1 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/codelens/browser/codeLensCache.js +1 -1
- package/vscode/src/vs/editor/contrib/codelens/browser/codelens.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/codelens/browser/codelens.js +7 -5
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPicker.d.ts +2 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPicker.js +12 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.d.ts +1 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js +2 -9
- package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +3 -5
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.d.ts +12 -8
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +41 -41
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerWidget.d.ts +2 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerWidget.js +13 -8
- 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 +32 -33
- 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.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +20 -17
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.d.ts +2 -1
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +32 -30
- package/vscode/src/vs/editor/contrib/find/browser/replaceWidgetHistory.d.ts +21 -0
- package/vscode/src/vs/editor/contrib/find/browser/replaceWidgetHistory.js +76 -0
- 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.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoError.js +40 -36
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/vscode/src/vs/editor/contrib/gotoError/browser/markerNavigationService.js +56 -30
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +43 -41
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +3 -2
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +5 -4
- 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 +5 -5
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.d.ts +1 -3
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +54 -59
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +47 -16
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.d.ts +4 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +27 -15
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js +10 -1
- package/vscode/src/vs/editor/contrib/hover/browser/glyphHoverWidget.js +2 -1
- package/vscode/src/vs/editor/contrib/hover/browser/hover.css.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.d.ts +4 -4
- package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +4 -3
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.d.ts +4 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +38 -25
- package/vscode/src/vs/editor/contrib/hover/browser/hoverContribution.js +2 -1
- package/vscode/src/vs/editor/contrib/hover/browser/hoverOperation.js +1 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverTypes.d.ts +4 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.d.ts +3 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +65 -33
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +38 -24
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +11 -10
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.d.ts +7 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +50 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +8 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/computeGhostText.d.ts +2 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/computeGhostText.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.d.ts +18 -19
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +55 -27
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.d.ts +22 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +199 -21
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineEditsAdapter.js +3 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.d.ts +5 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +38 -15
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +10 -10
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.d.ts +16 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +65 -30
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.d.ts +6 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +7 -6
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/deletionView.d.ts +29 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/deletionView.js +141 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/gutterIndicatorMenu.d.ts +19 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/gutterIndicatorMenu.js +143 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/gutterIndicatorView.d.ts +37 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/gutterIndicatorView.js +259 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/{inlineEditsIndicatorView.d.ts → indicatorView.d.ts} +1 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/{inlineEditsIndicatorView.js → indicatorView.js} +9 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineDiffView.d.ts +5 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineDiffView.js +39 -19
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/insertionView.d.ts +32 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/insertionView.js +204 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/sideBySideDiff.d.ts +71 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/sideBySideDiff.js +584 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils.d.ts +123 -12
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils.js +348 -20
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css.js +6 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.d.ts +41 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.js +365 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/{inlineEditsViewAndDiffProducer.d.ts → viewAndDiffProducer.d.ts} +7 -13
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/viewAndDiffProducer.js +92 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/wordReplacementView.d.ts +58 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/wordReplacementView.js +520 -0
- 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/getLinks.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/links/browser/getLinks.js +16 -12
- package/vscode/src/vs/editor/contrib/links/browser/links.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/links/browser/links.js +13 -10
- 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/parameterHintsWidget.js +5 -5
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.d.ts +1 -2
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +18 -26
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +6 -6
- package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.d.ts +2 -3
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +19 -15
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.d.ts +14 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +48 -19
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.d.ts +7 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +25 -6
- package/vscode/src/vs/editor/contrib/suggest/browser/media/suggest.css.js +1 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +20 -20
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +9 -7
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.d.ts +0 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +3 -7
- package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +5 -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/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/contrib/zoneWidget/browser/zoneWidget.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.js +8 -3
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.d.ts +4 -0
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +3 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +2 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneTreeSitterService.d.ts +3 -7
- package/vscode/src/vs/editor/standalone/browser/standaloneTreeSitterService.js +1 -1
- package/vscode/src/vs/platform/accessibility/browser/accessibleView.d.ts +3 -2
- package/vscode/src/vs/platform/accessibility/browser/accessibleView.js +1 -0
- package/vscode/src/vs/platform/accessibility/browser/accessibleViewRegistry.d.ts +4 -4
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +52 -52
- 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/dropdownWithPrimaryActionViewItem.d.ts +39 -0
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +145 -0
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.d.ts +1 -0
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +6 -6
- package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -2
- package/vscode/src/vs/platform/actions/common/actions.d.ts +4 -1
- package/vscode/src/vs/platform/actions/common/actions.js +9 -6
- 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/commands/common/commands.js +2 -2
- package/vscode/src/vs/platform/configuration/common/configuration.d.ts +4 -1
- package/vscode/src/vs/platform/configuration/common/configuration.js +3 -0
- package/vscode/src/vs/platform/configuration/common/configurationModels.d.ts +2 -2
- package/vscode/src/vs/platform/configuration/common/configurationModels.js +39 -21
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.d.ts +9 -4
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +25 -15
- 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/contextview/browser/contextView.service.d.ts +2 -2
- 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 +2 -0
- package/vscode/src/vs/platform/environment/common/environment.service.d.ts +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +5 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +17 -6
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.service.d.ts +5 -5
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.d.ts +2 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.js +10 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionsProfileScannerService.d.ts +3 -5
- package/vscode/src/vs/platform/extensionManagement/common/extensionsProfileScannerService.js +8 -13
- package/vscode/src/vs/platform/extensionManagement/common/extensionsProfileScannerService.service.d.ts +2 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.d.ts +20 -14
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +127 -125
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.service.d.ts +8 -9
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +20 -20
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +56 -25
- package/vscode/src/vs/platform/extensions/common/extensions.js +8 -1
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +11 -8
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +12 -9
- package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +2 -2
- package/vscode/src/vs/platform/files/common/files.js +6 -6
- package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/vscode/src/vs/platform/instantiation/common/extensions.d.ts +3 -2
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/vscode/src/vs/platform/label/common/label.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 -0
- package/vscode/src/vs/platform/list/browser/listService.js +27 -27
- package/vscode/src/vs/platform/log/common/log.d.ts +6 -0
- package/vscode/src/vs/platform/log/common/log.js +18 -9
- package/vscode/src/vs/platform/markers/common/markers.js +3 -3
- package/vscode/src/vs/platform/quickinput/browser/media/quickInput.css.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInput.d.ts +5 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +19 -9
- package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +3 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.d.ts +11 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +241 -12
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.d.ts +4 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +3 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +1 -1
- 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/quickinput/common/quickInput.service.d.ts +4 -0
- package/vscode/src/vs/platform/request/common/request.d.ts +2 -2
- package/vscode/src/vs/platform/request/common/request.js +171 -112
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.d.ts +2 -0
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +3 -1
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +6 -2
- package/vscode/src/vs/platform/terminal/common/terminal.js +5 -1
- package/vscode/src/vs/platform/terminal/common/terminal.service.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.js +96 -96
- package/vscode/src/vs/platform/theme/common/colors/inputColors.js +45 -45
- 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.d.ts +7 -0
- package/vscode/src/vs/platform/theme/common/iconRegistry.js +17 -7
- package/vscode/src/vs/platform/theme/common/theme.d.ts +6 -0
- package/vscode/src/vs/platform/theme/common/theme.js +8 -1
- package/vscode/src/vs/platform/theme/common/themeService.d.ts +12 -3
- package/vscode/src/vs/platform/theme/common/themeService.js +5 -5
- package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.d.ts +7 -5
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.service.d.ts +3 -3
- package/vscode/src/vs/platform/window/common/window.d.ts +6 -1
- package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
- package/vscode/src/vs/platform/workspaces/common/workspaces.service.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/statusBarService.d.ts +3 -2
- package/vscode/src/vs/workbench/api/browser/statusBarService.js +3 -2
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +10 -14
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +18 -11
- package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +1 -20
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +2 -0
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +37 -10
- package/vscode/src/vs/workbench/api/common/extHostCodeMapper.js +4 -18
- package/vscode/src/vs/workbench/api/common/extHostCommands.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHostCommands.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostComments.js +3 -5
- package/vscode/src/vs/workbench/api/common/extHostConfiguration.d.ts +16 -0
- package/vscode/src/vs/workbench/api/common/extHostConfiguration.js +4 -0
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDialogs.d.ts +1 -2
- package/vscode/src/vs/workbench/api/common/extHostDialogs.js +1 -5
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLabelService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.d.ts +0 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +29 -65
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.d.ts +3 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +33 -13
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +3 -2
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostMemento.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.d.ts +10 -2
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +47 -7
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +12 -8
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.d.ts +3 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +66 -5
- package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.d.ts +1 -0
- package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.js +18 -1
- package/vscode/src/vs/workbench/api/common/extHostTimeline.js +2 -2
- 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 +4 -13
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +7 -61
- package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +24 -3
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +37 -5
- package/vscode/src/vs/workbench/api/common/extHostVariableResolverService.js +22 -2
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +3 -2
- package/vscode/src/vs/workbench/api/common/extensionHostMain.js +17 -8
- 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/parts/titlebar/titlebarActions.d.ts +12 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarActions.js +247 -0
- package/vscode/src/vs/workbench/common/activity.d.ts +2 -0
- package/vscode/src/vs/workbench/common/activity.js +6 -0
- package/vscode/src/vs/workbench/common/configuration.js +12 -12
- package/vscode/src/vs/workbench/common/contextkeys.js +70 -70
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.d.ts +44 -0
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.js +166 -0
- package/vscode/src/vs/workbench/common/editor.d.ts +1 -1
- package/vscode/src/vs/workbench/common/editor.js +4 -4
- package/vscode/src/vs/workbench/common/theme.js +159 -164
- package/vscode/src/vs/workbench/common/views.js +4 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +152 -142
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +16 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +521 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +136 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.service.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorActions.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorActions.js +309 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorController.d.ts +81 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorController.js +681 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +169 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorOverlay.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorOverlay.js +296 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotasService.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotasService.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotasService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/screenshot.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/screenshot.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorOverlay.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/annotations.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/annotations.js +134 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.d.ts +16 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +48 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.service.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.service.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.d.ts +15 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +61 -29
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.d.ts +19 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +17 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.service.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.d.ts +444 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +991 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +181 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParticipantContribTypes.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParticipantContribTypes.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.service.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariables.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariables.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.d.ts +234 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +375 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +42 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.d.ts +10 -5
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/types.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/types.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/editFileTool.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/editFileTool.js +168 -0
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.d.ts +2 -2
- 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.d.ts +1 -1
- 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 +9 -19
- package/vscode/src/vs/workbench/contrib/comments/browser/commentService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +14 -10
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +64 -64
- package/vscode/src/vs/workbench/contrib/editSessions/common/editSessions.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.d.ts +167 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +85 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.service.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/files/browser/files.service.d.ts +2 -2
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service.d.ts +4 -3
- 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/logs/common/defaultLogLevels.service.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatEditContext.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatEditContext.js +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizer.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.d.ts +602 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +143 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +316 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +73 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.js +11 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookSynchronizerService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.service.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/{diff.service.js → quickDiffModel.service.js} +2 -2
- package/vscode/src/vs/workbench/contrib/scm/common/history.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.d.ts +30 -1
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.js +95 -0
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.js +82 -0
- package/vscode/src/vs/workbench/contrib/scm/common/scm.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +30 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testId.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testId.js +3 -0
- 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/configurationResolver/common/configurationResolver.d.ts +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.d.ts +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +26 -15
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.d.ts +5 -1
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +10 -4
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +3 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +83 -83
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.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 +63 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +164 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/localization/common/locale.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/log/common/logConstants.d.ts +2 -0
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +3 -1
- package/vscode/src/vs/workbench/services/outline/browser/outline.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/output/common/output.d.ts +51 -8
- package/vscode/src/vs/workbench/services/output/common/output.js +30 -4
- package/vscode/src/vs/workbench/services/output/common/output.service.d.ts +8 -1
- package/vscode/src/vs/workbench/services/panecomposite/browser/panecomposite.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/preferences/common/preferences.service.d.ts +2 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +9 -4
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.js +5 -1
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.service.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 +15 -21
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.service.d.ts +21 -2
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.service.d.ts +3 -3
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +11 -11
- 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 +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceEditing.service.d.ts +1 -1
- package/vscode-dts/vscode.d.ts +375 -32
- package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +1 -1
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +11 -0
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +9 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +4 -0
- package/vscode-dts/vscode.proposed.chatReadonlyPromptReference.d.ts +17 -0
- package/vscode-dts/vscode.proposed.chatReferenceBinaryData.d.ts +5 -0
- package/vscode-dts/vscode.proposed.d.ts +132 -131
- package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +3 -3
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +2 -0
- package/vscode-dts/vscode.proposed.inlineEdit.d.ts +14 -3
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +21 -1
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +3 -3
- package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +1 -1
- package/vscode-dts/vscode.proposed.resolvers.d.ts +3 -3
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +4 -2
- package/vscode-dts/vscode.proposed.statusBarItemTooltip.d.ts +19 -0
- package/vscode-dts/vscode.proposed.terminalCompletionProvider.d.ts +10 -0
- package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +2 -2
- package/vscode-dts/vscode.proposed.terminalShellEnv.d.ts +18 -0
- package/vscode-dts/vscode.proposed.terminalShellType.d.ts +40 -0
- package/vscode/src/vs/base/common/observableInternal/index.js +0 -8
- package/vscode/src/vs/base/common/observableInternal/promise.d.ts +0 -28
- package/vscode/src/vs/base/common/observableInternal/promise.js +0 -65
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.css.js +0 -6
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.d.ts +0 -45
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +0 -426
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewAndDiffProducer.js +0 -116
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingService.service.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingService.service.js +0 -6
- package/vscode/src/vs/workbench/contrib/mappedEdits/common/mappedEdits.contribution.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/mappedEdits/common/mappedEdits.contribution.js +0 -24
- package/vscode/src/vs/workbench/contrib/output/common/outputChannelModelService.service.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/output/common/outputChannelModelService.service.js +0 -6
- package/vscode/src/vs/workbench/contrib/scm/browser/diff.service.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +0 -66
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.d.ts +0 -155
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +0 -1454
- package/vscode/src/vs/workbench/contrib/scm/browser/media/dirtydiffDecorator.css.js +0 -6
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +0 -164
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.js +0 -74
- package/vscode/src/vs/workbench/services/themes/common/productIconThemeSchema.d.ts +0 -8
- package/vscode/src/vs/workbench/services/themes/common/productIconThemeSchema.js +0 -93
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +0 -316
- package/vscode-dts/vscode.proposed.fileComments.d.ts +0 -42
- package/vscode-dts/vscode.proposed.showLocal.d.ts +0 -19
- /package/vscode/src/vs/editor/browser/gpu/{fullFileRenderStrategy.wgsl.d.ts → renderStrategy/fullFileRenderStrategy.wgsl.d.ts} +0 -0
|
@@ -0,0 +1,991 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
+
import { asArray } from '../../../../base/common/arrays.js';
|
|
4
|
+
import { DeferredPromise } from '../../../../base/common/async.js';
|
|
5
|
+
import { Emitter } from '../../../../base/common/event.js';
|
|
6
|
+
import { isMarkdownString, MarkdownString } from '../../../../base/common/htmlContent.js';
|
|
7
|
+
import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
8
|
+
import { revive } from '../../../../base/common/marshalling.js';
|
|
9
|
+
import { Schemas } from '../../../../base/common/network.js';
|
|
10
|
+
import { equals } from '../../../../base/common/objects.js';
|
|
11
|
+
import { isEqual, basename } from '../../../../base/common/resources.js';
|
|
12
|
+
import { URI, isUriComponents } from '../../../../base/common/uri.js';
|
|
13
|
+
import { generateUuid } from '../../../../base/common/uuid.js';
|
|
14
|
+
import { OffsetRange } from '../../../../editor/common/core/offsetRange.js';
|
|
15
|
+
import { localize } from '../../../../nls.js';
|
|
16
|
+
import { ILogService } from '../../../../platform/log/common/log.service.js';
|
|
17
|
+
import { ChatAgentLocation, reviveSerializedAgent } from './chatAgents.js';
|
|
18
|
+
import { IChatAgentService } from './chatAgents.service.js';
|
|
19
|
+
import { reviveParsedChatRequest, ChatRequestTextPart } from './chatParserTypes.js';
|
|
20
|
+
import { isIUsedContext } from './chatService.js';
|
|
21
|
+
|
|
22
|
+
var ChatModel_1;
|
|
23
|
+
function isPasteVariableEntry(obj) {
|
|
24
|
+
return obj.kind === 'paste';
|
|
25
|
+
}
|
|
26
|
+
function isLinkVariableEntry(obj) {
|
|
27
|
+
return obj.kind === 'link';
|
|
28
|
+
}
|
|
29
|
+
const nonHistoryKinds = ( new Set(['toolInvocation', 'toolInvocationSerialized']));
|
|
30
|
+
function isChatProgressHistoryResponseContent(content) {
|
|
31
|
+
return !( nonHistoryKinds.has(content.kind));
|
|
32
|
+
}
|
|
33
|
+
function toChatHistoryContent(content) {
|
|
34
|
+
return content.filter(isChatProgressHistoryResponseContent);
|
|
35
|
+
}
|
|
36
|
+
class ChatRequestModel {
|
|
37
|
+
get session() {
|
|
38
|
+
return this._session;
|
|
39
|
+
}
|
|
40
|
+
get username() {
|
|
41
|
+
return this.session.requesterUsername;
|
|
42
|
+
}
|
|
43
|
+
get avatarIconUri() {
|
|
44
|
+
return this.session.requesterAvatarIconUri;
|
|
45
|
+
}
|
|
46
|
+
get attempt() {
|
|
47
|
+
return this._attempt;
|
|
48
|
+
}
|
|
49
|
+
get variableData() {
|
|
50
|
+
return this._variableData;
|
|
51
|
+
}
|
|
52
|
+
set variableData(v) {
|
|
53
|
+
this._variableData = v;
|
|
54
|
+
}
|
|
55
|
+
get confirmation() {
|
|
56
|
+
return this._confirmation;
|
|
57
|
+
}
|
|
58
|
+
get locationData() {
|
|
59
|
+
return this._locationData;
|
|
60
|
+
}
|
|
61
|
+
get attachedContext() {
|
|
62
|
+
return this._attachedContext;
|
|
63
|
+
}
|
|
64
|
+
get workingSet() {
|
|
65
|
+
return this._workingSet;
|
|
66
|
+
}
|
|
67
|
+
get paused() {
|
|
68
|
+
return this._paused;
|
|
69
|
+
}
|
|
70
|
+
set paused(paused) {
|
|
71
|
+
this._paused = paused;
|
|
72
|
+
}
|
|
73
|
+
constructor(_session, message, _variableData, timestamp, _attempt = 0, _confirmation, _locationData, _attachedContext, _workingSet, isCompleteAddedRequest = false, restoredId) {
|
|
74
|
+
this._session = _session;
|
|
75
|
+
this.message = message;
|
|
76
|
+
this._variableData = _variableData;
|
|
77
|
+
this.timestamp = timestamp;
|
|
78
|
+
this._attempt = _attempt;
|
|
79
|
+
this._confirmation = _confirmation;
|
|
80
|
+
this._locationData = _locationData;
|
|
81
|
+
this._attachedContext = _attachedContext;
|
|
82
|
+
this._workingSet = _workingSet;
|
|
83
|
+
this.isCompleteAddedRequest = isCompleteAddedRequest;
|
|
84
|
+
this.shouldBeRemovedOnSend = false;
|
|
85
|
+
this._paused = false;
|
|
86
|
+
this.id = restoredId ?? 'request_' + generateUuid();
|
|
87
|
+
}
|
|
88
|
+
adoptTo(session) {
|
|
89
|
+
this._session = session;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
class Response extends Disposable {
|
|
93
|
+
get onDidChangeValue() {
|
|
94
|
+
return this._onDidChangeValue.event;
|
|
95
|
+
}
|
|
96
|
+
get value() {
|
|
97
|
+
return this._responseParts;
|
|
98
|
+
}
|
|
99
|
+
constructor(value) {
|
|
100
|
+
super();
|
|
101
|
+
this._onDidChangeValue = this._register(( new Emitter()));
|
|
102
|
+
this._responseRepr = '';
|
|
103
|
+
this._markdownContent = '';
|
|
104
|
+
this._citations = [];
|
|
105
|
+
this._responseParts = ( asArray(value).map((v) => (isMarkdownString(v) ?
|
|
106
|
+
{ content: v, kind: 'markdownContent' } :
|
|
107
|
+
'kind' in v ? v : { kind: 'treeData', treeData: v })));
|
|
108
|
+
this._updateRepr(true);
|
|
109
|
+
}
|
|
110
|
+
toString() {
|
|
111
|
+
return this._responseRepr;
|
|
112
|
+
}
|
|
113
|
+
getMarkdown() {
|
|
114
|
+
return this._markdownContent;
|
|
115
|
+
}
|
|
116
|
+
clear() {
|
|
117
|
+
this._responseParts = [];
|
|
118
|
+
this._updateRepr(true);
|
|
119
|
+
}
|
|
120
|
+
updateContent(progress, quiet) {
|
|
121
|
+
if (progress.kind === 'markdownContent') {
|
|
122
|
+
const lastResponsePart = this._responseParts
|
|
123
|
+
.filter(p => p.kind !== 'textEditGroup')
|
|
124
|
+
.at(-1);
|
|
125
|
+
if (!lastResponsePart || lastResponsePart.kind !== 'markdownContent' || !canMergeMarkdownStrings(lastResponsePart.content, progress.content)) {
|
|
126
|
+
this._responseParts.push(progress);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
const idx = this._responseParts.indexOf(lastResponsePart);
|
|
130
|
+
this._responseParts[idx] = { ...lastResponsePart, content: appendMarkdownString(lastResponsePart.content, progress.content) };
|
|
131
|
+
}
|
|
132
|
+
this._updateRepr(quiet);
|
|
133
|
+
}
|
|
134
|
+
else if (progress.kind === 'textEdit') {
|
|
135
|
+
let found = false;
|
|
136
|
+
for (let i = 0; !found && i < this._responseParts.length; i++) {
|
|
137
|
+
const candidate = this._responseParts[i];
|
|
138
|
+
if (candidate.kind === 'textEditGroup' && isEqual(candidate.uri, progress.uri)) {
|
|
139
|
+
candidate.edits.push(progress.edits);
|
|
140
|
+
candidate.done = progress.done;
|
|
141
|
+
found = true;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (!found) {
|
|
145
|
+
this._responseParts.push({
|
|
146
|
+
kind: 'textEditGroup',
|
|
147
|
+
uri: progress.uri,
|
|
148
|
+
edits: [progress.edits],
|
|
149
|
+
done: progress.done
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
this._updateRepr(quiet);
|
|
153
|
+
}
|
|
154
|
+
else if (progress.kind === 'progressTask') {
|
|
155
|
+
const responsePosition = this._responseParts.push(progress) - 1;
|
|
156
|
+
this._updateRepr(quiet);
|
|
157
|
+
const disp = progress.onDidAddProgress(() => {
|
|
158
|
+
this._updateRepr(false);
|
|
159
|
+
});
|
|
160
|
+
progress.task?.().then((content) => {
|
|
161
|
+
disp.dispose();
|
|
162
|
+
if (typeof content === 'string') {
|
|
163
|
+
this._responseParts[responsePosition].content = ( new MarkdownString(content));
|
|
164
|
+
}
|
|
165
|
+
this._updateRepr(false);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
else if (progress.kind === 'toolInvocation') {
|
|
169
|
+
if (progress.confirmationMessages) {
|
|
170
|
+
progress.confirmed.p.then(() => {
|
|
171
|
+
this._updateRepr(false);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
this._responseParts.push(progress);
|
|
175
|
+
this._updateRepr(quiet);
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
this._responseParts.push(progress);
|
|
179
|
+
this._updateRepr(quiet);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
addCitation(citation) {
|
|
183
|
+
this._citations.push(citation);
|
|
184
|
+
this._updateRepr();
|
|
185
|
+
}
|
|
186
|
+
_updateRepr(quiet) {
|
|
187
|
+
this._responseRepr = this.partsToRepr(this._responseParts);
|
|
188
|
+
this._responseRepr += this._citations.length ? '\n\n' + getCodeCitationsMessage(this._citations) : '';
|
|
189
|
+
this._markdownContent = ( this._responseParts.map(part => {
|
|
190
|
+
if (part.kind === 'inlineReference') {
|
|
191
|
+
return this.inlineRefToRepr(part);
|
|
192
|
+
}
|
|
193
|
+
else if (part.kind === 'markdownContent' || part.kind === 'markdownVuln') {
|
|
194
|
+
return part.content.value;
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
return '';
|
|
198
|
+
}
|
|
199
|
+
}))
|
|
200
|
+
.filter(s => s.length > 0)
|
|
201
|
+
.join('');
|
|
202
|
+
if (!quiet) {
|
|
203
|
+
this._onDidChangeValue.fire();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
partsToRepr(parts) {
|
|
207
|
+
const blocks = [];
|
|
208
|
+
let currentBlockSegments = [];
|
|
209
|
+
for (const part of parts) {
|
|
210
|
+
let segment;
|
|
211
|
+
switch (part.kind) {
|
|
212
|
+
case 'treeData':
|
|
213
|
+
case 'progressMessage':
|
|
214
|
+
case 'codeblockUri':
|
|
215
|
+
case 'toolInvocation':
|
|
216
|
+
case 'toolInvocationSerialized':
|
|
217
|
+
continue;
|
|
218
|
+
case 'inlineReference':
|
|
219
|
+
segment = { text: this.inlineRefToRepr(part) };
|
|
220
|
+
break;
|
|
221
|
+
case 'command':
|
|
222
|
+
segment = { text: part.command.title, isBlock: true };
|
|
223
|
+
break;
|
|
224
|
+
case 'textEditGroup':
|
|
225
|
+
segment = { text: ( localize(4754, "Made changes.")), isBlock: true };
|
|
226
|
+
break;
|
|
227
|
+
case 'confirmation':
|
|
228
|
+
segment = { text: `${part.title}\n${part.message}`, isBlock: true };
|
|
229
|
+
break;
|
|
230
|
+
default:
|
|
231
|
+
segment = { text: part.content.value };
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
if (segment.isBlock) {
|
|
235
|
+
if (currentBlockSegments.length) {
|
|
236
|
+
blocks.push(currentBlockSegments.join(''));
|
|
237
|
+
currentBlockSegments = [];
|
|
238
|
+
}
|
|
239
|
+
blocks.push(segment.text);
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
currentBlockSegments.push(segment.text);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (currentBlockSegments.length) {
|
|
246
|
+
blocks.push(currentBlockSegments.join(''));
|
|
247
|
+
}
|
|
248
|
+
return blocks.join('\n\n');
|
|
249
|
+
}
|
|
250
|
+
inlineRefToRepr(part) {
|
|
251
|
+
if ('uri' in part.inlineReference) {
|
|
252
|
+
return this.uriToRepr(part.inlineReference.uri);
|
|
253
|
+
}
|
|
254
|
+
return 'name' in part.inlineReference
|
|
255
|
+
? '`' + part.inlineReference.name + '`'
|
|
256
|
+
: this.uriToRepr(part.inlineReference);
|
|
257
|
+
}
|
|
258
|
+
uriToRepr(uri) {
|
|
259
|
+
if (uri.scheme === Schemas.http || uri.scheme === Schemas.https) {
|
|
260
|
+
return ( uri.toString(false));
|
|
261
|
+
}
|
|
262
|
+
return basename(uri);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
class ChatResponseModel extends Disposable {
|
|
266
|
+
get session() {
|
|
267
|
+
return this._session;
|
|
268
|
+
}
|
|
269
|
+
get shouldBeRemovedOnSend() {
|
|
270
|
+
return this._shouldBeRemovedOnSend;
|
|
271
|
+
}
|
|
272
|
+
get isComplete() {
|
|
273
|
+
return this._isComplete;
|
|
274
|
+
}
|
|
275
|
+
set shouldBeRemovedOnSend(hidden) {
|
|
276
|
+
this._shouldBeRemovedOnSend = hidden;
|
|
277
|
+
this._onDidChange.fire();
|
|
278
|
+
}
|
|
279
|
+
get isCanceled() {
|
|
280
|
+
return this._isCanceled;
|
|
281
|
+
}
|
|
282
|
+
get vote() {
|
|
283
|
+
return this._vote;
|
|
284
|
+
}
|
|
285
|
+
get voteDownReason() {
|
|
286
|
+
return this._voteDownReason;
|
|
287
|
+
}
|
|
288
|
+
get followups() {
|
|
289
|
+
return this._followups;
|
|
290
|
+
}
|
|
291
|
+
get response() {
|
|
292
|
+
return this._response;
|
|
293
|
+
}
|
|
294
|
+
get result() {
|
|
295
|
+
return this._result;
|
|
296
|
+
}
|
|
297
|
+
get username() {
|
|
298
|
+
return this.session.responderUsername;
|
|
299
|
+
}
|
|
300
|
+
get avatarIcon() {
|
|
301
|
+
return this.session.responderAvatarIcon;
|
|
302
|
+
}
|
|
303
|
+
get agent() {
|
|
304
|
+
return this._agent;
|
|
305
|
+
}
|
|
306
|
+
get slashCommand() {
|
|
307
|
+
return this._slashCommand;
|
|
308
|
+
}
|
|
309
|
+
get agentOrSlashCommandDetected() {
|
|
310
|
+
return this._agentOrSlashCommandDetected ?? false;
|
|
311
|
+
}
|
|
312
|
+
get usedContext() {
|
|
313
|
+
return this._usedContext;
|
|
314
|
+
}
|
|
315
|
+
get contentReferences() {
|
|
316
|
+
return Array.from(this._contentReferences);
|
|
317
|
+
}
|
|
318
|
+
get codeCitations() {
|
|
319
|
+
return this._codeCitations;
|
|
320
|
+
}
|
|
321
|
+
get progressMessages() {
|
|
322
|
+
return this._progressMessages;
|
|
323
|
+
}
|
|
324
|
+
get isStale() {
|
|
325
|
+
return this._isStale;
|
|
326
|
+
}
|
|
327
|
+
get isPendingConfirmation() {
|
|
328
|
+
return ( this._response.value.some(part => part.kind === 'toolInvocation' && part.isConfirmed === undefined
|
|
329
|
+
|| part.kind === 'confirmation' && part.isUsed === false));
|
|
330
|
+
}
|
|
331
|
+
constructor(_response, _session, _agent, _slashCommand, requestId, _isComplete = false, _isCanceled = false, _vote, _voteDownReason, _result, followups, isCompleteAddedRequest = false, _shouldBeRemovedOnSend = false, restoredId) {
|
|
332
|
+
super();
|
|
333
|
+
this._session = _session;
|
|
334
|
+
this._agent = _agent;
|
|
335
|
+
this._slashCommand = _slashCommand;
|
|
336
|
+
this.requestId = requestId;
|
|
337
|
+
this._isComplete = _isComplete;
|
|
338
|
+
this._isCanceled = _isCanceled;
|
|
339
|
+
this._vote = _vote;
|
|
340
|
+
this._voteDownReason = _voteDownReason;
|
|
341
|
+
this._result = _result;
|
|
342
|
+
this.isCompleteAddedRequest = isCompleteAddedRequest;
|
|
343
|
+
this._shouldBeRemovedOnSend = _shouldBeRemovedOnSend;
|
|
344
|
+
this._onDidChange = this._register(( new Emitter()));
|
|
345
|
+
this.onDidChange = this._onDidChange.event;
|
|
346
|
+
this._contentReferences = [];
|
|
347
|
+
this._codeCitations = [];
|
|
348
|
+
this._progressMessages = [];
|
|
349
|
+
this._isStale = false;
|
|
350
|
+
this._isStale = Array.isArray(_response) && (_response.length !== 0 || isMarkdownString(_response) && _response.value.length !== 0);
|
|
351
|
+
this._followups = followups ? [...followups] : undefined;
|
|
352
|
+
this._response = this._register(( new Response(_response)));
|
|
353
|
+
this._register(this._response.onDidChangeValue(() => this._onDidChange.fire()));
|
|
354
|
+
this.id = restoredId ?? 'response_' + generateUuid();
|
|
355
|
+
}
|
|
356
|
+
updateContent(responsePart, quiet) {
|
|
357
|
+
this._response.updateContent(responsePart, quiet);
|
|
358
|
+
}
|
|
359
|
+
applyReference(progress) {
|
|
360
|
+
if (progress.kind === 'usedContext') {
|
|
361
|
+
this._usedContext = progress;
|
|
362
|
+
}
|
|
363
|
+
else if (progress.kind === 'reference') {
|
|
364
|
+
this._contentReferences.push(progress);
|
|
365
|
+
this._onDidChange.fire();
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
applyCodeCitation(progress) {
|
|
369
|
+
this._codeCitations.push(progress);
|
|
370
|
+
this._response.addCitation(progress);
|
|
371
|
+
this._onDidChange.fire();
|
|
372
|
+
}
|
|
373
|
+
setAgent(agent, slashCommand) {
|
|
374
|
+
this._agent = agent;
|
|
375
|
+
this._slashCommand = slashCommand;
|
|
376
|
+
this._agentOrSlashCommandDetected = !agent.isDefault || !!slashCommand;
|
|
377
|
+
this._onDidChange.fire();
|
|
378
|
+
}
|
|
379
|
+
setResult(result) {
|
|
380
|
+
this._result = result;
|
|
381
|
+
this._onDidChange.fire();
|
|
382
|
+
}
|
|
383
|
+
complete() {
|
|
384
|
+
if (this._result?.errorDetails?.responseIsRedacted) {
|
|
385
|
+
this._response.clear();
|
|
386
|
+
}
|
|
387
|
+
this._isComplete = true;
|
|
388
|
+
this._onDidChange.fire();
|
|
389
|
+
}
|
|
390
|
+
cancel() {
|
|
391
|
+
this._isComplete = true;
|
|
392
|
+
this._isCanceled = true;
|
|
393
|
+
this._onDidChange.fire();
|
|
394
|
+
}
|
|
395
|
+
setFollowups(followups) {
|
|
396
|
+
this._followups = followups;
|
|
397
|
+
this._onDidChange.fire();
|
|
398
|
+
}
|
|
399
|
+
setVote(vote) {
|
|
400
|
+
this._vote = vote;
|
|
401
|
+
this._onDidChange.fire();
|
|
402
|
+
}
|
|
403
|
+
setVoteDownReason(reason) {
|
|
404
|
+
this._voteDownReason = reason;
|
|
405
|
+
this._onDidChange.fire();
|
|
406
|
+
}
|
|
407
|
+
setEditApplied(edit, editCount) {
|
|
408
|
+
if (!this.response.value.includes(edit)) {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
if (!edit.state) {
|
|
412
|
+
return false;
|
|
413
|
+
}
|
|
414
|
+
edit.state.applied = editCount;
|
|
415
|
+
this._onDidChange.fire();
|
|
416
|
+
return true;
|
|
417
|
+
}
|
|
418
|
+
adoptTo(session) {
|
|
419
|
+
this._session = session;
|
|
420
|
+
this._onDidChange.fire();
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
var ChatPauseState;
|
|
424
|
+
(function (ChatPauseState) {
|
|
425
|
+
ChatPauseState[ChatPauseState["NotPausable"] = 0] = "NotPausable";
|
|
426
|
+
ChatPauseState[ChatPauseState["Paused"] = 1] = "Paused";
|
|
427
|
+
ChatPauseState[ChatPauseState["Unpaused"] = 2] = "Unpaused";
|
|
428
|
+
})(ChatPauseState || (ChatPauseState = {}));
|
|
429
|
+
function normalizeSerializableChatData(raw) {
|
|
430
|
+
normalizeOldFields(raw);
|
|
431
|
+
if (!('version' in raw)) {
|
|
432
|
+
return {
|
|
433
|
+
version: 3,
|
|
434
|
+
...raw,
|
|
435
|
+
lastMessageDate: raw.creationDate,
|
|
436
|
+
customTitle: undefined,
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
if (raw.version === 2) {
|
|
440
|
+
return {
|
|
441
|
+
...raw,
|
|
442
|
+
version: 3,
|
|
443
|
+
customTitle: raw.computedTitle
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
return raw;
|
|
447
|
+
}
|
|
448
|
+
function normalizeOldFields(raw) {
|
|
449
|
+
if (!raw.sessionId) {
|
|
450
|
+
raw.sessionId = generateUuid();
|
|
451
|
+
}
|
|
452
|
+
if (!raw.creationDate) {
|
|
453
|
+
raw.creationDate = getLastYearDate();
|
|
454
|
+
}
|
|
455
|
+
if ('version' in raw && (raw.version === 2 || raw.version === 3)) {
|
|
456
|
+
if (!raw.lastMessageDate) {
|
|
457
|
+
raw.lastMessageDate = getLastYearDate();
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
function getLastYearDate() {
|
|
462
|
+
const lastYearDate = ( new Date());
|
|
463
|
+
lastYearDate.setFullYear(lastYearDate.getFullYear() - 1);
|
|
464
|
+
return lastYearDate.getTime();
|
|
465
|
+
}
|
|
466
|
+
function isExportableSessionData(obj) {
|
|
467
|
+
const data = obj;
|
|
468
|
+
return typeof data === 'object' &&
|
|
469
|
+
typeof data.requesterUsername === 'string';
|
|
470
|
+
}
|
|
471
|
+
function isSerializableSessionData(obj) {
|
|
472
|
+
const data = obj;
|
|
473
|
+
return isExportableSessionData(obj) &&
|
|
474
|
+
typeof data.creationDate === 'number' &&
|
|
475
|
+
typeof data.sessionId === 'string' &&
|
|
476
|
+
obj.requests.every((request) => !request.usedContext || isIUsedContext(request.usedContext));
|
|
477
|
+
}
|
|
478
|
+
var ChatRequestRemovalReason;
|
|
479
|
+
(function (ChatRequestRemovalReason) {
|
|
480
|
+
ChatRequestRemovalReason[ChatRequestRemovalReason["Removal"] = 0] = "Removal";
|
|
481
|
+
ChatRequestRemovalReason[ChatRequestRemovalReason["Resend"] = 1] = "Resend";
|
|
482
|
+
ChatRequestRemovalReason[ChatRequestRemovalReason["Adoption"] = 2] = "Adoption";
|
|
483
|
+
})(ChatRequestRemovalReason || (ChatRequestRemovalReason = {}));
|
|
484
|
+
var ChatModelInitState;
|
|
485
|
+
(function (ChatModelInitState) {
|
|
486
|
+
ChatModelInitState[ChatModelInitState["Created"] = 0] = "Created";
|
|
487
|
+
ChatModelInitState[ChatModelInitState["Initializing"] = 1] = "Initializing";
|
|
488
|
+
ChatModelInitState[ChatModelInitState["Initialized"] = 2] = "Initialized";
|
|
489
|
+
})(ChatModelInitState || (ChatModelInitState = {}));
|
|
490
|
+
let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
491
|
+
static getDefaultTitle(requests) {
|
|
492
|
+
const firstRequestMessage = requests.at(0)?.message ?? '';
|
|
493
|
+
const message = typeof firstRequestMessage === 'string' ?
|
|
494
|
+
firstRequestMessage :
|
|
495
|
+
firstRequestMessage.text;
|
|
496
|
+
return message.split('\n')[0].substring(0, 50);
|
|
497
|
+
}
|
|
498
|
+
get welcomeMessage() {
|
|
499
|
+
return this._welcomeMessage;
|
|
500
|
+
}
|
|
501
|
+
get sampleQuestions() {
|
|
502
|
+
return this._sampleQuestions;
|
|
503
|
+
}
|
|
504
|
+
get sessionId() {
|
|
505
|
+
return this._sessionId;
|
|
506
|
+
}
|
|
507
|
+
get requestInProgress() {
|
|
508
|
+
const lastRequest = this.lastRequest;
|
|
509
|
+
if (!lastRequest?.response) {
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
512
|
+
if (lastRequest.response.isPendingConfirmation) {
|
|
513
|
+
return false;
|
|
514
|
+
}
|
|
515
|
+
return !lastRequest.response.isComplete;
|
|
516
|
+
}
|
|
517
|
+
get requestPausibility() {
|
|
518
|
+
const lastRequest = this.lastRequest;
|
|
519
|
+
if (!lastRequest?.response?.agent || lastRequest.response.isComplete || lastRequest.response.isPendingConfirmation) {
|
|
520
|
+
return ChatPauseState.NotPausable;
|
|
521
|
+
}
|
|
522
|
+
return lastRequest.paused ? ChatPauseState.Paused : ChatPauseState.Unpaused;
|
|
523
|
+
}
|
|
524
|
+
get hasRequests() {
|
|
525
|
+
return this._requests.length > 0;
|
|
526
|
+
}
|
|
527
|
+
get lastRequest() {
|
|
528
|
+
return this._requests.at(-1);
|
|
529
|
+
}
|
|
530
|
+
get creationDate() {
|
|
531
|
+
return this._creationDate;
|
|
532
|
+
}
|
|
533
|
+
get lastMessageDate() {
|
|
534
|
+
return this._lastMessageDate;
|
|
535
|
+
}
|
|
536
|
+
get _defaultAgent() {
|
|
537
|
+
return this.chatAgentService.getDefaultAgent(ChatAgentLocation.Panel);
|
|
538
|
+
}
|
|
539
|
+
get requesterUsername() {
|
|
540
|
+
return this._defaultAgent?.metadata.requester?.name ??
|
|
541
|
+
this.initialData?.requesterUsername ?? '';
|
|
542
|
+
}
|
|
543
|
+
get responderUsername() {
|
|
544
|
+
return this._defaultAgent?.fullName ??
|
|
545
|
+
this.initialData?.responderUsername ?? '';
|
|
546
|
+
}
|
|
547
|
+
get requesterAvatarIconUri() {
|
|
548
|
+
return this._defaultAgent?.metadata.requester?.icon ??
|
|
549
|
+
this._initialRequesterAvatarIconUri;
|
|
550
|
+
}
|
|
551
|
+
get responderAvatarIcon() {
|
|
552
|
+
return this._defaultAgent?.metadata.themeIcon ??
|
|
553
|
+
this._initialResponderAvatarIconUri;
|
|
554
|
+
}
|
|
555
|
+
get initState() {
|
|
556
|
+
return this._initState;
|
|
557
|
+
}
|
|
558
|
+
get isImported() {
|
|
559
|
+
return this._isImported;
|
|
560
|
+
}
|
|
561
|
+
get customTitle() {
|
|
562
|
+
return this._customTitle;
|
|
563
|
+
}
|
|
564
|
+
get title() {
|
|
565
|
+
return this._customTitle || ChatModel_1.getDefaultTitle(this._requests);
|
|
566
|
+
}
|
|
567
|
+
get initialLocation() {
|
|
568
|
+
return this._initialLocation;
|
|
569
|
+
}
|
|
570
|
+
constructor(initialData, _initialLocation, logService, chatAgentService) {
|
|
571
|
+
super();
|
|
572
|
+
this.initialData = initialData;
|
|
573
|
+
this._initialLocation = _initialLocation;
|
|
574
|
+
this.logService = logService;
|
|
575
|
+
this.chatAgentService = chatAgentService;
|
|
576
|
+
this._onDidDispose = this._register(( new Emitter()));
|
|
577
|
+
this.onDidDispose = this._onDidDispose.event;
|
|
578
|
+
this._onDidChange = this._register(( new Emitter()));
|
|
579
|
+
this.onDidChange = this._onDidChange.event;
|
|
580
|
+
this._initState = ChatModelInitState.Created;
|
|
581
|
+
this._isInitializedDeferred = ( new DeferredPromise());
|
|
582
|
+
this._isImported = false;
|
|
583
|
+
this._checkpoint = undefined;
|
|
584
|
+
const isValid = isSerializableSessionData(initialData);
|
|
585
|
+
if (initialData && !isValid) {
|
|
586
|
+
this.logService.warn(`ChatModel#constructor: Loaded malformed session data: ${JSON.stringify(initialData)}`);
|
|
587
|
+
}
|
|
588
|
+
this._isImported = (!!initialData && !isValid) || (initialData?.isImported ?? false);
|
|
589
|
+
this._sessionId = (isValid && initialData.sessionId) || generateUuid();
|
|
590
|
+
this._requests = initialData ? this._deserialize(initialData) : [];
|
|
591
|
+
this._creationDate = (isValid && initialData.creationDate) || Date.now();
|
|
592
|
+
this._lastMessageDate = (isValid && initialData.lastMessageDate) || this._creationDate;
|
|
593
|
+
this._customTitle = isValid ? initialData.customTitle : undefined;
|
|
594
|
+
this._initialRequesterAvatarIconUri = initialData?.requesterAvatarIconUri && URI.revive(initialData.requesterAvatarIconUri);
|
|
595
|
+
this._initialResponderAvatarIconUri = isUriComponents(initialData?.responderAvatarIconUri) ? URI.revive(initialData.responderAvatarIconUri) : initialData?.responderAvatarIconUri;
|
|
596
|
+
}
|
|
597
|
+
_deserialize(obj) {
|
|
598
|
+
const requests = obj.requests;
|
|
599
|
+
if (!Array.isArray(requests)) {
|
|
600
|
+
this.logService.error(`Ignoring malformed session data: ${JSON.stringify(obj)}`);
|
|
601
|
+
return [];
|
|
602
|
+
}
|
|
603
|
+
try {
|
|
604
|
+
return ( requests.map((raw) => {
|
|
605
|
+
const parsedRequest = typeof raw.message === 'string'
|
|
606
|
+
? this.getParsedRequestFromString(raw.message)
|
|
607
|
+
: reviveParsedChatRequest(raw.message);
|
|
608
|
+
const variableData = this.reviveVariableData(raw.variableData);
|
|
609
|
+
const request = ( new ChatRequestModel(
|
|
610
|
+
this,
|
|
611
|
+
parsedRequest,
|
|
612
|
+
variableData,
|
|
613
|
+
raw.timestamp ?? -1,
|
|
614
|
+
undefined,
|
|
615
|
+
undefined,
|
|
616
|
+
undefined,
|
|
617
|
+
undefined,
|
|
618
|
+
raw.workingSet?.map((uri) => URI.revive(uri)),
|
|
619
|
+
undefined,
|
|
620
|
+
raw.requestId
|
|
621
|
+
));
|
|
622
|
+
request.shouldBeRemovedOnSend = !!raw.isHidden;
|
|
623
|
+
if (raw.response || raw.result || raw.responseErrorDetails) {
|
|
624
|
+
const agent = (raw.agent && 'metadata' in raw.agent) ?
|
|
625
|
+
reviveSerializedAgent(raw.agent) : undefined;
|
|
626
|
+
const result = 'responseErrorDetails' in raw ?
|
|
627
|
+
{ errorDetails: raw.responseErrorDetails } : raw.result;
|
|
628
|
+
request.response = ( new ChatResponseModel(raw.response ?? [( new MarkdownString(raw.response))], this, agent, raw.slashCommand, request.id, true, raw.isCanceled, raw.vote, raw.voteDownReason, result, raw.followups, undefined, undefined, raw.responseId));
|
|
629
|
+
request.response.shouldBeRemovedOnSend = !!raw.isHidden;
|
|
630
|
+
if (raw.usedContext) {
|
|
631
|
+
request.response.applyReference(revive(raw.usedContext));
|
|
632
|
+
}
|
|
633
|
+
raw.contentReferences?.forEach(r => request.response.applyReference(revive(r)));
|
|
634
|
+
raw.codeCitations?.forEach(c => request.response.applyCodeCitation(revive(c)));
|
|
635
|
+
}
|
|
636
|
+
return request;
|
|
637
|
+
}));
|
|
638
|
+
}
|
|
639
|
+
catch (error) {
|
|
640
|
+
this.logService.error('Failed to parse chat data', error);
|
|
641
|
+
return [];
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
reviveVariableData(raw) {
|
|
645
|
+
const variableData = raw && Array.isArray(raw.variables)
|
|
646
|
+
? raw :
|
|
647
|
+
{ variables: [] };
|
|
648
|
+
variableData.variables = ( variableData.variables.map((v) => {
|
|
649
|
+
if (v && 'values' in v && Array.isArray(v.values)) {
|
|
650
|
+
return {
|
|
651
|
+
id: v.id ?? '',
|
|
652
|
+
name: v.name,
|
|
653
|
+
value: v.values[0]?.value,
|
|
654
|
+
range: v.range,
|
|
655
|
+
modelDescription: v.modelDescription,
|
|
656
|
+
references: v.references
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
else {
|
|
660
|
+
return v;
|
|
661
|
+
}
|
|
662
|
+
}));
|
|
663
|
+
return variableData;
|
|
664
|
+
}
|
|
665
|
+
getParsedRequestFromString(message) {
|
|
666
|
+
const parts = [( new ChatRequestTextPart(( new OffsetRange(0, message.length)), { startColumn: 1, startLineNumber: 1, endColumn: 1, endLineNumber: 1 }, message))];
|
|
667
|
+
return {
|
|
668
|
+
text: message,
|
|
669
|
+
parts
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
toggleLastRequestPaused(isPaused) {
|
|
673
|
+
if (this.requestPausibility !== ChatPauseState.NotPausable && this.lastRequest?.response?.agent) {
|
|
674
|
+
const pausedValue = isPaused ?? !this.lastRequest.paused;
|
|
675
|
+
this.lastRequest.paused = pausedValue;
|
|
676
|
+
this.chatAgentService.setRequestPaused(this.lastRequest.response.agent.id, this.lastRequest.id, pausedValue);
|
|
677
|
+
this._onDidChange.fire({ kind: 'changedRequest', request: this.lastRequest });
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
startInitialize() {
|
|
681
|
+
if (this.initState !== ChatModelInitState.Created) {
|
|
682
|
+
throw ( new Error(
|
|
683
|
+
`ChatModel is in the wrong state for startInitialize: ${ChatModelInitState[this.initState]}`
|
|
684
|
+
));
|
|
685
|
+
}
|
|
686
|
+
this._initState = ChatModelInitState.Initializing;
|
|
687
|
+
}
|
|
688
|
+
deinitialize() {
|
|
689
|
+
this._initState = ChatModelInitState.Created;
|
|
690
|
+
this._isInitializedDeferred = ( new DeferredPromise());
|
|
691
|
+
}
|
|
692
|
+
initialize(welcomeMessage, sampleQuestions) {
|
|
693
|
+
if (this.initState !== ChatModelInitState.Initializing) {
|
|
694
|
+
throw ( new Error(
|
|
695
|
+
`ChatModel is in the wrong state for initialize: ${ChatModelInitState[this.initState]}`
|
|
696
|
+
));
|
|
697
|
+
}
|
|
698
|
+
this._initState = ChatModelInitState.Initialized;
|
|
699
|
+
this._welcomeMessage = welcomeMessage;
|
|
700
|
+
this._sampleQuestions = sampleQuestions;
|
|
701
|
+
this._isInitializedDeferred.complete();
|
|
702
|
+
this._onDidChange.fire({ kind: 'initialize' });
|
|
703
|
+
}
|
|
704
|
+
setInitializationError(error) {
|
|
705
|
+
if (this.initState !== ChatModelInitState.Initializing) {
|
|
706
|
+
throw ( new Error(
|
|
707
|
+
`ChatModel is in the wrong state for setInitializationError: ${ChatModelInitState[this.initState]}`
|
|
708
|
+
));
|
|
709
|
+
}
|
|
710
|
+
if (!this._isInitializedDeferred.isSettled) {
|
|
711
|
+
this._isInitializedDeferred.error(error);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
waitForInitialization() {
|
|
715
|
+
return this._isInitializedDeferred.p;
|
|
716
|
+
}
|
|
717
|
+
getRequests() {
|
|
718
|
+
return this._requests;
|
|
719
|
+
}
|
|
720
|
+
get checkpoint() {
|
|
721
|
+
return this._checkpoint;
|
|
722
|
+
}
|
|
723
|
+
disableRequests(requestIds) {
|
|
724
|
+
const toHide = ( new Set(requestIds));
|
|
725
|
+
this._requests.forEach((request) => {
|
|
726
|
+
const shouldBeRemovedOnSend = ( toHide.has(request.id));
|
|
727
|
+
request.shouldBeRemovedOnSend = shouldBeRemovedOnSend;
|
|
728
|
+
if (request.response) {
|
|
729
|
+
request.response.shouldBeRemovedOnSend = shouldBeRemovedOnSend;
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
this._onDidChange.fire({
|
|
733
|
+
kind: 'setHidden',
|
|
734
|
+
hiddenRequestIds: ( new Set(requestIds)),
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
addRequest(message, variableData, attempt, chatAgent, slashCommand, confirmation, locationData, attachments, workingSet, isCompleteAddedRequest) {
|
|
738
|
+
const request = ( new ChatRequestModel(
|
|
739
|
+
this,
|
|
740
|
+
message,
|
|
741
|
+
variableData,
|
|
742
|
+
Date.now(),
|
|
743
|
+
attempt,
|
|
744
|
+
confirmation,
|
|
745
|
+
locationData,
|
|
746
|
+
attachments,
|
|
747
|
+
workingSet,
|
|
748
|
+
isCompleteAddedRequest
|
|
749
|
+
));
|
|
750
|
+
request.response = ( new ChatResponseModel(
|
|
751
|
+
[],
|
|
752
|
+
this,
|
|
753
|
+
chatAgent,
|
|
754
|
+
slashCommand,
|
|
755
|
+
request.id,
|
|
756
|
+
undefined,
|
|
757
|
+
undefined,
|
|
758
|
+
undefined,
|
|
759
|
+
undefined,
|
|
760
|
+
undefined,
|
|
761
|
+
undefined,
|
|
762
|
+
isCompleteAddedRequest
|
|
763
|
+
));
|
|
764
|
+
this._requests.push(request);
|
|
765
|
+
this._lastMessageDate = Date.now();
|
|
766
|
+
this._onDidChange.fire({ kind: 'addRequest', request });
|
|
767
|
+
return request;
|
|
768
|
+
}
|
|
769
|
+
setCustomTitle(title) {
|
|
770
|
+
this._customTitle = title;
|
|
771
|
+
}
|
|
772
|
+
setRequestPaused(request, isPaused) {
|
|
773
|
+
request.paused = isPaused;
|
|
774
|
+
this._onDidChange.fire({ kind: 'changedRequest', request });
|
|
775
|
+
}
|
|
776
|
+
updateRequest(request, variableData) {
|
|
777
|
+
request.variableData = variableData;
|
|
778
|
+
this._onDidChange.fire({ kind: 'changedRequest', request });
|
|
779
|
+
}
|
|
780
|
+
adoptRequest(request) {
|
|
781
|
+
const oldOwner = request.session;
|
|
782
|
+
const index = oldOwner._requests.findIndex(candidate => candidate.id === request.id);
|
|
783
|
+
if (index === -1) {
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
oldOwner._requests.splice(index, 1);
|
|
787
|
+
request.adoptTo(this);
|
|
788
|
+
request.response?.adoptTo(this);
|
|
789
|
+
this._requests.push(request);
|
|
790
|
+
oldOwner._onDidChange.fire({ kind: 'removeRequest', requestId: request.id, responseId: request.response?.id, reason: ChatRequestRemovalReason.Adoption });
|
|
791
|
+
this._onDidChange.fire({ kind: 'addRequest', request });
|
|
792
|
+
}
|
|
793
|
+
acceptResponseProgress(request, progress, quiet) {
|
|
794
|
+
if (!request.response) {
|
|
795
|
+
request.response = ( new ChatResponseModel([], this, undefined, undefined, request.id));
|
|
796
|
+
}
|
|
797
|
+
if (request.response.isComplete) {
|
|
798
|
+
throw ( new Error('acceptResponseProgress: Adding progress to a completed response'));
|
|
799
|
+
}
|
|
800
|
+
if (progress.kind === 'markdownContent' ||
|
|
801
|
+
progress.kind === 'treeData' ||
|
|
802
|
+
progress.kind === 'inlineReference' ||
|
|
803
|
+
progress.kind === 'codeblockUri' ||
|
|
804
|
+
progress.kind === 'markdownVuln' ||
|
|
805
|
+
progress.kind === 'progressMessage' ||
|
|
806
|
+
progress.kind === 'command' ||
|
|
807
|
+
progress.kind === 'textEdit' ||
|
|
808
|
+
progress.kind === 'warning' ||
|
|
809
|
+
progress.kind === 'progressTask' ||
|
|
810
|
+
progress.kind === 'confirmation' ||
|
|
811
|
+
progress.kind === 'toolInvocation') {
|
|
812
|
+
request.response.updateContent(progress, quiet);
|
|
813
|
+
}
|
|
814
|
+
else if (progress.kind === 'usedContext' || progress.kind === 'reference') {
|
|
815
|
+
request.response.applyReference(progress);
|
|
816
|
+
}
|
|
817
|
+
else if (progress.kind === 'agentDetection') {
|
|
818
|
+
const agent = this.chatAgentService.getAgent(progress.agentId);
|
|
819
|
+
if (agent) {
|
|
820
|
+
request.response.setAgent(agent, progress.command);
|
|
821
|
+
this._onDidChange.fire({ kind: 'setAgent', agent, command: progress.command });
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
else if (progress.kind === 'codeCitation') {
|
|
825
|
+
request.response.applyCodeCitation(progress);
|
|
826
|
+
}
|
|
827
|
+
else if (progress.kind === 'move') {
|
|
828
|
+
this._onDidChange.fire({ kind: 'move', target: progress.uri, range: progress.range });
|
|
829
|
+
}
|
|
830
|
+
else {
|
|
831
|
+
this.logService.error(`Couldn't handle progress: ${JSON.stringify(progress)}`);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
removeRequest(id, reason = ChatRequestRemovalReason.Removal) {
|
|
835
|
+
const index = this._requests.findIndex(request => request.id === id);
|
|
836
|
+
const request = this._requests[index];
|
|
837
|
+
if (index !== -1) {
|
|
838
|
+
this._onDidChange.fire({ kind: 'removeRequest', requestId: request.id, responseId: request.response?.id, reason });
|
|
839
|
+
this._requests.splice(index, 1);
|
|
840
|
+
request.response?.dispose();
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
cancelRequest(request) {
|
|
844
|
+
if (request.response) {
|
|
845
|
+
request.response.cancel();
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
setResponse(request, result) {
|
|
849
|
+
if (!request.response) {
|
|
850
|
+
request.response = ( new ChatResponseModel([], this, undefined, undefined, request.id));
|
|
851
|
+
}
|
|
852
|
+
request.response.setResult(result);
|
|
853
|
+
}
|
|
854
|
+
completeResponse(request) {
|
|
855
|
+
if (!request.response) {
|
|
856
|
+
throw ( new Error('Call setResponse before completeResponse'));
|
|
857
|
+
}
|
|
858
|
+
request.response.complete();
|
|
859
|
+
}
|
|
860
|
+
setFollowups(request, followups) {
|
|
861
|
+
if (!request.response) {
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
864
|
+
request.response.setFollowups(followups);
|
|
865
|
+
}
|
|
866
|
+
setResponseModel(request, response) {
|
|
867
|
+
request.response = response;
|
|
868
|
+
this._onDidChange.fire({ kind: 'addResponse', response });
|
|
869
|
+
}
|
|
870
|
+
toExport() {
|
|
871
|
+
return {
|
|
872
|
+
requesterUsername: this.requesterUsername,
|
|
873
|
+
requesterAvatarIconUri: this.requesterAvatarIconUri,
|
|
874
|
+
responderUsername: this.responderUsername,
|
|
875
|
+
responderAvatarIconUri: this.responderAvatarIcon,
|
|
876
|
+
initialLocation: this.initialLocation,
|
|
877
|
+
requests: ( this._requests.map((r) => {
|
|
878
|
+
const message = {
|
|
879
|
+
...r.message,
|
|
880
|
+
parts: ( r.message.parts.map(p => p && 'toJSON' in p ? p.toJSON() : p))
|
|
881
|
+
};
|
|
882
|
+
const agent = r.response?.agent;
|
|
883
|
+
const agentJson = agent && 'toJSON' in agent ? agent.toJSON() :
|
|
884
|
+
agent ? { ...agent } : undefined;
|
|
885
|
+
return {
|
|
886
|
+
requestId: r.id,
|
|
887
|
+
message,
|
|
888
|
+
variableData: r.variableData,
|
|
889
|
+
response: r.response ?
|
|
890
|
+
( r.response.response.value.map(item => {
|
|
891
|
+
if (item.kind === 'treeData') {
|
|
892
|
+
return item.treeData;
|
|
893
|
+
}
|
|
894
|
+
else if (item.kind === 'markdownContent') {
|
|
895
|
+
return item.content;
|
|
896
|
+
}
|
|
897
|
+
else {
|
|
898
|
+
return item;
|
|
899
|
+
}
|
|
900
|
+
}))
|
|
901
|
+
: undefined,
|
|
902
|
+
responseId: r.response?.id,
|
|
903
|
+
isHidden: r.shouldBeRemovedOnSend,
|
|
904
|
+
result: r.response?.result,
|
|
905
|
+
followups: r.response?.followups,
|
|
906
|
+
isCanceled: r.response?.isCanceled,
|
|
907
|
+
vote: r.response?.vote,
|
|
908
|
+
voteDownReason: r.response?.voteDownReason,
|
|
909
|
+
agent: agentJson,
|
|
910
|
+
workingSet: r.workingSet,
|
|
911
|
+
slashCommand: r.response?.slashCommand,
|
|
912
|
+
usedContext: r.response?.usedContext,
|
|
913
|
+
contentReferences: r.response?.contentReferences,
|
|
914
|
+
codeCitations: r.response?.codeCitations,
|
|
915
|
+
timestamp: r.timestamp
|
|
916
|
+
};
|
|
917
|
+
})),
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
toJSON() {
|
|
921
|
+
return {
|
|
922
|
+
version: 3,
|
|
923
|
+
...this.toExport(),
|
|
924
|
+
sessionId: this.sessionId,
|
|
925
|
+
creationDate: this._creationDate,
|
|
926
|
+
isImported: this._isImported,
|
|
927
|
+
lastMessageDate: this._lastMessageDate,
|
|
928
|
+
customTitle: this._customTitle
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
dispose() {
|
|
932
|
+
this._requests.forEach(r => r.response?.dispose());
|
|
933
|
+
this._onDidDispose.fire();
|
|
934
|
+
super.dispose();
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
ChatModel = ChatModel_1 = ( __decorate([
|
|
938
|
+
( __param(2, ILogService)),
|
|
939
|
+
( __param(3, IChatAgentService))
|
|
940
|
+
], ChatModel));
|
|
941
|
+
function updateRanges(variableData, diff) {
|
|
942
|
+
return {
|
|
943
|
+
variables: ( variableData.variables.map(v => ({
|
|
944
|
+
...v,
|
|
945
|
+
range: v.range && {
|
|
946
|
+
start: v.range.start - diff,
|
|
947
|
+
endExclusive: v.range.endExclusive - diff
|
|
948
|
+
}
|
|
949
|
+
})))
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
function canMergeMarkdownStrings(md1, md2) {
|
|
953
|
+
if (md1.baseUri && md2.baseUri) {
|
|
954
|
+
const baseUriEquals = md1.baseUri.scheme === md2.baseUri.scheme
|
|
955
|
+
&& md1.baseUri.authority === md2.baseUri.authority
|
|
956
|
+
&& md1.baseUri.path === md2.baseUri.path
|
|
957
|
+
&& md1.baseUri.query === md2.baseUri.query
|
|
958
|
+
&& md1.baseUri.fragment === md2.baseUri.fragment;
|
|
959
|
+
if (!baseUriEquals) {
|
|
960
|
+
return false;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
else if (md1.baseUri || md2.baseUri) {
|
|
964
|
+
return false;
|
|
965
|
+
}
|
|
966
|
+
return equals(md1.isTrusted, md2.isTrusted) &&
|
|
967
|
+
md1.supportHtml === md2.supportHtml &&
|
|
968
|
+
md1.supportThemeIcons === md2.supportThemeIcons;
|
|
969
|
+
}
|
|
970
|
+
function appendMarkdownString(md1, md2) {
|
|
971
|
+
const appendedValue = typeof md2 === 'string' ? md2 : md2.value;
|
|
972
|
+
return {
|
|
973
|
+
value: md1.value + appendedValue,
|
|
974
|
+
isTrusted: md1.isTrusted,
|
|
975
|
+
supportThemeIcons: md1.supportThemeIcons,
|
|
976
|
+
supportHtml: md1.supportHtml,
|
|
977
|
+
baseUri: md1.baseUri
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
function getCodeCitationsMessage(citations) {
|
|
981
|
+
if (citations.length === 0) {
|
|
982
|
+
return '';
|
|
983
|
+
}
|
|
984
|
+
const licenseTypes = citations.reduce((set, c) => set.add(c.license), ( new Set()));
|
|
985
|
+
const label = licenseTypes.size === 1 ?
|
|
986
|
+
( localize(4755, "Similar code found with 1 license type", licenseTypes.size)) :
|
|
987
|
+
( localize(4756, "Similar code found with {0} license types", licenseTypes.size));
|
|
988
|
+
return label;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
export { ChatModel, ChatModelInitState, ChatPauseState, ChatRequestModel, ChatRequestRemovalReason, ChatResponseModel, Response, appendMarkdownString, canMergeMarkdownStrings, getCodeCitationsMessage, isExportableSessionData, isLinkVariableEntry, isPasteVariableEntry, isSerializableSessionData, normalizeSerializableChatData, toChatHistoryContent, updateRanges };
|