@codingame/monaco-vscode-api 6.0.3 → 7.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/README.md +93 -73
- package/api.js +1 -1
- package/debugProtocol.d.ts +10 -1
- package/extensions.d.ts +2 -0
- package/missing-services.js +21 -2
- package/package.json +9 -9
- package/service-override/extensions.d.ts +1 -2
- package/services.js +4 -2
- package/vscode/src/vs/base/browser/dnd.js +1 -1
- package/vscode/src/vs/base/browser/dom.js +116 -5
- package/vscode/src/vs/base/browser/domObservable.js +16 -0
- package/vscode/src/vs/base/browser/markdownRenderer.js +5 -3
- package/vscode/src/vs/base/browser/trustedTypes.js +1 -2
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +1 -1
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +1 -1
- package/vscode/src/vs/base/browser/ui/button/button.js +2 -2
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -4
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +1 -1
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -1
- package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hover.d.ts +32 -16
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.d.ts +2 -2
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js +2 -2
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +2 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +1 -1
- package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/list/listView.js +3 -5
- package/vscode/src/vs/base/browser/ui/list/rowCache.js +1 -8
- package/vscode/src/vs/base/browser/ui/sash/sash.js +1 -1
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +7 -11
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +1 -1
- package/vscode/src/vs/base/browser/ui/splitview/splitview.js +1 -1
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +1 -1
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +1 -1
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +8 -1
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +2 -3
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +1 -1
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +0 -3
- package/vscode/src/vs/base/common/assert.js +1 -1
- package/vscode/src/vs/base/common/collections.js +49 -1
- package/vscode/src/vs/base/common/equals.js +55 -5
- package/vscode/src/vs/base/common/errors.js +14 -1
- package/vscode/src/vs/base/common/event.js +2 -1
- package/vscode/src/vs/base/common/history.js +7 -4
- package/vscode/src/vs/base/common/iterator.js +9 -1
- package/vscode/src/vs/base/common/map.d.ts +41 -0
- package/vscode/src/vs/base/common/numbers.js +18 -1
- package/vscode/src/vs/base/common/observableInternal/api.js +11 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.js +18 -1
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +8 -1
- package/vscode/src/vs/base/common/observableInternal/base.js +2 -5
- package/vscode/src/vs/base/common/observableInternal/derived.js +13 -3
- package/vscode/src/vs/base/common/observableInternal/lazyObservableValue.js +109 -0
- package/vscode/src/vs/base/common/observableInternal/promise.js +3 -0
- package/vscode/src/vs/base/common/observableInternal/utils.d.ts +7 -0
- package/vscode/src/vs/base/common/observableInternal/utils.js +64 -12
- package/vscode/src/vs/base/common/prefixTree.d.ts +52 -0
- package/vscode/src/vs/base/common/product.d.ts +1 -0
- package/vscode/src/vs/base/parts/ipc/common/ipc.js +1 -1
- package/vscode/src/vs/editor/browser/config/charWidthReader.js +1 -1
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +1 -1
- package/vscode/src/vs/editor/browser/coreCommands.js +2 -1
- package/vscode/src/vs/editor/browser/observableCodeEditor.js +230 -0
- package/vscode/src/vs/editor/browser/services/abstractCodeEditorService.js +1 -1
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +26 -26
- package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +2 -2
- package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
- package/vscode/src/vs/editor/browser/view/viewLayer.js +4 -12
- package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +15 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +8 -8
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +4 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +14 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +3 -3
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +2 -2
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/colors.js +1 -1
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +5 -0
- package/vscode/src/vs/editor/common/config/editorOptions.js +83 -65
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +43 -43
- package/vscode/src/vs/editor/common/cursor/cursor.js +3 -2
- package/vscode/src/vs/editor/common/cursor/cursorTypeEditOperations.js +911 -0
- package/vscode/src/vs/editor/common/cursor/cursorTypeOperations.js +36 -799
- package/vscode/src/vs/editor/common/cursor/cursorWordOperations.js +6 -5
- package/vscode/src/vs/editor/common/languageFeatureRegistry.d.ts +1 -0
- package/vscode/src/vs/editor/common/languageFeatureRegistry.js +3 -0
- package/vscode/src/vs/editor/common/languages/autoIndent.js +23 -1
- package/vscode/src/vs/editor/common/languages.d.ts +20 -3
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js +6 -6
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js +19 -0
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js +3 -0
- package/vscode/src/vs/editor/common/model/textModel.js +6 -2
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +5 -5
- package/vscode/src/vs/editor/common/model.d.ts +4 -0
- package/vscode/src/vs/editor/common/services/getIconClasses.js +1 -1
- package/vscode/src/vs/editor/common/services/semanticTokensProviderStyling.js +2 -15
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +63 -62
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +11 -8
- package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +2 -17
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +18 -5
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +55 -27
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +7 -4
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +103 -47
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +18 -10
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +2 -4
- package/vscode/src/vs/editor/contrib/folding/browser/folding.css.js +1 -1
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +33 -13
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +12 -7
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +161 -185
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +321 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverStatusBar.js +4 -1
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverTypes.js +6 -21
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +39 -40
- package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +55 -46
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +12 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverController.js +15 -9
- package/vscode/src/vs/editor/contrib/hover/browser/hoverTypes.js +11 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +141 -93
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +24 -7
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +36 -1
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +5 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +25 -12
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +88 -118
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +34 -33
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions.js +11 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +10 -19
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +45 -27
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +4 -4
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/commands.js +126 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/consts.js +9 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEdits.contribution.js +9 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsController.js +82 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsModel.js +240 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.js +322 -0
- package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgress.js +8 -4
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +3 -2
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +2 -2
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +60 -0
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.css.js +4 -0
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +38 -20
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +3 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetStatus.js +10 -32
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +23 -138
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +3 -0
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +5 -5
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +13 -12
- package/vscode/src/vs/editor/contrib/wordPartOperations/browser/wordPartOperations.js +3 -3
- package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +21 -0
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +5 -6
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +1 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +27 -6
- package/vscode/src/vs/platform/actions/browser/floatingMenu.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.css.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +33 -3
- package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -1
- package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -0
- package/vscode/src/vs/platform/actions/common/actions.js +3 -0
- package/vscode/src/vs/platform/actions/common/menuService.js +3 -2
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +1 -1
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.d.ts +7 -5
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +109 -13
- package/vscode/src/vs/platform/diagnostics/common/diagnostics.d.ts +2 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +12 -6
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.service.d.ts +3 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +20 -10
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +46 -8
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1 -1
- package/vscode/src/vs/platform/extensions/common/extensions.js +12 -3
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +368 -0
- package/vscode/src/vs/platform/files/common/watcher.js +21 -24
- package/vscode/src/vs/platform/list/browser/listService.js +2 -1
- package/vscode/src/vs/platform/observable/common/platformObservableUtils.js +2 -2
- package/vscode/src/vs/platform/opener/browser/link.js +1 -1
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +1 -1
- package/vscode/src/vs/platform/remote/common/remoteExtensionsScanner.service.d.ts +0 -2
- package/vscode/src/vs/platform/request/common/request.js +18 -8
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +2 -6
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.d.ts +8 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.d.ts +1 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.js +25 -5
- package/vscode/src/vs/platform/theme/common/colors/baseColors.js +1 -1
- package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +6 -6
- package/vscode/src/vs/platform/theme/common/colors/editorColors.js +35 -35
- package/vscode/src/vs/platform/theme/common/colors/inputColors.js +9 -9
- package/vscode/src/vs/platform/theme/common/colors/listColors.js +11 -11
- package/vscode/src/vs/platform/theme/common/colors/menuColors.js +4 -4
- package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +5 -5
- package/vscode/src/vs/platform/theme/common/colors/miscColors.js +1 -1
- package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +5 -5
- package/vscode/src/vs/platform/tunnel/common/tunnel.js +4 -1
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +75 -19
- package/vscode/src/vs/platform/window/common/window.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +32 -25
- package/vscode/src/vs/workbench/api/common/extHost.common.services.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +5 -11
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +5 -15
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +2 -5
- package/vscode/src/vs/workbench/api/common/extHostComments.js +9 -3
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +32 -22
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +109 -40
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +46 -0
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +84 -35
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +50 -41
- package/vscode/src/vs/workbench/api/common/extHostSearch.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSecrets.js +11 -8
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +7 -6
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +63 -70
- package/vscode/src/vs/workbench/api/common/extHostTextEditors.js +5 -3
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +75 -16
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +29 -4
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +127 -107
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +33 -21
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +5 -5
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +23 -6
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +3 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
- package/vscode/src/vs/workbench/browser/web.api.js +8 -0
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +199 -194
- package/vscode/src/vs/workbench/common/configuration.js +1 -1
- package/vscode/src/vs/workbench/common/contributions.js +8 -1
- package/vscode/src/vs/workbench/common/editor.js +5 -1
- package/vscode/src/vs/workbench/common/theme.js +79 -454
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +221 -239
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatConfirmationWidget.js → chatContentParts/chatConfirmationWidget.js} +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +131 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatWarningContentPart.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatContentParts/media}/chatConfirmationWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +91 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +292 -1019
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +22 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +61 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +23 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +43 -16
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +1 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +7 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +8 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +1 -1
- package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +14 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +8 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +19 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +13 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +19 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +9 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +10 -5
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +235 -173
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +2 -1
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +17 -5
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +62 -44
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +114 -107
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +33 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +71 -101
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +38 -43
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -33
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +3 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +49 -86
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +60 -71
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +116 -113
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +6 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +1 -0
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +12 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +7 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +88 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +1 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +39 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +12 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +40 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +27 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +14 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +43 -46
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +12 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +19 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +16 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +8 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +11 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +12 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +9 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +37 -36
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +18 -8
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +14 -5
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +17 -22
- package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +7 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +7 -27
- package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +3 -4
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +4 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +13 -37
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.d.ts +88 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +48 -31
- package/vscode/src/vs/workbench/contrib/testing/common/testId.d.ts +115 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.d.ts +226 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.d.ts +319 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +2 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +21 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +7 -8
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +3 -3
- package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +10 -5
- package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +54 -21
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +1 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -4
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +5 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensions.service.d.ts +3 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +59 -41
- package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +1 -1
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +3 -2
- package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/language/common/languageService.js +7 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +1 -1
- package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +2 -2
- package/vscode/src/vs/workbench/services/search/common/search.js +2 -1
- package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +2 -2
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +2 -2
- package/vscode/src/vs/workbench/services/textfile/common/encoding.js +69 -26
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +23 -4
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +5 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +12 -5
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +38 -19
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.service.d.ts +2 -1
- package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +0 -196
- package/vscode-dts/vscode.proposed.attributableCoverage.d.ts +28 -10
- package/vscode-dts/vscode.proposed.authGetSessions.d.ts +30 -22
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +17 -8
- package/vscode-dts/vscode.proposed.chatVariableResolver.d.ts +0 -9
- package/vscode-dts/vscode.proposed.commentReveal.d.ts +32 -0
- package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +10 -0
- package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +1 -1
- package/vscode-dts/vscode.proposed.fileComments.d.ts +12 -53
- package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +6 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +6 -0
- package/vscode-dts/vscode.proposed.lmTools.d.ts +91 -0
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +1 -1
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +10 -6
- package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +38 -13
- package/vscode/src/vs/editor/browser/observableUtilities.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProviderFactory.service.js +0 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +0 -122
|
@@ -22,7 +22,7 @@ import { localizeWithPath } from '../../../../nls.js';
|
|
|
22
22
|
import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.service.js';
|
|
23
23
|
import { MenuWorkbenchButtonBar } from '../../../../platform/actions/browser/buttonbar.js';
|
|
24
24
|
import { MenuWorkbenchToolBar, HiddenItemStrategy } from '../../../../platform/actions/browser/toolbar.js';
|
|
25
|
-
import { MenuId } from '../../../../platform/actions/common/actions.js';
|
|
25
|
+
import { MenuItemAction, MenuId } from '../../../../platform/actions/common/actions.js';
|
|
26
26
|
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
|
|
27
27
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
28
28
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
@@ -30,7 +30,7 @@ import { IKeybindingService } from '../../../../platform/keybinding/common/keybi
|
|
|
30
30
|
import { asCssVariableName, asCssVariable } from '../../../../platform/theme/common/colorUtils.js';
|
|
31
31
|
import '../../../../platform/theme/common/colors/baseColors.js';
|
|
32
32
|
import '../../../../platform/theme/common/colors/chartsColors.js';
|
|
33
|
-
import {
|
|
33
|
+
import { editorBackground } from '../../../../platform/theme/common/colors/editorColors.js';
|
|
34
34
|
import { inputBackground } from '../../../../platform/theme/common/colors/inputColors.js';
|
|
35
35
|
import '../../../../platform/theme/common/colors/listColors.js';
|
|
36
36
|
import '../../../../platform/theme/common/colors/menuColors.js';
|
|
@@ -42,8 +42,8 @@ import { AccessibilityVerbositySettingId } from '../../accessibility/browser/acc
|
|
|
42
42
|
import { IAccessibleViewService } from '../../../../platform/accessibility/browser/accessibleView.service.js';
|
|
43
43
|
import { AccessibilityCommandId } from '../../accessibility/common/accessibilityCommands.js';
|
|
44
44
|
import { ChatModel } from '../../chat/common/chatModel.js';
|
|
45
|
-
import { isWelcomeVM,
|
|
46
|
-
import { inlineChatBackground, CTX_INLINE_CHAT_RESPONSE_FOCUSED, CTX_INLINE_CHAT_FOCUSED } from '../common/inlineChat.js';
|
|
45
|
+
import { isWelcomeVM, isResponseVM } from '../../chat/common/chatViewModel.js';
|
|
46
|
+
import { inlineChatForeground, inlineChatBackground, CTX_INLINE_CHAT_RESPONSE_FOCUSED, CTX_INLINE_CHAT_FOCUSED, InlineChatConfigKeys } from '../common/inlineChat.js';
|
|
47
47
|
import { ChatWidget } from '../../chat/browser/chatWidget.js';
|
|
48
48
|
import { chatRequestBackground } from '../../chat/common/chatColors.js';
|
|
49
49
|
import { Selection } from '../../../../editor/common/core/selection.js';
|
|
@@ -52,6 +52,7 @@ import { IChatService } from '../../chat/common/chatService.service.js';
|
|
|
52
52
|
import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
53
53
|
import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js';
|
|
54
54
|
import { IHoverService } from '../../../../platform/hover/browser/hover.service.js';
|
|
55
|
+
import { TextOnlyMenuEntryActionViewItem } from '../../../../platform/actions/browser/menuEntryActionViewItem.js';
|
|
55
56
|
var HunkAccessibleDiffViewer_1;
|
|
56
57
|
const _moduleId = "vs/workbench/contrib/inlineChat/browser/inlineChatWidget";
|
|
57
58
|
let InlineChatWidget = class InlineChatWidget {
|
|
@@ -68,14 +69,13 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
68
69
|
this._elements = h('div.inline-chat@root', [
|
|
69
70
|
h('div.chat-widget@chatWidget'),
|
|
70
71
|
h('div.progress@progress'),
|
|
71
|
-
h('div.followUps.hidden@followUps'),
|
|
72
72
|
h('div.previewDiff.hidden@previewDiff'),
|
|
73
73
|
h('div.accessibleViewer@accessibleViewer'),
|
|
74
74
|
h('div.status@status', [
|
|
75
75
|
h('div.label.info.hidden@infoLabel'),
|
|
76
|
-
h('div.actions.hidden@
|
|
76
|
+
h('div.actions.text-style.hidden@toolbar1'),
|
|
77
|
+
h('div.actions.button-style.hidden@toolbar2'),
|
|
77
78
|
h('div.label.status.hidden@statusLabel'),
|
|
78
|
-
h('div.actions.hidden@feedbackToolbar'),
|
|
79
79
|
]),
|
|
80
80
|
]);
|
|
81
81
|
this._store = ( (new DisposableStore()));
|
|
@@ -86,7 +86,6 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
86
86
|
this._isLayouting = false;
|
|
87
87
|
this._progressBar = ( (new ProgressBar(this._elements.progress)));
|
|
88
88
|
this._store.add(this._progressBar);
|
|
89
|
-
let allowRequests = false;
|
|
90
89
|
this.scopedContextKeyService = this._store.add(_contextKeyService.createScoped(this._elements.chatWidget));
|
|
91
90
|
const scopedInstaService = _instantiationService.createChild(( (new ServiceCollection([
|
|
92
91
|
IContextKeyService,
|
|
@@ -94,28 +93,14 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
94
93
|
]))), this._store);
|
|
95
94
|
this._chatWidget = scopedInstaService.createInstance(ChatWidget, location, { resource: true }, {
|
|
96
95
|
defaultElementHeight: 32,
|
|
97
|
-
renderStyle: '
|
|
98
|
-
renderInputOnTop:
|
|
96
|
+
renderStyle: 'minimal',
|
|
97
|
+
renderInputOnTop: false,
|
|
99
98
|
renderFollowups: true,
|
|
100
99
|
supportsFileReferences: true,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
menus: {
|
|
104
|
-
executeToolbar: options.inputMenuId,
|
|
105
|
-
inputSideToolbar: options.widgetMenuId,
|
|
106
|
-
telemetrySource: options.telemetrySource
|
|
107
|
-
},
|
|
108
|
-
filter: item => {
|
|
109
|
-
if (isWelcomeVM(item)) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
if (isRequestVM(item)) {
|
|
113
|
-
return allowRequests;
|
|
114
|
-
}
|
|
115
|
-
return true;
|
|
116
|
-
},
|
|
100
|
+
filter: item => !isWelcomeVM(item),
|
|
101
|
+
...options.chatWidgetViewOptions
|
|
117
102
|
}, {
|
|
118
|
-
listForeground:
|
|
103
|
+
listForeground: inlineChatForeground,
|
|
119
104
|
listBackground: inlineChatBackground,
|
|
120
105
|
inputEditorBackground: inputBackground,
|
|
121
106
|
resultEditorBackground: editorBackground
|
|
@@ -124,31 +109,6 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
124
109
|
this._elements.chatWidget.style.setProperty(asCssVariableName(chatRequestBackground), asCssVariable(inlineChatBackground));
|
|
125
110
|
this._chatWidget.setVisible(true);
|
|
126
111
|
this._store.add(this._chatWidget);
|
|
127
|
-
const viewModelListener = this._store.add(( (new MutableDisposable())));
|
|
128
|
-
this._store.add(this._chatWidget.onDidChangeViewModel(() => {
|
|
129
|
-
const model = this._chatWidget.viewModel;
|
|
130
|
-
if (!model) {
|
|
131
|
-
allowRequests = false;
|
|
132
|
-
viewModelListener.clear();
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
const updateAllowRequestsFilter = () => {
|
|
136
|
-
let requestCount = 0;
|
|
137
|
-
for (const item of model.getItems()) {
|
|
138
|
-
if (isRequestVM(item)) {
|
|
139
|
-
if (++requestCount >= 2) {
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
const newAllowRequest = requestCount >= 2;
|
|
145
|
-
if (newAllowRequest !== allowRequests) {
|
|
146
|
-
allowRequests = newAllowRequest;
|
|
147
|
-
this._chatWidget.refilter();
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
viewModelListener.value = model.onDidChange(updateAllowRequestsFilter);
|
|
151
|
-
}));
|
|
152
112
|
const viewModelStore = this._store.add(( (new DisposableStore())));
|
|
153
113
|
this._store.add(this._chatWidget.onDidChangeViewModel(() => {
|
|
154
114
|
viewModelStore.clear();
|
|
@@ -169,32 +129,38 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
169
129
|
this._store.add(this._chatWidget.inputEditor.onDidFocusEditorWidget(() => this._ctxInputEditorFocused.set(true)));
|
|
170
130
|
this._store.add(this._chatWidget.inputEditor.onDidBlurEditorWidget(() => this._ctxInputEditorFocused.set(false)));
|
|
171
131
|
const statusMenuId = options.statusMenuId instanceof MenuId ? options.statusMenuId : options.statusMenuId.menu;
|
|
132
|
+
const statusToolbarMenu = scopedInstaService.createInstance(MenuWorkbenchToolBar, this._elements.toolbar1, statusMenuId, {
|
|
133
|
+
hiddenItemStrategy: HiddenItemStrategy.NoHide,
|
|
134
|
+
telemetrySource: options.chatWidgetViewOptions?.menus?.telemetrySource,
|
|
135
|
+
actionViewItemProvider: action => action instanceof MenuItemAction ? this._instantiationService.createInstance(TextOnlyMenuEntryActionViewItem, action, { conversational: true }) : undefined,
|
|
136
|
+
toolbarOptions: { primaryGroup: '0_main' },
|
|
137
|
+
menuOptions: { renderShortTitle: true },
|
|
138
|
+
label: true,
|
|
139
|
+
icon: false
|
|
140
|
+
});
|
|
141
|
+
this._store.add(statusToolbarMenu.onDidChangeMenuItems(() => this._onDidChangeHeight.fire()));
|
|
142
|
+
this._store.add(statusToolbarMenu);
|
|
172
143
|
const statusMenuOptions = options.statusMenuId instanceof MenuId ? undefined : options.statusMenuId.options;
|
|
173
|
-
const statusButtonBar =
|
|
144
|
+
const statusButtonBar = scopedInstaService.createInstance(MenuWorkbenchButtonBar, this._elements.toolbar2, statusMenuId, {
|
|
145
|
+
toolbarOptions: { primaryGroup: '0_main' },
|
|
146
|
+
telemetrySource: options.chatWidgetViewOptions?.menus?.telemetrySource,
|
|
147
|
+
menuOptions: { renderShortTitle: true },
|
|
148
|
+
...statusMenuOptions,
|
|
149
|
+
});
|
|
174
150
|
this._store.add(statusButtonBar.onDidChange(() => this._onDidChangeHeight.fire()));
|
|
175
151
|
this._store.add(statusButtonBar);
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
primaryGroup: () => true,
|
|
180
|
-
useSeparatorsInPrimaryActions: true
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
if (options.feedbackMenuId) {
|
|
184
|
-
const feedbackToolbar = this._instantiationService.createInstance(MenuWorkbenchToolBar, this._elements.feedbackToolbar, options.feedbackMenuId, { ...workbenchToolbarOptions, hiddenItemStrategy: HiddenItemStrategy.Ignore });
|
|
185
|
-
this._store.add(feedbackToolbar.onDidChangeMenuItems(() => this._onDidChangeHeight.fire()));
|
|
186
|
-
this._store.add(feedbackToolbar);
|
|
187
|
-
}
|
|
152
|
+
const toggleToolbar = () => this._elements.status.classList.toggle('text', this._configurationService.getValue(InlineChatConfigKeys.ExpTextButtons));
|
|
153
|
+
this._store.add(this._configurationService.onDidChangeConfiguration(e => e.affectsConfiguration(InlineChatConfigKeys.ExpTextButtons) && toggleToolbar()));
|
|
154
|
+
toggleToolbar();
|
|
188
155
|
this._store.add(this._configurationService.onDidChangeConfiguration(e => {
|
|
189
156
|
if (e.affectsConfiguration(AccessibilityVerbositySettingId.InlineChat)) {
|
|
190
157
|
this._updateAriaLabel();
|
|
191
158
|
}
|
|
192
159
|
}));
|
|
193
160
|
this._elements.root.tabIndex = 0;
|
|
194
|
-
this._elements.followUps.tabIndex = 0;
|
|
195
161
|
this._elements.statusLabel.tabIndex = 0;
|
|
196
162
|
this._updateAriaLabel();
|
|
197
|
-
this._store.add(this._hoverService.
|
|
163
|
+
this._store.add(this._hoverService.setupManagedHover(getDefaultHoverDelegate('element'), this._elements.statusLabel, () => {
|
|
198
164
|
return this._elements.statusLabel.dataset['title'];
|
|
199
165
|
}));
|
|
200
166
|
this._store.add(this._chatService.onDidPerformUserAction(e => {
|
|
@@ -253,22 +219,20 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
253
219
|
_doLayout(dimension) {
|
|
254
220
|
const extraHeight = this._getExtraHeight();
|
|
255
221
|
const progressHeight = getTotalHeight(this._elements.progress);
|
|
256
|
-
const followUpsHeight = getTotalHeight(this._elements.followUps);
|
|
257
222
|
const statusHeight = getTotalHeight(this._elements.status);
|
|
258
223
|
this._elements.root.style.height = `${dimension.height - extraHeight}px`;
|
|
259
224
|
this._elements.root.style.width = `${dimension.width}px`;
|
|
260
225
|
this._elements.progress.style.width = `${dimension.width}px`;
|
|
261
|
-
this._chatWidget.layout(dimension.height - progressHeight -
|
|
226
|
+
this._chatWidget.layout(dimension.height - progressHeight - statusHeight - extraHeight, dimension.width);
|
|
262
227
|
}
|
|
263
228
|
get contentHeight() {
|
|
264
229
|
const data = {
|
|
265
|
-
followUpsHeight: getTotalHeight(this._elements.followUps),
|
|
266
230
|
chatWidgetContentHeight: this._chatWidget.contentHeight,
|
|
267
231
|
progressHeight: getTotalHeight(this._elements.progress),
|
|
268
232
|
statusHeight: getTotalHeight(this._elements.status),
|
|
269
233
|
extraHeight: this._getExtraHeight()
|
|
270
234
|
};
|
|
271
|
-
const result = data.progressHeight + data.chatWidgetContentHeight + data.
|
|
235
|
+
const result = data.progressHeight + data.chatWidgetContentHeight + data.statusHeight + data.extraHeight;
|
|
272
236
|
return result;
|
|
273
237
|
}
|
|
274
238
|
get minHeight() {
|
|
@@ -285,7 +249,7 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
285
249
|
return value;
|
|
286
250
|
}
|
|
287
251
|
_getExtraHeight() {
|
|
288
|
-
return
|
|
252
|
+
return 4 + 2 + 4 ;
|
|
289
253
|
}
|
|
290
254
|
updateProgress(show) {
|
|
291
255
|
if (show) {
|
|
@@ -317,8 +281,9 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
317
281
|
this._chatWidget.setInputPlaceholder(value);
|
|
318
282
|
}
|
|
319
283
|
updateToolbar(show) {
|
|
320
|
-
this._elements.
|
|
321
|
-
this._elements.
|
|
284
|
+
this._elements.root.classList.toggle('toolbar', show);
|
|
285
|
+
this._elements.toolbar1.classList.toggle('hidden', !show);
|
|
286
|
+
this._elements.toolbar2.classList.toggle('hidden', !show);
|
|
322
287
|
this._elements.status.classList.toggle('actions', show);
|
|
323
288
|
this._elements.infoLabel.classList.toggle('hidden', show);
|
|
324
289
|
this._onDidChangeHeight.fire();
|
|
@@ -328,12 +293,12 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
328
293
|
if (!viewModel) {
|
|
329
294
|
return undefined;
|
|
330
295
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}
|
|
296
|
+
const items = viewModel.getItems().filter(i => isResponseVM(i));
|
|
297
|
+
if (!items.length) {
|
|
298
|
+
return;
|
|
335
299
|
}
|
|
336
|
-
|
|
300
|
+
const item = items[items.length - 1];
|
|
301
|
+
return viewModel.codeBlockModelCollection.get(viewModel.sessionId, item, codeBlockIndex)?.model;
|
|
337
302
|
}
|
|
338
303
|
get responseContent() {
|
|
339
304
|
const requests = this._chatWidget.viewModel?.model.getRequests();
|
|
@@ -342,9 +307,6 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
342
307
|
}
|
|
343
308
|
return tail(requests)?.response?.response.asString();
|
|
344
309
|
}
|
|
345
|
-
get usesDefaultChatModel() {
|
|
346
|
-
return this.getChatModel() === this._defaultChatModel;
|
|
347
|
-
}
|
|
348
310
|
getChatModel() {
|
|
349
311
|
return this._chatWidget.viewModel?.model ?? this._defaultChatModel;
|
|
350
312
|
}
|
|
@@ -353,7 +315,7 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
353
315
|
}
|
|
354
316
|
addToHistory(input) {
|
|
355
317
|
if (this._chatWidget.viewModel?.model === this._defaultChatModel) {
|
|
356
|
-
this._chatWidget.input.acceptInput(
|
|
318
|
+
this._chatWidget.input.acceptInput(true);
|
|
357
319
|
}
|
|
358
320
|
}
|
|
359
321
|
updateChatMessage(message, isIncomplete, isCodeBlockEditable) {
|
|
@@ -426,9 +388,10 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
426
388
|
this.updateChatMessage(undefined);
|
|
427
389
|
reset(this._elements.statusLabel);
|
|
428
390
|
this._elements.statusLabel.classList.toggle('hidden', true);
|
|
429
|
-
this._elements.
|
|
430
|
-
this._elements.
|
|
391
|
+
this._elements.toolbar1.classList.add('hidden');
|
|
392
|
+
this._elements.toolbar2.classList.add('hidden');
|
|
431
393
|
this.updateInfo('');
|
|
394
|
+
this.chatWidget.setModel(this._defaultChatModel, {});
|
|
432
395
|
this._elements.accessibleViewer.classList.toggle('hidden', true);
|
|
433
396
|
this._onDidChangeHeight.fire();
|
|
434
397
|
}
|
|
@@ -453,7 +416,7 @@ InlineChatWidget = ( (__decorate([
|
|
|
453
416
|
const defaultAriaLabel = ( localizeWithPath(_moduleId, 2, "Inline Chat Input"));
|
|
454
417
|
let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends InlineChatWidget {
|
|
455
418
|
constructor(location, _parentEditor, options, contextKeyService, keybindingService, instantiationService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService, hoverService) {
|
|
456
|
-
super(location, { ...options, editorOverflowWidgetsDomNode: _parentEditor.getOverflowWidgetsDomNode() }, instantiationService, contextKeyService, keybindingService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService, hoverService);
|
|
419
|
+
super(location, { ...options, chatWidgetViewOptions: { ...options.chatWidgetViewOptions, editorOverflowWidgetsDomNode: _parentEditor.getOverflowWidgetsDomNode() } }, instantiationService, contextKeyService, keybindingService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService, hoverService);
|
|
457
420
|
this._parentEditor = _parentEditor;
|
|
458
421
|
this._accessibleViewer = this._store.add(( (new MutableDisposable())));
|
|
459
422
|
}
|
|
@@ -4,31 +4,28 @@ import { status } from '../../../../base/browser/ui/aria/aria.js';
|
|
|
4
4
|
import { toDisposable } from '../../../../base/common/lifecycle.js';
|
|
5
5
|
import { assertType } from '../../../../base/common/types.js';
|
|
6
6
|
import { EditorOption } from '../../../../editor/common/config/editorOptions.js';
|
|
7
|
-
import { Range } from '../../../../editor/common/core/range.js';
|
|
8
7
|
import { ZoneWidget } from '../../../../editor/contrib/zoneWidget/browser/zoneWidget.js';
|
|
9
8
|
import { localizeWithPath } from '../../../../nls.js';
|
|
10
9
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
11
10
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
12
|
-
import { CTX_INLINE_CHAT_OUTER_CURSOR_POSITION,
|
|
11
|
+
import { CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, MENU_INLINE_CHAT_WIDGET_STATUS, ACTION_REGENERATE_RESPONSE, ACTION_TOGGLE_DIFF, ACTION_ACCEPT_CHANGES, MENU_INLINE_CHAT_EXECUTE, InlineChatConfigKeys, EditMode } from '../common/inlineChat.js';
|
|
13
12
|
import { EditorBasedInlineChatWidget } from './inlineChatWidget.js';
|
|
14
|
-
import { MenuId } from '../../../../platform/actions/common/actions.js';
|
|
15
13
|
import { isEqual } from '../../../../base/common/resources.js';
|
|
16
14
|
import { StableEditorBottomScrollState } from '../../../../editor/browser/stableEditorScroll.js';
|
|
17
15
|
import { ScrollType } from '../../../../editor/common/editorCommon.js';
|
|
18
16
|
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
|
|
17
|
+
import { ILogService } from '../../../../platform/log/common/log.service.js';
|
|
19
18
|
const _moduleId = "vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget";
|
|
20
19
|
let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
21
|
-
constructor(location, editor, _instaService, contextKeyService, configurationService) {
|
|
20
|
+
constructor(location, editor, _instaService, _logService, contextKeyService, configurationService) {
|
|
22
21
|
super(editor, { showFrame: false, showArrow: false, isAccessible: true, className: 'inline-chat-widget', keepEditorSelection: true, showInHiddenAreas: true, ordinal: 10000 });
|
|
23
22
|
this._instaService = _instaService;
|
|
23
|
+
this._logService = _logService;
|
|
24
24
|
this._ctxCursorPosition = CTX_INLINE_CHAT_OUTER_CURSOR_POSITION.bindTo(contextKeyService);
|
|
25
25
|
this._disposables.add(toDisposable(() => {
|
|
26
26
|
this._ctxCursorPosition.reset();
|
|
27
27
|
}));
|
|
28
28
|
this.widget = this._instaService.createInstance(EditorBasedInlineChatWidget, location, this.editor, {
|
|
29
|
-
telemetrySource: 'interactiveEditorWidget-toolbar',
|
|
30
|
-
inputMenuId: MenuId.ChatExecute,
|
|
31
|
-
widgetMenuId: MENU_INLINE_CHAT_WIDGET,
|
|
32
29
|
statusMenuId: {
|
|
33
30
|
menu: MENU_INLINE_CHAT_WIDGET_STATUS,
|
|
34
31
|
options: {
|
|
@@ -45,19 +42,36 @@ let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
|
45
42
|
}
|
|
46
43
|
}
|
|
47
44
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
chatWidgetViewOptions: {
|
|
46
|
+
menus: {
|
|
47
|
+
executeToolbar: MENU_INLINE_CHAT_EXECUTE,
|
|
48
|
+
telemetrySource: 'interactiveEditorWidget-toolbar',
|
|
52
49
|
},
|
|
50
|
+
rendererOptions: {
|
|
51
|
+
renderTextEditsAsSummary: (uri) => {
|
|
52
|
+
return isEqual(uri, editor.getModel()?.uri)
|
|
53
|
+
&& configurationService.getValue(InlineChatConfigKeys.Mode) === EditMode.Live;
|
|
54
|
+
},
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
57
|
});
|
|
58
|
+
this._disposables.add(this.widget);
|
|
59
|
+
let scrollState;
|
|
60
|
+
this._disposables.add(this.widget.chatWidget.onWillMaybeChangeHeight(() => {
|
|
61
|
+
if (this.position) {
|
|
62
|
+
scrollState = StableEditorBottomScrollState.capture(this.editor);
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
55
65
|
this._disposables.add(this.widget.onDidChangeHeight(() => {
|
|
56
66
|
if (this.position) {
|
|
57
|
-
|
|
67
|
+
scrollState ??= StableEditorBottomScrollState.capture(this.editor);
|
|
68
|
+
const height = this._computeHeight();
|
|
69
|
+
this._relayout(height.linesValue);
|
|
70
|
+
scrollState.restore(this.editor);
|
|
71
|
+
scrollState = undefined;
|
|
72
|
+
this._revealTopOfZoneWidget(this.position, height);
|
|
58
73
|
}
|
|
59
74
|
}));
|
|
60
|
-
this._disposables.add(this.widget);
|
|
61
75
|
this.create();
|
|
62
76
|
this._disposables.add(addDisposableListener(this.domNode, 'click', e => {
|
|
63
77
|
if (!this.editor.hasWidgetFocus() && !this.widget.hasFocus()) {
|
|
@@ -86,14 +100,12 @@ let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
|
86
100
|
container.appendChild(this.widget.domNode);
|
|
87
101
|
}
|
|
88
102
|
_doLayout(heightInPixel) {
|
|
89
|
-
const
|
|
103
|
+
const info = this.editor.getLayoutInfo();
|
|
104
|
+
let width = info.contentWidth - (info.glyphMarginWidth + info.decorationsWidth);
|
|
105
|
+
width = Math.min(640, width);
|
|
90
106
|
this._dimension = ( (new Dimension(width, heightInPixel)));
|
|
91
107
|
this.widget.layout(this._dimension);
|
|
92
108
|
}
|
|
93
|
-
_availableSpaceGivenIndentation(indentationWidth) {
|
|
94
|
-
const info = this.editor.getLayoutInfo();
|
|
95
|
-
return info.contentWidth - (info.glyphMarginWidth + info.decorationsWidth + (indentationWidth ?? 0));
|
|
96
|
-
}
|
|
97
109
|
_computeHeight() {
|
|
98
110
|
const chatContentHeight = this.widget.contentHeight;
|
|
99
111
|
const editorHeight = this.editor.getLayoutInfo().height;
|
|
@@ -114,78 +126,55 @@ let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
|
114
126
|
this.container.style.marginLeft = `${marginWithoutIndentation}px`;
|
|
115
127
|
const height = this._computeHeight();
|
|
116
128
|
super.show(position, height.linesValue);
|
|
117
|
-
this._setWidgetMargins(position);
|
|
118
129
|
this.widget.chatWidget.setVisible(true);
|
|
119
130
|
this.widget.focus();
|
|
120
131
|
scrollState.restore(this.editor);
|
|
121
|
-
|
|
122
|
-
this.editor.revealRangeNearTopIfOutsideViewport(Range.fromPositions(position.delta(-1)), ScrollType.Immediate);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
const lineTop = this.editor.getTopForLineNumber(position.lineNumber);
|
|
126
|
-
const zoneTop = lineTop - height.pixelsValue;
|
|
127
|
-
const spaceBelowLine = this.editor.getScrollHeight() - this.editor.getBottomForLineNumber(position.lineNumber);
|
|
128
|
-
const minTop = this.editor.getScrollTop() - spaceBelowLine;
|
|
129
|
-
const newTop = Math.max(zoneTop, minTop);
|
|
130
|
-
if (newTop < this.editor.getScrollTop()) {
|
|
131
|
-
this.editor.setScrollTop(newTop, ScrollType.Immediate);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
132
|
+
this._revealTopOfZoneWidget(position, height);
|
|
134
133
|
}
|
|
135
134
|
updatePositionAndHeight(position) {
|
|
136
|
-
|
|
137
|
-
this.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
updateBackgroundColor(newPosition, wholeRange) {
|
|
143
|
-
assertType(this.container);
|
|
144
|
-
const widgetLineNumber = newPosition.lineNumber;
|
|
145
|
-
this.container.classList.toggle('inside-selection', widgetLineNumber > wholeRange.startLineNumber && widgetLineNumber < wholeRange.endLineNumber);
|
|
135
|
+
const scrollState = StableEditorBottomScrollState.capture(this.editor);
|
|
136
|
+
const height = this._computeHeight();
|
|
137
|
+
super.updatePositionAndHeight(position, height.linesValue);
|
|
138
|
+
scrollState.restore(this.editor);
|
|
139
|
+
this._revealTopOfZoneWidget(position, height);
|
|
146
140
|
}
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
141
|
+
_revealTopOfZoneWidget(position, height) {
|
|
142
|
+
const lineNumber = position.lineNumber <= 1 ? 1 : 1 + position.lineNumber;
|
|
143
|
+
const scrollTop = this.editor.getScrollTop();
|
|
144
|
+
const lineTop = this.editor.getTopForLineNumber(lineNumber);
|
|
145
|
+
const zoneTop = lineTop - height.pixelsValue;
|
|
146
|
+
const editorHeight = this.editor.getLayoutInfo().height;
|
|
147
|
+
const lineBottom = this.editor.getBottomForLineNumber(lineNumber);
|
|
148
|
+
let newScrollTop = zoneTop;
|
|
149
|
+
let forceScrollTop = false;
|
|
150
|
+
if (lineBottom >= (scrollTop + editorHeight)) {
|
|
151
|
+
newScrollTop = lineBottom - editorHeight;
|
|
152
|
+
forceScrollTop = true;
|
|
155
153
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const currentIndentationLevel = viewModel.getLineFirstNonWhitespaceColumn(lineNumber);
|
|
160
|
-
if (currentIndentationLevel !== 0) {
|
|
161
|
-
indentationLineNumber = lineNumber;
|
|
162
|
-
indentationLevel = currentIndentationLevel;
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
154
|
+
if (newScrollTop < scrollTop || forceScrollTop) {
|
|
155
|
+
this._logService.trace('[IE] REVEAL zone', { zoneTop, lineTop, lineBottom, scrollTop, newScrollTop, forceScrollTop });
|
|
156
|
+
this.editor.setScrollTop(newScrollTop, ScrollType.Immediate);
|
|
165
157
|
}
|
|
166
|
-
return Math.max(0, this.editor.getOffsetForColumn(indentationLineNumber, indentationLevel));
|
|
167
158
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
this._indentationWidth = this._availableSpaceGivenIndentation(indentationWidth) > 400 ? indentationWidth : 0;
|
|
174
|
-
this.widget.domNode.style.marginLeft = `${this._indentationWidth}px`;
|
|
175
|
-
this.widget.domNode.style.marginRight = `${this.editor.getLayoutInfo().minimap.minimapWidth}px`;
|
|
159
|
+
revealRange(range, isLastLine) {
|
|
160
|
+
}
|
|
161
|
+
_getWidth(info) {
|
|
162
|
+
return info.width - info.minimap.minimapWidth;
|
|
176
163
|
}
|
|
177
164
|
hide() {
|
|
178
|
-
this.
|
|
165
|
+
const scrollState = StableEditorBottomScrollState.capture(this.editor);
|
|
179
166
|
this._ctxCursorPosition.reset();
|
|
180
167
|
this.widget.reset();
|
|
181
168
|
this.widget.chatWidget.setVisible(false);
|
|
182
169
|
super.hide();
|
|
183
170
|
status(( localizeWithPath(_moduleId, 0, 'Closed inline chat widget')));
|
|
171
|
+
scrollState.restore(this.editor);
|
|
184
172
|
}
|
|
185
173
|
};
|
|
186
174
|
InlineChatZoneWidget = ( (__decorate([
|
|
187
175
|
( (__param(2, IInstantiationService))),
|
|
188
|
-
( (__param(3,
|
|
189
|
-
( (__param(4,
|
|
176
|
+
( (__param(3, ILogService))),
|
|
177
|
+
( (__param(4, IContextKeyService))),
|
|
178
|
+
( (__param(5, IConfigurationService)))
|
|
190
179
|
], InlineChatZoneWidget)));
|
|
191
180
|
export { InlineChatZoneWidget };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
-
var css = ".monaco-workbench .zone-widget.inline-chat-widget{z-index:3}.monaco-workbench .zone-widget.inline-chat-widget .interactive-session{max-width:unset}.monaco-workbench .
|
|
2
|
+
var css = ".monaco-workbench .zone-widget.inline-chat-widget{z-index:3}.monaco-workbench .zone-widget.inline-chat-widget .interactive-session{max-width:unset}.monaco-workbench .inline-chat{background:var(--vscode-inlineChat-background);border:1px solid var(--vscode-inlineChat-border);border-radius:4px;box-shadow:0 2px 4px 0 var(--vscode-widget-shadow);color:inherit}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-input-part{padding:4px 6px 0}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-input-part .interactive-execute-toolbar{margin-bottom:1px}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-input-part .interactive-input-and-execute-toolbar{border-radius:2px;width:100%}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-list{padding:4px 0 0}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-list .interactive-item-container.interactive-item-compact{gap:6px;padding-left:6px;padding-right:20px;padding-top:2px}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-list .interactive-item-container.interactive-item-compact .header .avatar{outline-offset:-1px}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-list .interactive-item-container.interactive-item-compact .chat-notification-widget{border:none;margin-bottom:0;padding:0}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-list .interactive-request{border:none}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-list .interactive-item-container.minimal>.header{right:10px;top:5px}.monaco-workbench .inline-chat .progress{position:relative}.monaco-workbench .part.editor>.content .inline-chat .progress .monaco-progress-container{top:0}.monaco-workbench .inline-chat>.status{align-items:center;display:flex;justify-content:space-between;padding:4px 6px 0}.monaco-workbench .inline-chat .status .actions.hidden{display:none}.monaco-workbench .inline-chat .status .label{color:var(--vscode-descriptionForeground);display:flex;font-size:11px;overflow:hidden;white-space:nowrap}.monaco-workbench .inline-chat .status .label.info{margin-right:auto;padding-left:2px}.monaco-workbench .inline-chat .status .label.status{margin-left:auto}.monaco-workbench .inline-chat .status .label.hidden{display:none}.monaco-workbench .inline-chat .status .label.error{color:var(--vscode-errorForeground)}.monaco-workbench .inline-chat .status .label.warn{color:var(--vscode-editorWarning-foreground)}.monaco-workbench .inline-chat .status .label>.codicon{font-size:12px;line-height:18px;padding:0 3px}.monaco-workbench .inline-chat .chatMessage .chatMessageContent .value{overflow:hidden;-webkit-user-select:text;user-select:text}.monaco-workbench .inline-chat .followUps{padding:5px}.monaco-workbench .inline-chat .followUps .interactive-session-followups .monaco-button{color:var(--vscode-textLink-foreground);display:block;font-size:12px}.monaco-workbench .inline-chat .followUps.hidden{display:none}.monaco-workbench .inline-chat .chatMessage{padding:0 3px}.monaco-workbench .inline-chat .chatMessage .chatMessageContent{padding:2px}.monaco-workbench .inline-chat .chatMessage.hidden{display:none}.monaco-workbench .inline-chat .status .actions,.monaco-workbench .inline-chat-content-widget .toolbar{display:flex;height:18px;.actions-container{gap:3px}.action-item.text-only .action-label{border-radius:2px;font-size:12px;line-height:16px;padding:0 4px}.monaco-action-bar .action-item.menu-entry.text-only+.action-item:not(.text-only)>.monaco-dropdown .action-label{font-size:12px;height:unset;line-height:16px;width:unset}}.monaco-workbench .inline-chat .status .actions,.monaco-workbench .inline-chat-content-widget.contents .toolbar{.monaco-action-bar .action-item.menu-entry.text-only:first-of-type .action-label{background-color:var(--vscode-button-background);color:var(--vscode-button-foreground)}}.monaco-workbench .inline-chat .status{.actions.text-style{display:none}.actions.button-style{display:inherit}}.monaco-workbench .inline-chat .status.text{.actions.text-style{display:inherit}.actions.button-style{display:none}}.monaco-workbench .inline-chat .status .actions>.monaco-button,.monaco-workbench .inline-chat .status .actions>.monaco-button-dropdown{margin-right:4px}.monaco-workbench .inline-chat .status .actions>.monaco-button-dropdown>.monaco-dropdown-button{align-items:center;display:flex;padding:0 4px}.monaco-workbench .inline-chat .status .actions>.monaco-button.codicon{display:flex}.monaco-workbench .inline-chat .status .actions>.monaco-button.codicon:before{align-self:center}.monaco-workbench .inline-chat .status .actions .monaco-text-button{padding:0 2px;white-space:nowrap}.monaco-workbench .inline-chat .status .monaco-toolbar .action-label.checked{background-color:var(--vscode-inputOption-activeBackground);color:var(--vscode-inputOption-activeForeground);outline:1px solid var(--vscode-inputOption-activeBorder)}.monaco-workbench .inline-chat .status .monaco-toolbar .action-item.button-item .action-label:is(:hover,:focus){background-color:var(--vscode-button-hoverBackground)}.monaco-workbench .inline-chat .preview{display:none}.monaco-workbench .inline-chat .previewCreate,.monaco-workbench .inline-chat .previewDiff{border:1px solid var(--vscode-inlineChat-border);border-radius:2px;display:inherit;margin:6px 0}.monaco-workbench .inline-chat .previewCreateTitle{padding-top:6px}.monaco-workbench .inline-chat .diff-review.hidden,.monaco-workbench .inline-chat .previewCreate.hidden,.monaco-workbench .inline-chat .previewCreateTitle.hidden,.monaco-workbench .inline-chat .previewDiff.hidden{display:none}.monaco-workbench .inline-chat-toolbar{display:flex}.monaco-workbench .inline-chat-toolbar>.monaco-button{margin-right:6px}.monaco-workbench .inline-chat-toolbar .action-label.checked{background-color:var(--vscode-inputOption-activeBackground);color:var(--vscode-inputOption-activeForeground);outline:1px solid var(--vscode-inputOption-activeBorder)}.monaco-workbench .inline-chat-inserted-range{background-color:var(--vscode-inlineChatDiff-inserted)}.monaco-workbench .inline-chat-inserted-range-linehighlight{background-color:var(--vscode-diffEditor-insertedLineBackground)}.monaco-workbench .inline-chat-original-zone2{background-color:var(--vscode-diffEditor-removedLineBackground);opacity:.8}.monaco-workbench .inline-chat-lines-inserted-range{background-color:var(--vscode-diffEditor-insertedTextBackground)}.monaco-workbench .inline-chat-block-selection{background-color:var(--vscode-inlineChat-regionHighlight)}.monaco-workbench .interactive-session .interactive-input-and-execute-toolbar .monaco-editor .inline-chat-slash-command{background-color:var(--vscode-chat-slashCommandBackground);border-radius:2px;color:var(--vscode-chat-slashCommandForeground);padding:1px}.monaco-workbench .inline-chat-slash-command-detail{opacity:.5}.monaco-workbench .inline-chat-diff-widget .monaco-diff-editor .monaco-editor-background,.monaco-workbench .inline-chat-diff-widget .monaco-diff-editor .monaco-workbench .margin-view-overlays,.monaco-workbench .inline-chat-newfile-widget{background-color:var(--vscode-inlineChat-regionHighlight)}.monaco-workbench .inline-chat-newfile-widget .title{align-items:center;display:flex;justify-content:space-between}.monaco-workbench .inline-chat-newfile-widget .title .detail{margin-left:4px}.monaco-workbench .inline-chat-newfile-widget .buttonbar-widget{display:flex;margin-left:auto;margin-right:8px}.monaco-workbench .inline-chat-newfile-widget .buttonbar-widget>.monaco-button{display:inline-flex;margin-left:4px;white-space:nowrap}.monaco-workbench .glyph-margin-widgets .cgmr.codicon-inline-chat-opaque,.monaco-workbench .glyph-margin-widgets .cgmr.codicon-inline-chat-transparent{cursor:pointer;display:block;transition:opacity .2s ease-in-out}.monaco-workbench .glyph-margin-widgets .cgmr.codicon-inline-chat-opaque{opacity:.5}.monaco-workbench .glyph-margin-widgets .cgmr.codicon-inline-chat-transparent{opacity:0}.monaco-workbench .glyph-margin-widgets .cgmr.codicon-inline-chat-opaque:hover,.monaco-workbench .glyph-margin-widgets .cgmr.codicon-inline-chat-transparent:hover{opacity:1}";
|
|
3
3
|
n(css,{});
|
|
4
4
|
export { css, css as default };
|
package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
-
var css = ".monaco-workbench .inline-chat-content-widget{background-color:var(--vscode-inlineChat-background);border-radius:4px;box-shadow:0 4px 8px var(--vscode-inlineChat-shadow);padding:6px;z-index:50}.monaco-workbench .inline-chat-content-widget
|
|
2
|
+
var css = ".monaco-workbench .inline-chat-content-widget{background-color:var(--vscode-inlineChat-background);border-radius:4px;box-shadow:0 4px 8px var(--vscode-inlineChat-shadow);padding:6px;z-index:50}.monaco-workbench .inline-chat-content-widget.interactive-session .interactive-session{max-width:unset}.monaco-workbench .inline-chat-content-widget.interactive-session .interactive-input-part .interactive-execute-toolbar{margin-bottom:1px}.monaco-workbench .inline-chat-content-widget.interactive-session .interactive-input-part.compact{padding:0}.monaco-workbench .inline-chat-content-widget.interactive-session .interactive-list{display:none}.monaco-workbench .inline-chat-content-widget.interactive-session .toolbar{display:none;padding-top:4px}";
|
|
3
3
|
n(css,{});
|
|
4
4
|
export { css, css as default };
|