@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,23 +2,32 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { append, clearNode, WindowIntervalTimer, getWindow, $ as $$1, show, hide, scheduleAtNextAnimationFrame } from '../../../../base/browser/dom.js';
|
|
3
3
|
import { alert } from '../../../../base/browser/ui/aria/aria.js';
|
|
4
4
|
import { Button } from '../../../../base/browser/ui/button/button.js';
|
|
5
|
+
import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
5
6
|
import { renderIcon } from '../../../../base/browser/ui/iconLabel/iconLabels.js';
|
|
6
7
|
import { distinct } from '../../../../base/common/arrays.js';
|
|
7
8
|
import { disposableTimeout } from '../../../../base/common/async.js';
|
|
9
|
+
import { CancellationTokenSource } from '../../../../base/common/cancellation.js';
|
|
8
10
|
import { Codicon } from '../../../../base/common/codicons.js';
|
|
9
|
-
import { Emitter } from '../../../../base/common/event.js';
|
|
11
|
+
import { Emitter, Event } from '../../../../base/common/event.js';
|
|
10
12
|
import { MarkdownString } from '../../../../base/common/htmlContent.js';
|
|
11
13
|
import { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';
|
|
12
14
|
import { ResourceMap } from '../../../../base/common/map.js';
|
|
13
|
-
import { FileAccess,
|
|
15
|
+
import { FileAccess, Schemas, matchesSomeScheme } from '../../../../base/common/network.js';
|
|
14
16
|
import { clamp } from '../../../../base/common/numbers.js';
|
|
17
|
+
import '../../../../base/common/observableInternal/derived.js';
|
|
18
|
+
import { autorun } from '../../../../base/common/observableInternal/autorun.js';
|
|
19
|
+
import { constObservable } from '../../../../base/common/observableInternal/utils.js';
|
|
15
20
|
import { basename } from '../../../../base/common/path.js';
|
|
16
21
|
import { basenameOrAuthority } from '../../../../base/common/resources.js';
|
|
17
22
|
import { equalsIgnoreCase } from '../../../../base/common/strings.js';
|
|
18
23
|
import { ThemeIcon } from '../../../../base/common/themables.js';
|
|
24
|
+
import { isUndefined } from '../../../../base/common/types.js';
|
|
19
25
|
import { URI } from '../../../../base/common/uri.js';
|
|
20
26
|
import { MarkdownRenderer } from '../../../../editor/browser/widget/markdownRenderer/browser/markdownRenderer.js';
|
|
21
27
|
import { Range } from '../../../../editor/common/core/range.js';
|
|
28
|
+
import { TextEdit } from '../../../../editor/common/languages.js';
|
|
29
|
+
import { createTextBufferFactoryFromSnapshot } from '../../../../editor/common/model/textModel.js';
|
|
30
|
+
import { IModelService } from '../../../../editor/common/services/model.js';
|
|
22
31
|
import { ITextModelService } from '../../../../editor/common/services/resolverService.js';
|
|
23
32
|
import { localizeWithPath } from '../../../../nls.js';
|
|
24
33
|
import { createActionViewItem, MenuEntryActionViewItem } from '../../../../platform/actions/browser/menuEntryActionViewItem.js';
|
|
@@ -28,6 +37,7 @@ import { ICommandService } from '../../../../platform/commands/common/commands.s
|
|
|
28
37
|
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
|
|
29
38
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
30
39
|
import { FileKind, FileType } from '../../../../platform/files/common/files.js';
|
|
40
|
+
import { IHoverService } from '../../../../platform/hover/browser/hover.service.js';
|
|
31
41
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
32
42
|
import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js';
|
|
33
43
|
import { WorkbenchCompressibleAsyncDataTree, WorkbenchList } from '../../../../platform/list/browser/listService.js';
|
|
@@ -38,9 +48,11 @@ import { ColorScheme } from '../../../../platform/theme/common/theme.js';
|
|
|
38
48
|
import { IThemeService } from '../../../../platform/theme/common/themeService.service.js';
|
|
39
49
|
import { ResourceLabels } from '../../../browser/labels.js';
|
|
40
50
|
import { GeneratingPhrase } from './chat.js';
|
|
51
|
+
import { ChatAgentHover } from './chatAgentHover.js';
|
|
41
52
|
import { ChatFollowups } from './chatFollowups.js';
|
|
42
53
|
import { ChatMarkdownDecorationsRenderer } from './chatMarkdownDecorationsRenderer.js';
|
|
43
|
-
import { ChatCodeBlockContentProvider, parseLocalFileData, CodeBlockPart, localFileLanguageId } from './codeBlockPart.js';
|
|
54
|
+
import { ChatCodeBlockContentProvider, parseLocalFileData, CodeBlockPart, CodeCompareBlockPart, localFileLanguageId } from './codeBlockPart.js';
|
|
55
|
+
import { IChatAgentNameService } from '../common/chatAgents.service.js';
|
|
44
56
|
import { CONTEXT_RESPONSE, CONTEXT_REQUEST, CONTEXT_RESPONSE_DETECTED_AGENT_COMMAND, CONTEXT_CHAT_RESPONSE_SUPPORT_ISSUE_REPORTING, CONTEXT_RESPONSE_VOTE, CONTEXT_RESPONSE_FILTERED } from '../common/chatContextKeys.js';
|
|
45
57
|
import { chatAgentLeader, chatSubcommandLeader } from '../common/chatParserTypes.js';
|
|
46
58
|
import { InteractiveSessionVoteDirection } from '../common/chatService.js';
|
|
@@ -49,13 +61,15 @@ import { isResponseVM, isRequestVM, isWelcomeVM } from '../common/chatViewModel.
|
|
|
49
61
|
import { getNWords } from '../common/chatWordCounter.js';
|
|
50
62
|
import { createFileIconThemableTreeContainerScope } from '../../files/browser/views/explorerView.js';
|
|
51
63
|
import { annotateSpecialMarkdownContent } from '../common/annotations.js';
|
|
64
|
+
import { DefaultModelSHA1Computer } from '../../../../editor/common/services/modelService.js';
|
|
65
|
+
import { generateUuid } from '../../../../base/common/uuid.js';
|
|
52
66
|
var ChatListItemRenderer_1, ContentReferencesListRenderer_1;
|
|
53
67
|
const _moduleId = "vs/workbench/contrib/chat/browser/chatListRenderer";
|
|
54
68
|
const $ = $$1;
|
|
55
69
|
let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
56
70
|
static { ChatListItemRenderer_1 = this; }
|
|
57
71
|
static { this.ID = 'item'; }
|
|
58
|
-
constructor(editorOptions, location, rendererOptions, delegate, codeBlockModelCollection, overflowWidgetsDomNode, instantiationService, configService, logService, openerService, contextKeyService, themeService, commandService, textModelService) {
|
|
72
|
+
constructor(editorOptions, location, rendererOptions, delegate, codeBlockModelCollection, overflowWidgetsDomNode, instantiationService, configService, logService, openerService, contextKeyService, themeService, commandService, textModelService, modelService, hoverService, chatAgentNameService) {
|
|
59
73
|
super();
|
|
60
74
|
this.location = location;
|
|
61
75
|
this.rendererOptions = rendererOptions;
|
|
@@ -68,6 +82,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
68
82
|
this.themeService = themeService;
|
|
69
83
|
this.commandService = commandService;
|
|
70
84
|
this.textModelService = textModelService;
|
|
85
|
+
this.modelService = modelService;
|
|
86
|
+
this.hoverService = hoverService;
|
|
87
|
+
this.chatAgentNameService = chatAgentNameService;
|
|
71
88
|
this.codeBlocksByResponseId = ( (new Map()));
|
|
72
89
|
this.codeBlocksByEditorUri = ( (new ResourceMap()));
|
|
73
90
|
this.fileTreesByResponseId = ( (new Map()));
|
|
@@ -83,6 +100,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
83
100
|
this.renderer = this._register(this.instantiationService.createInstance(MarkdownRenderer, {}));
|
|
84
101
|
this.markdownDecorationsRenderer = this.instantiationService.createInstance(ChatMarkdownDecorationsRenderer);
|
|
85
102
|
this._editorPool = this._register(this.instantiationService.createInstance(EditorPool, editorOptions, delegate, overflowWidgetsDomNode));
|
|
103
|
+
this._diffEditorPool = this._register(this.instantiationService.createInstance(DiffEditorPool, editorOptions, delegate, overflowWidgetsDomNode));
|
|
86
104
|
this._treePool = this._register(this.instantiationService.createInstance(TreePool, this._onDidChangeVisibility.event));
|
|
87
105
|
this._contentReferencesListPool = this._register(this.instantiationService.createInstance(ContentReferencesListPool, this._onDidChangeVisibility.event));
|
|
88
106
|
this._register(this.instantiationService.createInstance(ChatCodeBlockContentProvider));
|
|
@@ -145,6 +163,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
145
163
|
for (const editor of this._editorPool.inUse()) {
|
|
146
164
|
editor.layout(this._currentLayoutWidth);
|
|
147
165
|
}
|
|
166
|
+
for (const diffEditor of this._diffEditorPool.inUse()) {
|
|
167
|
+
diffEditor.layout(this._currentLayoutWidth);
|
|
168
|
+
}
|
|
148
169
|
}
|
|
149
170
|
renderTemplate(container) {
|
|
150
171
|
const templateDisposables = ( (new DisposableStore()));
|
|
@@ -188,13 +209,22 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
188
209
|
}
|
|
189
210
|
}));
|
|
190
211
|
}
|
|
191
|
-
const
|
|
212
|
+
const agentHover = templateDisposables.add(this.instantiationService.createInstance(ChatAgentHover));
|
|
213
|
+
templateDisposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), header, () => {
|
|
214
|
+
if (isResponseVM(template.currentElement) && template.currentElement.agent) {
|
|
215
|
+
agentHover.setAgent(template.currentElement.agent.id);
|
|
216
|
+
return agentHover.domNode;
|
|
217
|
+
}
|
|
218
|
+
return undefined;
|
|
219
|
+
}));
|
|
220
|
+
const template = { avatarContainer, agentAvatarContainer, username, detail, referencesListContainer, value, rowContainer, elementDisposables, titleToolbar, templateDisposables, contextKeyService, agentHover };
|
|
192
221
|
return template;
|
|
193
222
|
}
|
|
194
223
|
renderElement(node, index, templateData) {
|
|
195
224
|
this.renderChatTreeItem(node.element, index, templateData);
|
|
196
225
|
}
|
|
197
226
|
renderChatTreeItem(element, index, templateData) {
|
|
227
|
+
templateData.currentElement = element;
|
|
198
228
|
const kind = isRequestVM(element) ? 'request' :
|
|
199
229
|
isResponseVM(element) ? 'response' :
|
|
200
230
|
'welcome';
|
|
@@ -260,9 +290,20 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
260
290
|
}
|
|
261
291
|
}
|
|
262
292
|
renderDetail(element, templateData) {
|
|
263
|
-
let
|
|
293
|
+
let agentName = constObservable(undefined);
|
|
264
294
|
if (element.agent && !element.agent.isDefault) {
|
|
265
|
-
|
|
295
|
+
const name = element.agent.name;
|
|
296
|
+
agentName = ( (this.chatAgentNameService.getAgentNameRestriction(element.agent)
|
|
297
|
+
.map(allowed => allowed ? name : name)));
|
|
298
|
+
}
|
|
299
|
+
templateData.elementDisposables.add(autorun(reader => {
|
|
300
|
+
this._renderDetail(element, agentName.read(reader), templateData);
|
|
301
|
+
}));
|
|
302
|
+
}
|
|
303
|
+
_renderDetail(element, agentName, templateData) {
|
|
304
|
+
let progressMsg = '';
|
|
305
|
+
if (!isUndefined(agentName)) {
|
|
306
|
+
let usingMsg = chatAgentLeader + agentName;
|
|
266
307
|
if (element.slashCommand) {
|
|
267
308
|
usingMsg += ` ${chatSubcommandLeader}${element.slashCommand.name}`;
|
|
268
309
|
}
|
|
@@ -275,8 +316,8 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
275
316
|
}
|
|
276
317
|
else if (element.agentOrSlashCommandDetected) {
|
|
277
318
|
const usingMsg = [];
|
|
278
|
-
if (
|
|
279
|
-
usingMsg.push(chatAgentLeader +
|
|
319
|
+
if (!isUndefined(agentName)) {
|
|
320
|
+
usingMsg.push(chatAgentLeader + agentName);
|
|
280
321
|
}
|
|
281
322
|
if (element.slashCommand) {
|
|
282
323
|
usingMsg.push(chatSubcommandLeader + element.slashCommand.name);
|
|
@@ -294,12 +335,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
294
335
|
progressMsg = GeneratingPhrase;
|
|
295
336
|
}
|
|
296
337
|
templateData.detail.textContent = progressMsg;
|
|
297
|
-
if (element.agent) {
|
|
298
|
-
templateData.detail.title = progressMsg + (element.slashCommand?.description ? `\n${element.slashCommand.description}` : '');
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
templateData.detail.title = '';
|
|
302
|
-
}
|
|
303
338
|
}
|
|
304
339
|
renderAvatar(element, templateData) {
|
|
305
340
|
if (URI.isUri(element.avatarIcon)) {
|
|
@@ -370,7 +405,8 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
370
405
|
? this.renderMarkdown(data.content, element, templateData, fillInIncompleteTokens)
|
|
371
406
|
: data.kind === 'progressMessage' && onlyProgressMessagesAfterI(value, index) ? this.renderProgressMessage(data, false)
|
|
372
407
|
: data.kind === 'command' ? this.renderCommandButton(element, data)
|
|
373
|
-
:
|
|
408
|
+
: data.kind === 'textEditGroup' ? this.renderTextEdit(element, data, templateData)
|
|
409
|
+
: undefined;
|
|
374
410
|
if (result) {
|
|
375
411
|
templateData.value.appendChild(result.element);
|
|
376
412
|
templateData.elementDisposables.add(result);
|
|
@@ -382,18 +418,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
382
418
|
const renderedError = templateData.elementDisposables.add(this.renderer.render(( (new MarkdownString(element.errorDetails.message)))));
|
|
383
419
|
errorDetails.appendChild($('span', undefined, renderedError.element));
|
|
384
420
|
}
|
|
385
|
-
if (isResponseVM(element) && element.isComplete && element.response.value.length === 0) {
|
|
386
|
-
let madeChanges = false;
|
|
387
|
-
for (const item of ( (element.edits.values()))) {
|
|
388
|
-
if (item.length > 0) {
|
|
389
|
-
madeChanges = true;
|
|
390
|
-
break;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
if (madeChanges) {
|
|
394
|
-
append(templateData.value, $('.interactive-edits-summary', undefined, ( localizeWithPath(_moduleId, 2, "Made changes."))));
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
421
|
const newHeight = templateData.rowContainer.offsetHeight;
|
|
398
422
|
const fireEvent = !element.currentRenderedHeight || element.currentRenderedHeight !== newHeight;
|
|
399
423
|
element.currentRenderedHeight = newHeight;
|
|
@@ -463,6 +487,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
463
487
|
else if (part.kind === 'command') {
|
|
464
488
|
partsToRender[index] = part;
|
|
465
489
|
}
|
|
490
|
+
else if (part.kind === 'textEditGroup') {
|
|
491
|
+
partsToRender[index] = part;
|
|
492
|
+
}
|
|
466
493
|
else {
|
|
467
494
|
const wordCountResult = this.getDataForProgressiveRender(element, contentToMarkdown(part.content), { renderedWordCount: 0, lastRenderTime: 0 });
|
|
468
495
|
if (wordCountResult !== undefined) {
|
|
@@ -471,6 +498,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
471
498
|
renderedWordCount: wordCountResult.actualWordCount,
|
|
472
499
|
lastRenderTime: Date.now(),
|
|
473
500
|
isFullyRendered: wordCountResult.isFullString,
|
|
501
|
+
originalMarkdown: part.content,
|
|
474
502
|
};
|
|
475
503
|
wordCountResults[index] = wordCountResult;
|
|
476
504
|
}
|
|
@@ -484,6 +512,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
484
512
|
renderedWordCount: wordCountResult.actualWordCount,
|
|
485
513
|
lastRenderTime: Date.now(),
|
|
486
514
|
isFullyRendered: wordCountResult.isFullString,
|
|
515
|
+
originalMarkdown: part.content,
|
|
487
516
|
};
|
|
488
517
|
wordCountResults[index] = wordCountResult;
|
|
489
518
|
}
|
|
@@ -530,9 +559,15 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
530
559
|
else if (isCommandButtonRenderData(partToRender)) {
|
|
531
560
|
result = this.renderCommandButton(element, partToRender);
|
|
532
561
|
}
|
|
562
|
+
else if (isTextEditRenderData(partToRender)) {
|
|
563
|
+
result = this.renderTextEdit(element, partToRender, templateData);
|
|
564
|
+
}
|
|
533
565
|
else if (!hasRenderedOneMarkdownBlock && wordCountResults[index]) {
|
|
534
566
|
const { value } = wordCountResults[index];
|
|
535
|
-
|
|
567
|
+
const part = partsToRender[index];
|
|
568
|
+
const originalMarkdown = 'originalMarkdown' in part ? part.originalMarkdown : undefined;
|
|
569
|
+
const markdownToRender = ( (new MarkdownString(value, originalMarkdown)));
|
|
570
|
+
result = this.renderMarkdown(markdownToRender, element, templateData, true);
|
|
536
571
|
hasRenderedOneMarkdownBlock = true;
|
|
537
572
|
}
|
|
538
573
|
if (result === undefined) {
|
|
@@ -627,8 +662,8 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
627
662
|
renderContentReferencesListData(data, element, templateData) {
|
|
628
663
|
const listDisposables = ( (new DisposableStore()));
|
|
629
664
|
const referencesLabel = data.length > 1 ?
|
|
630
|
-
( localizeWithPath(_moduleId,
|
|
631
|
-
( localizeWithPath(_moduleId,
|
|
665
|
+
( localizeWithPath(_moduleId, 2, "Used {0} references", data.length)) :
|
|
666
|
+
( localizeWithPath(_moduleId, 3, "Used {0} reference", 1));
|
|
632
667
|
const iconElement = $('.chat-used-context-icon');
|
|
633
668
|
const icon = (element) => element.usedReferencesExpanded ? Codicon.chevronDown : Codicon.chevronRight;
|
|
634
669
|
iconElement.classList.add(...ThemeIcon.asClassNameArray(icon(element)));
|
|
@@ -695,7 +730,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
695
730
|
};
|
|
696
731
|
}
|
|
697
732
|
updateAriaLabel(element, label, expanded) {
|
|
698
|
-
element.ariaLabel = expanded ? ( localizeWithPath(_moduleId,
|
|
733
|
+
element.ariaLabel = expanded ? ( localizeWithPath(_moduleId, 4, "{0}, expanded", label)) : ( localizeWithPath(_moduleId, 5, "{0}, collapsed", label));
|
|
699
734
|
}
|
|
700
735
|
renderProgressMessage(progress, showSpinner) {
|
|
701
736
|
if (showSpinner) {
|
|
@@ -715,7 +750,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
715
750
|
const enabled = !isResponseVM(element) || !element.isStale;
|
|
716
751
|
const tooltip = enabled ?
|
|
717
752
|
commandButton.command.tooltip :
|
|
718
|
-
( localizeWithPath(_moduleId,
|
|
753
|
+
( localizeWithPath(_moduleId, 6, "Button not available in restored chat"));
|
|
719
754
|
const button = disposables.add(( (new Button(container, { ...defaultButtonStyles, supportIcons: true, title: tooltip }))));
|
|
720
755
|
button.label = commandButton.command.title;
|
|
721
756
|
button.enabled = enabled;
|
|
@@ -727,17 +762,82 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
727
762
|
element: container
|
|
728
763
|
};
|
|
729
764
|
}
|
|
765
|
+
renderTextEdit(element, chatTextEdit, templateData) {
|
|
766
|
+
if (this.rendererOptions.renderTextEditsAsSummary?.(chatTextEdit.uri)) {
|
|
767
|
+
if (isResponseVM(element) && element.response.value.every(item => item.kind === 'textEditGroup')) {
|
|
768
|
+
return {
|
|
769
|
+
element: $('.interactive-edits-summary', undefined, !element.isComplete ? ( localizeWithPath(_moduleId, 7, "Making changes...")) : ( localizeWithPath(_moduleId, 8, "Made changes."))),
|
|
770
|
+
dispose() { }
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
return undefined;
|
|
774
|
+
}
|
|
775
|
+
const store = ( (new DisposableStore()));
|
|
776
|
+
const cts = ( (new CancellationTokenSource()));
|
|
777
|
+
let isDisposed = false;
|
|
778
|
+
store.add(toDisposable(() => {
|
|
779
|
+
isDisposed = true;
|
|
780
|
+
cts.dispose(true);
|
|
781
|
+
}));
|
|
782
|
+
const ref = this._diffEditorPool.get();
|
|
783
|
+
store.add(ref.object.onDidChangeContentHeight(() => {
|
|
784
|
+
ref.object.layout(this._currentLayoutWidth);
|
|
785
|
+
this._onDidChangeItemHeight.fire({ element, height: templateData.rowContainer.offsetHeight });
|
|
786
|
+
}));
|
|
787
|
+
const data = {
|
|
788
|
+
element,
|
|
789
|
+
edit: chatTextEdit,
|
|
790
|
+
diffData: (async () => {
|
|
791
|
+
const ref = await this.textModelService.createModelReference(chatTextEdit.uri);
|
|
792
|
+
if (isDisposed) {
|
|
793
|
+
ref.dispose();
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
796
|
+
store.add(ref);
|
|
797
|
+
const original = ref.object.textEditorModel;
|
|
798
|
+
let originalSha1 = '';
|
|
799
|
+
if (chatTextEdit.state) {
|
|
800
|
+
originalSha1 = chatTextEdit.state.sha1;
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
const sha1 = ( (new DefaultModelSHA1Computer()));
|
|
804
|
+
if (sha1.canComputeSHA1(original)) {
|
|
805
|
+
originalSha1 = sha1.computeSHA1(original);
|
|
806
|
+
chatTextEdit.state = { sha1: originalSha1, applied: 0 };
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
const modified = this.modelService.createModel(createTextBufferFactoryFromSnapshot(original.createSnapshot()), { languageId: original.getLanguageId(), onDidChange: Event.None }, ( (URI.from(
|
|
810
|
+
{ scheme: Schemas.vscodeChatCodeBlock, path: original.uri.path, query: generateUuid() }
|
|
811
|
+
))), false);
|
|
812
|
+
store.add(modified);
|
|
813
|
+
if (!chatTextEdit.state?.applied) {
|
|
814
|
+
for (const group of chatTextEdit.edits) {
|
|
815
|
+
const edits = ( (group.map(TextEdit.asEditOperation)));
|
|
816
|
+
modified.pushEditOperations(null, edits, () => null);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
return {
|
|
820
|
+
modified,
|
|
821
|
+
original,
|
|
822
|
+
originalSha1
|
|
823
|
+
};
|
|
824
|
+
})()
|
|
825
|
+
};
|
|
826
|
+
ref.object.render(data, this._currentLayoutWidth, cts.token);
|
|
827
|
+
return {
|
|
828
|
+
element: ref.object.element,
|
|
829
|
+
dispose() {
|
|
830
|
+
store.dispose();
|
|
831
|
+
},
|
|
832
|
+
};
|
|
833
|
+
}
|
|
730
834
|
renderMarkdown(markdown, element, templateData, fillInIncompleteTokens = false) {
|
|
731
835
|
const disposables = ( (new DisposableStore()));
|
|
732
|
-
markdown = ( (new MarkdownString(markdown.value, {
|
|
733
|
-
isTrusted: {
|
|
734
|
-
enabledCommands: typeof markdown.isTrusted === 'object' ? markdown.isTrusted?.enabledCommands : [] ?? []
|
|
735
|
-
}
|
|
736
|
-
})));
|
|
737
836
|
const orderedDisposablesList = [];
|
|
738
837
|
const codeblocks = [];
|
|
739
838
|
let codeBlockIndex = 0;
|
|
740
839
|
const result = this.renderer.render(markdown, {
|
|
840
|
+
disallowRemoteImages: true,
|
|
741
841
|
fillInIncompleteTokens,
|
|
742
842
|
codeBlockRendererSync: (languageId, text) => {
|
|
743
843
|
const index = codeBlockIndex++;
|
|
@@ -794,7 +894,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
794
894
|
this.codeBlocksByResponseId.set(element.id, codeblocks);
|
|
795
895
|
disposables.add(toDisposable(() => this.codeBlocksByResponseId.delete(element.id)));
|
|
796
896
|
}
|
|
797
|
-
this.markdownDecorationsRenderer.walkTreeAndAnnotateReferenceLinks(result.element);
|
|
897
|
+
disposables.add(this.markdownDecorationsRenderer.walkTreeAndAnnotateReferenceLinks(result.element));
|
|
798
898
|
orderedDisposablesList.reverse().forEach(d => disposables.add(d));
|
|
799
899
|
return {
|
|
800
900
|
element: result.element,
|
|
@@ -842,7 +942,10 @@ ChatListItemRenderer = ChatListItemRenderer_1 = ( (__decorate([
|
|
|
842
942
|
( (__param(10, IContextKeyService))),
|
|
843
943
|
( (__param(11, IThemeService))),
|
|
844
944
|
( (__param(12, ICommandService))),
|
|
845
|
-
( (__param(13, ITextModelService)))
|
|
945
|
+
( (__param(13, ITextModelService))),
|
|
946
|
+
( (__param(14, IModelService))),
|
|
947
|
+
( (__param(15, IHoverService))),
|
|
948
|
+
( (__param(16, IChatAgentNameService)))
|
|
846
949
|
], ChatListItemRenderer)));
|
|
847
950
|
let ChatListDelegate = class ChatListDelegate {
|
|
848
951
|
constructor(defaultElementHeight, logService) {
|
|
@@ -897,6 +1000,33 @@ let EditorPool = class EditorPool extends Disposable {
|
|
|
897
1000
|
EditorPool = ( (__decorate([
|
|
898
1001
|
( (__param(3, IInstantiationService)))
|
|
899
1002
|
], EditorPool)));
|
|
1003
|
+
let DiffEditorPool = class DiffEditorPool extends Disposable {
|
|
1004
|
+
inUse() {
|
|
1005
|
+
return this._pool.inUse;
|
|
1006
|
+
}
|
|
1007
|
+
constructor(options, delegate, overflowWidgetsDomNode, instantiationService) {
|
|
1008
|
+
super();
|
|
1009
|
+
this._pool = this._register(( (new ResourcePool(() => {
|
|
1010
|
+
return instantiationService.createInstance(CodeCompareBlockPart, options, MenuId.ChatCompareBlock, delegate, overflowWidgetsDomNode);
|
|
1011
|
+
}))));
|
|
1012
|
+
}
|
|
1013
|
+
get() {
|
|
1014
|
+
const codeBlock = this._pool.get();
|
|
1015
|
+
let stale = false;
|
|
1016
|
+
return {
|
|
1017
|
+
object: codeBlock,
|
|
1018
|
+
isStale: () => stale,
|
|
1019
|
+
dispose: () => {
|
|
1020
|
+
codeBlock.reset();
|
|
1021
|
+
stale = true;
|
|
1022
|
+
this._pool.release(codeBlock);
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
};
|
|
1027
|
+
DiffEditorPool = ( (__decorate([
|
|
1028
|
+
( (__param(3, IInstantiationService)))
|
|
1029
|
+
], DiffEditorPool)));
|
|
900
1030
|
let TreePool = class TreePool extends Disposable {
|
|
901
1031
|
get inUse() {
|
|
902
1032
|
return this._pool.inUse;
|
|
@@ -910,7 +1040,7 @@ let TreePool = class TreePool extends Disposable {
|
|
|
910
1040
|
this._pool = this._register(( (new ResourcePool(() => this.treeFactory()))));
|
|
911
1041
|
}
|
|
912
1042
|
treeFactory() {
|
|
913
|
-
const resourceLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this._onDidChangeVisibility });
|
|
1043
|
+
const resourceLabels = this._register(this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this._onDidChangeVisibility }));
|
|
914
1044
|
const container = $('.interactive-response-progress-tree');
|
|
915
1045
|
this._register(createFileIconThemableTreeContainerScope(container, this.themeService));
|
|
916
1046
|
const tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'ChatListRenderer', container, ( (new ChatListTreeDelegate())), ( (new ChatListTreeCompressionDelegate())), [( (new ChatListTreeRenderer(resourceLabels, this.configService.getValue('explorer.decorations'))))], ( (new ChatListTreeDataSource())), {
|
|
@@ -921,7 +1051,7 @@ let TreePool = class TreePool extends Disposable {
|
|
|
921
1051
|
},
|
|
922
1052
|
accessibilityProvider: {
|
|
923
1053
|
getAriaLabel: (element) => element.label,
|
|
924
|
-
getWidgetAriaLabel: () => ( localizeWithPath(_moduleId,
|
|
1054
|
+
getWidgetAriaLabel: () => ( localizeWithPath(_moduleId, 9, "File Tree"))
|
|
925
1055
|
},
|
|
926
1056
|
alwaysConsumeMouseWheel: false
|
|
927
1057
|
});
|
|
@@ -957,7 +1087,7 @@ let ContentReferencesListPool = class ContentReferencesListPool extends Disposab
|
|
|
957
1087
|
this._pool = this._register(( (new ResourcePool(() => this.listFactory()))));
|
|
958
1088
|
}
|
|
959
1089
|
listFactory() {
|
|
960
|
-
const resourceLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this._onDidChangeVisibility });
|
|
1090
|
+
const resourceLabels = this._register(this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this._onDidChangeVisibility }));
|
|
961
1091
|
const container = $('.chat-used-context-list');
|
|
962
1092
|
this._register(createFileIconThemableTreeContainerScope(container, this.themeService));
|
|
963
1093
|
const list = this.instantiationService.createInstance(WorkbenchList, 'ChatListRenderer', container, ( (new ContentReferencesListDelegate())), [this.instantiationService.createInstance(ContentReferencesListRenderer, resourceLabels)], {
|
|
@@ -975,7 +1105,27 @@ let ContentReferencesListPool = class ContentReferencesListPool extends Disposab
|
|
|
975
1105
|
return basename(reference.uri.path);
|
|
976
1106
|
}
|
|
977
1107
|
},
|
|
978
|
-
getWidgetAriaLabel: () => ( localizeWithPath(_moduleId,
|
|
1108
|
+
getWidgetAriaLabel: () => ( localizeWithPath(_moduleId, 10, "Used References"))
|
|
1109
|
+
},
|
|
1110
|
+
dnd: {
|
|
1111
|
+
getDragURI: ({ reference }) => {
|
|
1112
|
+
if ('variableName' in reference) {
|
|
1113
|
+
return null;
|
|
1114
|
+
}
|
|
1115
|
+
else if (URI.isUri(reference)) {
|
|
1116
|
+
return (
|
|
1117
|
+
(reference.toString())
|
|
1118
|
+
);
|
|
1119
|
+
}
|
|
1120
|
+
else {
|
|
1121
|
+
return (
|
|
1122
|
+
(reference.uri.toString())
|
|
1123
|
+
);
|
|
1124
|
+
}
|
|
1125
|
+
},
|
|
1126
|
+
dispose: () => { },
|
|
1127
|
+
onDragOver: () => false,
|
|
1128
|
+
drop: () => { },
|
|
979
1129
|
},
|
|
980
1130
|
});
|
|
981
1131
|
return list;
|
|
@@ -1020,6 +1170,7 @@ let ContentReferencesListRenderer = class ContentReferencesListRenderer {
|
|
|
1020
1170
|
}
|
|
1021
1171
|
renderElement(data, index, templateData, height) {
|
|
1022
1172
|
const reference = data.reference;
|
|
1173
|
+
const icon = data.iconPath;
|
|
1023
1174
|
templateData.label.element.style.display = 'flex';
|
|
1024
1175
|
if ('variableName' in reference) {
|
|
1025
1176
|
if (reference.value) {
|
|
@@ -1028,8 +1179,8 @@ let ContentReferencesListRenderer = class ContentReferencesListRenderer {
|
|
|
1028
1179
|
resource: uri,
|
|
1029
1180
|
name: basenameOrAuthority(uri),
|
|
1030
1181
|
description: `#${reference.variableName}`,
|
|
1031
|
-
range: 'range' in reference.value ? reference.value.range : undefined
|
|
1032
|
-
});
|
|
1182
|
+
range: 'range' in reference.value ? reference.value.range : undefined,
|
|
1183
|
+
}, { icon });
|
|
1033
1184
|
}
|
|
1034
1185
|
else {
|
|
1035
1186
|
const variable = this.chatVariablesService.getVariable(reference.variableName);
|
|
@@ -1039,7 +1190,7 @@ let ContentReferencesListRenderer = class ContentReferencesListRenderer {
|
|
|
1039
1190
|
else {
|
|
1040
1191
|
const uri = 'uri' in reference ? reference.uri : reference;
|
|
1041
1192
|
if (matchesSomeScheme(uri, Schemas.mailto, Schemas.http, Schemas.https)) {
|
|
1042
|
-
templateData.label.setResource({ resource: uri, name: ( (uri.toString())) }, { icon: Codicon.globe });
|
|
1193
|
+
templateData.label.setResource({ resource: uri, name: ( (uri.toString())) }, { icon: icon ?? Codicon.globe });
|
|
1043
1194
|
}
|
|
1044
1195
|
else {
|
|
1045
1196
|
templateData.label.setFile(uri, {
|
|
@@ -1167,6 +1318,9 @@ function isProgressMessageRenderData(item) {
|
|
|
1167
1318
|
function isCommandButtonRenderData(item) {
|
|
1168
1319
|
return item && 'kind' in item && item.kind === 'command';
|
|
1169
1320
|
}
|
|
1321
|
+
function isTextEditRenderData(item) {
|
|
1322
|
+
return item && 'kind' in item && item.kind === 'textEditGroup';
|
|
1323
|
+
}
|
|
1170
1324
|
function isMarkdownRenderData(item) {
|
|
1171
1325
|
return item && 'renderedWordCount' in item;
|
|
1172
1326
|
}
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { $ } from '../../../../base/browser/dom.js';
|
|
3
3
|
import { toErrorMessage } from '../../../../base/common/errorMessage.js';
|
|
4
|
+
import { DisposableStore } from '../../../../base/common/lifecycle.js';
|
|
4
5
|
import { revive } from '../../../../base/common/marshalling.js';
|
|
5
6
|
import { URI } from '../../../../base/common/uri.js';
|
|
7
|
+
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
6
8
|
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
7
9
|
import { ILabelService } from '../../../../platform/label/common/label.service.js';
|
|
8
10
|
import { ILogService } from '../../../../platform/log/common/log.service.js';
|
|
9
|
-
import {
|
|
11
|
+
import { ChatAgentHover } from './chatAgentHover.js';
|
|
12
|
+
import { IChatAgentService } from '../common/chatAgents.service.js';
|
|
13
|
+
import { ChatRequestTextPart, ChatRequestAgentPart, ChatRequestDynamicVariablePart } from '../common/chatParserTypes.js';
|
|
10
14
|
import { contentRefUrl } from '../common/annotations.js';
|
|
15
|
+
import { IHoverService } from '../../../../platform/hover/browser/hover.service.js';
|
|
16
|
+
import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
11
17
|
const variableRefUrl = 'http://_vscodedecoration_';
|
|
18
|
+
const agentRefUrl = 'http://_chatagent_';
|
|
12
19
|
let ChatMarkdownDecorationsRenderer = class ChatMarkdownDecorationsRenderer {
|
|
13
|
-
constructor(keybindingService, labelService, logService) {
|
|
20
|
+
constructor(keybindingService, labelService, logService, chatAgentService, instantiationService, hoverService) {
|
|
14
21
|
this.keybindingService = keybindingService;
|
|
15
22
|
this.labelService = labelService;
|
|
16
23
|
this.logService = logService;
|
|
24
|
+
this.chatAgentService = chatAgentService;
|
|
25
|
+
this.instantiationService = instantiationService;
|
|
26
|
+
this.hoverService = hoverService;
|
|
17
27
|
}
|
|
18
28
|
convertParsedRequestToMarkdown(parsedRequest) {
|
|
19
29
|
let result = '';
|
|
@@ -21,22 +31,36 @@ let ChatMarkdownDecorationsRenderer = class ChatMarkdownDecorationsRenderer {
|
|
|
21
31
|
if (part instanceof ChatRequestTextPart) {
|
|
22
32
|
result += part.text;
|
|
23
33
|
}
|
|
34
|
+
else if (part instanceof ChatRequestAgentPart) {
|
|
35
|
+
let text = part.text;
|
|
36
|
+
const isDupe = this.chatAgentService.getAgentsByName(part.agent.name).length > 1;
|
|
37
|
+
if (isDupe) {
|
|
38
|
+
text += ` (${part.agent.extensionPublisherDisplayName})`;
|
|
39
|
+
}
|
|
40
|
+
result += `[${text}](${agentRefUrl}?${encodeURIComponent(part.agent.id)})`;
|
|
41
|
+
}
|
|
24
42
|
else {
|
|
25
43
|
const uri = part instanceof ChatRequestDynamicVariablePart && ( part.data.map(d => d.value)).find((d) => d instanceof URI)
|
|
26
44
|
|| undefined;
|
|
27
45
|
const title = uri ? encodeURIComponent(this.labelService.getUriLabel(uri, { relative: true })) :
|
|
28
46
|
part instanceof ChatRequestAgentPart ? part.agent.id :
|
|
29
47
|
'';
|
|
30
|
-
|
|
48
|
+
const text = part.text;
|
|
49
|
+
result += `[${text}](${variableRefUrl}?${title})`;
|
|
31
50
|
}
|
|
32
51
|
}
|
|
33
52
|
return result;
|
|
34
53
|
}
|
|
35
54
|
walkTreeAndAnnotateReferenceLinks(element) {
|
|
55
|
+
const store = ( new DisposableStore());
|
|
36
56
|
element.querySelectorAll('a').forEach(a => {
|
|
37
57
|
const href = a.getAttribute('data-href');
|
|
38
58
|
if (href) {
|
|
39
|
-
if (href.startsWith(
|
|
59
|
+
if (href.startsWith(agentRefUrl)) {
|
|
60
|
+
const title = decodeURIComponent(href.slice(agentRefUrl.length + 1));
|
|
61
|
+
a.parentElement.replaceChild(this.renderAgentWidget(a.textContent, title, store), a);
|
|
62
|
+
}
|
|
63
|
+
else if (href.startsWith(variableRefUrl)) {
|
|
40
64
|
const title = decodeURIComponent(href.slice(variableRefUrl.length + 1));
|
|
41
65
|
a.parentElement.replaceChild(this.renderResourceWidget(a.textContent, title), a);
|
|
42
66
|
}
|
|
@@ -48,6 +72,16 @@ let ChatMarkdownDecorationsRenderer = class ChatMarkdownDecorationsRenderer {
|
|
|
48
72
|
}
|
|
49
73
|
}
|
|
50
74
|
});
|
|
75
|
+
return store;
|
|
76
|
+
}
|
|
77
|
+
renderAgentWidget(name, id, store) {
|
|
78
|
+
const container = $('span.chat-resource-widget', undefined, $('span', undefined, name));
|
|
79
|
+
store.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('element'), container, () => {
|
|
80
|
+
const hover = store.add(this.instantiationService.createInstance(ChatAgentHover));
|
|
81
|
+
hover.setAgent(id);
|
|
82
|
+
return hover.domNode;
|
|
83
|
+
}));
|
|
84
|
+
return container;
|
|
51
85
|
}
|
|
52
86
|
renderFileWidget(href, a) {
|
|
53
87
|
const fullUri = ( URI.parse(href));
|
|
@@ -93,6 +127,9 @@ let ChatMarkdownDecorationsRenderer = class ChatMarkdownDecorationsRenderer {
|
|
|
93
127
|
ChatMarkdownDecorationsRenderer = ( __decorate([
|
|
94
128
|
( __param(0, IKeybindingService)),
|
|
95
129
|
( __param(1, ILabelService)),
|
|
96
|
-
( __param(2, ILogService))
|
|
130
|
+
( __param(2, ILogService)),
|
|
131
|
+
( __param(3, IChatAgentService)),
|
|
132
|
+
( __param(4, IInstantiationService)),
|
|
133
|
+
( __param(5, IHoverService))
|
|
97
134
|
], ChatMarkdownDecorationsRenderer));
|
|
98
135
|
export { ChatMarkdownDecorationsRenderer };
|