@codingame/monaco-vscode-api 19.1.3 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/missing-services.js +141 -54
- package/package.json +8 -8
- package/services.d.ts +5 -5
- package/services.js +3 -3
- package/vscode/src/vs/base/browser/dom.d.ts +7 -5
- package/vscode/src/vs/base/browser/dom.js +21 -132
- package/vscode/src/vs/base/browser/domSanitize.d.ts +28 -0
- package/vscode/src/vs/base/browser/domSanitize.js +175 -0
- package/vscode/src/vs/base/browser/formattedTextRenderer.d.ts +2 -5
- package/vscode/src/vs/base/browser/formattedTextRenderer.js +13 -20
- package/vscode/src/vs/base/browser/markdownRenderer.d.ts +23 -13
- package/vscode/src/vs/base/browser/markdownRenderer.js +155 -126
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.d.ts +2 -0
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +9 -11
- package/vscode/src/vs/base/browser/ui/button/button.d.ts +2 -0
- package/vscode/src/vs/base/browser/ui/button/button.js +24 -15
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +5 -10
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css +9 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +3 -21
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +7 -7
- package/vscode/src/vs/base/browser/ui/list/listPaging.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/list/listWidget.d.ts +2 -0
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +3 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/abstractScrollbar.js +9 -5
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.d.ts +3 -0
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +48 -1
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.d.ts +2 -0
- package/vscode/src/vs/base/browser/ui/toggle/toggle.css +0 -3
- package/vscode/src/vs/base/browser/ui/toggle/toggle.d.ts +22 -12
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +93 -33
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.d.ts +3 -0
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +3 -0
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.d.ts +3 -1
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +19 -17
- package/vscode/src/vs/base/browser/webWorkerFactory.d.ts +1 -1
- package/vscode/src/vs/base/browser/webWorkerFactory.js +3 -2
- package/vscode/src/vs/base/common/arrays.js +4 -1
- package/vscode/src/vs/base/common/arraysFind.d.ts +1 -0
- package/vscode/src/vs/base/common/async.d.ts +26 -0
- package/vscode/src/vs/base/common/async.js +103 -1
- 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/lifecycle.js +4 -0
- package/vscode/src/vs/base/common/marshallingIds.d.ts +3 -1
- package/vscode/src/vs/base/common/marshallingIds.js +2 -0
- package/vscode/src/vs/base/common/network.d.ts +2 -1
- package/vscode/src/vs/base/common/network.js +2 -1
- package/vscode/src/vs/base/common/oauth.d.ts +2 -8
- package/vscode/src/vs/base/common/oauth.js +6 -27
- package/vscode/src/vs/base/common/observableInternal/changeTracker.d.ts +10 -0
- package/vscode/src/vs/base/common/observableInternal/changeTracker.js +33 -1
- package/vscode/src/vs/base/common/observableInternal/index.d.ts +2 -2
- package/vscode/src/vs/base/common/observableInternal/logging/debugger/devToolsLogger.js +22 -1
- package/vscode/src/vs/base/common/observableInternal/map.d.ts +24 -0
- package/vscode/src/vs/base/common/observableInternal/map.js +63 -0
- package/vscode/src/vs/base/common/observableInternal/observables/derivedImpl.d.ts +1 -0
- package/vscode/src/vs/base/common/observableInternal/observables/derivedImpl.js +8 -0
- package/vscode/src/vs/base/common/platform.js +1 -1
- package/vscode/src/vs/base/common/product.d.ts +19 -7
- package/vscode/src/vs/base/common/strings.d.ts +1 -0
- package/vscode/src/vs/base/common/strings.js +16 -1
- package/vscode/src/vs/editor/browser/config/editorConfiguration.js +4 -4
- package/vscode/src/vs/editor/browser/config/migrateOptions.js +1 -0
- package/vscode/src/vs/editor/browser/controller/dragScrolling.d.ts +48 -0
- package/vscode/src/vs/editor/browser/controller/dragScrolling.js +182 -0
- package/vscode/src/vs/editor/browser/controller/editContext/clipboardUtils.d.ts +1 -0
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.d.ts +3 -5
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.js +30 -73
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentRich.d.ts +35 -0
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +329 -0
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentSimple.d.ts +31 -0
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentSimple.js +176 -0
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderSupport.d.ts +12 -12
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +50 -88
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderUtils.d.ts +11 -0
- package/vscode/src/vs/editor/browser/controller/editContext/screenReaderUtils.d.ts +9 -12
- package/vscode/src/vs/editor/browser/controller/editContext/screenReaderUtils.js +22 -11
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +5 -21
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +23 -2
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.d.ts +2 -2
- package/vscode/src/vs/editor/browser/controller/mouseHandler.d.ts +1 -0
- package/vscode/src/vs/editor/browser/controller/mouseHandler.js +31 -114
- package/vscode/src/vs/editor/browser/controller/mouseTarget.d.ts +1 -0
- package/vscode/src/vs/editor/browser/controller/mouseTarget.js +26 -7
- package/vscode/src/vs/editor/browser/coreCommands.d.ts +3 -3
- package/vscode/src/vs/editor/browser/editorBrowser.d.ts +1 -1
- package/vscode/src/vs/editor/browser/editorExtensions.d.ts +2 -2
- package/vscode/src/vs/editor/browser/gpu/atlas/textureAtlas.js +1 -1
- package/vscode/src/vs/editor/browser/gpu/taskQueue.d.ts +5 -2
- package/vscode/src/vs/editor/browser/gpu/taskQueue.js +11 -4
- package/vscode/src/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/vscode/src/vs/editor/browser/services/bulkEditService.d.ts +2 -2
- package/vscode/src/vs/editor/browser/services/editorWorkerService.d.ts +1 -1
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.d.ts +1 -1
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +33 -1
- package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.d.ts +1 -0
- package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +6 -0
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.d.ts +4 -1
- package/vscode/src/vs/editor/browser/services/inlineCompletionsService.js +13 -2
- package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.d.ts +1 -1
- package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
- package/vscode/src/vs/editor/browser/view/renderingContext.d.ts +2 -1
- package/vscode/src/vs/editor/browser/view/viewUserInputEvents.d.ts +1 -1
- package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +4 -3
- package/vscode/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +2 -0
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.css +8 -2
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.d.ts +3 -2
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +44 -13
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.d.ts +1 -0
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +7 -2
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.d.ts +1 -0
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.js +9 -4
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLine.d.ts +1 -0
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLine.js +43 -35
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLineOptions.d.ts +1 -0
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +2 -0
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLines.css +1 -0
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLines.d.ts +1 -0
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLines.js +21 -4
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.d.ts +3 -3
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +3 -3
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +4 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.d.ts +3 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +9 -3
- package/vscode/src/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.d.ts +2 -2
- package/vscode/src/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +4 -4
- package/vscode/src/vs/editor/common/commands/surroundSelectionCommand.js +1 -1
- package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +21 -6
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +178 -162
- package/vscode/src/vs/editor/common/config/editorOptions.js +592 -495
- package/vscode/src/vs/editor/common/coordinatesConverter.d.ts +30 -0
- package/vscode/src/vs/editor/common/coordinatesConverter.js +56 -0
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/vscode/src/vs/editor/common/core/edits/edit.d.ts +3 -3
- package/vscode/src/vs/editor/common/core/edits/lineEdit.d.ts +2 -2
- package/vscode/src/vs/editor/common/core/edits/lineEdit.js +14 -14
- package/vscode/src/vs/editor/common/core/edits/stringEdit.d.ts +11 -4
- package/vscode/src/vs/editor/common/core/edits/stringEdit.js +36 -12
- package/vscode/src/vs/editor/common/core/edits/textEdit.d.ts +3 -0
- package/vscode/src/vs/editor/common/core/edits/textEdit.js +20 -0
- package/vscode/src/vs/editor/common/core/text/abstractText.d.ts +2 -0
- package/vscode/src/vs/editor/common/core/text/abstractText.js +3 -0
- package/vscode/src/vs/editor/common/core/text/positionToOffsetImpl.d.ts +1 -1
- package/vscode/src/vs/editor/common/core/text/positionToOffsetImpl.js +2 -2
- package/vscode/src/vs/editor/common/cursor/cursor.d.ts +4 -4
- package/vscode/src/vs/editor/common/cursor/cursor.js +9 -9
- package/vscode/src/vs/editor/common/cursor/cursorContext.d.ts +1 -1
- package/vscode/src/vs/editor/common/cursor/cursorDeleteOperations.d.ts +2 -1
- package/vscode/src/vs/editor/common/cursor/cursorDeleteOperations.js +28 -13
- package/vscode/src/vs/editor/common/cursor/cursorMoveCommands.js +15 -6
- package/vscode/src/vs/editor/common/cursorCommon.d.ts +1 -0
- package/vscode/src/vs/editor/common/cursorCommon.js +2 -0
- package/vscode/src/vs/editor/common/editorContextKeys.js +46 -46
- package/vscode/src/vs/editor/common/languages/defaultDocumentColorsComputer.js +3 -3
- package/vscode/src/vs/editor/common/languages/linkComputer.js +1 -4
- package/vscode/src/vs/editor/common/languages/modesRegistry.js +1 -1
- package/vscode/src/vs/editor/common/languages.d.ts +19 -0
- package/vscode/src/vs/editor/common/languages.js +83 -57
- package/vscode/src/vs/editor/common/model/editStack.d.ts +2 -2
- package/vscode/src/vs/editor/common/model/editStack.js +3 -3
- package/vscode/src/vs/editor/common/model/textModel.d.ts +7 -6
- package/vscode/src/vs/editor/common/model/textModel.js +5 -4
- package/vscode/src/vs/editor/common/model.d.ts +6 -1
- package/vscode/src/vs/editor/common/model.js +6 -1
- package/vscode/src/vs/editor/common/modelLineProjectionData.d.ts +1 -1
- package/vscode/src/vs/editor/common/services/editorWebWorker.d.ts +1 -1
- package/vscode/src/vs/editor/common/services/model.service.d.ts +2 -2
- package/vscode/src/vs/editor/common/services/modelService.d.ts +2 -2
- package/vscode/src/vs/editor/common/services/modelService.js +2 -2
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.d.ts +172 -160
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +174 -161
- package/vscode/src/vs/editor/common/standaloneStrings.js +47 -47
- package/vscode/src/vs/editor/common/textModelEditSource.d.ts +151 -0
- package/vscode/src/vs/editor/common/{textModelEditReason.js → textModelEditSource.js} +44 -23
- package/vscode/src/vs/editor/common/textModelEvents.d.ts +2 -2
- package/vscode/src/vs/editor/common/tokens/sparseMultilineTokens.js +1 -1
- package/vscode/src/vs/editor/common/viewLayout/lineDecorations.d.ts +1 -1
- package/vscode/src/vs/editor/common/viewLayout/lineDecorations.js +1 -1
- package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.d.ts +8 -5
- package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +29 -29
- package/vscode/src/vs/editor/common/viewLayout/viewLinesViewportData.d.ts +2 -1
- package/vscode/src/vs/editor/common/viewModel/inlineDecorations.d.ts +21 -0
- package/vscode/src/vs/editor/common/viewModel/inlineDecorations.js +30 -0
- package/vscode/src/vs/editor/common/viewModel/modelLineProjection.js +2 -1
- package/vscode/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.d.ts +1 -1
- package/vscode/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +11 -3
- package/vscode/src/vs/editor/common/viewModel/screenReaderSimpleModel.d.ts +10 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelDecoration.d.ts +11 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelDecoration.js +49 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelDecorations.d.ts +7 -11
- package/vscode/src/vs/editor/common/viewModel/viewModelDecorations.js +5 -43
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.d.ts +7 -4
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +32 -9
- package/vscode/src/vs/editor/common/viewModel/viewModelLines.d.ts +4 -2
- package/vscode/src/vs/editor/common/viewModel/viewModelLines.js +5 -55
- package/vscode/src/vs/editor/common/viewModel.d.ts +8 -34
- package/vscode/src/vs/editor/common/viewModel.js +3 -35
- 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 +44 -17
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +8 -7
- 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 +5 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerSaturationBox.d.ts +0 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerSaturationBox.js +0 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +4 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/vscode/src/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -19
- 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.d.ts +3 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +54 -29
- 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 +4 -4
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +16 -16
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/vscode/src/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.d.ts +3 -1
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +31 -3
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +3 -3
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.d.ts +3 -1
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +6 -3
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js +7 -2
- package/vscode/src/vs/editor/contrib/hover/browser/getHover.d.ts +1 -2
- package/vscode/src/vs/editor/contrib/hover/browser/getHover.js +6 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/vscode/src/vs/editor/contrib/hover/browser/hoverTypes.d.ts +4 -4
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.d.ts +1 -2
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +18 -19
- 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 +17 -15
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.d.ts +8 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -20
- 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 +12 -11
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +22 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/ghostText.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.d.ts +5 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +107 -83
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +31 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.d.ts +4 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +27 -16
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.d.ts +6 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +11 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/typingSpeed.d.ts +32 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/typingSpeed.js +145 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +2 -21
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +14 -9
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +5 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +3 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +42 -20
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/vscode/src/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.d.ts +5 -0
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +105 -33
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/vscode/src/vs/editor/contrib/links/browser/links.js +10 -10
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.d.ts +2 -0
- package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +34 -28
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +13 -13
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +6 -6
- package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.d.ts +2 -2
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +5 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +13 -13
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.d.ts +6 -6
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +30 -30
- 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 +9 -6
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +3 -3
- package/vscode/src/vs/editor/editor.worker.start.d.ts +1 -1
- package/vscode/src/vs/editor/editor.worker.start.js +26 -18
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.d.ts +2 -1
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +3 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +1 -0
- package/vscode/src/vs/platform/accessibility/browser/accessibleView.d.ts +1 -1
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/vscode/src/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/vscode/src/vs/platform/actionWidget/browser/actionList.d.ts +3 -1
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +45 -8
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css +20 -1
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.service.d.ts +5 -5
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +1 -0
- package/vscode/src/vs/platform/actions/browser/toolbar.js +6 -3
- package/vscode/src/vs/platform/actions/common/actions.d.ts +4 -3
- package/vscode/src/vs/platform/actions/common/actions.js +4 -3
- 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/clipboard/browser/clipboardService.d.ts +1 -1
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +12 -2
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.d.ts +5 -1
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +20 -10
- package/vscode/src/vs/platform/configuration/common/configurations.js +2 -2
- 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/diagnostics/common/diagnostics.d.ts +1 -1
- package/vscode/src/vs/platform/dialogs/common/dialogs.service.d.ts +1 -1
- package/vscode/src/vs/platform/dnd/browser/dnd.d.ts +1 -0
- package/vscode/src/vs/platform/dnd/browser/dnd.js +2 -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 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryManifest.d.ts +62 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryManifest.js +55 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryManifest.service.d.ts +3 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +2 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +19 -19
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.service.d.ts +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +7 -7
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +20 -20
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +21 -0
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +21 -0
- 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/imageResize/common/imageResizeService.service.d.ts +5 -0
- package/vscode/src/vs/platform/imageResize/common/imageResizeService.service.js +6 -0
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/vscode/src/vs/platform/languagePacks/common/languagePacks.service.d.ts +1 -1
- package/vscode/src/vs/platform/list/browser/listService.js +27 -27
- package/vscode/src/vs/platform/log/common/log.js +6 -6
- package/vscode/src/vs/platform/markers/common/markerService.js +2 -2
- package/vscode/src/vs/platform/markers/common/markers.js +6 -6
- package/vscode/src/vs/platform/mcp/common/mcpManagement.service.d.ts +8 -0
- package/vscode/src/vs/platform/mcp/common/mcpManagement.service.js +2 -1
- package/vscode/src/vs/platform/notification/common/notification.js +3 -3
- package/vscode/src/vs/platform/observable/common/platformObservableUtils.d.ts +1 -0
- package/vscode/src/vs/platform/observable/common/platformObservableUtils.js +20 -9
- package/vscode/src/vs/platform/opener/browser/link.js +1 -4
- package/vscode/src/vs/platform/policy/common/policy.d.ts +2 -2
- package/vscode/src/vs/platform/policy/common/policy.service.d.ts +1 -1
- package/vscode/src/vs/platform/product/common/product.js +3 -3
- package/vscode/src/vs/platform/quickinput/browser/media/quickInput.css +81 -14
- package/vscode/src/vs/platform/quickinput/browser/quickInput.d.ts +10 -7
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +19 -14
- package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.d.ts +2 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +38 -11
- package/vscode/src/vs/platform/quickinput/browser/{quickInputTree.d.ts → quickInputList.d.ts} +1 -1
- package/vscode/src/vs/platform/quickinput/browser/{quickInputTree.js → quickInputList.js} +9 -9
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.d.ts +2 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +3 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputDelegate.d.ts +6 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputDelegate.js +13 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTree.d.ts +9 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTree.js +35 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.d.ts +13 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +33 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeController.d.ts +42 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeController.js +296 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeFilter.d.ts +10 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeFilter.js +39 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.d.ts +33 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +148 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickTree.d.ts +53 -0
- package/vscode/src/vs/platform/quickinput/browser/tree/quickTree.js +189 -0
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +46 -2
- package/vscode/src/vs/platform/quickinput/common/quickInput.js +1 -0
- package/vscode/src/vs/platform/quickinput/common/quickInput.service.d.ts +2 -1
- package/vscode/src/vs/platform/request/common/request.js +18 -18
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -1
- package/vscode/src/vs/platform/terminal/common/environmentVariableShared.d.ts +1 -1
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +6 -5
- package/vscode/src/vs/platform/terminal/common/terminal.service.d.ts +2 -4
- package/vscode/src/vs/platform/terminal/common/terminalProcess.d.ts +1 -1
- package/vscode/src/vs/platform/theme/browser/defaultStyles.d.ts +1 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.js +2 -2
- package/vscode/src/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/vscode/src/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/vscode/src/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/vscode/src/vs/platform/theme/common/colors/listColors.js +36 -36
- package/vscode/src/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/vscode/src/vs/platform/theme/common/colors/miscColors.js +15 -15
- package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/vscode/src/vs/platform/theme/common/iconRegistry.js +6 -6
- package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.d.ts +12 -2
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +14 -6
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.service.d.ts +2 -1
- package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +64 -9
- package/vscode/src/vs/workbench/api/common/extHost.common.services.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +102 -41
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +6 -0
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.d.ts +4 -2
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +98 -27
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +22 -4
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +24 -5
- package/vscode/src/vs/workbench/api/common/extHostChatOutputRenderer.d.ts +14 -0
- package/vscode/src/vs/workbench/api/common/extHostChatOutputRenderer.js +32 -0
- package/vscode/src/vs/workbench/api/common/extHostChatSessions.d.ts +35 -0
- package/vscode/src/vs/workbench/api/common/extHostChatSessions.js +222 -0
- package/vscode/src/vs/workbench/api/common/extHostCustomEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDataChannels.d.ts +15 -0
- package/vscode/src/vs/workbench/api/common/extHostDataChannels.js +44 -0
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +3 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +32 -34
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.d.ts +12 -15
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +127 -120
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostMcp.js +40 -25
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSCM.d.ts +1 -2
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +28 -10
- package/vscode/src/vs/workbench/api/common/extHostSecretState.d.ts +1 -0
- package/vscode/src/vs/workbench/api/common/extHostSecretState.js +3 -0
- package/vscode/src/vs/workbench/api/common/extHostSecrets.d.ts +2 -0
- package/vscode/src/vs/workbench/api/common/extHostSecrets.js +6 -0
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTask.d.ts +3 -0
- package/vscode/src/vs/workbench/api/common/extHostTask.js +12 -1
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.d.ts +8 -8
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +203 -198
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.d.ts +19 -8
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +211 -33
- package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +77 -13
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +69 -11
- package/vscode/src/vs/workbench/api/common/extHostWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +12 -12
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +31 -31
- package/vscode/src/vs/workbench/browser/actions/textInputActions.d.ts +4 -2
- package/vscode/src/vs/workbench/browser/actions/textInputActions.js +24 -10
- package/vscode/src/vs/workbench/browser/contextkeys.js +10 -5
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.service.d.ts +1 -1
- package/vscode/src/vs/workbench/common/configuration.js +9 -9
- package/vscode/src/vs/workbench/common/contextkeys.js +87 -78
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.d.ts +32 -0
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +180 -0
- package/vscode/src/vs/workbench/common/editor/diffEditorModel.d.ts +12 -0
- package/vscode/src/vs/workbench/common/editor/diffEditorModel.js +26 -0
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/common/editor/editorModel.d.ts +10 -0
- package/vscode/src/vs/workbench/common/editor/editorModel.js +27 -0
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.d.ts +51 -0
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +303 -0
- package/vscode/src/vs/workbench/common/editor/textDiffEditorModel.d.ts +18 -0
- package/vscode/src/vs/workbench/common/editor/textDiffEditorModel.js +45 -0
- package/vscode/src/vs/workbench/common/editor/textEditorModel.d.ts +47 -0
- package/vscode/src/vs/workbench/common/editor/textEditorModel.js +181 -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.d.ts +2 -2
- package/vscode/src/vs/workbench/common/theme.js +161 -161
- package/vscode/src/vs/workbench/common/views.js +4 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +164 -156
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.service.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.service.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts.d.ts +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextPickService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.service.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +59 -48
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.d.ts +81 -11
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.service.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.service.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.service.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariables.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/common/constants.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.d.ts +32 -11
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +8 -5
- 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 +47 -17
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +147 -65
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.service.d.ts +9 -7
- package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/types.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/manageTodoListTool.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/manageTodoListTool.js +203 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +4 -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.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +65 -65
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +4 -2
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistryTypes.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.d.ts +33 -9
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +28 -10
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.service.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.service.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +9 -7
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/environmentVariable.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/common/environmentVariable.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalCompletionService.service.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webview.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.d.ts +2 -0
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.js +8 -10
- package/vscode/src/vs/workbench/services/activity/common/activity.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.service.js +1 -1
- package/vscode/src/vs/workbench/services/authentication/common/dynamicAuthenticationProviderStorage.service.d.ts +5 -2
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/coreExperimentation/common/coreExperimentationService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/dataChannel/common/dataChannel.d.ts +7 -0
- package/vscode/src/vs/workbench/services/dataChannel/common/dataChannel.service.d.ts +8 -0
- package/vscode/src/vs/workbench/services/dataChannel/common/dataChannel.service.js +6 -0
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +10 -13
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.service.d.ts +2 -5
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +100 -84
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
- package/vscode/src/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.d.ts +61 -0
- package/vscode/src/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.js +7 -0
- package/vscode/src/vs/workbench/services/localization/common/locale.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.service.d.ts +11 -8
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.service.js +3 -2
- package/vscode/src/vs/workbench/services/outline/browser/outline.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/preferences/common/preferences.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +1 -0
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +1 -1
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
- 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 -2
- 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-dts/vscode.d.ts +5 -5
- package/vscode-dts/vscode.proposed.chatOutputRenderer.d.ts +86 -0
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +142 -5
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +25 -19
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +2 -103
- package/vscode-dts/vscode.proposed.chatSessionsProvider.d.ts +129 -0
- package/vscode-dts/vscode.proposed.d.ts +7 -0
- package/vscode-dts/vscode.proposed.dataChannels.d.ts +19 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +2 -0
- package/vscode-dts/vscode.proposed.languageModelToolResultAudience.d.ts +25 -0
- package/vscode-dts/vscode.proposed.scmProviderOptions.d.ts +39 -0
- package/vscode-dts/vscode.proposed.secretStorageKeys.d.ts +16 -0
- package/vscode-dts/vscode.proposed.taskExecutionTerminal.d.ts +15 -0
- package/workbench.d.ts +1 -1
- package/workers/editor.worker.js +17 -16
- package/vscode/src/vs/base/common/policy.d.ts +0 -8
- package/vscode/src/vs/editor/common/textModelEditReason.d.ts +0 -98
- package/vscode/src/vs/platform/assignment/common/assignment.d.ts +0 -33
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
3
3
|
import { mapFindFirst } from '../../../../../base/common/arraysFind.js';
|
|
4
4
|
import { itemsEquals } from '../../../../../base/common/equals.js';
|
|
5
|
-
import { BugIndicatingError, onUnexpectedExternalError
|
|
5
|
+
import { BugIndicatingError, onUnexpectedExternalError } from '../../../../../base/common/errors.js';
|
|
6
6
|
import { Emitter } from '../../../../../base/common/event.js';
|
|
7
7
|
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
|
8
8
|
import '../../../../../base/common/observableInternal/index.js';
|
|
9
|
-
import { firstNonWhitespaceIndex
|
|
9
|
+
import { firstNonWhitespaceIndex } from '../../../../../base/common/strings.js';
|
|
10
10
|
import { isDefined } from '../../../../../base/common/types.js';
|
|
11
11
|
import { IAccessibilityService } from '../../../../../platform/accessibility/common/accessibility.service.js';
|
|
12
12
|
import { ICommandService } from '../../../../../platform/commands/common/commands.service.js';
|
|
@@ -27,7 +27,7 @@ import { EndOfLinePreference } from '../../../../common/model.js';
|
|
|
27
27
|
import { TextModelText } from '../../../../common/model/textModelText.js';
|
|
28
28
|
import { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.service.js';
|
|
29
29
|
import { SnippetController2 } from '../../../snippet/browser/snippetController2.js';
|
|
30
|
-
import { removeTextReplacementCommonSuffixPrefix, getEndPositionsAfterApplying
|
|
30
|
+
import { removeTextReplacementCommonSuffixPrefix, getEndPositionsAfterApplying } from '../utils.js';
|
|
31
31
|
import { AnimatedValue, easeOutCubic, ObservableAnimatedValue } from './animation.js';
|
|
32
32
|
import { computeGhostText } from './computeGhostText.js';
|
|
33
33
|
import { ghostTextsOrReplacementsEqual, GhostText, ghostTextOrReplacementEquals } from './ghostText.js';
|
|
@@ -35,9 +35,12 @@ import { InlineCompletionsSource } from './inlineCompletionsSource.js';
|
|
|
35
35
|
import { InlineEdit } from './inlineEdit.js';
|
|
36
36
|
import { InlineCompletionEditorType } from './provideInlineCompletions.js';
|
|
37
37
|
import { singleTextRemoveCommonPrefix, singleTextEditAugments } from './singleTextEditHelpers.js';
|
|
38
|
-
import {
|
|
38
|
+
import { EditSources } from '../../../../common/textModelEditSource.js';
|
|
39
39
|
import { ICodeEditorService } from '../../../../browser/services/codeEditorService.service.js';
|
|
40
40
|
import { IInlineCompletionsService } from '../../../../browser/services/inlineCompletionsService.service.js';
|
|
41
|
+
import { TypingInterval } from './typingSpeed.js';
|
|
42
|
+
import { StringReplacement } from '../../../../common/core/edits/stringEdit.js';
|
|
43
|
+
import { OffsetRange } from '../../../../common/core/ranges/offsetRange.js';
|
|
41
44
|
import { derived, derivedHandleChanges, derivedOpts } from '../../../../../base/common/observableInternal/observables/derived.js';
|
|
42
45
|
import { transaction, subtransaction } from '../../../../../base/common/observableInternal/transaction.js';
|
|
43
46
|
import { observableValue } from '../../../../../base/common/observableInternal/observables/observableValue.js';
|
|
@@ -49,7 +52,7 @@ import { constObservable } from '../../../../../base/common/observableInternal/o
|
|
|
49
52
|
|
|
50
53
|
let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
51
54
|
get isAcceptingPartially() { return this._isAcceptingPartially; }
|
|
52
|
-
constructor(textModel, _selectedSuggestItem, _textModelVersionId, _positions, _debounceValue, _enabled, _editor, _instantiationService, _commandService, _languageConfigurationService, _accessibilityService, _languageFeaturesService, _codeEditorService,
|
|
55
|
+
constructor(textModel, _selectedSuggestItem, _textModelVersionId, _positions, _debounceValue, _enabled, _editor, _instantiationService, _commandService, _languageConfigurationService, _accessibilityService, _languageFeaturesService, _codeEditorService, _inlineCompletionsService) {
|
|
53
56
|
super();
|
|
54
57
|
this.textModel = textModel;
|
|
55
58
|
this._selectedSuggestItem = _selectedSuggestItem;
|
|
@@ -64,30 +67,35 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
64
67
|
this._accessibilityService = _accessibilityService;
|
|
65
68
|
this._languageFeaturesService = _languageFeaturesService;
|
|
66
69
|
this._codeEditorService = _codeEditorService;
|
|
67
|
-
this.
|
|
68
|
-
this._source = this._register(this._instantiationService.createInstance(InlineCompletionsSource, this.textModel, this._textModelVersionId, this._debounceValue, this.primaryPosition));
|
|
70
|
+
this._inlineCompletionsService = _inlineCompletionsService;
|
|
69
71
|
this._isActive = observableValue(this, false);
|
|
70
72
|
this._onlyRequestInlineEditsSignal = observableSignal(this);
|
|
71
73
|
this._forceUpdateExplicitlySignal = observableSignal(this);
|
|
72
74
|
this._noDelaySignal = observableSignal(this);
|
|
73
75
|
this._fetchSpecificProviderSignal = observableSignal(this);
|
|
74
76
|
this._selectedInlineCompletionId = observableValue(this, undefined);
|
|
77
|
+
this.primaryPosition = derived(this, reader => this._positions.read(reader)[0] ?? ( new Position(1, 1)));
|
|
75
78
|
this._isAcceptingPartially = false;
|
|
79
|
+
this._appearedInsideViewport = derived(this, reader => {
|
|
80
|
+
const state = this.state.read(reader);
|
|
81
|
+
if (!state || !state.inlineCompletion) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
const targetRange = state.inlineCompletion.targetRange;
|
|
85
|
+
const visibleRanges = this._editorObs.editor.getVisibleRanges();
|
|
86
|
+
if (visibleRanges.length < 1) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
const viewportRange = ( new Range(
|
|
90
|
+
visibleRanges[0].startLineNumber,
|
|
91
|
+
visibleRanges[0].startColumn,
|
|
92
|
+
visibleRanges[visibleRanges.length - 1].endLineNumber,
|
|
93
|
+
visibleRanges[visibleRanges.length - 1].endColumn
|
|
94
|
+
));
|
|
95
|
+
return viewportRange.containsRange(targetRange);
|
|
96
|
+
});
|
|
76
97
|
this._onDidAccept = ( new Emitter());
|
|
77
98
|
this.onDidAccept = this._onDidAccept.event;
|
|
78
|
-
this._editorObs = observableCodeEditor(this._editor);
|
|
79
|
-
this._suggestPreviewEnabled = ( this._editorObs.getOption(EditorOption.suggest).map(v => v.preview));
|
|
80
|
-
this._suggestPreviewMode = ( this._editorObs.getOption(EditorOption.suggest).map(v => v.previewMode));
|
|
81
|
-
this._inlineSuggestMode = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(v => v.mode));
|
|
82
|
-
this._suppressedInlineCompletionGroupIds = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(v => ( new Set(v.experimental.suppressInlineSuggestions.split(',')))));
|
|
83
|
-
this._inlineEditsEnabled = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(v => !!v.edits.enabled));
|
|
84
|
-
this._inlineEditsShowCollapsedEnabled = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(s => s.edits.showCollapsed));
|
|
85
|
-
this._triggerCommandOnProviderChange = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(s => s.experimental.triggerCommandOnProviderChange));
|
|
86
|
-
this._register(inlineCompletionsService.onDidChangeIsSnoozing((isSnoozing) => {
|
|
87
|
-
if (isSnoozing) {
|
|
88
|
-
this.stop();
|
|
89
|
-
}
|
|
90
|
-
}));
|
|
91
99
|
this._lastShownInlineCompletionInfo = undefined;
|
|
92
100
|
this._lastAcceptedInlineCompletionInfo = undefined;
|
|
93
101
|
this._didUndoInlineEdits = derivedHandleChanges({
|
|
@@ -163,7 +171,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
163
171
|
this._forceUpdateExplicitlySignal.read(reader);
|
|
164
172
|
this._fetchSpecificProviderSignal.read(reader);
|
|
165
173
|
const shouldUpdate = ((this._enabled.read(reader) && this._selectedSuggestItem.read(reader)) || this._isActive.read(reader))
|
|
166
|
-
&& (!
|
|
174
|
+
&& (!this._inlineCompletionsService.isSnoozing() || changeSummary.inlineCompletionTriggerKind === InlineCompletionTriggerKind.Explicit);
|
|
167
175
|
if (!shouldUpdate) {
|
|
168
176
|
this._source.cancelUpdate();
|
|
169
177
|
return undefined;
|
|
@@ -193,17 +201,21 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
193
201
|
if (changeSummary.changeReason) {
|
|
194
202
|
reason += reason.length > 0 ? `:${changeSummary.changeReason}` : changeSummary.changeReason;
|
|
195
203
|
}
|
|
204
|
+
const typingInterval = this._typing.getTypingInterval();
|
|
196
205
|
const requestInfo = {
|
|
197
206
|
editorType: this.editorType,
|
|
198
207
|
startTime: Date.now(),
|
|
199
208
|
languageId: this.textModel.getLanguageId(),
|
|
200
209
|
reason,
|
|
210
|
+
typingInterval: typingInterval.averageInterval,
|
|
211
|
+
typingIntervalCharacterCount: typingInterval.characterCount,
|
|
201
212
|
};
|
|
202
213
|
let context = {
|
|
203
214
|
triggerKind: changeSummary.inlineCompletionTriggerKind,
|
|
204
215
|
selectedSuggestionInfo: suggestItem?.toSelectedSuggestionInfo(),
|
|
205
216
|
includeInlineCompletions: !changeSummary.onlyRequestInlineEdits,
|
|
206
217
|
includeInlineEdits: this._inlineEditsEnabled.read(reader),
|
|
218
|
+
requestIssuedDateTime: requestInfo.startTime,
|
|
207
219
|
};
|
|
208
220
|
if (context.triggerKind === InlineCompletionTriggerKind.Automatic && changeSummary.textChange) {
|
|
209
221
|
if (this.textModel.getAlternativeVersionId() === this._lastShownInlineCompletionInfo?.alternateTextModelVersionId) {
|
|
@@ -220,10 +232,12 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
220
232
|
const userJumpedToActiveCompletion = ( this._jumpedToId.map(
|
|
221
233
|
jumpedTo => !!jumpedTo && jumpedTo === this._inlineCompletionItems.get()?.inlineEdit?.semanticId
|
|
222
234
|
));
|
|
223
|
-
const providers = changeSummary.provider
|
|
235
|
+
const providers = changeSummary.provider
|
|
236
|
+
? { providers: [changeSummary.provider], label: 'single:' + changeSummary.provider.providerId?.toString() }
|
|
237
|
+
: { providers: this._languageFeaturesService.inlineCompletionsProvider.all(this.textModel), label: undefined };
|
|
224
238
|
const suppressedProviderGroupIds = this._suppressedInlineCompletionGroupIds.get();
|
|
225
|
-
const availableProviders = providers.filter(provider => !(provider.groupId && ( suppressedProviderGroupIds.has(provider.groupId))));
|
|
226
|
-
return this._source.fetch(availableProviders, context, itemToPreserve?.identity, changeSummary.shouldDebounce, userJumpedToActiveCompletion, !!changeSummary.provider, requestInfo);
|
|
239
|
+
const availableProviders = providers.providers.filter(provider => !(provider.groupId && ( suppressedProviderGroupIds.has(provider.groupId))));
|
|
240
|
+
return this._source.fetch(availableProviders, providers.label, context, itemToPreserve?.identity, changeSummary.shouldDebounce, userJumpedToActiveCompletion, !!changeSummary.provider, requestInfo);
|
|
227
241
|
});
|
|
228
242
|
this._inlineCompletionItems = derivedOpts({ owner: this }, reader => {
|
|
229
243
|
const c = this._source.inlineCompletions.read(reader);
|
|
@@ -272,7 +286,6 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
272
286
|
return filteredCompletions[idx];
|
|
273
287
|
});
|
|
274
288
|
this.activeCommands = derivedOpts({ owner: this, equalsFn: itemsEquals() }, r => this.selectedInlineCompletion.read(r)?.source.inlineSuggestions.commands ?? []);
|
|
275
|
-
this.lastTriggerKind = ( this._source.inlineCompletions.map(this, v => v?.request?.context.triggerKind));
|
|
276
289
|
this.inlineCompletionsCount = derived(this, reader => {
|
|
277
290
|
if (this.lastTriggerKind.read(reader) === InlineCompletionTriggerKind.Explicit) {
|
|
278
291
|
return this._filteredInlineCompletionItems.read(reader).length;
|
|
@@ -329,12 +342,14 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
329
342
|
const fullEditPreviewLength = augmentation ? augmentation.edit.text.length - suggestCompletionEdit.text.length : 0;
|
|
330
343
|
const mode = this._suggestPreviewMode.read(reader);
|
|
331
344
|
const positions = this._positions.read(reader);
|
|
332
|
-
const
|
|
333
|
-
const
|
|
345
|
+
const allPotentialEdits = [fullEdit, ...getSecondaryEdits(this.textModel, positions, fullEdit)];
|
|
346
|
+
const validEditsAndGhostTexts = ( allPotentialEdits
|
|
334
347
|
.map(
|
|
335
|
-
(edit, idx) => computeGhostText(edit, model, mode, positions[idx], fullEditPreviewLength)
|
|
348
|
+
(edit, idx) => ({ edit, ghostText: edit ? computeGhostText(edit, model, mode, positions[idx], fullEditPreviewLength) : undefined })
|
|
336
349
|
))
|
|
337
|
-
.filter(
|
|
350
|
+
.filter(({ edit, ghostText }) => edit !== undefined && ghostText !== undefined);
|
|
351
|
+
const edits = ( validEditsAndGhostTexts.map(({ edit }) => edit));
|
|
352
|
+
const ghostTexts = ( validEditsAndGhostTexts.map(({ ghostText }) => ghostText));
|
|
338
353
|
const primaryGhostText = ghostTexts[0] ?? ( new GhostText(fullEdit.range.endLineNumber, []));
|
|
339
354
|
return { kind: 'ghostText', edits, primaryGhostText, ghostTexts, inlineCompletion: augmentation?.completion, suggestItem };
|
|
340
355
|
}
|
|
@@ -349,10 +364,14 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
349
364
|
const replacement = inlineCompletion.getSingleTextEdit();
|
|
350
365
|
const mode = this._inlineSuggestMode.read(reader);
|
|
351
366
|
const positions = this._positions.read(reader);
|
|
352
|
-
const
|
|
353
|
-
const
|
|
354
|
-
.map(
|
|
355
|
-
|
|
367
|
+
const allPotentialEdits = [replacement, ...getSecondaryEdits(this.textModel, positions, replacement)];
|
|
368
|
+
const validEditsAndGhostTexts = ( allPotentialEdits
|
|
369
|
+
.map(
|
|
370
|
+
(edit, idx) => ({ edit, ghostText: edit ? computeGhostText(edit, model, mode, positions[idx], 0) : undefined })
|
|
371
|
+
))
|
|
372
|
+
.filter(({ edit, ghostText }) => edit !== undefined && ghostText !== undefined);
|
|
373
|
+
const edits = ( validEditsAndGhostTexts.map(({ edit }) => edit));
|
|
374
|
+
const ghostTexts = ( validEditsAndGhostTexts.map(({ ghostText }) => ghostText));
|
|
356
375
|
if (!ghostTexts[0]) {
|
|
357
376
|
return undefined;
|
|
358
377
|
}
|
|
@@ -410,27 +429,6 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
410
429
|
}
|
|
411
430
|
return v?.primaryGhostText;
|
|
412
431
|
});
|
|
413
|
-
this._jumpedToId = observableValue(this, undefined);
|
|
414
|
-
this._inAcceptFlow = observableValue(this, false);
|
|
415
|
-
this.inAcceptFlow = this._inAcceptFlow;
|
|
416
|
-
const appearedInsideViewport = derived(this, reader => {
|
|
417
|
-
const state = this.state.read(reader);
|
|
418
|
-
if (!state || !state.inlineCompletion) {
|
|
419
|
-
return false;
|
|
420
|
-
}
|
|
421
|
-
const targetRange = state.inlineCompletion.targetRange;
|
|
422
|
-
const visibleRanges = this._editorObs.editor.getVisibleRanges();
|
|
423
|
-
if (visibleRanges.length < 1) {
|
|
424
|
-
return false;
|
|
425
|
-
}
|
|
426
|
-
const viewportRange = ( new Range(
|
|
427
|
-
visibleRanges[0].startLineNumber,
|
|
428
|
-
visibleRanges[0].startColumn,
|
|
429
|
-
visibleRanges[visibleRanges.length - 1].endLineNumber,
|
|
430
|
-
visibleRanges[visibleRanges.length - 1].endColumn
|
|
431
|
-
));
|
|
432
|
-
return viewportRange.containsRange(targetRange);
|
|
433
|
-
});
|
|
434
432
|
this.showCollapsed = derived(this, reader => {
|
|
435
433
|
const state = this.state.read(reader);
|
|
436
434
|
if (!state || state.kind !== 'inlineEdit') {
|
|
@@ -478,7 +476,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
478
476
|
if (this.showCollapsed.read(reader)) {
|
|
479
477
|
return true;
|
|
480
478
|
}
|
|
481
|
-
if (this._inAcceptFlow.read(reader) &&
|
|
479
|
+
if (this._inAcceptFlow.read(reader) && this._appearedInsideViewport.read(reader)) {
|
|
482
480
|
return false;
|
|
483
481
|
}
|
|
484
482
|
return !s.cursorAtInlineEdit.read(reader);
|
|
@@ -491,7 +489,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
491
489
|
if (this.showCollapsed.read(reader)) {
|
|
492
490
|
return false;
|
|
493
491
|
}
|
|
494
|
-
if (this._inAcceptFlow.read(reader) &&
|
|
492
|
+
if (this._inAcceptFlow.read(reader) && this._appearedInsideViewport.read(reader)) {
|
|
495
493
|
return true;
|
|
496
494
|
}
|
|
497
495
|
if (s.inlineCompletion.targetRange.startLineNumber === this._editorObs.cursorLineNumber.read(reader)) {
|
|
@@ -505,12 +503,34 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
505
503
|
}
|
|
506
504
|
return s.cursorAtInlineEdit.read(reader);
|
|
507
505
|
});
|
|
506
|
+
this._jumpedToId = observableValue(this, undefined);
|
|
507
|
+
this._inAcceptFlow = observableValue(this, false);
|
|
508
|
+
this.inAcceptFlow = this._inAcceptFlow;
|
|
509
|
+
this._source = this._register(this._instantiationService.createInstance(InlineCompletionsSource, this.textModel, this._textModelVersionId, this._debounceValue, this.primaryPosition));
|
|
510
|
+
this.lastTriggerKind = ( this._source.inlineCompletions.map(this, v => v?.request?.context.triggerKind));
|
|
511
|
+
this._editorObs = observableCodeEditor(this._editor);
|
|
512
|
+
this._suggestPreviewEnabled = ( this._editorObs.getOption(EditorOption.suggest).map(v => v.preview));
|
|
513
|
+
this._suggestPreviewMode = ( this._editorObs.getOption(EditorOption.suggest).map(v => v.previewMode));
|
|
514
|
+
this._inlineSuggestMode = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(v => v.mode));
|
|
515
|
+
this._suppressedInlineCompletionGroupIds = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(v => ( new Set(v.experimental.suppressInlineSuggestions.split(',')))));
|
|
516
|
+
this._inlineEditsEnabled = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(v => !!v.edits.enabled));
|
|
517
|
+
this._inlineEditsShowCollapsedEnabled = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(s => s.edits.showCollapsed));
|
|
518
|
+
this._triggerCommandOnProviderChange = ( this._editorObs.getOption(EditorOption.inlineSuggest).map(s => s.experimental.triggerCommandOnProviderChange));
|
|
519
|
+
this._typing = this._register(( new TypingInterval(this.textModel)));
|
|
520
|
+
this._register(this._inlineCompletionsService.onDidChangeIsSnoozing((isSnoozing) => {
|
|
521
|
+
if (isSnoozing) {
|
|
522
|
+
this.stop();
|
|
523
|
+
}
|
|
524
|
+
}));
|
|
508
525
|
{
|
|
526
|
+
const isNotebook = this.textModel.uri.scheme === 'vscode-notebook-cell';
|
|
509
527
|
const [diffEditor] = this._codeEditorService.listDiffEditors()
|
|
510
528
|
.filter(d => d.getOriginalEditor().getId() === this._editor.getId() ||
|
|
511
529
|
d.getModifiedEditor().getId() === this._editor.getId());
|
|
512
|
-
this.
|
|
513
|
-
this.
|
|
530
|
+
this.isInDiffEditor = !!diffEditor;
|
|
531
|
+
this.editorType = isNotebook ? InlineCompletionEditorType.Notebook
|
|
532
|
+
: this.isInDiffEditor ? InlineCompletionEditorType.DiffEditor
|
|
533
|
+
: InlineCompletionEditorType.TextEditor;
|
|
514
534
|
}
|
|
515
535
|
this._register(recomputeInitiallyAndOnChange(this._fetchInlineCompletionsPromise));
|
|
516
536
|
this._register(autorun(reader => {
|
|
@@ -668,18 +688,18 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
668
688
|
async previous() { await this._deltaSelectedInlineCompletionIndex(-1); }
|
|
669
689
|
_getMetadata(completion, type = undefined) {
|
|
670
690
|
if (type) {
|
|
671
|
-
return
|
|
691
|
+
return EditSources.inlineCompletionPartialAccept({
|
|
672
692
|
nes: completion.isInlineEdit,
|
|
673
693
|
requestUuid: completion.requestUuid,
|
|
674
|
-
|
|
694
|
+
providerId: completion.source.provider.providerId,
|
|
675
695
|
type,
|
|
676
696
|
});
|
|
677
697
|
}
|
|
678
698
|
else {
|
|
679
|
-
return
|
|
699
|
+
return EditSources.inlineCompletionAccept({
|
|
680
700
|
nes: completion.isInlineEdit,
|
|
681
701
|
requestUuid: completion.requestUuid,
|
|
682
|
-
|
|
702
|
+
providerId: completion.source.provider.providerId,
|
|
683
703
|
});
|
|
684
704
|
}
|
|
685
705
|
}
|
|
@@ -817,7 +837,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
817
837
|
const replaceRange = Range.fromPositions(cursorPosition, ghostTextPos);
|
|
818
838
|
const newText = editor.getModel().getValueInRange(replaceRange) + partialGhostTextVal;
|
|
819
839
|
const primaryEdit = ( new TextReplacement(replaceRange, newText));
|
|
820
|
-
const edits = [primaryEdit, ...getSecondaryEdits(this.textModel, positions, primaryEdit)];
|
|
840
|
+
const edits = [primaryEdit, ...getSecondaryEdits(this.textModel, positions, primaryEdit)].filter(isDefined);
|
|
821
841
|
const selections = ( getEndPositionsAfterApplying(edits).map(p => Selection.fromPositions(p)));
|
|
822
842
|
editor.edit(TextEdit.fromParallelReplacementsUnsorted(edits), this._getMetadata(completion, type));
|
|
823
843
|
editor.setSelections(selections, 'inlineCompletionPartialAccept');
|
|
@@ -898,29 +918,33 @@ var VersionIdChangeReason;
|
|
|
898
918
|
VersionIdChangeReason[VersionIdChangeReason["AcceptWord"] = 2] = "AcceptWord";
|
|
899
919
|
VersionIdChangeReason[VersionIdChangeReason["Other"] = 3] = "Other";
|
|
900
920
|
})(VersionIdChangeReason || (VersionIdChangeReason = {}));
|
|
901
|
-
function getSecondaryEdits(textModel, positions,
|
|
921
|
+
function getSecondaryEdits(textModel, positions, primaryTextRepl) {
|
|
902
922
|
if (positions.length === 1) {
|
|
903
923
|
return [];
|
|
904
924
|
}
|
|
905
|
-
const
|
|
906
|
-
const
|
|
907
|
-
const
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
const
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
925
|
+
const text = ( new TextModelText(textModel));
|
|
926
|
+
const textTransformer = text.getTransformer();
|
|
927
|
+
const primaryOffset = textTransformer.getOffset(positions[0]);
|
|
928
|
+
const secondaryOffsets = ( positions.slice(1).map(pos => textTransformer.getOffset(pos)));
|
|
929
|
+
primaryTextRepl = primaryTextRepl.removeCommonPrefixAndSuffix(text);
|
|
930
|
+
const primaryStringRepl = textTransformer.getStringReplacement(primaryTextRepl);
|
|
931
|
+
const deltaFromOffsetToRangeStart = primaryStringRepl.replaceRange.start - primaryOffset;
|
|
932
|
+
const primaryContextRange = primaryStringRepl.replaceRange.join(OffsetRange.emptyAt(primaryOffset));
|
|
933
|
+
const primaryContextValue = text.getValueOfOffsetRange(primaryContextRange);
|
|
934
|
+
const replacements = ( secondaryOffsets.map(secondaryOffset => {
|
|
935
|
+
const newRangeStart = secondaryOffset + deltaFromOffsetToRangeStart;
|
|
936
|
+
const newRangeEnd = newRangeStart + primaryStringRepl.replaceRange.length;
|
|
937
|
+
const range = ( new OffsetRange(newRangeStart, newRangeEnd));
|
|
938
|
+
const contextRange = range.join(OffsetRange.emptyAt(secondaryOffset));
|
|
939
|
+
const contextValue = text.getValueOfOffsetRange(contextRange);
|
|
940
|
+
if (contextValue !== primaryContextValue) {
|
|
941
|
+
return undefined;
|
|
942
|
+
}
|
|
943
|
+
const stringRepl = ( new StringReplacement(range, primaryStringRepl.newText));
|
|
944
|
+
const repl = textTransformer.getTextReplacement(stringRepl);
|
|
945
|
+
return repl;
|
|
946
|
+
})).filter(isDefined);
|
|
947
|
+
return replacements;
|
|
924
948
|
}
|
|
925
949
|
class FadeoutDecoration extends Disposable {
|
|
926
950
|
constructor(editor, ranges, onDispose) {
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare class InlineCompletionsSource extends Disposable {
|
|
|
33
33
|
private _log;
|
|
34
34
|
private readonly _loadingCount;
|
|
35
35
|
readonly loading: IObservable<boolean>;
|
|
36
|
-
fetch(providers: InlineCompletionsProvider[], context: InlineCompletionContextWithoutUuid, activeInlineCompletion: InlineSuggestionIdentity | undefined, withDebounce: boolean, userJumpedToActiveCompletion: IObservable<boolean>, providerhasChangedCompletion: boolean, requestInfo: InlineSuggestRequestInfo): Promise<boolean>;
|
|
36
|
+
fetch(providers: InlineCompletionsProvider[], providersLabel: string | undefined, context: InlineCompletionContextWithoutUuid, activeInlineCompletion: InlineSuggestionIdentity | undefined, withDebounce: boolean, userJumpedToActiveCompletion: IObservable<boolean>, providerhasChangedCompletion: boolean, requestInfo: InlineSuggestRequestInfo): Promise<boolean>;
|
|
37
37
|
clear(tx: ITransaction): void;
|
|
38
38
|
seedInlineCompletionsWithSuggestWidget(): void;
|
|
39
39
|
clearSuggestWidgetInlineCompletions(tx: ITransaction): void;
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { compareUndefinedSmallest, numberComparator } from '../../../../../base/common/arrays.js';
|
|
3
|
+
import { compareUndefinedSmallest, numberComparator, compareBy, booleanComparator } from '../../../../../base/common/arrays.js';
|
|
4
4
|
import { findLastMax } from '../../../../../base/common/arraysFind.js';
|
|
5
5
|
import { CancellationTokenSource } from '../../../../../base/common/cancellation.js';
|
|
6
6
|
import { equalsIfDefined, itemEquals } from '../../../../../base/common/equals.js';
|
|
@@ -20,10 +20,10 @@ import { StructuredLogger, formatRecordableLogEntry } from '../structuredLogger.
|
|
|
20
20
|
import { wait } from '../utils.js';
|
|
21
21
|
import { InlineSuggestionItem } from './inlineSuggestionItem.js';
|
|
22
22
|
import { provideInlineCompletions, runWhenCancelled } from './provideInlineCompletions.js';
|
|
23
|
+
import { recordChangesLazy } from '../../../../../base/common/observableInternal/changeTracker.js';
|
|
23
24
|
import { derived } from '../../../../../base/common/observableInternal/observables/derived.js';
|
|
24
25
|
import { observableValue } from '../../../../../base/common/observableInternal/observables/observableValue.js';
|
|
25
26
|
import { transaction } from '../../../../../base/common/observableInternal/transaction.js';
|
|
26
|
-
import { recordChanges } from '../../../../../base/common/observableInternal/changeTracker.js';
|
|
27
27
|
|
|
28
28
|
var InlineCompletionsSource_1;
|
|
29
29
|
let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
|
|
@@ -40,8 +40,6 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
|
|
|
40
40
|
this._configurationService = _configurationService;
|
|
41
41
|
this._instantiationService = _instantiationService;
|
|
42
42
|
this._updateOperation = this._register(( new MutableDisposable()));
|
|
43
|
-
this._loggingEnabled = observableConfigValue('editor.inlineSuggest.logFetch', false, this._configurationService).recomputeInitiallyAndOnChange(this._store);
|
|
44
|
-
this._structuredFetchLogger = this._register(this._instantiationService.createInstance(StructuredLogger.cast(), 'editor.inlineSuggest.logFetch.commandId'));
|
|
45
43
|
this._state = observableReducerSettable(this, {
|
|
46
44
|
initial: () => ({
|
|
47
45
|
inlineCompletions: InlineCompletionsState.createEmpty(),
|
|
@@ -51,7 +49,7 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
|
|
|
51
49
|
values.inlineCompletions.dispose();
|
|
52
50
|
values.suggestWidgetInlineCompletions.dispose();
|
|
53
51
|
},
|
|
54
|
-
changeTracker:
|
|
52
|
+
changeTracker: recordChangesLazy(() => ({ versionId: this._versionId })),
|
|
55
53
|
update: (reader, previousValue, changes) => {
|
|
56
54
|
const edit = StringEdit.compose(( changes.changes.map(
|
|
57
55
|
c => c.change ? offsetEditFromContentChanges(c.change.changes) : StringEdit.empty
|
|
@@ -80,6 +78,8 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
|
|
|
80
78
|
});
|
|
81
79
|
this._loadingCount = observableValue(this, 0);
|
|
82
80
|
this.loading = ( this._loadingCount.map(this, v => v > 0));
|
|
81
|
+
this._loggingEnabled = observableConfigValue('editor.inlineSuggest.logFetch', false, this._configurationService).recomputeInitiallyAndOnChange(this._store);
|
|
82
|
+
this._structuredFetchLogger = this._register(this._instantiationService.createInstance(StructuredLogger.cast(), 'editor.inlineSuggest.logFetch.commandId'));
|
|
83
83
|
this.clearOperationOnTextModelChange.recomputeInitiallyAndOnChange(this._store);
|
|
84
84
|
}
|
|
85
85
|
_log(entry) {
|
|
@@ -88,7 +88,7 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
|
|
|
88
88
|
}
|
|
89
89
|
this._structuredFetchLogger.log(entry);
|
|
90
90
|
}
|
|
91
|
-
fetch(providers, context, activeInlineCompletion, withDebounce, userJumpedToActiveCompletion, providerhasChangedCompletion, requestInfo) {
|
|
91
|
+
fetch(providers, providersLabel, context, activeInlineCompletion, withDebounce, userJumpedToActiveCompletion, providerhasChangedCompletion, requestInfo) {
|
|
92
92
|
const position = this._cursorPosition.get();
|
|
93
93
|
const request = ( new UpdateRequest(position, context, this._textModel.getVersionId(), ( new Set(providers))));
|
|
94
94
|
const target = context.selectedSuggestionInfo ? this.suggestWidgetInlineCompletions.get() : this.inlineCompletions.get();
|
|
@@ -116,7 +116,16 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
|
|
|
116
116
|
}
|
|
117
117
|
const requestId = InlineCompletionsSource_1._requestId++;
|
|
118
118
|
if (this._loggingEnabled.get() || this._structuredFetchLogger.isEnabled.get()) {
|
|
119
|
-
this._log({
|
|
119
|
+
this._log({
|
|
120
|
+
sourceId: 'InlineCompletions.fetch',
|
|
121
|
+
kind: 'start',
|
|
122
|
+
requestId,
|
|
123
|
+
modelUri: this._textModel.uri,
|
|
124
|
+
modelVersion: this._textModel.getVersionId(),
|
|
125
|
+
context: { triggerKind: context.triggerKind, suggestInfo: context.selectedSuggestionInfo ? true : undefined },
|
|
126
|
+
time: Date.now(),
|
|
127
|
+
provider: providersLabel,
|
|
128
|
+
});
|
|
120
129
|
}
|
|
121
130
|
const startTime = ( new Date());
|
|
122
131
|
const providerResult = provideInlineCompletions(providers, this._cursorPosition.get(), this._textModel, context, requestInfo, this._languageConfigurationService);
|
|
@@ -323,13 +332,14 @@ class InlineCompletionsState extends Disposable {
|
|
|
323
332
|
const preferInlineCompletions = itemToPreserve
|
|
324
333
|
? !itemToPreserve.isInlineEdit
|
|
325
334
|
: ( updatedSuggestions.some(i => !i.isInlineEdit && i.isVisible(textModel, cursorPosition)));
|
|
326
|
-
|
|
335
|
+
let updatedItems = [];
|
|
327
336
|
for (const i of updatedSuggestions) {
|
|
328
337
|
const oldItem = this._findByHash(i.hash);
|
|
329
338
|
let item;
|
|
330
339
|
if (oldItem && oldItem !== i) {
|
|
331
340
|
item = i.withIdentity(oldItem.identity);
|
|
332
341
|
oldItem.setEndOfLifeReason({ kind: InlineCompletionEndOfLifeReasonKind.Ignored, userTypingDisagreed: false, supersededBy: i.getSourceCompletion() });
|
|
342
|
+
i.setIsPreceeded();
|
|
333
343
|
}
|
|
334
344
|
else {
|
|
335
345
|
item = i;
|
|
@@ -338,12 +348,25 @@ class InlineCompletionsState extends Disposable {
|
|
|
338
348
|
updatedItems.push(item);
|
|
339
349
|
}
|
|
340
350
|
}
|
|
351
|
+
updatedItems.sort(compareBy(i => i.showInlineEditMenu, booleanComparator));
|
|
352
|
+
updatedItems = distinctByKey(updatedItems, i => i.semanticId);
|
|
341
353
|
return ( new InlineCompletionsState(updatedItems, request));
|
|
342
354
|
}
|
|
343
355
|
clone() {
|
|
344
356
|
return ( new InlineCompletionsState(this.inlineCompletions, this.request));
|
|
345
357
|
}
|
|
346
358
|
}
|
|
359
|
+
function distinctByKey(items, key) {
|
|
360
|
+
const seen = ( new Set());
|
|
361
|
+
return items.filter(item => {
|
|
362
|
+
const k = key(item);
|
|
363
|
+
if (( seen.has(k))) {
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
seen.add(k);
|
|
367
|
+
return true;
|
|
368
|
+
});
|
|
369
|
+
}
|
|
347
370
|
function moveToFront(item, items) {
|
|
348
371
|
const index = items.indexOf(item);
|
|
349
372
|
if (index > -1) {
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare abstract class InlineSuggestionItemBase {
|
|
|
45
45
|
reportEndOfLife(reason: InlineCompletionEndOfLifeReason): void;
|
|
46
46
|
setEndOfLifeReason(reason: InlineCompletionEndOfLifeReason): void;
|
|
47
47
|
reportInlineEditError(reason: string): void;
|
|
48
|
+
setIsPreceeded(): void;
|
|
48
49
|
getSourceCompletion(): InlineCompletion;
|
|
49
50
|
}
|
|
50
51
|
export declare class InlineSuggestionIdentity {
|
|
@@ -57,15 +58,15 @@ export declare class InlineSuggestionIdentity {
|
|
|
57
58
|
removeRef(): void;
|
|
58
59
|
}
|
|
59
60
|
declare class InlineSuggestDisplayLocation implements IDisplayLocation {
|
|
60
|
-
private readonly _offsetRange;
|
|
61
61
|
readonly range: Range;
|
|
62
62
|
readonly label: string;
|
|
63
|
-
static create(displayLocation: IDisplayLocation
|
|
63
|
+
static create(displayLocation: IDisplayLocation): InlineSuggestDisplayLocation;
|
|
64
64
|
private constructor();
|
|
65
65
|
withEdit(edit: StringEdit, positionOffsetTransformer: PositionOffsetTransformerBase): InlineSuggestDisplayLocation | undefined;
|
|
66
66
|
}
|
|
67
67
|
export declare class InlineCompletionItem extends InlineSuggestionItemBase {
|
|
68
68
|
private readonly _edit;
|
|
69
|
+
private readonly _trimmedEdit;
|
|
69
70
|
private readonly _textEdit;
|
|
70
71
|
private readonly _originalRange;
|
|
71
72
|
readonly snippetInfo: SnippetInfo | undefined;
|
|
@@ -73,6 +74,7 @@ export declare class InlineCompletionItem extends InlineSuggestionItemBase {
|
|
|
73
74
|
static create(data: InlineSuggestData, textModel: ITextModel): InlineCompletionItem;
|
|
74
75
|
readonly isInlineEdit = false;
|
|
75
76
|
private constructor();
|
|
77
|
+
get hash(): string;
|
|
76
78
|
getSingleTextEdit(): TextReplacement;
|
|
77
79
|
withIdentity(identity: InlineSuggestionIdentity): InlineCompletionItem;
|
|
78
80
|
withEdit(textModelEdit: StringEdit, textModel: ITextModel): InlineCompletionItem | undefined;
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js
CHANGED
|
@@ -78,6 +78,9 @@ class InlineSuggestionItemBase {
|
|
|
78
78
|
reportInlineEditError(reason) {
|
|
79
79
|
this._data.reportInlineEditError(reason);
|
|
80
80
|
}
|
|
81
|
+
setIsPreceeded() {
|
|
82
|
+
this._data.setIsPreceeded();
|
|
83
|
+
}
|
|
81
84
|
getSourceCompletion() {
|
|
82
85
|
return this._sourceInlineCompletion;
|
|
83
86
|
}
|
|
@@ -101,25 +104,24 @@ class InlineSuggestionIdentity {
|
|
|
101
104
|
}
|
|
102
105
|
}
|
|
103
106
|
class InlineSuggestDisplayLocation {
|
|
104
|
-
static create(displayLocation
|
|
105
|
-
|
|
106
|
-
textmodel.getOffsetAt(displayLocation.range.getStartPosition()),
|
|
107
|
-
textmodel.getOffsetAt(displayLocation.range.getEndPosition())
|
|
108
|
-
));
|
|
109
|
-
return ( new InlineSuggestDisplayLocation(offsetRange, displayLocation.range, displayLocation.label));
|
|
107
|
+
static create(displayLocation) {
|
|
108
|
+
return ( new InlineSuggestDisplayLocation(displayLocation.range, displayLocation.label));
|
|
110
109
|
}
|
|
111
|
-
constructor(
|
|
112
|
-
this._offsetRange = _offsetRange;
|
|
110
|
+
constructor(range, label) {
|
|
113
111
|
this.range = range;
|
|
114
112
|
this.label = label;
|
|
115
113
|
}
|
|
116
114
|
withEdit(edit, positionOffsetTransformer) {
|
|
117
|
-
const
|
|
118
|
-
|
|
115
|
+
const offsetRange = ( new OffsetRange(
|
|
116
|
+
positionOffsetTransformer.getOffset(this.range.getStartPosition()),
|
|
117
|
+
positionOffsetTransformer.getOffset(this.range.getEndPosition())
|
|
118
|
+
));
|
|
119
|
+
const newOffsetRange = applyEditsToRanges([offsetRange], edit)[0];
|
|
120
|
+
if (!newOffsetRange) {
|
|
119
121
|
return undefined;
|
|
120
122
|
}
|
|
121
123
|
const newRange = positionOffsetTransformer.getRange(newOffsetRange);
|
|
122
|
-
return ( new InlineSuggestDisplayLocation(
|
|
124
|
+
return ( new InlineSuggestDisplayLocation(newRange, this.label));
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
class InlineCompletionItem extends InlineSuggestionItemBase {
|
|
@@ -128,10 +130,12 @@ class InlineCompletionItem extends InlineSuggestionItemBase {
|
|
|
128
130
|
const transformer = getPositionOffsetTransformerFromTextModel(textModel);
|
|
129
131
|
const insertText = data.insertText.replace(/\r\n|\r|\n/g, textModel.getEOL());
|
|
130
132
|
const edit = reshapeInlineCompletion(( new StringReplacement(transformer.getOffsetRange(data.range), insertText)), textModel);
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
+
const trimmedEdit = edit.removeCommonSuffixAndPrefix(textModel.getValue());
|
|
134
|
+
const textEdit = transformer.getTextReplacement(edit);
|
|
135
|
+
const displayLocation = data.displayLocation ? InlineSuggestDisplayLocation.create(data.displayLocation) : undefined;
|
|
133
136
|
return ( new InlineCompletionItem(
|
|
134
137
|
edit,
|
|
138
|
+
trimmedEdit,
|
|
135
139
|
textEdit,
|
|
136
140
|
textEdit.range,
|
|
137
141
|
data.snippetInfo,
|
|
@@ -141,19 +145,24 @@ class InlineCompletionItem extends InlineSuggestionItemBase {
|
|
|
141
145
|
displayLocation
|
|
142
146
|
));
|
|
143
147
|
}
|
|
144
|
-
constructor(_edit, _textEdit, _originalRange, snippetInfo, additionalTextEdits, data, identity, displayLocation) {
|
|
148
|
+
constructor(_edit, _trimmedEdit, _textEdit, _originalRange, snippetInfo, additionalTextEdits, data, identity, displayLocation) {
|
|
145
149
|
super(data, identity, displayLocation);
|
|
146
150
|
this._edit = _edit;
|
|
151
|
+
this._trimmedEdit = _trimmedEdit;
|
|
147
152
|
this._textEdit = _textEdit;
|
|
148
153
|
this._originalRange = _originalRange;
|
|
149
154
|
this.snippetInfo = snippetInfo;
|
|
150
155
|
this.additionalTextEdits = additionalTextEdits;
|
|
151
156
|
this.isInlineEdit = false;
|
|
152
157
|
}
|
|
158
|
+
get hash() {
|
|
159
|
+
return JSON.stringify(this._trimmedEdit.toJson());
|
|
160
|
+
}
|
|
153
161
|
getSingleTextEdit() { return this._textEdit; }
|
|
154
162
|
withIdentity(identity) {
|
|
155
163
|
return ( new InlineCompletionItem(
|
|
156
164
|
this._edit,
|
|
165
|
+
this._trimmedEdit,
|
|
157
166
|
this._textEdit,
|
|
158
167
|
this._originalRange,
|
|
159
168
|
this.snippetInfo,
|
|
@@ -170,7 +179,7 @@ class InlineCompletionItem extends InlineSuggestionItemBase {
|
|
|
170
179
|
}
|
|
171
180
|
const newEdit = ( new StringReplacement(newEditRange[0], this._textEdit.text));
|
|
172
181
|
const positionOffsetTransformer = getPositionOffsetTransformerFromTextModel(textModel);
|
|
173
|
-
const newTextEdit = positionOffsetTransformer.
|
|
182
|
+
const newTextEdit = positionOffsetTransformer.getTextReplacement(newEdit);
|
|
174
183
|
let newDisplayLocation = this.displayLocation;
|
|
175
184
|
if (newDisplayLocation) {
|
|
176
185
|
newDisplayLocation = newDisplayLocation.withEdit(textModelEdit, positionOffsetTransformer);
|
|
@@ -178,8 +187,10 @@ class InlineCompletionItem extends InlineSuggestionItemBase {
|
|
|
178
187
|
return undefined;
|
|
179
188
|
}
|
|
180
189
|
}
|
|
190
|
+
const trimmedEdit = newEdit.removeCommonSuffixAndPrefix(textModel.getValue());
|
|
181
191
|
return ( new InlineCompletionItem(
|
|
182
192
|
newEdit,
|
|
193
|
+
trimmedEdit,
|
|
183
194
|
newTextEdit,
|
|
184
195
|
this._originalRange,
|
|
185
196
|
this.snippetInfo,
|
|
@@ -245,7 +256,7 @@ class InlineEditItem extends InlineSuggestionItemBase {
|
|
|
245
256
|
const replacedText = textModel.getValueInRange(replacedRange);
|
|
246
257
|
return SingleUpdatedNextEdit.create(edit, replacedText);
|
|
247
258
|
}));
|
|
248
|
-
const displayLocation = data.displayLocation ? InlineSuggestDisplayLocation.create(data.displayLocation
|
|
259
|
+
const displayLocation = data.displayLocation ? InlineSuggestDisplayLocation.create(data.displayLocation) : undefined;
|
|
249
260
|
return ( new InlineEditItem(
|
|
250
261
|
offsetEdit,
|
|
251
262
|
singleTextEdit,
|