@codingame/monaco-vscode-api 1.83.16 → 1.85.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +13 -7
- package/assets/clear.mp3 +0 -0
- package/assets/format.mp3 +0 -0
- package/assets/save.mp3 +0 -0
- package/extensions.d.ts +13 -3
- package/external/{xterm-addon-image/typings/xterm-addon-image.d.ts → @xterm/addon-image/typings/addon-image.d.ts} +1 -1
- package/external/{xterm-addon-serialize/typings/xterm-addon-serialize.d.ts → @xterm/addon-serialize/typings/addon-serialize.d.ts} +20 -3
- package/external/{xterm → @xterm/xterm}/typings/xterm.d.ts +13 -1
- package/lifecycle.js +2 -2
- package/localExtensionHost.js +3 -1
- package/missing-services.js +160 -25
- package/monaco-editor-treemending.patch +6884 -18018
- package/monaco-treemending.js +2 -2
- package/package.json +7 -7
- package/service-override/tools/editor.d.ts +8 -8
- package/service-override/tools/editor.js +44 -19
- package/services.d.ts +2 -2
- package/services.js +3 -3
- package/vscode/src/vs/base/browser/broadcast.js +6 -5
- package/vscode/src/vs/base/browser/dnd.d.ts +6 -0
- package/vscode/src/vs/base/browser/mouseEvent.d.ts +1 -1
- package/vscode/src/vs/base/browser/touch.d.ts +10 -0
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconHoverDelegate.d.ts +22 -15
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +4 -3
- package/vscode/src/vs/base/browser/ui/splitview/paneview.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/splitview/paneview.d.ts +3 -0
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +34 -11
- package/vscode/src/vs/base/common/actions.d.ts +1 -15
- package/vscode/src/vs/base/common/async.d.ts +1 -31
- package/vscode/src/vs/base/common/event.d.ts +2 -1
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +23 -10
- package/vscode/src/vs/base/common/prefixTree.js +21 -11
- package/vscode/src/vs/base/common/product.d.ts +16 -2
- package/vscode/src/vs/base/common/resourceTree.js +135 -0
- package/vscode/src/vs/base/common/skipList.js +1 -0
- package/vscode/src/vs/base/common/tfIdf.js +137 -0
- package/vscode/src/vs/base/common/types.d.ts +13 -1
- package/vscode/src/vs/base/common/verifier.js +62 -0
- package/vscode/src/vs/editor/browser/editorBrowser.d.ts +4 -2
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +23 -4
- package/vscode/src/vs/editor/common/core/lineRange.d.ts +1 -0
- package/vscode/src/vs/editor/common/core/offsetRange.d.ts +3 -0
- package/vscode/src/vs/editor/common/core/position.d.ts +1 -0
- package/vscode/src/vs/editor/common/editorCommon.d.ts +2 -1
- package/vscode/src/vs/editor/common/languages.d.ts +23 -1
- package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +2 -1
- package/vscode/src/vs/editor/common/services/resolverService.d.ts +11 -2
- package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +16 -1
- package/vscode/src/vs/platform/action/common/action.d.ts +8 -0
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +4 -0
- package/vscode/src/vs/platform/actions/common/actions.d.ts +8 -0
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.d.ts +6 -0
- package/vscode/src/vs/platform/commands/common/commands.d.ts +13 -5
- package/vscode/src/vs/platform/dialogs/common/dialogs.d.ts +9 -3
- package/vscode/src/vs/platform/dialogs/common/dialogs.js +5 -2
- package/vscode/src/vs/platform/editor/common/editor.d.ts +3 -15
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -15
- package/vscode/src/vs/platform/extensionManagement/common/implicitActivationEvents.js +5 -0
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +0 -1
- package/vscode/src/vs/platform/files/common/files.d.ts +72 -8
- package/vscode/src/vs/platform/files/common/watcher.js +77 -0
- package/vscode/src/vs/platform/keybinding/common/keybindingsRegistry.d.ts +2 -2
- package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +52 -21
- package/vscode/src/vs/platform/request/browser/requestService.js +3 -0
- package/vscode/src/vs/platform/request/common/requestIpc.js +17 -0
- package/vscode/src/vs/platform/storage/common/storage.js +2 -2
- package/vscode/src/vs/platform/telemetry/common/telemetry.d.ts +1 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +12 -7
- package/vscode/src/vs/platform/terminal/common/capabilities/{commandDetectionCapability.d.ts → commandDetection/terminalCommand.d.ts} +3 -2
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/terminalCommand.js +257 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +439 -354
- package/vscode/src/vs/platform/window/common/window.d.ts +9 -2
- package/vscode/src/vs/platform/window/common/window.js +6 -1
- package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +2 -43
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +113 -81
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +5 -4
- package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +25 -3
- package/vscode/src/vs/workbench/api/common/extHostChat.js +13 -163
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +412 -0
- package/vscode/src/vs/workbench/api/common/extHostChatProvider.js +79 -11
- package/vscode/src/vs/workbench/api/common/extHostCommands.js +13 -12
- package/vscode/src/vs/workbench/api/common/extHostComments.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +8 -6
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +36 -19
- package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +52 -31
- package/vscode/src/vs/workbench/api/common/extHostIssueReporter.js +38 -0
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +28 -3
- package/vscode/src/vs/workbench/api/common/extHostLanguages.js +10 -0
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +117 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +32 -4
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +85 -23
- package/vscode/src/vs/workbench/api/common/extHostSearch.js +3 -0
- package/vscode/src/vs/workbench/api/common/extHostSpeech.js +42 -0
- package/vscode/src/vs/workbench/api/common/extHostTask.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +97 -47
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +115 -16
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +66 -36
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +6 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +182 -75
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +176 -4
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +143 -2
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +237 -0
- package/vscode/src/vs/workbench/browser/composite.d.ts +0 -4
- package/vscode/src/vs/workbench/browser/composite.js +5 -4
- package/vscode/src/vs/workbench/browser/dnd.js +72 -23
- package/vscode/src/vs/workbench/browser/labels.js +7 -3
- package/vscode/src/vs/workbench/browser/media/part.css.js +1 -1
- package/vscode/src/vs/workbench/browser/panecomposite.d.ts +2 -2
- package/vscode/src/vs/workbench/browser/panecomposite.js +2 -0
- package/vscode/src/vs/workbench/browser/part.js +33 -2
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +99 -117
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +173 -33
- package/vscode/src/vs/workbench/browser/parts/editor/editor.js +102 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +256 -17
- package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +68 -35
- package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +5 -5
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +35 -16
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +348 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +43 -31
- package/vscode/src/vs/workbench/browser/parts/editor/media/editortabscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +14 -2
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +277 -0
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +5 -2
- package/vscode/src/vs/workbench/browser/parts/panel/media/panelpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +3 -38
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.d.ts +54 -52
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +2 -1
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +25 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +258 -0
- package/vscode/src/vs/workbench/browser/parts/views/media/paneviewlet.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +2 -5
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +157 -117
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +50 -23
- package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +26 -11
- package/vscode/src/vs/workbench/browser/parts/views/viewsViewlet.js +10 -6
- package/vscode/src/vs/workbench/browser/style.js +2 -1
- package/vscode/src/vs/workbench/browser/web.api.d.ts +39 -2
- package/vscode/src/vs/workbench/browser/window.js +55 -0
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +220 -40
- package/vscode/src/vs/workbench/common/activity.js +3 -0
- package/vscode/src/vs/workbench/common/contextkeys.js +35 -5
- package/vscode/src/vs/workbench/common/contributions.js +4 -3
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +14 -4
- package/vscode/src/vs/workbench/common/editor/diffEditorModel.js +1 -1
- package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +22 -19
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +4 -3
- package/vscode/src/vs/workbench/common/editor/editorModel.d.ts +1 -2
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +22 -4
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +3 -3
- package/vscode/src/vs/workbench/common/editor.d.ts +60 -30
- package/vscode/src/vs/workbench/common/editor.js +11 -3
- package/vscode/src/vs/workbench/common/theme.js +2 -2
- package/vscode/src/vs/workbench/common/views.d.ts +4 -4
- package/vscode/src/vs/workbench/common/views.js +3 -1
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +97 -8
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +17 -99
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +103 -37
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +2 -3
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +33 -110
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +94 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +1 -88
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +3 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +15 -16
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +9 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +3 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +2 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +10 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +114 -22
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +4 -1
- package/vscode/src/vs/workbench/contrib/files/browser/explorerFileContrib.js +19 -0
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +10 -8
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +62 -10
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +2 -1
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +9 -8
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +10 -1
- package/vscode/src/vs/workbench/contrib/files/browser/files.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/files/browser/files.js +7 -3
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +64 -36
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +42 -17
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +145 -25
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +1 -1
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +36 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +3 -1
- package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +24 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +11 -6
- package/vscode/src/vs/workbench/contrib/scm/common/scm.js +1 -2
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers.js +31 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +61 -41
- package/vscode/src/vs/workbench/contrib/search/{browser/searchNotebookHelpers.js → common/cellSearchModel.js} +4 -63
- package/vscode/src/vs/workbench/contrib/search/common/searchNotebookHelpers.js +40 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +2 -2
- package/vscode/src/vs/workbench/{services/editor/browser/editorDropService.js → contrib/speech/common/speechService.js} +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/detachedTerminal.js +29 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +100 -79
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcon.js +7 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +5 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +143 -41
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +17 -11
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +41 -26
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +2 -8
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +115 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +74 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +64 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +9 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +4 -3
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +8 -9
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +5 -2
- package/vscode/src/vs/workbench/services/activity/browser/activityService.d.ts +16 -10
- package/vscode/src/vs/workbench/services/activity/common/activity.d.ts +14 -1
- package/vscode/src/vs/workbench/services/activity/common/activity.js +1 -7
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +9 -28
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +273 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +2 -0
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +2 -3
- package/vscode/src/vs/workbench/services/editor/browser/editorService.d.ts +7 -5
- package/vscode/src/vs/workbench/services/editor/browser/editorService.js +59 -37
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +193 -94
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.js +2 -2
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.d.ts +8 -2
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +8 -1
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +62 -16
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +5 -3
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +3 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +4 -9
- package/vscode/src/vs/workbench/services/extensions/common/{extensionHostManager.d.ts → extensionHostManagers.d.ts} +2 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +9 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +22 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +14 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +9 -0
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +3 -3
- package/vscode/src/vs/workbench/services/history/common/history.d.ts +2 -2
- package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +49 -18
- package/vscode/src/vs/workbench/services/host/browser/host.d.ts +29 -7
- package/vscode/src/vs/workbench/services/hover/browser/hover.d.ts +51 -28
- package/vscode/src/vs/workbench/services/hover/browser/hoverService.d.ts +5 -2
- package/vscode/src/vs/workbench/services/keybinding/browser/unboundCommands.js +2 -2
- package/vscode/src/vs/workbench/services/languageStatus/common/languageStatusService.d.ts +4 -1
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +40 -36
- package/vscode/src/vs/workbench/services/panecomposite/browser/panecomposite.d.ts +0 -6
- package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +3 -0
- package/vscode/src/vs/workbench/services/progress/browser/progressIndicator.js +2 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +18 -3
- package/vscode/src/vs/workbench/services/request/browser/requestService.js +48 -0
- package/vscode/src/vs/workbench/services/search/common/searchHelpers.js +4 -4
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +10 -51
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +2 -2
- package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +32 -1
- package/vscode/src/vs/workbench/services/textfile/common/textEditorService.js +1 -5
- package/vscode/src/vs/workbench/services/themes/browser/browserHostColorSchemeService.js +4 -3
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +9 -3
- package/vscode/src/vs/workbench/services/title/browser/titleService.d.ts +18 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +18 -3
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorModel.js +16 -7
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +6 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +13 -0
- package/vscode/src/vs/workbench/services/url/browser/urlService.js +2 -1
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +9 -0
- package/vscode-dts/vscode.proposed.chatAgents2.d.ts +375 -0
- package/vscode-dts/vscode.proposed.chatAgents2Additions.d.ts +80 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +5 -1
- package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +68 -10
- package/vscode-dts/vscode.proposed.chatTab.d.ts +21 -0
- package/vscode-dts/vscode.proposed.chatVariables.d.ts +5 -1
- package/vscode-dts/vscode.proposed.codeActionAI.d.ts +16 -0
- package/vscode-dts/vscode.proposed.contribSourceControlInputBoxMenu.d.ts +7 -0
- package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +51 -0
- package/vscode-dts/vscode.proposed.defaultChatAgent.d.ts +30 -0
- package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +26 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +26 -100
- package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +14 -7
- package/vscode-dts/vscode.proposed.languageStatusText.d.ts +12 -0
- package/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts +63 -0
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +43 -0
- package/vscode-dts/vscode.proposed.resolvers.d.ts +100 -1
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +9 -1
- package/vscode-dts/vscode.proposed.scmInputBoxActionButton.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmInputBoxValueProvider.d.ts +25 -0
- package/vscode-dts/vscode.proposed.speech.d.ts +35 -0
- package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +11 -7
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +6 -1
- package/vscode-dts/vscode.proposed.testingActiveProfile.d.ts +21 -0
- package/external/xterm-headless/typings/xterm-headless.d.ts +0 -49
- package/vscode/src/vs/platform/backup/common/backup.d.ts +0 -14
- package/vscode/src/vs/platform/update/common/update.d.ts +0 -112
- package/vscode/src/vs/workbench/api/common/extHostChatAgents.js +0 -62
- package/vscode/src/vs/workbench/api/common/extHostChatSlashCommand.js +0 -62
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +0 -56
- package/vscode/src/vs/workbench/services/files/common/files.js +0 -4
- package/vscode/src/vs/workbench/services/host/browser/browserHostService.d.ts +0 -41
- package/vscode/src/vs/workbench/services/title/common/titleService.d.ts +0 -31
- package/vscode-dts/vscode.proposed.chatAgents.d.ts +0 -39
- package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +0 -47
- package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +0 -45
- /package/external/{xterm-addon-canvas/typings/xterm-addon-canvas.d.ts → @xterm/addon-canvas/typings/addon-canvas.d.ts} +0 -0
- /package/external/{xterm-addon-search/typings/xterm-addon-search.d.ts → @xterm/addon-search/typings/addon-search.d.ts} +0 -0
- /package/external/{xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts → @xterm/addon-unicode11/typings/addon-unicode11.d.ts} +0 -0
- /package/external/{xterm-addon-webgl/typings/xterm-addon-webgl.d.ts → @xterm/addon-webgl/typings/addon-webgl.d.ts} +0 -0
- /package/vscode/src/vs/workbench/services/title/{common → browser}/titleService.js +0 -0
|
@@ -72,11 +72,7 @@ let TextEditorService = class TextEditorService extends Disposable {
|
|
|
72
72
|
else {
|
|
73
73
|
untitledModel = this.untitledTextEditorService.create({ associatedResource: untitledInput.resource, ...untitledOptions });
|
|
74
74
|
}
|
|
75
|
-
return this.createOrGetCached(untitledModel.resource, () =>
|
|
76
|
-
const input = this.instantiationService.createInstance(UntitledTextEditorInput, untitledModel);
|
|
77
|
-
Event.once(input.onWillDispose)(() => untitledModel.dispose());
|
|
78
|
-
return input;
|
|
79
|
-
});
|
|
75
|
+
return this.createOrGetCached(untitledModel.resource, () => this.instantiationService.createInstance(UntitledTextEditorInput, untitledModel));
|
|
80
76
|
}
|
|
81
77
|
const textResourceEditorInput = input;
|
|
82
78
|
if (textResourceEditorInput.resource instanceof URI) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
2
2
|
import { addMatchMediaChangeListener } from 'monaco-editor/esm/vs/base/browser/browser.js';
|
|
3
3
|
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
|
+
import { mainWindow } from 'monaco-editor/esm/vs/base/browser/window.js';
|
|
4
5
|
class BrowserHostColorSchemeService extends Disposable {
|
|
5
6
|
constructor() {
|
|
6
7
|
super();
|
|
@@ -19,16 +20,16 @@ class BrowserHostColorSchemeService extends Disposable {
|
|
|
19
20
|
return this._onDidSchemeChangeEvent.event;
|
|
20
21
|
}
|
|
21
22
|
get dark() {
|
|
22
|
-
if (
|
|
23
|
+
if (mainWindow.matchMedia(`(prefers-color-scheme: light)`).matches) {
|
|
23
24
|
return false;
|
|
24
25
|
}
|
|
25
|
-
else if (
|
|
26
|
+
else if (mainWindow.matchMedia(`(prefers-color-scheme: dark)`).matches) {
|
|
26
27
|
return true;
|
|
27
28
|
}
|
|
28
29
|
return false;
|
|
29
30
|
}
|
|
30
31
|
get highContrast() {
|
|
31
|
-
if (
|
|
32
|
+
if (mainWindow.matchMedia(`(forced-colors: active)`).matches) {
|
|
32
33
|
return true;
|
|
33
34
|
}
|
|
34
35
|
return false;
|
|
@@ -118,13 +118,14 @@ class IconExtensionPoint {
|
|
|
118
118
|
iconRegistry.registerIcon(id, { id: defaultIcon }, iconContribution.description);
|
|
119
119
|
}
|
|
120
120
|
else if (typeof defaultIcon === 'object' && typeof defaultIcon.fontPath === 'string' && typeof defaultIcon.fontCharacter === 'string') {
|
|
121
|
-
const
|
|
122
|
-
|
|
121
|
+
const fileExt = extname(defaultIcon.fontPath).substring(1);
|
|
122
|
+
const format = formatMap[fileExt];
|
|
123
|
+
if (!format) {
|
|
123
124
|
collector.warn(( nls.localizeWithPath(
|
|
124
125
|
'vs/workbench/services/themes/common/iconExtensionPoint',
|
|
125
126
|
'invalid.icons.default.fontPath.extension',
|
|
126
127
|
"Expected `contributes.icons.default.fontPath` to have file extension 'woff', woff2' or 'ttf', is '{0}'.",
|
|
127
|
-
|
|
128
|
+
fileExt
|
|
128
129
|
)));
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
@@ -168,6 +169,11 @@ class IconExtensionPoint {
|
|
|
168
169
|
});
|
|
169
170
|
}
|
|
170
171
|
}
|
|
172
|
+
const formatMap = {
|
|
173
|
+
'ttf': 'truetype',
|
|
174
|
+
'woff': 'woff',
|
|
175
|
+
'woff2': 'woff2'
|
|
176
|
+
};
|
|
171
177
|
function getFontId(description, fontPath) {
|
|
172
178
|
return posix.join(description.identifier.value, fontPath);
|
|
173
179
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ServiceIdentifier } from '../../../../platform/instantiation/common/instantiation.js';
|
|
2
|
+
import { ITitlebarPart, IAuxiliaryTitlebarPart } from '../../../browser/parts/titlebar/titlebarPart.js';
|
|
3
|
+
import { IEditorGroupsContainer } from '../../editor/common/editorGroupsService.js';
|
|
4
|
+
|
|
5
|
+
declare const ITitleService: ServiceIdentifier<ITitleService>;
|
|
6
|
+
interface ITitleService extends ITitlebarPart {
|
|
7
|
+
readonly _serviceBrand: undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Get the status bar part that is rooted in the provided container.
|
|
10
|
+
*/
|
|
11
|
+
getPart(container: HTMLElement): ITitlebarPart;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new auxililary title bar part in the provided container.
|
|
14
|
+
*/
|
|
15
|
+
createAuxiliaryTitlebarPart(container: HTMLElement, editorGroupsContainer: IEditorGroupsContainer): IAuxiliaryTitlebarPart;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { ITitleService };
|
|
@@ -9,6 +9,8 @@ import { toLocalResource, isEqual } from 'monaco-editor/esm/vs/base/common/resou
|
|
|
9
9
|
import { IWorkbenchEnvironmentService } from '../../environment/common/environmentService.js';
|
|
10
10
|
import { IPathService } from '../../path/common/pathService.js';
|
|
11
11
|
import { IFilesConfigurationService } from '../../filesConfiguration/common/filesConfigurationService.js';
|
|
12
|
+
import { ITextModelService } from 'monaco-editor/esm/vs/editor/common/services/resolverService.js';
|
|
13
|
+
import { dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
12
14
|
var UntitledTextEditorInput_1;
|
|
13
15
|
let UntitledTextEditorInput = class UntitledTextEditorInput extends AbstractTextResourceEditorInput {
|
|
14
16
|
static { UntitledTextEditorInput_1 = this; }
|
|
@@ -19,12 +21,14 @@ let UntitledTextEditorInput = class UntitledTextEditorInput extends AbstractText
|
|
|
19
21
|
get editorId() {
|
|
20
22
|
return DEFAULT_EDITOR_ASSOCIATION.id;
|
|
21
23
|
}
|
|
22
|
-
constructor(model, textFileService, labelService, editorService, fileService, environmentService, pathService, filesConfigurationService) {
|
|
24
|
+
constructor(model, textFileService, labelService, editorService, fileService, environmentService, pathService, filesConfigurationService, textModelService) {
|
|
23
25
|
super(model.resource, undefined, editorService, textFileService, labelService, fileService, filesConfigurationService);
|
|
24
26
|
this.model = model;
|
|
25
27
|
this.environmentService = environmentService;
|
|
26
28
|
this.pathService = pathService;
|
|
29
|
+
this.textModelService = textModelService;
|
|
27
30
|
this.modelResolve = undefined;
|
|
31
|
+
this.cachedUntitledTextEditorModelReference = undefined;
|
|
28
32
|
this.registerModelListeners(model);
|
|
29
33
|
}
|
|
30
34
|
registerModelListeners(model) {
|
|
@@ -73,9 +77,14 @@ let UntitledTextEditorInput = class UntitledTextEditorInput extends AbstractText
|
|
|
73
77
|
}
|
|
74
78
|
async resolve() {
|
|
75
79
|
if (!this.modelResolve) {
|
|
76
|
-
this.modelResolve =
|
|
80
|
+
this.modelResolve = (async () => {
|
|
81
|
+
this.cachedUntitledTextEditorModelReference = await this.textModelService.createModelReference(this.resource);
|
|
82
|
+
})();
|
|
77
83
|
}
|
|
78
84
|
await this.modelResolve;
|
|
85
|
+
if (this.isDisposed()) {
|
|
86
|
+
this.disposeModelReference();
|
|
87
|
+
}
|
|
79
88
|
return this.model;
|
|
80
89
|
}
|
|
81
90
|
toUntyped(options) {
|
|
@@ -111,8 +120,13 @@ let UntitledTextEditorInput = class UntitledTextEditorInput extends AbstractText
|
|
|
111
120
|
}
|
|
112
121
|
dispose() {
|
|
113
122
|
this.modelResolve = undefined;
|
|
123
|
+
this.disposeModelReference();
|
|
114
124
|
super.dispose();
|
|
115
125
|
}
|
|
126
|
+
disposeModelReference() {
|
|
127
|
+
dispose(this.cachedUntitledTextEditorModelReference);
|
|
128
|
+
this.cachedUntitledTextEditorModelReference = undefined;
|
|
129
|
+
}
|
|
116
130
|
};
|
|
117
131
|
UntitledTextEditorInput = UntitledTextEditorInput_1 = ( __decorate([
|
|
118
132
|
( __param(1, ITextFileService)),
|
|
@@ -121,6 +135,7 @@ UntitledTextEditorInput = UntitledTextEditorInput_1 = ( __decorate([
|
|
|
121
135
|
( __param(4, IFileService)),
|
|
122
136
|
( __param(5, IWorkbenchEnvironmentService)),
|
|
123
137
|
( __param(6, IPathService)),
|
|
124
|
-
( __param(7, IFilesConfigurationService))
|
|
138
|
+
( __param(7, IFilesConfigurationService)),
|
|
139
|
+
( __param(8, ITextModelService))
|
|
125
140
|
], UntitledTextEditorInput));
|
|
126
141
|
export { UntitledTextEditorInput };
|
|
@@ -5,7 +5,7 @@ import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model
|
|
|
5
5
|
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
6
6
|
import { IWorkingCopyBackupService } from '../../workingCopy/common/workingCopyBackup.js';
|
|
7
7
|
import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
8
|
-
import { createTextBufferFactoryFromStream } from 'monaco-editor/esm/vs/editor/common/model/textModel.js';
|
|
8
|
+
import { createTextBufferFactory, createTextBufferFactoryFromStream } from 'monaco-editor/esm/vs/editor/common/model/textModel.js';
|
|
9
9
|
import { IWorkingCopyService } from '../../workingCopy/common/workingCopyService.js';
|
|
10
10
|
import { NO_TYPE_ID } from '../../workingCopy/common/workingCopy.js';
|
|
11
11
|
import { ITextFileService } from '../../textfile/common/textfiles.js';
|
|
@@ -60,6 +60,7 @@ let UntitledTextEditorModel = class UntitledTextEditorModel extends BaseTextEdit
|
|
|
60
60
|
this.configuredLabelFormat = 'content';
|
|
61
61
|
this.cachedModelFirstLineWords = undefined;
|
|
62
62
|
this.dirty = this.hasAssociatedFilePath || !!this.initialValue;
|
|
63
|
+
this.ignoreDirtyOnModelContentChange = false;
|
|
63
64
|
this._register(this.workingCopyService.registerWorkingCopy(this));
|
|
64
65
|
if (preferredLanguageId) {
|
|
65
66
|
this.setLanguageId(preferredLanguageId);
|
|
@@ -136,9 +137,15 @@ let UntitledTextEditorModel = class UntitledTextEditorModel extends BaseTextEdit
|
|
|
136
137
|
return !!target;
|
|
137
138
|
}
|
|
138
139
|
async revert() {
|
|
140
|
+
this.ignoreDirtyOnModelContentChange = true;
|
|
141
|
+
try {
|
|
142
|
+
this.updateTextEditorModel(createTextBufferFactory(''));
|
|
143
|
+
}
|
|
144
|
+
finally {
|
|
145
|
+
this.ignoreDirtyOnModelContentChange = false;
|
|
146
|
+
}
|
|
139
147
|
this.setDirty(false);
|
|
140
148
|
this._onDidRevert.fire();
|
|
141
|
-
this.dispose();
|
|
142
149
|
}
|
|
143
150
|
async backup(token) {
|
|
144
151
|
let content = undefined;
|
|
@@ -189,11 +196,13 @@ let UntitledTextEditorModel = class UntitledTextEditorModel extends BaseTextEdit
|
|
|
189
196
|
super.installModelListeners(model);
|
|
190
197
|
}
|
|
191
198
|
onModelContentChanged(textEditorModel, e) {
|
|
192
|
-
if (!this.
|
|
193
|
-
this.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
199
|
+
if (!this.ignoreDirtyOnModelContentChange) {
|
|
200
|
+
if (!this.hasAssociatedFilePath && textEditorModel.getLineCount() === 1 && textEditorModel.getLineLength(1) === 0) {
|
|
201
|
+
this.setDirty(false);
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
this.setDirty(true);
|
|
205
|
+
}
|
|
197
206
|
}
|
|
198
207
|
if (( e.changes.some(
|
|
199
208
|
change => (change.range.startLineNumber === 1 || change.range.endLineNumber === 1) && change.range.startColumn <= UntitledTextEditorModel_1.FIRST_LINE_NAME_CANDIDATE_MAX_LENGTH
|
|
@@ -89,6 +89,12 @@ interface IUntitledTextEditorModelManager {
|
|
|
89
89
|
* Figures out if the given resource has an associated resource or not.
|
|
90
90
|
*/
|
|
91
91
|
isUntitledWithAssociatedResource(resource: URI): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Waits for the model to be ready to be disposed. There may be conditions
|
|
94
|
+
* under which the model cannot be disposed, e.g. when it is dirty. Once the
|
|
95
|
+
* promise is settled, it is safe to dispose the model.
|
|
96
|
+
*/
|
|
97
|
+
canDispose(model: IUntitledTextEditorModel): true | Promise<true>;
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
export type { IExistingUntitledTextEditorOptions, INewUntitledTextEditorOptions, INewUntitledTextEditorWithAssociatedResourceOptions, IUntitledTextEditorModelManager };
|
|
@@ -108,6 +108,19 @@ let UntitledTextEditorService = class UntitledTextEditorService extends Disposab
|
|
|
108
108
|
isUntitledWithAssociatedResource(resource) {
|
|
109
109
|
return resource.scheme === Schemas.untitled && resource.path.length > 1 && !UntitledTextEditorService_1.UNTITLED_WITHOUT_ASSOCIATED_RESOURCE_REGEX.test(resource.path);
|
|
110
110
|
}
|
|
111
|
+
canDispose(model) {
|
|
112
|
+
if (model.isDisposed()) {
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
return this.doCanDispose(model);
|
|
116
|
+
}
|
|
117
|
+
async doCanDispose(model) {
|
|
118
|
+
if (model.isDirty()) {
|
|
119
|
+
await Event.toPromise(model.onDidChangeDirty);
|
|
120
|
+
return this.canDispose(model);
|
|
121
|
+
}
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
111
124
|
};
|
|
112
125
|
UntitledTextEditorService = UntitledTextEditorService_1 = ( __decorate([
|
|
113
126
|
( __param(0, IInstantiationService)),
|
|
@@ -2,7 +2,8 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
3
3
|
import { AbstractURLService } from '../../../../platform/url/common/urlService.js';
|
|
4
4
|
import { IBrowserWorkbenchEnvironmentService } from '../../environment/browser/environmentService.js';
|
|
5
|
-
import {
|
|
5
|
+
import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
6
|
+
import { matchesScheme } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
6
7
|
import { IProductService } from 'monaco-editor/esm/vs/platform/product/common/productService.js';
|
|
7
8
|
class BrowserURLOpener {
|
|
8
9
|
constructor(urlService, productService) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { RunOnceScheduler,
|
|
2
|
+
import { RunOnceScheduler, runWhenGlobalIdle } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
3
3
|
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
4
4
|
import { Disposable, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
5
|
import { createDecorator, IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
@@ -16,7 +16,7 @@ let UserActivityService = class UserActivityService extends Disposable {
|
|
|
16
16
|
this.active = 0;
|
|
17
17
|
this.isActive = true;
|
|
18
18
|
this.onDidChangeIsActive = this.changeEmitter.event;
|
|
19
|
-
this._register(
|
|
19
|
+
this._register(runWhenGlobalIdle(() => userActivityRegistry.take(this, instantiationService)));
|
|
20
20
|
}
|
|
21
21
|
markActive() {
|
|
22
22
|
if (++this.active === 1) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
4
|
+
const DEFAULT_ICON = registerIcon('settings-view-bar-icon', Codicon.settingsGear, ( localizeWithPath(
|
|
5
|
+
'vs/workbench/services/userDataProfile/common/userDataProfileIcons',
|
|
6
|
+
'settingsViewBarIcon',
|
|
7
|
+
"Settings icon in the view bar."
|
|
8
|
+
)));
|
|
9
|
+
export { DEFAULT_ICON };
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
export interface ChatAgentContext {
|
|
9
|
+
/**
|
|
10
|
+
* All of the chat messages so far in the current chat session.
|
|
11
|
+
*/
|
|
12
|
+
history: ChatMessage[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents an error result from a chat request.
|
|
17
|
+
*/
|
|
18
|
+
export interface ChatAgentErrorDetails {
|
|
19
|
+
/**
|
|
20
|
+
* An error message that is shown to the user.
|
|
21
|
+
*/
|
|
22
|
+
message: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* If partial markdown content was sent over the `progress` callback before the response terminated, then this flag
|
|
26
|
+
* can be set to true and it will be rendered with incomplete markdown features patched up.
|
|
27
|
+
*
|
|
28
|
+
* For example, if the response terminated after sending part of a triple-backtick code block, then the editor will
|
|
29
|
+
* render it as a complete code block.
|
|
30
|
+
*/
|
|
31
|
+
responseIsIncomplete?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* If set to true, the response will be partly blurred out.
|
|
35
|
+
*/
|
|
36
|
+
responseIsFiltered?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The result of a chat request.
|
|
41
|
+
*/
|
|
42
|
+
export interface ChatAgentResult2 {
|
|
43
|
+
/**
|
|
44
|
+
* If the request resulted in an error, this property defines the error details.
|
|
45
|
+
*/
|
|
46
|
+
errorDetails?: ChatAgentErrorDetails;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Represents the type of user feedback received.
|
|
51
|
+
*/
|
|
52
|
+
export enum ChatAgentResultFeedbackKind {
|
|
53
|
+
/**
|
|
54
|
+
* The user marked the result as helpful.
|
|
55
|
+
*/
|
|
56
|
+
Unhelpful = 0,
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The user marked the result as unhelpful.
|
|
60
|
+
*/
|
|
61
|
+
Helpful = 1,
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Represents user feedback for a result.
|
|
66
|
+
*/
|
|
67
|
+
export interface ChatAgentResult2Feedback {
|
|
68
|
+
/**
|
|
69
|
+
* This instance of ChatAgentResult2 is the same instance that was returned from the chat agent,
|
|
70
|
+
* and it can be extended with arbitrary properties if needed.
|
|
71
|
+
*/
|
|
72
|
+
readonly result: ChatAgentResult2;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The kind of feedback that was received.
|
|
76
|
+
*/
|
|
77
|
+
readonly kind: ChatAgentResultFeedbackKind;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ChatAgentSlashCommand {
|
|
81
|
+
/**
|
|
82
|
+
* A short name by which this command is referred to in the UI, e.g. `fix` or
|
|
83
|
+
* `explain` for commands that fix an issue or explain code.
|
|
84
|
+
*
|
|
85
|
+
* **Note**: The name should be unique among the slash commands provided by this agent.
|
|
86
|
+
*/
|
|
87
|
+
readonly name: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Human-readable description explaining what this command does.
|
|
91
|
+
*/
|
|
92
|
+
readonly description: string;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* When the user clicks this slash command in `/help`, this text will be submitted to this slash command
|
|
96
|
+
*/
|
|
97
|
+
readonly sampleRequest?: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Whether executing the command puts the
|
|
101
|
+
* chat into a persistent mode, where the
|
|
102
|
+
* slash command is prepended to the chat input.
|
|
103
|
+
*/
|
|
104
|
+
readonly shouldRepopulate?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Placeholder text to render in the chat input
|
|
107
|
+
* when the slash command has been repopulated.
|
|
108
|
+
* Has no effect if `shouldRepopulate` is `false`.
|
|
109
|
+
*/
|
|
110
|
+
readonly followupPlaceholder?: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface ChatAgentSlashCommandProvider {
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Returns a list of slash commands that its agent is capable of handling. A slash command
|
|
117
|
+
* can be selected by the user and will then be passed to the {@link ChatAgentHandler handler}
|
|
118
|
+
* via the {@link ChatAgentRequest.slashCommand slashCommand} property.
|
|
119
|
+
*
|
|
120
|
+
*
|
|
121
|
+
* @param token A cancellation token.
|
|
122
|
+
* @returns A list of slash commands. The lack of a result can be signaled by returning `undefined`, `null`, or
|
|
123
|
+
* an empty array.
|
|
124
|
+
*/
|
|
125
|
+
provideSlashCommands(token: CancellationToken): ProviderResult<ChatAgentSlashCommand[]>;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// TODO@API This should become a progress type, and use vscode.Command
|
|
129
|
+
// TODO@API what's the when-property for? how about not returning it in the first place?
|
|
130
|
+
export interface ChatAgentCommandFollowup {
|
|
131
|
+
commandId: string;
|
|
132
|
+
args?: any[];
|
|
133
|
+
title: string; // supports codicon strings
|
|
134
|
+
when?: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* A followup question suggested by the model.
|
|
139
|
+
*/
|
|
140
|
+
export interface ChatAgentReplyFollowup {
|
|
141
|
+
/**
|
|
142
|
+
* The message to send to the chat.
|
|
143
|
+
*/
|
|
144
|
+
message: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* A tooltip to show when hovering over the followup.
|
|
148
|
+
*/
|
|
149
|
+
tooltip?: string;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* A title to show the user, when it is different than the message.
|
|
153
|
+
*/
|
|
154
|
+
title?: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export type ChatAgentFollowup = ChatAgentCommandFollowup | ChatAgentReplyFollowup;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Will be invoked once after each request to get suggested followup questions to show the user. The user can click the followup to send it to the chat.
|
|
161
|
+
*/
|
|
162
|
+
export interface FollowupProvider {
|
|
163
|
+
/**
|
|
164
|
+
*
|
|
165
|
+
* @param result The same instance of the result object that was returned by the chat agent, and it can be extended with arbitrary properties if needed.
|
|
166
|
+
* @param token A cancellation token.
|
|
167
|
+
*/
|
|
168
|
+
provideFollowups(result: ChatAgentResult2, token: CancellationToken): ProviderResult<ChatAgentFollowup[]>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface ChatAgent2 {
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The short name by which this agent is referred to in the UI, e.g `workspace`.
|
|
175
|
+
*/
|
|
176
|
+
readonly name: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The full name of this agent.
|
|
180
|
+
*/
|
|
181
|
+
fullName: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* A human-readable description explaining what this agent does.
|
|
185
|
+
*/
|
|
186
|
+
description: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Icon for the agent shown in UI.
|
|
190
|
+
*/
|
|
191
|
+
iconPath?: Uri | {
|
|
192
|
+
/**
|
|
193
|
+
* The icon path for the light theme.
|
|
194
|
+
*/
|
|
195
|
+
light: Uri;
|
|
196
|
+
/**
|
|
197
|
+
* The icon path for the dark theme.
|
|
198
|
+
*/
|
|
199
|
+
dark: Uri;
|
|
200
|
+
} | ThemeIcon;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* This provider will be called to retrieve the agent's slash commands.
|
|
204
|
+
*/
|
|
205
|
+
slashCommandProvider?: ChatAgentSlashCommandProvider;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* This provider will be called once after each request to retrieve suggested followup questions.
|
|
209
|
+
*/
|
|
210
|
+
followupProvider?: FollowupProvider;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* When the user clicks this agent in `/help`, this text will be submitted to this slash command
|
|
214
|
+
*/
|
|
215
|
+
sampleRequest?: string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* An event that fires whenever feedback for a result is received, e.g. when a user up- or down-votes
|
|
219
|
+
* a result.
|
|
220
|
+
*
|
|
221
|
+
* The passed {@link ChatAgentResult2Feedback.result result} is guaranteed to be the same instance that was
|
|
222
|
+
* previously returned from this chat agent.
|
|
223
|
+
*/
|
|
224
|
+
onDidReceiveFeedback: Event<ChatAgentResult2Feedback>;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* TODO@API explain what happens wrt to history, in-flight requests etc...
|
|
228
|
+
* Dispose this agent and free resources
|
|
229
|
+
*/
|
|
230
|
+
dispose(): void;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface ChatAgentRequest {
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* The prompt entered by the user. The {@link ChatAgent2.name name} of the agent or the {@link ChatAgentSlashCommand.name slash command}
|
|
237
|
+
* are not part of the prompt.
|
|
238
|
+
*
|
|
239
|
+
* @see {@link ChatAgentRequest.slashCommand}
|
|
240
|
+
*/
|
|
241
|
+
prompt: string;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The {@link ChatAgentSlashCommand slash command} that was selected for this request. It is guaranteed that the passed slash
|
|
245
|
+
* command is an instance that was previously returned from the {@link ChatAgentSlashCommandProvider.provideSlashCommands slash command provider}.
|
|
246
|
+
*/
|
|
247
|
+
slashCommand?: ChatAgentSlashCommand;
|
|
248
|
+
|
|
249
|
+
variables: Record<string, ChatVariableValue[]>;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export type ChatAgentProgress =
|
|
253
|
+
| ChatAgentContent
|
|
254
|
+
| ChatAgentTask
|
|
255
|
+
| ChatAgentFileTree
|
|
256
|
+
| ChatAgentUsedContext
|
|
257
|
+
| ChatAgentContentReference
|
|
258
|
+
| ChatAgentInlineContentReference
|
|
259
|
+
| ChatAgentProgressMessage;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Is displayed in the UI to communicate steps of progress to the user. Should be used when the agent may be slow to respond, e.g. due to doing extra work before sending the actual request to the LLM.
|
|
263
|
+
*/
|
|
264
|
+
export interface ChatAgentProgressMessage {
|
|
265
|
+
message: string;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Indicates a piece of content that was used by the chat agent while processing the request. Will be displayed to the user.
|
|
270
|
+
*/
|
|
271
|
+
export interface ChatAgentContentReference {
|
|
272
|
+
/**
|
|
273
|
+
* The resource that was referenced.
|
|
274
|
+
*/
|
|
275
|
+
reference: Uri | Location;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* A reference to a piece of content that will be rendered inline with the markdown content.
|
|
280
|
+
*/
|
|
281
|
+
export interface ChatAgentInlineContentReference {
|
|
282
|
+
/**
|
|
283
|
+
* The resource being referenced.
|
|
284
|
+
*/
|
|
285
|
+
inlineReference: Uri | Location;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* An alternate title for the resource.
|
|
289
|
+
*/
|
|
290
|
+
title?: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* A piece of the chat response's content. Will be merged with other progress pieces as needed, and rendered as markdown.
|
|
295
|
+
*/
|
|
296
|
+
export interface ChatAgentContent {
|
|
297
|
+
/**
|
|
298
|
+
* The content as a string of markdown source.
|
|
299
|
+
*/
|
|
300
|
+
content: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Represents a piece of the chat response's content that is resolved asynchronously. It is rendered immediately with a placeholder,
|
|
305
|
+
* which is replaced once the full content is available.
|
|
306
|
+
*/
|
|
307
|
+
export interface ChatAgentTask {
|
|
308
|
+
/**
|
|
309
|
+
* The markdown string to be rendered immediately.
|
|
310
|
+
*/
|
|
311
|
+
placeholder: string;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* A Thenable resolving to the real content. The placeholder will be replaced with this content once it's available.
|
|
315
|
+
*/
|
|
316
|
+
resolvedContent: Thenable<ChatAgentContent | ChatAgentFileTree>;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Represents a tree, such as a file and directory structure, rendered in the chat response.
|
|
321
|
+
*/
|
|
322
|
+
export interface ChatAgentFileTree {
|
|
323
|
+
/**
|
|
324
|
+
* The root node of the tree.
|
|
325
|
+
*/
|
|
326
|
+
treeData: ChatAgentFileTreeData;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Represents a node in a chat response tree.
|
|
331
|
+
*/
|
|
332
|
+
export interface ChatAgentFileTreeData {
|
|
333
|
+
/**
|
|
334
|
+
* A human-readable string describing this node.
|
|
335
|
+
*/
|
|
336
|
+
label: string;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* A Uri for this node, opened when it's clicked.
|
|
340
|
+
*/
|
|
341
|
+
uri: Uri;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* The children of this node.
|
|
345
|
+
*/
|
|
346
|
+
children?: ChatAgentFileTreeData[];
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface ChatAgentDocumentContext {
|
|
350
|
+
uri: Uri;
|
|
351
|
+
version: number;
|
|
352
|
+
ranges: Range[];
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Document references that should be used by the MappedEditsProvider.
|
|
357
|
+
*/
|
|
358
|
+
export interface ChatAgentUsedContext {
|
|
359
|
+
documents: ChatAgentDocumentContext[];
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export type ChatAgentHandler = (request: ChatAgentRequest, context: ChatAgentContext, progress: Progress<ChatAgentProgress>, token: CancellationToken) => ProviderResult<ChatAgentResult2>;
|
|
363
|
+
|
|
364
|
+
export namespace chat {
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Create a new {@link ChatAgent2 chat agent} instance.
|
|
368
|
+
*
|
|
369
|
+
* @param name Short name by which this agent is referred to in the UI
|
|
370
|
+
* @param handler The reply-handler of the agent.
|
|
371
|
+
* @returns A new chat agent
|
|
372
|
+
*/
|
|
373
|
+
export function createChatAgent(name: string, handler: ChatAgentHandler): ChatAgent2;
|
|
374
|
+
}
|
|
375
|
+
}
|