@codingame/monaco-vscode-api 4.5.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +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
|
@@ -4,9 +4,9 @@ import { DeferredPromise } from '../../../../base/common/async.js';
|
|
|
4
4
|
import { Emitter } from '../../../../base/common/event.js';
|
|
5
5
|
import { isMarkdownString, MarkdownString } from '../../../../base/common/htmlContent.js';
|
|
6
6
|
import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
7
|
-
import { ResourceMap } from '../../../../base/common/map.js';
|
|
8
7
|
import { revive } from '../../../../base/common/marshalling.js';
|
|
9
|
-
import {
|
|
8
|
+
import { equals } from '../../../../base/common/objects.js';
|
|
9
|
+
import { isEqual, basename } from '../../../../base/common/resources.js';
|
|
10
10
|
import { URI, isUriComponents } from '../../../../base/common/uri.js';
|
|
11
11
|
import { generateUuid } from '../../../../base/common/uuid.js';
|
|
12
12
|
import { OffsetRange } from '../../../../editor/common/core/offsetRange.js';
|
|
@@ -28,16 +28,20 @@ class ChatRequestModel {
|
|
|
28
28
|
get avatarIconUri() {
|
|
29
29
|
return this.session.requesterAvatarIconUri;
|
|
30
30
|
}
|
|
31
|
+
get attempt() {
|
|
32
|
+
return this._attempt;
|
|
33
|
+
}
|
|
31
34
|
get variableData() {
|
|
32
35
|
return this._variableData;
|
|
33
36
|
}
|
|
34
37
|
set variableData(v) {
|
|
35
38
|
this._variableData = v;
|
|
36
39
|
}
|
|
37
|
-
constructor(session, message, _variableData) {
|
|
40
|
+
constructor(session, message, _variableData, _attempt = 0) {
|
|
38
41
|
this.session = session;
|
|
39
42
|
this.message = message;
|
|
40
43
|
this._variableData = _variableData;
|
|
44
|
+
this._attempt = _attempt;
|
|
41
45
|
this._id = 'request_' + ChatRequestModel.nextId++;
|
|
42
46
|
}
|
|
43
47
|
}
|
|
@@ -63,38 +67,43 @@ class Response {
|
|
|
63
67
|
this._updateRepr(true);
|
|
64
68
|
}
|
|
65
69
|
updateContent(progress, quiet) {
|
|
66
|
-
if (progress.kind === '
|
|
70
|
+
if (progress.kind === 'markdownContent') {
|
|
67
71
|
const responsePartLength = this._responseParts.length - 1;
|
|
68
72
|
const lastResponsePart = this._responseParts[responsePartLength];
|
|
69
|
-
if (!lastResponsePart || lastResponsePart.kind !== 'markdownContent') {
|
|
70
|
-
|
|
71
|
-
this._responseParts.push({ content: ( new MarkdownString(progress.content)), kind: 'markdownContent' });
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
this._responseParts.push(progress);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
else if (progress.kind === 'markdownContent') {
|
|
78
|
-
const lastPartEnabledCommands = typeof lastResponsePart.content.isTrusted === 'object' ?
|
|
79
|
-
lastResponsePart.content.isTrusted.enabledCommands :
|
|
80
|
-
[];
|
|
81
|
-
const thisPartEnabledCommands = typeof progress.content.isTrusted === 'object' ?
|
|
82
|
-
progress.content.isTrusted.enabledCommands :
|
|
83
|
-
[];
|
|
84
|
-
const enabledCommands = [...lastPartEnabledCommands, ...thisPartEnabledCommands];
|
|
85
|
-
this._responseParts[responsePartLength] = { content: ( new MarkdownString(
|
|
86
|
-
lastResponsePart.content.value + progress.content.value,
|
|
87
|
-
{ isTrusted: { enabledCommands } }
|
|
88
|
-
)), kind: 'markdownContent' };
|
|
73
|
+
if (!lastResponsePart || lastResponsePart.kind !== 'markdownContent' || !canMergeMarkdownStrings(lastResponsePart.content, progress.content)) {
|
|
74
|
+
this._responseParts.push(progress);
|
|
89
75
|
}
|
|
90
76
|
else {
|
|
91
|
-
|
|
92
|
-
lastResponsePart.content.value + progress.content,
|
|
93
|
-
lastResponsePart.content
|
|
94
|
-
|
|
77
|
+
lastResponsePart.content = {
|
|
78
|
+
value: lastResponsePart.content.value + progress.content.value,
|
|
79
|
+
isTrusted: lastResponsePart.content.isTrusted,
|
|
80
|
+
supportThemeIcons: lastResponsePart.content.supportThemeIcons,
|
|
81
|
+
supportHtml: lastResponsePart.content.supportHtml,
|
|
82
|
+
baseUri: lastResponsePart.content.baseUri
|
|
83
|
+
};
|
|
95
84
|
}
|
|
96
85
|
this._updateRepr(quiet);
|
|
97
86
|
}
|
|
87
|
+
else if (progress.kind === 'textEdit') {
|
|
88
|
+
if (progress.edits.length > 0) {
|
|
89
|
+
let found = false;
|
|
90
|
+
for (let i = 0; !found && i < this._responseParts.length; i++) {
|
|
91
|
+
const candidate = this._responseParts[i];
|
|
92
|
+
if (candidate.kind === 'textEditGroup' && isEqual(candidate.uri, progress.uri)) {
|
|
93
|
+
candidate.edits.push(progress.edits);
|
|
94
|
+
found = true;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (!found) {
|
|
98
|
+
this._responseParts.push({
|
|
99
|
+
kind: 'textEditGroup',
|
|
100
|
+
uri: progress.uri,
|
|
101
|
+
edits: [progress.edits]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
this._updateRepr(quiet);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
98
107
|
else {
|
|
99
108
|
this._responseParts.push(progress);
|
|
100
109
|
this._updateRepr(quiet);
|
|
@@ -111,6 +120,9 @@ class Response {
|
|
|
111
120
|
else if (part.kind === 'command') {
|
|
112
121
|
return part.command.title;
|
|
113
122
|
}
|
|
123
|
+
else if (part.kind === 'textEditGroup') {
|
|
124
|
+
return '';
|
|
125
|
+
}
|
|
114
126
|
else {
|
|
115
127
|
return part.content.value;
|
|
116
128
|
}
|
|
@@ -140,15 +152,9 @@ class ChatResponseModel extends Disposable {
|
|
|
140
152
|
get response() {
|
|
141
153
|
return this._response;
|
|
142
154
|
}
|
|
143
|
-
get edits() {
|
|
144
|
-
return this._edits;
|
|
145
|
-
}
|
|
146
155
|
get result() {
|
|
147
156
|
return this._result;
|
|
148
157
|
}
|
|
149
|
-
get providerId() {
|
|
150
|
-
return this.session.providerId;
|
|
151
|
-
}
|
|
152
158
|
get username() {
|
|
153
159
|
return this.session.responderUsername;
|
|
154
160
|
}
|
|
@@ -194,23 +200,12 @@ class ChatResponseModel extends Disposable {
|
|
|
194
200
|
this._isStale = Array.isArray(_response) && (_response.length !== 0 || isMarkdownString(_response) && _response.value.length !== 0);
|
|
195
201
|
this._followups = followups ? [...followups] : undefined;
|
|
196
202
|
this._response = ( new Response(_response));
|
|
197
|
-
this._edits = ( new ResourceMap());
|
|
198
203
|
this._register(this._response.onDidChangeValue(() => this._onDidChange.fire()));
|
|
199
204
|
this._id = 'response_' + ChatResponseModel.nextId++;
|
|
200
205
|
}
|
|
201
206
|
updateContent(responsePart, quiet) {
|
|
202
207
|
this._response.updateContent(responsePart, quiet);
|
|
203
208
|
}
|
|
204
|
-
updateTextEdits(uri, edits) {
|
|
205
|
-
const array = this._edits.get(uri);
|
|
206
|
-
if (!array) {
|
|
207
|
-
this._edits.set(uri, edits);
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
array.push(...edits);
|
|
211
|
-
}
|
|
212
|
-
this._onDidChange.fire();
|
|
213
|
-
}
|
|
214
209
|
applyReference(progress) {
|
|
215
210
|
if (progress.kind === 'usedContext') {
|
|
216
211
|
this._usedContext = progress;
|
|
@@ -250,11 +245,21 @@ class ChatResponseModel extends Disposable {
|
|
|
250
245
|
this._vote = vote;
|
|
251
246
|
this._onDidChange.fire();
|
|
252
247
|
}
|
|
248
|
+
setEditApplied(edit, editCount) {
|
|
249
|
+
if (!this.response.value.includes(edit)) {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
if (!edit.state) {
|
|
253
|
+
return false;
|
|
254
|
+
}
|
|
255
|
+
edit.state.applied = editCount;
|
|
256
|
+
this._onDidChange.fire();
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
253
259
|
}
|
|
254
260
|
function isExportableSessionData(obj) {
|
|
255
261
|
const data = obj;
|
|
256
262
|
return typeof data === 'object' &&
|
|
257
|
-
typeof data.providerId === 'string' &&
|
|
258
263
|
typeof data.requesterUsername === 'string';
|
|
259
264
|
}
|
|
260
265
|
function isSerializableSessionData(obj) {
|
|
@@ -278,9 +283,6 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
278
283
|
firstRequestMessage.text;
|
|
279
284
|
return message.split('\n')[0].substring(0, 50);
|
|
280
285
|
}
|
|
281
|
-
get session() {
|
|
282
|
-
return this._session;
|
|
283
|
-
}
|
|
284
286
|
get welcomeMessage() {
|
|
285
287
|
return this._welcomeMessage;
|
|
286
288
|
}
|
|
@@ -291,6 +293,9 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
291
293
|
const lastRequest = this._requests[this._requests.length - 1];
|
|
292
294
|
return !!lastRequest && !!lastRequest.response && !lastRequest.response.isComplete;
|
|
293
295
|
}
|
|
296
|
+
get hasRequests() {
|
|
297
|
+
return this._requests.length > 0;
|
|
298
|
+
}
|
|
294
299
|
get creationDate() {
|
|
295
300
|
return this._creationDate;
|
|
296
301
|
}
|
|
@@ -326,10 +331,13 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
326
331
|
get title() {
|
|
327
332
|
return ChatModel_1.getDefaultTitle(this._requests);
|
|
328
333
|
}
|
|
329
|
-
|
|
334
|
+
get initialLocation() {
|
|
335
|
+
return this._initialLocation;
|
|
336
|
+
}
|
|
337
|
+
constructor(initialData, _initialLocation, logService, chatAgentService, instantiationService) {
|
|
330
338
|
super();
|
|
331
|
-
this.providerId = providerId;
|
|
332
339
|
this.initialData = initialData;
|
|
340
|
+
this._initialLocation = _initialLocation;
|
|
333
341
|
this.logService = logService;
|
|
334
342
|
this.chatAgentService = chatAgentService;
|
|
335
343
|
this.instantiationService = instantiationService;
|
|
@@ -394,6 +402,12 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
394
402
|
...raw,
|
|
395
403
|
name: raw.id,
|
|
396
404
|
};
|
|
405
|
+
if (!('extensionPublisherId' in agent)) {
|
|
406
|
+
agent.extensionPublisherId = agent.extensionPublisher ?? '';
|
|
407
|
+
}
|
|
408
|
+
if (!('extensionDisplayName' in agent)) {
|
|
409
|
+
agent.extensionDisplayName = '';
|
|
410
|
+
}
|
|
397
411
|
return revive(agent);
|
|
398
412
|
}
|
|
399
413
|
getParsedRequestFromString(message) {
|
|
@@ -412,18 +426,16 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
412
426
|
this._initState = ChatModelInitState.Initializing;
|
|
413
427
|
}
|
|
414
428
|
deinitialize() {
|
|
415
|
-
this._session = undefined;
|
|
416
429
|
this._initState = ChatModelInitState.Created;
|
|
417
430
|
this._isInitializedDeferred = ( new DeferredPromise());
|
|
418
431
|
}
|
|
419
|
-
initialize(
|
|
432
|
+
initialize(welcomeMessage) {
|
|
420
433
|
if (this.initState !== ChatModelInitState.Initializing) {
|
|
421
434
|
throw ( new Error(
|
|
422
435
|
`ChatModel is in the wrong state for initialize: ${ChatModelInitState[this.initState]}`
|
|
423
436
|
));
|
|
424
437
|
}
|
|
425
438
|
this._initState = ChatModelInitState.Initialized;
|
|
426
|
-
this._session = session;
|
|
427
439
|
if (!this._welcomeMessage) {
|
|
428
440
|
this._welcomeMessage = welcomeMessage;
|
|
429
441
|
}
|
|
@@ -446,30 +458,21 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
446
458
|
getRequests() {
|
|
447
459
|
return this._requests;
|
|
448
460
|
}
|
|
449
|
-
addRequest(message, variableData, chatAgent, slashCommand) {
|
|
450
|
-
|
|
451
|
-
throw ( new Error('addRequest: No session'));
|
|
452
|
-
}
|
|
453
|
-
const request = ( new ChatRequestModel(this, message, variableData));
|
|
461
|
+
addRequest(message, variableData, attempt, chatAgent, slashCommand) {
|
|
462
|
+
const request = ( new ChatRequestModel(this, message, variableData, attempt));
|
|
454
463
|
request.response = ( new ChatResponseModel([], this, chatAgent, slashCommand, request.id));
|
|
455
464
|
this._requests.push(request);
|
|
456
465
|
this._onDidChange.fire({ kind: 'addRequest', request });
|
|
457
466
|
return request;
|
|
458
467
|
}
|
|
459
468
|
acceptResponseProgress(request, progress, quiet) {
|
|
460
|
-
if (!this._session) {
|
|
461
|
-
throw ( new Error('acceptResponseProgress: No session'));
|
|
462
|
-
}
|
|
463
469
|
if (!request.response) {
|
|
464
470
|
request.response = ( new ChatResponseModel([], this, undefined, undefined, request.id));
|
|
465
471
|
}
|
|
466
472
|
if (request.response.isComplete) {
|
|
467
473
|
throw ( new Error('acceptResponseProgress: Adding progress to a completed response'));
|
|
468
474
|
}
|
|
469
|
-
if (progress.kind === '
|
|
470
|
-
request.response.updateContent({ kind: 'markdownVuln', content: { value: progress.content }, vulnerabilities: progress.vulnerabilities }, quiet);
|
|
471
|
-
}
|
|
472
|
-
else if (progress.kind === 'content' || progress.kind === 'markdownContent' || progress.kind === 'treeData' || progress.kind === 'inlineReference' || progress.kind === 'markdownVuln' || progress.kind === 'progressMessage' || progress.kind === 'command') {
|
|
475
|
+
if (progress.kind === 'markdownContent' || progress.kind === 'treeData' || progress.kind === 'inlineReference' || progress.kind === 'markdownVuln' || progress.kind === 'progressMessage' || progress.kind === 'command' || progress.kind === 'textEdit') {
|
|
473
476
|
request.response.updateContent(progress, quiet);
|
|
474
477
|
}
|
|
475
478
|
else if (progress.kind === 'usedContext' || progress.kind === 'reference') {
|
|
@@ -481,9 +484,6 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
481
484
|
request.response.setAgent(agent, progress.command);
|
|
482
485
|
}
|
|
483
486
|
}
|
|
484
|
-
else if (progress.kind === 'textEdit') {
|
|
485
|
-
request.response.updateTextEdits(progress.uri, progress.edits);
|
|
486
|
-
}
|
|
487
487
|
else {
|
|
488
488
|
this.logService.error(`Couldn't handle progress: ${JSON.stringify(progress)}`);
|
|
489
489
|
}
|
|
@@ -503,9 +503,6 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
setResponse(request, result) {
|
|
506
|
-
if (!this._session) {
|
|
507
|
-
throw ( new Error('completeResponse: No session'));
|
|
508
|
-
}
|
|
509
506
|
if (!request.response) {
|
|
510
507
|
request.response = ( new ChatResponseModel([], this, undefined, undefined, request.id));
|
|
511
508
|
}
|
|
@@ -533,6 +530,7 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
533
530
|
requesterAvatarIconUri: this.requesterAvatarIconUri,
|
|
534
531
|
responderUsername: this.responderUsername,
|
|
535
532
|
responderAvatarIconUri: this.responderAvatarIcon,
|
|
533
|
+
initialLocation: this.initialLocation,
|
|
536
534
|
welcomeMessage: this._welcomeMessage?.content.map(c => {
|
|
537
535
|
if (Array.isArray(c)) {
|
|
538
536
|
return c;
|
|
@@ -566,15 +564,12 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
566
564
|
followups: r.response?.followups,
|
|
567
565
|
isCanceled: r.response?.isCanceled,
|
|
568
566
|
vote: r.response?.vote,
|
|
569
|
-
agent: r.response?.agent ?
|
|
570
|
-
{ id: r.response.agent.id, name: r.response.agent.name, description: r.response.agent.description, extensionId: r.response.agent.extensionId, metadata: r.response.agent.metadata, slashCommands: [], locations: r.response.agent.locations, isDefault: r.response.agent.isDefault }
|
|
571
|
-
: undefined,
|
|
567
|
+
agent: r.response?.agent ? { ...r.response.agent } : undefined,
|
|
572
568
|
slashCommand: r.response?.slashCommand,
|
|
573
569
|
usedContext: r.response?.usedContext,
|
|
574
570
|
contentReferences: r.response?.contentReferences
|
|
575
571
|
};
|
|
576
572
|
})),
|
|
577
|
-
providerId: this.providerId,
|
|
578
573
|
};
|
|
579
574
|
}
|
|
580
575
|
toJSON() {
|
|
@@ -586,7 +581,6 @@ let ChatModel = ChatModel_1 = class ChatModel extends Disposable {
|
|
|
586
581
|
};
|
|
587
582
|
}
|
|
588
583
|
dispose() {
|
|
589
|
-
this._session?.dispose?.();
|
|
590
584
|
this._requests.forEach(r => r.response?.dispose());
|
|
591
585
|
this._onDidDispose.fire();
|
|
592
586
|
super.dispose();
|
|
@@ -619,12 +613,15 @@ let ChatWelcomeMessageModel = class ChatWelcomeMessageModel {
|
|
|
619
613
|
ChatWelcomeMessageModel = ChatWelcomeMessageModel_1 = ( __decorate([
|
|
620
614
|
( __param(2, IChatAgentService))
|
|
621
615
|
], ChatWelcomeMessageModel));
|
|
622
|
-
function getHistoryEntriesFromModel(model) {
|
|
616
|
+
function getHistoryEntriesFromModel(model, forAgentId) {
|
|
623
617
|
const history = [];
|
|
624
618
|
for (const request of model.getRequests()) {
|
|
625
619
|
if (!request.response) {
|
|
626
620
|
continue;
|
|
627
621
|
}
|
|
622
|
+
if (forAgentId && forAgentId !== request.response.agent?.id) {
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
628
625
|
const promptTextResult = getPromptText(request.message);
|
|
629
626
|
const historyRequest = {
|
|
630
627
|
sessionId: model.sessionId,
|
|
@@ -650,4 +647,22 @@ function updateRanges(variableData, diff) {
|
|
|
650
647
|
})))
|
|
651
648
|
};
|
|
652
649
|
}
|
|
653
|
-
|
|
650
|
+
function canMergeMarkdownStrings(md1, md2) {
|
|
651
|
+
if (md1.baseUri && md2.baseUri) {
|
|
652
|
+
const baseUriEquals = md1.baseUri.scheme === md2.baseUri.scheme
|
|
653
|
+
&& md1.baseUri.authority === md2.baseUri.authority
|
|
654
|
+
&& md1.baseUri.path === md2.baseUri.path
|
|
655
|
+
&& md1.baseUri.query === md2.baseUri.query
|
|
656
|
+
&& md1.baseUri.fragment === md2.baseUri.fragment;
|
|
657
|
+
if (!baseUriEquals) {
|
|
658
|
+
return false;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
else if (md1.baseUri || md2.baseUri) {
|
|
662
|
+
return false;
|
|
663
|
+
}
|
|
664
|
+
return equals(md1.isTrusted, md2.isTrusted) &&
|
|
665
|
+
md1.supportHtml === md2.supportHtml &&
|
|
666
|
+
md1.supportThemeIcons === md2.supportThemeIcons;
|
|
667
|
+
}
|
|
668
|
+
export { ChatModel, ChatModelInitState, ChatRequestModel, ChatResponseModel, ChatWelcomeMessageModel, Response, canMergeMarkdownStrings, getHistoryEntriesFromModel, isExportableSessionData, isSerializableSessionData, updateRanges };
|
|
@@ -51,19 +51,6 @@ class ChatRequestAgentPart {
|
|
|
51
51
|
get promptText() {
|
|
52
52
|
return '';
|
|
53
53
|
}
|
|
54
|
-
toJSON() {
|
|
55
|
-
return {
|
|
56
|
-
kind: this.kind,
|
|
57
|
-
range: this.range,
|
|
58
|
-
editorRange: this.editorRange,
|
|
59
|
-
agent: {
|
|
60
|
-
id: this.agent.id,
|
|
61
|
-
name: this.agent.name,
|
|
62
|
-
description: this.agent.description,
|
|
63
|
-
metadata: this.agent.metadata
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
54
|
}
|
|
68
55
|
class ChatRequestAgentSubcommandPart {
|
|
69
56
|
static { this.Kind = 'subcommand'; }
|
|
@@ -37,9 +37,6 @@ let ChatViewModel = class ChatViewModel extends Disposable {
|
|
|
37
37
|
get requestInProgress() {
|
|
38
38
|
return this._model.requestInProgress;
|
|
39
39
|
}
|
|
40
|
-
get providerId() {
|
|
41
|
-
return this._model.providerId;
|
|
42
|
-
}
|
|
43
40
|
get initState() {
|
|
44
41
|
return this._model.initState;
|
|
45
42
|
}
|
|
@@ -181,6 +178,9 @@ class ChatRequestViewModel {
|
|
|
181
178
|
get messageText() {
|
|
182
179
|
return this.message.text;
|
|
183
180
|
}
|
|
181
|
+
get attempt() {
|
|
182
|
+
return this._model.attempt;
|
|
183
|
+
}
|
|
184
184
|
constructor(_model) {
|
|
185
185
|
this._model = _model;
|
|
186
186
|
}
|
|
@@ -192,9 +192,6 @@ let ChatResponseViewModel = class ChatResponseViewModel extends Disposable {
|
|
|
192
192
|
get dataId() {
|
|
193
193
|
return this._model.id + `_${this._modelChangeCount}` + `_${ChatModelInitState[this._model.session.initState]}`;
|
|
194
194
|
}
|
|
195
|
-
get providerId() {
|
|
196
|
-
return this._model.providerId;
|
|
197
|
-
}
|
|
198
195
|
get sessionId() {
|
|
199
196
|
return this._model.session.sessionId;
|
|
200
197
|
}
|
|
@@ -225,9 +222,6 @@ let ChatResponseViewModel = class ChatResponseViewModel extends Disposable {
|
|
|
225
222
|
get progressMessages() {
|
|
226
223
|
return this._model.progressMessages;
|
|
227
224
|
}
|
|
228
|
-
get edits() {
|
|
229
|
-
return this._model.edits;
|
|
230
|
-
}
|
|
231
225
|
get isComplete() {
|
|
232
226
|
return this._model.isComplete;
|
|
233
227
|
}
|
|
@@ -316,6 +310,10 @@ let ChatResponseViewModel = class ChatResponseViewModel extends Disposable {
|
|
|
316
310
|
this._modelChangeCount++;
|
|
317
311
|
this._model.setVote(vote);
|
|
318
312
|
}
|
|
313
|
+
setEditApplied(edit, editCount) {
|
|
314
|
+
this._modelChangeCount++;
|
|
315
|
+
this._model.setEditApplied(edit, editCount);
|
|
316
|
+
}
|
|
319
317
|
};
|
|
320
318
|
ChatResponseViewModel = ( __decorate([
|
|
321
319
|
( __param(1, ILogService))
|
|
@@ -8,7 +8,7 @@ import { IContextKeyService } from '../../../../../platform/contextkey/common/co
|
|
|
8
8
|
import { SpeechToTextStatus, HasSpeechProvider } from '../../../speech/common/speechService.js';
|
|
9
9
|
import { ISpeechService } from '../../../speech/common/speechService.service.js';
|
|
10
10
|
import { Codicon } from '../../../../../base/common/codicons.js';
|
|
11
|
-
import {
|
|
11
|
+
import { registerEditorContribution, EditorAction2 } from '../../../../../editor/browser/editorExtensions.js';
|
|
12
12
|
import { EditorContextKeys } from '../../../../../editor/common/editorContextKeys.js';
|
|
13
13
|
import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.service.js';
|
|
14
14
|
import { EditOperation } from '../../../../../editor/common/core/editOperation.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
3
|
+
import '../../../../base/common/arrays.js';
|
|
3
4
|
import '../../../../base/common/observableInternal/derived.js';
|
|
4
5
|
import { autorunWithStore } from '../../../../base/common/observableInternal/autorun.js';
|
|
5
6
|
import { observableFromEvent } from '../../../../base/common/observableInternal/utils.js';
|
|
@@ -33,7 +33,7 @@ const NLS_CLOSE_BTN_LABEL = ( localizeWithPath(_moduleId, 4, "Close"));
|
|
|
33
33
|
const SIMPLE_FIND_WIDGET_INITIAL_WIDTH = 310;
|
|
34
34
|
const MATCHES_COUNT_WIDTH = 73;
|
|
35
35
|
class SimpleFindWidget extends Widget {
|
|
36
|
-
constructor(options, contextViewService, contextKeyService, _keybindingService) {
|
|
36
|
+
constructor(options, contextViewService, contextKeyService, hoverService, _keybindingService) {
|
|
37
37
|
super();
|
|
38
38
|
this._keybindingService = _keybindingService;
|
|
39
39
|
this._isVisible = false;
|
|
@@ -99,21 +99,21 @@ class SimpleFindWidget extends Widget {
|
|
|
99
99
|
onTrigger: () => {
|
|
100
100
|
this.find(true);
|
|
101
101
|
}
|
|
102
|
-
}))));
|
|
102
|
+
}, hoverService))));
|
|
103
103
|
this.nextBtn = this._register(( (new SimpleButton({
|
|
104
104
|
label: NLS_NEXT_MATCH_BTN_LABEL + (options.nextMatchActionId ? this._getKeybinding(options.nextMatchActionId) : ''),
|
|
105
105
|
icon: findNextMatchIcon,
|
|
106
106
|
onTrigger: () => {
|
|
107
107
|
this.find(false);
|
|
108
108
|
}
|
|
109
|
-
}))));
|
|
109
|
+
}, hoverService))));
|
|
110
110
|
const closeBtn = this._register(( (new SimpleButton({
|
|
111
111
|
label: NLS_CLOSE_BTN_LABEL + (options.closeWidgetActionId ? this._getKeybinding(options.closeWidgetActionId) : ''),
|
|
112
112
|
icon: widgetClose,
|
|
113
113
|
onTrigger: () => {
|
|
114
114
|
this.hide();
|
|
115
115
|
}
|
|
116
|
-
}))));
|
|
116
|
+
}, hoverService))));
|
|
117
117
|
this._innerDomNode = document.createElement('div');
|
|
118
118
|
this._innerDomNode.classList.add('simple-find-part');
|
|
119
119
|
this._innerDomNode.appendChild(this._findInput.domNode);
|
|
@@ -6,8 +6,6 @@ import { ActionBar } from '../../../../base/browser/ui/actionbar/actionbar.js';
|
|
|
6
6
|
import { Separator, ActionRunner, Action } from '../../../../base/common/actions.js';
|
|
7
7
|
import { Disposable, dispose } from '../../../../base/common/lifecycle.js';
|
|
8
8
|
import { URI } from '../../../../base/common/uri.js';
|
|
9
|
-
import { IModelService } from '../../../../editor/common/services/model.js';
|
|
10
|
-
import { ILanguageService } from '../../../../editor/common/languages/language.js';
|
|
11
9
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
12
10
|
import { ICommentService } from './commentService.service.js';
|
|
13
11
|
import { MIN_EDITOR_HEIGHT, SimpleCommentEditor, calculateEditorHeight } from './simpleCommentEditor.js';
|
|
@@ -32,11 +30,13 @@ import { Scrollable } from '../../../../base/common/scrollable.js';
|
|
|
32
30
|
import { SmoothScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement.js';
|
|
33
31
|
import { DomEmitter } from '../../../../base/browser/event.js';
|
|
34
32
|
import { CommentContextKeys } from '../common/commentContextKeys.js';
|
|
35
|
-
import { FileAccess } from '../../../../base/common/network.js';
|
|
33
|
+
import { FileAccess, Schemas } from '../../../../base/common/network.js';
|
|
36
34
|
import { COMMENTS_SECTION } from '../common/commentsConfiguration.js';
|
|
37
35
|
import { StandardMouseEvent } from '../../../../base/browser/mouseEvent.js';
|
|
38
36
|
import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.service.js';
|
|
39
37
|
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
38
|
+
import { IHoverService } from '../../../../platform/hover/browser/hover.service.js';
|
|
39
|
+
import { ITextModelService } from '../../../../editor/common/services/resolverService.js';
|
|
40
40
|
const _moduleId = "vs/workbench/contrib/comments/browser/commentNode";
|
|
41
41
|
class CommentsActionRunner extends ActionRunner {
|
|
42
42
|
async runAction(action, context) {
|
|
@@ -47,7 +47,7 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
47
47
|
get domNode() {
|
|
48
48
|
return this._domNode;
|
|
49
49
|
}
|
|
50
|
-
constructor(parentEditor, commentThread, comment, pendingEdit, owner, resource, parentThread, markdownRenderer, instantiationService, commentService,
|
|
50
|
+
constructor(parentEditor, commentThread, comment, pendingEdit, owner, resource, parentThread, markdownRenderer, instantiationService, commentService, notificationService, contextMenuService, contextKeyService, configurationService, hoverService, accessibilityService, keybindingService, textModelService) {
|
|
51
51
|
super();
|
|
52
52
|
this.parentEditor = parentEditor;
|
|
53
53
|
this.commentThread = commentThread;
|
|
@@ -59,13 +59,13 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
59
59
|
this.markdownRenderer = markdownRenderer;
|
|
60
60
|
this.instantiationService = instantiationService;
|
|
61
61
|
this.commentService = commentService;
|
|
62
|
-
this.modelService = modelService;
|
|
63
|
-
this.languageService = languageService;
|
|
64
62
|
this.notificationService = notificationService;
|
|
65
63
|
this.contextMenuService = contextMenuService;
|
|
66
64
|
this.configurationService = configurationService;
|
|
65
|
+
this.hoverService = hoverService;
|
|
67
66
|
this.accessibilityService = accessibilityService;
|
|
68
67
|
this.keybindingService = keybindingService;
|
|
68
|
+
this.textModelService = textModelService;
|
|
69
69
|
this._editAction = null;
|
|
70
70
|
this._commentEditContainer = null;
|
|
71
71
|
this._commentEditor = null;
|
|
@@ -185,7 +185,7 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
185
185
|
}
|
|
186
186
|
else {
|
|
187
187
|
if (!this._timestampWidget) {
|
|
188
|
-
this._timestampWidget = ( (new TimestampWidget(this.configurationService, this._timestamp, timestamp)));
|
|
188
|
+
this._timestampWidget = ( (new TimestampWidget(this.configurationService, this.hoverService, this._timestamp, timestamp)));
|
|
189
189
|
this._register(this._timestampWidget);
|
|
190
190
|
}
|
|
191
191
|
else {
|
|
@@ -386,12 +386,16 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
386
386
|
get commentBodyValue() {
|
|
387
387
|
return (typeof this.comment.body === 'string') ? this.comment.body : this.comment.body.value;
|
|
388
388
|
}
|
|
389
|
-
createCommentEditor(editContainer) {
|
|
389
|
+
async createCommentEditor(editContainer) {
|
|
390
390
|
const container = append(editContainer, $('.edit-textarea'));
|
|
391
391
|
this._commentEditor = this.instantiationService.createInstance(SimpleCommentEditor, container, SimpleCommentEditor.getEditorOptions(this.configurationService), this._contextKeyService, this.parentThread);
|
|
392
|
-
const resource = ( (URI.
|
|
393
|
-
|
|
394
|
-
|
|
392
|
+
const resource = ( (URI.from({
|
|
393
|
+
scheme: Schemas.commentsInput,
|
|
394
|
+
path: `/commentinput-${this.comment.uniqueIdInThread}-${Date.now()}.md`
|
|
395
|
+
})));
|
|
396
|
+
const modelRef = await this.textModelService.createModelReference(resource);
|
|
397
|
+
this._commentEditorModel = modelRef;
|
|
398
|
+
this._commentEditor.setModel(this._commentEditorModel.object.textEditorModel);
|
|
395
399
|
this._commentEditor.setValue(this.pendingEdit ?? this.commentBodyValue);
|
|
396
400
|
this.pendingEdit = undefined;
|
|
397
401
|
this._commentEditor.layout({ width: container.clientWidth - 14, height: this._editorHeight });
|
|
@@ -400,8 +404,8 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
400
404
|
this._commentEditor.layout({ width: container.clientWidth - 14, height: this._editorHeight });
|
|
401
405
|
this._commentEditor.focus();
|
|
402
406
|
});
|
|
403
|
-
const lastLine = this._commentEditorModel.getLineCount();
|
|
404
|
-
const lastColumn = this._commentEditorModel.getLineLength(lastLine) + 1;
|
|
407
|
+
const lastLine = this._commentEditorModel.object.textEditorModel.getLineCount();
|
|
408
|
+
const lastColumn = this._commentEditorModel.object.textEditorModel.getLineLength(lastLine) + 1;
|
|
405
409
|
this._commentEditor.setSelection(( (new Selection(lastLine, lastColumn, lastLine, lastColumn))));
|
|
406
410
|
const commentThread = this.commentThread;
|
|
407
411
|
commentThread.input = {
|
|
@@ -431,7 +435,7 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
431
435
|
}
|
|
432
436
|
}));
|
|
433
437
|
this.calculateEditorHeight();
|
|
434
|
-
this._register((this._commentEditorModel.onDidChangeContent(() => {
|
|
438
|
+
this._register((this._commentEditorModel.object.textEditorModel.onDidChangeContent(() => {
|
|
435
439
|
if (this._commentEditor && this.calculateEditorHeight()) {
|
|
436
440
|
this._commentEditor.layout({ height: this._editorHeight, width: this._commentEditor.getLayoutInfo().width });
|
|
437
441
|
this._commentEditor.render(true);
|
|
@@ -479,14 +483,14 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
479
483
|
const height = getContentHeight(this._body) + 4;
|
|
480
484
|
this._scrollableElement.setScrollDimensions({ width, scrollWidth, height, scrollHeight });
|
|
481
485
|
}
|
|
482
|
-
switchToEditMode() {
|
|
486
|
+
async switchToEditMode() {
|
|
483
487
|
if (this.isEditing) {
|
|
484
488
|
return;
|
|
485
489
|
}
|
|
486
490
|
this.isEditing = true;
|
|
487
491
|
this._body.classList.add('hidden');
|
|
488
492
|
this._commentEditContainer = append(this._commentDetailsContainer, $('.edit-container'));
|
|
489
|
-
this.createCommentEditor(this._commentEditContainer);
|
|
493
|
+
await this.createCommentEditor(this._commentEditContainer);
|
|
490
494
|
const formActions = append(this._commentEditContainer, $('.form-actions'));
|
|
491
495
|
const otherActions = append(formActions, $('.other-actions'));
|
|
492
496
|
this.createCommentWidgetFormActions(otherActions);
|
|
@@ -563,7 +567,7 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
563
567
|
actionsContainer.classList.remove('mouseover');
|
|
564
568
|
}));
|
|
565
569
|
}
|
|
566
|
-
update(newComment) {
|
|
570
|
+
async update(newComment) {
|
|
567
571
|
if (newComment.body !== this.comment.body) {
|
|
568
572
|
this.updateCommentBody(newComment.body);
|
|
569
573
|
}
|
|
@@ -574,7 +578,7 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
574
578
|
this.comment = newComment;
|
|
575
579
|
if (isChangingMode) {
|
|
576
580
|
if (newComment.mode === CommentMode.Editing) {
|
|
577
|
-
this.switchToEditMode();
|
|
581
|
+
await this.switchToEditMode();
|
|
578
582
|
}
|
|
579
583
|
else {
|
|
580
584
|
this.removeCommentEditor();
|
|
@@ -631,14 +635,14 @@ let CommentNode = class CommentNode extends Disposable {
|
|
|
631
635
|
CommentNode = ( (__decorate([
|
|
632
636
|
( (__param(8, IInstantiationService))),
|
|
633
637
|
( (__param(9, ICommentService))),
|
|
634
|
-
( (__param(10,
|
|
635
|
-
( (__param(11,
|
|
636
|
-
( (__param(12,
|
|
637
|
-
( (__param(13,
|
|
638
|
-
( (__param(14,
|
|
639
|
-
( (__param(15,
|
|
640
|
-
( (__param(16,
|
|
641
|
-
( (__param(17,
|
|
638
|
+
( (__param(10, INotificationService))),
|
|
639
|
+
( (__param(11, IContextMenuService))),
|
|
640
|
+
( (__param(12, IContextKeyService))),
|
|
641
|
+
( (__param(13, IConfigurationService))),
|
|
642
|
+
( (__param(14, IHoverService))),
|
|
643
|
+
( (__param(15, IAccessibilityService))),
|
|
644
|
+
( (__param(16, IKeybindingService))),
|
|
645
|
+
( (__param(17, ITextModelService)))
|
|
642
646
|
], CommentNode)));
|
|
643
647
|
function fillInActions(groups, target, useAlternativeActions, isPrimaryGroup = group => group === 'navigation') {
|
|
644
648
|
for (const tuple of groups) {
|