@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/provideInlineCompletions.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export type InlineSuggestRequestInfo = {
|
|
|
23
23
|
editorType: InlineCompletionEditorType;
|
|
24
24
|
languageId: string;
|
|
25
25
|
reason: string;
|
|
26
|
+
typingInterval: number;
|
|
27
|
+
typingIntervalCharacterCount: number;
|
|
26
28
|
};
|
|
27
29
|
export type InlineSuggestViewData = {
|
|
28
30
|
editorType: InlineCompletionEditorType;
|
|
@@ -50,6 +52,7 @@ export declare class InlineSuggestData {
|
|
|
50
52
|
private _viewData;
|
|
51
53
|
private _didReportEndOfLife;
|
|
52
54
|
private _lastSetEndOfLifeReason;
|
|
55
|
+
private _isPreceeded;
|
|
53
56
|
private _partiallyAcceptedCount;
|
|
54
57
|
constructor(range: Range, insertText: string, snippetInfo: SnippetInfo | undefined, displayLocation: IDisplayLocation | undefined, additionalTextEdits: readonly ISingleEditOperation[], sourceInlineCompletion: InlineCompletion, source: InlineSuggestionList, context: InlineCompletionContext, isInlineEdit: boolean, _requestInfo: InlineSuggestRequestInfo);
|
|
55
58
|
get showInlineEditMenu(): boolean;
|
|
@@ -58,6 +61,7 @@ export declare class InlineSuggestData {
|
|
|
58
61
|
reportPartialAccept(acceptedCharacters: number, info: PartialAcceptInfo): void;
|
|
59
62
|
reportEndOfLife(reason?: InlineCompletionEndOfLifeReason): void;
|
|
60
63
|
reportInlineEditError(message: string): void;
|
|
64
|
+
setIsPreceeded(): void;
|
|
61
65
|
setEndOfLifeReason(reason: InlineCompletionEndOfLifeReason): void;
|
|
62
66
|
private updateShownDuration;
|
|
63
67
|
private reportInlineEditHidden;
|
|
@@ -72,7 +76,8 @@ export interface IDisplayLocation {
|
|
|
72
76
|
}
|
|
73
77
|
export declare enum InlineCompletionEditorType {
|
|
74
78
|
TextEditor = "textEditor",
|
|
75
|
-
DiffEditor = "diffEditor"
|
|
79
|
+
DiffEditor = "diffEditor",
|
|
80
|
+
Notebook = "notebook"
|
|
76
81
|
}
|
|
77
82
|
export declare class InlineSuggestionList {
|
|
78
83
|
readonly inlineSuggestions: InlineCompletions;
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js
CHANGED
|
@@ -74,6 +74,9 @@ function provideInlineCompletions(providers, position, model, context, requestIn
|
|
|
74
74
|
runWhenCancelled(cancellationTokenSource.token, () => {
|
|
75
75
|
return list.removeRef(cancelReason);
|
|
76
76
|
});
|
|
77
|
+
if (cancellationTokenSource.token.isCancellationRequested) {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
77
80
|
for (const item of result.items) {
|
|
78
81
|
data.push(toInlineSuggestData(item, list, defaultReplaceRange, model, languageConfigurationService, contextWithUuid, requestInfo));
|
|
79
82
|
}
|
|
@@ -196,6 +199,7 @@ class InlineSuggestData {
|
|
|
196
199
|
this._showUncollapsedDuration = 0;
|
|
197
200
|
this._didReportEndOfLife = false;
|
|
198
201
|
this._lastSetEndOfLifeReason = undefined;
|
|
202
|
+
this._isPreceeded = false;
|
|
199
203
|
this._partiallyAcceptedCount = 0;
|
|
200
204
|
this._viewData = { editorType: _requestInfo.editorType };
|
|
201
205
|
}
|
|
@@ -240,12 +244,15 @@ class InlineSuggestData {
|
|
|
240
244
|
shown: this._didShow,
|
|
241
245
|
shownDuration: this._shownDuration,
|
|
242
246
|
shownDurationUncollapsed: this._showUncollapsedDuration,
|
|
247
|
+
preceeded: this._isPreceeded,
|
|
243
248
|
timeUntilShown: this._timeUntilShown,
|
|
244
249
|
editorType: this._viewData.editorType,
|
|
245
250
|
languageId: this._requestInfo.languageId,
|
|
246
251
|
requestReason: this._requestInfo.reason,
|
|
247
252
|
viewKind: this._viewData.viewKind,
|
|
248
253
|
error: this._viewData.error,
|
|
254
|
+
typingInterval: this._requestInfo.typingInterval,
|
|
255
|
+
typingIntervalCharacterCount: this._requestInfo.typingIntervalCharacterCount,
|
|
249
256
|
...this._viewData.renderData,
|
|
250
257
|
};
|
|
251
258
|
this.source.provider.handleEndOfLifetime(this.source.inlineSuggestions, this.sourceInlineCompletion, reason, summary);
|
|
@@ -259,6 +266,9 @@ class InlineSuggestData {
|
|
|
259
266
|
this._viewData.error = message;
|
|
260
267
|
}
|
|
261
268
|
}
|
|
269
|
+
setIsPreceeded() {
|
|
270
|
+
this._isPreceeded = true;
|
|
271
|
+
}
|
|
262
272
|
setEndOfLifeReason(reason) {
|
|
263
273
|
this.reportInlineEditHidden();
|
|
264
274
|
this._lastSetEndOfLifeReason = reason;
|
|
@@ -294,6 +304,7 @@ var InlineCompletionEditorType;
|
|
|
294
304
|
(function (InlineCompletionEditorType) {
|
|
295
305
|
InlineCompletionEditorType["TextEditor"] = "textEditor";
|
|
296
306
|
InlineCompletionEditorType["DiffEditor"] = "diffEditor";
|
|
307
|
+
InlineCompletionEditorType["Notebook"] = "notebook";
|
|
297
308
|
})(InlineCompletionEditorType || (InlineCompletionEditorType = {}));
|
|
298
309
|
class InlineSuggestionList {
|
|
299
310
|
constructor(inlineSuggestions, inlineSuggestionsData, provider) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Disposable } from "../../../../../base/common/lifecycle.js";
|
|
2
|
+
import { ITextModel } from "../../../../common/model.js";
|
|
3
|
+
interface TypingIntervalResult {
|
|
4
|
+
averageInterval: number;
|
|
5
|
+
characterCount: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class TypingInterval extends Disposable {
|
|
8
|
+
private readonly _textModel;
|
|
9
|
+
private readonly _typingSessions;
|
|
10
|
+
private _currentSession;
|
|
11
|
+
private _lastChangeTime;
|
|
12
|
+
private _cachedTypingIntervalResult;
|
|
13
|
+
private _cacheInvalidated;
|
|
14
|
+
private static readonly MAX_SESSION_GAP_MS;
|
|
15
|
+
private static readonly MIN_SESSION_DURATION_MS;
|
|
16
|
+
private static readonly SESSION_HISTORY_LIMIT;
|
|
17
|
+
private static readonly TYPING_SPEED_WINDOW_MS;
|
|
18
|
+
private static readonly MIN_CHARS_FOR_RELIABLE_SPEED;
|
|
19
|
+
getTypingInterval(): TypingIntervalResult;
|
|
20
|
+
constructor(_textModel: ITextModel);
|
|
21
|
+
private _updateTypingSpeed;
|
|
22
|
+
private _calculateEffectiveCharacterCount;
|
|
23
|
+
private _getActualCharacterCount;
|
|
24
|
+
private _isUserTyping;
|
|
25
|
+
private _isUserTypingReason;
|
|
26
|
+
private _finalizeCurrentSession;
|
|
27
|
+
private _calculateTypingInterval;
|
|
28
|
+
private _calculateSpeedFromSessions;
|
|
29
|
+
reset(): void;
|
|
30
|
+
dispose(): void;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
|
|
2
|
+
import { sum } from '../../../../../base/common/arrays.js';
|
|
3
|
+
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
|
4
|
+
|
|
5
|
+
class TypingInterval extends Disposable {
|
|
6
|
+
static { this.MAX_SESSION_GAP_MS = 3_000; }
|
|
7
|
+
static { this.MIN_SESSION_DURATION_MS = 1_000; }
|
|
8
|
+
static { this.SESSION_HISTORY_LIMIT = 50; }
|
|
9
|
+
static { this.TYPING_SPEED_WINDOW_MS = 300_000; }
|
|
10
|
+
static { this.MIN_CHARS_FOR_RELIABLE_SPEED = 20; }
|
|
11
|
+
getTypingInterval() {
|
|
12
|
+
if (this._cacheInvalidated || this._cachedTypingIntervalResult === null) {
|
|
13
|
+
this._cachedTypingIntervalResult = this._calculateTypingInterval();
|
|
14
|
+
this._cacheInvalidated = false;
|
|
15
|
+
}
|
|
16
|
+
return this._cachedTypingIntervalResult;
|
|
17
|
+
}
|
|
18
|
+
constructor(_textModel) {
|
|
19
|
+
super();
|
|
20
|
+
this._textModel = _textModel;
|
|
21
|
+
this._typingSessions = [];
|
|
22
|
+
this._currentSession = null;
|
|
23
|
+
this._lastChangeTime = 0;
|
|
24
|
+
this._cachedTypingIntervalResult = null;
|
|
25
|
+
this._cacheInvalidated = true;
|
|
26
|
+
this._register(this._textModel.onDidChangeContent(e => this._updateTypingSpeed(e)));
|
|
27
|
+
}
|
|
28
|
+
_updateTypingSpeed(change) {
|
|
29
|
+
const now = Date.now();
|
|
30
|
+
const characterCount = this._calculateEffectiveCharacterCount(change);
|
|
31
|
+
if (this._currentSession && (now - this._lastChangeTime) > TypingInterval.MAX_SESSION_GAP_MS) {
|
|
32
|
+
this._finalizeCurrentSession();
|
|
33
|
+
}
|
|
34
|
+
if (!this._currentSession) {
|
|
35
|
+
this._currentSession = {
|
|
36
|
+
startTime: now,
|
|
37
|
+
endTime: now,
|
|
38
|
+
characterCount: 0
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
this._currentSession.endTime = now;
|
|
42
|
+
this._currentSession.characterCount += characterCount;
|
|
43
|
+
this._lastChangeTime = now;
|
|
44
|
+
this._cacheInvalidated = true;
|
|
45
|
+
}
|
|
46
|
+
_calculateEffectiveCharacterCount(change) {
|
|
47
|
+
const actualCharCount = this._getActualCharacterCount(change);
|
|
48
|
+
if (this._isUserTyping(change)) {
|
|
49
|
+
return actualCharCount;
|
|
50
|
+
}
|
|
51
|
+
return actualCharCount > 0 ? 1 : 0;
|
|
52
|
+
}
|
|
53
|
+
_getActualCharacterCount(change) {
|
|
54
|
+
let totalChars = 0;
|
|
55
|
+
for (const c of change.changes) {
|
|
56
|
+
totalChars += Math.max(c.text.length, c.rangeLength);
|
|
57
|
+
}
|
|
58
|
+
return totalChars;
|
|
59
|
+
}
|
|
60
|
+
_isUserTyping(change) {
|
|
61
|
+
if (!change.detailedReasons || change.detailedReasons.length === 0) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
for (const reason of change.detailedReasons) {
|
|
65
|
+
if (this._isUserTypingReason(reason)) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
_isUserTypingReason(reason) {
|
|
72
|
+
if (reason.metadata.isUndoing || reason.metadata.isRedoing) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
switch (reason.metadata.source) {
|
|
76
|
+
case 'cursor': {
|
|
77
|
+
const kind = reason.metadata.kind;
|
|
78
|
+
return kind === 'type' || kind === 'compositionType' || kind === 'compositionEnd';
|
|
79
|
+
}
|
|
80
|
+
default:
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
_finalizeCurrentSession() {
|
|
85
|
+
if (!this._currentSession) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const sessionDuration = this._currentSession.endTime - this._currentSession.startTime;
|
|
89
|
+
if (sessionDuration >= TypingInterval.MIN_SESSION_DURATION_MS && this._currentSession.characterCount > 0) {
|
|
90
|
+
this._typingSessions.push(this._currentSession);
|
|
91
|
+
if (this._typingSessions.length > TypingInterval.SESSION_HISTORY_LIMIT) {
|
|
92
|
+
this._typingSessions.shift();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
this._currentSession = null;
|
|
96
|
+
}
|
|
97
|
+
_calculateTypingInterval() {
|
|
98
|
+
if (this._currentSession) {
|
|
99
|
+
const tempSession = { ...this._currentSession };
|
|
100
|
+
const sessionDuration = tempSession.endTime - tempSession.startTime;
|
|
101
|
+
if (sessionDuration >= TypingInterval.MIN_SESSION_DURATION_MS && tempSession.characterCount > 0) {
|
|
102
|
+
const allSessions = [...this._typingSessions, tempSession];
|
|
103
|
+
return this._calculateSpeedFromSessions(allSessions);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return this._calculateSpeedFromSessions(this._typingSessions);
|
|
107
|
+
}
|
|
108
|
+
_calculateSpeedFromSessions(sessions) {
|
|
109
|
+
if (sessions.length === 0) {
|
|
110
|
+
return { averageInterval: 0, characterCount: 0 };
|
|
111
|
+
}
|
|
112
|
+
const sortedSessions = [...sessions].sort((a, b) => b.endTime - a.endTime);
|
|
113
|
+
const cutoffTime = Date.now() - TypingInterval.TYPING_SPEED_WINDOW_MS;
|
|
114
|
+
const recentSessions = sortedSessions.filter(session => session.endTime > cutoffTime);
|
|
115
|
+
const olderSessions = sortedSessions.splice(recentSessions.length);
|
|
116
|
+
let totalChars = sum(( recentSessions.map(session => session.characterCount)));
|
|
117
|
+
for (let i = 0; i < olderSessions.length && totalChars < TypingInterval.MIN_CHARS_FOR_RELIABLE_SPEED; i++) {
|
|
118
|
+
recentSessions.push(olderSessions[i]);
|
|
119
|
+
totalChars += olderSessions[i].characterCount;
|
|
120
|
+
}
|
|
121
|
+
const totalTime = sum(( recentSessions.map(session => session.endTime - session.startTime)));
|
|
122
|
+
if (totalTime === 0 || totalChars <= 1) {
|
|
123
|
+
return { averageInterval: 0, characterCount: totalChars };
|
|
124
|
+
}
|
|
125
|
+
const keystrokeIntervals = Math.max(1, totalChars - 1);
|
|
126
|
+
const avgMsBetweenKeystrokes = totalTime / keystrokeIntervals;
|
|
127
|
+
return {
|
|
128
|
+
averageInterval: Math.round(avgMsBetweenKeystrokes),
|
|
129
|
+
characterCount: totalChars
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
reset() {
|
|
133
|
+
this._typingSessions.length = 0;
|
|
134
|
+
this._currentSession = null;
|
|
135
|
+
this._lastChangeTime = 0;
|
|
136
|
+
this._cachedTypingIntervalResult = null;
|
|
137
|
+
this._cacheInvalidated = true;
|
|
138
|
+
}
|
|
139
|
+
dispose() {
|
|
140
|
+
this._finalizeCurrentSession();
|
|
141
|
+
super.dispose();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export { TypingInterval };
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
import { Permutation, compareBy } from '../../../../base/common/arrays.js';
|
|
3
3
|
import '../../../../base/common/observableInternal/index.js';
|
|
4
4
|
import { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';
|
|
5
|
-
import { Position } from '../../../common/core/position.js';
|
|
6
5
|
import '../../../common/core/text/positionToOffset.js';
|
|
7
6
|
import { Range } from '../../../common/core/range.js';
|
|
8
7
|
import { TextEdit } from '../../../common/core/edits/textEdit.js';
|
|
9
8
|
import { getPositionOffsetTransformerFromTextModel } from '../../../common/core/text/getPositionOffsetTransformerFromTextModel.js';
|
|
10
|
-
import { PositionOffsetTransformer } from '../../../common/core/text/positionToOffsetImpl.js';
|
|
11
9
|
import { observableValue } from '../../../../base/common/observableInternal/observables/observableValue.js';
|
|
12
10
|
import { autorun } from '../../../../base/common/observableInternal/reactions/autorun.js';
|
|
13
11
|
import { transaction } from '../../../../base/common/observableInternal/transaction.js';
|
|
@@ -16,23 +14,6 @@ const array = [];
|
|
|
16
14
|
function getReadonlyEmptyArray() {
|
|
17
15
|
return array;
|
|
18
16
|
}
|
|
19
|
-
function addPositions(pos1, pos2) {
|
|
20
|
-
return ( new Position(
|
|
21
|
-
pos1.lineNumber + pos2.lineNumber - 1,
|
|
22
|
-
pos2.lineNumber === 1 ? pos1.column + pos2.column - 1 : pos2.column
|
|
23
|
-
));
|
|
24
|
-
}
|
|
25
|
-
function subtractPositions(pos1, pos2) {
|
|
26
|
-
return ( new Position(
|
|
27
|
-
pos1.lineNumber - pos2.lineNumber + 1,
|
|
28
|
-
pos1.lineNumber - pos2.lineNumber === 0 ? pos1.column - pos2.column + 1 : pos1.column
|
|
29
|
-
));
|
|
30
|
-
}
|
|
31
|
-
function substringPos(text, pos) {
|
|
32
|
-
const transformer = ( new PositionOffsetTransformer(text));
|
|
33
|
-
const offset = transformer.getOffset(pos);
|
|
34
|
-
return text.substring(offset);
|
|
35
|
-
}
|
|
36
17
|
function getEndPositionsAfterApplying(edits) {
|
|
37
18
|
const newRanges = getModifiedRangesAfterApplying(edits);
|
|
38
19
|
return ( newRanges.map(range => range.getEndPosition()));
|
|
@@ -48,7 +29,7 @@ function removeTextReplacementCommonSuffixPrefix(edits, textModel) {
|
|
|
48
29
|
const text = textModel.getValue();
|
|
49
30
|
const stringReplacements = ( edits.map(edit => transformer.getStringReplacement(edit)));
|
|
50
31
|
const minimalStringReplacements = ( stringReplacements.map(replacement => replacement.removeCommonSuffixPrefix(text)));
|
|
51
|
-
return ( minimalStringReplacements.map(replacement => transformer.
|
|
32
|
+
return ( minimalStringReplacements.map(replacement => transformer.getTextReplacement(replacement)));
|
|
52
33
|
}
|
|
53
34
|
function convertItemsToStableObservables(items, store) {
|
|
54
35
|
const result = observableValue('result', []);
|
|
@@ -99,4 +80,4 @@ function wait(ms, cancellationToken) {
|
|
|
99
80
|
}));
|
|
100
81
|
}
|
|
101
82
|
|
|
102
|
-
export { ObservableContextKeyService,
|
|
83
|
+
export { ObservableContextKeyService, convertItemsToStableObservables, getEndPositionsAfterApplying, getModifiedRangesAfterApplying, getReadonlyEmptyArray, removeTextReplacementCommonSuffixPrefix, wait };
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js
CHANGED
|
@@ -23,7 +23,6 @@ import { InjectedTextCursorStops, PositionAffinity } from '../../../../../common
|
|
|
23
23
|
import { LineTokens } from '../../../../../common/tokens/lineTokens.js';
|
|
24
24
|
import { LineDecoration } from '../../../../../common/viewLayout/lineDecorations.js';
|
|
25
25
|
import { renderViewLine, RenderLineInput } from '../../../../../common/viewLayout/viewLineRenderer.js';
|
|
26
|
-
import { InlineDecorationType } from '../../../../../common/viewModel.js';
|
|
27
26
|
import { GhostTextReplacement } from '../../model/ghostText.js';
|
|
28
27
|
import { RangeSingleLine } from '../../../../../common/core/ranges/rangeSingleLine.js';
|
|
29
28
|
import { ColumnRange } from '../../../../../common/core/ranges/columnRange.js';
|
|
@@ -31,6 +30,8 @@ import * as ghostTextView from './ghostTextView.css';
|
|
|
31
30
|
import { StandardMouseEvent } from '../../../../../../base/browser/mouseEvent.js';
|
|
32
31
|
import { CodeEditorWidget } from '../../../../../browser/widget/codeEditor/codeEditorWidget.js';
|
|
33
32
|
import { TokenWithTextArray } from '../../../../../common/tokens/tokenWithTextArray.js';
|
|
33
|
+
import { InlineDecorationType } from '../../../../../common/viewModel/inlineDecorations.js';
|
|
34
|
+
import { sum } from '../../../../../../base/common/arrays.js';
|
|
34
35
|
import { observableValue } from '../../../../../../base/common/observableInternal/observables/observableValue.js';
|
|
35
36
|
import { derived } from '../../../../../../base/common/observableInternal/observables/derived.js';
|
|
36
37
|
import { autorunWithStore, autorun } from '../../../../../../base/common/observableInternal/reactions/autorun.js';
|
|
@@ -113,15 +114,17 @@ let GhostTextView = class GhostTextView extends Disposable {
|
|
|
113
114
|
};
|
|
114
115
|
}));
|
|
115
116
|
const cursorColumn = this._editor.getSelection()?.getStartPosition().column;
|
|
117
|
+
const disjointInlineTexts = inlineTextsWithTokens.filter(inline => inline.text !== '');
|
|
118
|
+
const hasInsertionOnCurrentLine = disjointInlineTexts.length !== 0;
|
|
116
119
|
const renderData = {
|
|
117
|
-
cursorColumnDistance:
|
|
118
|
-
cursorLineDistance:
|
|
119
|
-
lineCountOriginal:
|
|
120
|
-
lineCountModified: additionalLines.length + (
|
|
120
|
+
cursorColumnDistance: (hasInsertionOnCurrentLine ? disjointInlineTexts[0].column : 1) - cursorColumn,
|
|
121
|
+
cursorLineDistance: hasInsertionOnCurrentLine ? 0 : (additionalLines.findIndex(line => line.content !== '') + 1),
|
|
122
|
+
lineCountOriginal: hasInsertionOnCurrentLine ? 1 : 0,
|
|
123
|
+
lineCountModified: additionalLines.length + (hasInsertionOnCurrentLine ? 1 : 0),
|
|
121
124
|
characterCountOriginal: 0,
|
|
122
|
-
characterCountModified:
|
|
123
|
-
disjointReplacements:
|
|
124
|
-
sameShapeReplacements:
|
|
125
|
+
characterCountModified: sum(( disjointInlineTexts.map(inline => inline.text.length))) + sum(( tokenizedAdditionalLines.map(line => line.content.getTextLength()))),
|
|
126
|
+
disjointReplacements: disjointInlineTexts.length + (additionalLines.length > 0 ? 1 : 0),
|
|
127
|
+
sameShapeReplacements: disjointInlineTexts.length > 1 && tokenizedAdditionalLines.length === 0 ? disjointInlineTexts.every(inline => inline.text === disjointInlineTexts[0].text) : undefined,
|
|
125
128
|
};
|
|
126
129
|
this._model.handleInlineCompletionShown.read(reader)?.(renderData);
|
|
127
130
|
return {
|
|
@@ -449,7 +452,9 @@ function renderLines(domNode, tabSize, lines, opts, isClickable) {
|
|
|
449
452
|
renderWhitespace,
|
|
450
453
|
renderControlCharacters,
|
|
451
454
|
fontLigatures !== EditorFontLigatures.OFF,
|
|
452
|
-
null
|
|
455
|
+
null,
|
|
456
|
+
null,
|
|
457
|
+
0
|
|
453
458
|
)), sb);
|
|
454
459
|
sb.appendString('</div>');
|
|
455
460
|
}
|
|
@@ -64,13 +64,13 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
64
64
|
const title = header(this._model.displayName);
|
|
65
65
|
const gotoAndAccept = option(createOptionArgs({
|
|
66
66
|
id: 'gotoAndAccept',
|
|
67
|
-
title: `${( localize(
|
|
67
|
+
title: `${( localize(1296, "Go To"))} / ${( localize(1297, "Accept"))}`,
|
|
68
68
|
icon: Codicon.check,
|
|
69
69
|
commandId: inlineSuggestCommitId
|
|
70
70
|
}));
|
|
71
71
|
const reject = option(createOptionArgs({
|
|
72
72
|
id: 'reject',
|
|
73
|
-
title: ( localize(
|
|
73
|
+
title: ( localize(1298, "Reject")),
|
|
74
74
|
icon: Codicon.close,
|
|
75
75
|
commandId: hideInlineCompletionId
|
|
76
76
|
}));
|
|
@@ -84,19 +84,19 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
84
84
|
const toggleCollapsedMode = ( this._inlineEditsShowCollapsed.map(showCollapsed => showCollapsed ?
|
|
85
85
|
option(createOptionArgs({
|
|
86
86
|
id: 'showExpanded',
|
|
87
|
-
title: ( localize(
|
|
87
|
+
title: ( localize(1299, "Show Expanded")),
|
|
88
88
|
icon: Codicon.expandAll,
|
|
89
89
|
commandId: toggleShowCollapsedId
|
|
90
90
|
}))
|
|
91
91
|
: option(createOptionArgs({
|
|
92
92
|
id: 'showCollapsed',
|
|
93
|
-
title: ( localize(
|
|
93
|
+
title: ( localize(1300, "Show Collapsed")),
|
|
94
94
|
icon: Codicon.collapseAll,
|
|
95
95
|
commandId: toggleShowCollapsedId
|
|
96
96
|
}))));
|
|
97
97
|
const settings = option(createOptionArgs({
|
|
98
98
|
id: 'settings',
|
|
99
|
-
title: ( localize(
|
|
99
|
+
title: ( localize(1301, "Settings")),
|
|
100
100
|
icon: Codicon.gear,
|
|
101
101
|
commandId: 'workbench.action.openSettings',
|
|
102
102
|
commandArgs: ['@tag:nextEditSuggestions']
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js
CHANGED
|
@@ -14,7 +14,7 @@ class InlineEditModel {
|
|
|
14
14
|
this.inlineEdit = inlineEdit;
|
|
15
15
|
this.tabAction = tabAction;
|
|
16
16
|
this.action = this.inlineEdit.inlineCompletion.action;
|
|
17
|
-
this.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? ( localize(
|
|
17
|
+
this.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? ( localize(1302, "Inline Edit"));
|
|
18
18
|
this.extensionCommands = this.inlineEdit.inlineCompletion.source.inlineSuggestions.commands ?? [];
|
|
19
19
|
this.isInDiffEditor = this._model.isInDiffEditor;
|
|
20
20
|
this.displayLocation = this.inlineEdit.inlineCompletion.displayLocation;
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js
CHANGED
|
@@ -289,15 +289,16 @@ let InlineEditsView = class InlineEditsView extends Disposable {
|
|
|
289
289
|
modified: newText.getValueOfRange(m.modifiedRange)
|
|
290
290
|
})));
|
|
291
291
|
const cursorPosition = inlineEdit.cursorPosition;
|
|
292
|
+
const startsWithEOL = stringChanges[0].modified.startsWith(textModel.getEOL());
|
|
292
293
|
const viewData = {
|
|
293
294
|
cursorColumnDistance: inlineEdit.edit.replacements[0].range.getStartPosition().column - cursorPosition.column,
|
|
294
|
-
cursorLineDistance: inlineEdit.lineEdit.lineRange.startLineNumber - cursorPosition.lineNumber,
|
|
295
|
+
cursorLineDistance: inlineEdit.lineEdit.lineRange.startLineNumber - cursorPosition.lineNumber + (startsWithEOL && inlineEdit.lineEdit.lineRange.startLineNumber >= cursorPosition.lineNumber ? 1 : 0),
|
|
295
296
|
lineCountOriginal: inlineEdit.lineEdit.lineRange.length,
|
|
296
297
|
lineCountModified: inlineEdit.lineEdit.newLines.length,
|
|
297
298
|
characterCountOriginal: stringChanges.reduce((acc, r) => acc + r.original.length, 0),
|
|
298
299
|
characterCountModified: stringChanges.reduce((acc, r) => acc + r.modified.length, 0),
|
|
299
300
|
disjointReplacements: stringChanges.length,
|
|
300
|
-
sameShapeReplacements: stringChanges.
|
|
301
|
+
sameShapeReplacements: stringChanges.every(r => r.original === stringChanges[0].original && r.modified === stringChanges[0].modified),
|
|
301
302
|
};
|
|
302
303
|
switch (view) {
|
|
303
304
|
case InlineCompletionViewKind.InsertionInline: return { kind: InlineCompletionViewKind.InsertionInline, viewData };
|
|
@@ -16,6 +16,7 @@ export declare class InlineEditsCustomView extends Disposable implements IInline
|
|
|
16
16
|
private readonly _viewRef;
|
|
17
17
|
private readonly _editorObs;
|
|
18
18
|
constructor(_editor: ICodeEditor, displayLocation: IObservable<InlineCompletionDisplayLocation | undefined>, tabAction: IObservable<InlineEditTabAction>, themeService: IThemeService, _languageService: ILanguageService);
|
|
19
|
+
private fitsInsideViewport;
|
|
19
20
|
private getState;
|
|
20
21
|
private getRendering;
|
|
21
22
|
}
|
|
@@ -26,12 +26,18 @@ import { ILanguageService } from '../../../../../../common/languages/language.se
|
|
|
26
26
|
import { TokenArray, LineTokens } from '../../../../../../common/tokens/lineTokens.js';
|
|
27
27
|
import { InlineEditTabAction } from '../inlineEditsViewInterface.js';
|
|
28
28
|
import { inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, getEditorBlendedColor } from '../theme.js';
|
|
29
|
-
import { maxContentWidthInRange, rectToProps } from '../utils/utils.js';
|
|
29
|
+
import { maxContentWidthInRange, getContentRenderWidth, rectToProps } from '../utils/utils.js';
|
|
30
30
|
import { observableValue } from '../../../../../../../base/common/observableInternal/observables/observableValue.js';
|
|
31
|
+
import { derivedObservableWithCache } from '../../../../../../../base/common/observableInternal/utils/utils.js';
|
|
31
32
|
import { constObservable } from '../../../../../../../base/common/observableInternal/observables/constObservable.js';
|
|
32
33
|
import { autorun } from '../../../../../../../base/common/observableInternal/reactions/autorun.js';
|
|
33
34
|
import { derived } from '../../../../../../../base/common/observableInternal/observables/derived.js';
|
|
34
35
|
|
|
36
|
+
const MIN_END_OF_LINE_PADDING = 14;
|
|
37
|
+
const PADDING_VERTICALLY = 0;
|
|
38
|
+
const PADDING_HORIZONTALLY = 4;
|
|
39
|
+
const HORIZONTAL_OFFSET_WHEN_ABOVE_BELOW = 4;
|
|
40
|
+
const VERTICAL_OFFSET_WHEN_ABOVE_BELOW = 2;
|
|
35
41
|
let InlineEditsCustomView = class InlineEditsCustomView extends Disposable {
|
|
36
42
|
constructor(_editor, displayLocation, tabAction, themeService, _languageService) {
|
|
37
43
|
super();
|
|
@@ -77,7 +83,17 @@ let InlineEditsCustomView = class InlineEditsCustomView extends Disposable {
|
|
|
77
83
|
domNode: overlay.element,
|
|
78
84
|
position: constObservable(null),
|
|
79
85
|
allowEditorOverflow: false,
|
|
80
|
-
minContentWidthInPx:
|
|
86
|
+
minContentWidthInPx: derivedObservableWithCache(this, (reader, prev) => {
|
|
87
|
+
const s = state.read(reader);
|
|
88
|
+
if (!s) {
|
|
89
|
+
return prev ?? 0;
|
|
90
|
+
}
|
|
91
|
+
const current = ( s.rect.map(rect => rect.right)).read(reader)
|
|
92
|
+
+ this._editorObs.layoutInfoVerticalScrollbarWidth.read(reader)
|
|
93
|
+
+ PADDING_HORIZONTALLY
|
|
94
|
+
- this._editorObs.layoutInfoContentLeft.read(reader);
|
|
95
|
+
return Math.max(prev ?? 0, current);
|
|
96
|
+
}).recomputeInitiallyAndOnChange(this._store),
|
|
81
97
|
}));
|
|
82
98
|
this._register(autorun((reader) => {
|
|
83
99
|
const v = view.read(reader);
|
|
@@ -88,6 +104,16 @@ let InlineEditsCustomView = class InlineEditsCustomView extends Disposable {
|
|
|
88
104
|
this._isHovered.set(overlay.isHovered.read(reader), undefined);
|
|
89
105
|
}));
|
|
90
106
|
}
|
|
107
|
+
fitsInsideViewport(range, displayLabel, reader) {
|
|
108
|
+
const editorWidth = this._editorObs.layoutInfoWidth.read(reader);
|
|
109
|
+
const editorContentLeft = this._editorObs.layoutInfoContentLeft.read(reader);
|
|
110
|
+
const editorVerticalScrollbar = this._editor.getLayoutInfo().verticalScrollbarWidth;
|
|
111
|
+
const minimapWidth = this._editorObs.layoutInfoMinimap.read(reader).minimapLeft !== 0 ? this._editorObs.layoutInfoMinimap.read(reader).minimapWidth : 0;
|
|
112
|
+
const maxOriginalContent = maxContentWidthInRange(this._editorObs, range, undefined);
|
|
113
|
+
const maxModifiedContent = getContentRenderWidth(displayLabel, this._editor, this._editor.getModel());
|
|
114
|
+
const padding = PADDING_HORIZONTALLY + MIN_END_OF_LINE_PADDING;
|
|
115
|
+
return maxOriginalContent + maxModifiedContent + padding < editorWidth - editorContentLeft - editorVerticalScrollbar - minimapWidth;
|
|
116
|
+
}
|
|
91
117
|
getState(displayLocation) {
|
|
92
118
|
const contentState = derived((reader) => {
|
|
93
119
|
const startLineNumber = displayLocation.range.startLineNumber;
|
|
@@ -108,28 +134,24 @@ let InlineEditsCustomView = class InlineEditsCustomView extends Disposable {
|
|
|
108
134
|
endContentLeftOffset
|
|
109
135
|
};
|
|
110
136
|
});
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
const horizontalOffsetWhenAboveBelow = 4;
|
|
115
|
-
const verticalOffsetWhenAboveBelow = 2;
|
|
137
|
+
const startLineNumber = displayLocation.range.startLineNumber;
|
|
138
|
+
const endLineNumber = displayLocation.range.endLineNumber;
|
|
139
|
+
const fitsInsideViewport = this.fitsInsideViewport(( new LineRange(startLineNumber, endLineNumber + 1)), displayLocation.label, undefined);
|
|
116
140
|
const rect = derived((reader) => {
|
|
117
141
|
const w = this._editorObs.getOption(EditorOption.fontInfo).read(reader).typicalHalfwidthCharacterWidth;
|
|
118
|
-
const startLineNumber = displayLocation.range.startLineNumber;
|
|
119
|
-
const endLineNumber = displayLocation.range.endLineNumber;
|
|
120
142
|
const { lineWidth, lineWidthBelow, lineWidthAbove, startContentLeftOffset, endContentLeftOffset } = contentState.read(reader);
|
|
121
143
|
const contentLeft = this._editorObs.layoutInfoContentLeft.read(reader);
|
|
122
|
-
const lineHeight = this._editorObs.observeLineHeightForLine(startLineNumber).read(reader);
|
|
144
|
+
const lineHeight = this._editorObs.observeLineHeightForLine(startLineNumber).recomputeInitiallyAndOnChange(reader.store).read(reader);
|
|
123
145
|
const scrollTop = this._editorObs.scrollTop.read(reader);
|
|
124
146
|
const scrollLeft = this._editorObs.scrollLeft.read(reader);
|
|
125
147
|
let position;
|
|
126
|
-
if (startLineNumber === endLineNumber && endContentLeftOffset + 5 * w >= lineWidth) {
|
|
148
|
+
if (startLineNumber === endLineNumber && endContentLeftOffset + 5 * w >= lineWidth && fitsInsideViewport) {
|
|
127
149
|
position = 'end';
|
|
128
150
|
}
|
|
129
|
-
else if (lineWidthBelow !== undefined && lineWidthBelow +
|
|
151
|
+
else if (lineWidthBelow !== undefined && lineWidthBelow + MIN_END_OF_LINE_PADDING - HORIZONTAL_OFFSET_WHEN_ABOVE_BELOW - PADDING_HORIZONTALLY < startContentLeftOffset) {
|
|
130
152
|
position = 'below';
|
|
131
153
|
}
|
|
132
|
-
else if (lineWidthAbove !== undefined && lineWidthAbove +
|
|
154
|
+
else if (lineWidthAbove !== undefined && lineWidthAbove + MIN_END_OF_LINE_PADDING - HORIZONTAL_OFFSET_WHEN_ABOVE_BELOW - PADDING_HORIZONTALLY < startContentLeftOffset) {
|
|
133
155
|
position = 'above';
|
|
134
156
|
}
|
|
135
157
|
else {
|
|
@@ -143,26 +165,26 @@ let InlineEditsCustomView = class InlineEditsCustomView extends Disposable {
|
|
|
143
165
|
case 'end': {
|
|
144
166
|
topOfLine = this._editorObs.editor.getTopForLineNumber(startLineNumber);
|
|
145
167
|
contentStartOffset = lineWidth;
|
|
146
|
-
deltaX =
|
|
168
|
+
deltaX = PADDING_HORIZONTALLY + MIN_END_OF_LINE_PADDING;
|
|
147
169
|
break;
|
|
148
170
|
}
|
|
149
171
|
case 'below': {
|
|
150
172
|
topOfLine = this._editorObs.editor.getTopForLineNumber(startLineNumber + 1);
|
|
151
173
|
contentStartOffset = startContentLeftOffset;
|
|
152
|
-
deltaX =
|
|
153
|
-
deltaY =
|
|
174
|
+
deltaX = PADDING_HORIZONTALLY + HORIZONTAL_OFFSET_WHEN_ABOVE_BELOW;
|
|
175
|
+
deltaY = PADDING_VERTICALLY + VERTICAL_OFFSET_WHEN_ABOVE_BELOW;
|
|
154
176
|
break;
|
|
155
177
|
}
|
|
156
178
|
case 'above': {
|
|
157
179
|
topOfLine = this._editorObs.editor.getTopForLineNumber(startLineNumber - 1);
|
|
158
180
|
contentStartOffset = startContentLeftOffset;
|
|
159
|
-
deltaX =
|
|
160
|
-
deltaY = -
|
|
181
|
+
deltaX = PADDING_HORIZONTALLY + HORIZONTAL_OFFSET_WHEN_ABOVE_BELOW;
|
|
182
|
+
deltaY = -PADDING_VERTICALLY + VERTICAL_OFFSET_WHEN_ABOVE_BELOW;
|
|
161
183
|
break;
|
|
162
184
|
}
|
|
163
185
|
}
|
|
164
186
|
const textRect = Rect.fromLeftTopWidthHeight(contentLeft + contentStartOffset - scrollLeft, topOfLine - scrollTop, w * displayLocation.label.length, lineHeight);
|
|
165
|
-
return textRect.withMargin(
|
|
187
|
+
return textRect.withMargin(PADDING_VERTICALLY, PADDING_HORIZONTALLY).translateX(deltaX).translateY(deltaY);
|
|
166
188
|
});
|
|
167
189
|
return {
|
|
168
190
|
rect,
|
|
@@ -181,7 +203,7 @@ let InlineEditsCustomView = class InlineEditsCustomView extends Disposable {
|
|
|
181
203
|
}
|
|
182
204
|
const result = renderLines(( new LineSource([tokens])), RenderOptions.fromEditor(this._editor).withSetWidth(false).withScrollBeyondLastColumn(0), [], line, true);
|
|
183
205
|
line.style.width = `${result.minWidthInPx}px`;
|
|
184
|
-
const rect = ( state.rect.map(r => r.withMargin(0,
|
|
206
|
+
const rect = ( state.rect.map(r => r.withMargin(0, PADDING_HORIZONTALLY)));
|
|
185
207
|
return n.div({
|
|
186
208
|
class: 'collapsedView',
|
|
187
209
|
ref: this._viewRef,
|
|
@@ -25,7 +25,7 @@ import { LineRange } from '../../../../../../common/core/ranges/lineRange.js';
|
|
|
25
25
|
import { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';
|
|
26
26
|
import { ILanguageService } from '../../../../../../common/languages/language.service.js';
|
|
27
27
|
import { TokenArray, LineTokens } from '../../../../../../common/tokens/lineTokens.js';
|
|
28
|
-
import { InlineDecoration, InlineDecorationType } from '../../../../../../common/viewModel.js';
|
|
28
|
+
import { InlineDecoration, InlineDecorationType } from '../../../../../../common/viewModel/inlineDecorations.js';
|
|
29
29
|
import { GhostText, GhostTextPart } from '../../../model/ghostText.js';
|
|
30
30
|
import { GhostTextView } from '../../ghostText/ghostTextView.js';
|
|
31
31
|
import { modifiedBackgroundColor, getModifiedBorderColor } from '../theme.js';
|
|
@@ -26,7 +26,7 @@ import { Range } from '../../../../../../common/core/range.js';
|
|
|
26
26
|
import { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';
|
|
27
27
|
import { ILanguageService } from '../../../../../../common/languages/language.service.js';
|
|
28
28
|
import { TokenArray, LineTokens } from '../../../../../../common/tokens/lineTokens.js';
|
|
29
|
-
import { InlineDecoration, InlineDecorationType } from '../../../../../../common/viewModel.js';
|
|
29
|
+
import { InlineDecoration, InlineDecorationType } from '../../../../../../common/viewModel/inlineDecorations.js';
|
|
30
30
|
import { getModifiedBorderColor, getOriginalBorderColor, originalBackgroundColor, getEditorBlendedColor, modifiedChangedLineBackgroundColor } from '../theme.js';
|
|
31
31
|
import { getPrefixTrim, mapOutFalsy, rectToProps, getEditorValidOverlayRect } from '../utils/utils.js';
|
|
32
32
|
import { autorunDelta } from '../../../../../../../base/common/observableInternal/reactions/autorun.js';
|