@codingame/monaco-vscode-api 1.82.4 → 1.82.5-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/extensions.d.ts +3 -3
- package/external/xterm/typings/xterm.d.ts +1729 -0
- package/external/xterm-addon-canvas/typings/xterm-addon-canvas.d.ts +38 -0
- package/external/xterm-addon-image/typings/xterm-addon-image.d.ts +115 -0
- package/external/xterm-addon-search/typings/xterm-addon-search.d.ts +141 -0
- package/external/xterm-addon-serialize/typings/xterm-addon-serialize.d.ts +83 -0
- package/external/xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts +9 -0
- package/external/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts +43 -0
- package/external/xterm-headless/typings/xterm-headless.d.ts +49 -0
- package/missing-services.js +0 -1
- package/monaco-editor-treemending.patch +1026 -1026
- package/package.json +21 -1
- package/service-override/bulkEdit.js +0 -1
- package/service-override/environment.js +0 -1
- package/service-override/extensions.js +1 -1
- package/service-override/files.js +0 -1
- package/service-override/keybindings.js +1 -6
- package/service-override/layout.js +0 -1
- package/service-override/output.js +0 -1
- package/service-override/quickaccess.js +0 -1
- package/services.js +10 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +7 -7
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +1 -1
- package/README.md +0 -392
- package/override/vs/workbench/contrib/notebook/browser/notebookEditor.js +0 -2
- package/service-override/accessibility.d.ts +0 -5
- package/service-override/accessibility.js +0 -11
- package/service-override/audioCue.d.ts +0 -5
- package/service-override/audioCue.js +0 -13
- package/service-override/bulkEdit.d.ts +0 -5
- package/service-override/configuration.d.ts +0 -17
- package/service-override/configuration.js +0 -117
- package/service-override/debug.d.ts +0 -5
- package/service-override/debug.js +0 -23
- package/service-override/dialogs.d.ts +0 -5
- package/service-override/dialogs.js +0 -57
- package/service-override/editor.d.ts +0 -10
- package/service-override/editor.js +0 -37
- package/service-override/environment.d.ts +0 -6
- package/service-override/extensions.d.ts +0 -50
- package/service-override/files.d.ts +0 -103
- package/service-override/keybindings.d.ts +0 -10
- package/service-override/languageDetectionWorker.d.ts +0 -5
- package/service-override/languageDetectionWorker.js +0 -15
- package/service-override/languages.d.ts +0 -11
- package/service-override/languages.js +0 -27
- package/service-override/layout.d.ts +0 -71
- package/service-override/lifecycle.d.ts +0 -5
- package/service-override/lifecycle.js +0 -10
- package/service-override/markers.d.ts +0 -5
- package/service-override/markers.js +0 -6
- package/service-override/model.d.ts +0 -5
- package/service-override/model.js +0 -10
- package/service-override/notifications.d.ts +0 -5
- package/service-override/notifications.js +0 -34
- package/service-override/output.d.ts +0 -6
- package/service-override/preferences.d.ts +0 -5
- package/service-override/preferences.js +0 -16
- package/service-override/quickaccess.d.ts +0 -10
- package/service-override/remoteAgent.d.ts +0 -6
- package/service-override/remoteAgent.js +0 -42
- package/service-override/search.d.ts +0 -5
- package/service-override/search.js +0 -19
- package/service-override/snippets.d.ts +0 -9
- package/service-override/snippets.js +0 -21
- package/service-override/storage.d.ts +0 -40
- package/service-override/storage.js +0 -116
- package/service-override/terminal.d.ts +0 -69
- package/service-override/terminal.js +0 -117
- package/service-override/textmate.d.ts +0 -6
- package/service-override/textmate.js +0 -41
- package/service-override/theme.d.ts +0 -7
- package/service-override/theme.js +0 -26
- package/service-override/viewBanner.d.ts +0 -6
- package/service-override/viewBanner.js +0 -10
- package/service-override/viewStatusBar.d.ts +0 -6
- package/service-override/viewStatusBar.js +0 -10
- package/service-override/viewTitleBar.d.ts +0 -6
- package/service-override/viewTitleBar.js +0 -10
- package/service-override/views.d.ts +0 -74
- package/service-override/views.js +0 -511
- package/service-override/workspaceTrust.d.ts +0 -5
- package/service-override/workspaceTrust.js +0 -13
- package/vscode/src/vs/base/browser/broadcast.js +0 -52
- package/vscode/src/vs/base/browser/indexedDB.d.ts +0 -17
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +0 -178
- package/vscode/src/vs/base/browser/ui/grid/grid.js +0 -465
- package/vscode/src/vs/base/browser/ui/grid/gridview.css.js +0 -4
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +0 -977
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +0 -60
- package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +0 -14
- package/vscode/src/vs/base/common/codicons.d.ts +0 -556
- package/vscode/src/vs/base/common/processes.js +0 -24
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +0 -42
- package/vscode/src/vs/editor/common/services/modelUndoRedoParticipant.js +0 -56
- package/vscode/src/vs/editor/common/services/textResourceConfigurationService.js +0 -116
- package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +0 -67
- package/vscode/src/vs/platform/audioCues/browser/media/all.mp3.js +0 -20
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +0 -10
- package/vscode/src/vs/platform/download/common/downloadIpc.js +0 -16
- package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.d.ts +0 -43
- package/vscode/src/vs/platform/files/common/diskFileSystemProviderClient.js +0 -136
- package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.d.ts +0 -50
- package/vscode/src/vs/platform/log/common/logIpc.js +0 -24
- package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +0 -94
- package/vscode/src/vs/platform/remote/browser/browserSocketFactory.js +0 -193
- package/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.js +0 -107
- package/vscode/src/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +0 -41
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +0 -566
- package/vscode/src/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +0 -29
- package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +0 -22
- package/vscode/src/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +0 -46
- package/vscode/src/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +0 -94
- package/vscode/src/vs/platform/terminal/common/environmentVariable.js +0 -7
- package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.js +0 -196
- package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +0 -37
- package/vscode/src/vs/platform/terminal/common/terminalLogService.js +0 -42
- package/vscode/src/vs/platform/terminal/common/terminalPlatformConfiguration.js +0 -467
- package/vscode/src/vs/platform/terminal/common/terminalProfiles.js +0 -107
- package/vscode/src/vs/platform/terminal/common/terminalRecorder.js +0 -66
- package/vscode/src/vs/platform/terminal/common/terminalStrings.js +0 -16
- package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +0 -319
- package/vscode/src/vs/platform/userDataSync/common/settingsMerge.js +0 -40
- package/vscode/src/vs/platform/webview/common/mimeTypes.js +0 -22
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +0 -62
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +0 -699
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +0 -450
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.d.ts +0 -14
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +0 -236
- package/vscode/src/vs/workbench/api/common/extHostConfiguration.d.ts +0 -43
- package/vscode/src/vs/workbench/api/common/extHostExtensionActivator.d.ts +0 -33
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.d.ts +0 -138
- package/vscode/src/vs/workbench/api/common/extHostFileSystemInfo.d.ts +0 -21
- package/vscode/src/vs/workbench/api/common/extHostInitDataService.d.ts +0 -9
- package/vscode/src/vs/workbench/api/common/extHostLocalizationService.d.ts +0 -29
- package/vscode/src/vs/workbench/api/common/extHostManagedSockets.d.ts +0 -11
- package/vscode/src/vs/workbench/api/common/extHostRpcService.d.ts +0 -9
- package/vscode/src/vs/workbench/api/common/extHostStoragePaths.d.ts +0 -14
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.d.ts +0 -53
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.d.ts +0 -19
- package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +0 -12
- package/vscode/src/vs/workbench/api/common/extHostUriTransformerService.d.ts +0 -9
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.d.ts +0 -91
- package/vscode/src/vs/workbench/api/worker/extHostExtensionService.d.ts +0 -21
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +0 -605
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarActions.js +0 -597
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.d.ts +0 -116
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +0 -783
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +0 -88
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/banner/bannerPart.js +0 -228
- package/vscode/src/vs/workbench/browser/parts/banner/media/bannerpart.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +0 -691
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.d.ts +0 -7
- package/vscode/src/vs/workbench/browser/parts/compositePart.d.ts +0 -84
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +0 -318
- package/vscode/src/vs/workbench/browser/parts/dialogs/dialog.web.contribution.js +0 -69
- package/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.js +0 -127
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +0 -692
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsModel.js +0 -141
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +0 -414
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +0 -507
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +0 -1233
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +0 -133
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +0 -306
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +0 -850
- package/vscode/src/vs/workbench/browser/parts/editor/media/breadcrumbscontrol.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/editor/media/editordroptarget.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/editor/media/notabstitlecontrol.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/editor/media/titlecontrol.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.js +0 -247
- package/vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.js +0 -1569
- package/vscode/src/vs/workbench/browser/parts/editor/titleControl.js +0 -292
- package/vscode/src/vs/workbench/browser/parts/media/compositepart.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsActions.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsCenter.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsList.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsToasts.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.js +0 -124
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsAlerts.js +0 -58
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +0 -227
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsList.js +0 -212
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +0 -419
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +0 -398
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +0 -78
- package/vscode/src/vs/workbench/browser/parts/panel/media/basepanelpart.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.d.ts +0 -134
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +0 -756
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.d.ts +0 -59
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +0 -217
- package/vscode/src/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarActions.js +0 -109
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarItem.js +0 -234
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarModel.js +0 -249
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js +0 -439
- package/vscode/src/vs/workbench/browser/parts/titlebar/commandCenterControl.js +0 -134
- package/vscode/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.d.ts +0 -115
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +0 -77
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.js +0 -365
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +0 -216
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +0 -104
- package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +0 -4
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +0 -1589
- package/vscode/src/vs/workbench/common/activity.js +0 -3
- package/vscode/src/vs/workbench/common/dialogs.js +0 -31
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibility.contribution.js +0 -13
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +0 -312
- package/vscode/src/vs/workbench/contrib/accessibility/browser/unfocusedViewDimmingContribution.js +0 -63
- package/vscode/src/vs/workbench/contrib/audioCues/browser/audioCueDebuggerContribution.js +0 -45
- package/vscode/src/vs/workbench/contrib/audioCues/browser/audioCueLineFeatureContribution.js +0 -170
- package/vscode/src/vs/workbench/contrib/audioCues/browser/audioCues.contribution.js +0 -181
- package/vscode/src/vs/workbench/contrib/audioCues/browser/commands.js +0 -49
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +0 -262
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +0 -339
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +0 -119
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.js +0 -35
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +0 -345
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.js +0 -362
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.js +0 -255
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +0 -249
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +0 -14
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +0 -137
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +0 -212
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +0 -72
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +0 -61
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +0 -106
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +0 -198
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +0 -783
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +0 -397
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +0 -1296
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +0 -176
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +0 -958
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +0 -496
- package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -345
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +0 -297
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +0 -398
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -825
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +0 -619
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +0 -58
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +0 -525
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +0 -679
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +0 -354
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +0 -204
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +0 -80
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +0 -141
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +0 -1172
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +0 -1142
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -104
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +0 -66
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +0 -273
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +0 -312
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +0 -166
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +0 -661
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +0 -103
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +0 -229
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +0 -629
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +0 -693
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +0 -951
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +0 -46
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +0 -334
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +0 -96
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +0 -573
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +0 -413
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +0 -100
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +0 -19
- package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +0 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +0 -98
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +0 -57
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +0 -1480
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +0 -344
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +0 -121
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +0 -173
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +0 -34
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +0 -115
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +0 -258
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +0 -25
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -81
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +0 -281
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +0 -2414
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +0 -16
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +0 -5
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +0 -73
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorHandler.js +0 -36
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +0 -325
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +0 -230
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditorTracker.js +0 -97
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +0 -352
- package/vscode/src/vs/workbench/contrib/files/browser/explorerService.js +0 -426
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +0 -508
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +0 -615
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution2.js +0 -94
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +0 -144
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +0 -53
- package/vscode/src/vs/workbench/contrib/languageDetection/browser/languageDetection.contribution.js +0 -134
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +0 -353
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/markers/browser/markers.contribution.js +0 -586
- package/vscode/src/vs/workbench/contrib/markers/browser/markersFilterOptions.js +0 -75
- package/vscode/src/vs/workbench/contrib/markers/browser/markersModel.js +0 -200
- package/vscode/src/vs/workbench/contrib/markers/browser/markersTable.js +0 -455
- package/vscode/src/vs/workbench/contrib/markers/browser/markersTreeViewer.js +0 -670
- package/vscode/src/vs/workbench/contrib/markers/browser/markersView.js +0 -873
- package/vscode/src/vs/workbench/contrib/markers/browser/markersViewActions.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/markers/browser/markersViewActions.js +0 -132
- package/vscode/src/vs/workbench/contrib/markers/browser/media/markers.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/markers/browser/messages.js +0 -170
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +0 -70
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +0 -158
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +0 -3
- package/vscode/src/vs/workbench/contrib/outline/browser/outline.contribution.js +0 -261
- package/vscode/src/vs/workbench/contrib/outline/browser/outline.js +0 -10
- package/vscode/src/vs/workbench/contrib/outline/browser/outlinePane.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/outline/browser/outlinePane.js +0 -290
- package/vscode/src/vs/workbench/contrib/outline/browser/outlineViewState.js +0 -66
- package/vscode/src/vs/workbench/contrib/output/common/outputLinkComputer.js +0 -129
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +0 -272
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.js +0 -1102
- package/vscode/src/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/preferences/browser/media/preferences.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferences.contribution.js +0 -1213
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesActions.js +0 -94
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesEditor.js +0 -47
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +0 -37
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.js +0 -747
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesSearch.js +0 -349
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +0 -468
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsEditor2.js +0 -1477
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.js +0 -504
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +0 -296
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsSearchMenu.js +0 -79
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTree.js +0 -2041
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +0 -771
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsWidgets.js +0 -1004
- package/vscode/src/vs/workbench/contrib/preferences/browser/tocTree.js +0 -196
- package/vscode/src/vs/workbench/contrib/preferences/common/preferencesContribution.js +0 -151
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +0 -67
- package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +0 -207
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +0 -27
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +0 -1666
- package/vscode/src/vs/workbench/contrib/remote/common/remote.contribution.js +0 -481
- package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +0 -759
- package/vscode/src/vs/workbench/contrib/search/browser/media/anythingQuickAccess.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/search/browser/media/searchview.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearchContributions.js +0 -7
- package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +0 -220
- package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +0 -232
- package/vscode/src/vs/workbench/contrib/search/browser/replaceContributions.js +0 -7
- package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +0 -224
- package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +0 -513
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +0 -46
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +0 -204
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +0 -354
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.js +0 -459
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +0 -365
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.js +0 -35
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +0 -23
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +0 -308
- package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +0 -41
- package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +0 -39
- package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +0 -58
- package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +0 -383
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +0 -1916
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +0 -636
- package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +0 -220
- package/vscode/src/vs/workbench/contrib/search/common/cacheState.js +0 -85
- package/vscode/src/vs/workbench/contrib/search/common/constants.js +0 -66
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +0 -11
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +0 -477
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +0 -700
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +0 -187
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +0 -298
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +0 -135
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +0 -268
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +0 -20
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/configureSnippets.js +0 -264
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +0 -87
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/insertSnippet.js +0 -126
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/surroundWithSnippet.js +0 -56
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCodeActionProvider.js +0 -136
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetPicker.js +0 -83
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippets.contribution.js +0 -113
- package/vscode/src/vs/workbench/contrib/terminal/browser/baseTerminalBackend.js +0 -101
- package/vscode/src/vs/workbench/contrib/terminal/browser/detachedTerminal.js +0 -54
- package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +0 -119
- package/vscode/src/vs/workbench/contrib/terminal/browser/media/scrollbar.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/media/terminal.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/media/widgets.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/media/xterm.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/remotePty.js +0 -175
- package/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.js +0 -311
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.contribution.js +0 -240
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +0 -1964
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalCommands.js +0 -22
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.js +0 -215
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +0 -16
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditor.js +0 -186
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorService.js +0 -239
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEvents.js +0 -47
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalExtensions.js +0 -25
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalGroup.js +0 -482
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalGroupService.js +0 -367
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +0 -37
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +0 -2101
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstanceService.js +0 -82
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMainContribution.js +0 -82
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +0 -762
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +0 -617
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.js +0 -278
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.js +0 -316
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProfileService.js +0 -218
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +0 -146
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +0 -269
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalService.js +0 -1134
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.js +0 -108
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabbedView.js +0 -420
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +0 -676
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +0 -72
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.js +0 -39
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalView.js +0 -598
- package/vscode/src/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +0 -36
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +0 -469
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +0 -97
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +0 -56
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +0 -416
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +0 -390
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +0 -793
- package/vscode/src/vs/workbench/contrib/terminal/common/environmentVariableService.js +0 -96
- package/vscode/src/vs/workbench/contrib/terminal/common/history.js +0 -356
- package/vscode/src/vs/workbench/contrib/terminal/common/remote/remoteTerminalChannel.js +0 -253
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalConfiguration.js +0 -1016
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +0 -272
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +0 -93
- package/vscode/src/vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService.js +0 -42
- package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/bufferContentTracker.js +0 -110
- package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/terminal.accessibility.contribution.js +0 -232
- package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibilityHelp.js +0 -138
- package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleBuffer.js +0 -226
- package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleWidget.js +0 -142
- package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/browser/textAreaSyncAddon.js +0 -98
- package/vscode/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.js +0 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService.js +0 -155
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +0 -247
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +0 -334
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +0 -117
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +0 -288
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +0 -94
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +0 -86
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +0 -640
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +0 -63
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +0 -57
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +0 -120
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +0 -119
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +0 -61
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +0 -232
- package/vscode/src/vs/workbench/contrib/workspace/browser/media/workspaceTrustEditor.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspace.contribution.js +0 -842
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.js +0 -1047
- package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +0 -14
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +0 -94
- package/vscode/src/vs/workbench/services/configuration/browser/configuration.js +0 -878
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +0 -1170
- package/vscode/src/vs/workbench/services/configuration/common/configurationCache.js +0 -80
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +0 -589
- package/vscode/src/vs/workbench/services/configuration/common/configurationModels.js +0 -119
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +0 -303
- package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +0 -26
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +0 -174
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +0 -10
- package/vscode/src/vs/workbench/services/dialogs/browser/abstractFileDialogService.js +0 -320
- package/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.js +0 -989
- package/vscode/src/vs/workbench/services/dialogs/common/dialogService.js +0 -66
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +0 -622
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +0 -4
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +0 -2
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +0 -1454
- package/vscode/src/vs/workbench/services/hover/browser/hoverService.js +0 -162
- package/vscode/src/vs/workbench/services/hover/browser/hoverWidget.js +0 -523
- package/vscode/src/vs/workbench/services/hover/browser/media/hover.css.js +0 -4
- package/vscode/src/vs/workbench/services/label/common/labelService.js +0 -412
- package/vscode/src/vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker.js +0 -173
- package/vscode/src/vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl.js +0 -259
- package/vscode/src/vs/workbench/services/lifecycle/browser/lifecycleService.js +0 -121
- package/vscode/src/vs/workbench/services/localization/common/locale.js +0 -3
- package/vscode/src/vs/workbench/services/notification/common/notificationService.js +0 -188
- package/vscode/src/vs/workbench/services/outline/browser/outlineService.js +0 -35
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +0 -37
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +0 -556
- package/vscode/src/vs/workbench/services/preferences/browser/preferencesService.js +0 -547
- package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +0 -39
- package/vscode/src/vs/workbench/services/preferences/common/preferencesModels.js +0 -1039
- package/vscode/src/vs/workbench/services/preferences/common/preferencesValidation.js +0 -393
- package/vscode/src/vs/workbench/services/remote/browser/remoteAgentService.js +0 -71
- package/vscode/src/vs/workbench/services/remote/common/abstractRemoteAgentService.js +0 -177
- package/vscode/src/vs/workbench/services/remote/common/remoteAgentEnvironmentChannel.js +0 -51
- package/vscode/src/vs/workbench/services/remote/common/remoteFileSystemProviderClient.js +0 -38
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.d.ts +0 -35
- package/vscode/src/vs/workbench/services/search/common/searchService.js +0 -370
- package/vscode/src/vs/workbench/services/storage/browser/storageService.d.ts +0 -40
- package/vscode/src/vs/workbench/services/storage/browser/storageService.js +0 -280
- package/vscode/src/vs/workbench/services/suggest/browser/media/suggest.css.js +0 -4
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +0 -98
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +0 -399
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +0 -83
- package/vscode/src/vs/workbench/services/textMate/browser/arrayOperation.js +0 -62
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.js +0 -157
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/threadedBackgroundTokenizerFactory.js +0 -200
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker.js +0 -87
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateWorkerTokenizer.js +0 -140
- package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeature.d.ts +0 -11
- package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js +0 -459
- package/vscode/src/vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport.js +0 -72
- package/vscode/src/vs/workbench/services/textMate/browser/tokenizationSupport/tokenizationSupportWithLineLimit.js +0 -36
- package/vscode/src/vs/workbench/services/textMate/common/TMGrammarFactory.js +0 -118
- package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +0 -93
- package/vscode/src/vs/workbench/services/textMate/common/TMScopeRegistry.js +0 -24
- package/vscode/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.js +0 -187
- package/vscode/src/vs/workbench/services/themes/browser/fileIconThemeData.js +0 -353
- package/vscode/src/vs/workbench/services/themes/browser/productIconThemeData.js +0 -290
- package/vscode/src/vs/workbench/services/themes/browser/workbenchThemeService.js +0 -742
- package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +0 -864
- package/vscode/src/vs/workbench/services/themes/common/colorThemeSchema.js +0 -265
- package/vscode/src/vs/workbench/services/themes/common/fileIconThemeSchema.js +0 -303
- package/vscode/src/vs/workbench/services/themes/common/plistParser.js +0 -439
- package/vscode/src/vs/workbench/services/themes/common/productIconThemeSchema.js +0 -94
- package/vscode/src/vs/workbench/services/themes/common/textMateScopeMatcher.js +0 -120
- package/vscode/src/vs/workbench/services/themes/common/themeCompatibility.js +0 -66
- package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.js +0 -372
- package/vscode/src/vs/workbench/services/themes/common/themeExtensionPoints.js +0 -254
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +0 -689
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +0 -612
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +0 -322
- package/vscode/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.js +0 -27
- package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.js +0 -151
- package/workers/languageDetection.worker.js +0 -8
- package/workers/outputLinkComputer.worker.js +0 -3
- package/workers/textmate.worker.js +0 -3
|
@@ -1,1964 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { BrowserFeatures } from 'monaco-editor/esm/vs/base/browser/canIUse.js';
|
|
3
|
-
import { Action } from 'monaco-editor/esm/vs/base/common/actions.js';
|
|
4
|
-
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
5
|
-
import { KeyChord } from 'monaco-editor/esm/vs/base/common/keyCodes.js';
|
|
6
|
-
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
7
|
-
import { isLinux, isWindows } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
8
|
-
import { isObject, isString } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
9
|
-
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
10
|
-
import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
|
|
11
|
-
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
12
|
-
import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'monaco-editor/esm/vs/platform/accessibility/common/accessibility.js';
|
|
13
|
-
import { registerAction2, Action2 } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
14
|
-
import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
15
|
-
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
16
|
-
import { ContextKeyExpr } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
17
|
-
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
18
|
-
import { IListService } from 'monaco-editor/esm/vs/platform/list/browser/listService.js';
|
|
19
|
-
import { INotificationService, Severity } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
20
|
-
import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
21
|
-
import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
22
|
-
import { TerminalLocation, TerminalExitReason } from '../../../../platform/terminal/common/terminal.js';
|
|
23
|
-
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
24
|
-
import { PICK_WORKSPACE_FOLDER_COMMAND_ID } from '../../../browser/actions/workspaceCommands.js';
|
|
25
|
-
import { CLOSE_EDITOR_COMMAND_ID } from '../../../browser/parts/editor/editorCommands.js';
|
|
26
|
-
import { ResourceContextKey } from '../../../common/contextkeys.js';
|
|
27
|
-
import { ITerminalService, ITerminalGroupService, ITerminalInstanceService, ITerminalEditorService } from './terminal.js';
|
|
28
|
-
import { TerminalQuickAccessProvider } from './terminalQuickAccess.js';
|
|
29
|
-
import { ITerminalProfileService, ITerminalProfileResolverService } from '../common/terminal.js';
|
|
30
|
-
import { TerminalContextKeys } from '../common/terminalContextKey.js';
|
|
31
|
-
import { createProfileSchemaEnums } from '../../../../platform/terminal/common/terminalProfiles.js';
|
|
32
|
-
import { terminalStrings } from '../common/terminalStrings.js';
|
|
33
|
-
import { IConfigurationResolverService } from '../../../services/configurationResolver/common/configurationResolver.js';
|
|
34
|
-
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
|
|
35
|
-
import { IHistoryService } from '../../../services/history/common/history.js';
|
|
36
|
-
import { IPreferencesService } from '../../../services/preferences/common/preferences.js';
|
|
37
|
-
import { IRemoteAgentService } from '../../../services/remote/common/remoteAgentService.js';
|
|
38
|
-
import { SIDE_GROUP } from '../../../services/editor/common/editorService.js';
|
|
39
|
-
import { isAbsolute } from 'monaco-editor/esm/vs/base/common/path.js';
|
|
40
|
-
import { AbstractVariableResolverService } from '../../../services/configurationResolver/common/variableResolver.js';
|
|
41
|
-
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
42
|
-
import { getIconId, getColorClass, getUriClasses } from './terminalIcon.js';
|
|
43
|
-
import { getCommandHistory, clearShellFileHistory } from '../common/history.js';
|
|
44
|
-
import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
|
|
45
|
-
import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
|
|
46
|
-
import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
|
|
47
|
-
import { dirname } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
48
|
-
import { getIconClasses } from 'monaco-editor/esm/vs/editor/common/services/getIconClasses.js';
|
|
49
|
-
import { FileKind } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
50
|
-
import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
|
|
51
|
-
import { newTerminalIcon, killTerminalIcon } from './terminalIcons.js';
|
|
52
|
-
import { IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.js';
|
|
53
|
-
import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
|
|
54
|
-
const switchTerminalActionViewItemSeparator = '\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500';
|
|
55
|
-
const switchTerminalShowTabsTitle = ( localize('showTerminalTabs', "Show Tabs"));
|
|
56
|
-
const category = terminalStrings.actionCategory;
|
|
57
|
-
async function getCwdForSplit(configHelper, instance, folders, commandService) {
|
|
58
|
-
switch (configHelper.config.splitCwd) {
|
|
59
|
-
case 'workspaceRoot':
|
|
60
|
-
if (folders !== undefined && commandService !== undefined) {
|
|
61
|
-
if (folders.length === 1) {
|
|
62
|
-
return folders[0].uri;
|
|
63
|
-
}
|
|
64
|
-
else if (folders.length > 1) {
|
|
65
|
-
const options = {
|
|
66
|
-
placeHolder: ( localize(
|
|
67
|
-
'workbench.action.terminal.newWorkspacePlaceholder',
|
|
68
|
-
"Select current working directory for new terminal"
|
|
69
|
-
))
|
|
70
|
-
};
|
|
71
|
-
const workspace = await commandService.executeCommand(PICK_WORKSPACE_FOLDER_COMMAND_ID, [options]);
|
|
72
|
-
if (!workspace) {
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
return Promise.resolve(workspace.uri);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return '';
|
|
79
|
-
case 'initial':
|
|
80
|
-
return instance.getInitialCwd();
|
|
81
|
-
case 'inherited':
|
|
82
|
-
return instance.getCwd();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
const terminalSendSequenceCommand = async (accessor, args) => {
|
|
86
|
-
const instance = accessor.get(ITerminalService).activeInstance;
|
|
87
|
-
if (instance) {
|
|
88
|
-
const text = isObject(args) && 'text' in args ? toOptionalString(args.text) : undefined;
|
|
89
|
-
if (!text) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const configurationResolverService = accessor.get(IConfigurationResolverService);
|
|
93
|
-
const workspaceContextService = accessor.get(IWorkspaceContextService);
|
|
94
|
-
const historyService = accessor.get(IHistoryService);
|
|
95
|
-
const activeWorkspaceRootUri = historyService.getLastActiveWorkspaceRoot(instance.isRemote ? Schemas.vscodeRemote : Schemas.file);
|
|
96
|
-
const lastActiveWorkspaceRoot = activeWorkspaceRootUri ? workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri) ?? undefined : undefined;
|
|
97
|
-
const resolvedText = await configurationResolverService.resolveAsync(lastActiveWorkspaceRoot, text);
|
|
98
|
-
instance.sendText(resolvedText, false);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
let TerminalLaunchHelpAction = class TerminalLaunchHelpAction extends Action {
|
|
102
|
-
constructor(_openerService) {
|
|
103
|
-
super('workbench.action.terminal.launchHelp', ( localize('terminalLaunchHelp', "Open Help")));
|
|
104
|
-
this._openerService = _openerService;
|
|
105
|
-
}
|
|
106
|
-
async run() {
|
|
107
|
-
this._openerService.open('https://aka.ms/vscode-troubleshoot-terminal-launch');
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
TerminalLaunchHelpAction = ( __decorate([
|
|
111
|
-
( __param(0, IOpenerService))
|
|
112
|
-
], TerminalLaunchHelpAction));
|
|
113
|
-
function registerTerminalAction(options) {
|
|
114
|
-
options.f1 = options.f1 ?? true;
|
|
115
|
-
options.category = options.category ?? category;
|
|
116
|
-
options.precondition = options.precondition ?? TerminalContextKeys.processSupported;
|
|
117
|
-
const runFunc = options.run;
|
|
118
|
-
const strictOptions = options;
|
|
119
|
-
delete strictOptions['run'];
|
|
120
|
-
return registerAction2(class extends Action2 {
|
|
121
|
-
constructor() {
|
|
122
|
-
super(strictOptions);
|
|
123
|
-
}
|
|
124
|
-
run(accessor, args) {
|
|
125
|
-
return runFunc(getTerminalServices(accessor), accessor, args);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
function registerActiveInstanceAction(options) {
|
|
130
|
-
const originalRun = options.run;
|
|
131
|
-
return registerTerminalAction({
|
|
132
|
-
...options,
|
|
133
|
-
run: (c, accessor, args) => {
|
|
134
|
-
const activeInstance = c.service.activeInstance;
|
|
135
|
-
if (activeInstance) {
|
|
136
|
-
return originalRun(activeInstance, c, accessor, args);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
function registerActiveXtermAction(options) {
|
|
142
|
-
const originalRun = options.run;
|
|
143
|
-
return registerTerminalAction({
|
|
144
|
-
...options,
|
|
145
|
-
run: (c, accessor, args) => {
|
|
146
|
-
const activeDetached = Iterable.find(c.service.detachedXterms, d => d.isFocused);
|
|
147
|
-
if (activeDetached) {
|
|
148
|
-
return originalRun(activeDetached, accessor, undefined, args);
|
|
149
|
-
}
|
|
150
|
-
const activeInstance = c.service.activeInstance;
|
|
151
|
-
if (activeInstance?.xterm) {
|
|
152
|
-
return originalRun(activeInstance.xterm, accessor, activeInstance, args);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
function getTerminalServices(accessor) {
|
|
158
|
-
return {
|
|
159
|
-
service: accessor.get(ITerminalService),
|
|
160
|
-
groupService: accessor.get(ITerminalGroupService),
|
|
161
|
-
instanceService: accessor.get(ITerminalInstanceService),
|
|
162
|
-
editorService: accessor.get(ITerminalEditorService),
|
|
163
|
-
profileService: accessor.get(ITerminalProfileService),
|
|
164
|
-
profileResolverService: accessor.get(ITerminalProfileResolverService)
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
function registerTerminalActions() {
|
|
168
|
-
registerTerminalAction({
|
|
169
|
-
id: "workbench.action.terminal.newInActiveWorkspace" ,
|
|
170
|
-
title: { value: ( localize(
|
|
171
|
-
'workbench.action.terminal.newInActiveWorkspace',
|
|
172
|
-
"Create New Terminal (In Active Workspace)"
|
|
173
|
-
)), original: 'Create New Terminal (In Active Workspace)' },
|
|
174
|
-
run: async (c) => {
|
|
175
|
-
if (c.service.isProcessSupportRegistered) {
|
|
176
|
-
const instance = await c.service.createTerminal({ location: c.service.defaultLocation });
|
|
177
|
-
if (!instance) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
c.service.setActiveInstance(instance);
|
|
181
|
-
}
|
|
182
|
-
await c.groupService.showPanel(true);
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
refreshTerminalActions([]);
|
|
186
|
-
registerTerminalAction({
|
|
187
|
-
id: "workbench.action.createTerminalEditor" ,
|
|
188
|
-
title: { value: ( localize(
|
|
189
|
-
'workbench.action.terminal.createTerminalEditor',
|
|
190
|
-
"Create New Terminal in Editor Area"
|
|
191
|
-
)), original: 'Create New Terminal in Editor Area' },
|
|
192
|
-
run: async (c, _, args) => {
|
|
193
|
-
const options = (isObject(args) && 'location' in args) ? args : { location: TerminalLocation.Editor };
|
|
194
|
-
const instance = await c.service.createTerminal(options);
|
|
195
|
-
instance.focusWhenReady();
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
registerTerminalAction({
|
|
199
|
-
id: "workbench.action.createTerminalEditorSameGroup" ,
|
|
200
|
-
title: { value: ( localize(
|
|
201
|
-
'workbench.action.terminal.createTerminalEditor',
|
|
202
|
-
"Create New Terminal in Editor Area"
|
|
203
|
-
)), original: 'Create New Terminal in Editor Area' },
|
|
204
|
-
f1: false,
|
|
205
|
-
run: async (c, accessor, args) => {
|
|
206
|
-
const editorGroupsService = accessor.get(IEditorGroupsService);
|
|
207
|
-
const instance = await c.service.createTerminal({
|
|
208
|
-
location: { viewColumn: editorGroupsService.activeGroup.index }
|
|
209
|
-
});
|
|
210
|
-
instance.focusWhenReady();
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
registerTerminalAction({
|
|
214
|
-
id: "workbench.action.createTerminalEditorSide" ,
|
|
215
|
-
title: { value: ( localize(
|
|
216
|
-
'workbench.action.terminal.createTerminalEditorSide',
|
|
217
|
-
"Create New Terminal in Editor Area to the Side"
|
|
218
|
-
)), original: 'Create New Terminal in Editor Area to the Side' },
|
|
219
|
-
run: async (c) => {
|
|
220
|
-
const instance = await c.service.createTerminal({
|
|
221
|
-
location: { viewColumn: SIDE_GROUP }
|
|
222
|
-
});
|
|
223
|
-
instance.focusWhenReady();
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
registerActiveInstanceAction({
|
|
227
|
-
id: "workbench.action.terminal.moveToEditor" ,
|
|
228
|
-
title: terminalStrings.moveToEditor,
|
|
229
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
230
|
-
TerminalContextKeys.processSupported,
|
|
231
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
232
|
-
)), ( TerminalContextKeys.terminalEditorActive.toNegated()), TerminalContextKeys.viewShowing)),
|
|
233
|
-
run: (activeInstance, c) => c.service.moveToEditor(activeInstance)
|
|
234
|
-
});
|
|
235
|
-
registerTerminalAction({
|
|
236
|
-
id: "workbench.action.terminal.moveToEditorActiveTab" ,
|
|
237
|
-
title: terminalStrings.moveToEditor,
|
|
238
|
-
f1: false,
|
|
239
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
240
|
-
TerminalContextKeys.processSupported,
|
|
241
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
242
|
-
)), TerminalContextKeys.isOpen)),
|
|
243
|
-
run: async (c, accessor) => {
|
|
244
|
-
const selectedInstances = getSelectedInstances(accessor);
|
|
245
|
-
if (!selectedInstances || selectedInstances.length === 0) {
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
for (const instance of selectedInstances) {
|
|
249
|
-
c.service.moveToEditor(instance);
|
|
250
|
-
}
|
|
251
|
-
selectedInstances[selectedInstances.length - 1].focus();
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
registerTerminalAction({
|
|
255
|
-
id: "workbench.action.terminal.moveToTerminalPanel" ,
|
|
256
|
-
title: terminalStrings.moveToTerminalPanel,
|
|
257
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
258
|
-
TerminalContextKeys.processSupported,
|
|
259
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
260
|
-
)), TerminalContextKeys.terminalEditorActive)),
|
|
261
|
-
run: (c, _, args) => {
|
|
262
|
-
const source = toOptionalUri(args) ?? c.editorService.activeInstance;
|
|
263
|
-
if (source) {
|
|
264
|
-
c.service.moveToTerminalView(source);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
registerTerminalAction({
|
|
269
|
-
id: "workbench.action.terminal.focusPreviousPane" ,
|
|
270
|
-
title: { value: ( localize(
|
|
271
|
-
'workbench.action.terminal.focusPreviousPane',
|
|
272
|
-
"Focus Previous Terminal in Terminal Group"
|
|
273
|
-
)), original: 'Focus Previous Terminal in Terminal Group' },
|
|
274
|
-
keybinding: {
|
|
275
|
-
primary: 512 | 15 ,
|
|
276
|
-
secondary: [512 | 16 ],
|
|
277
|
-
mac: {
|
|
278
|
-
primary: 512 | 2048 | 15 ,
|
|
279
|
-
secondary: [512 | 2048 | 16 ]
|
|
280
|
-
},
|
|
281
|
-
when: TerminalContextKeys.focus,
|
|
282
|
-
weight: 200
|
|
283
|
-
},
|
|
284
|
-
precondition: ( ContextKeyExpr.or(
|
|
285
|
-
TerminalContextKeys.processSupported,
|
|
286
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
287
|
-
)),
|
|
288
|
-
run: async (c) => {
|
|
289
|
-
c.groupService.activeGroup?.focusPreviousPane();
|
|
290
|
-
await c.groupService.showPanel(true);
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
registerTerminalAction({
|
|
294
|
-
id: "workbench.action.terminal.focusNextPane" ,
|
|
295
|
-
title: { value: ( localize(
|
|
296
|
-
'workbench.action.terminal.focusNextPane',
|
|
297
|
-
"Focus Next Terminal in Terminal Group"
|
|
298
|
-
)), original: 'Focus Next Terminal in Terminal Group' },
|
|
299
|
-
keybinding: {
|
|
300
|
-
primary: 512 | 17 ,
|
|
301
|
-
secondary: [512 | 18 ],
|
|
302
|
-
mac: {
|
|
303
|
-
primary: 512 | 2048 | 17 ,
|
|
304
|
-
secondary: [512 | 2048 | 18 ]
|
|
305
|
-
},
|
|
306
|
-
when: TerminalContextKeys.focus,
|
|
307
|
-
weight: 200
|
|
308
|
-
},
|
|
309
|
-
precondition: ( ContextKeyExpr.or(
|
|
310
|
-
TerminalContextKeys.processSupported,
|
|
311
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
312
|
-
)),
|
|
313
|
-
run: async (c) => {
|
|
314
|
-
c.groupService.activeGroup?.focusNextPane();
|
|
315
|
-
await c.groupService.showPanel(true);
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
registerActiveInstanceAction({
|
|
319
|
-
id: "workbench.action.terminal.runRecentCommand" ,
|
|
320
|
-
title: { value: ( localize('workbench.action.terminal.runRecentCommand', "Run Recent Command...")), original: 'Run Recent Command...' },
|
|
321
|
-
precondition: ( ContextKeyExpr.or(
|
|
322
|
-
TerminalContextKeys.processSupported,
|
|
323
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
324
|
-
)),
|
|
325
|
-
keybinding: [
|
|
326
|
-
{
|
|
327
|
-
primary: 2048 | 48 ,
|
|
328
|
-
mac: { primary: 256 | 48 },
|
|
329
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focus, CONTEXT_ACCESSIBILITY_MODE_ENABLED)),
|
|
330
|
-
weight: 200
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
primary: 2048 | 512 | 48 ,
|
|
334
|
-
mac: { primary: 256 | 512 | 48 },
|
|
335
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focus, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()))),
|
|
336
|
-
weight: 200
|
|
337
|
-
}
|
|
338
|
-
],
|
|
339
|
-
run: async (activeInstance, c) => {
|
|
340
|
-
await activeInstance.runRecent('command');
|
|
341
|
-
if (activeInstance?.target === TerminalLocation.Editor) {
|
|
342
|
-
await c.editorService.revealActiveEditor();
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
await c.groupService.showPanel(false);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
registerActiveInstanceAction({
|
|
350
|
-
id: "workbench.action.terminal.copyLastCommandOutput" ,
|
|
351
|
-
title: { value: ( localize('workbench.action.terminal.copyLastCommand', 'Copy Last Command Output')), original: 'Copy Last Command Output' },
|
|
352
|
-
precondition: ( ContextKeyExpr.or(
|
|
353
|
-
TerminalContextKeys.processSupported,
|
|
354
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
355
|
-
)),
|
|
356
|
-
run: async (instance, c, accessor) => {
|
|
357
|
-
const clipboardService = accessor.get(IClipboardService);
|
|
358
|
-
const commands = instance.capabilities.get(2 )?.commands;
|
|
359
|
-
if (!commands || commands.length === 0) {
|
|
360
|
-
return;
|
|
361
|
-
}
|
|
362
|
-
const command = commands[commands.length - 1];
|
|
363
|
-
if (!command?.hasOutput()) {
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
const output = command.getOutput();
|
|
367
|
-
if (isString(output)) {
|
|
368
|
-
await clipboardService.writeText(output);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
registerActiveInstanceAction({
|
|
373
|
-
id: "workbench.action.terminal.goToRecentDirectory" ,
|
|
374
|
-
title: { value: ( localize(
|
|
375
|
-
'workbench.action.terminal.goToRecentDirectory',
|
|
376
|
-
"Go to Recent Directory..."
|
|
377
|
-
)), original: 'Go to Recent Directory...' },
|
|
378
|
-
precondition: ( ContextKeyExpr.or(
|
|
379
|
-
TerminalContextKeys.processSupported,
|
|
380
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
381
|
-
)),
|
|
382
|
-
keybinding: {
|
|
383
|
-
primary: 2048 | 37 ,
|
|
384
|
-
when: TerminalContextKeys.focus,
|
|
385
|
-
weight: 200
|
|
386
|
-
},
|
|
387
|
-
run: async (activeInstance, c) => {
|
|
388
|
-
await activeInstance.runRecent('cwd');
|
|
389
|
-
if (activeInstance?.target === TerminalLocation.Editor) {
|
|
390
|
-
await c.editorService.revealActiveEditor();
|
|
391
|
-
}
|
|
392
|
-
else {
|
|
393
|
-
await c.groupService.showPanel(false);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
registerTerminalAction({
|
|
398
|
-
id: "workbench.action.terminal.resizePaneLeft" ,
|
|
399
|
-
title: { value: ( localize('workbench.action.terminal.resizePaneLeft', "Resize Terminal Left")), original: 'Resize Terminal Left' },
|
|
400
|
-
keybinding: {
|
|
401
|
-
linux: { primary: 2048 | 1024 | 15 },
|
|
402
|
-
mac: { primary: 2048 | 256 | 15 },
|
|
403
|
-
when: TerminalContextKeys.focus,
|
|
404
|
-
weight: 200
|
|
405
|
-
},
|
|
406
|
-
precondition: ( ContextKeyExpr.or(
|
|
407
|
-
TerminalContextKeys.processSupported,
|
|
408
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
409
|
-
)),
|
|
410
|
-
run: (c) => c.groupService.activeGroup?.resizePane(0 )
|
|
411
|
-
});
|
|
412
|
-
registerTerminalAction({
|
|
413
|
-
id: "workbench.action.terminal.resizePaneRight" ,
|
|
414
|
-
title: { value: ( localize('workbench.action.terminal.resizePaneRight', "Resize Terminal Right")), original: 'Resize Terminal Right' },
|
|
415
|
-
keybinding: {
|
|
416
|
-
linux: { primary: 2048 | 1024 | 17 },
|
|
417
|
-
mac: { primary: 2048 | 256 | 17 },
|
|
418
|
-
when: TerminalContextKeys.focus,
|
|
419
|
-
weight: 200
|
|
420
|
-
},
|
|
421
|
-
precondition: ( ContextKeyExpr.or(
|
|
422
|
-
TerminalContextKeys.processSupported,
|
|
423
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
424
|
-
)),
|
|
425
|
-
run: (c) => c.groupService.activeGroup?.resizePane(1 )
|
|
426
|
-
});
|
|
427
|
-
registerTerminalAction({
|
|
428
|
-
id: "workbench.action.terminal.resizePaneUp" ,
|
|
429
|
-
title: { value: ( localize('workbench.action.terminal.resizePaneUp', "Resize Terminal Up")), original: 'Resize Terminal Up' },
|
|
430
|
-
keybinding: {
|
|
431
|
-
mac: { primary: 2048 | 256 | 16 },
|
|
432
|
-
when: TerminalContextKeys.focus,
|
|
433
|
-
weight: 200
|
|
434
|
-
},
|
|
435
|
-
precondition: ( ContextKeyExpr.or(
|
|
436
|
-
TerminalContextKeys.processSupported,
|
|
437
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
438
|
-
)),
|
|
439
|
-
run: (c) => c.groupService.activeGroup?.resizePane(2 )
|
|
440
|
-
});
|
|
441
|
-
registerTerminalAction({
|
|
442
|
-
id: "workbench.action.terminal.resizePaneDown" ,
|
|
443
|
-
title: { value: ( localize('workbench.action.terminal.resizePaneDown', "Resize Terminal Down")), original: 'Resize Terminal Down' },
|
|
444
|
-
keybinding: {
|
|
445
|
-
mac: { primary: 2048 | 256 | 18 },
|
|
446
|
-
when: TerminalContextKeys.focus,
|
|
447
|
-
weight: 200
|
|
448
|
-
},
|
|
449
|
-
precondition: ( ContextKeyExpr.or(
|
|
450
|
-
TerminalContextKeys.processSupported,
|
|
451
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
452
|
-
)),
|
|
453
|
-
run: (c) => c.groupService.activeGroup?.resizePane(3 )
|
|
454
|
-
});
|
|
455
|
-
registerTerminalAction({
|
|
456
|
-
id: "workbench.action.terminal.focus" ,
|
|
457
|
-
title: terminalStrings.focus,
|
|
458
|
-
keybinding: {
|
|
459
|
-
when: ( ContextKeyExpr.and(
|
|
460
|
-
CONTEXT_ACCESSIBILITY_MODE_ENABLED,
|
|
461
|
-
TerminalContextKeys.accessibleBufferOnLastLine
|
|
462
|
-
)),
|
|
463
|
-
primary: 2048 | 18 ,
|
|
464
|
-
weight: 200
|
|
465
|
-
},
|
|
466
|
-
precondition: ( ContextKeyExpr.or(
|
|
467
|
-
TerminalContextKeys.processSupported,
|
|
468
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
469
|
-
)),
|
|
470
|
-
run: async (c) => {
|
|
471
|
-
const instance = c.service.activeInstance || (await c.service.createTerminal({ location: TerminalLocation.Panel }));
|
|
472
|
-
if (!instance) {
|
|
473
|
-
return;
|
|
474
|
-
}
|
|
475
|
-
c.service.setActiveInstance(instance);
|
|
476
|
-
return c.groupService.showPanel(true);
|
|
477
|
-
}
|
|
478
|
-
});
|
|
479
|
-
registerTerminalAction({
|
|
480
|
-
id: "workbench.action.terminal.focusTabs" ,
|
|
481
|
-
title: { value: ( localize('workbench.action.terminal.focus.tabsView', "Focus Terminal Tabs View")), original: 'Focus Terminal Tabs View' },
|
|
482
|
-
keybinding: {
|
|
483
|
-
primary: 2048 | 1024 | 93 ,
|
|
484
|
-
weight: 200 ,
|
|
485
|
-
when: ( ContextKeyExpr.or(TerminalContextKeys.tabsFocus, TerminalContextKeys.focus)),
|
|
486
|
-
},
|
|
487
|
-
precondition: ( ContextKeyExpr.or(
|
|
488
|
-
TerminalContextKeys.processSupported,
|
|
489
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
490
|
-
)),
|
|
491
|
-
run: (c) => c.groupService.focusTabs()
|
|
492
|
-
});
|
|
493
|
-
registerTerminalAction({
|
|
494
|
-
id: "workbench.action.terminal.focusNext" ,
|
|
495
|
-
title: { value: ( localize('workbench.action.terminal.focusNext', "Focus Next Terminal Group")), original: 'Focus Next Terminal Group' },
|
|
496
|
-
precondition: ( ContextKeyExpr.or(
|
|
497
|
-
TerminalContextKeys.processSupported,
|
|
498
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
499
|
-
)),
|
|
500
|
-
keybinding: {
|
|
501
|
-
primary: 2048 | 12 ,
|
|
502
|
-
mac: {
|
|
503
|
-
primary: 2048 | 1024 | 94
|
|
504
|
-
},
|
|
505
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focus, ( TerminalContextKeys.editorFocus.negate()))),
|
|
506
|
-
weight: 200
|
|
507
|
-
},
|
|
508
|
-
run: async (c) => {
|
|
509
|
-
c.groupService.setActiveGroupToNext();
|
|
510
|
-
await c.groupService.showPanel(true);
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
registerTerminalAction({
|
|
514
|
-
id: "workbench.action.terminal.focusPrevious" ,
|
|
515
|
-
title: { value: ( localize('workbench.action.terminal.focusPrevious', "Focus Previous Terminal Group")), original: 'Focus Previous Terminal Group' },
|
|
516
|
-
precondition: ( ContextKeyExpr.or(
|
|
517
|
-
TerminalContextKeys.processSupported,
|
|
518
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
519
|
-
)),
|
|
520
|
-
keybinding: {
|
|
521
|
-
primary: 2048 | 11 ,
|
|
522
|
-
mac: {
|
|
523
|
-
primary: 2048 | 1024 | 92
|
|
524
|
-
},
|
|
525
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focus, ( TerminalContextKeys.editorFocus.negate()))),
|
|
526
|
-
weight: 200
|
|
527
|
-
},
|
|
528
|
-
run: async (c) => {
|
|
529
|
-
c.groupService.setActiveGroupToPrevious();
|
|
530
|
-
await c.groupService.showPanel(true);
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
registerTerminalAction({
|
|
534
|
-
id: "workbench.action.terminal.runSelectedText" ,
|
|
535
|
-
title: { value: ( localize(
|
|
536
|
-
'workbench.action.terminal.runSelectedText',
|
|
537
|
-
"Run Selected Text In Active Terminal"
|
|
538
|
-
)), original: 'Run Selected Text In Active Terminal' },
|
|
539
|
-
run: async (c, accessor) => {
|
|
540
|
-
const codeEditorService = accessor.get(ICodeEditorService);
|
|
541
|
-
const editor = codeEditorService.getActiveCodeEditor();
|
|
542
|
-
if (!editor || !editor.hasModel()) {
|
|
543
|
-
return;
|
|
544
|
-
}
|
|
545
|
-
const instance = await c.service.getActiveOrCreateInstance({ acceptsInput: true });
|
|
546
|
-
const selection = editor.getSelection();
|
|
547
|
-
let text;
|
|
548
|
-
if (selection.isEmpty()) {
|
|
549
|
-
text = editor.getModel().getLineContent(selection.selectionStartLineNumber).trim();
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
552
|
-
const endOfLinePreference = isWindows ? 1 : 2 ;
|
|
553
|
-
text = editor.getModel().getValueInRange(selection, endOfLinePreference);
|
|
554
|
-
}
|
|
555
|
-
instance.sendText(text, true, true);
|
|
556
|
-
await c.service.revealActiveTerminal();
|
|
557
|
-
}
|
|
558
|
-
});
|
|
559
|
-
registerTerminalAction({
|
|
560
|
-
id: "workbench.action.terminal.runActiveFile" ,
|
|
561
|
-
title: { value: ( localize(
|
|
562
|
-
'workbench.action.terminal.runActiveFile',
|
|
563
|
-
"Run Active File In Active Terminal"
|
|
564
|
-
)), original: 'Run Active File In Active Terminal' },
|
|
565
|
-
precondition: ( ContextKeyExpr.or(
|
|
566
|
-
TerminalContextKeys.processSupported,
|
|
567
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
568
|
-
)),
|
|
569
|
-
run: async (c, accessor) => {
|
|
570
|
-
const codeEditorService = accessor.get(ICodeEditorService);
|
|
571
|
-
const notificationService = accessor.get(INotificationService);
|
|
572
|
-
const workbenchEnvironmentService = accessor.get(IWorkbenchEnvironmentService);
|
|
573
|
-
const editor = codeEditorService.getActiveCodeEditor();
|
|
574
|
-
if (!editor || !editor.hasModel()) {
|
|
575
|
-
return;
|
|
576
|
-
}
|
|
577
|
-
const instance = await c.service.getActiveOrCreateInstance({ acceptsInput: true });
|
|
578
|
-
const isRemote = instance ? instance.isRemote : (workbenchEnvironmentService.remoteAuthority ? true : false);
|
|
579
|
-
const uri = editor.getModel().uri;
|
|
580
|
-
if ((!isRemote && uri.scheme !== Schemas.file && uri.scheme !== Schemas.vscodeUserData) || (isRemote && uri.scheme !== Schemas.vscodeRemote)) {
|
|
581
|
-
notificationService.warn(( localize(
|
|
582
|
-
'workbench.action.terminal.runActiveFile.noFile',
|
|
583
|
-
'Only files on disk can be run in the terminal'
|
|
584
|
-
)));
|
|
585
|
-
return;
|
|
586
|
-
}
|
|
587
|
-
await instance.sendPath(uri, true);
|
|
588
|
-
return c.groupService.showPanel();
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
registerActiveXtermAction({
|
|
592
|
-
id: "workbench.action.terminal.scrollDown" ,
|
|
593
|
-
title: { value: ( localize('workbench.action.terminal.scrollDown', "Scroll Down (Line)")), original: 'Scroll Down (Line)' },
|
|
594
|
-
keybinding: {
|
|
595
|
-
primary: 2048 | 512 | 12 ,
|
|
596
|
-
linux: { primary: 2048 | 1024 | 18 },
|
|
597
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focusInAny, ( TerminalContextKeys.altBufferActive.negate()))),
|
|
598
|
-
weight: 200
|
|
599
|
-
},
|
|
600
|
-
precondition: ( ContextKeyExpr.or(
|
|
601
|
-
TerminalContextKeys.processSupported,
|
|
602
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
603
|
-
)),
|
|
604
|
-
run: (xterm) => xterm.scrollDownLine()
|
|
605
|
-
});
|
|
606
|
-
registerActiveXtermAction({
|
|
607
|
-
id: "workbench.action.terminal.scrollDownPage" ,
|
|
608
|
-
title: { value: ( localize('workbench.action.terminal.scrollDownPage', "Scroll Down (Page)")), original: 'Scroll Down (Page)' },
|
|
609
|
-
keybinding: {
|
|
610
|
-
primary: 1024 | 12 ,
|
|
611
|
-
mac: { primary: 12 },
|
|
612
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focusInAny, ( TerminalContextKeys.altBufferActive.negate()))),
|
|
613
|
-
weight: 200
|
|
614
|
-
},
|
|
615
|
-
precondition: ( ContextKeyExpr.or(
|
|
616
|
-
TerminalContextKeys.processSupported,
|
|
617
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
618
|
-
)),
|
|
619
|
-
run: (xterm) => xterm.scrollDownPage()
|
|
620
|
-
});
|
|
621
|
-
registerActiveXtermAction({
|
|
622
|
-
id: "workbench.action.terminal.scrollToBottom" ,
|
|
623
|
-
title: { value: ( localize('workbench.action.terminal.scrollToBottom', "Scroll to Bottom")), original: 'Scroll to Bottom' },
|
|
624
|
-
keybinding: {
|
|
625
|
-
primary: 2048 | 13 ,
|
|
626
|
-
linux: { primary: 1024 | 13 },
|
|
627
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focusInAny, ( TerminalContextKeys.altBufferActive.negate()))),
|
|
628
|
-
weight: 200
|
|
629
|
-
},
|
|
630
|
-
precondition: ( ContextKeyExpr.or(
|
|
631
|
-
TerminalContextKeys.processSupported,
|
|
632
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
633
|
-
)),
|
|
634
|
-
run: (xterm) => xterm.scrollToBottom()
|
|
635
|
-
});
|
|
636
|
-
registerActiveXtermAction({
|
|
637
|
-
id: "workbench.action.terminal.scrollUp" ,
|
|
638
|
-
title: { value: ( localize('workbench.action.terminal.scrollUp', "Scroll Up (Line)")), original: 'Scroll Up (Line)' },
|
|
639
|
-
keybinding: {
|
|
640
|
-
primary: 2048 | 512 | 11 ,
|
|
641
|
-
linux: { primary: 2048 | 1024 | 16 },
|
|
642
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focusInAny, ( TerminalContextKeys.altBufferActive.negate()))),
|
|
643
|
-
weight: 200
|
|
644
|
-
},
|
|
645
|
-
precondition: ( ContextKeyExpr.or(
|
|
646
|
-
TerminalContextKeys.processSupported,
|
|
647
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
648
|
-
)),
|
|
649
|
-
run: (xterm) => xterm.scrollUpLine()
|
|
650
|
-
});
|
|
651
|
-
registerActiveXtermAction({
|
|
652
|
-
id: "workbench.action.terminal.scrollUpPage" ,
|
|
653
|
-
title: { value: ( localize('workbench.action.terminal.scrollUpPage', "Scroll Up (Page)")), original: 'Scroll Up (Page)' },
|
|
654
|
-
f1: true,
|
|
655
|
-
category,
|
|
656
|
-
keybinding: {
|
|
657
|
-
primary: 1024 | 11 ,
|
|
658
|
-
mac: { primary: 11 },
|
|
659
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focusInAny, ( TerminalContextKeys.altBufferActive.negate()))),
|
|
660
|
-
weight: 200
|
|
661
|
-
},
|
|
662
|
-
precondition: ( ContextKeyExpr.or(
|
|
663
|
-
TerminalContextKeys.processSupported,
|
|
664
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
665
|
-
)),
|
|
666
|
-
run: (xterm) => xterm.scrollUpPage()
|
|
667
|
-
});
|
|
668
|
-
registerActiveXtermAction({
|
|
669
|
-
id: "workbench.action.terminal.scrollToTop" ,
|
|
670
|
-
title: { value: ( localize('workbench.action.terminal.scrollToTop', "Scroll to Top")), original: 'Scroll to Top' },
|
|
671
|
-
keybinding: {
|
|
672
|
-
primary: 2048 | 14 ,
|
|
673
|
-
linux: { primary: 1024 | 14 },
|
|
674
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focusInAny, ( TerminalContextKeys.altBufferActive.negate()))),
|
|
675
|
-
weight: 200
|
|
676
|
-
},
|
|
677
|
-
precondition: ( ContextKeyExpr.or(
|
|
678
|
-
TerminalContextKeys.processSupported,
|
|
679
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
680
|
-
)),
|
|
681
|
-
run: (xterm) => xterm.scrollToTop()
|
|
682
|
-
});
|
|
683
|
-
registerActiveXtermAction({
|
|
684
|
-
id: "workbench.action.terminal.clearSelection" ,
|
|
685
|
-
title: { value: ( localize('workbench.action.terminal.clearSelection', "Clear Selection")), original: 'Clear Selection' },
|
|
686
|
-
keybinding: {
|
|
687
|
-
primary: 9 ,
|
|
688
|
-
when: ( ContextKeyExpr.and(
|
|
689
|
-
TerminalContextKeys.focusInAny,
|
|
690
|
-
TerminalContextKeys.textSelected,
|
|
691
|
-
TerminalContextKeys.notFindVisible
|
|
692
|
-
)),
|
|
693
|
-
weight: 200
|
|
694
|
-
},
|
|
695
|
-
precondition: ( ContextKeyExpr.or(
|
|
696
|
-
TerminalContextKeys.processSupported,
|
|
697
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
698
|
-
)),
|
|
699
|
-
run: (xterm) => {
|
|
700
|
-
if (xterm.hasSelection()) {
|
|
701
|
-
xterm.clearSelection();
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
});
|
|
705
|
-
registerTerminalAction({
|
|
706
|
-
id: "workbench.action.terminal.changeIcon" ,
|
|
707
|
-
title: terminalStrings.changeIcon,
|
|
708
|
-
precondition: ( ContextKeyExpr.or(
|
|
709
|
-
TerminalContextKeys.processSupported,
|
|
710
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
711
|
-
)),
|
|
712
|
-
run: (c, _, args) => getResourceOrActiveInstance(c, args)?.changeIcon()
|
|
713
|
-
});
|
|
714
|
-
registerTerminalAction({
|
|
715
|
-
id: "workbench.action.terminal.changeIconPanel" ,
|
|
716
|
-
title: terminalStrings.changeIcon,
|
|
717
|
-
f1: false,
|
|
718
|
-
precondition: ( ContextKeyExpr.or(
|
|
719
|
-
TerminalContextKeys.processSupported,
|
|
720
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
721
|
-
)),
|
|
722
|
-
run: (c) => c.groupService.activeInstance?.changeIcon()
|
|
723
|
-
});
|
|
724
|
-
registerTerminalAction({
|
|
725
|
-
id: "workbench.action.terminal.changeIconActiveTab" ,
|
|
726
|
-
title: terminalStrings.changeIcon,
|
|
727
|
-
f1: false,
|
|
728
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
729
|
-
TerminalContextKeys.processSupported,
|
|
730
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
731
|
-
)), TerminalContextKeys.tabsSingularSelection)),
|
|
732
|
-
run: (c, accessor) => getSelectedInstances(accessor)?.[0].changeIcon()
|
|
733
|
-
});
|
|
734
|
-
registerTerminalAction({
|
|
735
|
-
id: "workbench.action.terminal.changeColor" ,
|
|
736
|
-
title: terminalStrings.changeColor,
|
|
737
|
-
precondition: ( ContextKeyExpr.or(
|
|
738
|
-
TerminalContextKeys.processSupported,
|
|
739
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
740
|
-
)),
|
|
741
|
-
run: (c, _, args) => getResourceOrActiveInstance(c, args)?.changeColor()
|
|
742
|
-
});
|
|
743
|
-
registerTerminalAction({
|
|
744
|
-
id: "workbench.action.terminal.changeColorPanel" ,
|
|
745
|
-
title: terminalStrings.changeColor,
|
|
746
|
-
f1: false,
|
|
747
|
-
precondition: ( ContextKeyExpr.or(
|
|
748
|
-
TerminalContextKeys.processSupported,
|
|
749
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
750
|
-
)),
|
|
751
|
-
run: (c) => c.groupService.activeInstance?.changeColor()
|
|
752
|
-
});
|
|
753
|
-
registerTerminalAction({
|
|
754
|
-
id: "workbench.action.terminal.changeColorActiveTab" ,
|
|
755
|
-
title: terminalStrings.changeColor,
|
|
756
|
-
f1: false,
|
|
757
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
758
|
-
TerminalContextKeys.processSupported,
|
|
759
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
760
|
-
)), TerminalContextKeys.tabsSingularSelection)),
|
|
761
|
-
run: (c, accessor) => getSelectedInstances(accessor)?.[0].changeColor()
|
|
762
|
-
});
|
|
763
|
-
registerTerminalAction({
|
|
764
|
-
id: "workbench.action.terminal.rename" ,
|
|
765
|
-
title: terminalStrings.rename,
|
|
766
|
-
precondition: ( ContextKeyExpr.or(
|
|
767
|
-
TerminalContextKeys.processSupported,
|
|
768
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
769
|
-
)),
|
|
770
|
-
run: (c, accessor, args) => renameWithQuickPick(c, accessor, args)
|
|
771
|
-
});
|
|
772
|
-
registerTerminalAction({
|
|
773
|
-
id: "workbench.action.terminal.renamePanel" ,
|
|
774
|
-
title: terminalStrings.rename,
|
|
775
|
-
f1: false,
|
|
776
|
-
precondition: ( ContextKeyExpr.or(
|
|
777
|
-
TerminalContextKeys.processSupported,
|
|
778
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
779
|
-
)),
|
|
780
|
-
run: (c, accessor) => renameWithQuickPick(c, accessor)
|
|
781
|
-
});
|
|
782
|
-
registerTerminalAction({
|
|
783
|
-
id: "workbench.action.terminal.renameActiveTab" ,
|
|
784
|
-
title: terminalStrings.rename,
|
|
785
|
-
f1: false,
|
|
786
|
-
keybinding: {
|
|
787
|
-
primary: 60 ,
|
|
788
|
-
mac: {
|
|
789
|
-
primary: 3
|
|
790
|
-
},
|
|
791
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.tabsFocus)),
|
|
792
|
-
weight: 200
|
|
793
|
-
},
|
|
794
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
795
|
-
TerminalContextKeys.processSupported,
|
|
796
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
797
|
-
)), TerminalContextKeys.tabsSingularSelection)),
|
|
798
|
-
run: async (c, accessor) => {
|
|
799
|
-
const notificationService = accessor.get(INotificationService);
|
|
800
|
-
const instance = getSelectedInstances(accessor)?.[0];
|
|
801
|
-
if (!instance) {
|
|
802
|
-
return;
|
|
803
|
-
}
|
|
804
|
-
c.service.setEditingTerminal(instance);
|
|
805
|
-
c.service.setEditable(instance, {
|
|
806
|
-
validationMessage: value => validateTerminalName(value),
|
|
807
|
-
onFinish: async (value, success) => {
|
|
808
|
-
c.service.setEditable(instance, null);
|
|
809
|
-
c.service.setEditingTerminal(undefined);
|
|
810
|
-
if (success) {
|
|
811
|
-
try {
|
|
812
|
-
await instance.rename(value);
|
|
813
|
-
}
|
|
814
|
-
catch (e) {
|
|
815
|
-
notificationService.error(e);
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
});
|
|
822
|
-
registerActiveInstanceAction({
|
|
823
|
-
id: "workbench.action.terminal.detachSession" ,
|
|
824
|
-
title: { value: ( localize('workbench.action.terminal.detachSession', "Detach Session")), original: 'Detach Session' },
|
|
825
|
-
run: (activeInstance) => activeInstance.detachProcessAndDispose(TerminalExitReason.User)
|
|
826
|
-
});
|
|
827
|
-
registerTerminalAction({
|
|
828
|
-
id: "workbench.action.terminal.attachToSession" ,
|
|
829
|
-
title: { value: ( localize('workbench.action.terminal.attachToSession', "Attach to Session")), original: 'Attach to Session' },
|
|
830
|
-
run: async (c, accessor) => {
|
|
831
|
-
const quickInputService = accessor.get(IQuickInputService);
|
|
832
|
-
const labelService = accessor.get(ILabelService);
|
|
833
|
-
const remoteAgentService = accessor.get(IRemoteAgentService);
|
|
834
|
-
const notificationService = accessor.get(INotificationService);
|
|
835
|
-
const remoteAuthority = remoteAgentService.getConnection()?.remoteAuthority ?? undefined;
|
|
836
|
-
const backend = await accessor.get(ITerminalInstanceService).getBackend(remoteAuthority);
|
|
837
|
-
if (!backend) {
|
|
838
|
-
throw new Error(`No backend registered for remote authority '${remoteAuthority}'`);
|
|
839
|
-
}
|
|
840
|
-
const terms = await backend.listProcesses();
|
|
841
|
-
backend.reduceConnectionGraceTime();
|
|
842
|
-
const unattachedTerms = terms.filter(term => !c.service.isAttachedToTerminal(term));
|
|
843
|
-
const items = ( unattachedTerms.map(term => {
|
|
844
|
-
const cwdLabel = labelService.getUriLabel(URI.file(term.cwd));
|
|
845
|
-
return {
|
|
846
|
-
label: term.title,
|
|
847
|
-
detail: term.workspaceName ? `${term.workspaceName} \u2E31 ${cwdLabel}` : cwdLabel,
|
|
848
|
-
description: term.pid ? String(term.pid) : '',
|
|
849
|
-
term
|
|
850
|
-
};
|
|
851
|
-
}));
|
|
852
|
-
if (items.length === 0) {
|
|
853
|
-
notificationService.info(( localize('noUnattachedTerminals', 'There are no unattached terminals to attach to')));
|
|
854
|
-
return;
|
|
855
|
-
}
|
|
856
|
-
const selected = await quickInputService.pick(items, { canPickMany: false });
|
|
857
|
-
if (selected) {
|
|
858
|
-
const instance = await c.service.createTerminal({
|
|
859
|
-
config: { attachPersistentProcess: selected.term }
|
|
860
|
-
});
|
|
861
|
-
c.service.setActiveInstance(instance);
|
|
862
|
-
await focusActiveTerminal(instance, c);
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
});
|
|
866
|
-
registerTerminalAction({
|
|
867
|
-
id: "workbench.action.quickOpenTerm" ,
|
|
868
|
-
title: { value: ( localize('quickAccessTerminal', "Switch Active Terminal")), original: 'Switch Active Terminal' },
|
|
869
|
-
precondition: ( ContextKeyExpr.or(
|
|
870
|
-
TerminalContextKeys.processSupported,
|
|
871
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
872
|
-
)),
|
|
873
|
-
run: (c, accessor) => accessor.get(IQuickInputService).quickAccess.show(TerminalQuickAccessProvider.PREFIX)
|
|
874
|
-
});
|
|
875
|
-
registerActiveInstanceAction({
|
|
876
|
-
id: "workbench.action.terminal.scrollToPreviousCommand" ,
|
|
877
|
-
title: { value: ( localize(
|
|
878
|
-
'workbench.action.terminal.scrollToPreviousCommand',
|
|
879
|
-
"Scroll To Previous Command"
|
|
880
|
-
)), original: 'Scroll To Previous Command' },
|
|
881
|
-
keybinding: {
|
|
882
|
-
primary: 2048 | 16 ,
|
|
883
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focus, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()))),
|
|
884
|
-
weight: 200
|
|
885
|
-
},
|
|
886
|
-
precondition: ( ContextKeyExpr.or(
|
|
887
|
-
TerminalContextKeys.processSupported,
|
|
888
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
889
|
-
)),
|
|
890
|
-
run: (activeInstance) => activeInstance.xterm?.markTracker.scrollToPreviousMark(undefined, undefined, ( activeInstance.capabilities.has(2 )))
|
|
891
|
-
});
|
|
892
|
-
registerActiveInstanceAction({
|
|
893
|
-
id: "workbench.action.terminal.scrollToNextCommand" ,
|
|
894
|
-
title: { value: ( localize('workbench.action.terminal.scrollToNextCommand', "Scroll To Next Command")), original: 'Scroll To Next Command' },
|
|
895
|
-
keybinding: {
|
|
896
|
-
primary: 2048 | 18 ,
|
|
897
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focus, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()))),
|
|
898
|
-
weight: 200
|
|
899
|
-
},
|
|
900
|
-
precondition: ( ContextKeyExpr.or(
|
|
901
|
-
TerminalContextKeys.processSupported,
|
|
902
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
903
|
-
)),
|
|
904
|
-
run: (activeInstance) => {
|
|
905
|
-
activeInstance.xterm?.markTracker.scrollToNextMark();
|
|
906
|
-
activeInstance.focus();
|
|
907
|
-
}
|
|
908
|
-
});
|
|
909
|
-
registerActiveInstanceAction({
|
|
910
|
-
id: "workbench.action.terminal.selectToPreviousCommand" ,
|
|
911
|
-
title: { value: ( localize(
|
|
912
|
-
'workbench.action.terminal.selectToPreviousCommand',
|
|
913
|
-
"Select To Previous Command"
|
|
914
|
-
)), original: 'Select To Previous Command' },
|
|
915
|
-
keybinding: {
|
|
916
|
-
primary: 2048 | 1024 | 16 ,
|
|
917
|
-
when: TerminalContextKeys.focus,
|
|
918
|
-
weight: 200
|
|
919
|
-
},
|
|
920
|
-
precondition: ( ContextKeyExpr.or(
|
|
921
|
-
TerminalContextKeys.processSupported,
|
|
922
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
923
|
-
)),
|
|
924
|
-
run: (activeInstance) => {
|
|
925
|
-
activeInstance.xterm?.markTracker.selectToPreviousMark();
|
|
926
|
-
activeInstance.focus();
|
|
927
|
-
}
|
|
928
|
-
});
|
|
929
|
-
registerActiveInstanceAction({
|
|
930
|
-
id: "workbench.action.terminal.selectToNextCommand" ,
|
|
931
|
-
title: { value: ( localize('workbench.action.terminal.selectToNextCommand', "Select To Next Command")), original: 'Select To Next Command' },
|
|
932
|
-
keybinding: {
|
|
933
|
-
primary: 2048 | 1024 | 18 ,
|
|
934
|
-
when: TerminalContextKeys.focus,
|
|
935
|
-
weight: 200
|
|
936
|
-
},
|
|
937
|
-
precondition: ( ContextKeyExpr.or(
|
|
938
|
-
TerminalContextKeys.processSupported,
|
|
939
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
940
|
-
)),
|
|
941
|
-
run: (activeInstance) => {
|
|
942
|
-
activeInstance.xterm?.markTracker.selectToNextMark();
|
|
943
|
-
activeInstance.focus();
|
|
944
|
-
}
|
|
945
|
-
});
|
|
946
|
-
registerActiveXtermAction({
|
|
947
|
-
id: "workbench.action.terminal.selectToPreviousLine" ,
|
|
948
|
-
title: { value: ( localize(
|
|
949
|
-
'workbench.action.terminal.selectToPreviousLine',
|
|
950
|
-
"Select To Previous Line"
|
|
951
|
-
)), original: 'Select To Previous Line' },
|
|
952
|
-
precondition: ( ContextKeyExpr.or(
|
|
953
|
-
TerminalContextKeys.processSupported,
|
|
954
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
955
|
-
)),
|
|
956
|
-
run: async (xterm, _, instance) => {
|
|
957
|
-
xterm.markTracker.selectToPreviousLine();
|
|
958
|
-
(instance || xterm).focus();
|
|
959
|
-
}
|
|
960
|
-
});
|
|
961
|
-
registerActiveXtermAction({
|
|
962
|
-
id: "workbench.action.terminal.selectToNextLine" ,
|
|
963
|
-
title: { value: ( localize('workbench.action.terminal.selectToNextLine', "Select To Next Line")), original: 'Select To Next Line' },
|
|
964
|
-
precondition: ( ContextKeyExpr.or(
|
|
965
|
-
TerminalContextKeys.processSupported,
|
|
966
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
967
|
-
)),
|
|
968
|
-
run: async (xterm, _, instance) => {
|
|
969
|
-
xterm.markTracker.selectToNextLine();
|
|
970
|
-
(instance || xterm).focus();
|
|
971
|
-
}
|
|
972
|
-
});
|
|
973
|
-
registerTerminalAction({
|
|
974
|
-
id: "workbench.action.terminal.sendSequence" ,
|
|
975
|
-
title: terminalStrings.sendSequence,
|
|
976
|
-
f1: false,
|
|
977
|
-
description: {
|
|
978
|
-
description: terminalStrings.sendSequence.value,
|
|
979
|
-
args: [{
|
|
980
|
-
name: 'args',
|
|
981
|
-
schema: {
|
|
982
|
-
type: 'object',
|
|
983
|
-
required: ['text'],
|
|
984
|
-
properties: {
|
|
985
|
-
text: {
|
|
986
|
-
description: ( localize('sendSequence', "The sequence of text to send to the terminal")),
|
|
987
|
-
type: 'string'
|
|
988
|
-
}
|
|
989
|
-
},
|
|
990
|
-
}
|
|
991
|
-
}]
|
|
992
|
-
},
|
|
993
|
-
run: (c, accessor, args) => terminalSendSequenceCommand(accessor, args)
|
|
994
|
-
});
|
|
995
|
-
registerTerminalAction({
|
|
996
|
-
id: "workbench.action.terminal.newWithCwd" ,
|
|
997
|
-
title: terminalStrings.newWithCwd,
|
|
998
|
-
description: {
|
|
999
|
-
description: terminalStrings.newWithCwd.value,
|
|
1000
|
-
args: [{
|
|
1001
|
-
name: 'args',
|
|
1002
|
-
schema: {
|
|
1003
|
-
type: 'object',
|
|
1004
|
-
required: ['cwd'],
|
|
1005
|
-
properties: {
|
|
1006
|
-
cwd: {
|
|
1007
|
-
description: ( localize(
|
|
1008
|
-
'workbench.action.terminal.newWithCwd.cwd',
|
|
1009
|
-
"The directory to start the terminal at"
|
|
1010
|
-
)),
|
|
1011
|
-
type: 'string'
|
|
1012
|
-
}
|
|
1013
|
-
},
|
|
1014
|
-
}
|
|
1015
|
-
}]
|
|
1016
|
-
},
|
|
1017
|
-
run: async (c, _, args) => {
|
|
1018
|
-
const cwd = isObject(args) && 'cwd' in args ? toOptionalString(args.cwd) : undefined;
|
|
1019
|
-
const instance = await c.service.createTerminal({ cwd });
|
|
1020
|
-
if (!instance) {
|
|
1021
|
-
return;
|
|
1022
|
-
}
|
|
1023
|
-
c.service.setActiveInstance(instance);
|
|
1024
|
-
await focusActiveTerminal(instance, c);
|
|
1025
|
-
}
|
|
1026
|
-
});
|
|
1027
|
-
registerActiveInstanceAction({
|
|
1028
|
-
id: "workbench.action.terminal.renameWithArg" ,
|
|
1029
|
-
title: terminalStrings.renameWithArgs,
|
|
1030
|
-
description: {
|
|
1031
|
-
description: terminalStrings.renameWithArgs.value,
|
|
1032
|
-
args: [{
|
|
1033
|
-
name: 'args',
|
|
1034
|
-
schema: {
|
|
1035
|
-
type: 'object',
|
|
1036
|
-
required: ['name'],
|
|
1037
|
-
properties: {
|
|
1038
|
-
name: {
|
|
1039
|
-
description: ( localize(
|
|
1040
|
-
'workbench.action.terminal.renameWithArg.name',
|
|
1041
|
-
"The new name for the terminal"
|
|
1042
|
-
)),
|
|
1043
|
-
type: 'string',
|
|
1044
|
-
minLength: 1
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
}]
|
|
1049
|
-
},
|
|
1050
|
-
precondition: ( ContextKeyExpr.or(
|
|
1051
|
-
TerminalContextKeys.processSupported,
|
|
1052
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1053
|
-
)),
|
|
1054
|
-
run: async (activeInstance, c, accessor, args) => {
|
|
1055
|
-
const notificationService = accessor.get(INotificationService);
|
|
1056
|
-
const name = isObject(args) && 'name' in args ? toOptionalString(args.name) : undefined;
|
|
1057
|
-
if (!name) {
|
|
1058
|
-
notificationService.warn(( localize(
|
|
1059
|
-
'workbench.action.terminal.renameWithArg.noName',
|
|
1060
|
-
"No name argument provided"
|
|
1061
|
-
)));
|
|
1062
|
-
return;
|
|
1063
|
-
}
|
|
1064
|
-
activeInstance.rename(name);
|
|
1065
|
-
}
|
|
1066
|
-
});
|
|
1067
|
-
registerActiveInstanceAction({
|
|
1068
|
-
id: "workbench.action.terminal.relaunch" ,
|
|
1069
|
-
title: { value: ( localize('workbench.action.terminal.relaunch', "Relaunch Active Terminal")), original: 'Relaunch Active Terminal' },
|
|
1070
|
-
run: (activeInstance) => activeInstance.relaunch()
|
|
1071
|
-
});
|
|
1072
|
-
registerTerminalAction({
|
|
1073
|
-
id: "workbench.action.terminal.split" ,
|
|
1074
|
-
title: terminalStrings.split,
|
|
1075
|
-
precondition: ( ContextKeyExpr.or(
|
|
1076
|
-
TerminalContextKeys.processSupported,
|
|
1077
|
-
TerminalContextKeys.webExtensionContributedProfile
|
|
1078
|
-
)),
|
|
1079
|
-
keybinding: {
|
|
1080
|
-
primary: 2048 | 1024 | 26 ,
|
|
1081
|
-
weight: 200 ,
|
|
1082
|
-
mac: {
|
|
1083
|
-
primary: 2048 | 93 ,
|
|
1084
|
-
secondary: [256 | 1024 | 26 ]
|
|
1085
|
-
},
|
|
1086
|
-
when: TerminalContextKeys.focus
|
|
1087
|
-
},
|
|
1088
|
-
icon: Codicon.splitHorizontal,
|
|
1089
|
-
run: async (c, accessor, args) => {
|
|
1090
|
-
const optionsOrProfile = isObject(args) ? args : undefined;
|
|
1091
|
-
const commandService = accessor.get(ICommandService);
|
|
1092
|
-
const workspaceContextService = accessor.get(IWorkspaceContextService);
|
|
1093
|
-
const options = convertOptionsOrProfileToOptions(optionsOrProfile);
|
|
1094
|
-
const activeInstance = (await c.service.getInstanceHost(options?.location)).activeInstance;
|
|
1095
|
-
if (!activeInstance) {
|
|
1096
|
-
return;
|
|
1097
|
-
}
|
|
1098
|
-
const cwd = await getCwdForSplit(c.service.configHelper, activeInstance, workspaceContextService.getWorkspace().folders, commandService);
|
|
1099
|
-
if (cwd === undefined) {
|
|
1100
|
-
return;
|
|
1101
|
-
}
|
|
1102
|
-
const instance = await c.service.createTerminal({ location: { parentTerminal: activeInstance }, config: options?.config, cwd });
|
|
1103
|
-
await focusActiveTerminal(instance, c);
|
|
1104
|
-
}
|
|
1105
|
-
});
|
|
1106
|
-
registerTerminalAction({
|
|
1107
|
-
id: "workbench.action.terminal.splitActiveTab" ,
|
|
1108
|
-
title: terminalStrings.split,
|
|
1109
|
-
f1: false,
|
|
1110
|
-
keybinding: {
|
|
1111
|
-
primary: 2048 | 1024 | 26 ,
|
|
1112
|
-
mac: {
|
|
1113
|
-
primary: 2048 | 93 ,
|
|
1114
|
-
secondary: [256 | 1024 | 26 ]
|
|
1115
|
-
},
|
|
1116
|
-
weight: 200 ,
|
|
1117
|
-
when: TerminalContextKeys.tabsFocus
|
|
1118
|
-
},
|
|
1119
|
-
run: async (c, accessor) => {
|
|
1120
|
-
const instances = getSelectedInstances(accessor);
|
|
1121
|
-
if (instances) {
|
|
1122
|
-
const promises = [];
|
|
1123
|
-
for (const t of instances) {
|
|
1124
|
-
promises.push((async () => {
|
|
1125
|
-
await c.service.createTerminal({ location: { parentTerminal: t } });
|
|
1126
|
-
await c.groupService.showPanel(true);
|
|
1127
|
-
})());
|
|
1128
|
-
}
|
|
1129
|
-
await Promise.all(promises);
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
});
|
|
1133
|
-
registerActiveInstanceAction({
|
|
1134
|
-
id: "workbench.action.terminal.unsplit" ,
|
|
1135
|
-
title: terminalStrings.unsplit,
|
|
1136
|
-
precondition: ( ContextKeyExpr.or(
|
|
1137
|
-
TerminalContextKeys.processSupported,
|
|
1138
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1139
|
-
)),
|
|
1140
|
-
run: (activeInstance, c) => c.groupService.unsplitInstance(activeInstance)
|
|
1141
|
-
});
|
|
1142
|
-
registerTerminalAction({
|
|
1143
|
-
id: "workbench.action.terminal.unsplitActiveTab" ,
|
|
1144
|
-
title: terminalStrings.unsplit,
|
|
1145
|
-
f1: false,
|
|
1146
|
-
precondition: ( ContextKeyExpr.or(
|
|
1147
|
-
TerminalContextKeys.processSupported,
|
|
1148
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1149
|
-
)),
|
|
1150
|
-
run: async (c, accessor) => {
|
|
1151
|
-
const instances = getSelectedInstances(accessor);
|
|
1152
|
-
if (instances?.length === 1) {
|
|
1153
|
-
const group = c.groupService.getGroupForInstance(instances[0]);
|
|
1154
|
-
if (group && group?.terminalInstances.length > 1) {
|
|
1155
|
-
c.groupService.unsplitInstance(instances[0]);
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
});
|
|
1160
|
-
registerTerminalAction({
|
|
1161
|
-
id: "workbench.action.terminal.joinActiveTab" ,
|
|
1162
|
-
title: { value: ( localize('workbench.action.terminal.joinInstance', "Join Terminals")), original: 'Join Terminals' },
|
|
1163
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1164
|
-
TerminalContextKeys.processSupported,
|
|
1165
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1166
|
-
)), ( TerminalContextKeys.tabsSingularSelection.toNegated()))),
|
|
1167
|
-
run: async (c, accessor) => {
|
|
1168
|
-
const instances = getSelectedInstances(accessor);
|
|
1169
|
-
if (instances && instances.length > 1) {
|
|
1170
|
-
c.groupService.joinInstances(instances);
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
});
|
|
1174
|
-
registerTerminalAction({
|
|
1175
|
-
id: "workbench.action.terminal.join" ,
|
|
1176
|
-
title: { value: ( localize('workbench.action.terminal.join', "Join Terminals")), original: 'Join Terminals' },
|
|
1177
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1178
|
-
TerminalContextKeys.processSupported,
|
|
1179
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1180
|
-
)))),
|
|
1181
|
-
run: async (c, accessor) => {
|
|
1182
|
-
const themeService = accessor.get(IThemeService);
|
|
1183
|
-
const notificationService = accessor.get(INotificationService);
|
|
1184
|
-
const quickInputService = accessor.get(IQuickInputService);
|
|
1185
|
-
const picks = [];
|
|
1186
|
-
if (c.groupService.instances.length <= 1) {
|
|
1187
|
-
notificationService.warn(( localize(
|
|
1188
|
-
'workbench.action.terminal.join.insufficientTerminals',
|
|
1189
|
-
'Insufficient terminals for the join action'
|
|
1190
|
-
)));
|
|
1191
|
-
return;
|
|
1192
|
-
}
|
|
1193
|
-
const otherInstances = c.groupService.instances.filter(i => i.instanceId !== c.groupService.activeInstance?.instanceId);
|
|
1194
|
-
for (const terminal of otherInstances) {
|
|
1195
|
-
const group = c.groupService.getGroupForInstance(terminal);
|
|
1196
|
-
if (group?.terminalInstances.length === 1) {
|
|
1197
|
-
const iconId = getIconId(accessor, terminal);
|
|
1198
|
-
const label = `$(${iconId}): ${terminal.title}`;
|
|
1199
|
-
const iconClasses = [];
|
|
1200
|
-
const colorClass = getColorClass(terminal);
|
|
1201
|
-
if (colorClass) {
|
|
1202
|
-
iconClasses.push(colorClass);
|
|
1203
|
-
}
|
|
1204
|
-
const uriClasses = getUriClasses(terminal, themeService.getColorTheme().type);
|
|
1205
|
-
if (uriClasses) {
|
|
1206
|
-
iconClasses.push(...uriClasses);
|
|
1207
|
-
}
|
|
1208
|
-
picks.push({
|
|
1209
|
-
terminal,
|
|
1210
|
-
label,
|
|
1211
|
-
iconClasses
|
|
1212
|
-
});
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
if (picks.length === 0) {
|
|
1216
|
-
notificationService.warn(( localize(
|
|
1217
|
-
'workbench.action.terminal.join.onlySplits',
|
|
1218
|
-
'All terminals are joined already'
|
|
1219
|
-
)));
|
|
1220
|
-
return;
|
|
1221
|
-
}
|
|
1222
|
-
const result = await quickInputService.pick(picks, {});
|
|
1223
|
-
if (result) {
|
|
1224
|
-
c.groupService.joinInstances([result.terminal, c.groupService.activeInstance]);
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
});
|
|
1228
|
-
registerActiveInstanceAction({
|
|
1229
|
-
id: "workbench.action.terminal.splitInActiveWorkspace" ,
|
|
1230
|
-
title: { value: ( localize(
|
|
1231
|
-
'workbench.action.terminal.splitInActiveWorkspace',
|
|
1232
|
-
"Split Terminal (In Active Workspace)"
|
|
1233
|
-
)), original: 'Split Terminal (In Active Workspace)' },
|
|
1234
|
-
run: async (instance, c) => {
|
|
1235
|
-
const newInstance = await c.service.createTerminal({ location: { parentTerminal: instance } });
|
|
1236
|
-
if (newInstance?.target !== TerminalLocation.Editor) {
|
|
1237
|
-
await c.groupService.showPanel(true);
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
});
|
|
1241
|
-
registerActiveXtermAction({
|
|
1242
|
-
id: "workbench.action.terminal.selectAll" ,
|
|
1243
|
-
title: { value: ( localize('workbench.action.terminal.selectAll', "Select All")), original: 'Select All' },
|
|
1244
|
-
precondition: ( ContextKeyExpr.or(
|
|
1245
|
-
TerminalContextKeys.processSupported,
|
|
1246
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1247
|
-
)),
|
|
1248
|
-
keybinding: [{
|
|
1249
|
-
primary: 0,
|
|
1250
|
-
mac: { primary: 2048 | 31 },
|
|
1251
|
-
weight: 200 ,
|
|
1252
|
-
when: TerminalContextKeys.focusInAny
|
|
1253
|
-
}],
|
|
1254
|
-
run: (xterm) => xterm.selectAll()
|
|
1255
|
-
});
|
|
1256
|
-
registerTerminalAction({
|
|
1257
|
-
id: "workbench.action.terminal.new" ,
|
|
1258
|
-
title: { value: ( localize('workbench.action.terminal.new', "Create New Terminal")), original: 'Create New Terminal' },
|
|
1259
|
-
precondition: ( ContextKeyExpr.or(
|
|
1260
|
-
TerminalContextKeys.processSupported,
|
|
1261
|
-
TerminalContextKeys.webExtensionContributedProfile
|
|
1262
|
-
)),
|
|
1263
|
-
icon: newTerminalIcon,
|
|
1264
|
-
keybinding: {
|
|
1265
|
-
primary: 2048 | 1024 | 91 ,
|
|
1266
|
-
mac: { primary: 256 | 1024 | 91 },
|
|
1267
|
-
weight: 200
|
|
1268
|
-
},
|
|
1269
|
-
run: async (c, accessor, args) => {
|
|
1270
|
-
let eventOrOptions = isObject(args) ? args : undefined;
|
|
1271
|
-
const workspaceContextService = accessor.get(IWorkspaceContextService);
|
|
1272
|
-
const commandService = accessor.get(ICommandService);
|
|
1273
|
-
const folders = workspaceContextService.getWorkspace().folders;
|
|
1274
|
-
if (eventOrOptions && eventOrOptions instanceof MouseEvent && (eventOrOptions.altKey || eventOrOptions.ctrlKey)) {
|
|
1275
|
-
await c.service.createTerminal({ location: { splitActiveTerminal: true } });
|
|
1276
|
-
return;
|
|
1277
|
-
}
|
|
1278
|
-
if (c.service.isProcessSupportRegistered) {
|
|
1279
|
-
eventOrOptions = !eventOrOptions || eventOrOptions instanceof MouseEvent ? {} : eventOrOptions;
|
|
1280
|
-
let instance;
|
|
1281
|
-
if (folders.length <= 1) {
|
|
1282
|
-
instance = await c.service.createTerminal(eventOrOptions);
|
|
1283
|
-
}
|
|
1284
|
-
else {
|
|
1285
|
-
const cwd = (await pickTerminalCwd(accessor))?.cwd;
|
|
1286
|
-
if (!cwd) {
|
|
1287
|
-
return;
|
|
1288
|
-
}
|
|
1289
|
-
eventOrOptions.cwd = cwd;
|
|
1290
|
-
instance = await c.service.createTerminal(eventOrOptions);
|
|
1291
|
-
}
|
|
1292
|
-
c.service.setActiveInstance(instance);
|
|
1293
|
-
await focusActiveTerminal(instance, c);
|
|
1294
|
-
}
|
|
1295
|
-
else {
|
|
1296
|
-
if (c.profileService.contributedProfiles.length > 0) {
|
|
1297
|
-
commandService.executeCommand("workbench.action.terminal.newWithProfile" );
|
|
1298
|
-
}
|
|
1299
|
-
else {
|
|
1300
|
-
commandService.executeCommand("workbench.action.terminal.toggleTerminal" );
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
});
|
|
1305
|
-
async function killInstance(c, instance) {
|
|
1306
|
-
if (!instance) {
|
|
1307
|
-
return;
|
|
1308
|
-
}
|
|
1309
|
-
await c.service.safeDisposeTerminal(instance);
|
|
1310
|
-
if (c.groupService.instances.length > 0) {
|
|
1311
|
-
await c.groupService.showPanel(true);
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
registerTerminalAction({
|
|
1315
|
-
id: "workbench.action.terminal.kill" ,
|
|
1316
|
-
title: { value: ( localize('workbench.action.terminal.kill', "Kill the Active Terminal Instance")), original: 'Kill the Active Terminal Instance' },
|
|
1317
|
-
precondition: ( ContextKeyExpr.or(( ContextKeyExpr.or(
|
|
1318
|
-
TerminalContextKeys.processSupported,
|
|
1319
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1320
|
-
)), TerminalContextKeys.isOpen)),
|
|
1321
|
-
icon: killTerminalIcon,
|
|
1322
|
-
run: async (c) => killInstance(c, c.groupService.activeInstance)
|
|
1323
|
-
});
|
|
1324
|
-
registerTerminalAction({
|
|
1325
|
-
id: "workbench.action.terminal.killViewOrEditor" ,
|
|
1326
|
-
title: terminalStrings.kill,
|
|
1327
|
-
f1: false,
|
|
1328
|
-
precondition: ( ContextKeyExpr.or(( ContextKeyExpr.or(
|
|
1329
|
-
TerminalContextKeys.processSupported,
|
|
1330
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1331
|
-
)), TerminalContextKeys.isOpen)),
|
|
1332
|
-
run: async (c) => killInstance(c, c.service.activeInstance)
|
|
1333
|
-
});
|
|
1334
|
-
registerTerminalAction({
|
|
1335
|
-
id: "workbench.action.terminal.killAll" ,
|
|
1336
|
-
title: { value: ( localize('workbench.action.terminal.killAll', "Kill All Terminals")), original: 'Kill All Terminals' },
|
|
1337
|
-
precondition: ( ContextKeyExpr.or(( ContextKeyExpr.or(
|
|
1338
|
-
TerminalContextKeys.processSupported,
|
|
1339
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1340
|
-
)), TerminalContextKeys.isOpen)),
|
|
1341
|
-
icon: Codicon.trash,
|
|
1342
|
-
run: async (c) => {
|
|
1343
|
-
const disposePromises = [];
|
|
1344
|
-
for (const instance of c.service.instances) {
|
|
1345
|
-
disposePromises.push(c.service.safeDisposeTerminal(instance));
|
|
1346
|
-
}
|
|
1347
|
-
await Promise.all(disposePromises);
|
|
1348
|
-
}
|
|
1349
|
-
});
|
|
1350
|
-
registerTerminalAction({
|
|
1351
|
-
id: "workbench.action.terminal.killEditor" ,
|
|
1352
|
-
title: { value: ( localize(
|
|
1353
|
-
'workbench.action.terminal.killEditor',
|
|
1354
|
-
"Kill the Active Terminal in Editor Area"
|
|
1355
|
-
)), original: 'Kill the Active Terminal in Editor Area' },
|
|
1356
|
-
precondition: ( ContextKeyExpr.or(
|
|
1357
|
-
TerminalContextKeys.processSupported,
|
|
1358
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1359
|
-
)),
|
|
1360
|
-
keybinding: {
|
|
1361
|
-
primary: 2048 | 53 ,
|
|
1362
|
-
win: { primary: 2048 | 62 , secondary: [2048 | 53 ] },
|
|
1363
|
-
weight: 200 ,
|
|
1364
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focus, ( ResourceContextKey.Scheme.isEqualTo(Schemas.vscodeTerminal)), TerminalContextKeys.editorFocus))
|
|
1365
|
-
},
|
|
1366
|
-
run: (c, accessor) => accessor.get(ICommandService).executeCommand(CLOSE_EDITOR_COMMAND_ID)
|
|
1367
|
-
});
|
|
1368
|
-
registerTerminalAction({
|
|
1369
|
-
id: "workbench.action.terminal.killActiveTab" ,
|
|
1370
|
-
title: terminalStrings.kill,
|
|
1371
|
-
f1: false,
|
|
1372
|
-
precondition: ( ContextKeyExpr.or(( ContextKeyExpr.or(
|
|
1373
|
-
TerminalContextKeys.processSupported,
|
|
1374
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1375
|
-
)), TerminalContextKeys.isOpen)),
|
|
1376
|
-
keybinding: {
|
|
1377
|
-
primary: 20 ,
|
|
1378
|
-
mac: {
|
|
1379
|
-
primary: 2048 | 1 ,
|
|
1380
|
-
secondary: [20 ]
|
|
1381
|
-
},
|
|
1382
|
-
weight: 200 ,
|
|
1383
|
-
when: TerminalContextKeys.tabsFocus
|
|
1384
|
-
},
|
|
1385
|
-
run: async (c, accessor) => {
|
|
1386
|
-
const selectedInstances = getSelectedInstances(accessor);
|
|
1387
|
-
if (!selectedInstances) {
|
|
1388
|
-
return;
|
|
1389
|
-
}
|
|
1390
|
-
const listService = accessor.get(IListService);
|
|
1391
|
-
const disposePromises = [];
|
|
1392
|
-
for (const instance of selectedInstances) {
|
|
1393
|
-
disposePromises.push(c.service.safeDisposeTerminal(instance));
|
|
1394
|
-
}
|
|
1395
|
-
await Promise.all(disposePromises);
|
|
1396
|
-
if (c.service.instances.length > 0) {
|
|
1397
|
-
c.groupService.focusTabs();
|
|
1398
|
-
listService.lastFocusedList?.focusNext();
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
});
|
|
1402
|
-
registerTerminalAction({
|
|
1403
|
-
id: "workbench.action.terminal.focusHover" ,
|
|
1404
|
-
title: terminalStrings.focusHover,
|
|
1405
|
-
precondition: ( ContextKeyExpr.or(( ContextKeyExpr.or(
|
|
1406
|
-
TerminalContextKeys.processSupported,
|
|
1407
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1408
|
-
)), TerminalContextKeys.isOpen)),
|
|
1409
|
-
keybinding: {
|
|
1410
|
-
primary: KeyChord(2048 | 41 , 2048 | 39 ),
|
|
1411
|
-
weight: 200 ,
|
|
1412
|
-
when: ( ContextKeyExpr.or(TerminalContextKeys.tabsFocus, TerminalContextKeys.focus))
|
|
1413
|
-
},
|
|
1414
|
-
run: (c) => c.groupService.focusHover()
|
|
1415
|
-
});
|
|
1416
|
-
registerActiveInstanceAction({
|
|
1417
|
-
id: "workbench.action.terminal.clear" ,
|
|
1418
|
-
title: { value: ( localize('workbench.action.terminal.clear', "Clear")), original: 'Clear' },
|
|
1419
|
-
precondition: ( ContextKeyExpr.or(
|
|
1420
|
-
TerminalContextKeys.processSupported,
|
|
1421
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1422
|
-
)),
|
|
1423
|
-
keybinding: [{
|
|
1424
|
-
primary: 0,
|
|
1425
|
-
mac: { primary: 2048 | 41 },
|
|
1426
|
-
weight: 200 + 1,
|
|
1427
|
-
when: ( ContextKeyExpr.and(TerminalContextKeys.focus, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()))),
|
|
1428
|
-
}],
|
|
1429
|
-
run: (activeInstance) => activeInstance.clearBuffer()
|
|
1430
|
-
});
|
|
1431
|
-
registerTerminalAction({
|
|
1432
|
-
id: "workbench.action.terminal.selectDefaultShell" ,
|
|
1433
|
-
title: { value: ( localize('workbench.action.terminal.selectDefaultShell', "Select Default Profile")), original: 'Select Default Profile' },
|
|
1434
|
-
run: (c) => c.service.showProfileQuickPick('setDefault')
|
|
1435
|
-
});
|
|
1436
|
-
registerTerminalAction({
|
|
1437
|
-
id: "workbench.action.terminal.openSettings" ,
|
|
1438
|
-
title: { value: ( localize('workbench.action.terminal.openSettings', "Configure Terminal Settings")), original: 'Configure Terminal Settings' },
|
|
1439
|
-
precondition: ( ContextKeyExpr.or(
|
|
1440
|
-
TerminalContextKeys.processSupported,
|
|
1441
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1442
|
-
)),
|
|
1443
|
-
run: (c, accessor) => accessor.get(IPreferencesService).openSettings({ jsonEditor: false, query: '@feature:terminal' })
|
|
1444
|
-
});
|
|
1445
|
-
registerActiveInstanceAction({
|
|
1446
|
-
id: "workbench.action.terminal.setDimensions" ,
|
|
1447
|
-
title: { value: ( localize('workbench.action.terminal.setFixedDimensions', "Set Fixed Dimensions")), original: 'Set Fixed Dimensions' },
|
|
1448
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1449
|
-
TerminalContextKeys.processSupported,
|
|
1450
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1451
|
-
)), TerminalContextKeys.isOpen)),
|
|
1452
|
-
run: (activeInstance) => activeInstance.setFixedDimensions()
|
|
1453
|
-
});
|
|
1454
|
-
registerActiveInstanceAction({
|
|
1455
|
-
id: "workbench.action.terminal.sizeToContentWidth" ,
|
|
1456
|
-
title: { value: ( localize(
|
|
1457
|
-
'workbench.action.terminal.sizeToContentWidth',
|
|
1458
|
-
"Toggle Size to Content Width"
|
|
1459
|
-
)), original: 'Toggle Size to Content Width' },
|
|
1460
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1461
|
-
TerminalContextKeys.processSupported,
|
|
1462
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1463
|
-
)), TerminalContextKeys.isOpen)),
|
|
1464
|
-
keybinding: {
|
|
1465
|
-
primary: 512 | 56 ,
|
|
1466
|
-
weight: 200 ,
|
|
1467
|
-
when: TerminalContextKeys.focus
|
|
1468
|
-
},
|
|
1469
|
-
run: (instancactiveInstance) => instancactiveInstance.toggleSizeToContentWidth()
|
|
1470
|
-
});
|
|
1471
|
-
registerTerminalAction({
|
|
1472
|
-
id: "workbench.action.terminal.sizeToContentWidthActiveTab" ,
|
|
1473
|
-
title: terminalStrings.toggleSizeToContentWidth,
|
|
1474
|
-
f1: false,
|
|
1475
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1476
|
-
TerminalContextKeys.processSupported,
|
|
1477
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1478
|
-
)), TerminalContextKeys.focus)),
|
|
1479
|
-
run: (c, accessor) => getSelectedInstances(accessor)?.[0].toggleSizeToContentWidth()
|
|
1480
|
-
});
|
|
1481
|
-
registerTerminalAction({
|
|
1482
|
-
id: "workbench.action.terminal.clearPreviousSessionHistory" ,
|
|
1483
|
-
title: { value: ( localize(
|
|
1484
|
-
'workbench.action.terminal.clearPreviousSessionHistory',
|
|
1485
|
-
"Clear Previous Session History"
|
|
1486
|
-
)), original: 'Clear Previous Session History' },
|
|
1487
|
-
precondition: ( ContextKeyExpr.or(
|
|
1488
|
-
TerminalContextKeys.processSupported,
|
|
1489
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1490
|
-
)),
|
|
1491
|
-
run: async (c, accessor) => {
|
|
1492
|
-
getCommandHistory(accessor).clear();
|
|
1493
|
-
clearShellFileHistory();
|
|
1494
|
-
}
|
|
1495
|
-
});
|
|
1496
|
-
registerActiveInstanceAction({
|
|
1497
|
-
id: "workbench.action.terminal.selectPrevSuggestion" ,
|
|
1498
|
-
title: { value: ( localize(
|
|
1499
|
-
'workbench.action.terminal.selectPrevSuggestion',
|
|
1500
|
-
"Select the Previous Suggestion"
|
|
1501
|
-
)), original: 'Select the Previous Suggestion' },
|
|
1502
|
-
f1: false,
|
|
1503
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1504
|
-
TerminalContextKeys.processSupported,
|
|
1505
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1506
|
-
)), TerminalContextKeys.focus, TerminalContextKeys.isOpen, TerminalContextKeys.suggestWidgetVisible)),
|
|
1507
|
-
keybinding: {
|
|
1508
|
-
primary: 16 ,
|
|
1509
|
-
weight: 200 + 1
|
|
1510
|
-
},
|
|
1511
|
-
run: (activeInstance) => activeInstance.selectPreviousSuggestion()
|
|
1512
|
-
});
|
|
1513
|
-
registerActiveInstanceAction({
|
|
1514
|
-
id: "workbench.action.terminal.selectPrevPageSuggestion" ,
|
|
1515
|
-
title: { value: ( localize(
|
|
1516
|
-
'workbench.action.terminal.selectPrevPageSuggestion',
|
|
1517
|
-
"Select the Previous Page Suggestion"
|
|
1518
|
-
)), original: 'Select the Previous Page Suggestion' },
|
|
1519
|
-
f1: false,
|
|
1520
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1521
|
-
TerminalContextKeys.processSupported,
|
|
1522
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1523
|
-
)), TerminalContextKeys.focus, TerminalContextKeys.isOpen, TerminalContextKeys.suggestWidgetVisible)),
|
|
1524
|
-
keybinding: {
|
|
1525
|
-
primary: 11 ,
|
|
1526
|
-
weight: 200 + 1
|
|
1527
|
-
},
|
|
1528
|
-
run: (activeInstance) => activeInstance.selectPreviousPageSuggestion()
|
|
1529
|
-
});
|
|
1530
|
-
registerActiveInstanceAction({
|
|
1531
|
-
id: "workbench.action.terminal.selectNextSuggestion" ,
|
|
1532
|
-
title: { value: ( localize(
|
|
1533
|
-
'workbench.action.terminal.selectNextSuggestion',
|
|
1534
|
-
"Select the Next Suggestion"
|
|
1535
|
-
)), original: 'Select the Next Suggestion' },
|
|
1536
|
-
f1: false,
|
|
1537
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1538
|
-
TerminalContextKeys.processSupported,
|
|
1539
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1540
|
-
)), TerminalContextKeys.focus, TerminalContextKeys.isOpen, TerminalContextKeys.suggestWidgetVisible)),
|
|
1541
|
-
keybinding: {
|
|
1542
|
-
primary: 18 ,
|
|
1543
|
-
weight: 200 + 1
|
|
1544
|
-
},
|
|
1545
|
-
run: (insactiveInstanceance) => insactiveInstanceance.selectNextSuggestion()
|
|
1546
|
-
});
|
|
1547
|
-
registerActiveInstanceAction({
|
|
1548
|
-
id: "workbench.action.terminal.selectNextPageSuggestion" ,
|
|
1549
|
-
title: { value: ( localize(
|
|
1550
|
-
'workbench.action.terminal.selectNextPageSuggestion',
|
|
1551
|
-
"Select the Next Page Suggestion"
|
|
1552
|
-
)), original: 'Select the Next Page Suggestion' },
|
|
1553
|
-
f1: false,
|
|
1554
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1555
|
-
TerminalContextKeys.processSupported,
|
|
1556
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1557
|
-
)), TerminalContextKeys.focus, TerminalContextKeys.isOpen, TerminalContextKeys.suggestWidgetVisible)),
|
|
1558
|
-
keybinding: {
|
|
1559
|
-
primary: 12 ,
|
|
1560
|
-
weight: 200 + 1
|
|
1561
|
-
},
|
|
1562
|
-
run: (activeInstance) => activeInstance.selectNextPageSuggestion()
|
|
1563
|
-
});
|
|
1564
|
-
registerActiveInstanceAction({
|
|
1565
|
-
id: "workbench.action.terminal.acceptSelectedSuggestion" ,
|
|
1566
|
-
title: { value: ( localize(
|
|
1567
|
-
'workbench.action.terminal.acceptSelectedSuggestion',
|
|
1568
|
-
"Accept Selected Suggestion"
|
|
1569
|
-
)), original: 'Accept Selected Suggestion' },
|
|
1570
|
-
f1: false,
|
|
1571
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1572
|
-
TerminalContextKeys.processSupported,
|
|
1573
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1574
|
-
)), TerminalContextKeys.focus, TerminalContextKeys.isOpen, TerminalContextKeys.suggestWidgetVisible)),
|
|
1575
|
-
keybinding: {
|
|
1576
|
-
primary: 3 ,
|
|
1577
|
-
secondary: [2 ],
|
|
1578
|
-
weight: 200 + 1
|
|
1579
|
-
},
|
|
1580
|
-
run: (activeInstance) => activeInstance.acceptSelectedSuggestion()
|
|
1581
|
-
});
|
|
1582
|
-
registerActiveInstanceAction({
|
|
1583
|
-
id: "workbench.action.terminal.hideSuggestWidget" ,
|
|
1584
|
-
title: { value: ( localize('workbench.action.terminal.hideSuggestWidget', "Hide Suggest Widget")), original: 'Hide Suggest Widget' },
|
|
1585
|
-
f1: false,
|
|
1586
|
-
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1587
|
-
TerminalContextKeys.processSupported,
|
|
1588
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1589
|
-
)), TerminalContextKeys.focus, TerminalContextKeys.isOpen, TerminalContextKeys.suggestWidgetVisible)),
|
|
1590
|
-
keybinding: {
|
|
1591
|
-
primary: 9 ,
|
|
1592
|
-
weight: 200 + 1
|
|
1593
|
-
},
|
|
1594
|
-
run: (activeInstance) => activeInstance.hideSuggestWidget()
|
|
1595
|
-
});
|
|
1596
|
-
if (BrowserFeatures.clipboard.writeText) {
|
|
1597
|
-
registerActiveXtermAction({
|
|
1598
|
-
id: "workbench.action.terminal.copySelection" ,
|
|
1599
|
-
title: { value: ( localize('workbench.action.terminal.copySelection', "Copy Selection")), original: 'Copy Selection' },
|
|
1600
|
-
precondition: ( ContextKeyExpr.or(TerminalContextKeys.textSelectedInFocused, ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1601
|
-
TerminalContextKeys.processSupported,
|
|
1602
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1603
|
-
)), TerminalContextKeys.textSelected)))),
|
|
1604
|
-
keybinding: [{
|
|
1605
|
-
primary: 2048 | 1024 | 33 ,
|
|
1606
|
-
mac: { primary: 2048 | 33 },
|
|
1607
|
-
weight: 200 ,
|
|
1608
|
-
when: ( ContextKeyExpr.or(( ContextKeyExpr.and(TerminalContextKeys.textSelected, TerminalContextKeys.focus)), TerminalContextKeys.textSelectedInFocused))
|
|
1609
|
-
}],
|
|
1610
|
-
run: (activeInstance) => activeInstance.copySelection()
|
|
1611
|
-
});
|
|
1612
|
-
registerActiveXtermAction({
|
|
1613
|
-
id: "workbench.action.terminal.copyAndClearSelection" ,
|
|
1614
|
-
title: { value: ( localize(
|
|
1615
|
-
'workbench.action.terminal.copyAndClearSelection',
|
|
1616
|
-
"Copy and Clear Selection"
|
|
1617
|
-
)), original: 'Copy and Clear Selection' },
|
|
1618
|
-
precondition: ( ContextKeyExpr.or(TerminalContextKeys.textSelectedInFocused, ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1619
|
-
TerminalContextKeys.processSupported,
|
|
1620
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1621
|
-
)), TerminalContextKeys.textSelected)))),
|
|
1622
|
-
keybinding: [{
|
|
1623
|
-
win: { primary: 2048 | 33 },
|
|
1624
|
-
weight: 200 ,
|
|
1625
|
-
when: ( ContextKeyExpr.or(( ContextKeyExpr.and(TerminalContextKeys.textSelected, TerminalContextKeys.focus)), TerminalContextKeys.textSelectedInFocused))
|
|
1626
|
-
}],
|
|
1627
|
-
run: async (xterm) => {
|
|
1628
|
-
await xterm.copySelection();
|
|
1629
|
-
xterm.clearSelection();
|
|
1630
|
-
}
|
|
1631
|
-
});
|
|
1632
|
-
registerActiveXtermAction({
|
|
1633
|
-
id: "workbench.action.terminal.copySelectionAsHtml" ,
|
|
1634
|
-
title: { value: ( localize('workbench.action.terminal.copySelectionAsHtml', "Copy Selection as HTML")), original: 'Copy Selection as HTML' },
|
|
1635
|
-
f1: true,
|
|
1636
|
-
category,
|
|
1637
|
-
precondition: ( ContextKeyExpr.or(TerminalContextKeys.textSelectedInFocused, ( ContextKeyExpr.and(( ContextKeyExpr.or(
|
|
1638
|
-
TerminalContextKeys.processSupported,
|
|
1639
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1640
|
-
)), TerminalContextKeys.textSelected)))),
|
|
1641
|
-
run: (xterm) => xterm.copySelection(true)
|
|
1642
|
-
});
|
|
1643
|
-
}
|
|
1644
|
-
if (BrowserFeatures.clipboard.readText) {
|
|
1645
|
-
registerActiveInstanceAction({
|
|
1646
|
-
id: "workbench.action.terminal.paste" ,
|
|
1647
|
-
title: { value: ( localize('workbench.action.terminal.paste', "Paste into Active Terminal")), original: 'Paste into Active Terminal' },
|
|
1648
|
-
precondition: ( ContextKeyExpr.or(
|
|
1649
|
-
TerminalContextKeys.processSupported,
|
|
1650
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1651
|
-
)),
|
|
1652
|
-
keybinding: [{
|
|
1653
|
-
primary: 2048 | 52 ,
|
|
1654
|
-
win: { primary: 2048 | 52 , secondary: [2048 | 1024 | 52 ] },
|
|
1655
|
-
linux: { primary: 2048 | 1024 | 52 },
|
|
1656
|
-
weight: 200 ,
|
|
1657
|
-
when: TerminalContextKeys.focus
|
|
1658
|
-
}],
|
|
1659
|
-
run: (activeInstance) => activeInstance.paste()
|
|
1660
|
-
});
|
|
1661
|
-
}
|
|
1662
|
-
if (BrowserFeatures.clipboard.readText && isLinux) {
|
|
1663
|
-
registerActiveInstanceAction({
|
|
1664
|
-
id: "workbench.action.terminal.pasteSelection" ,
|
|
1665
|
-
title: { value: ( localize(
|
|
1666
|
-
'workbench.action.terminal.pasteSelection',
|
|
1667
|
-
"Paste Selection into Active Terminal"
|
|
1668
|
-
)), original: 'Paste Selection into Active Terminal' },
|
|
1669
|
-
precondition: ( ContextKeyExpr.or(
|
|
1670
|
-
TerminalContextKeys.processSupported,
|
|
1671
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1672
|
-
)),
|
|
1673
|
-
keybinding: [{
|
|
1674
|
-
linux: { primary: 1024 | 19 },
|
|
1675
|
-
weight: 200 ,
|
|
1676
|
-
when: TerminalContextKeys.focus
|
|
1677
|
-
}],
|
|
1678
|
-
run: (activeInstance) => activeInstance.pasteSelection()
|
|
1679
|
-
});
|
|
1680
|
-
}
|
|
1681
|
-
registerTerminalAction({
|
|
1682
|
-
id: "workbench.action.terminal.switchTerminal" ,
|
|
1683
|
-
title: { value: ( localize('workbench.action.terminal.switchTerminal', "Switch Terminal")), original: 'Switch Terminal' },
|
|
1684
|
-
precondition: ( ContextKeyExpr.or(
|
|
1685
|
-
TerminalContextKeys.processSupported,
|
|
1686
|
-
TerminalContextKeys.terminalHasBeenCreated
|
|
1687
|
-
)),
|
|
1688
|
-
run: async (c, accessor, args) => {
|
|
1689
|
-
const item = toOptionalString(args);
|
|
1690
|
-
if (!item) {
|
|
1691
|
-
return;
|
|
1692
|
-
}
|
|
1693
|
-
if (item === switchTerminalActionViewItemSeparator) {
|
|
1694
|
-
c.service.refreshActiveGroup();
|
|
1695
|
-
return;
|
|
1696
|
-
}
|
|
1697
|
-
if (item === switchTerminalShowTabsTitle) {
|
|
1698
|
-
accessor.get(IConfigurationService).updateValue("terminal.integrated.tabs.enabled" , true);
|
|
1699
|
-
return;
|
|
1700
|
-
}
|
|
1701
|
-
const terminalIndexRe = /^([0-9]+): /;
|
|
1702
|
-
const indexMatches = terminalIndexRe.exec(item);
|
|
1703
|
-
if (indexMatches) {
|
|
1704
|
-
c.groupService.setActiveGroupByIndex(Number(indexMatches[1]) - 1);
|
|
1705
|
-
return c.groupService.showPanel(true);
|
|
1706
|
-
}
|
|
1707
|
-
const quickSelectProfiles = c.profileService.availableProfiles;
|
|
1708
|
-
const profileSelection = item.substring(4);
|
|
1709
|
-
if (quickSelectProfiles) {
|
|
1710
|
-
const profile = quickSelectProfiles.find(profile => profile.profileName === profileSelection);
|
|
1711
|
-
if (profile) {
|
|
1712
|
-
const instance = await c.service.createTerminal({
|
|
1713
|
-
config: profile
|
|
1714
|
-
});
|
|
1715
|
-
c.service.setActiveInstance(instance);
|
|
1716
|
-
}
|
|
1717
|
-
else {
|
|
1718
|
-
console.warn(`No profile with name "${profileSelection}"`);
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
else {
|
|
1722
|
-
console.warn(`Unmatched terminal item: "${item}"`);
|
|
1723
|
-
}
|
|
1724
|
-
}
|
|
1725
|
-
});
|
|
1726
|
-
}
|
|
1727
|
-
function getSelectedInstances(accessor) {
|
|
1728
|
-
const listService = accessor.get(IListService);
|
|
1729
|
-
const terminalService = accessor.get(ITerminalService);
|
|
1730
|
-
const terminalGroupService = accessor.get(ITerminalGroupService);
|
|
1731
|
-
if (terminalGroupService.lastAccessedMenu === 'inline-tab') {
|
|
1732
|
-
const instance = terminalGroupService.activeInstance;
|
|
1733
|
-
return instance ? [terminalGroupService.activeInstance] : undefined;
|
|
1734
|
-
}
|
|
1735
|
-
if (!listService.lastFocusedList?.getSelection()) {
|
|
1736
|
-
return undefined;
|
|
1737
|
-
}
|
|
1738
|
-
const selections = listService.lastFocusedList.getSelection();
|
|
1739
|
-
const focused = listService.lastFocusedList.getFocus();
|
|
1740
|
-
const instances = [];
|
|
1741
|
-
if (focused.length === 1 && !selections.includes(focused[0])) {
|
|
1742
|
-
instances.push(terminalService.getInstanceFromIndex(focused[0]));
|
|
1743
|
-
return instances;
|
|
1744
|
-
}
|
|
1745
|
-
for (const selection of selections) {
|
|
1746
|
-
instances.push(terminalService.getInstanceFromIndex(selection));
|
|
1747
|
-
}
|
|
1748
|
-
return instances;
|
|
1749
|
-
}
|
|
1750
|
-
function validateTerminalName(name) {
|
|
1751
|
-
if (!name || name.trim().length === 0) {
|
|
1752
|
-
return {
|
|
1753
|
-
content: ( localize(
|
|
1754
|
-
'emptyTerminalNameInfo',
|
|
1755
|
-
"Providing no name will reset it to the default value"
|
|
1756
|
-
)),
|
|
1757
|
-
severity: Severity.Info
|
|
1758
|
-
};
|
|
1759
|
-
}
|
|
1760
|
-
return null;
|
|
1761
|
-
}
|
|
1762
|
-
function convertOptionsOrProfileToOptions(optionsOrProfile) {
|
|
1763
|
-
if (isObject(optionsOrProfile) && 'profileName' in optionsOrProfile) {
|
|
1764
|
-
return { config: optionsOrProfile, location: optionsOrProfile.location };
|
|
1765
|
-
}
|
|
1766
|
-
return optionsOrProfile;
|
|
1767
|
-
}
|
|
1768
|
-
let newWithProfileAction;
|
|
1769
|
-
function refreshTerminalActions(detectedProfiles) {
|
|
1770
|
-
const profileEnum = createProfileSchemaEnums(detectedProfiles);
|
|
1771
|
-
newWithProfileAction?.dispose();
|
|
1772
|
-
newWithProfileAction = registerAction2(class extends Action2 {
|
|
1773
|
-
constructor() {
|
|
1774
|
-
super({
|
|
1775
|
-
id: "workbench.action.terminal.newWithProfile" ,
|
|
1776
|
-
title: { value: ( localize(
|
|
1777
|
-
'workbench.action.terminal.newWithProfile',
|
|
1778
|
-
"Create New Terminal (With Profile)"
|
|
1779
|
-
)), original: 'Create New Terminal (With Profile)' },
|
|
1780
|
-
f1: true,
|
|
1781
|
-
category,
|
|
1782
|
-
precondition: ( ContextKeyExpr.or(
|
|
1783
|
-
TerminalContextKeys.processSupported,
|
|
1784
|
-
TerminalContextKeys.webExtensionContributedProfile
|
|
1785
|
-
)),
|
|
1786
|
-
description: {
|
|
1787
|
-
description: "workbench.action.terminal.newWithProfile" ,
|
|
1788
|
-
args: [{
|
|
1789
|
-
name: 'args',
|
|
1790
|
-
schema: {
|
|
1791
|
-
type: 'object',
|
|
1792
|
-
required: ['profileName'],
|
|
1793
|
-
properties: {
|
|
1794
|
-
profileName: {
|
|
1795
|
-
description: ( localize(
|
|
1796
|
-
'workbench.action.terminal.newWithProfile.profileName',
|
|
1797
|
-
"The name of the profile to create"
|
|
1798
|
-
)),
|
|
1799
|
-
type: 'string',
|
|
1800
|
-
enum: profileEnum.values,
|
|
1801
|
-
markdownEnumDescriptions: profileEnum.markdownDescriptions
|
|
1802
|
-
}
|
|
1803
|
-
}
|
|
1804
|
-
}
|
|
1805
|
-
}]
|
|
1806
|
-
},
|
|
1807
|
-
});
|
|
1808
|
-
}
|
|
1809
|
-
async run(accessor, eventOrOptionsOrProfile, profile) {
|
|
1810
|
-
const c = getTerminalServices(accessor);
|
|
1811
|
-
const workspaceContextService = accessor.get(IWorkspaceContextService);
|
|
1812
|
-
const commandService = accessor.get(ICommandService);
|
|
1813
|
-
let event;
|
|
1814
|
-
let options;
|
|
1815
|
-
let instance;
|
|
1816
|
-
let cwd;
|
|
1817
|
-
if (isObject(eventOrOptionsOrProfile) && eventOrOptionsOrProfile && 'profileName' in eventOrOptionsOrProfile) {
|
|
1818
|
-
const config = c.profileService.availableProfiles.find(profile => profile.profileName === eventOrOptionsOrProfile.profileName);
|
|
1819
|
-
if (!config) {
|
|
1820
|
-
throw new Error(`Could not find terminal profile "${eventOrOptionsOrProfile.profileName}"`);
|
|
1821
|
-
}
|
|
1822
|
-
options = { config };
|
|
1823
|
-
}
|
|
1824
|
-
else if (eventOrOptionsOrProfile instanceof MouseEvent || eventOrOptionsOrProfile instanceof PointerEvent || eventOrOptionsOrProfile instanceof KeyboardEvent) {
|
|
1825
|
-
event = eventOrOptionsOrProfile;
|
|
1826
|
-
options = profile ? { config: profile } : undefined;
|
|
1827
|
-
}
|
|
1828
|
-
else {
|
|
1829
|
-
options = convertOptionsOrProfileToOptions(eventOrOptionsOrProfile);
|
|
1830
|
-
}
|
|
1831
|
-
if (event && (event.altKey || event.ctrlKey)) {
|
|
1832
|
-
const parentTerminal = c.service.activeInstance;
|
|
1833
|
-
if (parentTerminal) {
|
|
1834
|
-
await c.service.createTerminal({ location: { parentTerminal }, config: options?.config });
|
|
1835
|
-
return;
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
const folders = workspaceContextService.getWorkspace().folders;
|
|
1839
|
-
if (folders.length > 1) {
|
|
1840
|
-
const options = {
|
|
1841
|
-
placeHolder: ( localize(
|
|
1842
|
-
'workbench.action.terminal.newWorkspacePlaceholder',
|
|
1843
|
-
"Select current working directory for new terminal"
|
|
1844
|
-
))
|
|
1845
|
-
};
|
|
1846
|
-
const workspace = await commandService.executeCommand(PICK_WORKSPACE_FOLDER_COMMAND_ID, [options]);
|
|
1847
|
-
if (!workspace) {
|
|
1848
|
-
return;
|
|
1849
|
-
}
|
|
1850
|
-
cwd = workspace.uri;
|
|
1851
|
-
}
|
|
1852
|
-
if (options) {
|
|
1853
|
-
options.cwd = cwd;
|
|
1854
|
-
instance = await c.service.createTerminal(options);
|
|
1855
|
-
}
|
|
1856
|
-
else {
|
|
1857
|
-
instance = await c.service.showProfileQuickPick('createInstance', cwd);
|
|
1858
|
-
}
|
|
1859
|
-
if (instance) {
|
|
1860
|
-
c.service.setActiveInstance(instance);
|
|
1861
|
-
await focusActiveTerminal(instance, c);
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
});
|
|
1865
|
-
}
|
|
1866
|
-
function getResourceOrActiveInstance(c, resource) {
|
|
1867
|
-
return c.service.getInstanceFromResource(toOptionalUri(resource)) || c.service.activeInstance;
|
|
1868
|
-
}
|
|
1869
|
-
async function pickTerminalCwd(accessor, cancel) {
|
|
1870
|
-
const quickInputService = accessor.get(IQuickInputService);
|
|
1871
|
-
const labelService = accessor.get(ILabelService);
|
|
1872
|
-
const contextService = accessor.get(IWorkspaceContextService);
|
|
1873
|
-
const modelService = accessor.get(IModelService);
|
|
1874
|
-
const languageService = accessor.get(ILanguageService);
|
|
1875
|
-
const configurationService = accessor.get(IConfigurationService);
|
|
1876
|
-
const configurationResolverService = accessor.get(IConfigurationResolverService);
|
|
1877
|
-
const folders = contextService.getWorkspace().folders;
|
|
1878
|
-
if (!folders.length) {
|
|
1879
|
-
return;
|
|
1880
|
-
}
|
|
1881
|
-
const folderCwdPairs = await Promise.all(( folders.map(
|
|
1882
|
-
x => resolveWorkspaceFolderCwd(x, configurationService, configurationResolverService)
|
|
1883
|
-
)));
|
|
1884
|
-
const shrinkedPairs = shrinkWorkspaceFolderCwdPairs(folderCwdPairs);
|
|
1885
|
-
if (shrinkedPairs.length === 1) {
|
|
1886
|
-
return shrinkedPairs[0];
|
|
1887
|
-
}
|
|
1888
|
-
const folderPicks = ( shrinkedPairs.map(pair => {
|
|
1889
|
-
const label = pair.folder.name;
|
|
1890
|
-
const description = pair.isOverridden
|
|
1891
|
-
? ( localize(
|
|
1892
|
-
'workbench.action.terminal.overriddenCwdDescription',
|
|
1893
|
-
"(Overriden) {0}",
|
|
1894
|
-
labelService.getUriLabel(pair.cwd, { relative: !pair.isAbsolute })
|
|
1895
|
-
))
|
|
1896
|
-
: labelService.getUriLabel(dirname(pair.cwd), { relative: true });
|
|
1897
|
-
return {
|
|
1898
|
-
label,
|
|
1899
|
-
description: description !== label ? description : undefined,
|
|
1900
|
-
pair: pair,
|
|
1901
|
-
iconClasses: getIconClasses(modelService, languageService, pair.cwd, FileKind.ROOT_FOLDER)
|
|
1902
|
-
};
|
|
1903
|
-
}));
|
|
1904
|
-
const options = {
|
|
1905
|
-
placeHolder: ( localize(
|
|
1906
|
-
'workbench.action.terminal.newWorkspacePlaceholder',
|
|
1907
|
-
"Select current working directory for new terminal"
|
|
1908
|
-
)),
|
|
1909
|
-
matchOnDescription: true,
|
|
1910
|
-
canPickMany: false,
|
|
1911
|
-
};
|
|
1912
|
-
const token = cancel || CancellationToken.None;
|
|
1913
|
-
const pick = await quickInputService.pick(folderPicks, options, token);
|
|
1914
|
-
return pick?.pair;
|
|
1915
|
-
}
|
|
1916
|
-
async function resolveWorkspaceFolderCwd(folder, configurationService, configurationResolverService) {
|
|
1917
|
-
const cwdConfig = configurationService.getValue("terminal.integrated.cwd" , { resource: folder.uri });
|
|
1918
|
-
if (!isString(cwdConfig) || cwdConfig.length === 0) {
|
|
1919
|
-
return { folder, cwd: folder.uri, isAbsolute: false, isOverridden: false };
|
|
1920
|
-
}
|
|
1921
|
-
const resolvedCwdConfig = await configurationResolverService.resolveAsync(folder, cwdConfig);
|
|
1922
|
-
return isAbsolute(resolvedCwdConfig) || resolvedCwdConfig.startsWith(AbstractVariableResolverService.VARIABLE_LHS)
|
|
1923
|
-
? { folder, isAbsolute: true, isOverridden: true, cwd: ( URI.from({ scheme: folder.uri.scheme, path: resolvedCwdConfig })) }
|
|
1924
|
-
: { folder, isAbsolute: false, isOverridden: true, cwd: URI.joinPath(folder.uri, resolvedCwdConfig) };
|
|
1925
|
-
}
|
|
1926
|
-
function shrinkWorkspaceFolderCwdPairs(pairs) {
|
|
1927
|
-
const map = ( new Map());
|
|
1928
|
-
for (const pair of pairs) {
|
|
1929
|
-
const key = ( pair.cwd.toString());
|
|
1930
|
-
const value = map.get(key);
|
|
1931
|
-
if (!value || key === ( pair.folder.uri.toString())) {
|
|
1932
|
-
map.set(key, pair);
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
const selectedPairs = ( new Set(( map.values())));
|
|
1936
|
-
const selectedPairsInOrder = pairs.filter(x => ( selectedPairs.has(x)));
|
|
1937
|
-
return selectedPairsInOrder;
|
|
1938
|
-
}
|
|
1939
|
-
async function focusActiveTerminal(instance, c) {
|
|
1940
|
-
if (instance.target === TerminalLocation.Editor) {
|
|
1941
|
-
await c.editorService.revealActiveEditor();
|
|
1942
|
-
await instance.focusWhenReady(true);
|
|
1943
|
-
}
|
|
1944
|
-
else {
|
|
1945
|
-
await c.groupService.showPanel(true);
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
async function renameWithQuickPick(c, accessor, resource) {
|
|
1949
|
-
const instance = getResourceOrActiveInstance(c, resource);
|
|
1950
|
-
if (instance) {
|
|
1951
|
-
const title = await accessor.get(IQuickInputService).input({
|
|
1952
|
-
value: instance.title,
|
|
1953
|
-
prompt: ( localize('workbench.action.terminal.rename.prompt', "Enter terminal name")),
|
|
1954
|
-
});
|
|
1955
|
-
instance.rename(title);
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
function toOptionalUri(obj) {
|
|
1959
|
-
return URI.isUri(obj) ? obj : undefined;
|
|
1960
|
-
}
|
|
1961
|
-
function toOptionalString(obj) {
|
|
1962
|
-
return isString(obj) ? obj : undefined;
|
|
1963
|
-
}
|
|
1964
|
-
export { TerminalLaunchHelpAction, getCwdForSplit, refreshTerminalActions, registerActiveInstanceAction, registerActiveXtermAction, registerTerminalAction, registerTerminalActions, shrinkWorkspaceFolderCwdPairs, switchTerminalActionViewItemSeparator, switchTerminalShowTabsTitle, terminalSendSequenceCommand, validateTerminalName };
|