@codingame/monaco-vscode-api 1.85.0 → 1.85.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/README.md +19 -10
- package/contributions.js +1 -0
- package/missing-services.js +91 -5
- package/monaco-editor-treemending.patch +957 -950
- package/package.json +6 -6
- package/vscode/src/vs/base/common/jsonFormatter.js +8 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +128 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +58 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +56 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +186 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +191 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +238 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +205 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +168 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +340 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +81 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +583 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +290 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +167 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +562 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +31 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +24 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +22 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +52 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +258 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +25 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +388 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +61 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +49 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +647 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +300 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +60 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +107 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +333 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +99 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +55 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +2 -0
- package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +20 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +855 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +410 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1591 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1485 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +125 -0
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +29 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +41 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +102 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +988 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +431 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +417 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +806 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +915 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +19 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +129 -10
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +205 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +150 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +480 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +90 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +258 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +614 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +44 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +169 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +64 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard.js +49 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +120 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +416 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +663 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +593 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +72 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +326 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +539 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +265 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +348 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +95 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +437 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2730 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +139 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +564 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +119 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +135 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +178 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +35 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +377 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +97 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +194 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +71 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +85 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +652 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +59 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +303 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +228 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +302 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +438 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +45 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +435 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +95 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +107 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +59 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +430 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +54 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +1131 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +1591 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +341 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +2155 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +95 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +507 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +85 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +47 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +435 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +31 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +257 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +239 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +103 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +211 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +808 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +381 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +527 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +163 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +651 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +173 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +98 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +62 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +346 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +152 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +296 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +261 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKeymapService.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookLoggingService.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +16 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +66 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWorkerService.js +4 -0
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +130 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +847 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +89 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +1942 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +107 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +49 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +387 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/common/constants.js +66 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +24 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +95 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +159 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +375 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +563 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +932 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +15 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +2 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +190 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +77 -0
- package/assets/break.mp3 +0 -0
- package/assets/chatRequestSent.mp3 +0 -0
- package/assets/chatResponsePending.mp3 +0 -0
- package/assets/chatResponseReceived1.mp3 +0 -0
- package/assets/chatResponseReceived2.mp3 +0 -0
- package/assets/chatResponseReceived3.mp3 +0 -0
- package/assets/chatResponseReceived4.mp3 +0 -0
- package/assets/clear.mp3 +0 -0
- package/assets/defaultIcon.png +0 -0
- package/assets/diffLineDeleted.mp3 +0 -0
- package/assets/diffLineInserted.mp3 +0 -0
- package/assets/diffLineModified.mp3 +0 -0
- package/assets/error.mp3 +0 -0
- package/assets/fake.html +0 -10
- package/assets/foldedAreas.mp3 +0 -0
- package/assets/format.mp3 +0 -0
- package/assets/index-no-csp.html +0 -1226
- package/assets/index.html +0 -1227
- package/assets/quickFixes.mp3 +0 -0
- package/assets/save.mp3 +0 -0
- package/assets/service-worker.js +0 -457
- package/assets/taskCompleted.mp3 +0 -0
- package/assets/taskFailed.mp3 +0 -0
- package/assets/terminalBell.mp3 +0 -0
- package/assets/warning.mp3 +0 -0
- package/assets/webWorkerExtensionHostIframe.html +0 -123
- package/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
- package/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2
- package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -5
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
3
|
+
import { ActionViewItem } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js';
|
|
4
|
+
import * as aria from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
|
|
5
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
6
|
+
import { HistoryNavigator } from 'monaco-editor/esm/vs/base/common/history.js';
|
|
7
|
+
import { Disposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
8
|
+
import { isMacintosh } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
9
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
10
|
+
import { EditorExtensionsRegistry } from 'monaco-editor/esm/vs/editor/browser/editorExtensions.js';
|
|
11
|
+
import { CodeEditorWidget } from 'monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js';
|
|
12
|
+
import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
|
|
13
|
+
import { ModesHoverController } from 'monaco-editor/esm/vs/editor/contrib/hover/browser/hover.js';
|
|
14
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
15
|
+
import { IAccessibilityService } from 'monaco-editor/esm/vs/platform/accessibility/common/accessibility.js';
|
|
16
|
+
import { MenuWorkbenchToolBar } from 'monaco-editor/esm/vs/platform/actions/browser/toolbar.js';
|
|
17
|
+
import { MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
18
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
19
|
+
import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
20
|
+
import { registerAndCreateHistoryNavigationContext } from 'monaco-editor/esm/vs/platform/history/browser/contextScopedHistoryWidget.js';
|
|
21
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
22
|
+
import { ServiceCollection } from 'monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js';
|
|
23
|
+
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
24
|
+
import { DEFAULT_FONT_FAMILY } from '../../../browser/style.js';
|
|
25
|
+
import { SubmitAction } from './actions/chatExecuteActions.js';
|
|
26
|
+
import { ChatFollowups } from './chatFollowups.js';
|
|
27
|
+
import { IChatAgentService } from '../common/chatAgents.js';
|
|
28
|
+
import { CONTEXT_CHAT_INPUT_HAS_TEXT, CONTEXT_IN_CHAT_INPUT } from '../common/chatContextKeys.js';
|
|
29
|
+
import { chatAgentLeader } from '../common/chatParserTypes.js';
|
|
30
|
+
import { IChatWidgetHistoryService } from '../common/chatWidgetHistoryService.js';
|
|
31
|
+
import { getSimpleEditorOptions, getSimpleCodeEditorWidgetOptions } from '../../codeEditor/browser/simpleEditorOptions.js';
|
|
32
|
+
import { ChatSubmitEditorAction, ChatSubmitSecondaryAgentEditorAction } from './actions/chatActions.js';
|
|
33
|
+
var ChatInputPart_1;
|
|
34
|
+
const $ = dom.$;
|
|
35
|
+
const INPUT_EDITOR_MAX_HEIGHT = 250;
|
|
36
|
+
let ChatInputPart = class ChatInputPart extends Disposable {
|
|
37
|
+
static { ChatInputPart_1 = this; }
|
|
38
|
+
static { this.INPUT_SCHEME = 'chatSessionInput'; }
|
|
39
|
+
static { this._counter = 0; }
|
|
40
|
+
get inputEditor() {
|
|
41
|
+
return this._inputEditor;
|
|
42
|
+
}
|
|
43
|
+
constructor(
|
|
44
|
+
options, historyService, modelService, instantiationService, contextKeyService, configurationService, keybindingService, accessibilityService) {
|
|
45
|
+
super();
|
|
46
|
+
this.options = options;
|
|
47
|
+
this.historyService = historyService;
|
|
48
|
+
this.modelService = modelService;
|
|
49
|
+
this.instantiationService = instantiationService;
|
|
50
|
+
this.contextKeyService = contextKeyService;
|
|
51
|
+
this.configurationService = configurationService;
|
|
52
|
+
this.keybindingService = keybindingService;
|
|
53
|
+
this.accessibilityService = accessibilityService;
|
|
54
|
+
this._onDidLoadInputState = this._register(( new Emitter()));
|
|
55
|
+
this.onDidLoadInputState = this._onDidLoadInputState.event;
|
|
56
|
+
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
57
|
+
this.onDidChangeHeight = this._onDidChangeHeight.event;
|
|
58
|
+
this._onDidFocus = this._register(( new Emitter()));
|
|
59
|
+
this.onDidFocus = this._onDidFocus.event;
|
|
60
|
+
this._onDidBlur = this._register(( new Emitter()));
|
|
61
|
+
this.onDidBlur = this._onDidBlur.event;
|
|
62
|
+
this._onDidAcceptFollowup = this._register(( new Emitter()));
|
|
63
|
+
this.onDidAcceptFollowup = this._onDidAcceptFollowup.event;
|
|
64
|
+
this.inputEditorHeight = 0;
|
|
65
|
+
this.followupsDisposables = this._register(( new DisposableStore()));
|
|
66
|
+
this.historyStates = ( new Map());
|
|
67
|
+
this.inputUri = ( URI.parse(`${ChatInputPart_1.INPUT_SCHEME}:input-${ChatInputPart_1._counter++}`));
|
|
68
|
+
this.inputEditorHasText = CONTEXT_CHAT_INPUT_HAS_TEXT.bindTo(contextKeyService);
|
|
69
|
+
this.history = ( new HistoryNavigator([], 5));
|
|
70
|
+
this._register(this.historyService.onDidClearHistory(() => this.history.clear()));
|
|
71
|
+
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
72
|
+
if (e.affectsConfiguration("accessibility.verbosity.panelChat" )) {
|
|
73
|
+
this.inputEditor.updateOptions({ ariaLabel: this._getAriaLabel() });
|
|
74
|
+
}
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
_getAriaLabel() {
|
|
78
|
+
const verbose = this.configurationService.getValue("accessibility.verbosity.panelChat" );
|
|
79
|
+
if (verbose) {
|
|
80
|
+
const kbLabel = this.keybindingService.lookupKeybinding("editor.action.accessibilityHelp" )?.getLabel();
|
|
81
|
+
return kbLabel ? ( localizeWithPath(
|
|
82
|
+
'vs/workbench/contrib/chat/browser/chatInputPart',
|
|
83
|
+
'actions.chat.accessibiltyHelp',
|
|
84
|
+
"Chat Input, Type to ask questions or type / for topics, press enter to send out the request. Use {0} for Chat Accessibility Help.",
|
|
85
|
+
kbLabel
|
|
86
|
+
)) : ( localizeWithPath(
|
|
87
|
+
'vs/workbench/contrib/chat/browser/chatInputPart',
|
|
88
|
+
'chatInput.accessibilityHelpNoKb',
|
|
89
|
+
"Chat Input, Type code here and press Enter to run. Use the Chat Accessibility Help command for more information."
|
|
90
|
+
));
|
|
91
|
+
}
|
|
92
|
+
return ( localizeWithPath(
|
|
93
|
+
'vs/workbench/contrib/chat/browser/chatInputPart',
|
|
94
|
+
'chatInput',
|
|
95
|
+
"Chat Input"
|
|
96
|
+
));
|
|
97
|
+
}
|
|
98
|
+
setState(providerId, inputValue) {
|
|
99
|
+
this.providerId = providerId;
|
|
100
|
+
const history = this.historyService.getHistory(providerId);
|
|
101
|
+
this.historyStates = ( new Map(( history.map(h => [h.text, h.state]))));
|
|
102
|
+
const historyTexts = [];
|
|
103
|
+
this.historyStates.forEach((_, str) => historyTexts.push(str));
|
|
104
|
+
this.history = ( new HistoryNavigator(historyTexts, 50));
|
|
105
|
+
if (typeof inputValue === 'string') {
|
|
106
|
+
this.setValue(inputValue);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
get element() {
|
|
110
|
+
return this.container;
|
|
111
|
+
}
|
|
112
|
+
showPreviousValue() {
|
|
113
|
+
this.navigateHistory(true);
|
|
114
|
+
}
|
|
115
|
+
showNextValue() {
|
|
116
|
+
this.navigateHistory(false);
|
|
117
|
+
}
|
|
118
|
+
navigateHistory(previous) {
|
|
119
|
+
const historyInput = (previous ?
|
|
120
|
+
(this.history.previous() ?? this.history.first()) : this.history.next())
|
|
121
|
+
?? '';
|
|
122
|
+
aria.status(historyInput);
|
|
123
|
+
this.setValue(historyInput);
|
|
124
|
+
this._onDidLoadInputState.fire(this.historyStates.get(historyInput));
|
|
125
|
+
if (previous) {
|
|
126
|
+
this._inputEditor.setPosition({ lineNumber: 1, column: 1 });
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
const model = this._inputEditor.getModel();
|
|
130
|
+
if (!model) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this._inputEditor.setPosition(getLastPosition(model));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
setValue(value) {
|
|
137
|
+
this.inputEditor.setValue(value);
|
|
138
|
+
this.inputEditor.setPosition({ lineNumber: 1, column: value.length + 1 });
|
|
139
|
+
}
|
|
140
|
+
focus() {
|
|
141
|
+
this._inputEditor.focus();
|
|
142
|
+
}
|
|
143
|
+
hasFocus() {
|
|
144
|
+
return this._inputEditor.hasWidgetFocus();
|
|
145
|
+
}
|
|
146
|
+
async acceptInput(userQuery, inputState) {
|
|
147
|
+
if (userQuery) {
|
|
148
|
+
this.history.add(userQuery);
|
|
149
|
+
this.historyStates.set(userQuery, inputState);
|
|
150
|
+
}
|
|
151
|
+
if (this.accessibilityService.isScreenReaderOptimized() && isMacintosh) {
|
|
152
|
+
this._acceptInputForVoiceover();
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
this._inputEditor.focus();
|
|
156
|
+
this._inputEditor.setValue('');
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
_acceptInputForVoiceover() {
|
|
160
|
+
const domNode = this._inputEditor.getDomNode();
|
|
161
|
+
if (!domNode) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
this._inputEditorElement.removeChild(domNode);
|
|
165
|
+
this._inputEditor.setValue('');
|
|
166
|
+
this._inputEditorElement.appendChild(domNode);
|
|
167
|
+
this._inputEditor.focus();
|
|
168
|
+
}
|
|
169
|
+
render(container, initialValue, widget) {
|
|
170
|
+
this.container = dom.append(container, $('.interactive-input-part'));
|
|
171
|
+
this.followupsContainer = dom.append(this.container, $('.interactive-input-followups'));
|
|
172
|
+
const inputAndSideToolbar = dom.append(this.container, $('.interactive-input-and-side-toolbar'));
|
|
173
|
+
const inputContainer = dom.append(inputAndSideToolbar, $('.interactive-input-and-execute-toolbar'));
|
|
174
|
+
const inputScopedContextKeyService = this._register(this.contextKeyService.createScoped(inputContainer));
|
|
175
|
+
CONTEXT_IN_CHAT_INPUT.bindTo(inputScopedContextKeyService).set(true);
|
|
176
|
+
const scopedInstantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, inputScopedContextKeyService])));
|
|
177
|
+
const { historyNavigationBackwardsEnablement, historyNavigationForwardsEnablement } = this._register(registerAndCreateHistoryNavigationContext(inputScopedContextKeyService, this));
|
|
178
|
+
this.historyNavigationBackwardsEnablement = historyNavigationBackwardsEnablement;
|
|
179
|
+
this.historyNavigationForewardsEnablement = historyNavigationForwardsEnablement;
|
|
180
|
+
const options = getSimpleEditorOptions(this.configurationService);
|
|
181
|
+
options.readOnly = false;
|
|
182
|
+
options.ariaLabel = this._getAriaLabel();
|
|
183
|
+
options.fontFamily = DEFAULT_FONT_FAMILY;
|
|
184
|
+
options.fontSize = 13;
|
|
185
|
+
options.lineHeight = 20;
|
|
186
|
+
options.padding = this.options.renderStyle === 'compact' ? { top: 2, bottom: 2 } : { top: 8, bottom: 8 };
|
|
187
|
+
options.cursorWidth = 1;
|
|
188
|
+
options.wrappingStrategy = 'advanced';
|
|
189
|
+
options.bracketPairColorization = { enabled: false };
|
|
190
|
+
options.suggest = { showIcons: false };
|
|
191
|
+
options.scrollbar = { ...(options.scrollbar ?? {}), vertical: 'hidden' };
|
|
192
|
+
this._inputEditorElement = dom.append(inputContainer, $('.interactive-input-editor'));
|
|
193
|
+
const editorOptions = getSimpleCodeEditorWidgetOptions();
|
|
194
|
+
editorOptions.contributions?.push(...EditorExtensionsRegistry.getSomeEditorContributions([ModesHoverController.ID]));
|
|
195
|
+
this._inputEditor = this._register(scopedInstantiationService.createInstance(CodeEditorWidget, this._inputEditorElement, options, editorOptions));
|
|
196
|
+
this._register(this._inputEditor.onDidChangeModelContent(() => {
|
|
197
|
+
const currentHeight = Math.min(this._inputEditor.getContentHeight(), INPUT_EDITOR_MAX_HEIGHT);
|
|
198
|
+
if (currentHeight !== this.inputEditorHeight) {
|
|
199
|
+
this.inputEditorHeight = currentHeight;
|
|
200
|
+
this._onDidChangeHeight.fire();
|
|
201
|
+
}
|
|
202
|
+
const model = this._inputEditor.getModel();
|
|
203
|
+
const inputHasText = !!model && model.getValueLength() > 0;
|
|
204
|
+
this.inputEditorHasText.set(inputHasText);
|
|
205
|
+
}));
|
|
206
|
+
this._register(this._inputEditor.onDidFocusEditorText(() => {
|
|
207
|
+
this._onDidFocus.fire();
|
|
208
|
+
inputContainer.classList.toggle('focused', true);
|
|
209
|
+
}));
|
|
210
|
+
this._register(this._inputEditor.onDidBlurEditorText(() => {
|
|
211
|
+
inputContainer.classList.toggle('focused', false);
|
|
212
|
+
this._onDidBlur.fire();
|
|
213
|
+
}));
|
|
214
|
+
this._register(this._inputEditor.onDidChangeCursorPosition(e => {
|
|
215
|
+
const model = this._inputEditor.getModel();
|
|
216
|
+
if (!model) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
this.historyNavigationBackwardsEnablement.set(e.position.column === 1 && e.position.lineNumber === 1);
|
|
220
|
+
this.historyNavigationForewardsEnablement.set(e.position.equals(getLastPosition(model)));
|
|
221
|
+
}));
|
|
222
|
+
this.toolbar = this._register(this.instantiationService.createInstance(MenuWorkbenchToolBar, inputContainer, MenuId.ChatExecute, {
|
|
223
|
+
menuOptions: {
|
|
224
|
+
shouldForwardArgs: true
|
|
225
|
+
},
|
|
226
|
+
actionViewItemProvider: (action, options) => {
|
|
227
|
+
if (action.id === SubmitAction.ID) {
|
|
228
|
+
return this.instantiationService.createInstance(SubmitButtonActionViewItem, { widget }, action, options);
|
|
229
|
+
}
|
|
230
|
+
return undefined;
|
|
231
|
+
}
|
|
232
|
+
}));
|
|
233
|
+
this.toolbar.getElement().classList.add('interactive-execute-toolbar');
|
|
234
|
+
this.toolbar.context = { widget };
|
|
235
|
+
this._register(this.toolbar.onDidChangeMenuItems(() => {
|
|
236
|
+
if (this.cachedDimensions && typeof this.cachedToolbarWidth === 'number' && this.cachedToolbarWidth !== this.toolbar.getItemsWidth()) {
|
|
237
|
+
this.layout(this.cachedDimensions.height, this.cachedDimensions.width);
|
|
238
|
+
}
|
|
239
|
+
}));
|
|
240
|
+
if (this.options.renderStyle === 'compact') {
|
|
241
|
+
const toolbarSide = this._register(this.instantiationService.createInstance(MenuWorkbenchToolBar, inputAndSideToolbar, MenuId.ChatInputSide, {
|
|
242
|
+
menuOptions: {
|
|
243
|
+
shouldForwardArgs: true
|
|
244
|
+
}
|
|
245
|
+
}));
|
|
246
|
+
toolbarSide.getElement().classList.add('chat-side-toolbar');
|
|
247
|
+
toolbarSide.context = { widget };
|
|
248
|
+
}
|
|
249
|
+
this.inputModel = this.modelService.getModel(this.inputUri) || this.modelService.createModel('', null, this.inputUri, true);
|
|
250
|
+
this.inputModel.updateOptions({ bracketColorizationOptions: { enabled: false, independentColorPoolPerBracketType: false } });
|
|
251
|
+
this._inputEditor.setModel(this.inputModel);
|
|
252
|
+
if (initialValue) {
|
|
253
|
+
this.inputModel.setValue(initialValue);
|
|
254
|
+
const lineNumber = this.inputModel.getLineCount();
|
|
255
|
+
this._inputEditor.setPosition({ lineNumber, column: this.inputModel.getLineMaxColumn(lineNumber) });
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
async renderFollowups(items, response) {
|
|
259
|
+
if (!this.options.renderFollowups) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
this.followupsDisposables.clear();
|
|
263
|
+
dom.clearNode(this.followupsContainer);
|
|
264
|
+
if (items && items.length > 0) {
|
|
265
|
+
this.followupsDisposables.add(( new ChatFollowups(
|
|
266
|
+
this.followupsContainer,
|
|
267
|
+
items,
|
|
268
|
+
undefined,
|
|
269
|
+
followup => this._onDidAcceptFollowup.fire({ followup, response }),
|
|
270
|
+
this.contextKeyService
|
|
271
|
+
)));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
layout(height, width) {
|
|
275
|
+
this.cachedDimensions = new dom.Dimension(width, height);
|
|
276
|
+
return this._layout(height, width);
|
|
277
|
+
}
|
|
278
|
+
_layout(height, width, allowRecurse = true) {
|
|
279
|
+
const followupsHeight = this.followupsContainer.offsetHeight;
|
|
280
|
+
const inputPartBorder = 1;
|
|
281
|
+
const inputPartHorizontalPadding = 40;
|
|
282
|
+
const inputPartVerticalPadding = 24;
|
|
283
|
+
const inputEditorHeight = Math.min(this._inputEditor.getContentHeight(), height - followupsHeight - inputPartHorizontalPadding - inputPartBorder, INPUT_EDITOR_MAX_HEIGHT);
|
|
284
|
+
const inputEditorBorder = 2;
|
|
285
|
+
const inputPartHeight = followupsHeight + inputEditorHeight + inputPartVerticalPadding + inputPartBorder + inputEditorBorder;
|
|
286
|
+
const editorBorder = 2;
|
|
287
|
+
const editorPadding = 8;
|
|
288
|
+
const executeToolbarWidth = this.cachedToolbarWidth = this.toolbar.getItemsWidth();
|
|
289
|
+
const sideToolbarWidth = this.options.renderStyle === 'compact' ? 20 : 0;
|
|
290
|
+
const initialEditorScrollWidth = this._inputEditor.getScrollWidth();
|
|
291
|
+
this._inputEditor.layout({ width: width - inputPartHorizontalPadding - editorBorder - editorPadding - executeToolbarWidth - sideToolbarWidth, height: inputEditorHeight });
|
|
292
|
+
if (allowRecurse && initialEditorScrollWidth < 10) {
|
|
293
|
+
return this._layout(height, width, false);
|
|
294
|
+
}
|
|
295
|
+
return inputPartHeight;
|
|
296
|
+
}
|
|
297
|
+
saveState() {
|
|
298
|
+
const inputHistory = this.history.getHistory();
|
|
299
|
+
const historyEntries = ( inputHistory.map(entry => ({ text: entry, state: this.historyStates.get(entry) })));
|
|
300
|
+
this.historyService.saveHistory(this.providerId, historyEntries);
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
ChatInputPart = ChatInputPart_1 = ( __decorate([
|
|
304
|
+
( __param(1, IChatWidgetHistoryService)),
|
|
305
|
+
( __param(2, IModelService)),
|
|
306
|
+
( __param(3, IInstantiationService)),
|
|
307
|
+
( __param(4, IContextKeyService)),
|
|
308
|
+
( __param(5, IConfigurationService)),
|
|
309
|
+
( __param(6, IKeybindingService)),
|
|
310
|
+
( __param(7, IAccessibilityService))
|
|
311
|
+
], ChatInputPart));
|
|
312
|
+
let SubmitButtonActionViewItem = class SubmitButtonActionViewItem extends ActionViewItem {
|
|
313
|
+
constructor(context, action, options, keybindingService, chatAgentService) {
|
|
314
|
+
super(context, action, options);
|
|
315
|
+
const primaryKeybinding = keybindingService.lookupKeybinding(ChatSubmitEditorAction.ID)?.getLabel();
|
|
316
|
+
let tooltip = action.label;
|
|
317
|
+
if (primaryKeybinding) {
|
|
318
|
+
tooltip += ` (${primaryKeybinding})`;
|
|
319
|
+
}
|
|
320
|
+
const secondaryAgent = chatAgentService.getSecondaryAgent();
|
|
321
|
+
if (secondaryAgent) {
|
|
322
|
+
const secondaryKeybinding = keybindingService.lookupKeybinding(ChatSubmitSecondaryAgentEditorAction.ID)?.getLabel();
|
|
323
|
+
if (secondaryKeybinding) {
|
|
324
|
+
tooltip += `\n${chatAgentLeader}${secondaryAgent.id} (${secondaryKeybinding})`;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
this._tooltip = tooltip;
|
|
328
|
+
}
|
|
329
|
+
getTooltip() {
|
|
330
|
+
return this._tooltip;
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
SubmitButtonActionViewItem = ( __decorate([
|
|
334
|
+
( __param(3, IKeybindingService)),
|
|
335
|
+
( __param(4, IChatAgentService))
|
|
336
|
+
], SubmitButtonActionViewItem));
|
|
337
|
+
function getLastPosition(model) {
|
|
338
|
+
return { lineNumber: model.getLineCount(), column: model.getLineLength(model.getLineCount()) + 1 };
|
|
339
|
+
}
|
|
340
|
+
export { ChatInputPart };
|