@codingame/monaco-vscode-api 4.5.2 → 5.0.1
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 +1 -1
- package/extensions.d.ts +2 -3
- package/lifecycle.js +6 -0
- package/localExtensionHost.d.ts +4 -1
- package/missing-services.js +41 -25
- package/package.json +8 -8
- package/service-override/tools/editor.js +31 -8
- package/service-override/tools/views.d.ts +1 -1
- package/service-override/tools/views.js +2 -3
- package/service-override/views.d.ts +0 -1
- package/services.d.ts +3 -3
- package/services.js +3 -3
- package/vscode/src/vs/base/browser/markdownRenderer.js +9 -3
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +2 -2
- package/vscode/src/vs/base/browser/ui/button/button.js +3 -3
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -1
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +2 -2
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +2 -2
- package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +2 -2
- package/vscode/src/vs/{platform/hover/browser → base/browser/ui/hover}/hover.d.ts +64 -4
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js +13 -0
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +30 -14
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +15 -2
- package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +2 -2
- package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.js +239 -0
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +2 -2
- package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +2 -2
- package/vscode/src/vs/base/browser/ui/list/listView.js +5 -3
- package/vscode/src/vs/base/browser/ui/list/listWidget.d.ts +33 -0
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +4 -1
- package/vscode/src/vs/base/browser/ui/menu/menu.js +1 -0
- package/vscode/src/vs/base/browser/ui/menu/menubar.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/progressbar/progressAccessibilitySignal.js +13 -0
- package/vscode/src/vs/base/browser/ui/progressbar/progressbar.js +7 -1
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +2 -2
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +2 -2
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +8 -2
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +11 -4
- package/vscode/src/vs/base/browser/ui/tree/media/tree.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/tree/objectTree.js +6 -4
- package/vscode/src/vs/base/common/arraysFind.js +7 -7
- package/vscode/src/vs/base/common/async.js +8 -3
- package/vscode/src/vs/base/common/cache.js +29 -10
- package/vscode/src/vs/base/common/cancellation.js +6 -1
- package/vscode/src/vs/base/common/codicons.d.ts +3 -0
- package/vscode/src/vs/base/common/codiconsLibrary.js +3 -0
- package/vscode/src/vs/base/common/controlFlow.js +48 -0
- package/vscode/src/vs/base/common/equals.js +44 -0
- package/vscode/src/vs/base/common/event.d.ts +11 -1
- package/vscode/src/vs/base/common/event.js +26 -1
- package/vscode/src/vs/base/common/jsonEdit.js +1 -1
- package/vscode/src/vs/base/common/lifecycle.js +1 -1
- package/vscode/src/vs/base/common/map.js +53 -4
- package/vscode/src/vs/base/common/network.js +2 -0
- package/vscode/src/vs/base/common/objects.js +3 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.js +1 -10
- package/vscode/src/vs/base/common/observableInternal/base.js +22 -10
- package/vscode/src/vs/base/common/observableInternal/derived.js +8 -8
- package/vscode/src/vs/base/common/observableInternal/promise.js +19 -1
- package/vscode/src/vs/base/common/observableInternal/utils.js +30 -52
- package/vscode/src/vs/base/common/product.d.ts +1 -0
- package/vscode/src/vs/base/common/strings.js +1 -1
- package/vscode/src/vs/base/common/types.d.ts +5 -1
- package/vscode/src/vs/editor/browser/config/editorConfiguration.js +3 -2
- package/vscode/src/vs/editor/browser/observableUtilities.js +58 -0
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +121 -2
- package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +80 -0
- package/vscode/src/vs/editor/browser/stableEditorScroll.js +37 -1
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -3
- package/vscode/src/vs/editor/browser/widget/codeEditor/editor.css.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +7 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorSash.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +3 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +3 -10
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +8 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +6 -6
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +1 -0
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +3 -2
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.js +17 -8
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget.js +1 -0
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +27 -19
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/style.css.js +1 -1
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +4 -4
- package/vscode/src/vs/editor/common/core/lineRange.d.ts +12 -0
- package/vscode/src/vs/editor/common/core/lineRange.js +28 -0
- package/vscode/src/vs/editor/common/core/textEdit.d.ts +21 -0
- package/vscode/src/vs/editor/common/core/textEdit.js +13 -1
- package/vscode/src/vs/editor/common/core/textLength.d.ts +29 -0
- package/vscode/src/vs/editor/common/core/textLength.js +6 -0
- package/vscode/src/vs/editor/common/cursor/cursorCollection.js +3 -3
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +11 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +11 -0
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +34 -3
- package/vscode/src/vs/editor/common/languages.d.ts +50 -10
- package/vscode/src/vs/editor/common/languages.js +11 -1
- package/vscode/src/vs/editor/common/services/languageFeatureDebounce.js +1 -1
- package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +2 -2
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +1 -1
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +11 -1
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +3 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +22 -6
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +5 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +1 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions.js +20 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +2 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +4 -4
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +2 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +7 -0
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +11 -6
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +10 -10
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverComputer.js +74 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +332 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverStatusBar.js +34 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverTypes.js +39 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +355 -0
- package/vscode/src/vs/editor/contrib/hover/browser/getHover.js +11 -14
- package/vscode/src/vs/editor/contrib/hover/browser/hover.css.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +13 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +354 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverContribution.js +42 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverController.js +320 -0
- package/vscode/src/vs/editor/contrib/hover/browser/marginHoverComputer.js +48 -0
- package/vscode/src/vs/editor/contrib/hover/browser/{marginHover.js → marginHoverWidget.js} +14 -48
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +250 -41
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +1 -0
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +44 -20
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +11 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/commands.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +2 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +26 -13
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +5 -11
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +24 -22
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +39 -70
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +3 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +4 -2
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +5 -3
- package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgressWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +18 -6
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +165 -40
- package/vscode/src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +5 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +3 -3
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +15 -8
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +13 -6
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +0 -2
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +9 -2
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +23 -18
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +33 -11
- package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +1 -9
- package/vscode/src/vs/platform/accessibility/common/accessibility.js +2 -1
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.d.ts +15 -9
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +133 -132
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service.d.ts +12 -5
- package/vscode/src/vs/platform/accessibilitySignal/browser/progressAccessibilitySignalScheduler.js +25 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +4 -4
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +10 -7
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +1 -1
- package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +4 -1
- package/vscode/src/vs/platform/actions/browser/toolbar.js +53 -36
- package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -1
- package/vscode/src/vs/platform/actions/common/actions.js +14 -4
- package/vscode/src/vs/platform/actions/common/menuService.js +30 -8
- package/vscode/src/vs/platform/configuration/common/configuration.js +4 -0
- package/vscode/src/vs/platform/configuration/common/configurationModels.js +43 -32
- package/vscode/src/vs/platform/configuration/common/configurations.js +12 -10
- package/vscode/src/vs/platform/contextview/browser/contextView.d.ts +4 -1
- package/vscode/src/vs/platform/contextview/browser/contextView.service.d.ts +2 -3
- package/vscode/src/vs/platform/contextview/browser/contextViewService.js +10 -8
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +0 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +1 -0
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +5 -0
- package/vscode/src/vs/platform/files/common/files.d.ts +14 -1
- package/vscode/src/vs/platform/hover/browser/hover.service.d.ts +2 -31
- package/vscode/src/vs/platform/instantiation/common/instantiation.d.ts +9 -0
- package/vscode/src/vs/platform/instantiation/common/instantiationService.js +42 -8
- package/vscode/src/vs/platform/log/common/log.js +3 -1
- package/vscode/src/vs/platform/markers/common/markerService.js +7 -3
- package/vscode/src/vs/platform/opener/browser/link.js +6 -4
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +2 -2
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +15 -7
- package/vscode/src/vs/platform/telemetry/common/gdprTypings.d.ts +0 -1
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +5 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.d.ts +30 -0
- package/vscode/src/vs/platform/theme/browser/defaultStyles.js +6 -0
- package/vscode/src/vs/platform/theme/browser/iconsStyleSheet.js +13 -11
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +28 -28
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostBulkEdits.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +104 -96
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostConfiguration.js +9 -3
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostDocumentSaveParticipant.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +19 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +87 -17
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +39 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.js +52 -36
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +10 -28
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +132 -136
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +72 -18
- package/vscode/src/vs/workbench/api/common/extHostWindow.js +3 -5
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +86 -76
- package/vscode/src/vs/workbench/browser/actions/media/actions.css.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/widgetNavigationCommands.js +30 -6
- package/vscode/src/vs/workbench/browser/labels.js +4 -1
- package/vscode/src/vs/workbench/browser/parts/compositePart.d.ts +3 -1
- package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +19 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +16 -3
- package/vscode/src/vs/workbench/browser/parts/editor/media/editorquickaccess.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +14 -33
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +33 -13
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +7 -5
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +4 -3
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.d.ts +2 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.d.ts +3 -1
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +3 -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 +182 -63
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +14 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +61 -34
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +16 -10
- package/vscode/src/vs/workbench/common/theme.js +144 -98
- package/vscode/src/vs/workbench/common/views.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +190 -138
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +876 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +59 -7
- package/vscode/src/vs/workbench/contrib/accessibility/browser/{accessibilityContributions.js → accessibleViewContributions.js} +160 -6
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +66 -150
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +21 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +30 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +201 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +42 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +13 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +366 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +35 -2
- 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 +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/annotations.js +4 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +95 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.service.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +94 -79
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/chatParticipantContribTypes.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +7 -9
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +1 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +30 -26
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +30 -29
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +5 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +13 -13
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +26 -16
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +107 -26
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +23 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +2 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +39 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +53 -33
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +967 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +101 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +4 -1
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +82 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +10 -9
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +79 -45
- package/vscode/src/vs/workbench/contrib/files/browser/{fileCommands.save.js → fileCommands._save.js} +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/{files.configuration.contribution.js → files.contribution._configuration.js} +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/{files.editorPane.contribution.js → files.contribution._editorPane.js} +18 -18
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +5 -3
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +19 -14
- package/vscode/src/vs/workbench/contrib/files/browser/views/media/openeditors.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +8 -8
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +15 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +29 -112
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +10 -7
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +99 -91
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +9 -31
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +345 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +62 -69
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +63 -46
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +18 -10
- 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/browser/utils.js +1 -31
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +7 -3
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +5 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +4 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +2 -48
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +28 -23
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.js +5 -9
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +112 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +18 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +7 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +4 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +8 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +36 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +17 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +5 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +2 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +22 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +34 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +15 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProviderFactory.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +17 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +52 -16
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +25 -12
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +6 -4
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +0 -2
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +6 -4
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +24 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +38 -8
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +0 -1
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +1 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +7 -14
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +24 -6
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.js +2 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +8 -9
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +2 -20
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +1 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testItemCollection.js +10 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +15 -3
- package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.service.d.ts +9 -0
- package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.service.js +3 -0
- package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +30 -16
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +15 -4
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.service.d.ts +20 -1
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +0 -1
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocation.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +8 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +2 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.service.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +3 -3
- package/vscode/src/vs/workbench/services/language/common/languageService.js +23 -18
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +6 -4
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +50 -9
- package/vscode/src/vs/workbench/services/themes/common/workbenchThemeService.js +1 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/iconSelectBox.js +97 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopy.d.ts +7 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +2 -2
- package/vscode-dts/vscode.proposed.chatParticipant.d.ts +23 -45
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +65 -91
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +9 -0
- package/vscode-dts/vscode.proposed.chatTab.d.ts +1 -5
- package/vscode-dts/vscode.proposed.contribAccessibilityHelpContent.d.ts +15 -0
- package/vscode-dts/vscode.proposed.debugFocus.d.ts +4 -4
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +2 -2
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +144 -43
- package/vscode-dts/vscode.proposed.editorHoverVerbosityLevel.d.ts +76 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +1 -17
- package/vscode-dts/vscode.proposed.languageModels.d.ts +56 -11
- package/vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts +12 -1
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +4 -4
- package/vscode-dts/vscode.proposed.speech.d.ts +2 -1
- package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +144 -38
- package/vscode-dts/vscode.proposed.testPreserveFocus.d.ts +28 -0
- package/vscode/src/vs/base/browser/ui/hover/updatableHoverWidget.d.ts +0 -21
- package/vscode/src/vs/base/browser/ui/hover/updatableHoverWidget.js +0 -214
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.d.ts +0 -32
- package/vscode/src/vs/editor/contrib/hover/browser/contentHover.js +0 -838
- package/vscode/src/vs/editor/contrib/hover/browser/hover.js +0 -621
- package/vscode/src/vs/platform/accessibility/common/accessibility.service.d.ts +0 -19
- package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -54
- package/vscode/src/vs/workbench/api/common/extHostIssueReporter.js +0 -70
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.js +0 -237
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalDebuggerContribution.js +0 -49
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalLineFeatureContribution.js +0 -178
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +0 -141
- package/vscode/src/vs/workbench/contrib/chat/common/chatContributionService.service.js +0 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatFileCreationWidget.js +0 -212
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +0 -95
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +0 -110
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +0 -224
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.d.ts +0 -48
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEvents.js +0 -47
- package/vscode-dts/vscode.proposed.dropMetadata.d.ts +0 -65
- package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +0 -57
- package/vscode-dts/vscode.proposed.windowActivity.d.ts +0 -17
- /package/vscode/src/vs/workbench/browser/parts/editor/{editor.autosave.contribution.js → editor.contribution._autosave.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/files/browser/{files.fileEditorFactory.contribution.js → files.contribution._fileEditorFactory.js} +0 -0
|
@@ -2,12 +2,10 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { WindowIntervalTimer } from '../../../../base/browser/dom.js';
|
|
3
3
|
import { coalesceInPlace } from '../../../../base/common/arrays.js';
|
|
4
4
|
import { Emitter, Event } from '../../../../base/common/event.js';
|
|
5
|
-
import { Lazy } from '../../../../base/common/lazy.js';
|
|
6
5
|
import { DisposableStore } from '../../../../base/common/lifecycle.js';
|
|
7
6
|
import { themeColorFromId } from '../../../../base/common/themables.js';
|
|
8
7
|
import { StableEditorScrollState } from '../../../../editor/browser/stableEditorScroll.js';
|
|
9
8
|
import { RenderOptions, LineSource, renderLines } from '../../../../editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js';
|
|
10
|
-
import { EditOperation } from '../../../../editor/common/core/editOperation.js';
|
|
11
9
|
import { LineRange } from '../../../../editor/common/core/lineRange.js';
|
|
12
10
|
import { Range } from '../../../../editor/common/core/range.js';
|
|
13
11
|
import { OverviewRulerLane } from '../../../../editor/common/model.js';
|
|
@@ -16,29 +14,35 @@ import { IEditorWorkerService } from '../../../../editor/common/services/editorW
|
|
|
16
14
|
import { InlineDecoration } from '../../../../editor/common/viewModel.js';
|
|
17
15
|
import { localizeWithPath } from '../../../../nls.js';
|
|
18
16
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
19
|
-
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
20
17
|
import { Progress } from '../../../../platform/progress/common/progress.js';
|
|
21
18
|
import { countWords } from '../../chat/common/chatWordCounter.js';
|
|
22
|
-
import {
|
|
23
|
-
import { ReplyResponse } from './inlineChatSession.js';
|
|
24
|
-
import { CTX_INLINE_CHAT_DOCUMENT_CHANGED, CTX_INLINE_CHAT_CHANGE_HAS_DIFF, CTX_INLINE_CHAT_CHANGE_SHOWS_DIFF, overviewRulerInlineChatDiffInserted } from '../common/inlineChat.js';
|
|
19
|
+
import { CTX_INLINE_CHAT_DOCUMENT_CHANGED, CTX_INLINE_CHAT_CHANGE_HAS_DIFF, CTX_INLINE_CHAT_CHANGE_SHOWS_DIFF, overviewRulerInlineChatDiffInserted, minimapInlineChatDiffInserted } from '../common/inlineChat.js';
|
|
25
20
|
import { assertType } from '../../../../base/common/types.js';
|
|
26
21
|
import { IModelService } from '../../../../editor/common/services/model.js';
|
|
27
22
|
import { asProgressiveEdit, performAsyncTextEdit } from './utils.js';
|
|
28
23
|
import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.service.js';
|
|
29
24
|
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
|
|
25
|
+
import { ITextFileService } from '../../../services/textfile/common/textfiles.service.js';
|
|
26
|
+
import { Schemas } from '../../../../base/common/network.js';
|
|
27
|
+
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
28
|
+
import { DefaultChatTextEditor } from '../../chat/browser/codeBlockPart.js';
|
|
29
|
+
import { isEqual } from '../../../../base/common/resources.js';
|
|
30
|
+
var EditModeStrategy_1;
|
|
30
31
|
const _moduleId = "vs/workbench/contrib/inlineChat/browser/inlineChatStrategies";
|
|
31
|
-
class EditModeStrategy {
|
|
32
|
+
let EditModeStrategy = class EditModeStrategy {
|
|
33
|
+
static { EditModeStrategy_1 = this; }
|
|
32
34
|
static { this._decoBlock = ModelDecorationOptions.register({
|
|
33
35
|
description: 'inline-chat',
|
|
34
36
|
showIfCollapsed: false,
|
|
35
37
|
isWholeLine: true,
|
|
36
38
|
className: 'inline-chat-block-selection',
|
|
37
39
|
}); }
|
|
38
|
-
constructor(_session, _editor, _zone) {
|
|
40
|
+
constructor(_session, _editor, _zone, _textFileService, _instaService) {
|
|
39
41
|
this._session = _session;
|
|
40
42
|
this._editor = _editor;
|
|
41
43
|
this._zone = _zone;
|
|
44
|
+
this._textFileService = _textFileService;
|
|
45
|
+
this._instaService = _instaService;
|
|
42
46
|
this._store = ( (new DisposableStore()));
|
|
43
47
|
this._onDidAccept = this._store.add(( (new Emitter())));
|
|
44
48
|
this._onDidDiscard = this._store.add(( (new Emitter())));
|
|
@@ -49,6 +53,36 @@ class EditModeStrategy {
|
|
|
49
53
|
dispose() {
|
|
50
54
|
this._store.dispose();
|
|
51
55
|
}
|
|
56
|
+
async _doApplyChanges(ignoreLocal) {
|
|
57
|
+
const untitledModels = [];
|
|
58
|
+
const editor = this._instaService.createInstance(DefaultChatTextEditor);
|
|
59
|
+
for (const request of this._session.chatModel.getRequests()) {
|
|
60
|
+
if (!request.response?.response) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
for (const item of request.response.response.value) {
|
|
64
|
+
if (item.kind !== 'textEditGroup') {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (ignoreLocal && isEqual(item.uri, this._session.textModelN.uri)) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
await editor.apply(request.response, item);
|
|
71
|
+
if (item.uri.scheme === Schemas.untitled) {
|
|
72
|
+
const untitled = this._textFileService.untitled.get(item.uri);
|
|
73
|
+
if (untitled) {
|
|
74
|
+
untitledModels.push(untitled);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
for (const untitledModel of untitledModels) {
|
|
80
|
+
if (!untitledModel.isDisposed()) {
|
|
81
|
+
await untitledModel.resolve();
|
|
82
|
+
await untitledModel.save({ reason: 1 });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
52
86
|
cancel() {
|
|
53
87
|
return this._session.hunkData.discardAll();
|
|
54
88
|
}
|
|
@@ -83,15 +117,19 @@ class EditModeStrategy {
|
|
|
83
117
|
getWholeRangeDecoration() {
|
|
84
118
|
const ranges = [this._session.wholeRange.value];
|
|
85
119
|
const newDecorations = ( (ranges.map(
|
|
86
|
-
range => range.isEmpty() ? undefined : ({ range, options:
|
|
120
|
+
range => range.isEmpty() ? undefined : ({ range, options: EditModeStrategy_1._decoBlock })
|
|
87
121
|
)));
|
|
88
122
|
coalesceInPlace(newDecorations);
|
|
89
123
|
return newDecorations;
|
|
90
124
|
}
|
|
91
|
-
}
|
|
125
|
+
};
|
|
126
|
+
EditModeStrategy = EditModeStrategy_1 = ( (__decorate([
|
|
127
|
+
( (__param(3, ITextFileService))),
|
|
128
|
+
( (__param(4, IInstantiationService)))
|
|
129
|
+
], EditModeStrategy)));
|
|
92
130
|
let PreviewStrategy = class PreviewStrategy extends EditModeStrategy {
|
|
93
|
-
constructor(session, editor, zone, modelService, contextKeyService, instaService) {
|
|
94
|
-
super(session, editor, zone);
|
|
131
|
+
constructor(session, editor, zone, modelService, contextKeyService, textFileService, instaService) {
|
|
132
|
+
super(session, editor, zone, textFileService, instaService);
|
|
95
133
|
this._ctxDocumentChanged = CTX_INLINE_CHAT_DOCUMENT_CHANGED.bindTo(contextKeyService);
|
|
96
134
|
const baseModel = modelService.getModel(session.targetUri);
|
|
97
135
|
Event.debounce(baseModel.onDidChangeContent.bind(baseModel), () => { }, 350)(_ => {
|
|
@@ -99,57 +137,23 @@ let PreviewStrategy = class PreviewStrategy extends EditModeStrategy {
|
|
|
99
137
|
this._ctxDocumentChanged.set(session.hasChangedText);
|
|
100
138
|
}
|
|
101
139
|
}, undefined, this._store);
|
|
102
|
-
this._previewZone = ( (new Lazy(
|
|
103
|
-
() => instaService.createInstance(InlineChatFileCreatePreviewWidget, editor)
|
|
104
|
-
)));
|
|
105
140
|
}
|
|
106
141
|
dispose() {
|
|
107
142
|
this._ctxDocumentChanged.reset();
|
|
108
|
-
this._previewZone.rawValue?.dispose();
|
|
109
143
|
super.dispose();
|
|
110
144
|
}
|
|
111
145
|
async apply() {
|
|
112
|
-
|
|
113
|
-
if (textModel?.equalsTextBuffer(this._session.textModel0.getTextBuffer())) {
|
|
114
|
-
this._session.hunkData.getInfo().forEach(item => item.acceptChanges());
|
|
115
|
-
const newText = this._session.textModel0.getValue();
|
|
116
|
-
const range = textModel.getFullModelRange();
|
|
117
|
-
textModel.pushStackElement();
|
|
118
|
-
textModel.pushEditOperations(null, [EditOperation.replace(range, newText)], () => null);
|
|
119
|
-
textModel.pushStackElement();
|
|
120
|
-
}
|
|
121
|
-
if (this._session.lastExchange?.response instanceof ReplyResponse) {
|
|
122
|
-
const { untitledTextModel } = this._session.lastExchange.response;
|
|
123
|
-
if (untitledTextModel && !untitledTextModel.isDisposed() && untitledTextModel.isDirty()) {
|
|
124
|
-
await untitledTextModel.save({ reason: 1 });
|
|
125
|
-
}
|
|
126
|
-
}
|
|
146
|
+
await super._doApplyChanges(false);
|
|
127
147
|
}
|
|
128
148
|
async makeChanges(edits, obs) {
|
|
129
|
-
return this._makeChanges(edits, obs, undefined, undefined);
|
|
130
149
|
}
|
|
131
150
|
async makeProgressiveChanges(edits, obs, opts) {
|
|
132
|
-
await this._makeChanges(edits, obs, opts, ( (new Progress(() => {
|
|
133
|
-
this._zone.widget.showEditsPreview(this._session.hunkData, this._session.textModel0, this._session.textModelN);
|
|
134
|
-
}))));
|
|
135
151
|
}
|
|
136
152
|
async undoChanges(altVersionId) {
|
|
137
153
|
const { textModelN } = this._session;
|
|
138
154
|
await undoModelUntil(textModelN, altVersionId);
|
|
139
155
|
}
|
|
140
156
|
async renderChanges(response) {
|
|
141
|
-
if (response.allLocalEdits.length > 0) {
|
|
142
|
-
this._zone.widget.showEditsPreview(this._session.hunkData, this._session.textModel0, this._session.textModelN);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
this._zone.widget.hideEditsPreview();
|
|
146
|
-
}
|
|
147
|
-
if (response.untitledTextModel && !response.untitledTextModel.isDisposed()) {
|
|
148
|
-
this._previewZone.value.showCreation(this._session.wholeRange.value.getStartPosition().delta(-1), response.untitledTextModel);
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
this._previewZone.rawValue?.hide();
|
|
152
|
-
}
|
|
153
157
|
}
|
|
154
158
|
hasFocus() {
|
|
155
159
|
return this._zone.widget.hasFocus();
|
|
@@ -158,15 +162,15 @@ let PreviewStrategy = class PreviewStrategy extends EditModeStrategy {
|
|
|
158
162
|
PreviewStrategy = ( (__decorate([
|
|
159
163
|
( (__param(3, IModelService))),
|
|
160
164
|
( (__param(4, IContextKeyService))),
|
|
161
|
-
( (__param(5,
|
|
165
|
+
( (__param(5, ITextFileService))),
|
|
166
|
+
( (__param(6, IInstantiationService)))
|
|
162
167
|
], PreviewStrategy)));
|
|
163
168
|
let LiveStrategy = class LiveStrategy extends EditModeStrategy {
|
|
164
|
-
constructor(session, editor, zone, contextKeyService, _editorWorkerService, _accessibilityService, _configService,
|
|
165
|
-
super(session, editor, zone);
|
|
169
|
+
constructor(session, editor, zone, contextKeyService, _editorWorkerService, _accessibilityService, _configService, textFileService, instaService) {
|
|
170
|
+
super(session, editor, zone, textFileService, instaService);
|
|
166
171
|
this._editorWorkerService = _editorWorkerService;
|
|
167
172
|
this._accessibilityService = _accessibilityService;
|
|
168
173
|
this._configService = _configService;
|
|
169
|
-
this._instaService = _instaService;
|
|
170
174
|
this._decoInsertedText = ModelDecorationOptions.register({
|
|
171
175
|
description: 'inline-modified-line',
|
|
172
176
|
className: 'inline-chat-inserted-range-linehighlight',
|
|
@@ -174,6 +178,10 @@ let LiveStrategy = class LiveStrategy extends EditModeStrategy {
|
|
|
174
178
|
overviewRuler: {
|
|
175
179
|
position: OverviewRulerLane.Full,
|
|
176
180
|
color: themeColorFromId(overviewRulerInlineChatDiffInserted),
|
|
181
|
+
},
|
|
182
|
+
minimap: {
|
|
183
|
+
position: 1 ,
|
|
184
|
+
color: themeColorFromId(minimapInlineChatDiffInserted),
|
|
177
185
|
}
|
|
178
186
|
});
|
|
179
187
|
this._decoInsertedTextRange = ModelDecorationOptions.register({
|
|
@@ -187,13 +195,9 @@ let LiveStrategy = class LiveStrategy extends EditModeStrategy {
|
|
|
187
195
|
this._ctxCurrentChangeHasDiff = CTX_INLINE_CHAT_CHANGE_HAS_DIFF.bindTo(contextKeyService);
|
|
188
196
|
this._ctxCurrentChangeShowsDiff = CTX_INLINE_CHAT_CHANGE_SHOWS_DIFF.bindTo(contextKeyService);
|
|
189
197
|
this._progressiveEditingDecorations = this._editor.createDecorationsCollection();
|
|
190
|
-
this._previewZone = ( (new Lazy(
|
|
191
|
-
() => _instaService.createInstance(InlineChatFileCreatePreviewWidget, editor)
|
|
192
|
-
)));
|
|
193
198
|
}
|
|
194
199
|
dispose() {
|
|
195
200
|
this._resetDiff();
|
|
196
|
-
this._previewZone.rawValue?.dispose();
|
|
197
201
|
super.dispose();
|
|
198
202
|
}
|
|
199
203
|
_resetDiff() {
|
|
@@ -210,13 +214,7 @@ let LiveStrategy = class LiveStrategy extends EditModeStrategy {
|
|
|
210
214
|
if (this._editCount > 0) {
|
|
211
215
|
this._editor.pushUndoStop();
|
|
212
216
|
}
|
|
213
|
-
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
const { untitledTextModel } = this._session.lastExchange.response;
|
|
217
|
-
if (untitledTextModel && !untitledTextModel.isDisposed() && untitledTextModel.isDirty()) {
|
|
218
|
-
await untitledTextModel.save({ reason: 1 });
|
|
219
|
-
}
|
|
217
|
+
await super._doApplyChanges(true);
|
|
220
218
|
}
|
|
221
219
|
cancel() {
|
|
222
220
|
this._resetDiff();
|
|
@@ -248,12 +246,6 @@ let LiveStrategy = class LiveStrategy extends EditModeStrategy {
|
|
|
248
246
|
return this._makeChanges(edits, obs, opts, progress);
|
|
249
247
|
}
|
|
250
248
|
async renderChanges(response) {
|
|
251
|
-
if (response.untitledTextModel && !response.untitledTextModel.isDisposed()) {
|
|
252
|
-
this._previewZone.value.showCreation(this._session.wholeRange.value.getStartPosition().delta(-1), response.untitledTextModel);
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
this._previewZone.rawValue?.hide();
|
|
256
|
-
}
|
|
257
249
|
this._progressiveEditingDecorations.clear();
|
|
258
250
|
const renderHunks = () => {
|
|
259
251
|
let widgetData;
|
|
@@ -467,7 +459,8 @@ LiveStrategy = ( (__decorate([
|
|
|
467
459
|
( (__param(4, IEditorWorkerService))),
|
|
468
460
|
( (__param(5, IAccessibilityService))),
|
|
469
461
|
( (__param(6, IConfigurationService))),
|
|
470
|
-
( (__param(7,
|
|
462
|
+
( (__param(7, ITextFileService))),
|
|
463
|
+
( (__param(8, IInstantiationService)))
|
|
471
464
|
], LiveStrategy)));
|
|
472
465
|
async function undoModelUntil(model, targetAltVersion) {
|
|
473
466
|
while (targetAltVersion < model.getAlternativeVersionId() && model.canUndo()) {
|
|
@@ -11,6 +11,7 @@ import { derived } from '../../../../base/common/observableInternal/derived.js';
|
|
|
11
11
|
import '../../../../base/common/observableInternal/autorun.js';
|
|
12
12
|
import { constObservable } from '../../../../base/common/observableInternal/utils.js';
|
|
13
13
|
import '../../../../base/common/cancellation.js';
|
|
14
|
+
import { isNonEmptyArray, tail } from '../../../../base/common/arrays.js';
|
|
14
15
|
import './media/inlineChat.css.js';
|
|
15
16
|
import { AccessibleDiffViewer } from '../../../../editor/browser/widget/diffEditor/components/accessibleDiffViewer.js';
|
|
16
17
|
import { EmbeddedDiffEditorWidget } from '../../../../editor/browser/widget/diffEditor/embeddedDiffEditorWidget.js';
|
|
@@ -41,24 +42,22 @@ import { IAccessibleViewService } from '../../accessibility/browser/accessibleVi
|
|
|
41
42
|
import { ChatFollowups } from '../../chat/browser/chatFollowups.js';
|
|
42
43
|
import { ChatModel } from '../../chat/common/chatModel.js';
|
|
43
44
|
import { isWelcomeVM, isRequestVM, isResponseVM } from '../../chat/common/chatViewModel.js';
|
|
44
|
-
import { invertLineRange, asRange } from './utils.js';
|
|
45
45
|
import { inlineChatBackground, CTX_INLINE_CHAT_RESPONSE_FOCUSED, CTX_INLINE_CHAT_FOCUSED } from '../common/inlineChat.js';
|
|
46
46
|
import { ChatWidget } from '../../chat/browser/chatWidget.js';
|
|
47
47
|
import { chatRequestBackground } from '../../chat/common/chatColors.js';
|
|
48
48
|
import { Selection } from '../../../../editor/common/core/selection.js';
|
|
49
49
|
import { ChatAgentLocation } from '../../chat/common/chatAgents.js';
|
|
50
|
-
import { isNonEmptyArray, tail } from '../../../../base/common/arrays.js';
|
|
51
50
|
import { EditorExtensionsRegistry } from '../../../../editor/browser/editorExtensions.js';
|
|
52
51
|
import { SnippetController2 } from '../../../../editor/contrib/snippet/browser/snippetController2.js';
|
|
53
52
|
import { SuggestController } from '../../../../editor/contrib/suggest/browser/suggestController.js';
|
|
54
53
|
import { IChatService } from '../../chat/common/chatService.service.js';
|
|
55
|
-
import { setupCustomHover } from '../../../../base/browser/ui/hover/updatableHoverWidget.js';
|
|
56
54
|
import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
57
55
|
import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js';
|
|
56
|
+
import { IHoverService } from '../../../../platform/hover/browser/hover.service.js';
|
|
58
57
|
var HunkAccessibleDiffViewer_1;
|
|
59
58
|
const _moduleId = "vs/workbench/contrib/inlineChat/browser/inlineChatWidget";
|
|
60
59
|
let InlineChatWidget = class InlineChatWidget {
|
|
61
|
-
constructor(location, options, _instantiationService, _contextKeyService, _keybindingService, _accessibilityService, _configurationService, _accessibleViewService, _textModelResolverService, _chatService) {
|
|
60
|
+
constructor(location, options, _instantiationService, _contextKeyService, _keybindingService, _accessibilityService, _configurationService, _accessibleViewService, _textModelResolverService, _chatService, _hoverService) {
|
|
62
61
|
this._instantiationService = _instantiationService;
|
|
63
62
|
this._contextKeyService = _contextKeyService;
|
|
64
63
|
this._keybindingService = _keybindingService;
|
|
@@ -67,6 +66,7 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
67
66
|
this._accessibleViewService = _accessibleViewService;
|
|
68
67
|
this._textModelResolverService = _textModelResolverService;
|
|
69
68
|
this._chatService = _chatService;
|
|
69
|
+
this._hoverService = _hoverService;
|
|
70
70
|
this._elements = h('div.inline-chat@root', [
|
|
71
71
|
h('div.chat-widget@chatWidget'),
|
|
72
72
|
h('div.progress@progress'),
|
|
@@ -87,12 +87,6 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
87
87
|
this.onDidChangeInput = this._onDidChangeInput.event;
|
|
88
88
|
this._isLayouting = false;
|
|
89
89
|
this._followUpDisposables = this._store.add(( (new DisposableStore())));
|
|
90
|
-
this._store.add(this._configurationService.onDidChangeConfiguration(e => {
|
|
91
|
-
if (e.affectsConfiguration("accessibility.verbosity.inlineChat" )) {
|
|
92
|
-
this._updateAriaLabel();
|
|
93
|
-
this._elements.followUps.ariaLabel = this._accessibleViewService.getOpenAriaHint("accessibility.verbosity.inlineChat" );
|
|
94
|
-
}
|
|
95
|
-
}));
|
|
96
90
|
this._progressBar = ( (new ProgressBar(this._elements.progress)));
|
|
97
91
|
this._store.add(this._progressBar);
|
|
98
92
|
let allowRequests = false;
|
|
@@ -104,9 +98,10 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
104
98
|
defaultElementHeight: 32,
|
|
105
99
|
renderStyle: 'compact',
|
|
106
100
|
renderInputOnTop: true,
|
|
101
|
+
renderFollowups: true,
|
|
107
102
|
supportsFileReferences: true,
|
|
108
103
|
editorOverflowWidgetsDomNode: options.editorOverflowWidgetsDomNode,
|
|
109
|
-
|
|
104
|
+
rendererOptions: options.rendererOptions,
|
|
110
105
|
menus: {
|
|
111
106
|
executeToolbar: options.inputMenuId,
|
|
112
107
|
inputSideToolbar: options.widgetMenuId,
|
|
@@ -187,13 +182,21 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
187
182
|
useSeparatorsInPrimaryActions: true
|
|
188
183
|
}
|
|
189
184
|
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
185
|
+
if (options.feedbackMenuId) {
|
|
186
|
+
const feedbackToolbar = this._instantiationService.createInstance(MenuWorkbenchToolBar, this._elements.feedbackToolbar, options.feedbackMenuId, { ...workbenchToolbarOptions, hiddenItemStrategy: 0 });
|
|
187
|
+
this._store.add(feedbackToolbar.onDidChangeMenuItems(() => this._onDidChangeHeight.fire()));
|
|
188
|
+
this._store.add(feedbackToolbar);
|
|
189
|
+
}
|
|
190
|
+
this._store.add(this._configurationService.onDidChangeConfiguration(e => {
|
|
191
|
+
if (e.affectsConfiguration("accessibility.verbosity.inlineChat" )) {
|
|
192
|
+
this._updateAriaLabel();
|
|
193
|
+
}
|
|
194
|
+
}));
|
|
195
|
+
this._elements.root.tabIndex = 0;
|
|
193
196
|
this._elements.followUps.tabIndex = 0;
|
|
194
|
-
this._elements.followUps.ariaLabel = this._accessibleViewService.getOpenAriaHint("accessibility.verbosity.inlineChat" );
|
|
195
197
|
this._elements.statusLabel.tabIndex = 0;
|
|
196
|
-
this.
|
|
198
|
+
this._updateAriaLabel();
|
|
199
|
+
this._store.add(this._hoverService.setupUpdatableHover(getDefaultHoverDelegate('element'), this._elements.statusLabel, () => {
|
|
197
200
|
return this._elements.statusLabel.dataset['title'];
|
|
198
201
|
}));
|
|
199
202
|
this._store.add(this._chatService.onDidPerformUserAction(e => {
|
|
@@ -201,30 +204,32 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
201
204
|
this.updateStatus('Thank you for your feedback!', { resetAfter: 1250 });
|
|
202
205
|
}
|
|
203
206
|
}));
|
|
204
|
-
this._defaultChatModel = this._store.add(this._instantiationService.createInstance(ChatModel,
|
|
207
|
+
this._defaultChatModel = this._store.add(this._instantiationService.createInstance(ChatModel, undefined, ChatAgentLocation.Editor));
|
|
205
208
|
this._defaultChatModel.startInitialize();
|
|
206
|
-
this._defaultChatModel.initialize(
|
|
209
|
+
this._defaultChatModel.initialize(undefined);
|
|
207
210
|
this.setChatModel(this._defaultChatModel);
|
|
208
211
|
}
|
|
209
212
|
_updateAriaLabel() {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
213
|
+
this._elements.root.ariaLabel = this._accessibleViewService.getOpenAriaHint("accessibility.verbosity.inlineChat" );
|
|
214
|
+
if (this._accessibilityService.isScreenReaderOptimized()) {
|
|
215
|
+
let label = defaultAriaLabel;
|
|
216
|
+
if (this._configurationService.getValue("accessibility.verbosity.inlineChat" )) {
|
|
217
|
+
const kbLabel = this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp" )?.getLabel();
|
|
218
|
+
label = kbLabel
|
|
219
|
+
? ( localizeWithPath(
|
|
220
|
+
_moduleId,
|
|
221
|
+
0,
|
|
222
|
+
"Inline Chat Input, Use {0} for Inline Chat Accessibility Help.",
|
|
223
|
+
kbLabel
|
|
224
|
+
))
|
|
225
|
+
: ( localizeWithPath(
|
|
226
|
+
_moduleId,
|
|
227
|
+
1,
|
|
228
|
+
"Inline Chat Input, Run the Inline Chat Accessibility Help command for more information."
|
|
229
|
+
));
|
|
230
|
+
}
|
|
231
|
+
this._chatWidget.inputEditor.updateOptions({ ariaLabel: label });
|
|
226
232
|
}
|
|
227
|
-
this._chatWidget.inputEditor.updateOptions({ ariaLabel: label });
|
|
228
233
|
}
|
|
229
234
|
dispose() {
|
|
230
235
|
this._store.dispose();
|
|
@@ -269,9 +274,16 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
269
274
|
return result;
|
|
270
275
|
}
|
|
271
276
|
get minHeight() {
|
|
277
|
+
let maxWidgetHeight = 100;
|
|
278
|
+
for (const item of this._chatWidget.viewModel?.getItems() ?? []) {
|
|
279
|
+
if (isResponseVM(item) && ( (item.response.value.some(r => r.kind === 'textEditGroup' && !r.state?.applied)))) {
|
|
280
|
+
maxWidgetHeight = 270;
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
272
284
|
let value = this.contentHeight;
|
|
273
285
|
value -= this._chatWidget.contentHeight;
|
|
274
|
-
value += Math.min(
|
|
286
|
+
value += Math.min(maxWidgetHeight, this._chatWidget.contentHeight);
|
|
275
287
|
return value;
|
|
276
288
|
}
|
|
277
289
|
_getExtraHeight() {
|
|
@@ -330,7 +342,10 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
330
342
|
if (!isNonEmptyArray(requests)) {
|
|
331
343
|
return undefined;
|
|
332
344
|
}
|
|
333
|
-
return tail(requests)
|
|
345
|
+
return tail(requests)?.response?.response.asString();
|
|
346
|
+
}
|
|
347
|
+
get usesDefaultChatModel() {
|
|
348
|
+
return this.getChatModel() === this._defaultChatModel;
|
|
334
349
|
}
|
|
335
350
|
getChatModel() {
|
|
336
351
|
return this._chatWidget.viewModel?.model ?? this._defaultChatModel;
|
|
@@ -354,7 +369,7 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
354
369
|
}
|
|
355
370
|
return;
|
|
356
371
|
}
|
|
357
|
-
const chatRequest = model.addRequest({ parts: [], text: '' }, { variables: [] });
|
|
372
|
+
const chatRequest = model.addRequest({ parts: [], text: '' }, { variables: [] }, 0);
|
|
358
373
|
model.acceptResponseProgress(chatRequest, {
|
|
359
374
|
kind: 'markdownContent',
|
|
360
375
|
content: message.message
|
|
@@ -446,7 +461,8 @@ InlineChatWidget = ( (__decorate([
|
|
|
446
461
|
( (__param(6, IConfigurationService))),
|
|
447
462
|
( (__param(7, IAccessibleViewService))),
|
|
448
463
|
( (__param(8, ITextModelService))),
|
|
449
|
-
( (__param(9, IChatService)))
|
|
464
|
+
( (__param(9, IChatService))),
|
|
465
|
+
( (__param(10, IHoverService)))
|
|
450
466
|
], InlineChatWidget)));
|
|
451
467
|
const defaultAriaLabel = ( localizeWithPath(_moduleId, 2, "Inline Chat Input"));
|
|
452
468
|
const codeEditorWidgetOptions = {
|
|
@@ -469,8 +485,8 @@ const _previewEditorEditorOptions = {
|
|
|
469
485
|
isInEmbeddedEditor: true
|
|
470
486
|
};
|
|
471
487
|
let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends InlineChatWidget {
|
|
472
|
-
constructor(_parentEditor, options, contextKeyService, keybindingService, instantiationService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService) {
|
|
473
|
-
super(ChatAgentLocation.Editor, { ...options, editorOverflowWidgetsDomNode: _parentEditor.getOverflowWidgetsDomNode() }, instantiationService, contextKeyService, keybindingService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService);
|
|
488
|
+
constructor(_parentEditor, options, contextKeyService, keybindingService, instantiationService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService, hoverService) {
|
|
489
|
+
super(ChatAgentLocation.Editor, { ...options, editorOverflowWidgetsDomNode: _parentEditor.getOverflowWidgetsDomNode() }, instantiationService, contextKeyService, keybindingService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService, hoverService);
|
|
474
490
|
this._parentEditor = _parentEditor;
|
|
475
491
|
this._accessibleViewer = this._store.add(( (new MutableDisposable())));
|
|
476
492
|
this._previewDiffModel = this._store.add(( (new MutableDisposable())));
|
|
@@ -541,10 +557,10 @@ let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends Inli
|
|
|
541
557
|
this.hideEditsPreview();
|
|
542
558
|
return;
|
|
543
559
|
}
|
|
544
|
-
const hiddenOriginal =
|
|
545
|
-
const hiddenModified =
|
|
546
|
-
this._previewDiffEditor.value.getOriginalEditor().setHiddenAreas(( (hiddenOriginal.map(lr => asRange(lr, textModel0)))), 'diff-hidden');
|
|
547
|
-
this._previewDiffEditor.value.getModifiedEditor().setHiddenAreas(( (hiddenModified.map(lr => asRange(lr, textModelN)))), 'diff-hidden');
|
|
560
|
+
const hiddenOriginal = LineRange.invert(originalLineRange, textModel0);
|
|
561
|
+
const hiddenModified = LineRange.invert(modifiedLineRange, textModelN);
|
|
562
|
+
this._previewDiffEditor.value.getOriginalEditor().setHiddenAreas(( (hiddenOriginal.map(lr => LineRange.asRange(lr, textModel0)))), 'diff-hidden');
|
|
563
|
+
this._previewDiffEditor.value.getModifiedEditor().setHiddenAreas(( (hiddenModified.map(lr => LineRange.asRange(lr, textModelN)))), 'diff-hidden');
|
|
548
564
|
this._previewDiffEditor.value.revealLine(modifiedLineRange.startLineNumber, 1 );
|
|
549
565
|
this._onDidChangeHeight.fire();
|
|
550
566
|
}
|
|
@@ -568,7 +584,8 @@ EditorBasedInlineChatWidget = ( (__decorate([
|
|
|
568
584
|
( (__param(6, IConfigurationService))),
|
|
569
585
|
( (__param(7, IAccessibleViewService))),
|
|
570
586
|
( (__param(8, ITextModelService))),
|
|
571
|
-
( (__param(9, IChatService)))
|
|
587
|
+
( (__param(9, IChatService))),
|
|
588
|
+
( (__param(10, IHoverService)))
|
|
572
589
|
], EditorBasedInlineChatWidget)));
|
|
573
590
|
let HunkAccessibleDiffViewer = HunkAccessibleDiffViewer_1 = class HunkAccessibleDiffViewer extends AccessibleDiffViewer {
|
|
574
591
|
set width(value) {
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { Dimension } from '../../../../base/browser/dom.js';
|
|
3
3
|
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
|
+
import { Range } from '../../../../editor/common/core/range.js';
|
|
6
7
|
import { ZoneWidget } from '../../../../editor/contrib/zoneWidget/browser/zoneWidget.js';
|
|
7
8
|
import { localizeWithPath } from '../../../../nls.js';
|
|
8
9
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
9
10
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
10
|
-
import { CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, MENU_INLINE_CHAT_WIDGET,
|
|
11
|
+
import { CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, MENU_INLINE_CHAT_WIDGET, MENU_INLINE_CHAT_WIDGET_STATUS, ACTION_REGENERATE_RESPONSE, ACTION_TOGGLE_DIFF, ACTION_VIEW_IN_CHAT, ACTION_ACCEPT_CHANGES } from '../common/inlineChat.js';
|
|
11
12
|
import { EditorBasedInlineChatWidget } from './inlineChatWidget.js';
|
|
12
13
|
import { MenuId } from '../../../../platform/actions/common/actions.js';
|
|
14
|
+
import { isEqual } from '../../../../base/common/resources.js';
|
|
15
|
+
import { StableEditorBottomScrollState } from '../../../../editor/browser/stableEditorScroll.js';
|
|
16
|
+
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
|
|
13
17
|
const _moduleId = "vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget";
|
|
14
18
|
let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
15
|
-
constructor(editor, _instaService, contextKeyService) {
|
|
19
|
+
constructor(editor, _instaService, contextKeyService, configurationService) {
|
|
16
20
|
super(editor, { showFrame: false, showArrow: false, isAccessible: true, className: 'inline-chat-widget', keepEditorSelection: true, showInHiddenAreas: true, ordinal: 10000 });
|
|
17
21
|
this._instaService = _instaService;
|
|
18
22
|
this._ctxCursorPosition = CTX_INLINE_CHAT_OUTER_CURSOR_POSITION.bindTo(contextKeyService);
|
|
@@ -23,7 +27,6 @@ let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
|
23
27
|
telemetrySource: 'interactiveEditorWidget-toolbar',
|
|
24
28
|
inputMenuId: MenuId.ChatExecute,
|
|
25
29
|
widgetMenuId: MENU_INLINE_CHAT_WIDGET,
|
|
26
|
-
feedbackMenuId: MENU_INLINE_CHAT_WIDGET_FEEDBACK,
|
|
27
30
|
statusMenuId: {
|
|
28
31
|
menu: MENU_INLINE_CHAT_WIDGET_STATUS,
|
|
29
32
|
options: {
|
|
@@ -39,6 +42,12 @@ let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
}
|
|
45
|
+
},
|
|
46
|
+
rendererOptions: {
|
|
47
|
+
renderTextEditsAsSummary: (uri) => {
|
|
48
|
+
return isEqual(uri, editor.getModel()?.uri)
|
|
49
|
+
&& configurationService.getValue("inlineChat.mode" ) === "live" ;
|
|
50
|
+
},
|
|
42
51
|
}
|
|
43
52
|
});
|
|
44
53
|
this._disposables.add(this.widget.onDidChangeHeight(() => {
|
|
@@ -48,11 +57,6 @@ let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
|
48
57
|
}));
|
|
49
58
|
this._disposables.add(this.widget);
|
|
50
59
|
this.create();
|
|
51
|
-
this._disposables.add(addDisposableListener(this.domNode, 'click', e => {
|
|
52
|
-
if (!this.widget.hasFocus()) {
|
|
53
|
-
this.widget.focus();
|
|
54
|
-
}
|
|
55
|
-
}, true));
|
|
56
60
|
const updateCursorIsAboveContextKey = () => {
|
|
57
61
|
if (!this.position || !this.editor.hasModel()) {
|
|
58
62
|
this._ctxCursorPosition.reset();
|
|
@@ -98,12 +102,15 @@ let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
|
98
102
|
}
|
|
99
103
|
show(position) {
|
|
100
104
|
assertType(this.container);
|
|
105
|
+
const scrollState = StableEditorBottomScrollState.capture(this.editor);
|
|
101
106
|
const info = this.editor.getLayoutInfo();
|
|
102
107
|
const marginWithoutIndentation = info.glyphMarginWidth + info.decorationsWidth + info.lineNumbersWidth;
|
|
103
108
|
this.container.style.marginLeft = `${marginWithoutIndentation}px`;
|
|
104
109
|
super.show(position, this._computeHeightInLines());
|
|
105
110
|
this._setWidgetMargins(position);
|
|
106
111
|
this.widget.focus();
|
|
112
|
+
scrollState.restore(this.editor);
|
|
113
|
+
this.editor.revealRangeNearTopIfOutsideViewport(Range.fromPositions(position.delta(-1)), 1 );
|
|
107
114
|
}
|
|
108
115
|
updatePositionAndHeight(position) {
|
|
109
116
|
super.updatePositionAndHeight(position, this._computeHeightInLines());
|
|
@@ -157,6 +164,7 @@ let InlineChatZoneWidget = class InlineChatZoneWidget extends ZoneWidget {
|
|
|
157
164
|
};
|
|
158
165
|
InlineChatZoneWidget = ( (__decorate([
|
|
159
166
|
( (__param(1, IInstantiationService))),
|
|
160
|
-
( (__param(2, IContextKeyService)))
|
|
167
|
+
( (__param(2, IContextKeyService))),
|
|
168
|
+
( (__param(3, IConfigurationService)))
|
|
161
169
|
], InlineChatZoneWidget)));
|
|
162
170
|
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 .zone-widget-container.inside-selection{background-color:var(--vscode-inlineChat-regionHighlight)}.monaco-workbench .inline-chat{background:var(--vscode-inlineChat-background);border:1px solid var(--vscode-inlineChat-border);border-radius:6px;box-shadow:0
|
|
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 .zone-widget-container.inside-selection{background-color:var(--vscode-inlineChat-regionHighlight)}.monaco-workbench .inline-chat{background:var(--vscode-inlineChat-background);border:1px solid var(--vscode-inlineChat-border);border-radius:6px;box-shadow:0 -1px 6px var(--vscode-inlineChat-shadow);color:inherit;margin-top:8px;padding:6px}.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{width:100%}.monaco-workbench .inline-chat .chat-widget .interactive-session .interactive-list .interactive-item-container.interactive-item-compact{padding:4px}.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}.monaco-workbench .inline-chat .status .actions.hidden{display:none}.monaco-workbench .inline-chat .status .label{color:var(--vscode-descriptionForeground);display:inline-flex;font-size:11px;overflow:hidden;padding-left:10px;padding-top:4px}.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 5px}.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{display:flex;padding-top:4px}.monaco-workbench .inline-chat .status .actions>.monaco-button,.monaco-workbench .inline-chat .status .actions>.monaco-button-dropdown{margin-right:6px}.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:2px 4px;white-space:nowrap}.monaco-workbench .inline-chat .status .monaco-toolbar .action-item{padding:0 2px}.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:4px;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
|
|
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 .hidden{display:none}.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 .message{color:var(--vscode-descriptionForeground);display:inline-flex;font-size:11px;overflow:hidden}.monaco-workbench .inline-chat-content-widget .message>.codicon{font-size:12px;line-height:18px;padding-right:5px}";
|
|
3
3
|
n(css,{});
|
|
4
4
|
export { css, css as default };
|