@codingame/monaco-vscode-api 3.2.3 → 4.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/api.js +4 -7
- package/debugProtocol.d.ts +14 -39
- package/extensions.d.ts +7 -1
- package/missing-services.js +116 -32
- package/monaco.d.ts +1 -1
- package/monaco.js +11 -1
- package/override/vs/platform/dialogs/common/dialogs.js +1 -0
- package/package.json +8 -8
- package/service-override/tools/editor.js +82 -3
- package/service-override/tools/views.d.ts +2 -1
- package/service-override/tools/views.js +5 -1
- package/services.js +4 -3
- package/vscode/src/vs/base/browser/dom.js +1 -7
- package/vscode/src/vs/base/browser/fonts.js +3 -0
- package/vscode/src/vs/base/browser/keyboardEvent.js +1 -1
- package/vscode/src/vs/base/browser/markdownRenderer.js +4 -4
- package/vscode/src/vs/base/browser/touch.js +13 -2
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +5 -6
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +2 -2
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.js +4 -2
- package/vscode/src/vs/base/browser/ui/button/button.js +16 -9
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/contextview/contextview.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -1
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +4 -4
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +3 -3
- package/vscode/src/vs/base/browser/ui/findinput/findInput.js +5 -0
- package/vscode/src/vs/base/browser/ui/findinput/findInputToggles.js +4 -0
- package/vscode/src/vs/base/browser/ui/findinput/replaceInput.js +3 -1
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +1 -0
- package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +14 -3
- package/vscode/src/vs/base/browser/ui/{iconLabel/iconHoverDelegate.d.ts → hover/hoverDelegate.d.ts} +3 -6
- package/vscode/src/vs/base/browser/ui/hover/{hoverDelegate.js → hoverDelegateFactory.js} +5 -5
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +1 -1
- package/vscode/src/vs/base/browser/ui/{iconLabel/iconLabelHover.d.ts → hover/updatableHoverWidget.d.ts} +6 -1
- package/vscode/src/vs/base/browser/ui/{iconLabel/iconLabelHover.js → hover/updatableHoverWidget.js} +27 -7
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +10 -9
- package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +11 -1
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +19 -1
- package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +8 -7
- package/vscode/src/vs/base/browser/ui/list/listView.js +4 -1
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +27 -10
- package/vscode/src/vs/base/browser/ui/menu/menu.js +15 -9
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +15 -8
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +18 -2
- package/vscode/src/vs/base/browser/ui/selectBox/selectBox.js +1 -0
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +14 -7
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +6 -4
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +7 -6
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +2 -2
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +55 -10
- package/vscode/src/vs/base/browser/ui/tree/indexTreeModel.js +4 -1
- package/vscode/src/vs/base/browser/window.d.ts +5 -0
- package/vscode/src/vs/base/browser/window.js +1 -2
- package/vscode/src/vs/base/common/arrays.js +20 -1
- package/vscode/src/vs/base/common/cache.js +3 -2
- package/vscode/src/vs/base/common/codicons.d.ts +62 -38
- package/vscode/src/vs/base/common/codicons.js +19 -571
- package/vscode/src/vs/base/common/codiconsLibrary.js +570 -0
- package/vscode/src/vs/base/common/codiconsUtil.js +17 -0
- package/vscode/src/vs/base/common/event.js +4 -1
- package/vscode/src/vs/base/common/glob.js +1 -0
- package/vscode/src/vs/base/common/hierarchicalKind.d.ts +13 -0
- package/vscode/src/vs/base/common/hierarchicalKind.js +21 -0
- package/vscode/src/vs/base/common/labels.js +2 -2
- package/vscode/src/vs/base/common/network.js +14 -5
- package/vscode/src/vs/base/common/observableInternal/promise.js +1 -0
- package/vscode/src/vs/base/common/observableInternal/utils.js +35 -14
- package/vscode/src/vs/base/common/platform.js +1 -1
- package/vscode/src/vs/base/common/product.d.ts +7 -1
- package/vscode/src/vs/base/common/severity.js +2 -1
- package/vscode/src/vs/base/common/strings.js +16 -4
- package/vscode/src/vs/base/parts/ipc/common/ipc.js +4 -0
- package/vscode/src/vs/editor/browser/controller/mouseHandler.js +5 -5
- package/vscode/src/vs/editor/browser/controller/mouseTarget.js +55 -43
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +5 -5
- package/vscode/src/vs/editor/browser/coreCommands.js +13 -13
- package/vscode/src/vs/editor/browser/editorDom.js +11 -1
- package/vscode/src/vs/editor/browser/editorExtensions.js +1 -1
- package/vscode/src/vs/editor/browser/services/editorWorkerService.js +10 -2
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.d.ts +31 -0
- package/vscode/src/vs/editor/browser/services/{hoverService.js → hoverService/hoverService.js} +38 -27
- package/vscode/src/vs/editor/browser/{widget/hoverWidget → services/hoverService}/hoverWidget.js +13 -14
- package/vscode/src/vs/editor/browser/view/viewLayer.js +4 -4
- package/vscode/src/vs/editor/browser/view/viewOverlays.js +12 -23
- package/vscode/src/vs/editor/browser/view.js +5 -5
- package/vscode/src/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +3 -3
- package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +4 -6
- package/vscode/src/vs/editor/browser/viewParts/decorations/decorations.css.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/decorations/decorations.js +8 -14
- package/vscode/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/indentGuides/indentGuides.js +3 -6
- package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +5 -1
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLine.js +4 -4
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.css.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.js +5 -5
- package/vscode/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/margin/margin.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +142 -27
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +34 -16
- package/vscode/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
- package/vscode/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/selections/selections.js +23 -20
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.js +25 -3
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursors.js +21 -13
- package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/whitespace/whitespace.js +2 -2
- package/vscode/src/vs/editor/browser/widget/{codeEditorContributions.js → codeEditor/codeEditorContributions.js} +3 -3
- package/vscode/src/vs/editor/browser/widget/{codeEditorWidget.js → codeEditor/codeEditorWidget.js} +81 -70
- package/vscode/src/vs/editor/browser/widget/codeEditor/editor.css.js +4 -0
- package/vscode/src/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget.js +44 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +281 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +7 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +4 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +15 -9
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorSash.js +2 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +9 -8
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +33 -246
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +22 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +5 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +71 -41
- package/vscode/src/vs/editor/browser/widget/diffEditor/embeddedDiffEditorWidget.js +36 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +227 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +22 -19
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +5 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +15 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +13 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +11 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/style.css.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +104 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +8 -15
- package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/colors.js +14 -4
- package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/diffEditorItemTemplate.js +6 -5
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/model.js +14 -0
- package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/multiDiffEditorViewModel.js +5 -2
- package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/multiDiffEditorWidget.js +5 -3
- package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/multiDiffEditorWidgetImpl.js +9 -10
- package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/style.css.js +1 -1
- package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/utils.js +2 -1
- package/vscode/src/vs/editor/common/commands/trimTrailingWhitespaceCommand.js +14 -3
- package/vscode/src/vs/editor/common/config/diffEditor.js +1 -0
- package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +10 -1
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +23 -0
- package/vscode/src/vs/editor/common/config/editorOptions.js +115 -33
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +32 -2
- package/vscode/src/vs/editor/common/core/lineRange.d.ts +1 -0
- package/vscode/src/vs/editor/common/core/lineRange.js +12 -0
- package/vscode/src/vs/editor/common/core/positionToOffset.js +43 -0
- package/vscode/src/vs/editor/common/core/textEdit.js +169 -0
- package/vscode/src/vs/editor/common/core/textLength.js +110 -0
- package/vscode/src/vs/editor/common/core/wordCharacterClassifier.d.ts +14 -2
- package/vscode/src/vs/editor/common/core/wordCharacterClassifier.js +66 -10
- package/vscode/src/vs/editor/common/core/wordHelper.js +1 -0
- package/vscode/src/vs/editor/common/cursor/cursor.js +17 -4
- package/vscode/src/vs/editor/common/cursor/cursorTypeOperations.js +1 -1
- package/vscode/src/vs/editor/common/cursor/cursorWordOperations.js +22 -3
- package/vscode/src/vs/editor/common/cursorCommon.js +7 -5
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +7 -4
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js +1 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +2 -0
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +10 -0
- package/vscode/src/vs/editor/common/editorContextKeys.js +25 -0
- package/vscode/src/vs/editor/common/languages.d.ts +43 -11
- package/vscode/src/vs/editor/common/languages.js +15 -1
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js +1 -1
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +3 -58
- package/vscode/src/vs/editor/common/model/textModel.js +2 -0
- package/vscode/src/vs/editor/common/model/textModelSearch.js +1 -1
- package/vscode/src/vs/editor/common/model/textModelText.js +17 -0
- package/vscode/src/vs/editor/common/model/textModelTokens.js +4 -0
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +10 -0
- package/vscode/src/vs/editor/common/model.d.ts +17 -2
- package/vscode/src/vs/editor/common/model.js +1 -6
- package/vscode/src/vs/editor/common/services/editorSimpleWorker.js +8 -0
- package/vscode/src/vs/editor/common/services/editorWorker.d.ts +2 -0
- package/vscode/src/vs/editor/common/services/findSectionHeaders.d.ts +28 -0
- package/vscode/src/vs/editor/common/services/findSectionHeaders.js +71 -0
- package/vscode/src/vs/editor/common/services/markerDecorationsService.js +15 -5
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +32 -20
- package/vscode/src/vs/editor/common/viewLayout/linesLayout.js +2 -1
- package/vscode/src/vs/editor/common/viewLayout/viewLayout.js +5 -5
- package/vscode/src/vs/editor/common/viewLayout/viewLinesViewportData.js +1 -0
- package/vscode/src/vs/editor/common/viewModel/modelLineProjection.js +1 -1
- package/vscode/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +2 -2
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +10 -7
- package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +11 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +6 -5
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +5 -4
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +25 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver.js +3 -2
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +3 -2
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +13 -2
- package/vscode/src/vs/editor/contrib/codeAction/common/types.js +18 -33
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorDetector.js +3 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +11 -1
- package/vscode/src/vs/editor/contrib/comment/browser/comment.js +1 -1
- package/vscode/src/vs/editor/contrib/comment/browser/lineCommentCommand.js +9 -9
- package/vscode/src/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +5 -3
- package/vscode/src/vs/editor/contrib/documentSymbols/browser/outlineModel.js +1 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +40 -20
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +83 -47
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +40 -31
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +16 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +8 -8
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/edit.js +5 -3
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +7 -6
- package/vscode/src/vs/editor/contrib/find/browser/findDecorations.js +14 -4
- package/vscode/src/vs/editor/contrib/find/browser/findModel.js +6 -6
- package/vscode/src/vs/editor/contrib/find/browser/findOptionsWidget.js +16 -1
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +23 -3
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +12 -3
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +11 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +5 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/hover.js +12 -2
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +3 -91
- package/vscode/src/vs/editor/contrib/indentation/common/indentation.js +92 -0
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +14 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/commands.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostText.js +18 -19
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +5 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +4 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js +4 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +6 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +5 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +28 -19
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +7 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/singleTextEdit.js +64 -72
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +11 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +5 -85
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/commands.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +6 -4
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +4 -1
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +28 -17
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +5 -4
- package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +53 -6
- package/vscode/src/vs/editor/contrib/linesOperations/browser/moveLinesCommand.js +1 -1
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +11 -1
- package/vscode/src/vs/editor/contrib/links/browser/links.js +2 -2
- package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +7 -7
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +11 -1
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +12 -2
- package/vscode/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +27 -33
- package/vscode/src/vs/editor/contrib/rename/browser/{renameInputField.js → renameWidget.js} +282 -194
- package/vscode/src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +154 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +60 -61
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +23 -14
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +12 -2
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +11 -1
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +1 -1
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +16 -6
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +2 -2
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +12 -12
- package/vscode/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.js +2 -2
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +1 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +2 -2
- package/vscode/src/vs/editor/standalone/browser/standaloneLayoutService.js +1 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +12 -12
- package/vscode/src/vs/editor/standalone/browser/standaloneThemeService.js +11 -1
- package/vscode/src/vs/editor/standalone/common/themes.js +11 -1
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.d.ts +16 -9
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +42 -18
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +16 -5
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +11 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +13 -5
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +3 -1
- package/vscode/src/vs/platform/actions/browser/floatingMenu.js +11 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +11 -1
- package/vscode/src/vs/platform/actions/common/actions.d.ts +7 -0
- package/vscode/src/vs/platform/actions/common/actions.js +7 -0
- package/vscode/src/vs/platform/contextview/browser/contextView.d.ts +1 -0
- package/vscode/src/vs/platform/contextview/browser/contextViewService.js +12 -15
- package/vscode/src/vs/platform/dialogs/common/dialogs.js +4 -2
- package/vscode/src/vs/platform/editor/common/editor.d.ts +12 -0
- package/vscode/src/vs/platform/environment/common/environmentService.js +6 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +19 -7
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +7 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionsProfileScannerService.js +333 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +901 -0
- package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +3 -4
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +16 -16
- package/vscode/src/vs/platform/extensions/common/extensions.js +5 -1
- package/vscode/src/vs/platform/files/common/files.d.ts +1 -11
- package/vscode/src/vs/platform/files/common/files.js +2 -0
- package/vscode/src/vs/platform/files/common/watcher.js +2 -0
- package/vscode/src/vs/platform/hover/browser/hover.d.ts +1 -1
- package/vscode/src/vs/platform/hover/browser/hover.js +21 -6
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardLayout.js +1 -0
- package/vscode/src/vs/platform/languagePacks/common/languagePacks.js +5 -0
- package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +8 -6
- package/vscode/src/vs/platform/log/browser/log.js +1 -0
- package/vscode/src/vs/platform/log/common/log.js +13 -1
- package/vscode/src/vs/platform/markers/common/markerService.js +1 -1
- package/vscode/src/vs/platform/markers/common/markers.js +9 -9
- package/vscode/src/vs/platform/opener/browser/link.js +16 -4
- package/vscode/src/vs/platform/policy/common/policy.js +2 -0
- package/vscode/src/vs/platform/product/common/product.js +2 -1
- package/vscode/src/vs/platform/quickinput/browser/media/quickInput.css.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +36 -33
- package/vscode/src/vs/platform/quickinput/browser/quickAccess.js +5 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +38 -9
- package/vscode/src/vs/platform/quickinput/browser/quickInputBox.js +7 -4
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +22 -12
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +13 -5
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +1348 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +14 -0
- package/vscode/src/vs/platform/remote/common/remoteAgentConnection.js +2 -2
- package/vscode/src/vs/platform/remote/common/remoteHosts.js +1 -4
- package/vscode/src/vs/platform/secrets/common/secrets.js +5 -0
- package/vscode/src/vs/platform/severityIcon/browser/severityIcon.js +5 -5
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +2 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +1 -1
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +3 -9
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +6 -1
- package/vscode/src/vs/platform/terminal/common/terminal.js +1 -0
- package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +4 -1
- package/vscode/src/vs/platform/theme/browser/defaultStyles.js +11 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.js +187 -0
- package/vscode/src/vs/platform/theme/common/colors/baseColors.js +89 -0
- package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +46 -0
- package/vscode/src/vs/platform/theme/common/colors/editorColors.js +469 -0
- package/vscode/src/vs/platform/theme/common/colors/inputColors.js +196 -0
- package/vscode/src/vs/platform/theme/common/colors/listColors.js +166 -0
- package/vscode/src/vs/platform/theme/common/colors/menuColors.js +41 -0
- package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +61 -0
- package/vscode/src/vs/platform/theme/common/colors/miscColors.js +45 -0
- package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +51 -0
- package/vscode/src/vs/platform/theme/common/colors/searchColors.js +19 -0
- package/vscode/src/vs/platform/theme/common/iconRegistry.js +2 -1
- package/vscode/src/vs/platform/theme/common/themeService.d.ts +1 -1
- package/vscode/src/vs/platform/tunnel/common/tunnel.js +2 -0
- package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +2 -2
- package/vscode/src/vs/platform/update/common/update.js +1 -1
- package/vscode/src/vs/platform/uriIdentity/common/uriIdentityService.js +1 -0
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileIpc.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +69 -32
- package/vscode/src/vs/workbench/api/common/extHost.common.services.js +6 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +3 -1
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +12 -5
- package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -8
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +58 -88
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +8 -4
- package/vscode/src/vs/workbench/api/common/extHostComments.js +49 -13
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +16 -17
- package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +3 -1
- package/vscode/src/vs/workbench/api/common/extHostExtensionActivator.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +17 -4
- package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +57 -40
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +305 -0
- package/vscode/src/vs/workbench/api/common/extHostLanguages.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocument.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +26 -6
- package/vscode/src/vs/workbench/api/common/extHostQuickOpen.js +9 -9
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostSearch.js +34 -3
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTask.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +32 -18
- package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.js +214 -0
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +85 -98
- package/vscode/src/vs/workbench/api/common/extHostTimeline.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +5 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +119 -70
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +90 -28
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +4 -4
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +2 -2
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +3 -3
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +3 -3
- package/vscode/src/vs/workbench/browser/codeeditor.js +1 -1
- package/vscode/src/vs/workbench/browser/composite.d.ts +3 -5
- package/vscode/src/vs/workbench/browser/composite.js +2 -10
- package/vscode/src/vs/workbench/browser/editor.js +2 -2
- package/vscode/src/vs/workbench/browser/labels.js +2 -1
- package/vscode/src/vs/workbench/browser/media/part.css.js +1 -1
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/part.d.ts +25 -3
- package/vscode/src/vs/workbench/browser/part.js +84 -9
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -10
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +92 -14
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +5 -4
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +13 -3
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +13 -5
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +12 -0
- package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +8 -7
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +16 -8
- package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +217 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +14 -16
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +8 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +4 -202
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +11 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +92 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +15 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editorPane.d.ts +7 -8
- package/vscode/src/vs/workbench/browser/parts/editor/editorPane.js +7 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +12 -32
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +11 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +27 -28
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +19 -20
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +12 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorWithViewState.js +14 -17
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +11 -1
- package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +12 -12
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +16 -16
- package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +17 -17
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +36 -13
- package/vscode/src/vs/workbench/browser/parts/editor/textResourceEditor.js +22 -22
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +29 -21
- package/vscode/src/vs/workbench/browser/parts/media/compositepart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +13 -2
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +11 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +16 -16
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +1 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +122 -33
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +14 -3
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +15 -2
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +37 -0
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +36 -18
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +7 -4
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +6 -4
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +2 -3
- package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +13 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +6 -0
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +28 -11
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +19 -15
- package/vscode/src/vs/workbench/browser/quickaccess.js +42 -15
- package/vscode/src/vs/workbench/browser/style.js +52 -3
- package/vscode/src/vs/workbench/browser/web.api.d.ts +6 -0
- package/vscode/src/vs/workbench/browser/window.js +28 -20
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +83 -9
- package/vscode/src/vs/workbench/common/component.js +0 -1
- package/vscode/src/vs/workbench/common/contextkeys.js +4 -4
- package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +59 -5
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +10 -0
- package/vscode/src/vs/workbench/common/editor/editorInput.js +3 -0
- package/vscode/src/vs/workbench/common/editor/filteredEditorGroupModel.js +1 -0
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.d.ts +3 -1
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.js +7 -3
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +3 -3
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
- package/vscode/src/vs/workbench/common/editor.d.ts +33 -13
- package/vscode/src/vs/workbench/common/editor.js +6 -7
- package/vscode/src/vs/workbench/common/theme.js +45 -5
- package/vscode/src/vs/workbench/common/views.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +59 -184
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +1 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +140 -13
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +1 -1
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalDebuggerContribution.js +4 -2
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalLineFeatureContribution.js +35 -36
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +1 -1
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +21 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +70 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +118 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +154 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +186 -224
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +6 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +158 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +84 -175
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +38 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/annotations.js +105 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +137 -43
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +44 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +17 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +82 -34
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +17 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +20 -22
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +68 -9
- package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/common/{chatProvider.js → languageModels.js} +9 -9
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +5 -4
- package/vscode/src/vs/workbench/contrib/codeActions/browser/documentationContribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +33 -7
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +11 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +9 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +13 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/{browser → common}/languageConfigurationExtensionPoint.js +79 -74
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +11 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +11 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +25 -18
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +14 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentService.js +80 -52
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +12 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +33 -13
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +129 -57
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +15 -15
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +145 -20
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +61 -95
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +4 -3
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +18 -11
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +6 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +62 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +6 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +34 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +48 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +216 -23
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +11 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +6 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +23 -5
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +24 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +30 -6
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +106 -37
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +8 -11
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +5 -3
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +23 -24
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +17 -12
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +3 -3
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.save.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/files.configuration.contribution.js +10 -0
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +11 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +11 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +1 -3
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +15 -6
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +4 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +674 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +154 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -344
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatFileCreationWidget.js +223 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +8 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +427 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +45 -160
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +358 -702
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +165 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +16 -27
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +19 -4
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +9 -9
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/logs/common/defaultLogLevels.js +17 -2
- package/vscode/src/vs/workbench/contrib/logs/common/logsActions.js +236 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +9 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +8 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +8 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +2 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +4 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +11 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +5 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +5 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +6 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +5 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +7 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +6 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +23 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +4 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +5 -3
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +9 -0
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +303 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +655 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnostics.js +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +56 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +11 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +11 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +888 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +88 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +60 -46
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +42 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +18 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +28 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +11 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +48 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +13 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +57 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +11 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +161 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +21 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +5 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +14 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +14 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +25 -64
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +27 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +8 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +7 -14
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +4 -4
- package/vscode/src/vs/workbench/contrib/outline/browser/outline.js +10 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +16 -4
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +17 -4
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +11 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +26 -8
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +16 -6
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +11 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +18 -8
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +235 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +182 -69
- package/vscode/src/vs/workbench/contrib/search/common/constants.js +2 -0
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +203 -1
- package/vscode/src/vs/workbench/contrib/tags/browser/workspaceTagsService.js +3 -0
- package/vscode/src/vs/workbench/contrib/tags/common/workspaceTags.js +2 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +58 -8
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +3 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +12 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +11 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +53 -57
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +11 -26
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +6 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +12 -12
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +8 -0
- package/vscode/src/vs/workbench/contrib/timeline/common/timeline.js +2 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +1 -1
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +30 -7
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +12 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -41
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +4 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +20 -22
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +4 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +3 -3
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +2 -0
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +6 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationAccessService.js +69 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +69 -811
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationUsageService.js +50 -0
- package/vscode/src/vs/workbench/services/authentication/common/authentication.js +2 -1
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +50 -25
- package/vscode/src/vs/workbench/services/banner/browser/bannerService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/editor/browser/codeEditorService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +21 -17
- package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.d.ts +12 -0
- package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +144 -0
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +10 -6
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.d.ts +3 -3
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.d.ts +16 -4
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js +12 -1
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +46 -121
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +5 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +6 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +9 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +4 -4
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.d.ts +2 -1
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +8 -1
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +44 -36
- package/vscode/src/vs/workbench/services/history/common/history.d.ts +0 -5
- package/vscode/src/vs/workbench/services/language/common/languageService.js +4 -3
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +2 -1
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +2 -1
- package/vscode/src/vs/workbench/services/lifecycle/common/lifecycleService.js +8 -6
- package/vscode/src/vs/workbench/services/output/common/output.js +4 -1
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +2 -2
- package/vscode/src/vs/workbench/services/search/common/search.js +1 -0
- package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +15 -5
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +6 -1
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +1 -1
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +1 -1
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +11 -1
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +5 -3
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +1 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +7 -7
- package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +261 -0
- package/vscode-dts/vscode.proposed.authLearnMore.d.ts +16 -0
- package/vscode-dts/vscode.proposed.chatParticipant.d.ts +49 -78
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +13 -16
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +1 -1
- package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +32 -0
- package/vscode-dts/vscode.proposed.commentingRangeHint.d.ts +16 -0
- package/vscode-dts/vscode.proposed.contribCommentsViewThreadMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribDiffEditorGutterToolBarMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.debugFocus.d.ts +15 -23
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +10 -0
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +115 -30
- package/vscode-dts/vscode.proposed.dropMetadata.d.ts +19 -14
- package/vscode-dts/vscode.proposed.fileComments.d.ts +2 -4
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +18 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +0 -16
- package/vscode-dts/vscode.proposed.languageModels.d.ts +115 -53
- package/vscode-dts/vscode.proposed.notebookCellExecution.d.ts +44 -0
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +3 -0
- package/vscode-dts/vscode.proposed.tabInputMultiDiff.d.ts +22 -0
- package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +2 -0
- package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +207 -0
- package/vscode/src/vs/editor/browser/services/hoverService.d.ts +0 -30
- package/vscode/src/vs/editor/browser/widget/embeddedCodeEditorWidget.js +0 -74
- package/vscode/src/vs/editor/browser/widget/media/editor.css.js +0 -4
- package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +0 -881
- package/vscode/src/vs/platform/theme/common/colorRegistry.js +0 -1316
- package/vscode/src/vs/workbench/api/common/extHostChatProvider.js +0 -253
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +0 -74
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +0 -424
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +0 -222
- /package/vscode/src/vs/base/browser/ui/hover/{hover.css.js → hoverWidget.css.js} +0 -0
- /package/vscode/src/vs/editor/browser/{widget/hoverWidget → services/hoverService}/hover.css.js +0 -0
- /package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/objectPool.js +0 -0
- /package/vscode/src/vs/editor/contrib/indentation/{browser → common}/indentUtils.js +0 -0
- /package/vscode/src/vs/editor/contrib/rename/browser/{renameInputField.css.js → renameWidget.css.js} +0 -0
- /package/vscode/src/vs/platform/theme/common/{colorRegistry.d.ts → colorUtils.d.ts} +0 -0
|
@@ -1,163 +1,76 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { h,
|
|
3
|
-
import { renderFormattedText } from '../../../../base/browser/formattedTextRenderer.js';
|
|
4
|
-
import { status } from '../../../../base/browser/ui/aria/aria.js';
|
|
2
|
+
import { h, trackFocus, getTotalHeight, reset, getActiveElement, Dimension } from '../../../../base/browser/dom.js';
|
|
5
3
|
import { renderLabelWithIcons } from '../../../../base/browser/ui/iconLabel/iconLabels.js';
|
|
6
4
|
import { ProgressBar } from '../../../../base/browser/ui/progressbar/progressbar.js';
|
|
7
|
-
import {
|
|
5
|
+
import { Emitter, Event } from '../../../../base/common/event.js';
|
|
8
6
|
import { MarkdownString } from '../../../../base/common/htmlContent.js';
|
|
9
7
|
import { Lazy } from '../../../../base/common/lazy.js';
|
|
10
|
-
import { DisposableStore, MutableDisposable
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import '
|
|
14
|
-
import {
|
|
8
|
+
import { DisposableStore, MutableDisposable } from '../../../../base/common/lifecycle.js';
|
|
9
|
+
import { observableValue } from '../../../../base/common/observableInternal/base.js';
|
|
10
|
+
import { derived } from '../../../../base/common/observableInternal/derived.js';
|
|
11
|
+
import '../../../../base/common/observableInternal/autorun.js';
|
|
12
|
+
import { constObservable } from '../../../../base/common/observableInternal/utils.js';
|
|
13
|
+
import '../../../../base/common/cancellation.js';
|
|
14
|
+
import './media/inlineChat.css.js';
|
|
15
15
|
import { AccessibleDiffViewer } from '../../../../editor/browser/widget/diffEditor/components/accessibleDiffViewer.js';
|
|
16
|
-
import {
|
|
16
|
+
import { EmbeddedDiffEditorWidget } from '../../../../editor/browser/widget/diffEditor/embeddedDiffEditorWidget.js';
|
|
17
17
|
import { LineRange } from '../../../../editor/common/core/lineRange.js';
|
|
18
|
-
import { Range } from '../../../../editor/common/core/range.js';
|
|
19
18
|
import { DetailedLineRangeMapping, RangeMapping } from '../../../../editor/common/diff/rangeMapping.js';
|
|
20
|
-
import { ILanguageFeaturesService } from '../../../../editor/common/services/languageFeatures.js';
|
|
21
|
-
import { IModelService } from '../../../../editor/common/services/model.js';
|
|
22
19
|
import { ITextModelService } from '../../../../editor/common/services/resolverService.js';
|
|
23
|
-
import { SnippetController2 } from '../../../../editor/contrib/snippet/browser/snippetController2.js';
|
|
24
|
-
import { SuggestController } from '../../../../editor/contrib/suggest/browser/suggestController.js';
|
|
25
|
-
import { ZoneWidget } from '../../../../editor/contrib/zoneWidget/browser/zoneWidget.js';
|
|
26
20
|
import { localizeWithPath } from '../../../../nls.js';
|
|
27
21
|
import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';
|
|
28
22
|
import { MenuWorkbenchButtonBar } from '../../../../platform/actions/browser/buttonbar.js';
|
|
29
23
|
import { MenuWorkbenchToolBar } from '../../../../platform/actions/browser/toolbar.js';
|
|
24
|
+
import { MenuId } from '../../../../platform/actions/common/actions.js';
|
|
30
25
|
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
|
|
31
26
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
|
|
32
|
-
import { FileKind } from '../../../../platform/files/common/files.js';
|
|
33
27
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
34
28
|
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
|
|
35
|
-
import {
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import {
|
|
29
|
+
import { asCssVariableName, asCssVariable } from '../../../../platform/theme/common/colorUtils.js';
|
|
30
|
+
import '../../../../platform/theme/common/colors/baseColors.js';
|
|
31
|
+
import '../../../../platform/theme/common/colors/chartsColors.js';
|
|
32
|
+
import { editorForeground, editorBackground } from '../../../../platform/theme/common/colors/editorColors.js';
|
|
33
|
+
import { inputBackground } from '../../../../platform/theme/common/colors/inputColors.js';
|
|
34
|
+
import '../../../../platform/theme/common/colors/listColors.js';
|
|
35
|
+
import '../../../../platform/theme/common/colors/menuColors.js';
|
|
36
|
+
import '../../../../platform/theme/common/colors/minimapColors.js';
|
|
37
|
+
import '../../../../platform/theme/common/colors/miscColors.js';
|
|
38
|
+
import '../../../../platform/theme/common/colors/quickpickColors.js';
|
|
39
|
+
import '../../../../platform/theme/common/colors/searchColors.js';
|
|
39
40
|
import { IAccessibleViewService } from '../../accessibility/browser/accessibleView.js';
|
|
40
41
|
import { ChatFollowups } from '../../chat/browser/chatFollowups.js';
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { SlashCommandContentWidget } from '../../chat/browser/chatSlashCommandContentWidget.js';
|
|
44
|
-
import { IChatAgentService } from '../../chat/common/chatAgents.js';
|
|
45
|
-
import { ChatModel, ChatResponseModel } from '../../chat/common/chatModel.js';
|
|
46
|
-
import { ChatResponseViewModel } from '../../chat/common/chatViewModel.js';
|
|
47
|
-
import { ExpansionState } from './inlineChatSession.js';
|
|
42
|
+
import { ChatModel } from '../../chat/common/chatModel.js';
|
|
43
|
+
import { isWelcomeVM, isRequestVM, isResponseVM } from '../../chat/common/chatViewModel.js';
|
|
48
44
|
import { invertLineRange, asRange } from './utils.js';
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
lineNumbers: 'off',
|
|
64
|
-
folding: false,
|
|
65
|
-
hideCursorInOverviewRuler: true,
|
|
66
|
-
selectOnLineNumbers: false,
|
|
67
|
-
selectionHighlight: false,
|
|
68
|
-
scrollbar: {
|
|
69
|
-
useShadows: false,
|
|
70
|
-
vertical: 'hidden',
|
|
71
|
-
horizontal: 'auto',
|
|
72
|
-
alwaysConsumeMouseWheel: false
|
|
73
|
-
},
|
|
74
|
-
lineDecorationsWidth: 0,
|
|
75
|
-
overviewRulerBorder: false,
|
|
76
|
-
scrollBeyondLastLine: false,
|
|
77
|
-
renderLineHighlight: 'none',
|
|
78
|
-
fixedOverflowWidgets: true,
|
|
79
|
-
dragAndDrop: false,
|
|
80
|
-
revealHorizontalRightPadding: 5,
|
|
81
|
-
minimap: { enabled: false },
|
|
82
|
-
guides: { indentation: false },
|
|
83
|
-
rulers: [],
|
|
84
|
-
cursorWidth: 1,
|
|
85
|
-
cursorStyle: 'line',
|
|
86
|
-
cursorBlinking: 'blink',
|
|
87
|
-
wrappingStrategy: 'advanced',
|
|
88
|
-
wrappingIndent: 'none',
|
|
89
|
-
renderWhitespace: 'none',
|
|
90
|
-
dropIntoEditor: { enabled: true },
|
|
91
|
-
quickSuggestions: false,
|
|
92
|
-
suggest: {
|
|
93
|
-
showIcons: false,
|
|
94
|
-
showSnippets: false,
|
|
95
|
-
showWords: true,
|
|
96
|
-
showStatusBar: false,
|
|
97
|
-
},
|
|
98
|
-
wordWrap: 'on',
|
|
99
|
-
ariaLabel: defaultAriaLabel,
|
|
100
|
-
fontFamily: DEFAULT_FONT_FAMILY,
|
|
101
|
-
fontSize: 13,
|
|
102
|
-
lineHeight: 20
|
|
103
|
-
};
|
|
104
|
-
const _previewEditorEditorOptions = {
|
|
105
|
-
scrollbar: { useShadows: false, alwaysConsumeMouseWheel: false, ignoreHorizontalScrollbarInContentHeight: true, },
|
|
106
|
-
renderMarginRevertIcon: false,
|
|
107
|
-
diffCodeLens: false,
|
|
108
|
-
scrollBeyondLastLine: false,
|
|
109
|
-
stickyScroll: { enabled: false },
|
|
110
|
-
originalAriaLabel: ( localizeWithPath(
|
|
111
|
-
'vs/workbench/contrib/inlineChat/browser/inlineChatWidget',
|
|
112
|
-
'original',
|
|
113
|
-
'Original'
|
|
114
|
-
)),
|
|
115
|
-
modifiedAriaLabel: ( localizeWithPath(
|
|
116
|
-
'vs/workbench/contrib/inlineChat/browser/inlineChatWidget',
|
|
117
|
-
'modified',
|
|
118
|
-
'Modified'
|
|
119
|
-
)),
|
|
120
|
-
diffAlgorithm: 'advanced',
|
|
121
|
-
readOnly: true,
|
|
122
|
-
isInEmbeddedEditor: true
|
|
123
|
-
};
|
|
45
|
+
import { inlineChatBackground, CTX_INLINE_CHAT_RESPONSE_FOCUSED, CTX_INLINE_CHAT_FOCUSED } from '../common/inlineChat.js';
|
|
46
|
+
import { ChatWidget } from '../../chat/browser/chatWidget.js';
|
|
47
|
+
import { chatRequestBackground } from '../../chat/common/chatColors.js';
|
|
48
|
+
import { Selection } from '../../../../editor/common/core/selection.js';
|
|
49
|
+
import { ChatAgentLocation } from '../../chat/common/chatAgents.js';
|
|
50
|
+
import { isNonEmptyArray, tail } from '../../../../base/common/arrays.js';
|
|
51
|
+
import { EditorExtensionsRegistry } from '../../../../editor/browser/editorExtensions.js';
|
|
52
|
+
import { SnippetController2 } from '../../../../editor/contrib/snippet/browser/snippetController2.js';
|
|
53
|
+
import { SuggestController } from '../../../../editor/contrib/suggest/browser/suggestController.js';
|
|
54
|
+
import { IChatService } from '../../chat/common/chatService.js';
|
|
55
|
+
import { setupCustomHover } from '../../../../base/browser/ui/hover/updatableHoverWidget.js';
|
|
56
|
+
import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
57
|
+
import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js';
|
|
58
|
+
var HunkAccessibleDiffViewer_1;
|
|
124
59
|
let InlineChatWidget = class InlineChatWidget {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
constructor(parentEditor, _options, _modelService, _contextKeyService, _languageFeaturesService, _keybindingService, _instantiationService, _accessibilityService, _configurationService, _accessibleViewService, _logService, _textModelResolverService, _chatAgentService) {
|
|
128
|
-
this.parentEditor = parentEditor;
|
|
129
|
-
this._modelService = _modelService;
|
|
60
|
+
constructor(location, options, _instantiationService, _contextKeyService, _keybindingService, _accessibilityService, _configurationService, _accessibleViewService, _textModelResolverService, _chatService) {
|
|
61
|
+
this._instantiationService = _instantiationService;
|
|
130
62
|
this._contextKeyService = _contextKeyService;
|
|
131
|
-
this._languageFeaturesService = _languageFeaturesService;
|
|
132
63
|
this._keybindingService = _keybindingService;
|
|
133
|
-
this._instantiationService = _instantiationService;
|
|
134
64
|
this._accessibilityService = _accessibilityService;
|
|
135
65
|
this._configurationService = _configurationService;
|
|
136
66
|
this._accessibleViewService = _accessibleViewService;
|
|
137
|
-
this._logService = _logService;
|
|
138
67
|
this._textModelResolverService = _textModelResolverService;
|
|
139
|
-
this.
|
|
68
|
+
this._chatService = _chatService;
|
|
140
69
|
this._elements = h('div.inline-chat@root', [
|
|
141
|
-
h('div.
|
|
142
|
-
h('div.content@content', [
|
|
143
|
-
h('div.input@input', [
|
|
144
|
-
h('div.editor-placeholder@placeholder'),
|
|
145
|
-
h('div.editor-container@editor'),
|
|
146
|
-
]),
|
|
147
|
-
h('div.toolbar@editorToolbar'),
|
|
148
|
-
]),
|
|
149
|
-
h('div.widget-toolbar@widgetToolbar')
|
|
150
|
-
]),
|
|
70
|
+
h('div.chat-widget@chatWidget'),
|
|
151
71
|
h('div.progress@progress'),
|
|
152
|
-
h('div.detectedIntent.hidden@detectedIntent'),
|
|
153
|
-
h('div.previewDiff.hidden@previewDiff'),
|
|
154
|
-
h('div.previewCreateTitle.show-file-icons@previewCreateTitle'),
|
|
155
|
-
h('div.previewCreate.hidden@previewCreate'),
|
|
156
|
-
h('div.chatMessage.hidden@chatMessage', [
|
|
157
|
-
h('div.chatMessageContent@chatMessageContent'),
|
|
158
|
-
h('div.messageActions@messageActions')
|
|
159
|
-
]),
|
|
160
72
|
h('div.followUps.hidden@followUps'),
|
|
73
|
+
h('div.previewDiff.hidden@previewDiff'),
|
|
161
74
|
h('div.accessibleViewer@accessibleViewer'),
|
|
162
75
|
h('div.status@status', [
|
|
163
76
|
h('div.label.info.hidden@infoLabel'),
|
|
@@ -167,140 +80,103 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
167
80
|
]),
|
|
168
81
|
]);
|
|
169
82
|
this._store = ( new DisposableStore());
|
|
170
|
-
this.
|
|
171
|
-
this._previewDiffModel = this._store.add(( new MutableDisposable()));
|
|
172
|
-
this._accessibleViewer = this._store.add(( new MutableDisposable()));
|
|
173
|
-
this._previewCreateDispoable = this._store.add(( new MutableDisposable()));
|
|
174
|
-
this._onDidChangeHeight = this._store.add(( new MicrotaskEmitter()));
|
|
83
|
+
this._onDidChangeHeight = this._store.add(( new Emitter()));
|
|
175
84
|
this.onDidChangeHeight = Event.filter(this._onDidChangeHeight.event, _ => !this._isLayouting);
|
|
176
|
-
this._onDidChangeLayout = this._store.add(( new MicrotaskEmitter()));
|
|
177
85
|
this._onDidChangeInput = this._store.add(( new Emitter()));
|
|
178
86
|
this.onDidChangeInput = this._onDidChangeInput.event;
|
|
179
|
-
this._onRequestWithoutIntentDetection = this._store.add(( new Emitter()));
|
|
180
|
-
this.onRequestWithoutIntentDetection = this._onRequestWithoutIntentDetection.event;
|
|
181
87
|
this._isLayouting = false;
|
|
182
|
-
this._expansionState = ExpansionState.NOT_CROPPED;
|
|
183
|
-
this._slashCommandDetails = [];
|
|
184
|
-
this._chatMessageDisposables = this._store.add(( new DisposableStore()));
|
|
185
88
|
this._followUpDisposables = this._store.add(( new DisposableStore()));
|
|
186
|
-
this._slashCommandUsedDisposables = this._store.add(( new DisposableStore()));
|
|
187
|
-
const codeEditorWidgetOptions = {
|
|
188
|
-
isSimpleWidget: true,
|
|
189
|
-
contributions: EditorExtensionsRegistry.getSomeEditorContributions([
|
|
190
|
-
SnippetController2.ID,
|
|
191
|
-
SuggestController.ID
|
|
192
|
-
])
|
|
193
|
-
};
|
|
194
|
-
this._inputEditor = this._instantiationService.createInstance(EmbeddedCodeEditorWidget, this._elements.editor, _inputEditorOptions, codeEditorWidgetOptions, this.parentEditor);
|
|
195
|
-
this._updateAriaLabel();
|
|
196
|
-
this._store.add(this._inputEditor);
|
|
197
|
-
this._store.add(this._inputEditor.onDidChangeModelContent(() => this._onDidChangeInput.fire(this)));
|
|
198
|
-
this._store.add(this._inputEditor.onDidLayoutChange(() => this._onDidChangeHeight.fire()));
|
|
199
|
-
this._store.add(this._inputEditor.onDidContentSizeChange(() => this._onDidChangeHeight.fire()));
|
|
200
|
-
this._store.add(addDisposableListener(this._elements.chatMessageContent, 'focus', () => this._ctxResponseFocused.set(true)));
|
|
201
|
-
this._store.add(addDisposableListener(this._elements.chatMessageContent, 'blur', () => this._ctxResponseFocused.reset()));
|
|
202
89
|
this._store.add(this._configurationService.onDidChangeConfiguration(e => {
|
|
203
90
|
if (e.affectsConfiguration("accessibility.verbosity.inlineChat" )) {
|
|
204
91
|
this._updateAriaLabel();
|
|
92
|
+
this._elements.followUps.ariaLabel = this._accessibleViewService.getOpenAriaHint("accessibility.verbosity.inlineChat" );
|
|
205
93
|
}
|
|
206
94
|
}));
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
this.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
const lastViewLineTop = this._inputEditor.getTopForPosition(fullRange.endLineNumber, fullRange.endColumn);
|
|
230
|
-
if (selectionTop === firstViewLineTop) {
|
|
231
|
-
onFirst = true;
|
|
95
|
+
this._progressBar = ( new ProgressBar(this._elements.progress));
|
|
96
|
+
this._store.add(this._progressBar);
|
|
97
|
+
let allowRequests = false;
|
|
98
|
+
const scopedInstaService = _instantiationService.createChild(( new ServiceCollection([
|
|
99
|
+
IContextKeyService,
|
|
100
|
+
this._store.add(_contextKeyService.createScoped(this._elements.chatWidget))
|
|
101
|
+
])));
|
|
102
|
+
this._chatWidget = scopedInstaService.createInstance(ChatWidget, location, { resource: true }, {
|
|
103
|
+
defaultElementHeight: 32,
|
|
104
|
+
renderStyle: 'compact',
|
|
105
|
+
renderInputOnTop: true,
|
|
106
|
+
supportsFileReferences: true,
|
|
107
|
+
editorOverflowWidgetsDomNode: options.editorOverflowWidgetsDomNode,
|
|
108
|
+
editableCodeBlocks: options.editableCodeBlocks,
|
|
109
|
+
menus: {
|
|
110
|
+
executeToolbar: options.inputMenuId,
|
|
111
|
+
inputSideToolbar: options.widgetMenuId,
|
|
112
|
+
telemetrySource: options.telemetrySource
|
|
113
|
+
},
|
|
114
|
+
filter: item => {
|
|
115
|
+
if (isWelcomeVM(item)) {
|
|
116
|
+
return false;
|
|
232
117
|
}
|
|
233
|
-
if (
|
|
234
|
-
|
|
118
|
+
if (isRequestVM(item)) {
|
|
119
|
+
return allowRequests;
|
|
235
120
|
}
|
|
121
|
+
return true;
|
|
122
|
+
},
|
|
123
|
+
}, {
|
|
124
|
+
listForeground: editorForeground,
|
|
125
|
+
listBackground: inlineChatBackground,
|
|
126
|
+
inputEditorBackground: inputBackground,
|
|
127
|
+
resultEditorBackground: editorBackground
|
|
128
|
+
});
|
|
129
|
+
this._chatWidget.render(this._elements.chatWidget);
|
|
130
|
+
this._elements.chatWidget.style.setProperty(asCssVariableName(chatRequestBackground), asCssVariable(inlineChatBackground));
|
|
131
|
+
this._chatWidget.setVisible(true);
|
|
132
|
+
this._store.add(this._chatWidget);
|
|
133
|
+
const viewModelListener = this._store.add(( new MutableDisposable()));
|
|
134
|
+
this._store.add(this._chatWidget.onDidChangeViewModel(() => {
|
|
135
|
+
const model = this._chatWidget.viewModel;
|
|
136
|
+
if (!model) {
|
|
137
|
+
allowRequests = false;
|
|
138
|
+
viewModelListener.clear();
|
|
139
|
+
return;
|
|
236
140
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
this._ctxInnerCursorFirst.reset();
|
|
254
|
-
this._ctxInnerCursorLast.reset();
|
|
255
|
-
this._ctxInputEditorFocused.reset();
|
|
141
|
+
const updateAllowRequestsFilter = () => {
|
|
142
|
+
let requestCount = 0;
|
|
143
|
+
for (const item of model.getItems()) {
|
|
144
|
+
if (isRequestVM(item)) {
|
|
145
|
+
if (++requestCount >= 2) {
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
const newAllowRequest = requestCount >= 2;
|
|
151
|
+
if (newAllowRequest !== allowRequests) {
|
|
152
|
+
allowRequests = newAllowRequest;
|
|
153
|
+
this._chatWidget.refilter();
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
viewModelListener.value = model.onDidChange(updateAllowRequestsFilter);
|
|
256
157
|
}));
|
|
257
|
-
|
|
258
|
-
this.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
const hasText = this._inputModel.getValueLength() > 0;
|
|
264
|
-
this._elements.placeholder.classList.toggle('hidden', hasText);
|
|
265
|
-
this._ctxInputEmpty.set(!hasText);
|
|
266
|
-
this.readPlaceholder();
|
|
267
|
-
const contentHeight = this._inputEditor.getContentHeight();
|
|
268
|
-
if (contentHeight !== currentContentHeight && this._lastDim) {
|
|
269
|
-
this._lastDim = this._lastDim.with(undefined, contentHeight);
|
|
270
|
-
this._inputEditor.layout(this._lastDim);
|
|
271
|
-
this._onDidChangeHeight.fire();
|
|
158
|
+
const viewModelStore = this._store.add(( new DisposableStore()));
|
|
159
|
+
this._store.add(this._chatWidget.onDidChangeViewModel(() => {
|
|
160
|
+
viewModelStore.clear();
|
|
161
|
+
const viewModel = this._chatWidget.viewModel;
|
|
162
|
+
if (viewModel) {
|
|
163
|
+
viewModelStore.add(viewModel.onDidChange(() => this._onDidChangeHeight.fire()));
|
|
272
164
|
}
|
|
273
|
-
|
|
274
|
-
this._store.add(this._inputModel.onDidChangeContent(togglePlaceholder));
|
|
275
|
-
togglePlaceholder();
|
|
276
|
-
this._slashCommandContentWidget = ( new SlashCommandContentWidget(this._inputEditor));
|
|
277
|
-
this._store.add(this._slashCommandContentWidget);
|
|
278
|
-
this._store.add(this._instantiationService.createInstance(MenuWorkbenchToolBar, this._elements.editorToolbar, _options.menuId, {
|
|
279
|
-
telemetrySource: 'interactiveEditorWidget-toolbar',
|
|
280
|
-
toolbarOptions: { primaryGroup: 'main' },
|
|
281
|
-
hiddenItemStrategy: 0
|
|
165
|
+
this._onDidChangeHeight.fire();
|
|
282
166
|
}));
|
|
283
|
-
this.
|
|
284
|
-
|
|
285
|
-
this._store.add(this._instantiationService.createInstance(MenuWorkbenchToolBar, this._elements.widgetToolbar, _options.widgetMenuId, {
|
|
286
|
-
telemetrySource: 'interactiveEditorWidget-toolbar',
|
|
287
|
-
toolbarOptions: { primaryGroup: 'main' }
|
|
167
|
+
this._store.add(this.chatWidget.onDidChangeContentHeight(() => {
|
|
168
|
+
this._onDidChangeHeight.fire();
|
|
288
169
|
}));
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return { isSecondary: true };
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
};
|
|
303
|
-
const statusButtonBar = this._instantiationService.createInstance(MenuWorkbenchButtonBar, this._elements.statusToolbar, _options.statusMenuId, workbenchMenubarOptions);
|
|
170
|
+
this._ctxResponseFocused = CTX_INLINE_CHAT_RESPONSE_FOCUSED.bindTo(this._contextKeyService);
|
|
171
|
+
const tracker = this._store.add(trackFocus(this.domNode));
|
|
172
|
+
this._store.add(tracker.onDidBlur(() => this._ctxResponseFocused.set(false)));
|
|
173
|
+
this._store.add(tracker.onDidFocus(() => this._ctxResponseFocused.set(true)));
|
|
174
|
+
this._ctxInputEditorFocused = CTX_INLINE_CHAT_FOCUSED.bindTo(_contextKeyService);
|
|
175
|
+
this._store.add(this._chatWidget.inputEditor.onDidFocusEditorWidget(() => this._ctxInputEditorFocused.set(true)));
|
|
176
|
+
this._store.add(this._chatWidget.inputEditor.onDidBlurEditorWidget(() => this._ctxInputEditorFocused.set(false)));
|
|
177
|
+
const statusMenuId = options.statusMenuId instanceof MenuId ? options.statusMenuId : options.statusMenuId.menu;
|
|
178
|
+
const statusMenuOptions = options.statusMenuId instanceof MenuId ? undefined : options.statusMenuId.options;
|
|
179
|
+
const statusButtonBar = this._instantiationService.createInstance(MenuWorkbenchButtonBar, this._elements.statusToolbar, statusMenuId, statusMenuOptions);
|
|
304
180
|
this._store.add(statusButtonBar.onDidChange(() => this._onDidChangeHeight.fire()));
|
|
305
181
|
this._store.add(statusButtonBar);
|
|
306
182
|
const workbenchToolbarOptions = {
|
|
@@ -310,34 +186,24 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
310
186
|
useSeparatorsInPrimaryActions: true
|
|
311
187
|
}
|
|
312
188
|
};
|
|
313
|
-
const feedbackToolbar = this._instantiationService.createInstance(MenuWorkbenchToolBar, this._elements.feedbackToolbar,
|
|
189
|
+
const feedbackToolbar = this._instantiationService.createInstance(MenuWorkbenchToolBar, this._elements.feedbackToolbar, options.feedbackMenuId, { ...workbenchToolbarOptions, hiddenItemStrategy: 0 });
|
|
314
190
|
this._store.add(feedbackToolbar.onDidChangeMenuItems(() => this._onDidChangeHeight.fire()));
|
|
315
191
|
this._store.add(feedbackToolbar);
|
|
316
|
-
this._previewDiffEditor = ( new Lazy(
|
|
317
|
-
() => this._store.add(_instantiationService.createInstance(EmbeddedDiffEditorWidget, this._elements.previewDiff, {
|
|
318
|
-
useInlineViewWhenSpaceIsLimited: false,
|
|
319
|
-
..._previewEditorEditorOptions,
|
|
320
|
-
onlyShowAccessibleDiffViewer: this._accessibilityService.isScreenReaderOptimized(),
|
|
321
|
-
}, { modifiedEditor: codeEditorWidgetOptions, originalEditor: codeEditorWidgetOptions }, parentEditor))
|
|
322
|
-
));
|
|
323
|
-
this._previewCreateTitle = this._store.add(_instantiationService.createInstance(ResourceLabel, this._elements.previewCreateTitle, { supportIcons: true }));
|
|
324
|
-
this._previewCreateEditor = ( new Lazy(
|
|
325
|
-
() => this._store.add(_instantiationService.createInstance(EmbeddedCodeEditorWidget, this._elements.previewCreate, _previewEditorEditorOptions, codeEditorWidgetOptions, parentEditor))
|
|
326
|
-
));
|
|
327
|
-
this._elements.chatMessageContent.tabIndex = 0;
|
|
328
|
-
this._elements.chatMessageContent.ariaLabel = this._accessibleViewService.getOpenAriaHint("accessibility.verbosity.inlineChat" );
|
|
329
192
|
this._elements.followUps.tabIndex = 0;
|
|
330
193
|
this._elements.followUps.ariaLabel = this._accessibleViewService.getOpenAriaHint("accessibility.verbosity.inlineChat" );
|
|
331
194
|
this._elements.statusLabel.tabIndex = 0;
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
this._store.add(this.
|
|
336
|
-
if (e.
|
|
337
|
-
this.
|
|
338
|
-
this._elements.followUps.ariaLabel = this._accessibleViewService.getOpenAriaHint("accessibility.verbosity.inlineChat" );
|
|
195
|
+
this._store.add(setupCustomHover(getDefaultHoverDelegate('element'), this._elements.statusLabel, () => {
|
|
196
|
+
return this._elements.statusLabel.dataset['title'];
|
|
197
|
+
}));
|
|
198
|
+
this._store.add(this._chatService.onDidPerformUserAction(e => {
|
|
199
|
+
if (e.sessionId === this._chatWidget.viewModel?.model.sessionId && e.action.kind === 'vote') {
|
|
200
|
+
this.updateStatus('Thank you for your feedback!', { resetAfter: 1250 });
|
|
339
201
|
}
|
|
340
202
|
}));
|
|
203
|
+
this._defaultChatModel = this._store.add(this._instantiationService.createInstance(ChatModel, `inlineChatDefaultModel/${location}`, undefined));
|
|
204
|
+
this._defaultChatModel.startInitialize();
|
|
205
|
+
this._defaultChatModel.initialize({ id: 1 }, undefined);
|
|
206
|
+
this.setChatModel(this._defaultChatModel);
|
|
341
207
|
}
|
|
342
208
|
_updateAriaLabel() {
|
|
343
209
|
if (!this._accessibilityService.isScreenReaderOptimized()) {
|
|
@@ -357,71 +223,58 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
357
223
|
"Inline Chat Input, Run the Inline Chat Accessibility Help command for more information."
|
|
358
224
|
));
|
|
359
225
|
}
|
|
360
|
-
|
|
361
|
-
this._inputEditor.updateOptions({ ariaLabel: label });
|
|
226
|
+
this._chatWidget.inputEditor.updateOptions({ ariaLabel: label });
|
|
362
227
|
}
|
|
363
228
|
dispose() {
|
|
364
229
|
this._store.dispose();
|
|
365
|
-
this._ctxInputEmpty.reset();
|
|
366
|
-
this._ctxMessageCropState.reset();
|
|
367
230
|
}
|
|
368
231
|
get domNode() {
|
|
369
232
|
return this._elements.root;
|
|
370
233
|
}
|
|
371
|
-
|
|
234
|
+
get chatWidget() {
|
|
235
|
+
return this._chatWidget;
|
|
236
|
+
}
|
|
237
|
+
saveState() {
|
|
238
|
+
this._chatWidget.saveState();
|
|
239
|
+
}
|
|
240
|
+
layout(widgetDim) {
|
|
372
241
|
this._isLayouting = true;
|
|
373
242
|
try {
|
|
374
|
-
|
|
375
|
-
this._accessibleViewer.value.width = _dim.width - 12;
|
|
376
|
-
}
|
|
377
|
-
const widgetToolbarWidth = getTotalWidth(this._elements.widgetToolbar);
|
|
378
|
-
const editorToolbarWidth = getTotalWidth(this._elements.editorToolbar) + 8 ;
|
|
379
|
-
const innerEditorWidth = _dim.width - editorToolbarWidth - widgetToolbarWidth;
|
|
380
|
-
const dim = ( new Dimension(innerEditorWidth, _dim.height));
|
|
381
|
-
if (!this._lastDim || !Dimension.equals(this._lastDim, dim)) {
|
|
382
|
-
this._lastDim = dim;
|
|
383
|
-
this._inputEditor.layout(( new Dimension(innerEditorWidth, this._inputEditor.getContentHeight())));
|
|
384
|
-
this._elements.placeholder.style.width = `${innerEditorWidth }px`;
|
|
385
|
-
if (this._previewDiffEditor.hasValue) {
|
|
386
|
-
const previewDiffDim = ( new Dimension(
|
|
387
|
-
_dim.width - 12,
|
|
388
|
-
Math.min(300, Math.max(0, this._previewDiffEditor.value.getContentHeight()))
|
|
389
|
-
));
|
|
390
|
-
this._elements.previewDiff.style.width = `${previewDiffDim.width}px`;
|
|
391
|
-
this._elements.previewDiff.style.height = `${previewDiffDim.height}px`;
|
|
392
|
-
this._previewDiffEditor.value.layout(previewDiffDim);
|
|
393
|
-
}
|
|
394
|
-
if (this._previewCreateEditor.hasValue) {
|
|
395
|
-
const previewCreateDim = ( new Dimension(
|
|
396
|
-
dim.width,
|
|
397
|
-
Math.min(300, Math.max(0, this._previewCreateEditor.value.getContentHeight()))
|
|
398
|
-
));
|
|
399
|
-
this._previewCreateEditor.value.layout(previewCreateDim);
|
|
400
|
-
this._elements.previewCreate.style.height = `${previewCreateDim.height}px`;
|
|
401
|
-
}
|
|
402
|
-
const lineHeight = this.parentEditor.getOption(67 );
|
|
403
|
-
const editorHeight = this.parentEditor.getLayoutInfo().height;
|
|
404
|
-
const editorHeightInLines = Math.floor(editorHeight / lineHeight);
|
|
405
|
-
this._elements.root.style.setProperty('--vscode-inline-chat-cropped', String(Math.floor(editorHeightInLines / 5)));
|
|
406
|
-
this._elements.root.style.setProperty('--vscode-inline-chat-expanded', String(Math.floor(editorHeightInLines / 3)));
|
|
407
|
-
this._onDidChangeLayout.fire();
|
|
408
|
-
}
|
|
243
|
+
this._doLayout(widgetDim);
|
|
409
244
|
}
|
|
410
245
|
finally {
|
|
411
246
|
this._isLayouting = false;
|
|
412
247
|
}
|
|
413
248
|
}
|
|
414
|
-
|
|
415
|
-
const
|
|
416
|
-
const
|
|
417
|
-
const detectedIntentHeight = getTotalHeight(this._elements.detectedIntent);
|
|
249
|
+
_doLayout(dimension) {
|
|
250
|
+
const extraHeight = this._getExtraHeight();
|
|
251
|
+
const progressHeight = getTotalHeight(this._elements.progress);
|
|
418
252
|
const followUpsHeight = getTotalHeight(this._elements.followUps);
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
253
|
+
const statusHeight = getTotalHeight(this._elements.status);
|
|
254
|
+
this._elements.root.style.height = `${dimension.height - extraHeight}px`;
|
|
255
|
+
this._elements.root.style.width = `${dimension.width}px`;
|
|
256
|
+
this._elements.progress.style.width = `${dimension.width}px`;
|
|
257
|
+
this._chatWidget.layout(dimension.height - progressHeight - followUpsHeight - statusHeight - extraHeight, dimension.width);
|
|
258
|
+
}
|
|
259
|
+
get contentHeight() {
|
|
260
|
+
const data = {
|
|
261
|
+
followUpsHeight: getTotalHeight(this._elements.followUps),
|
|
262
|
+
chatWidgetContentHeight: this._chatWidget.contentHeight,
|
|
263
|
+
progressHeight: getTotalHeight(this._elements.progress),
|
|
264
|
+
statusHeight: getTotalHeight(this._elements.status),
|
|
265
|
+
extraHeight: this._getExtraHeight()
|
|
266
|
+
};
|
|
267
|
+
const result = data.progressHeight + data.chatWidgetContentHeight + data.followUpsHeight + data.statusHeight + data.extraHeight;
|
|
268
|
+
return result;
|
|
269
|
+
}
|
|
270
|
+
get minHeight() {
|
|
271
|
+
let value = this.contentHeight;
|
|
272
|
+
value -= this._chatWidget.contentHeight;
|
|
273
|
+
value += Math.min(100, this._chatWidget.contentHeight);
|
|
274
|
+
return value;
|
|
275
|
+
}
|
|
276
|
+
_getExtraHeight() {
|
|
277
|
+
return 12 + 2 + 12 ;
|
|
425
278
|
}
|
|
426
279
|
updateProgress(show) {
|
|
427
280
|
if (show) {
|
|
@@ -434,38 +287,23 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
434
287
|
}
|
|
435
288
|
}
|
|
436
289
|
get value() {
|
|
437
|
-
return this.
|
|
290
|
+
return this._chatWidget.getInput();
|
|
438
291
|
}
|
|
439
292
|
set value(value) {
|
|
440
|
-
this.
|
|
441
|
-
this._inputEditor.setPosition(this._inputModel.getFullModelRange().getEndPosition());
|
|
293
|
+
this._chatWidget.setInput(value);
|
|
442
294
|
}
|
|
443
295
|
selectAll(includeSlashCommand = true) {
|
|
444
|
-
let
|
|
296
|
+
let startColumn = 1;
|
|
445
297
|
if (!includeSlashCommand) {
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
slashCommand.command.length + 3,
|
|
451
|
-
selection.endLineNumber,
|
|
452
|
-
selection.endColumn
|
|
453
|
-
)) : selection;
|
|
298
|
+
const match = /^(\/\w+)\s*/.exec(this._chatWidget.inputEditor.getModel().getLineContent(1));
|
|
299
|
+
if (match) {
|
|
300
|
+
startColumn = match[1].length + 1;
|
|
301
|
+
}
|
|
454
302
|
}
|
|
455
|
-
this.
|
|
303
|
+
this._chatWidget.inputEditor.setSelection(( new Selection(1, startColumn, Number.MAX_SAFE_INTEGER, 1)));
|
|
456
304
|
}
|
|
457
305
|
set placeholder(value) {
|
|
458
|
-
this.
|
|
459
|
-
}
|
|
460
|
-
readPlaceholder() {
|
|
461
|
-
const slashCommand = this._slashCommandDetails.find(c => `${c.command} ` === this._inputModel.getValue().substring(1));
|
|
462
|
-
const hasText = this._inputModel.getValueLength() > 0;
|
|
463
|
-
if (!hasText) {
|
|
464
|
-
status(this._elements.placeholder.innerText);
|
|
465
|
-
}
|
|
466
|
-
else if (slashCommand) {
|
|
467
|
-
status(slashCommand.detail);
|
|
468
|
-
}
|
|
306
|
+
this._chatWidget.setInputPlaceholder(value);
|
|
469
307
|
}
|
|
470
308
|
updateToolbar(show) {
|
|
471
309
|
this._elements.statusToolbar.classList.toggle('hidden', !show);
|
|
@@ -474,127 +312,77 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
474
312
|
this._elements.infoLabel.classList.toggle('hidden', show);
|
|
475
313
|
this._onDidChangeHeight.fire();
|
|
476
314
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
315
|
+
async getCodeBlockInfo(codeBlockIndex) {
|
|
316
|
+
const { viewModel } = this._chatWidget;
|
|
317
|
+
if (!viewModel) {
|
|
318
|
+
return undefined;
|
|
319
|
+
}
|
|
320
|
+
for (const item of viewModel.getItems()) {
|
|
321
|
+
if (isResponseVM(item)) {
|
|
322
|
+
return viewModel.codeBlockModelCollection.get(viewModel.sessionId, item, codeBlockIndex)?.model;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return undefined;
|
|
482
326
|
}
|
|
483
327
|
get responseContent() {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
let expansionState;
|
|
488
|
-
this._chatMessageDisposables.clear();
|
|
489
|
-
this._chatMessage = message ? ( new MarkdownString(message.message.value)) : undefined;
|
|
490
|
-
const hasMessage = message?.message.value;
|
|
491
|
-
this._elements.chatMessage.classList.toggle('hidden', !hasMessage);
|
|
492
|
-
reset(this._elements.chatMessageContent);
|
|
493
|
-
let resultingAppender;
|
|
494
|
-
if (!hasMessage) {
|
|
495
|
-
this._ctxMessageCropState.reset();
|
|
496
|
-
expansionState = ExpansionState.NOT_CROPPED;
|
|
328
|
+
const requests = this._chatWidget.viewModel?.model.getRequests();
|
|
329
|
+
if (!isNonEmptyArray(requests)) {
|
|
330
|
+
return undefined;
|
|
497
331
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
this._chatMessageDisposables.add(template.elementDisposables);
|
|
520
|
-
this._chatMessageDisposables.add(template.templateDisposables);
|
|
521
|
-
renderer.renderChatTreeItem(viewModel, 0, template);
|
|
522
|
-
this._chatMessageDisposables.add(renderer.onDidChangeItemHeight(() => this._onDidChangeHeight.fire()));
|
|
523
|
-
if (this._preferredExpansionState) {
|
|
524
|
-
expansionState = this._preferredExpansionState;
|
|
525
|
-
this._preferredExpansionState = undefined;
|
|
526
|
-
}
|
|
527
|
-
else {
|
|
528
|
-
this._updateLineClamp(ExpansionState.CROPPED);
|
|
529
|
-
expansionState = template.value.scrollHeight > template.value.clientHeight ? ExpansionState.CROPPED : ExpansionState.NOT_CROPPED;
|
|
332
|
+
return tail(requests).response?.response.asString();
|
|
333
|
+
}
|
|
334
|
+
getChatModel() {
|
|
335
|
+
return this._chatWidget.viewModel?.model ?? this._defaultChatModel;
|
|
336
|
+
}
|
|
337
|
+
setChatModel(chatModel) {
|
|
338
|
+
this._chatWidget.setModel(chatModel, { inputValue: undefined });
|
|
339
|
+
}
|
|
340
|
+
addToHistory(input) {
|
|
341
|
+
if (this._chatWidget.viewModel?.model === this._defaultChatModel) {
|
|
342
|
+
this._chatWidget.input.acceptInput(input);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
updateChatMessage(message, isIncomplete, isCodeBlockEditable) {
|
|
346
|
+
if (!this._chatWidget.viewModel || this._chatWidget.viewModel.model !== this._defaultChatModel) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const model = this._defaultChatModel;
|
|
350
|
+
if (!message?.message.value) {
|
|
351
|
+
for (const request of model.getRequests()) {
|
|
352
|
+
model.removeRequest(request.id);
|
|
530
353
|
}
|
|
531
|
-
|
|
532
|
-
this._updateLineClamp(expansionState);
|
|
533
|
-
resultingAppender = isIncomplete ? {
|
|
534
|
-
cancel: () => responseModel.cancel(),
|
|
535
|
-
complete: () => responseModel.complete(),
|
|
536
|
-
appendContent: (fragment) => {
|
|
537
|
-
responseModel.updateContent({ kind: 'markdownContent', content: ( new MarkdownString(fragment)) });
|
|
538
|
-
this._chatMessage?.appendMarkdown(fragment);
|
|
539
|
-
}
|
|
540
|
-
} : undefined;
|
|
354
|
+
return;
|
|
541
355
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
356
|
+
const chatRequest = model.addRequest({ parts: [], text: '' }, { variables: [] });
|
|
357
|
+
model.acceptResponseProgress(chatRequest, {
|
|
358
|
+
kind: 'markdownContent',
|
|
359
|
+
content: message.message
|
|
360
|
+
});
|
|
361
|
+
if (!isIncomplete) {
|
|
362
|
+
model.completeResponse(chatRequest);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
cancel: () => model.cancelRequest(chatRequest),
|
|
367
|
+
complete: () => model.completeResponse(chatRequest),
|
|
368
|
+
appendContent: (fragment) => {
|
|
369
|
+
model.acceptResponseProgress(chatRequest, {
|
|
370
|
+
kind: 'markdownContent',
|
|
371
|
+
content: ( new MarkdownString(fragment))
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
};
|
|
545
375
|
}
|
|
546
376
|
updateFollowUps(items, onFollowup) {
|
|
547
377
|
this._followUpDisposables.clear();
|
|
548
378
|
this._elements.followUps.classList.toggle('hidden', !items || items.length === 0);
|
|
549
379
|
reset(this._elements.followUps);
|
|
550
380
|
if (items && items.length > 0 && onFollowup) {
|
|
551
|
-
this._followUpDisposables.add(this._instantiationService.createInstance(ChatFollowups, this._elements.followUps, items, undefined, onFollowup));
|
|
552
|
-
}
|
|
553
|
-
this._onDidChangeHeight.fire();
|
|
554
|
-
}
|
|
555
|
-
updateChatMessageExpansionState(expansionState) {
|
|
556
|
-
this._ctxMessageCropState.set(expansionState);
|
|
557
|
-
const heightBefore = this._elements.chatMessageContent.scrollHeight;
|
|
558
|
-
this._updateLineClamp(expansionState);
|
|
559
|
-
const heightAfter = this._elements.chatMessageContent.scrollHeight;
|
|
560
|
-
if (heightBefore === heightAfter) {
|
|
561
|
-
this._ctxMessageCropState.set(ExpansionState.NOT_CROPPED);
|
|
381
|
+
this._followUpDisposables.add(this._instantiationService.createInstance(ChatFollowups, this._elements.followUps, items, ChatAgentLocation.Editor, undefined, onFollowup));
|
|
562
382
|
}
|
|
563
383
|
this._onDidChangeHeight.fire();
|
|
564
384
|
}
|
|
565
|
-
|
|
566
|
-
this._elements.chatMessageContent.setAttribute('state', expansionState);
|
|
567
|
-
}
|
|
568
|
-
updateSlashCommandUsed(command) {
|
|
569
|
-
const details = this._slashCommandDetails.find(candidate => candidate.command === command);
|
|
570
|
-
if (!details) {
|
|
571
|
-
return;
|
|
572
|
-
}
|
|
573
|
-
this._elements.detectedIntent.classList.toggle('hidden', false);
|
|
574
|
-
this._slashCommandUsedDisposables.clear();
|
|
575
|
-
const label = ( localizeWithPath(
|
|
576
|
-
'vs/workbench/contrib/inlineChat/browser/inlineChatWidget',
|
|
577
|
-
'slashCommandUsed',
|
|
578
|
-
"Using {0} to generate response ([[re-run without]])",
|
|
579
|
-
`\`\`/${details.command}\`\``
|
|
580
|
-
));
|
|
581
|
-
const usingSlashCommandText = renderFormattedText(label, {
|
|
582
|
-
inline: true,
|
|
583
|
-
renderCodeSegments: true,
|
|
584
|
-
className: 'slash-command-pill',
|
|
585
|
-
actionHandler: {
|
|
586
|
-
callback: (content) => {
|
|
587
|
-
if (content !== '0') {
|
|
588
|
-
return;
|
|
589
|
-
}
|
|
590
|
-
this._elements.detectedIntent.classList.toggle('hidden', true);
|
|
591
|
-
this._onRequestWithoutIntentDetection.fire();
|
|
592
|
-
},
|
|
593
|
-
disposables: this._slashCommandUsedDisposables,
|
|
594
|
-
}
|
|
595
|
-
});
|
|
596
|
-
reset(this._elements.detectedIntent, usingSlashCommandText);
|
|
597
|
-
this._onDidChangeHeight.fire();
|
|
385
|
+
updateSlashCommands(commands) {
|
|
598
386
|
}
|
|
599
387
|
updateInfo(message) {
|
|
600
388
|
this._elements.infoLabel.classList.toggle('hidden', !message);
|
|
@@ -606,12 +394,14 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
606
394
|
const isTempMessage = typeof ops.resetAfter === 'number';
|
|
607
395
|
if (isTempMessage && !this._elements.statusLabel.dataset['state']) {
|
|
608
396
|
const statusLabel = this._elements.statusLabel.innerText;
|
|
397
|
+
const title = this._elements.statusLabel.dataset['title'];
|
|
609
398
|
const classes = Array.from(( this._elements.statusLabel.classList.values()));
|
|
610
399
|
setTimeout(() => {
|
|
611
|
-
this.updateStatus(statusLabel, { classes, keepMessage: true });
|
|
400
|
+
this.updateStatus(statusLabel, { classes, keepMessage: true, title });
|
|
612
401
|
}, ops.resetAfter);
|
|
613
402
|
}
|
|
614
|
-
|
|
403
|
+
const renderedMessage = renderLabelWithIcons(message);
|
|
404
|
+
reset(this._elements.statusLabel, ...renderedMessage);
|
|
615
405
|
this._elements.statusLabel.className = `label status ${(ops.classes ?? []).join(' ')}`;
|
|
616
406
|
this._elements.statusLabel.classList.toggle('hidden', !message);
|
|
617
407
|
if (isTempMessage) {
|
|
@@ -620,34 +410,129 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
620
410
|
else {
|
|
621
411
|
delete this._elements.statusLabel.dataset['state'];
|
|
622
412
|
}
|
|
413
|
+
if (ops.title) {
|
|
414
|
+
this._elements.statusLabel.dataset['title'] = ops.title;
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
delete this._elements.statusLabel.dataset['title'];
|
|
418
|
+
}
|
|
623
419
|
this._onDidChangeHeight.fire();
|
|
624
420
|
}
|
|
625
421
|
reset() {
|
|
626
|
-
this.
|
|
627
|
-
this._ctxInnerCursorFirst.reset();
|
|
628
|
-
this._ctxInnerCursorLast.reset();
|
|
629
|
-
this._ctxInputEditorFocused.reset();
|
|
630
|
-
this.value = '';
|
|
422
|
+
this._chatWidget.saveState();
|
|
631
423
|
this.updateChatMessage(undefined);
|
|
632
424
|
this.updateFollowUps(undefined);
|
|
633
425
|
reset(this._elements.statusLabel);
|
|
634
|
-
this._elements.detectedIntent.classList.toggle('hidden', true);
|
|
635
426
|
this._elements.statusLabel.classList.toggle('hidden', true);
|
|
636
427
|
this._elements.statusToolbar.classList.add('hidden');
|
|
637
428
|
this._elements.feedbackToolbar.classList.add('hidden');
|
|
638
429
|
this.updateInfo('');
|
|
639
|
-
this.hideCreatePreview();
|
|
640
|
-
this.hideEditsPreview();
|
|
641
|
-
this._accessibleViewer.clear();
|
|
642
430
|
this._elements.accessibleViewer.classList.toggle('hidden', true);
|
|
643
431
|
this._onDidChangeHeight.fire();
|
|
644
432
|
}
|
|
645
433
|
focus() {
|
|
646
|
-
this.
|
|
434
|
+
this._chatWidget.focusInput();
|
|
647
435
|
}
|
|
648
436
|
hasFocus() {
|
|
649
437
|
return this.domNode.contains(getActiveElement());
|
|
650
438
|
}
|
|
439
|
+
};
|
|
440
|
+
InlineChatWidget = ( __decorate([
|
|
441
|
+
( __param(2, IInstantiationService)),
|
|
442
|
+
( __param(3, IContextKeyService)),
|
|
443
|
+
( __param(4, IKeybindingService)),
|
|
444
|
+
( __param(5, IAccessibilityService)),
|
|
445
|
+
( __param(6, IConfigurationService)),
|
|
446
|
+
( __param(7, IAccessibleViewService)),
|
|
447
|
+
( __param(8, ITextModelService)),
|
|
448
|
+
( __param(9, IChatService))
|
|
449
|
+
], InlineChatWidget));
|
|
450
|
+
const defaultAriaLabel = ( localizeWithPath(
|
|
451
|
+
'vs/workbench/contrib/inlineChat/browser/inlineChatWidget',
|
|
452
|
+
'aria-label',
|
|
453
|
+
"Inline Chat Input"
|
|
454
|
+
));
|
|
455
|
+
const codeEditorWidgetOptions = {
|
|
456
|
+
isSimpleWidget: true,
|
|
457
|
+
contributions: EditorExtensionsRegistry.getSomeEditorContributions([
|
|
458
|
+
SnippetController2.ID,
|
|
459
|
+
SuggestController.ID
|
|
460
|
+
])
|
|
461
|
+
};
|
|
462
|
+
const _previewEditorEditorOptions = {
|
|
463
|
+
scrollbar: { useShadows: false, alwaysConsumeMouseWheel: false, ignoreHorizontalScrollbarInContentHeight: true, },
|
|
464
|
+
renderMarginRevertIcon: false,
|
|
465
|
+
diffCodeLens: false,
|
|
466
|
+
scrollBeyondLastLine: false,
|
|
467
|
+
stickyScroll: { enabled: false },
|
|
468
|
+
originalAriaLabel: ( localizeWithPath(
|
|
469
|
+
'vs/workbench/contrib/inlineChat/browser/inlineChatWidget',
|
|
470
|
+
'original',
|
|
471
|
+
'Original'
|
|
472
|
+
)),
|
|
473
|
+
modifiedAriaLabel: ( localizeWithPath(
|
|
474
|
+
'vs/workbench/contrib/inlineChat/browser/inlineChatWidget',
|
|
475
|
+
'modified',
|
|
476
|
+
'Modified'
|
|
477
|
+
)),
|
|
478
|
+
diffAlgorithm: 'advanced',
|
|
479
|
+
readOnly: true,
|
|
480
|
+
isInEmbeddedEditor: true
|
|
481
|
+
};
|
|
482
|
+
let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends InlineChatWidget {
|
|
483
|
+
constructor(_parentEditor, options, contextKeyService, keybindingService, instantiationService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService) {
|
|
484
|
+
super(ChatAgentLocation.Editor, { ...options, editorOverflowWidgetsDomNode: _parentEditor.getOverflowWidgetsDomNode() }, instantiationService, contextKeyService, keybindingService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService);
|
|
485
|
+
this._parentEditor = _parentEditor;
|
|
486
|
+
this._accessibleViewer = this._store.add(( new MutableDisposable()));
|
|
487
|
+
this._previewDiffModel = this._store.add(( new MutableDisposable()));
|
|
488
|
+
this._previewDiffEditor = ( new Lazy(
|
|
489
|
+
() => this._store.add(instantiationService.createInstance(EmbeddedDiffEditorWidget, this._elements.previewDiff, {
|
|
490
|
+
useInlineViewWhenSpaceIsLimited: false,
|
|
491
|
+
..._previewEditorEditorOptions,
|
|
492
|
+
onlyShowAccessibleDiffViewer: accessibilityService.isScreenReaderOptimized(),
|
|
493
|
+
}, { modifiedEditor: codeEditorWidgetOptions, originalEditor: codeEditorWidgetOptions }, _parentEditor))
|
|
494
|
+
));
|
|
495
|
+
}
|
|
496
|
+
get contentHeight() {
|
|
497
|
+
let result = super.contentHeight;
|
|
498
|
+
if (this._previewDiffEditor.hasValue && this._previewDiffEditor.value.getModel()) {
|
|
499
|
+
result += 14 + Math.min(300, this._previewDiffEditor.value.getContentHeight());
|
|
500
|
+
}
|
|
501
|
+
if (this._accessibleViewer.value) {
|
|
502
|
+
result += this._accessibleViewer.value.height;
|
|
503
|
+
}
|
|
504
|
+
return result;
|
|
505
|
+
}
|
|
506
|
+
_doLayout(dimension) {
|
|
507
|
+
let newHeight = dimension.height;
|
|
508
|
+
if (this._previewDiffEditor.hasValue) {
|
|
509
|
+
const previewDiffDim = ( new Dimension(
|
|
510
|
+
dimension.width - 12,
|
|
511
|
+
Math.min(300, this._previewDiffEditor.value.getContentHeight())
|
|
512
|
+
));
|
|
513
|
+
this._elements.previewDiff.style.width = `${previewDiffDim.width}px`;
|
|
514
|
+
this._elements.previewDiff.style.height = `${previewDiffDim.height}px`;
|
|
515
|
+
this._previewDiffEditor.value.layout(previewDiffDim);
|
|
516
|
+
newHeight -= previewDiffDim.height + 14;
|
|
517
|
+
}
|
|
518
|
+
if (this._accessibleViewer.value) {
|
|
519
|
+
this._accessibleViewer.value.width = dimension.width - 12;
|
|
520
|
+
newHeight -= this._accessibleViewer.value.height;
|
|
521
|
+
}
|
|
522
|
+
super._doLayout(dimension.with(undefined, newHeight));
|
|
523
|
+
this._elements.root.style.height = `${dimension.height - this._getExtraHeight()}px`;
|
|
524
|
+
}
|
|
525
|
+
reset() {
|
|
526
|
+
this.hideEditsPreview();
|
|
527
|
+
this._accessibleViewer.clear();
|
|
528
|
+
super.reset();
|
|
529
|
+
}
|
|
530
|
+
showAccessibleHunk(session, hunkData) {
|
|
531
|
+
this._elements.accessibleViewer.classList.remove('hidden');
|
|
532
|
+
this._accessibleViewer.clear();
|
|
533
|
+
this._accessibleViewer.value = this._instantiationService.createInstance(HunkAccessibleDiffViewer, this._elements.accessibleViewer, session, hunkData, ( new AccessibleHunk(this._parentEditor, session, hunkData)));
|
|
534
|
+
this._onDidChangeHeight.fire();
|
|
535
|
+
}
|
|
651
536
|
showEditsPreview(hunks, textModel0, textModelN) {
|
|
652
537
|
if (hunks.size === 0) {
|
|
653
538
|
this.hideEditsPreview();
|
|
@@ -682,249 +567,20 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
682
567
|
this._previewDiffModel.clear();
|
|
683
568
|
this._onDidChangeHeight.fire();
|
|
684
569
|
}
|
|
685
|
-
async showCreatePreview(model) {
|
|
686
|
-
this._elements.previewCreateTitle.classList.remove('hidden');
|
|
687
|
-
this._elements.previewCreate.classList.remove('hidden');
|
|
688
|
-
const ref = await this._textModelResolverService.createModelReference(model.resource);
|
|
689
|
-
this._previewCreateDispoable.value = ref;
|
|
690
|
-
this._previewCreateTitle.element.setFile(model.resource, { fileKind: FileKind.FILE });
|
|
691
|
-
this._previewCreateEditor.value.setModel(ref.object.textEditorModel);
|
|
692
|
-
this._onDidChangeHeight.fire();
|
|
693
|
-
}
|
|
694
|
-
hideCreatePreview() {
|
|
695
|
-
this._elements.previewCreateTitle.classList.add('hidden');
|
|
696
|
-
this._elements.previewCreate.classList.add('hidden');
|
|
697
|
-
this._previewCreateEditor.rawValue?.setModel(null);
|
|
698
|
-
this._previewCreateDispoable.clear();
|
|
699
|
-
this._previewCreateTitle.element.clear();
|
|
700
|
-
this._onDidChangeHeight.fire();
|
|
701
|
-
}
|
|
702
570
|
showsAnyPreview() {
|
|
703
|
-
return !this._elements.previewDiff.classList.contains('hidden')
|
|
704
|
-
!this._elements.previewCreate.classList.contains('hidden');
|
|
705
|
-
}
|
|
706
|
-
updateSlashCommands(commands) {
|
|
707
|
-
this._slashCommands.clear();
|
|
708
|
-
if (commands.length === 0) {
|
|
709
|
-
return;
|
|
710
|
-
}
|
|
711
|
-
this._slashCommandDetails = ( commands.filter(c => c.command && c.detail).map(c => { return { command: c.command, detail: c.detail }; }));
|
|
712
|
-
const selector = { scheme: this._inputModel.uri.scheme, pattern: this._inputModel.uri.path, language: this._inputModel.getLanguageId() };
|
|
713
|
-
this._slashCommands.add(this._languageFeaturesService.completionProvider.register(selector, new (class {
|
|
714
|
-
constructor() {
|
|
715
|
-
this._debugDisplayName = 'InlineChatSlashCommandProvider';
|
|
716
|
-
this.triggerCharacters = ['/'];
|
|
717
|
-
}
|
|
718
|
-
provideCompletionItems(_model, position) {
|
|
719
|
-
if (position.lineNumber !== 1 && position.column !== 1) {
|
|
720
|
-
return undefined;
|
|
721
|
-
}
|
|
722
|
-
const suggestions = ( commands.map(command => {
|
|
723
|
-
const withSlash = `/${command.command}`;
|
|
724
|
-
return {
|
|
725
|
-
label: { label: withSlash, description: command.detail },
|
|
726
|
-
insertText: `${withSlash} $0`,
|
|
727
|
-
insertTextRules: 4 ,
|
|
728
|
-
kind: 18 ,
|
|
729
|
-
range: ( new Range(1, 1, 1, 1)),
|
|
730
|
-
command: command.executeImmediately ? { id: 'inlineChat.accept', title: withSlash } : undefined
|
|
731
|
-
};
|
|
732
|
-
}));
|
|
733
|
-
return { suggestions };
|
|
734
|
-
}
|
|
735
|
-
})));
|
|
736
|
-
const decorations = this._inputEditor.createDecorationsCollection();
|
|
737
|
-
const updateSlashDecorations = () => {
|
|
738
|
-
this._slashCommandContentWidget.hide();
|
|
739
|
-
this._elements.detectedIntent.classList.toggle('hidden', true);
|
|
740
|
-
const newDecorations = [];
|
|
741
|
-
for (const command of commands) {
|
|
742
|
-
const withSlash = `/${command.command}`;
|
|
743
|
-
const firstLine = this._inputModel.getLineContent(1);
|
|
744
|
-
if (firstLine.startsWith(withSlash)) {
|
|
745
|
-
newDecorations.push({
|
|
746
|
-
range: ( new Range(1, 1, 1, withSlash.length + 1)),
|
|
747
|
-
options: {
|
|
748
|
-
description: 'inline-chat-slash-command',
|
|
749
|
-
inlineClassName: 'inline-chat-slash-command',
|
|
750
|
-
after: {
|
|
751
|
-
content: ' '
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
});
|
|
755
|
-
this._slashCommandContentWidget.setCommandText(command.command);
|
|
756
|
-
this._slashCommandContentWidget.show();
|
|
757
|
-
if (firstLine === `/${command.command}`) {
|
|
758
|
-
newDecorations.push({
|
|
759
|
-
range: ( new Range(1, withSlash.length + 1, 1, withSlash.length + 2)),
|
|
760
|
-
options: {
|
|
761
|
-
description: 'inline-chat-slash-command-detail',
|
|
762
|
-
after: {
|
|
763
|
-
content: `${command.detail}`,
|
|
764
|
-
inlineClassName: 'inline-chat-slash-command-detail'
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
break;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
decorations.set(newDecorations);
|
|
773
|
-
};
|
|
774
|
-
this._slashCommands.add(this._inputEditor.onDidChangeModelContent(updateSlashDecorations));
|
|
775
|
-
updateSlashDecorations();
|
|
776
|
-
}
|
|
777
|
-
showAccessibleHunk(session, hunkData) {
|
|
778
|
-
this._elements.accessibleViewer.classList.remove('hidden');
|
|
779
|
-
this._accessibleViewer.clear();
|
|
780
|
-
this._accessibleViewer.value = this._instantiationService.createInstance(HunkAccessibleDiffViewer, this._elements.accessibleViewer, session, hunkData, ( new AccessibleHunk(this.parentEditor, session, hunkData)));
|
|
781
|
-
this._onDidChangeHeight.fire();
|
|
782
|
-
}
|
|
783
|
-
};
|
|
784
|
-
InlineChatWidget = InlineChatWidget_1 = ( __decorate([
|
|
785
|
-
( __param(2, IModelService)),
|
|
786
|
-
( __param(3, IContextKeyService)),
|
|
787
|
-
( __param(4, ILanguageFeaturesService)),
|
|
788
|
-
( __param(5, IKeybindingService)),
|
|
789
|
-
( __param(6, IInstantiationService)),
|
|
790
|
-
( __param(7, IAccessibilityService)),
|
|
791
|
-
( __param(8, IConfigurationService)),
|
|
792
|
-
( __param(9, IAccessibleViewService)),
|
|
793
|
-
( __param(10, ILogService)),
|
|
794
|
-
( __param(11, ITextModelService)),
|
|
795
|
-
( __param(12, IChatAgentService))
|
|
796
|
-
], InlineChatWidget));
|
|
797
|
-
let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
798
|
-
constructor(editor, _instaService, contextKeyService) {
|
|
799
|
-
super(editor, { showFrame: false, showArrow: false, isAccessible: true, className: 'inline-chat-widget', keepEditorSelection: true, showInHiddenAreas: true, ordinal: 10000 });
|
|
800
|
-
this._instaService = _instaService;
|
|
801
|
-
this._ctxVisible = CTX_INLINE_CHAT_VISIBLE.bindTo(contextKeyService);
|
|
802
|
-
this._ctxCursorPosition = CTX_INLINE_CHAT_OUTER_CURSOR_POSITION.bindTo(contextKeyService);
|
|
803
|
-
this._disposables.add(toDisposable(() => {
|
|
804
|
-
this._ctxVisible.reset();
|
|
805
|
-
this._ctxCursorPosition.reset();
|
|
806
|
-
}));
|
|
807
|
-
this.widget = this._instaService.createInstance(InlineChatWidget, this.editor, {
|
|
808
|
-
menuId: MENU_INLINE_CHAT_INPUT,
|
|
809
|
-
widgetMenuId: MENU_INLINE_CHAT_WIDGET,
|
|
810
|
-
statusMenuId: MENU_INLINE_CHAT_WIDGET_STATUS,
|
|
811
|
-
feedbackMenuId: MENU_INLINE_CHAT_WIDGET_FEEDBACK
|
|
812
|
-
});
|
|
813
|
-
this._disposables.add(this.widget.onDidChangeHeight(() => this._relayout()));
|
|
814
|
-
this._disposables.add(this.widget);
|
|
815
|
-
this.create();
|
|
816
|
-
this._disposables.add(addDisposableListener(this.domNode, 'click', e => {
|
|
817
|
-
if (!this.widget.hasFocus()) {
|
|
818
|
-
this.widget.focus();
|
|
819
|
-
}
|
|
820
|
-
}, true));
|
|
821
|
-
const updateCursorIsAboveContextKey = () => {
|
|
822
|
-
if (!this.position || !this.editor.hasModel()) {
|
|
823
|
-
this._ctxCursorPosition.reset();
|
|
824
|
-
}
|
|
825
|
-
else if (this.position.lineNumber === this.editor.getPosition().lineNumber) {
|
|
826
|
-
this._ctxCursorPosition.set('above');
|
|
827
|
-
}
|
|
828
|
-
else if (this.position.lineNumber + 1 === this.editor.getPosition().lineNumber) {
|
|
829
|
-
this._ctxCursorPosition.set('below');
|
|
830
|
-
}
|
|
831
|
-
else {
|
|
832
|
-
this._ctxCursorPosition.reset();
|
|
833
|
-
}
|
|
834
|
-
};
|
|
835
|
-
this._disposables.add(this.editor.onDidChangeCursorPosition(e => updateCursorIsAboveContextKey()));
|
|
836
|
-
this._disposables.add(this.editor.onDidFocusEditorText(e => updateCursorIsAboveContextKey()));
|
|
837
|
-
updateCursorIsAboveContextKey();
|
|
838
|
-
}
|
|
839
|
-
_fillContainer(container) {
|
|
840
|
-
container.appendChild(this.widget.domNode);
|
|
841
|
-
}
|
|
842
|
-
_doLayout(heightInPixel) {
|
|
843
|
-
const maxWidth = !this.widget.showsAnyPreview() ? 640 : Number.MAX_SAFE_INTEGER;
|
|
844
|
-
const width = Math.min(maxWidth, this._availableSpaceGivenIndentation(this._indentationWidth));
|
|
845
|
-
this._dimension = ( new Dimension(width, heightInPixel));
|
|
846
|
-
this.widget.domNode.style.width = `${width}px`;
|
|
847
|
-
this.widget.layout(this._dimension);
|
|
848
|
-
}
|
|
849
|
-
_availableSpaceGivenIndentation(indentationWidth) {
|
|
850
|
-
const info = this.editor.getLayoutInfo();
|
|
851
|
-
return info.contentWidth - (info.glyphMarginWidth + info.decorationsWidth + (indentationWidth ?? 0));
|
|
852
|
-
}
|
|
853
|
-
_computeHeightInLines() {
|
|
854
|
-
const lineHeight = this.editor.getOption(67 );
|
|
855
|
-
return this.widget.getHeight() / lineHeight;
|
|
856
|
-
}
|
|
857
|
-
_relayout() {
|
|
858
|
-
if (this._dimension) {
|
|
859
|
-
this._doLayout(this._dimension.height);
|
|
860
|
-
}
|
|
861
|
-
super._relayout(this._computeHeightInLines());
|
|
862
|
-
}
|
|
863
|
-
show(position) {
|
|
864
|
-
super.show(position, this._computeHeightInLines());
|
|
865
|
-
this.widget.focus();
|
|
866
|
-
this._ctxVisible.set(true);
|
|
867
|
-
}
|
|
868
|
-
_getWidth(info) {
|
|
869
|
-
return info.width - info.minimap.minimapWidth;
|
|
870
|
-
}
|
|
871
|
-
updateBackgroundColor(newPosition, wholeRange) {
|
|
872
|
-
assertType(this.container);
|
|
873
|
-
const widgetLineNumber = newPosition.lineNumber;
|
|
874
|
-
this.container.classList.toggle('inside-selection', widgetLineNumber > wholeRange.startLineNumber && widgetLineNumber < wholeRange.endLineNumber);
|
|
875
|
-
}
|
|
876
|
-
_calculateIndentationWidth(position) {
|
|
877
|
-
const viewModel = this.editor._getViewModel();
|
|
878
|
-
if (!viewModel) {
|
|
879
|
-
return 0;
|
|
880
|
-
}
|
|
881
|
-
const visibleRange = viewModel.getCompletelyVisibleViewRange();
|
|
882
|
-
const startLineVisibleRange = visibleRange.startLineNumber;
|
|
883
|
-
const positionLine = position.lineNumber;
|
|
884
|
-
let indentationLineNumber;
|
|
885
|
-
let indentationLevel;
|
|
886
|
-
for (let lineNumber = positionLine; lineNumber >= startLineVisibleRange; lineNumber--) {
|
|
887
|
-
const currentIndentationLevel = viewModel.getLineFirstNonWhitespaceColumn(lineNumber);
|
|
888
|
-
if (currentIndentationLevel !== 0) {
|
|
889
|
-
indentationLineNumber = lineNumber;
|
|
890
|
-
indentationLevel = currentIndentationLevel;
|
|
891
|
-
break;
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
return this.editor.getOffsetForColumn(indentationLineNumber ?? positionLine, indentationLevel ?? viewModel.getLineFirstNonWhitespaceColumn(positionLine));
|
|
895
|
-
}
|
|
896
|
-
setContainerMargins() {
|
|
897
|
-
assertType(this.container);
|
|
898
|
-
const info = this.editor.getLayoutInfo();
|
|
899
|
-
const marginWithoutIndentation = info.glyphMarginWidth + info.decorationsWidth + info.lineNumbersWidth;
|
|
900
|
-
this.container.style.marginLeft = `${marginWithoutIndentation}px`;
|
|
901
|
-
}
|
|
902
|
-
setWidgetMargins(position) {
|
|
903
|
-
const indentationWidth = this._calculateIndentationWidth(position);
|
|
904
|
-
if (this._indentationWidth === indentationWidth) {
|
|
905
|
-
return;
|
|
906
|
-
}
|
|
907
|
-
this._indentationWidth = this._availableSpaceGivenIndentation(indentationWidth) > 400 ? indentationWidth : 0;
|
|
908
|
-
this.widget.domNode.style.marginLeft = `${this._indentationWidth}px`;
|
|
909
|
-
this.widget.domNode.style.marginRight = `${this.editor.getLayoutInfo().minimap.minimapWidth}px`;
|
|
910
|
-
}
|
|
911
|
-
hide() {
|
|
912
|
-
this.container.classList.remove('inside-selection');
|
|
913
|
-
this._ctxVisible.reset();
|
|
914
|
-
this._ctxCursorPosition.reset();
|
|
915
|
-
this.widget.reset();
|
|
916
|
-
super.hide();
|
|
917
|
-
status(( localizeWithPath(
|
|
918
|
-
'vs/workbench/contrib/inlineChat/browser/inlineChatWidget',
|
|
919
|
-
'inlineChatClosed',
|
|
920
|
-
'Closed inline chat widget'
|
|
921
|
-
)));
|
|
571
|
+
return !this._elements.previewDiff.classList.contains('hidden');
|
|
922
572
|
}
|
|
923
573
|
};
|
|
924
|
-
|
|
925
|
-
( __param(
|
|
926
|
-
( __param(
|
|
927
|
-
|
|
574
|
+
EditorBasedInlineChatWidget = ( __decorate([
|
|
575
|
+
( __param(2, IContextKeyService)),
|
|
576
|
+
( __param(3, IKeybindingService)),
|
|
577
|
+
( __param(4, IInstantiationService)),
|
|
578
|
+
( __param(5, IAccessibilityService)),
|
|
579
|
+
( __param(6, IConfigurationService)),
|
|
580
|
+
( __param(7, IAccessibleViewService)),
|
|
581
|
+
( __param(8, ITextModelService)),
|
|
582
|
+
( __param(9, IChatService))
|
|
583
|
+
], EditorBasedInlineChatWidget));
|
|
928
584
|
let HunkAccessibleDiffViewer = HunkAccessibleDiffViewer_1 = class HunkAccessibleDiffViewer extends AccessibleDiffViewer {
|
|
929
585
|
set width(value) {
|
|
930
586
|
this._width2.set(value, undefined);
|
|
@@ -989,4 +645,4 @@ class AccessibleHunk {
|
|
|
989
645
|
return this._hunk.getRangesN()[0].getStartPosition();
|
|
990
646
|
}
|
|
991
647
|
}
|
|
992
|
-
export {
|
|
648
|
+
export { EditorBasedInlineChatWidget, InlineChatWidget };
|