@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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { coalesce } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
3
|
-
import { Disposable, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
3
|
+
import { Disposable, MutableDisposable, dispose, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
4
|
import { timeout } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
5
5
|
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
6
6
|
import { TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR } from '../../common/terminalColorRegistry.js';
|
|
7
|
+
import { getWindow } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
7
8
|
var Boundary;
|
|
8
9
|
( (function(Boundary) {
|
|
9
10
|
Boundary[Boundary["Top"] = 0] = "Top";
|
|
@@ -23,6 +24,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
23
24
|
this._currentMarker = Boundary.Bottom;
|
|
24
25
|
this._selectionStart = null;
|
|
25
26
|
this._isDisposable = false;
|
|
27
|
+
this._commandGuideDecorations = this._register(( new MutableDisposable()));
|
|
26
28
|
}
|
|
27
29
|
_getMarkers(skipEmptyCommands) {
|
|
28
30
|
const commandCapability = this._capabilities.get(2 );
|
|
@@ -30,7 +32,10 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
30
32
|
const markCapability = this._capabilities.get(4 );
|
|
31
33
|
let markers = [];
|
|
32
34
|
if (commandCapability) {
|
|
33
|
-
markers = coalesce(( commandCapability.commands.map(e => e.marker)));
|
|
35
|
+
markers = coalesce(( commandCapability.commands.filter(e => skipEmptyCommands ? e.exitCode !== undefined : true).map(e => e.promptStartMarker ?? e.marker)));
|
|
36
|
+
if (commandCapability.currentCommand?.promptStartMarker && commandCapability.currentCommand.commandExecutedMarker) {
|
|
37
|
+
markers.push(commandCapability.currentCommand?.promptStartMarker);
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
else if (partialCommandCapability) {
|
|
36
41
|
markers.push(...partialCommandCapability.commands);
|
|
@@ -46,6 +51,19 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
46
51
|
}
|
|
47
52
|
return markers;
|
|
48
53
|
}
|
|
54
|
+
_findCommand(marker) {
|
|
55
|
+
const commandCapability = this._capabilities.get(2 );
|
|
56
|
+
if (commandCapability) {
|
|
57
|
+
const command = commandCapability.commands.find(e => e.marker?.line === marker.line || e.promptStartMarker?.line === marker.line);
|
|
58
|
+
if (command) {
|
|
59
|
+
return command;
|
|
60
|
+
}
|
|
61
|
+
if (commandCapability.currentCommand) {
|
|
62
|
+
return commandCapability.currentCommand;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
49
67
|
clearMarker() {
|
|
50
68
|
this._currentMarker = Boundary.Bottom;
|
|
51
69
|
this._resetNavigationDecorations();
|
|
@@ -66,7 +84,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
66
84
|
}
|
|
67
85
|
return !this._getMarkers(true).includes(marker);
|
|
68
86
|
}
|
|
69
|
-
scrollToPreviousMark(scrollPosition = 1 , retainSelection = false, skipEmptyCommands =
|
|
87
|
+
scrollToPreviousMark(scrollPosition = 1 , retainSelection = false, skipEmptyCommands = true) {
|
|
70
88
|
if (!this._terminal) {
|
|
71
89
|
return;
|
|
72
90
|
}
|
|
@@ -75,7 +93,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
75
93
|
}
|
|
76
94
|
let markerIndex;
|
|
77
95
|
const currentLineY = typeof this._currentMarker === 'object'
|
|
78
|
-
? this.
|
|
96
|
+
? this.getTargetScrollLine(this._currentMarker.line, scrollPosition)
|
|
79
97
|
: Math.min(getLine(this._terminal, this._currentMarker), this._terminal.buffer.active.baseY);
|
|
80
98
|
const viewportY = this._terminal.buffer.active.viewportY;
|
|
81
99
|
if (typeof this._currentMarker === 'object' ? !this._isMarkerInViewport(this._terminal, this._currentMarker) : currentLineY !== viewportY) {
|
|
@@ -89,13 +107,13 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
89
107
|
markerIndex = -1;
|
|
90
108
|
}
|
|
91
109
|
else if (this._isDisposable) {
|
|
92
|
-
markerIndex = this._findPreviousMarker(
|
|
110
|
+
markerIndex = this._findPreviousMarker(skipEmptyCommands);
|
|
93
111
|
this._currentMarker.dispose();
|
|
94
112
|
this._isDisposable = false;
|
|
95
113
|
}
|
|
96
114
|
else {
|
|
97
115
|
if (skipEmptyCommands && this._isEmptyCommand(this._currentMarker)) {
|
|
98
|
-
markerIndex = this._findPreviousMarker(
|
|
116
|
+
markerIndex = this._findPreviousMarker(true);
|
|
99
117
|
}
|
|
100
118
|
else {
|
|
101
119
|
markerIndex = this._getMarkers(skipEmptyCommands).indexOf(this._currentMarker) - 1;
|
|
@@ -108,7 +126,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
108
126
|
return;
|
|
109
127
|
}
|
|
110
128
|
this._currentMarker = this._getMarkers(skipEmptyCommands)[markerIndex];
|
|
111
|
-
this.
|
|
129
|
+
this._scrollToCommand(this._currentMarker, scrollPosition);
|
|
112
130
|
}
|
|
113
131
|
scrollToNextMark(scrollPosition = 1 , retainSelection = false, skipEmptyCommands = true) {
|
|
114
132
|
if (!this._terminal) {
|
|
@@ -119,7 +137,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
119
137
|
}
|
|
120
138
|
let markerIndex;
|
|
121
139
|
const currentLineY = typeof this._currentMarker === 'object'
|
|
122
|
-
? this.
|
|
140
|
+
? this.getTargetScrollLine(this._currentMarker.line, scrollPosition)
|
|
123
141
|
: Math.min(getLine(this._terminal, this._currentMarker), this._terminal.buffer.active.baseY);
|
|
124
142
|
const viewportY = this._terminal.buffer.active.viewportY;
|
|
125
143
|
if (typeof this._currentMarker === 'object' ? !this._isMarkerInViewport(this._terminal, this._currentMarker) : currentLineY !== viewportY) {
|
|
@@ -133,13 +151,13 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
133
151
|
markerIndex = 0;
|
|
134
152
|
}
|
|
135
153
|
else if (this._isDisposable) {
|
|
136
|
-
markerIndex = this._findNextMarker(
|
|
154
|
+
markerIndex = this._findNextMarker(skipEmptyCommands);
|
|
137
155
|
this._currentMarker.dispose();
|
|
138
156
|
this._isDisposable = false;
|
|
139
157
|
}
|
|
140
158
|
else {
|
|
141
159
|
if (skipEmptyCommands && this._isEmptyCommand(this._currentMarker)) {
|
|
142
|
-
markerIndex = this._findNextMarker(
|
|
160
|
+
markerIndex = this._findNextMarker(true);
|
|
143
161
|
}
|
|
144
162
|
else {
|
|
145
163
|
markerIndex = this._getMarkers(skipEmptyCommands).indexOf(this._currentMarker) + 1;
|
|
@@ -152,49 +170,114 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
152
170
|
return;
|
|
153
171
|
}
|
|
154
172
|
this._currentMarker = this._getMarkers(skipEmptyCommands)[markerIndex];
|
|
155
|
-
this.
|
|
173
|
+
this._scrollToCommand(this._currentMarker, scrollPosition);
|
|
174
|
+
}
|
|
175
|
+
_scrollToCommand(marker, position) {
|
|
176
|
+
const command = this._findCommand(marker);
|
|
177
|
+
if (command) {
|
|
178
|
+
this.revealCommand(command, position);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this._scrollToMarker(marker, position);
|
|
182
|
+
}
|
|
156
183
|
}
|
|
157
|
-
_scrollToMarker(
|
|
184
|
+
_scrollToMarker(start, position, end, hideDecoration) {
|
|
158
185
|
if (!this._terminal) {
|
|
159
186
|
return;
|
|
160
187
|
}
|
|
161
|
-
if (!this._isMarkerInViewport(this._terminal,
|
|
162
|
-
const line = this.
|
|
188
|
+
if (!this._isMarkerInViewport(this._terminal, start)) {
|
|
189
|
+
const line = this.getTargetScrollLine(toLineIndex(start), position);
|
|
163
190
|
this._terminal.scrollToLine(line);
|
|
164
191
|
}
|
|
165
192
|
if (!hideDecoration) {
|
|
166
|
-
this.
|
|
193
|
+
this.registerTemporaryDecoration(start, end, true);
|
|
167
194
|
}
|
|
168
195
|
}
|
|
169
196
|
_createMarkerForOffset(marker, offset) {
|
|
170
|
-
if (offset === 0) {
|
|
197
|
+
if (offset === 0 && isMarker(marker)) {
|
|
171
198
|
return marker;
|
|
172
199
|
}
|
|
173
200
|
else {
|
|
174
|
-
const offsetMarker = this._terminal?.registerMarker(-this._terminal.buffer.active.cursorY + marker
|
|
201
|
+
const offsetMarker = this._terminal?.registerMarker(-this._terminal.buffer.active.cursorY + toLineIndex(marker) - this._terminal.buffer.active.baseY + offset);
|
|
175
202
|
if (offsetMarker) {
|
|
176
203
|
return offsetMarker;
|
|
177
204
|
}
|
|
178
205
|
else {
|
|
179
|
-
throw new Error(`Could not register marker with offset ${marker
|
|
206
|
+
throw new Error(`Could not register marker with offset ${toLineIndex(marker)}, ${offset}`);
|
|
180
207
|
}
|
|
181
208
|
}
|
|
182
209
|
}
|
|
183
|
-
|
|
210
|
+
revealCommand(command, position = 1 ) {
|
|
211
|
+
const marker = 'getOutput' in command ? command.marker : command.commandStartMarker;
|
|
212
|
+
if (!this._terminal || !marker) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
const line = toLineIndex(marker);
|
|
216
|
+
const promptRowCount = command.getPromptRowCount();
|
|
217
|
+
const commandRowCount = command.getCommandRowCount();
|
|
218
|
+
this._scrollToMarker(line - (promptRowCount - 1), position, line + (commandRowCount - 1));
|
|
219
|
+
}
|
|
220
|
+
showCommandGuide(command) {
|
|
221
|
+
if (!this._terminal) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (!command) {
|
|
225
|
+
this._commandGuideDecorations.clear();
|
|
226
|
+
this._activeCommandGuide = undefined;
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
if (this._activeCommandGuide === command) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (command.marker) {
|
|
233
|
+
this._activeCommandGuide = command;
|
|
234
|
+
const store = this._commandGuideDecorations.value = ( new DisposableStore());
|
|
235
|
+
if (!command.executedMarker || !command.endMarker) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const startLine = command.marker.line - (command.getPromptRowCount() - 1);
|
|
239
|
+
const decorationCount = toLineIndex(command.endMarker) - startLine;
|
|
240
|
+
for (let i = 0; i < decorationCount; i++) {
|
|
241
|
+
const decoration = this._terminal.registerDecoration({
|
|
242
|
+
marker: this._createMarkerForOffset(startLine, i)
|
|
243
|
+
});
|
|
244
|
+
if (decoration) {
|
|
245
|
+
store.add(decoration);
|
|
246
|
+
let renderedElement;
|
|
247
|
+
store.add(decoration.onRender(element => {
|
|
248
|
+
if (!renderedElement) {
|
|
249
|
+
renderedElement = element;
|
|
250
|
+
element.classList.add('terminal-command-guide');
|
|
251
|
+
if (i === 0) {
|
|
252
|
+
element.classList.add('top');
|
|
253
|
+
}
|
|
254
|
+
if (i === decorationCount - 1) {
|
|
255
|
+
element.classList.add('bottom');
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
if (this._terminal?.element) {
|
|
259
|
+
element.style.marginLeft = `-${getWindow(this._terminal.element).getComputedStyle(this._terminal.element).paddingLeft}`;
|
|
260
|
+
}
|
|
261
|
+
}));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
registerTemporaryDecoration(marker, endMarker, showOutline) {
|
|
184
267
|
if (!this._terminal) {
|
|
185
268
|
return;
|
|
186
269
|
}
|
|
187
270
|
this._resetNavigationDecorations();
|
|
188
271
|
const color = this._themeService.getColorTheme().getColor(TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR);
|
|
189
|
-
const startLine = marker
|
|
190
|
-
const decorationCount = endMarker ? endMarker
|
|
272
|
+
const startLine = toLineIndex(marker);
|
|
273
|
+
const decorationCount = endMarker ? toLineIndex(endMarker) - startLine + 1 : 1;
|
|
191
274
|
for (let i = 0; i < decorationCount; i++) {
|
|
192
275
|
const decoration = this._terminal.registerDecoration({
|
|
193
276
|
marker: this._createMarkerForOffset(marker, i),
|
|
194
277
|
width: this._terminal.cols,
|
|
195
|
-
overviewRulerOptions: {
|
|
278
|
+
overviewRulerOptions: i === 0 ? {
|
|
196
279
|
color: color?.toString() || '#a0a0a0cc'
|
|
197
|
-
}
|
|
280
|
+
} : undefined
|
|
198
281
|
});
|
|
199
282
|
if (decoration) {
|
|
200
283
|
this._navigationDecorations?.push(decoration);
|
|
@@ -202,35 +285,48 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
202
285
|
decoration.onRender(element => {
|
|
203
286
|
if (!renderedElement) {
|
|
204
287
|
renderedElement = element;
|
|
205
|
-
|
|
206
|
-
|
|
288
|
+
element.classList.add('terminal-scroll-highlight');
|
|
289
|
+
if (showOutline) {
|
|
290
|
+
element.classList.add('terminal-scroll-highlight-outline');
|
|
207
291
|
}
|
|
208
|
-
|
|
209
|
-
element.classList.add('
|
|
292
|
+
if (i === 0) {
|
|
293
|
+
element.classList.add('top');
|
|
210
294
|
}
|
|
211
|
-
if (
|
|
212
|
-
element.
|
|
295
|
+
if (i === decorationCount - 1) {
|
|
296
|
+
element.classList.add('bottom');
|
|
213
297
|
}
|
|
214
298
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
if (
|
|
219
|
-
|
|
299
|
+
else {
|
|
300
|
+
element.classList.add('terminal-scroll-highlight');
|
|
301
|
+
}
|
|
302
|
+
if (this._terminal?.element) {
|
|
303
|
+
element.style.marginLeft = `-${getWindow(this._terminal.element).getComputedStyle(this._terminal.element).paddingLeft}`;
|
|
220
304
|
}
|
|
221
305
|
});
|
|
306
|
+
decoration.onDispose(() => { this._navigationDecorations = this._navigationDecorations?.filter(d => d !== decoration); });
|
|
307
|
+
if (showOutline) {
|
|
308
|
+
timeout(350).then(() => {
|
|
309
|
+
if (renderedElement) {
|
|
310
|
+
renderedElement.classList.remove('terminal-scroll-highlight-outline');
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
222
314
|
}
|
|
223
315
|
}
|
|
224
316
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
317
|
+
scrollToLine(line, position) {
|
|
318
|
+
this._terminal?.scrollToLine(this.getTargetScrollLine(line, position));
|
|
319
|
+
}
|
|
320
|
+
getTargetScrollLine(line, position) {
|
|
321
|
+
if (this._terminal && position === 1 ) {
|
|
322
|
+
return Math.max(line - Math.floor(this._terminal.rows / 4), 0);
|
|
228
323
|
}
|
|
229
|
-
return
|
|
324
|
+
return line;
|
|
230
325
|
}
|
|
231
326
|
_isMarkerInViewport(terminal, marker) {
|
|
232
327
|
const viewportY = terminal.buffer.active.viewportY;
|
|
233
|
-
|
|
328
|
+
const line = toLineIndex(marker);
|
|
329
|
+
return line >= viewportY && line < viewportY + terminal.rows;
|
|
234
330
|
}
|
|
235
331
|
scrollToClosestMarker(startMarkerId, endMarkerId, highlight) {
|
|
236
332
|
const detectionCapability = this._capabilities.get(4 );
|
|
@@ -356,7 +452,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
356
452
|
return offset;
|
|
357
453
|
}
|
|
358
454
|
}
|
|
359
|
-
_findPreviousMarker(
|
|
455
|
+
_findPreviousMarker(skipEmptyCommands = false) {
|
|
360
456
|
if (this._currentMarker === Boundary.Top) {
|
|
361
457
|
return 0;
|
|
362
458
|
}
|
|
@@ -371,7 +467,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
371
467
|
}
|
|
372
468
|
return -1;
|
|
373
469
|
}
|
|
374
|
-
_findNextMarker(
|
|
470
|
+
_findNextMarker(skipEmptyCommands = false) {
|
|
375
471
|
if (this._currentMarker === Boundary.Top) {
|
|
376
472
|
return 0;
|
|
377
473
|
}
|
|
@@ -413,4 +509,10 @@ function selectLines(xterm, start, end) {
|
|
|
413
509
|
endLine -= 1;
|
|
414
510
|
xterm.selectLines(startLine, endLine);
|
|
415
511
|
}
|
|
512
|
+
function isMarker(value) {
|
|
513
|
+
return typeof value !== 'number';
|
|
514
|
+
}
|
|
515
|
+
function toLineIndex(line) {
|
|
516
|
+
return isMarker(line) ? line.line : line;
|
|
517
|
+
}
|
|
416
518
|
export { MarkNavigationAddon, getLine, selectLines };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Event } from '../../../../../base/common/event.js';
|
|
2
|
-
import { Terminal } from '../../../../../../../../external/xterm/typings/xterm.js';
|
|
3
|
-
import { CanvasAddon } from '../../../../../../../../external/
|
|
4
|
-
import { ISearchOptions, SearchAddon } from '../../../../../../../../external/
|
|
5
|
-
import { Unicode11Addon } from '../../../../../../../../external/
|
|
6
|
-
import { WebglAddon } from '../../../../../../../../external/
|
|
7
|
-
import { SerializeAddon } from '../../../../../../../../external/
|
|
8
|
-
import { ImageAddon } from '../../../../../../../../external/
|
|
2
|
+
import { Terminal, ITheme } from '../../../../../../../../external/@xterm/xterm/typings/xterm.js';
|
|
3
|
+
import { CanvasAddon } from '../../../../../../../../external/@xterm/addon-canvas/typings/addon-canvas.js';
|
|
4
|
+
import { ISearchOptions, SearchAddon } from '../../../../../../../../external/@xterm/addon-search/typings/addon-search.js';
|
|
5
|
+
import { Unicode11Addon } from '../../../../../../../../external/@xterm/addon-unicode11/typings/addon-unicode11.js';
|
|
6
|
+
import { WebglAddon } from '../../../../../../../../external/@xterm/addon-webgl/typings/addon-webgl.js';
|
|
7
|
+
import { SerializeAddon } from '../../../../../../../../external/@xterm/addon-serialize/typings/addon-serialize.js';
|
|
8
|
+
import { ImageAddon } from '../../../../../../../../external/@xterm/addon-image/typings/addon-image.js';
|
|
9
9
|
import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js';
|
|
10
10
|
import { TerminalConfigHelper } from '../terminalConfigHelper.js';
|
|
11
11
|
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
|
@@ -14,12 +14,15 @@ import { ITerminalFont } from '../../common/terminal.js';
|
|
|
14
14
|
import { IXtermTerminal, IDetachedXtermTerminal, IInternalXtermTerminal, IMarkTracker, ISuggestController, IXtermColorProvider, IXtermAttachToElementOptions } from '../terminal.js';
|
|
15
15
|
import { IStorageService } from '../../../../../platform/storage/common/storage.js';
|
|
16
16
|
import { INotificationService } from '../../../../../platform/notification/common/notification.js';
|
|
17
|
-
import {
|
|
17
|
+
import { ScrollPosition } from './markNavigationAddon.js';
|
|
18
|
+
import { IThemeService, IColorTheme } from '../../../../../platform/theme/common/themeService.js';
|
|
18
19
|
import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';
|
|
19
20
|
import { ITerminalCommand, ITerminalCapabilityStore } from '../../../../../platform/terminal/common/capabilities/capabilities.js';
|
|
20
21
|
import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.js';
|
|
21
22
|
import { IContextKey, IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js';
|
|
22
23
|
import { IClipboardService } from '../../../../../platform/clipboard/common/clipboardService.js';
|
|
24
|
+
import { IAccessibleNotificationService } from '../../../../../platform/accessibility/common/accessibility.js';
|
|
25
|
+
import { ILayoutService } from '../../../../../platform/layout/browser/layoutService.js';
|
|
23
26
|
|
|
24
27
|
/**
|
|
25
28
|
* Wraps the xterm object with additional functionality. Interaction with the backing process is out
|
|
@@ -27,7 +30,7 @@ import { IClipboardService } from '../../../../../platform/clipboard/common/clip
|
|
|
27
30
|
*/
|
|
28
31
|
declare class XtermTerminal extends Disposable implements IXtermTerminal, IDetachedXtermTerminal, IInternalXtermTerminal {
|
|
29
32
|
private readonly _configHelper;
|
|
30
|
-
private readonly
|
|
33
|
+
private readonly _xtermColorProvider;
|
|
31
34
|
private readonly _capabilities;
|
|
32
35
|
private readonly _terminalSuggestWidgetVisibleContextKey;
|
|
33
36
|
private readonly _configurationService;
|
|
@@ -38,6 +41,7 @@ declare class XtermTerminal extends Disposable implements IXtermTerminal, IDetac
|
|
|
38
41
|
private readonly _themeService;
|
|
39
42
|
private readonly _telemetryService;
|
|
40
43
|
private readonly _clipboardService;
|
|
44
|
+
private readonly _accessibleNotificationService;
|
|
41
45
|
/** The raw xterm.js instance */
|
|
42
46
|
readonly raw: Terminal;
|
|
43
47
|
private _core;
|
|
@@ -64,6 +68,7 @@ declare class XtermTerminal extends Disposable implements IXtermTerminal, IDetac
|
|
|
64
68
|
resultCount: number;
|
|
65
69
|
} | undefined;
|
|
66
70
|
get isStdinDisabled(): boolean;
|
|
71
|
+
get isGpuAccelerated(): boolean;
|
|
67
72
|
private readonly _onDidRequestRunCommand;
|
|
68
73
|
readonly onDidRequestRunCommand: Event<{
|
|
69
74
|
command: ITerminalCommand;
|
|
@@ -96,7 +101,7 @@ declare class XtermTerminal extends Disposable implements IXtermTerminal, IDetac
|
|
|
96
101
|
* @param xtermCtor The xterm.js constructor, this is passed in so it can be fetched lazily
|
|
97
102
|
* outside of this class such that {@link raw} is not nullable.
|
|
98
103
|
*/
|
|
99
|
-
constructor(xtermCtor: typeof Terminal, _configHelper: TerminalConfigHelper, cols: number, rows: number,
|
|
104
|
+
constructor(xtermCtor: typeof Terminal, _configHelper: TerminalConfigHelper, cols: number, rows: number, _xtermColorProvider: IXtermColorProvider, _capabilities: ITerminalCapabilityStore, shellIntegrationNonce: string, _terminalSuggestWidgetVisibleContextKey: IContextKey<boolean> | undefined, disableShellIntegrationReporting: boolean, _configurationService: IConfigurationService, _instantiationService: IInstantiationService, _logService: ITerminalLogService, _notificationService: INotificationService, _storageService: IStorageService, _themeService: IThemeService, _telemetryService: ITelemetryService, _clipboardService: IClipboardService, contextKeyService: IContextKeyService, _accessibleNotificationService: IAccessibleNotificationService, layoutService: ILayoutService);
|
|
100
105
|
getBufferReverseIterator(): IterableIterator<string>;
|
|
101
106
|
getContentsAsHtml(): Promise<string>;
|
|
102
107
|
getSelectionAsHtml(command?: ITerminalCommand): Promise<string>;
|
|
@@ -128,6 +133,7 @@ declare class XtermTerminal extends Disposable implements IXtermTerminal, IDetac
|
|
|
128
133
|
scrollUpLine(): void;
|
|
129
134
|
scrollUpPage(): void;
|
|
130
135
|
scrollToTop(): void;
|
|
136
|
+
scrollToLine(line: number, position?: ScrollPosition): void;
|
|
131
137
|
clearBuffer(): void;
|
|
132
138
|
hasSelection(): boolean;
|
|
133
139
|
clearSelection(): void;
|
|
@@ -152,7 +158,7 @@ declare class XtermTerminal extends Disposable implements IXtermTerminal, IDetac
|
|
|
152
158
|
private _disposeOfCanvasRenderer;
|
|
153
159
|
private _disposeOfWebglRenderer;
|
|
154
160
|
private _measureRenderTime;
|
|
155
|
-
|
|
161
|
+
getXtermTheme(theme?: IColorTheme): ITheme;
|
|
156
162
|
private _updateTheme;
|
|
157
163
|
refresh(): void;
|
|
158
164
|
private _updateUnicodeVersion;
|
|
@@ -24,6 +24,8 @@ import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/commo
|
|
|
24
24
|
import { debounce } from 'monaco-editor/esm/vs/base/common/decorators.js';
|
|
25
25
|
import { MouseWheelClassifier } from 'monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js';
|
|
26
26
|
import { StandardWheelEvent } from 'monaco-editor/esm/vs/base/browser/mouseEvent.js';
|
|
27
|
+
import { IAccessibleNotificationService } from 'monaco-editor/esm/vs/platform/accessibility/common/accessibility.js';
|
|
28
|
+
import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
|
|
27
29
|
var XtermTerminal_1;
|
|
28
30
|
let CanvasAddon;
|
|
29
31
|
let ImageAddon;
|
|
@@ -52,6 +54,7 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
52
54
|
static { this._checkedWebglCompatible = false; }
|
|
53
55
|
get findResult() { return this._lastFindResult; }
|
|
54
56
|
get isStdinDisabled() { return !!this.raw.options.disableStdin; }
|
|
57
|
+
get isGpuAccelerated() { return !!(this._canvasAddon || this._webglAddon); }
|
|
55
58
|
get markTracker() { return this._markNavigationAddon; }
|
|
56
59
|
get shellIntegration() { return this._shellIntegrationAddon; }
|
|
57
60
|
get suggestController() { return this._suggestAddon; }
|
|
@@ -63,12 +66,15 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
63
66
|
return createImageBitmap(canvas);
|
|
64
67
|
}
|
|
65
68
|
get isFocused() {
|
|
66
|
-
|
|
69
|
+
if (!this.raw.element) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
return dom.isAncestorOfActiveElement(this.raw.element);
|
|
67
73
|
}
|
|
68
|
-
constructor(xtermCtor, _configHelper, cols, rows,
|
|
74
|
+
constructor(xtermCtor, _configHelper, cols, rows, _xtermColorProvider, _capabilities, shellIntegrationNonce, _terminalSuggestWidgetVisibleContextKey, disableShellIntegrationReporting, _configurationService, _instantiationService, _logService, _notificationService, _storageService, _themeService, _telemetryService, _clipboardService, contextKeyService, _accessibleNotificationService, layoutService) {
|
|
69
75
|
super();
|
|
70
76
|
this._configHelper = _configHelper;
|
|
71
|
-
this.
|
|
77
|
+
this._xtermColorProvider = _xtermColorProvider;
|
|
72
78
|
this._capabilities = _capabilities;
|
|
73
79
|
this._terminalSuggestWidgetVisibleContextKey = _terminalSuggestWidgetVisibleContextKey;
|
|
74
80
|
this._configurationService = _configurationService;
|
|
@@ -79,6 +85,7 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
79
85
|
this._themeService = _themeService;
|
|
80
86
|
this._telemetryService = _telemetryService;
|
|
81
87
|
this._clipboardService = _clipboardService;
|
|
88
|
+
this._accessibleNotificationService = _accessibleNotificationService;
|
|
82
89
|
this._isPhysicalMouseWheel = MouseWheelClassifier.INSTANCE.isPhysicalMouseWheel();
|
|
83
90
|
this._attachedDisposables = this._register(( new DisposableStore()));
|
|
84
91
|
this._onDidRequestRunCommand = this._register(( new Emitter()));
|
|
@@ -97,16 +104,17 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
97
104
|
this.onDidChangeFocus = this._onDidChangeFocus.event;
|
|
98
105
|
this._onDidDispose = this._register(( new Emitter()));
|
|
99
106
|
this.onDidDispose = this._onDidDispose.event;
|
|
100
|
-
const font = this._configHelper.getFont(undefined, true);
|
|
107
|
+
const font = this._configHelper.getFont(dom.getActiveWindow(), undefined, true);
|
|
101
108
|
const config = this._configHelper.config;
|
|
102
109
|
const editorOptions = this._configurationService.getValue('editor');
|
|
103
110
|
this.raw = this._register(( new xtermCtor({
|
|
104
111
|
allowProposedApi: true,
|
|
105
112
|
cols,
|
|
106
113
|
rows,
|
|
114
|
+
documentOverride: layoutService.mainContainer.ownerDocument,
|
|
107
115
|
altClickMovesCursor: config.altClickMovesCursor && editorOptions.multiCursorModifier === 'alt',
|
|
108
116
|
scrollback: config.scrollback,
|
|
109
|
-
theme: this.
|
|
117
|
+
theme: this.getXtermTheme(),
|
|
110
118
|
drawBoldTextInBrightColors: config.drawBoldTextInBrightColors,
|
|
111
119
|
fontFamily: font.fontFamily,
|
|
112
120
|
fontWeight: config.fontWeight,
|
|
@@ -367,7 +375,7 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
367
375
|
this._searchAddon?.clearActiveDecoration();
|
|
368
376
|
}
|
|
369
377
|
getFont() {
|
|
370
|
-
return this._configHelper.getFont(this._core);
|
|
378
|
+
return this._configHelper.getFont(dom.getWindow(this.raw.element), this._core);
|
|
371
379
|
}
|
|
372
380
|
getLongestViewportWrappedLineLength() {
|
|
373
381
|
let maxLineLength = 0;
|
|
@@ -417,10 +425,14 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
417
425
|
scrollToTop() {
|
|
418
426
|
this.raw.scrollToTop();
|
|
419
427
|
}
|
|
428
|
+
scrollToLine(line, position = 0 ) {
|
|
429
|
+
this.markTracker.scrollToLine(line, position);
|
|
430
|
+
}
|
|
420
431
|
clearBuffer() {
|
|
421
432
|
this.raw.clear();
|
|
422
433
|
this._capabilities.get(2 )?.handlePromptStart();
|
|
423
434
|
this._capabilities.get(2 )?.handleCommandStart();
|
|
435
|
+
this._accessibleNotificationService.notify("clear" );
|
|
424
436
|
}
|
|
425
437
|
hasSelection() {
|
|
426
438
|
return this.raw.hasSelection();
|
|
@@ -461,9 +473,10 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
461
473
|
e.clipboardData.setData('text/html', textAsHtml);
|
|
462
474
|
e.preventDefault();
|
|
463
475
|
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
476
|
+
const doc = dom.getDocument(this.raw.element);
|
|
477
|
+
doc.addEventListener('copy', listener);
|
|
478
|
+
doc.execCommand('copy');
|
|
479
|
+
doc.removeEventListener('copy', listener);
|
|
467
480
|
}
|
|
468
481
|
else {
|
|
469
482
|
await this._clipboardService.writeText(this.raw.getSelection());
|
|
@@ -567,7 +580,7 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
567
580
|
}
|
|
568
581
|
async _getCanvasAddonConstructor() {
|
|
569
582
|
if (!CanvasAddon) {
|
|
570
|
-
CanvasAddon = (await import('xterm
|
|
583
|
+
CanvasAddon = (await import('@xterm/addon-canvas').then(module => module.default ?? module)).CanvasAddon;
|
|
571
584
|
}
|
|
572
585
|
return CanvasAddon;
|
|
573
586
|
}
|
|
@@ -590,31 +603,31 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
590
603
|
}
|
|
591
604
|
async _getImageAddonConstructor() {
|
|
592
605
|
if (!ImageAddon) {
|
|
593
|
-
ImageAddon = (await import('xterm
|
|
606
|
+
ImageAddon = (await import('@xterm/addon-image').then(module => module.default ?? module)).ImageAddon;
|
|
594
607
|
}
|
|
595
608
|
return ImageAddon;
|
|
596
609
|
}
|
|
597
610
|
async _getSearchAddonConstructor() {
|
|
598
611
|
if (!SearchAddon) {
|
|
599
|
-
SearchAddon = (await import('xterm
|
|
612
|
+
SearchAddon = (await import('@xterm/addon-search').then(module => module.default ?? module)).SearchAddon;
|
|
600
613
|
}
|
|
601
614
|
return SearchAddon;
|
|
602
615
|
}
|
|
603
616
|
async _getUnicode11Constructor() {
|
|
604
617
|
if (!Unicode11Addon) {
|
|
605
|
-
Unicode11Addon = (await import('xterm
|
|
618
|
+
Unicode11Addon = (await import('@xterm/addon-unicode11').then(module => module.default ?? module)).Unicode11Addon;
|
|
606
619
|
}
|
|
607
620
|
return Unicode11Addon;
|
|
608
621
|
}
|
|
609
622
|
async _getWebglAddonConstructor() {
|
|
610
623
|
if (!WebglAddon) {
|
|
611
|
-
WebglAddon = (await import('xterm
|
|
624
|
+
WebglAddon = (await import('@xterm/addon-webgl').then(module => module.default ?? module)).WebglAddon;
|
|
612
625
|
}
|
|
613
626
|
return WebglAddon;
|
|
614
627
|
}
|
|
615
628
|
async _getSerializeAddonConstructor() {
|
|
616
629
|
if (!SerializeAddon) {
|
|
617
|
-
SerializeAddon = (await import('xterm
|
|
630
|
+
SerializeAddon = (await import('@xterm/addon-serialize').then(module => module.default ?? module)).SerializeAddon;
|
|
618
631
|
}
|
|
619
632
|
return SerializeAddon;
|
|
620
633
|
}
|
|
@@ -638,10 +651,10 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
638
651
|
}
|
|
639
652
|
async _measureRenderTime() {
|
|
640
653
|
const frameTimes = [];
|
|
641
|
-
if (!this._core._renderService?._renderer._renderLayers) {
|
|
654
|
+
if (!this._core._renderService?._renderer.value?._renderLayers) {
|
|
642
655
|
return;
|
|
643
656
|
}
|
|
644
|
-
const textRenderLayer = this._core._renderService._renderer._renderLayers[0];
|
|
657
|
+
const textRenderLayer = this._core._renderService._renderer.value._renderLayers[0];
|
|
645
658
|
const originalOnGridChanged = textRenderLayer?.onGridChanged;
|
|
646
659
|
const evaluateCanvasRenderer = () => {
|
|
647
660
|
frameTimes.shift();
|
|
@@ -689,12 +702,12 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
689
702
|
}
|
|
690
703
|
};
|
|
691
704
|
}
|
|
692
|
-
|
|
705
|
+
getXtermTheme(theme) {
|
|
693
706
|
if (!theme) {
|
|
694
707
|
theme = this._themeService.getColorTheme();
|
|
695
708
|
}
|
|
696
709
|
const foregroundColor = theme.getColor(TERMINAL_FOREGROUND_COLOR);
|
|
697
|
-
const backgroundColor = this.
|
|
710
|
+
const backgroundColor = this._xtermColorProvider.getBackgroundColor(theme);
|
|
698
711
|
const cursorColor = theme.getColor(TERMINAL_CURSOR_FOREGROUND_COLOR) || foregroundColor;
|
|
699
712
|
const cursorAccentColor = theme.getColor(TERMINAL_CURSOR_BACKGROUND_COLOR) || backgroundColor;
|
|
700
713
|
const selectionBackgroundColor = theme.getColor(TERMINAL_SELECTION_BACKGROUND_COLOR);
|
|
@@ -727,7 +740,7 @@ let XtermTerminal = class XtermTerminal extends Disposable {
|
|
|
727
740
|
};
|
|
728
741
|
}
|
|
729
742
|
_updateTheme(theme) {
|
|
730
|
-
this.raw.options.theme = this.
|
|
743
|
+
this.raw.options.theme = this.getXtermTheme(theme);
|
|
731
744
|
}
|
|
732
745
|
refresh() {
|
|
733
746
|
this._updateTheme();
|
|
@@ -765,17 +778,19 @@ XtermTerminal = XtermTerminal_1 = ( __decorate([
|
|
|
765
778
|
( __param(14, IThemeService)),
|
|
766
779
|
( __param(15, ITelemetryService)),
|
|
767
780
|
( __param(16, IClipboardService)),
|
|
768
|
-
( __param(17, IContextKeyService))
|
|
781
|
+
( __param(17, IContextKeyService)),
|
|
782
|
+
( __param(18, IAccessibleNotificationService)),
|
|
783
|
+
( __param(19, ILayoutService))
|
|
769
784
|
], XtermTerminal));
|
|
770
|
-
function getXtermScaledDimensions(font, width, height) {
|
|
785
|
+
function getXtermScaledDimensions(w, font, width, height) {
|
|
771
786
|
if (!font.charWidth || !font.charHeight) {
|
|
772
787
|
return null;
|
|
773
788
|
}
|
|
774
|
-
const scaledWidthAvailable = width *
|
|
775
|
-
const scaledCharWidth = font.charWidth *
|
|
789
|
+
const scaledWidthAvailable = width * w.devicePixelRatio;
|
|
790
|
+
const scaledCharWidth = font.charWidth * w.devicePixelRatio + font.letterSpacing;
|
|
776
791
|
const cols = Math.max(Math.floor(scaledWidthAvailable / scaledCharWidth), 1);
|
|
777
|
-
const scaledHeightAvailable = height *
|
|
778
|
-
const scaledCharHeight = Math.ceil(font.charHeight *
|
|
792
|
+
const scaledHeightAvailable = height * w.devicePixelRatio;
|
|
793
|
+
const scaledCharHeight = Math.ceil(font.charHeight * w.devicePixelRatio);
|
|
779
794
|
const scaledLineHeight = Math.floor(scaledCharHeight * font.lineHeight);
|
|
780
795
|
const rows = Math.max(Math.floor(scaledHeightAvailable / scaledLineHeight), 1);
|
|
781
796
|
return { rows, cols };
|