@codingame/monaco-vscode-api 19.1.4 → 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
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
+
import { Event } from '../../../base/common/event.js';
|
|
4
|
+
import { localize } from '../../../nls.js';
|
|
5
|
+
import { Registry } from '../../../platform/registry/common/platform.js';
|
|
6
|
+
import { EditorInputCapabilities, isResourceDiffEditorInput, isResourceMultiDiffEditorInput, isResourceSideBySideEditorInput, isResourceMergeEditorInput, isEditorInput, findViewStateForEditor, isResourceEditorInput, isDiffEditorInput, EditorExtensions } from '../editor.js';
|
|
7
|
+
import { EditorInput } from './editorInput.js';
|
|
8
|
+
import { IEditorService } from '../../services/editor/common/editorService.service.js';
|
|
9
|
+
|
|
10
|
+
var SideBySideEditorInput_1;
|
|
11
|
+
let SideBySideEditorInput = class SideBySideEditorInput extends EditorInput {
|
|
12
|
+
static { SideBySideEditorInput_1 = this; }
|
|
13
|
+
static { this.ID = 'workbench.editorinputs.sidebysideEditorInput'; }
|
|
14
|
+
get typeId() {
|
|
15
|
+
return SideBySideEditorInput_1.ID;
|
|
16
|
+
}
|
|
17
|
+
get capabilities() {
|
|
18
|
+
let capabilities = this.primary.capabilities;
|
|
19
|
+
capabilities &= ~EditorInputCapabilities.CanSplitInGroup;
|
|
20
|
+
if (this.secondary.hasCapability(EditorInputCapabilities.RequiresTrust)) {
|
|
21
|
+
capabilities |= EditorInputCapabilities.RequiresTrust;
|
|
22
|
+
}
|
|
23
|
+
if (this.secondary.hasCapability(EditorInputCapabilities.Singleton)) {
|
|
24
|
+
capabilities |= EditorInputCapabilities.Singleton;
|
|
25
|
+
}
|
|
26
|
+
capabilities |= EditorInputCapabilities.MultipleEditors;
|
|
27
|
+
return capabilities;
|
|
28
|
+
}
|
|
29
|
+
get resource() {
|
|
30
|
+
if (this.hasIdenticalSides) {
|
|
31
|
+
return this.primary.resource;
|
|
32
|
+
}
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
constructor(preferredName, preferredDescription, secondary, primary, editorService) {
|
|
36
|
+
super();
|
|
37
|
+
this.preferredName = preferredName;
|
|
38
|
+
this.preferredDescription = preferredDescription;
|
|
39
|
+
this.secondary = secondary;
|
|
40
|
+
this.primary = primary;
|
|
41
|
+
this.editorService = editorService;
|
|
42
|
+
this.hasIdenticalSides = this.primary.matches(this.secondary);
|
|
43
|
+
this.registerListeners();
|
|
44
|
+
}
|
|
45
|
+
registerListeners() {
|
|
46
|
+
this._register(Event.once(Event.any(this.primary.onWillDispose, this.secondary.onWillDispose))(() => {
|
|
47
|
+
if (!this.isDisposed()) {
|
|
48
|
+
this.dispose();
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
this._register(this.primary.onDidChangeDirty(() => this._onDidChangeDirty.fire()));
|
|
52
|
+
this._register(this.primary.onDidChangeCapabilities(() => this._onDidChangeCapabilities.fire()));
|
|
53
|
+
this._register(this.secondary.onDidChangeCapabilities(() => this._onDidChangeCapabilities.fire()));
|
|
54
|
+
this._register(this.primary.onDidChangeLabel(() => this._onDidChangeLabel.fire()));
|
|
55
|
+
this._register(this.secondary.onDidChangeLabel(() => this._onDidChangeLabel.fire()));
|
|
56
|
+
}
|
|
57
|
+
getName() {
|
|
58
|
+
const preferredName = this.getPreferredName();
|
|
59
|
+
if (preferredName) {
|
|
60
|
+
return preferredName;
|
|
61
|
+
}
|
|
62
|
+
if (this.hasIdenticalSides) {
|
|
63
|
+
return this.primary.getName();
|
|
64
|
+
}
|
|
65
|
+
return localize(3943, "{0} - {1}", this.secondary.getName(), this.primary.getName());
|
|
66
|
+
}
|
|
67
|
+
getPreferredName() {
|
|
68
|
+
return this.preferredName;
|
|
69
|
+
}
|
|
70
|
+
getDescription(verbosity) {
|
|
71
|
+
const preferredDescription = this.getPreferredDescription();
|
|
72
|
+
if (preferredDescription) {
|
|
73
|
+
return preferredDescription;
|
|
74
|
+
}
|
|
75
|
+
if (this.hasIdenticalSides) {
|
|
76
|
+
return this.primary.getDescription(verbosity);
|
|
77
|
+
}
|
|
78
|
+
return super.getDescription(verbosity);
|
|
79
|
+
}
|
|
80
|
+
getPreferredDescription() {
|
|
81
|
+
return this.preferredDescription;
|
|
82
|
+
}
|
|
83
|
+
getTitle(verbosity) {
|
|
84
|
+
let title;
|
|
85
|
+
if (this.hasIdenticalSides) {
|
|
86
|
+
title = this.primary.getTitle(verbosity) ?? this.getName();
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
title = super.getTitle(verbosity);
|
|
90
|
+
}
|
|
91
|
+
const preferredTitle = this.getPreferredTitle();
|
|
92
|
+
if (preferredTitle) {
|
|
93
|
+
title = `${preferredTitle} (${title})`;
|
|
94
|
+
}
|
|
95
|
+
return title;
|
|
96
|
+
}
|
|
97
|
+
getPreferredTitle() {
|
|
98
|
+
if (this.preferredName && this.preferredDescription) {
|
|
99
|
+
return `${this.preferredName} ${this.preferredDescription}`;
|
|
100
|
+
}
|
|
101
|
+
if (this.preferredName || this.preferredDescription) {
|
|
102
|
+
return this.preferredName ?? this.preferredDescription;
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
getLabelExtraClasses() {
|
|
107
|
+
if (this.hasIdenticalSides) {
|
|
108
|
+
return this.primary.getLabelExtraClasses();
|
|
109
|
+
}
|
|
110
|
+
return super.getLabelExtraClasses();
|
|
111
|
+
}
|
|
112
|
+
getAriaLabel() {
|
|
113
|
+
if (this.hasIdenticalSides) {
|
|
114
|
+
return this.primary.getAriaLabel();
|
|
115
|
+
}
|
|
116
|
+
return super.getAriaLabel();
|
|
117
|
+
}
|
|
118
|
+
getTelemetryDescriptor() {
|
|
119
|
+
const descriptor = this.primary.getTelemetryDescriptor();
|
|
120
|
+
return { ...descriptor, ...super.getTelemetryDescriptor() };
|
|
121
|
+
}
|
|
122
|
+
isDirty() {
|
|
123
|
+
return this.primary.isDirty();
|
|
124
|
+
}
|
|
125
|
+
isSaving() {
|
|
126
|
+
return this.primary.isSaving();
|
|
127
|
+
}
|
|
128
|
+
async save(group, options) {
|
|
129
|
+
const primarySaveResult = await this.primary.save(group, options);
|
|
130
|
+
return this.saveResultToEditor(primarySaveResult);
|
|
131
|
+
}
|
|
132
|
+
async saveAs(group, options) {
|
|
133
|
+
const primarySaveResult = await this.primary.saveAs(group, options);
|
|
134
|
+
return this.saveResultToEditor(primarySaveResult);
|
|
135
|
+
}
|
|
136
|
+
saveResultToEditor(primarySaveResult) {
|
|
137
|
+
if (!primarySaveResult || !this.hasIdenticalSides) {
|
|
138
|
+
return primarySaveResult;
|
|
139
|
+
}
|
|
140
|
+
if (this.primary.matches(primarySaveResult)) {
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
143
|
+
if (primarySaveResult instanceof EditorInput) {
|
|
144
|
+
return ( new SideBySideEditorInput_1(
|
|
145
|
+
this.preferredName,
|
|
146
|
+
this.preferredDescription,
|
|
147
|
+
primarySaveResult,
|
|
148
|
+
primarySaveResult,
|
|
149
|
+
this.editorService
|
|
150
|
+
));
|
|
151
|
+
}
|
|
152
|
+
if (!isResourceDiffEditorInput(primarySaveResult) && !isResourceMultiDiffEditorInput(primarySaveResult) && !isResourceSideBySideEditorInput(primarySaveResult) && !isResourceMergeEditorInput(primarySaveResult)) {
|
|
153
|
+
return {
|
|
154
|
+
primary: primarySaveResult,
|
|
155
|
+
secondary: primarySaveResult,
|
|
156
|
+
label: this.preferredName,
|
|
157
|
+
description: this.preferredDescription
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
revert(group, options) {
|
|
163
|
+
return this.primary.revert(group, options);
|
|
164
|
+
}
|
|
165
|
+
async rename(group, target) {
|
|
166
|
+
if (!this.hasIdenticalSides) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const renameResult = await this.primary.rename(group, target);
|
|
170
|
+
if (!renameResult) {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
if (isEditorInput(renameResult.editor)) {
|
|
174
|
+
return {
|
|
175
|
+
editor: ( new SideBySideEditorInput_1(
|
|
176
|
+
this.preferredName,
|
|
177
|
+
this.preferredDescription,
|
|
178
|
+
renameResult.editor,
|
|
179
|
+
renameResult.editor,
|
|
180
|
+
this.editorService
|
|
181
|
+
)),
|
|
182
|
+
options: {
|
|
183
|
+
...renameResult.options,
|
|
184
|
+
viewState: findViewStateForEditor(this, group, this.editorService)
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
if (isResourceEditorInput(renameResult.editor)) {
|
|
189
|
+
return {
|
|
190
|
+
editor: {
|
|
191
|
+
label: this.preferredName,
|
|
192
|
+
description: this.preferredDescription,
|
|
193
|
+
primary: renameResult.editor,
|
|
194
|
+
secondary: renameResult.editor,
|
|
195
|
+
options: {
|
|
196
|
+
...renameResult.options,
|
|
197
|
+
viewState: findViewStateForEditor(this, group, this.editorService)
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
return undefined;
|
|
203
|
+
}
|
|
204
|
+
isReadonly() {
|
|
205
|
+
return this.primary.isReadonly();
|
|
206
|
+
}
|
|
207
|
+
toUntyped(options) {
|
|
208
|
+
const primaryResourceEditorInput = this.primary.toUntyped(options);
|
|
209
|
+
const secondaryResourceEditorInput = this.secondary.toUntyped(options);
|
|
210
|
+
if (primaryResourceEditorInput && secondaryResourceEditorInput &&
|
|
211
|
+
!isResourceDiffEditorInput(primaryResourceEditorInput) && !isResourceDiffEditorInput(secondaryResourceEditorInput) &&
|
|
212
|
+
!isResourceMultiDiffEditorInput(primaryResourceEditorInput) && !isResourceMultiDiffEditorInput(secondaryResourceEditorInput) &&
|
|
213
|
+
!isResourceSideBySideEditorInput(primaryResourceEditorInput) && !isResourceSideBySideEditorInput(secondaryResourceEditorInput) &&
|
|
214
|
+
!isResourceMergeEditorInput(primaryResourceEditorInput) && !isResourceMergeEditorInput(secondaryResourceEditorInput)) {
|
|
215
|
+
const untypedInput = {
|
|
216
|
+
label: this.preferredName,
|
|
217
|
+
description: this.preferredDescription,
|
|
218
|
+
primary: primaryResourceEditorInput,
|
|
219
|
+
secondary: secondaryResourceEditorInput
|
|
220
|
+
};
|
|
221
|
+
if (typeof options?.preserveViewState === 'number') {
|
|
222
|
+
untypedInput.options = {
|
|
223
|
+
viewState: findViewStateForEditor(this, options.preserveViewState, this.editorService)
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
return untypedInput;
|
|
227
|
+
}
|
|
228
|
+
return undefined;
|
|
229
|
+
}
|
|
230
|
+
matches(otherInput) {
|
|
231
|
+
if (this === otherInput) {
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
234
|
+
if (isDiffEditorInput(otherInput) || isResourceDiffEditorInput(otherInput)) {
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
if (otherInput instanceof SideBySideEditorInput_1) {
|
|
238
|
+
return this.primary.matches(otherInput.primary) && this.secondary.matches(otherInput.secondary);
|
|
239
|
+
}
|
|
240
|
+
if (isResourceSideBySideEditorInput(otherInput)) {
|
|
241
|
+
return this.primary.matches(otherInput.primary) && this.secondary.matches(otherInput.secondary);
|
|
242
|
+
}
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
SideBySideEditorInput = SideBySideEditorInput_1 = ( __decorate([
|
|
247
|
+
( __param(4, IEditorService))
|
|
248
|
+
], SideBySideEditorInput));
|
|
249
|
+
class AbstractSideBySideEditorInputSerializer {
|
|
250
|
+
canSerialize(editorInput) {
|
|
251
|
+
const input = editorInput;
|
|
252
|
+
if (input.primary && input.secondary) {
|
|
253
|
+
const [secondaryInputSerializer, primaryInputSerializer] = this.getSerializers(input.secondary.typeId, input.primary.typeId);
|
|
254
|
+
return !!(secondaryInputSerializer?.canSerialize(input.secondary) && primaryInputSerializer?.canSerialize(input.primary));
|
|
255
|
+
}
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
258
|
+
serialize(editorInput) {
|
|
259
|
+
const input = editorInput;
|
|
260
|
+
if (input.primary && input.secondary) {
|
|
261
|
+
const [secondaryInputSerializer, primaryInputSerializer] = this.getSerializers(input.secondary.typeId, input.primary.typeId);
|
|
262
|
+
if (primaryInputSerializer && secondaryInputSerializer) {
|
|
263
|
+
const primarySerialized = primaryInputSerializer.serialize(input.primary);
|
|
264
|
+
const secondarySerialized = secondaryInputSerializer.serialize(input.secondary);
|
|
265
|
+
if (primarySerialized && secondarySerialized) {
|
|
266
|
+
const serializedEditorInput = {
|
|
267
|
+
name: input.getPreferredName(),
|
|
268
|
+
description: input.getPreferredDescription(),
|
|
269
|
+
primarySerialized,
|
|
270
|
+
secondarySerialized,
|
|
271
|
+
primaryTypeId: input.primary.typeId,
|
|
272
|
+
secondaryTypeId: input.secondary.typeId
|
|
273
|
+
};
|
|
274
|
+
return JSON.stringify(serializedEditorInput);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return undefined;
|
|
279
|
+
}
|
|
280
|
+
deserialize(instantiationService, serializedEditorInput) {
|
|
281
|
+
const deserialized = JSON.parse(serializedEditorInput);
|
|
282
|
+
const [secondaryInputSerializer, primaryInputSerializer] = this.getSerializers(deserialized.secondaryTypeId, deserialized.primaryTypeId);
|
|
283
|
+
if (primaryInputSerializer && secondaryInputSerializer) {
|
|
284
|
+
const primaryInput = primaryInputSerializer.deserialize(instantiationService, deserialized.primarySerialized);
|
|
285
|
+
const secondaryInput = secondaryInputSerializer.deserialize(instantiationService, deserialized.secondarySerialized);
|
|
286
|
+
if (primaryInput instanceof EditorInput && secondaryInput instanceof EditorInput) {
|
|
287
|
+
return this.createEditorInput(instantiationService, deserialized.name, deserialized.description, secondaryInput, primaryInput);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return undefined;
|
|
291
|
+
}
|
|
292
|
+
getSerializers(secondaryEditorInputTypeId, primaryEditorInputTypeId) {
|
|
293
|
+
const registry = ( Registry.as(EditorExtensions.EditorFactory));
|
|
294
|
+
return [registry.getEditorSerializer(secondaryEditorInputTypeId), registry.getEditorSerializer(primaryEditorInputTypeId)];
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
class SideBySideEditorInputSerializer extends AbstractSideBySideEditorInputSerializer {
|
|
298
|
+
createEditorInput(instantiationService, name, description, secondaryInput, primaryInput) {
|
|
299
|
+
return instantiationService.createInstance(SideBySideEditorInput, name, description, secondaryInput, primaryInput);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export { AbstractSideBySideEditorInputSerializer, SideBySideEditorInput, SideBySideEditorInputSerializer };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IDiffEditorModel } from "../../../editor/common/editorCommon.js";
|
|
2
|
+
import { BaseTextEditorModel } from "./textEditorModel.js";
|
|
3
|
+
import { DiffEditorModel } from "./diffEditorModel.js";
|
|
4
|
+
import { IMarkdownString } from "../../../base/common/htmlContent.js";
|
|
5
|
+
export declare class TextDiffEditorModel extends DiffEditorModel {
|
|
6
|
+
protected readonly _originalModel: BaseTextEditorModel | undefined;
|
|
7
|
+
get originalModel(): BaseTextEditorModel | undefined;
|
|
8
|
+
protected readonly _modifiedModel: BaseTextEditorModel | undefined;
|
|
9
|
+
get modifiedModel(): BaseTextEditorModel | undefined;
|
|
10
|
+
private _textDiffEditorModel;
|
|
11
|
+
get textDiffEditorModel(): IDiffEditorModel | undefined;
|
|
12
|
+
constructor(originalModel: BaseTextEditorModel, modifiedModel: BaseTextEditorModel);
|
|
13
|
+
resolve(): Promise<void>;
|
|
14
|
+
private updateTextDiffEditorModel;
|
|
15
|
+
isResolved(): boolean;
|
|
16
|
+
isReadonly(): boolean | IMarkdownString;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
import { DiffEditorModel } from './diffEditorModel.js';
|
|
3
|
+
|
|
4
|
+
class TextDiffEditorModel extends DiffEditorModel {
|
|
5
|
+
get originalModel() { return this._originalModel; }
|
|
6
|
+
get modifiedModel() { return this._modifiedModel; }
|
|
7
|
+
get textDiffEditorModel() { return this._textDiffEditorModel; }
|
|
8
|
+
constructor(originalModel, modifiedModel) {
|
|
9
|
+
super(originalModel, modifiedModel);
|
|
10
|
+
this._textDiffEditorModel = undefined;
|
|
11
|
+
this._originalModel = originalModel;
|
|
12
|
+
this._modifiedModel = modifiedModel;
|
|
13
|
+
this.updateTextDiffEditorModel();
|
|
14
|
+
}
|
|
15
|
+
async resolve() {
|
|
16
|
+
await super.resolve();
|
|
17
|
+
this.updateTextDiffEditorModel();
|
|
18
|
+
}
|
|
19
|
+
updateTextDiffEditorModel() {
|
|
20
|
+
if (this.originalModel?.isResolved() && this.modifiedModel?.isResolved()) {
|
|
21
|
+
if (!this._textDiffEditorModel) {
|
|
22
|
+
this._textDiffEditorModel = {
|
|
23
|
+
original: this.originalModel.textEditorModel,
|
|
24
|
+
modified: this.modifiedModel.textEditorModel
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
this._textDiffEditorModel.original = this.originalModel.textEditorModel;
|
|
29
|
+
this._textDiffEditorModel.modified = this.modifiedModel.textEditorModel;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
isResolved() {
|
|
34
|
+
return !!this._textDiffEditorModel;
|
|
35
|
+
}
|
|
36
|
+
isReadonly() {
|
|
37
|
+
return !!this.modifiedModel && this.modifiedModel.isReadonly();
|
|
38
|
+
}
|
|
39
|
+
dispose() {
|
|
40
|
+
this._textDiffEditorModel = undefined;
|
|
41
|
+
super.dispose();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { TextDiffEditorModel };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ITextModel, ITextBufferFactory, ITextSnapshot } from "../../../editor/common/model.js";
|
|
2
|
+
import { EditorModel } from "./editorModel.js";
|
|
3
|
+
import { ILanguageSupport } from "../../services/textfile/common/textfiles.js";
|
|
4
|
+
import { URI } from "../../../base/common/uri.js";
|
|
5
|
+
import { ITextEditorModel, IResolvedTextEditorModel } from "@codingame/monaco-vscode-model-service-override/vscode/vs/editor/common/services/resolverService";
|
|
6
|
+
import { ILanguageSelection } from "../../../editor/common/languages/language.js";
|
|
7
|
+
import { ILanguageService } from "../../../editor/common/languages/language.service.js";
|
|
8
|
+
import { IModelService } from "../../../editor/common/services/model.service.js";
|
|
9
|
+
import { ILanguageDetectionService } from "../../services/languageDetection/common/languageDetectionWorkerService.service.js";
|
|
10
|
+
import { IAccessibilityService } from "../../../platform/accessibility/common/accessibility.service.js";
|
|
11
|
+
import { IMarkdownString } from "../../../base/common/htmlContent.js";
|
|
12
|
+
import { TextModelEditSource } from "../../../editor/common/textModelEditSource.js";
|
|
13
|
+
export declare class BaseTextEditorModel extends EditorModel implements ITextEditorModel, ILanguageSupport {
|
|
14
|
+
protected modelService: IModelService;
|
|
15
|
+
protected languageService: ILanguageService;
|
|
16
|
+
private readonly languageDetectionService;
|
|
17
|
+
private readonly accessibilityService;
|
|
18
|
+
private static readonly AUTO_DETECT_LANGUAGE_THROTTLE_DELAY;
|
|
19
|
+
protected textEditorModelHandle: URI | undefined;
|
|
20
|
+
private createdEditorModel;
|
|
21
|
+
private readonly modelDisposeListener;
|
|
22
|
+
private readonly autoDetectLanguageThrottler;
|
|
23
|
+
constructor(modelService: IModelService, languageService: ILanguageService, languageDetectionService: ILanguageDetectionService, accessibilityService: IAccessibilityService, textEditorModelHandle?: URI);
|
|
24
|
+
private handleExistingModel;
|
|
25
|
+
private registerModelDisposeListener;
|
|
26
|
+
get textEditorModel(): ITextModel | null;
|
|
27
|
+
isReadonly(): boolean | IMarkdownString;
|
|
28
|
+
private _blockLanguageChangeListener;
|
|
29
|
+
private _languageChangeSource;
|
|
30
|
+
get languageChangeSource(): "api" | "user" | undefined;
|
|
31
|
+
get hasLanguageSetExplicitly(): boolean;
|
|
32
|
+
setLanguageId(languageId: string, source?: string): void;
|
|
33
|
+
private setLanguageIdInternal;
|
|
34
|
+
protected installModelListeners(model: ITextModel): void;
|
|
35
|
+
getLanguageId(): string | undefined;
|
|
36
|
+
protected autoDetectLanguage(): Promise<void>;
|
|
37
|
+
private doAutoDetectLanguage;
|
|
38
|
+
protected createTextEditorModel(value: ITextBufferFactory, resource: URI | undefined, preferredLanguageId?: string): ITextModel;
|
|
39
|
+
private doCreateTextEditorModel;
|
|
40
|
+
protected getFirstLineText(value: ITextBufferFactory | ITextModel): string;
|
|
41
|
+
protected getOrCreateLanguage(resource: URI | undefined, languageService: ILanguageService, preferredLanguage: string | undefined, firstLineText?: string): ILanguageSelection;
|
|
42
|
+
updateTextEditorModel(newValue?: ITextBufferFactory, preferredLanguageId?: string, reason?: TextModelEditSource): void;
|
|
43
|
+
createSnapshot(this: IResolvedTextEditorModel): ITextSnapshot;
|
|
44
|
+
createSnapshot(this: ITextEditorModel): ITextSnapshot | null;
|
|
45
|
+
isResolved(): this is IResolvedTextEditorModel;
|
|
46
|
+
dispose(): void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
+
import { ModelConstants } from '../../../editor/common/model.js';
|
|
4
|
+
import { EditorModel } from './editorModel.js';
|
|
5
|
+
import { ILanguageService } from '../../../editor/common/languages/language.service.js';
|
|
6
|
+
import { IModelService } from '../../../editor/common/services/model.service.js';
|
|
7
|
+
import { MutableDisposable } from '../../../base/common/lifecycle.js';
|
|
8
|
+
import { PLAINTEXT_LANGUAGE_ID } from '../../../editor/common/languages/modesRegistry.js';
|
|
9
|
+
import { LanguageDetectionLanguageEventSource } from '../../services/languageDetection/common/languageDetectionWorkerService.js';
|
|
10
|
+
import { ILanguageDetectionService } from '../../services/languageDetection/common/languageDetectionWorkerService.service.js';
|
|
11
|
+
import { ThrottledDelayer } from '../../../base/common/async.js';
|
|
12
|
+
import { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.service.js';
|
|
13
|
+
import { localize } from '../../../nls.js';
|
|
14
|
+
|
|
15
|
+
var BaseTextEditorModel_1;
|
|
16
|
+
let BaseTextEditorModel = class BaseTextEditorModel extends EditorModel {
|
|
17
|
+
static { BaseTextEditorModel_1 = this; }
|
|
18
|
+
static { this.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY = 600; }
|
|
19
|
+
constructor(modelService, languageService, languageDetectionService, accessibilityService, textEditorModelHandle) {
|
|
20
|
+
super();
|
|
21
|
+
this.modelService = modelService;
|
|
22
|
+
this.languageService = languageService;
|
|
23
|
+
this.languageDetectionService = languageDetectionService;
|
|
24
|
+
this.accessibilityService = accessibilityService;
|
|
25
|
+
this.textEditorModelHandle = undefined;
|
|
26
|
+
this.modelDisposeListener = this._register(( new MutableDisposable()));
|
|
27
|
+
this.autoDetectLanguageThrottler = this._register(( new ThrottledDelayer(BaseTextEditorModel_1.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY)));
|
|
28
|
+
this._blockLanguageChangeListener = false;
|
|
29
|
+
this._languageChangeSource = undefined;
|
|
30
|
+
if (textEditorModelHandle) {
|
|
31
|
+
this.handleExistingModel(textEditorModelHandle);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
handleExistingModel(textEditorModelHandle) {
|
|
35
|
+
const model = this.modelService.getModel(textEditorModelHandle);
|
|
36
|
+
if (!model) {
|
|
37
|
+
throw ( new Error(`Document with resource ${( textEditorModelHandle.toString(true))} does not exist`));
|
|
38
|
+
}
|
|
39
|
+
this.textEditorModelHandle = textEditorModelHandle;
|
|
40
|
+
this.registerModelDisposeListener(model);
|
|
41
|
+
}
|
|
42
|
+
registerModelDisposeListener(model) {
|
|
43
|
+
this.modelDisposeListener.value = model.onWillDispose(() => {
|
|
44
|
+
this.textEditorModelHandle = undefined;
|
|
45
|
+
this.dispose();
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
get textEditorModel() {
|
|
49
|
+
return this.textEditorModelHandle ? this.modelService.getModel(this.textEditorModelHandle) : null;
|
|
50
|
+
}
|
|
51
|
+
isReadonly() {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
get languageChangeSource() { return this._languageChangeSource; }
|
|
55
|
+
get hasLanguageSetExplicitly() {
|
|
56
|
+
return typeof this._languageChangeSource === 'string';
|
|
57
|
+
}
|
|
58
|
+
setLanguageId(languageId, source) {
|
|
59
|
+
this._languageChangeSource = 'user';
|
|
60
|
+
this.setLanguageIdInternal(languageId, source);
|
|
61
|
+
}
|
|
62
|
+
setLanguageIdInternal(languageId, source) {
|
|
63
|
+
if (!this.isResolved()) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (!languageId || languageId === this.textEditorModel.getLanguageId()) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this._blockLanguageChangeListener = true;
|
|
70
|
+
try {
|
|
71
|
+
this.textEditorModel.setLanguage(this.languageService.createById(languageId), source);
|
|
72
|
+
}
|
|
73
|
+
finally {
|
|
74
|
+
this._blockLanguageChangeListener = false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
installModelListeners(model) {
|
|
78
|
+
const disposable = this._register(model.onDidChangeLanguage(e => {
|
|
79
|
+
if (e.source === LanguageDetectionLanguageEventSource ||
|
|
80
|
+
this._blockLanguageChangeListener) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this._languageChangeSource = 'api';
|
|
84
|
+
disposable.dispose();
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
getLanguageId() {
|
|
88
|
+
return this.textEditorModel?.getLanguageId();
|
|
89
|
+
}
|
|
90
|
+
autoDetectLanguage() {
|
|
91
|
+
return this.autoDetectLanguageThrottler.trigger(() => this.doAutoDetectLanguage());
|
|
92
|
+
}
|
|
93
|
+
async doAutoDetectLanguage() {
|
|
94
|
+
if (this.hasLanguageSetExplicitly ||
|
|
95
|
+
!this.textEditorModelHandle ||
|
|
96
|
+
!this.languageDetectionService.isEnabledForLanguage(this.getLanguageId() ?? PLAINTEXT_LANGUAGE_ID)
|
|
97
|
+
) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const lang = await this.languageDetectionService.detectLanguage(this.textEditorModelHandle);
|
|
101
|
+
const prevLang = this.getLanguageId();
|
|
102
|
+
if (lang && lang !== prevLang && !this.isDisposed()) {
|
|
103
|
+
this.setLanguageIdInternal(lang, LanguageDetectionLanguageEventSource);
|
|
104
|
+
const languageName = this.languageService.getLanguageName(lang);
|
|
105
|
+
this.accessibilityService.alert(( localize(
|
|
106
|
+
3944,
|
|
107
|
+
"Language {0} was automatically detected and set as the language mode.",
|
|
108
|
+
languageName ?? lang
|
|
109
|
+
)));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
createTextEditorModel(value, resource, preferredLanguageId) {
|
|
113
|
+
const firstLineText = this.getFirstLineText(value);
|
|
114
|
+
const languageSelection = this.getOrCreateLanguage(resource, this.languageService, preferredLanguageId, firstLineText);
|
|
115
|
+
return this.doCreateTextEditorModel(value, languageSelection, resource);
|
|
116
|
+
}
|
|
117
|
+
doCreateTextEditorModel(value, languageSelection, resource) {
|
|
118
|
+
let model = resource && this.modelService.getModel(resource);
|
|
119
|
+
if (!model) {
|
|
120
|
+
model = this.modelService.createModel(value, languageSelection, resource);
|
|
121
|
+
this.createdEditorModel = true;
|
|
122
|
+
this.registerModelDisposeListener(model);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
this.updateTextEditorModel(value, languageSelection.languageId);
|
|
126
|
+
}
|
|
127
|
+
this.textEditorModelHandle = model.uri;
|
|
128
|
+
return model;
|
|
129
|
+
}
|
|
130
|
+
getFirstLineText(value) {
|
|
131
|
+
const textBufferFactory = value;
|
|
132
|
+
if (typeof textBufferFactory.getFirstLineText === 'function') {
|
|
133
|
+
return textBufferFactory.getFirstLineText(ModelConstants.FIRST_LINE_DETECTION_LENGTH_LIMIT);
|
|
134
|
+
}
|
|
135
|
+
const textSnapshot = value;
|
|
136
|
+
return textSnapshot.getLineContent(1).substr(0, ModelConstants.FIRST_LINE_DETECTION_LENGTH_LIMIT);
|
|
137
|
+
}
|
|
138
|
+
getOrCreateLanguage(resource, languageService, preferredLanguage, firstLineText) {
|
|
139
|
+
if (!preferredLanguage || preferredLanguage === PLAINTEXT_LANGUAGE_ID) {
|
|
140
|
+
return languageService.createByFilepathOrFirstLine(resource ?? null, firstLineText);
|
|
141
|
+
}
|
|
142
|
+
return languageService.createById(preferredLanguage);
|
|
143
|
+
}
|
|
144
|
+
updateTextEditorModel(newValue, preferredLanguageId, reason) {
|
|
145
|
+
if (!this.isResolved()) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (newValue) {
|
|
149
|
+
this.modelService.updateModel(this.textEditorModel, newValue, reason);
|
|
150
|
+
}
|
|
151
|
+
if (preferredLanguageId && preferredLanguageId !== PLAINTEXT_LANGUAGE_ID && this.textEditorModel.getLanguageId() !== preferredLanguageId) {
|
|
152
|
+
this.textEditorModel.setLanguage(this.languageService.createById(preferredLanguageId));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
createSnapshot() {
|
|
156
|
+
if (!this.textEditorModel) {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
return this.textEditorModel.createSnapshot(true );
|
|
160
|
+
}
|
|
161
|
+
isResolved() {
|
|
162
|
+
return !!this.textEditorModelHandle;
|
|
163
|
+
}
|
|
164
|
+
dispose() {
|
|
165
|
+
this.modelDisposeListener.dispose();
|
|
166
|
+
if (this.textEditorModelHandle && this.createdEditorModel) {
|
|
167
|
+
this.modelService.destroyModel(this.textEditorModelHandle);
|
|
168
|
+
}
|
|
169
|
+
this.textEditorModelHandle = undefined;
|
|
170
|
+
this.createdEditorModel = false;
|
|
171
|
+
super.dispose();
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
BaseTextEditorModel = BaseTextEditorModel_1 = ( __decorate([
|
|
175
|
+
( __param(0, IModelService)),
|
|
176
|
+
( __param(1, ILanguageService)),
|
|
177
|
+
( __param(2, ILanguageDetectionService)),
|
|
178
|
+
( __param(3, IAccessibilityService))
|
|
179
|
+
], BaseTextEditorModel));
|
|
180
|
+
|
|
181
|
+
export { BaseTextEditorModel };
|
|
@@ -20,7 +20,7 @@ import { IErrorWithActions } from "../../base/common/errorMessage.js";
|
|
|
20
20
|
import { IAction } from "../../base/common/actions.js";
|
|
21
21
|
import Severity from "../../base/common/severity.js";
|
|
22
22
|
import { IPreferencesService } from "../services/preferences/common/preferences.service.js";
|
|
23
|
-
import { IReadonlyEditorGroupModel } from "@codingame/monaco-vscode-
|
|
23
|
+
import { IReadonlyEditorGroupModel } from "@codingame/monaco-vscode-622c0cca-d5fa-59b6-b730-0715afcf93ee-common/vscode/vs/workbench/common/editor/editorGroupModel";
|
|
24
24
|
export declare const EditorExtensions: {
|
|
25
25
|
EditorPane: string;
|
|
26
26
|
EditorFactory: string;
|
|
@@ -17,8 +17,8 @@ const EditorExtensions = {
|
|
|
17
17
|
};
|
|
18
18
|
const DEFAULT_EDITOR_ASSOCIATION = {
|
|
19
19
|
id: 'default',
|
|
20
|
-
displayName: ( localize(
|
|
21
|
-
providerDisplayName: ( localize(
|
|
20
|
+
displayName: ( localize(3938, "Text Editor")),
|
|
21
|
+
providerDisplayName: ( localize(3939, "Built-in"))
|
|
22
22
|
};
|
|
23
23
|
const SIDE_BY_SIDE_EDITOR_ID = 'workbench.editor.sidebysideEditor';
|
|
24
24
|
const TEXT_DIFF_EDITOR_ID = 'workbench.editors.textDiffEditor';
|
|
@@ -166,7 +166,7 @@ function isDiffEditorInput(editor) {
|
|
|
166
166
|
function createTooLargeFileError(group, input, options, message, preferencesService) {
|
|
167
167
|
return createEditorOpenError(message, [
|
|
168
168
|
toAction({
|
|
169
|
-
id: 'workbench.action.openLargeFile', label: ( localize(
|
|
169
|
+
id: 'workbench.action.openLargeFile', label: ( localize(3940, "Open Anyway")), run: () => {
|
|
170
170
|
const fileEditorOptions = {
|
|
171
171
|
...options,
|
|
172
172
|
limits: {
|
|
@@ -177,7 +177,7 @@ function createTooLargeFileError(group, input, options, message, preferencesServ
|
|
|
177
177
|
}
|
|
178
178
|
}),
|
|
179
179
|
toAction({
|
|
180
|
-
id: 'workbench.action.configureEditorLargeFileConfirmation', label: ( localize(
|
|
180
|
+
id: 'workbench.action.configureEditorLargeFileConfirmation', label: ( localize(3941, "Configure Limit")), run: () => {
|
|
181
181
|
return preferencesService.openUserSettings({ query: 'workbench.editorLargeFileConfirmation' });
|
|
182
182
|
}
|
|
183
183
|
}),
|
|
@@ -114,8 +114,8 @@ export declare const STATUS_BAR_OFFLINE_ITEM_BACKGROUND: string;
|
|
|
114
114
|
export declare const STATUS_BAR_OFFLINE_ITEM_FOREGROUND: string;
|
|
115
115
|
export declare const STATUS_BAR_OFFLINE_ITEM_HOVER_FOREGROUND: string;
|
|
116
116
|
export declare const STATUS_BAR_OFFLINE_ITEM_HOVER_BACKGROUND: string;
|
|
117
|
-
export declare const
|
|
118
|
-
export declare const
|
|
117
|
+
export declare const EXTENSION_BADGE_BACKGROUND: string;
|
|
118
|
+
export declare const EXTENSION_BADGE_FOREGROUND: string;
|
|
119
119
|
export declare const SIDE_BAR_BACKGROUND: string;
|
|
120
120
|
export declare const SIDE_BAR_FOREGROUND: string;
|
|
121
121
|
export declare const SIDE_BAR_BORDER: string;
|