@codingame/monaco-vscode-api 1.79.1 → 1.79.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/api.js +10 -8
- package/dist/composite.d.ts +65 -0
- package/dist/configurationRegistry.d.ts +212 -0
- package/dist/contextkey.d.ts +1 -1
- package/dist/default-extensions/json.js +1 -0
- package/dist/default-extensions/theme-defaults.js +2 -2
- package/dist/editorBrowser.d.ts +272 -3
- package/dist/event.d.ts +6 -1
- package/dist/{extension-tools-0c4c1ad7.js → extension-tools-3c2bf0a4.js} +698 -507
- package/dist/extensions.d.ts +3 -2
- package/dist/extensions.d2.ts +6 -17
- package/dist/extensionsRegistry.d.ts +15 -9
- package/dist/files.d.ts +71 -7
- package/dist/jsonSchema.d.ts +1 -1
- package/dist/keybinding.d.ts +2 -2
- package/dist/languageFeatures.d.ts +703 -61
- package/dist/monaco.d.ts +5 -4
- package/dist/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditor.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -1
- package/dist/platform.d.ts +11 -0
- package/dist/rollup-extension-directory-plugin.js +1 -1
- package/dist/rollup-vsix-plugin.js +1 -1
- package/dist/service-override/configuration.d.ts +5 -206
- package/dist/service-override/files.d.ts +2 -2
- package/dist/service-override/files.js +1 -1
- package/dist/service-override/markers.d.ts +7 -0
- package/dist/service-override/markers.js +6 -0
- package/dist/service-override/output.d.ts +7 -0
- package/dist/service-override/output.js +22 -0
- package/dist/service-override/preferences.js +7 -1
- package/dist/service-override/quickaccess.js +0 -9
- package/dist/service-override/search.d.ts +7 -0
- package/dist/service-override/search.js +19 -0
- package/dist/service-override/terminal.d.ts +607 -0
- package/dist/service-override/terminal.js +98 -0
- package/dist/service-override/tools/editor.js +1 -1
- package/dist/service-override/views.d.ts +561 -335
- package/dist/service-override/views.js +51 -11
- package/dist/services.d.ts +2627 -108
- package/dist/services.js +3 -0
- package/dist/severity.d.ts +16 -0
- package/dist/uri.d.ts +22 -11
- package/dist/views.d.ts +270 -0
- package/dist/vscode/vs/base/common/processes.js +24 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/decorations.js +20 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js +106 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js +59 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution.js +41 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js +369 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffModel.js +247 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/lineAlignment.js +179 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/overviewRulerPart.js +121 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/style.css.js +4 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/unchangedRanges.js +184 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/utils.js +88 -0
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +38 -1
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagementUtil.js +5 -1
- package/dist/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +13 -5
- package/dist/vscode/vs/platform/files/common/fileService.js +43 -5
- package/dist/vscode/vs/platform/files/common/files.js +3 -1
- package/dist/vscode/vs/platform/languagePacks/common/languagePacks.js +4 -1
- package/dist/vscode/vs/platform/log/common/bufferLog.js +34 -0
- package/dist/vscode/vs/platform/log/common/fileLog.js +105 -0
- package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +1 -1
- package/dist/vscode/vs/platform/remote/common/remoteAuthorityResolver.js +20 -1
- package/dist/vscode/vs/platform/request/browser/requestService.js +1 -1
- package/dist/vscode/vs/platform/request/common/request.js +3 -3
- package/dist/vscode/vs/platform/storage/common/storage.js +3 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +39 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +565 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +27 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +22 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +46 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +80 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariable.js +7 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariableCollection.js +196 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariableShared.js +23 -0
- package/dist/vscode/vs/platform/terminal/common/terminal.js +21 -1
- package/dist/vscode/vs/platform/terminal/common/terminalDataBuffering.js +45 -0
- package/dist/vscode/vs/platform/terminal/common/terminalEnvironment.js +37 -0
- package/dist/vscode/vs/platform/terminal/common/terminalPlatformConfiguration.js +622 -0
- package/dist/vscode/vs/platform/terminal/common/terminalProfiles.js +107 -0
- package/dist/vscode/vs/platform/terminal/common/terminalRecorder.js +66 -0
- package/dist/vscode/vs/platform/terminal/common/terminalStrings.js +16 -0
- package/dist/vscode/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +321 -0
- package/dist/vscode/vs/platform/userDataSync/common/settingsMerge.js +39 -1
- package/dist/vscode/vs/platform/userDataSync/common/userDataSync.js +19 -0
- package/dist/vscode/vs/platform/workspace/common/canonicalUri.js +3 -0
- package/dist/vscode/vs/platform/workspace/common/virtualWorkspace.js +4 -1
- package/dist/vscode/vs/platform/workspaces/common/workspaces.js +2 -2
- package/dist/vscode/vs/workbench/api/browser/mainThreadCommands.js +2 -3
- package/dist/vscode/vs/workbench/api/browser/mainThreadEditorTabs.js +473 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadLanguageFeatures.js +45 -38
- package/dist/vscode/vs/workbench/api/browser/mainThreadSearch.js +146 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +33 -52
- package/dist/vscode/vs/workbench/api/browser/mainThreadTerminalService.js +395 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadTheming.js +22 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadTreeViews.js +10 -5
- package/dist/vscode/vs/workbench/api/browser/mainThreadWindow.js +11 -4
- package/dist/vscode/vs/workbench/api/browser/mainThreadWorkspace.js +34 -11
- package/dist/vscode/vs/workbench/api/browser/statusBarExtensionPoint.js +81 -0
- package/dist/vscode/vs/workbench/api/common/extHost.protocol.js +7 -2
- package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +4 -13
- package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +30 -15
- package/dist/vscode/vs/workbench/api/common/extHostFileSystemConsumer.js +20 -6
- package/dist/vscode/vs/workbench/api/common/extHostLanguageFeatures.js +41 -8
- package/dist/vscode/vs/workbench/api/common/extHostManagedSockets.js +3 -0
- package/dist/vscode/vs/workbench/api/common/extHostSearch.js +109 -0
- package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +33 -6
- package/dist/vscode/vs/workbench/api/common/extHostTerminalService.js +879 -1
- package/dist/vscode/vs/workbench/api/common/extHostTheming.js +38 -0
- package/dist/vscode/vs/workbench/api/common/extHostTreeViews.js +8 -5
- package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +15 -17
- package/dist/vscode/vs/workbench/api/common/extHostTypes.js +117 -4
- package/dist/vscode/vs/workbench/api/common/extHostWindow.js +28 -6
- package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +28 -0
- package/dist/vscode/vs/workbench/api/common/shared/dataTransferCache.js +11 -14
- package/dist/vscode/vs/workbench/api/node/extHostTerminalService.js +22 -0
- package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +2 -1
- package/dist/vscode/vs/workbench/browser/actions/windowActions.js +2 -2
- package/dist/vscode/vs/workbench/browser/dnd.js +56 -2
- package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/dialogs/dialogHandler.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +1 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +1 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +9 -10
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +15 -9
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +13 -17
- package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +3 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +60 -11
- package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -10
- package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/views/checkbox.js +10 -0
- package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +78 -14
- package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
- package/dist/vscode/vs/workbench/browser/workbench.contribution.js +65 -6
- package/dist/vscode/vs/workbench/common/configuration.js +8 -1
- package/dist/vscode/vs/workbench/common/contextkeys.js +9 -1
- package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +5 -1
- package/dist/vscode/vs/workbench/common/editor/resourceEditorInput.js +6 -3
- package/dist/vscode/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
- package/dist/vscode/vs/workbench/common/editor.js +1 -5
- package/dist/vscode/vs/workbench/common/resources.js +111 -34
- package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +1 -1
- package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +1 -1
- package/dist/vscode/vs/workbench/contrib/chat/browser/chat.js +3 -0
- package/dist/vscode/vs/workbench/contrib/chat/common/chatService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +6 -4
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +250 -0
- package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput.js +290 -0
- package/dist/vscode/vs/workbench/contrib/customEditor/common/customEditor.js +3 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugActionViewItems.js +1 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +2 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +20 -20
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorActions.js +5 -3
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +5 -2
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugHover.js +33 -6
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugTaskRunner.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +3 -3
- package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +29 -17
- package/dist/vscode/vs/workbench/contrib/debug/common/debugStorage.js +11 -10
- package/dist/vscode/vs/workbench/contrib/debug/common/debugger.js +10 -6
- package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsActions.js +2514 -0
- package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons.js +82 -0
- package/dist/vscode/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/extensions/common/extensions.js +6 -1
- package/dist/vscode/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +16 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +2 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +2 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerService.js +10 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +3 -18
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +37 -2
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +65 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +3 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +3 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +41 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/files.js +1 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerView.js +3 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerViewer.js +6 -2
- package/dist/vscode/vs/workbench/contrib/files/common/explorerModel.js +16 -9
- package/dist/vscode/vs/workbench/contrib/files/common/files.js +1 -6
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveDocumentService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +200 -0
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markers.contribution.js +586 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersFilterOptions.js +75 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersModel.js +201 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersTable.js +451 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersTreeViewer.js +670 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersView.js +857 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.js +132 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/media/markers.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/messages.js +171 -0
- package/dist/vscode/vs/workbench/contrib/markers/common/markers.js +15 -1
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +135 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +421 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +55 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +334 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +606 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +36 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/utils.js +68 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +2 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +158 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +6 -1
- package/dist/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -1
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/logViewer.js +64 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/output.contribution.js +378 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/outputServices.js +39 -3
- package/dist/vscode/vs/workbench/contrib/output/browser/outputView.js +220 -0
- package/dist/vscode/vs/workbench/contrib/output/common/outputChannelModel.js +12 -3
- package/dist/vscode/vs/workbench/contrib/output/common/outputLinkComputer.js +129 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +270 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingsEditor.js +1080 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/preferences.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferences.contribution.js +1154 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesActions.js +94 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesEditor.js +47 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesIcons.js +37 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesRenderers.js +731 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesSearch.js +271 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +479 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditor2.js +1465 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.js +506 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsLayout.js +296 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsSearchMenu.js +79 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTree.js +1984 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +759 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsWidgets.js +1008 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/tocTree.js +196 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/preferences.js +68 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/preferencesContribution.js +157 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +67 -0
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +16 -16
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +1 -2
- package/dist/vscode/vs/workbench/contrib/remote/browser/remoteExplorer.js +23 -2
- package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +5 -5
- package/dist/vscode/vs/workbench/contrib/search/browser/media/searchview.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/patternInputWidget.js +217 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replace.js +3 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replaceContributions.js +7 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replaceService.js +222 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +54 -15
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsBase.js +17 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchFindInput.js +41 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchIcons.js +35 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchMessage.js +58 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchModel.js +1842 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchNotebookHelpers.js +49 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchResultsView.js +379 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchView.js +1867 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchWidget.js +628 -0
- package/dist/vscode/vs/workbench/contrib/search/common/constants.js +30 -1
- package/dist/vscode/vs/workbench/contrib/search/common/search.js +9 -1
- package/dist/vscode/vs/workbench/contrib/search/common/searchHistoryService.js +42 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +477 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.js +697 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +188 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +295 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +135 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +268 -0
- package/dist/vscode/vs/workbench/contrib/snippets/browser/tabCompletion.js +2 -2
- package/dist/vscode/vs/workbench/contrib/tasks/common/taskService.js +16 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +119 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/scrollbar.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/terminal.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/widgets.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/xterm.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.contribution.js +238 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalActions.js +1930 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalCommands.js +22 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalConfigHelper.js +213 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +17 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditor.js +186 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +199 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorService.js +239 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalExtensions.js +22 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroup.js +482 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroupService.js +372 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +60 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcons.js +37 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstance.js +2123 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstanceService.js +79 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMainContribution.js +82 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMenus.js +850 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +142 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +618 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.js +278 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.js +417 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileService.js +213 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +144 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +267 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalService.js +1063 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalStatusList.js +108 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabbedView.js +417 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabsList.js +680 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTooltip.js +72 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalUri.js +39 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalView.js +535 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +469 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +97 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +56 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +416 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +587 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariable.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariableService.js +94 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/history.js +356 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminal.js +266 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -16
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalConfiguration.js +965 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalContextKey.js +157 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment.js +272 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalExtensionPoints.js +27 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalStrings.js +86 -0
- package/dist/vscode/vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService.js +46 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/links.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.js +26 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService.js +143 -0
- package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +85 -0
- package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.js +52 -0
- package/dist/vscode/vs/workbench/services/actions/common/menusExtensionPoint.js +14 -6
- package/dist/vscode/vs/workbench/services/assignment/common/assignmentService.js +3 -0
- package/dist/vscode/vs/workbench/services/configuration/browser/configurationService.js +13 -13
- package/dist/vscode/vs/workbench/services/configuration/common/configuration.js +2 -1
- package/dist/vscode/vs/workbench/services/configuration/common/configurationEditing.js +2 -2
- package/dist/vscode/vs/workbench/services/configuration/common/jsonEditingService.js +2 -2
- package/dist/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.js +3 -2
- package/dist/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +4 -0
- package/dist/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +2 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.js +3 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensions.js +14 -2
- package/dist/vscode/vs/workbench/services/extensions/common/extensionsApiProposals.js +10 -1
- package/dist/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +70 -3
- package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
- package/dist/vscode/vs/workbench/services/hover/browser/hoverWidget.js +2 -1
- package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +1 -1
- package/dist/vscode/vs/workbench/services/keybinding/common/keybindingEditing.js +275 -0
- package/dist/vscode/vs/workbench/services/localization/common/locale.js +3 -0
- package/dist/vscode/vs/workbench/services/log/common/logConstants.js +2 -0
- package/dist/vscode/vs/workbench/services/output/common/output.js +4 -1
- package/dist/vscode/vs/workbench/services/preferences/common/preferences.js +22 -1
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesModels.js +6 -0
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesValidation.js +37 -1
- package/dist/vscode/vs/workbench/services/remote/common/remoteAgentService.js +69 -0
- package/dist/vscode/vs/workbench/services/remote/common/remoteExplorerService.js +66 -27
- package/dist/vscode/vs/workbench/services/search/common/fileSearchManager.js +265 -0
- package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +6 -0
- package/dist/vscode/vs/workbench/services/search/common/replace.js +203 -0
- package/dist/vscode/vs/workbench/services/search/common/search.js +227 -1
- package/dist/vscode/vs/workbench/services/search/common/searchExtTypes.js +6 -0
- package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +72 -0
- package/dist/vscode/vs/workbench/services/search/common/searchService.js +355 -0
- package/dist/vscode/vs/workbench/services/search/common/textSearchManager.js +309 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +399 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
- package/dist/vscode/vs/workbench/services/terminal/common/embedderTerminalService.js +3 -0
- package/dist/vscode/vs/workbench/services/textfile/browser/textFileService.js +1 -1
- package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModel.js +10 -3
- package/dist/vscode/vs/workbench/services/themes/browser/fileIconThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/themes/browser/productIconThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/themes/common/colorThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput.js +6 -4
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel.js +3 -0
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -0
- package/dist/vscode/vs/workbench/services/userActivity/common/userActivityRegistry.js +15 -0
- package/dist/vscode/vs/workbench/services/userActivity/common/userActivityService.js +37 -0
- package/dist/vscode/vs/workbench/services/userDataSync/common/userDataSync.js +7 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.js +40 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyService.js +12 -0
- package/dist/vscode/vs/workbench/services/workspaces/common/canonicalUriService.js +19 -0
- package/dist/vscode-default-extensions/css/syntaxes/css.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/json/package.json.js +1 -1
- package/dist/vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/json/syntaxes/JSONL.tmLanguage.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/perl/package.json.js +1 -1
- package/dist/vscode-default-extensions/php/snippets/php.code-snippets.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/sql/language-configuration.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/package.json.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_modern.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_vs.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/hc_black.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/hc_light.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/light_modern.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/theme-defaults/themes/light_vs.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-red/themes/Red-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/vb/language-configuration.json.extensionResource.js +1 -1
- package/dist/vscode-services/env.js +4 -2
- package/dist/vscode-services/extHost.js +32 -48
- package/dist/vscode-services/missing-services.js +407 -29
- package/dist/vscode-services/window.js +59 -65
- package/dist/vscode-services/workspace.js +19 -5
- package/dist/workers/outputLinkComputer.worker.d.ts +2 -0
- package/dist/workers/outputLinkComputer.worker.js +3 -0
- package/dist/workspace.d.ts +1 -1
- package/monaco-editor-treemending.patch +1305 -1184
- package/package.json +65 -19
- package/dist/activity.d.ts +0 -2802
- package/dist/collections.d.ts +0 -7
- package/dist/colorRegistry.d.ts +0 -710
- package/dist/vscode/vs/platform/product/common/product.js +0 -48
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionFollowups.js +0 -30
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +0 -196
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionListRenderer.js +0 -622
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionOptions.js +0 -77
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +0 -311
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +0 -4
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +0 -56
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +0 -305
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +0 -13
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +0 -379
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionViewModel.js +0 -207
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWidgetHistoryService.js +0 -3
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWordCounter.js +0 -25
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.extensionResource.js +0 -2
- package/dist/vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.extensionResource.js +0 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class TerminalWidgetManager {
|
|
2
|
+
constructor() {
|
|
3
|
+
this._attached = ( new Map());
|
|
4
|
+
}
|
|
5
|
+
attachToElement(terminalWrapper) {
|
|
6
|
+
if (!this._container) {
|
|
7
|
+
this._container = document.createElement('div');
|
|
8
|
+
this._container.classList.add('terminal-widget-container');
|
|
9
|
+
terminalWrapper.appendChild(this._container);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
dispose() {
|
|
13
|
+
if (this._container && this._container.parentElement) {
|
|
14
|
+
this._container.parentElement.removeChild(this._container);
|
|
15
|
+
this._container = undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
attachWidget(widget) {
|
|
19
|
+
if (!this._container) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
this._attached.get(widget.id)?.dispose();
|
|
23
|
+
widget.attach(this._container);
|
|
24
|
+
this._attached.set(widget.id, widget);
|
|
25
|
+
return {
|
|
26
|
+
dispose: () => {
|
|
27
|
+
const current = this._attached.get(widget.id);
|
|
28
|
+
if (current === widget) {
|
|
29
|
+
this._attached.delete(widget.id);
|
|
30
|
+
widget.dispose();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export { TerminalWidgetManager };
|
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
3
|
+
import { Separator } from 'monaco-editor/esm/vs/base/common/actions.js';
|
|
4
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
5
|
+
import { Disposable, toDisposable, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
6
|
+
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
7
|
+
import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
|
|
8
|
+
import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
9
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
10
|
+
import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
|
|
11
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
12
|
+
import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
13
|
+
import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
14
|
+
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
15
|
+
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
16
|
+
import { terminalDecorationMark, terminalDecorationIncomplete, terminalDecorationError, terminalDecorationSuccess } from '../terminalIcons.js';
|
|
17
|
+
import { TerminalDecorationHoverManager, updateLayout } from './decorationStyles.js';
|
|
18
|
+
import { TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR, TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR, TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR } from '../../common/terminalColorRegistry.js';
|
|
19
|
+
import { ILifecycleService } from '../../../../services/lifecycle/common/lifecycle.js';
|
|
20
|
+
import { AudioCue, IAudioCueService } from 'monaco-editor/esm/vs/platform/audioCues/browser/audioCueService.js';
|
|
21
|
+
import { Severity, INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
22
|
+
let DecorationAddon = class DecorationAddon extends Disposable {
|
|
23
|
+
constructor(_capabilities, _clipboardService, _contextMenuService, _configurationService, _themeService, _openerService, _quickInputService, lifecycleService, _commandService, instantiationService, _audioCueService, _notificationService) {
|
|
24
|
+
super();
|
|
25
|
+
this._capabilities = _capabilities;
|
|
26
|
+
this._clipboardService = _clipboardService;
|
|
27
|
+
this._contextMenuService = _contextMenuService;
|
|
28
|
+
this._configurationService = _configurationService;
|
|
29
|
+
this._themeService = _themeService;
|
|
30
|
+
this._openerService = _openerService;
|
|
31
|
+
this._quickInputService = _quickInputService;
|
|
32
|
+
this._commandService = _commandService;
|
|
33
|
+
this._audioCueService = _audioCueService;
|
|
34
|
+
this._notificationService = _notificationService;
|
|
35
|
+
this._capabilityDisposables = ( new Map());
|
|
36
|
+
this._decorations = ( new Map());
|
|
37
|
+
this._onDidRequestRunCommand = this._register(( new Emitter()));
|
|
38
|
+
this.onDidRequestRunCommand = this._onDidRequestRunCommand.event;
|
|
39
|
+
this._register(toDisposable(() => this._dispose()));
|
|
40
|
+
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
|
41
|
+
if (e.affectsConfiguration("terminal.integrated.fontSize" ) || e.affectsConfiguration("terminal.integrated.lineHeight" )) {
|
|
42
|
+
this.refreshLayouts();
|
|
43
|
+
}
|
|
44
|
+
else if (e.affectsConfiguration('workbench.colorCustomizations')) {
|
|
45
|
+
this._refreshStyles(true);
|
|
46
|
+
}
|
|
47
|
+
else if (e.affectsConfiguration("terminal.integrated.shellIntegration.decorationsEnabled" )) {
|
|
48
|
+
this._removeCapabilityDisposables(2 );
|
|
49
|
+
this._updateDecorationVisibility();
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
this._register(this._themeService.onDidColorThemeChange(() => this._refreshStyles(true)));
|
|
53
|
+
this._updateDecorationVisibility();
|
|
54
|
+
this._register(this._capabilities.onDidAddCapability(c => this._createCapabilityDisposables(c)));
|
|
55
|
+
this._register(this._capabilities.onDidRemoveCapability(c => this._removeCapabilityDisposables(c)));
|
|
56
|
+
this._register(lifecycleService.onWillShutdown(() => this._disposeAllDecorations()));
|
|
57
|
+
this._terminalDecorationHoverService = instantiationService.createInstance(TerminalDecorationHoverManager);
|
|
58
|
+
}
|
|
59
|
+
_removeCapabilityDisposables(c) {
|
|
60
|
+
const disposables = this._capabilityDisposables.get(c);
|
|
61
|
+
if (disposables) {
|
|
62
|
+
dispose(disposables);
|
|
63
|
+
}
|
|
64
|
+
this._capabilityDisposables.delete(c);
|
|
65
|
+
}
|
|
66
|
+
_createCapabilityDisposables(c) {
|
|
67
|
+
let disposables = [];
|
|
68
|
+
const capability = this._capabilities.get(c);
|
|
69
|
+
if (!capability || ( this._capabilityDisposables.has(c))) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
switch (capability.type) {
|
|
73
|
+
case 4 :
|
|
74
|
+
disposables = [capability.onMarkAdded(mark => this.registerMarkDecoration(mark))];
|
|
75
|
+
break;
|
|
76
|
+
case 2 :
|
|
77
|
+
disposables = this._getCommandDetectionListeners(capability);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
this._capabilityDisposables.set(c, disposables);
|
|
81
|
+
}
|
|
82
|
+
registerMarkDecoration(mark) {
|
|
83
|
+
if (!this._terminal || (!this._showGutterDecorations && !this._showOverviewRulerDecorations)) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
if (mark.hidden) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
return this.registerCommandDecoration(undefined, undefined, mark);
|
|
90
|
+
}
|
|
91
|
+
_updateDecorationVisibility() {
|
|
92
|
+
const showDecorations = this._configurationService.getValue("terminal.integrated.shellIntegration.decorationsEnabled" );
|
|
93
|
+
this._showGutterDecorations = (showDecorations === 'both' || showDecorations === 'gutter');
|
|
94
|
+
this._showOverviewRulerDecorations = (showDecorations === 'both' || showDecorations === 'overviewRuler');
|
|
95
|
+
this._disposeAllDecorations();
|
|
96
|
+
if (this._showGutterDecorations || this._showOverviewRulerDecorations) {
|
|
97
|
+
this._attachToCommandCapability();
|
|
98
|
+
this._updateGutterDecorationVisibility();
|
|
99
|
+
}
|
|
100
|
+
const currentCommand = this._capabilities.get(2 )?.executingCommandObject;
|
|
101
|
+
if (currentCommand) {
|
|
102
|
+
this.registerCommandDecoration(currentCommand, true);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
_disposeAllDecorations() {
|
|
106
|
+
this._placeholderDecoration?.dispose();
|
|
107
|
+
for (const value of ( this._decorations.values())) {
|
|
108
|
+
value.decoration.dispose();
|
|
109
|
+
dispose(value.disposables);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
_updateGutterDecorationVisibility() {
|
|
113
|
+
const commandDecorationElements = document.querySelectorAll("terminal-command-decoration" );
|
|
114
|
+
for (const commandDecorationElement of commandDecorationElements) {
|
|
115
|
+
this._updateCommandDecorationVisibility(commandDecorationElement);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
_updateCommandDecorationVisibility(commandDecorationElement) {
|
|
119
|
+
if (this._showGutterDecorations) {
|
|
120
|
+
commandDecorationElement.classList.remove("hide" );
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
commandDecorationElement.classList.add("hide" );
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
refreshLayouts() {
|
|
127
|
+
updateLayout(this._configurationService, this._placeholderDecoration?.element);
|
|
128
|
+
for (const decoration of this._decorations) {
|
|
129
|
+
updateLayout(this._configurationService, decoration[1].decoration.element);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
_refreshStyles(refreshOverviewRulerColors) {
|
|
133
|
+
if (refreshOverviewRulerColors) {
|
|
134
|
+
for (const decoration of ( this._decorations.values())) {
|
|
135
|
+
const color = this._getDecorationCssColor(decoration)?.toString() ?? '';
|
|
136
|
+
if (decoration.decoration.options?.overviewRulerOptions) {
|
|
137
|
+
decoration.decoration.options.overviewRulerOptions.color = color;
|
|
138
|
+
}
|
|
139
|
+
else if (decoration.decoration.options) {
|
|
140
|
+
decoration.decoration.options.overviewRulerOptions = { color };
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
this._updateClasses(this._placeholderDecoration?.element);
|
|
145
|
+
for (const decoration of ( this._decorations.values())) {
|
|
146
|
+
this._updateClasses(decoration.decoration.element, decoration.exitCode, decoration.markProperties);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
_dispose() {
|
|
150
|
+
this._terminalDecorationHoverService.dispose();
|
|
151
|
+
for (const disposable of ( this._capabilityDisposables.values())) {
|
|
152
|
+
dispose(disposable);
|
|
153
|
+
}
|
|
154
|
+
this.clearDecorations();
|
|
155
|
+
}
|
|
156
|
+
_clearPlaceholder() {
|
|
157
|
+
this._placeholderDecoration?.dispose();
|
|
158
|
+
this._placeholderDecoration = undefined;
|
|
159
|
+
}
|
|
160
|
+
clearDecorations() {
|
|
161
|
+
this._placeholderDecoration?.marker.dispose();
|
|
162
|
+
this._clearPlaceholder();
|
|
163
|
+
this._disposeAllDecorations();
|
|
164
|
+
this._decorations.clear();
|
|
165
|
+
}
|
|
166
|
+
_attachToCommandCapability() {
|
|
167
|
+
if (( this._capabilities.has(2 ))) {
|
|
168
|
+
this._getCommandDetectionListeners(this._capabilities.get(2 ));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
_getCommandDetectionListeners(capability) {
|
|
172
|
+
if (( this._capabilityDisposables.has(2 ))) {
|
|
173
|
+
const disposables = this._capabilityDisposables.get(2 );
|
|
174
|
+
dispose(disposables);
|
|
175
|
+
this._capabilityDisposables.delete(capability.type);
|
|
176
|
+
}
|
|
177
|
+
const commandDetectionListeners = [];
|
|
178
|
+
if (capability.executingCommandObject?.marker) {
|
|
179
|
+
this.registerCommandDecoration(capability.executingCommandObject, true);
|
|
180
|
+
}
|
|
181
|
+
commandDetectionListeners.push(capability.onCommandStarted(command => this.registerCommandDecoration(command, true)));
|
|
182
|
+
for (const command of capability.commands) {
|
|
183
|
+
this.registerCommandDecoration(command);
|
|
184
|
+
}
|
|
185
|
+
commandDetectionListeners.push(capability.onCommandFinished(command => {
|
|
186
|
+
this.registerCommandDecoration(command);
|
|
187
|
+
if (command.exitCode) {
|
|
188
|
+
this._audioCueService.playAudioCue(AudioCue.terminalCommandFailed);
|
|
189
|
+
}
|
|
190
|
+
}));
|
|
191
|
+
commandDetectionListeners.push(capability.onCommandInvalidated(commands => {
|
|
192
|
+
for (const command of commands) {
|
|
193
|
+
const id = command.marker?.id;
|
|
194
|
+
if (id) {
|
|
195
|
+
const match = this._decorations.get(id);
|
|
196
|
+
if (match) {
|
|
197
|
+
match.decoration.dispose();
|
|
198
|
+
dispose(match.disposables);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}));
|
|
203
|
+
commandDetectionListeners.push(capability.onCurrentCommandInvalidated((request) => {
|
|
204
|
+
if (request.reason === "noProblemsReported" ) {
|
|
205
|
+
const lastDecoration = Array.from(this._decorations.entries())[this._decorations.size - 1];
|
|
206
|
+
lastDecoration?.[1].decoration.dispose();
|
|
207
|
+
}
|
|
208
|
+
else if (request.reason === "windows" ) {
|
|
209
|
+
this._clearPlaceholder();
|
|
210
|
+
}
|
|
211
|
+
}));
|
|
212
|
+
return commandDetectionListeners;
|
|
213
|
+
}
|
|
214
|
+
activate(terminal) {
|
|
215
|
+
this._terminal = terminal;
|
|
216
|
+
this._attachToCommandCapability();
|
|
217
|
+
}
|
|
218
|
+
registerCommandDecoration(command, beforeCommandExecution, markProperties) {
|
|
219
|
+
if (!this._terminal || (beforeCommandExecution && !command) || (!this._showGutterDecorations && !this._showOverviewRulerDecorations)) {
|
|
220
|
+
return undefined;
|
|
221
|
+
}
|
|
222
|
+
const marker = command?.marker || markProperties?.marker;
|
|
223
|
+
if (!marker) {
|
|
224
|
+
throw new Error(`cannot add a decoration for a command ${JSON.stringify(command)} with no marker`);
|
|
225
|
+
}
|
|
226
|
+
this._clearPlaceholder();
|
|
227
|
+
const color = this._getDecorationCssColor(command)?.toString() ?? '';
|
|
228
|
+
const decoration = this._terminal.registerDecoration({
|
|
229
|
+
marker,
|
|
230
|
+
overviewRulerOptions: this._showOverviewRulerDecorations ? (beforeCommandExecution
|
|
231
|
+
? { color, position: 'left' }
|
|
232
|
+
: { color, position: command?.exitCode ? 'right' : 'left' }) : undefined
|
|
233
|
+
});
|
|
234
|
+
if (!decoration) {
|
|
235
|
+
return undefined;
|
|
236
|
+
}
|
|
237
|
+
if (beforeCommandExecution) {
|
|
238
|
+
this._placeholderDecoration = decoration;
|
|
239
|
+
}
|
|
240
|
+
decoration.onRender(element => {
|
|
241
|
+
if (element.classList.contains(".xterm-decoration-overview-ruler" )) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (!this._decorations.get(decoration.marker.id)) {
|
|
245
|
+
decoration.onDispose(() => this._decorations.delete(decoration.marker.id));
|
|
246
|
+
this._decorations.set(decoration.marker.id, {
|
|
247
|
+
decoration,
|
|
248
|
+
disposables: this._createDisposables(element, command, markProperties),
|
|
249
|
+
exitCode: command?.exitCode,
|
|
250
|
+
markProperties: command?.markProperties
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
if (!element.classList.contains("codicon" ) || command?.marker?.line === 0) {
|
|
254
|
+
updateLayout(this._configurationService, element);
|
|
255
|
+
this._updateClasses(element, command?.exitCode, command?.markProperties || markProperties);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
return decoration;
|
|
259
|
+
}
|
|
260
|
+
_createDisposables(element, command, markProperties) {
|
|
261
|
+
if (command?.exitCode === undefined && !command?.markProperties) {
|
|
262
|
+
return [];
|
|
263
|
+
}
|
|
264
|
+
else if (command?.markProperties || markProperties) {
|
|
265
|
+
return [this._terminalDecorationHoverService.createHover(element, command || markProperties, markProperties?.hoverMessage)];
|
|
266
|
+
}
|
|
267
|
+
return [this._createContextMenu(element, command), this._terminalDecorationHoverService.createHover(element, command)];
|
|
268
|
+
}
|
|
269
|
+
_updateClasses(element, exitCode, markProperties) {
|
|
270
|
+
if (!element) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
for (const classes of element.classList) {
|
|
274
|
+
element.classList.remove(classes);
|
|
275
|
+
}
|
|
276
|
+
element.classList.add("terminal-command-decoration" , "codicon" , "xterm-decoration" );
|
|
277
|
+
if (markProperties) {
|
|
278
|
+
element.classList.add("default-color" , ...ThemeIcon.asClassNameArray(terminalDecorationMark));
|
|
279
|
+
if (!markProperties.hoverMessage) {
|
|
280
|
+
element.classList.add("default" );
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
this._updateCommandDecorationVisibility(element);
|
|
285
|
+
if (exitCode === undefined) {
|
|
286
|
+
element.classList.add("default-color" , "default" );
|
|
287
|
+
element.classList.add(...ThemeIcon.asClassNameArray(terminalDecorationIncomplete));
|
|
288
|
+
}
|
|
289
|
+
else if (exitCode) {
|
|
290
|
+
element.classList.add("error" );
|
|
291
|
+
element.classList.add(...ThemeIcon.asClassNameArray(terminalDecorationError));
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
element.classList.add(...ThemeIcon.asClassNameArray(terminalDecorationSuccess));
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
_createContextMenu(element, command) {
|
|
299
|
+
return dom.addDisposableListener(element, dom.EventType.CLICK, async () => {
|
|
300
|
+
this._terminalDecorationHoverService.hideHover();
|
|
301
|
+
const actions = await this._getCommandActions(command);
|
|
302
|
+
this._contextMenuService.showContextMenu({ getAnchor: () => element, getActions: () => actions });
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
async _getCommandActions(command) {
|
|
306
|
+
const actions = [];
|
|
307
|
+
if (command.command !== '') {
|
|
308
|
+
const labelRun = ( localize("terminal.rerunCommand", 'Rerun Command'));
|
|
309
|
+
actions.push({
|
|
310
|
+
class: undefined, tooltip: labelRun, id: 'terminal.rerunCommand', label: labelRun, enabled: true,
|
|
311
|
+
run: async () => {
|
|
312
|
+
if (command.command === '') {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
if (!command.isTrusted) {
|
|
316
|
+
const shouldRun = await ( new Promise(r => {
|
|
317
|
+
this._notificationService.prompt(Severity.Info, ( localize('rerun', 'Do you want to run the command: {0}', command.command)), [{
|
|
318
|
+
label: ( localize('yes', 'Yes')),
|
|
319
|
+
run: () => r(true)
|
|
320
|
+
}, {
|
|
321
|
+
label: ( localize('no', 'No')),
|
|
322
|
+
run: () => r(false)
|
|
323
|
+
}]);
|
|
324
|
+
}));
|
|
325
|
+
if (!shouldRun) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
this._onDidRequestRunCommand.fire({ command });
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
const labelCopy = ( localize("terminal.copyCommand", 'Copy Command'));
|
|
333
|
+
actions.push({
|
|
334
|
+
class: undefined, tooltip: labelCopy, id: 'terminal.copyCommand', label: labelCopy, enabled: true,
|
|
335
|
+
run: () => this._clipboardService.writeText(command.command)
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
if (command.hasOutput()) {
|
|
339
|
+
if (actions.length > 0) {
|
|
340
|
+
actions.push(( new Separator()));
|
|
341
|
+
}
|
|
342
|
+
const labelText = ( localize("terminal.copyOutput", 'Copy Output'));
|
|
343
|
+
actions.push({
|
|
344
|
+
class: undefined, tooltip: labelText, id: 'terminal.copyOutput', label: labelText, enabled: true,
|
|
345
|
+
run: () => {
|
|
346
|
+
const text = command.getOutput();
|
|
347
|
+
if (typeof text === 'string') {
|
|
348
|
+
this._clipboardService.writeText(text);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
const labelHtml = ( localize("terminal.copyOutputAsHtml", 'Copy Output as HTML'));
|
|
353
|
+
actions.push({
|
|
354
|
+
class: undefined, tooltip: labelHtml, id: 'terminal.copyOutputAsHtml', label: labelHtml, enabled: true,
|
|
355
|
+
run: () => this._onDidRequestRunCommand.fire({ command, copyAsHtml: true })
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
if (actions.length > 0) {
|
|
359
|
+
actions.push(( new Separator()));
|
|
360
|
+
}
|
|
361
|
+
const labelRunRecent = ( localize('workbench.action.terminal.runRecentCommand', "Run Recent Command"));
|
|
362
|
+
actions.push({
|
|
363
|
+
class: undefined, tooltip: labelRunRecent, id: 'workbench.action.terminal.runRecentCommand', label: labelRunRecent, enabled: true,
|
|
364
|
+
run: () => this._commandService.executeCommand('workbench.action.terminal.runRecentCommand')
|
|
365
|
+
});
|
|
366
|
+
const labelGoToRecent = ( localize('workbench.action.terminal.goToRecentDirectory', "Go To Recent Directory"));
|
|
367
|
+
actions.push({
|
|
368
|
+
class: undefined, tooltip: labelRunRecent, id: 'workbench.action.terminal.goToRecentDirectory', label: labelGoToRecent, enabled: true,
|
|
369
|
+
run: () => this._commandService.executeCommand('workbench.action.terminal.goToRecentDirectory')
|
|
370
|
+
});
|
|
371
|
+
actions.push(( new Separator()));
|
|
372
|
+
const labelConfigure = ( localize("terminal.configureCommandDecorations", 'Configure Command Decorations'));
|
|
373
|
+
actions.push({
|
|
374
|
+
class: undefined, tooltip: labelConfigure, id: 'terminal.configureCommandDecorations', label: labelConfigure, enabled: true,
|
|
375
|
+
run: () => this._showConfigureCommandDecorationsQuickPick()
|
|
376
|
+
});
|
|
377
|
+
const labelAbout = ( localize("terminal.learnShellIntegration", 'Learn About Shell Integration'));
|
|
378
|
+
actions.push({
|
|
379
|
+
class: undefined, tooltip: labelAbout, id: 'terminal.learnShellIntegration', label: labelAbout, enabled: true,
|
|
380
|
+
run: () => this._openerService.open('https://code.visualstudio.com/docs/terminal/shell-integration')
|
|
381
|
+
});
|
|
382
|
+
return actions;
|
|
383
|
+
}
|
|
384
|
+
async _showConfigureCommandDecorationsQuickPick() {
|
|
385
|
+
const quickPick = this._quickInputService.createQuickPick();
|
|
386
|
+
quickPick.items = [
|
|
387
|
+
{ id: 'a', label: ( localize('toggleVisibility', 'Toggle visibility')) },
|
|
388
|
+
];
|
|
389
|
+
quickPick.canSelectMany = false;
|
|
390
|
+
quickPick.onDidAccept(async (e) => {
|
|
391
|
+
quickPick.hide();
|
|
392
|
+
const result = quickPick.activeItems[0];
|
|
393
|
+
switch (result.id) {
|
|
394
|
+
case 'a':
|
|
395
|
+
this._showToggleVisibilityQuickPick();
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
quickPick.show();
|
|
400
|
+
}
|
|
401
|
+
_showToggleVisibilityQuickPick() {
|
|
402
|
+
const quickPick = this._quickInputService.createQuickPick();
|
|
403
|
+
quickPick.hideInput = true;
|
|
404
|
+
quickPick.hideCheckAll = true;
|
|
405
|
+
quickPick.canSelectMany = true;
|
|
406
|
+
quickPick.title = ( localize('toggleVisibility', 'Toggle visibility'));
|
|
407
|
+
const configValue = this._configurationService.getValue("terminal.integrated.shellIntegration.decorationsEnabled" );
|
|
408
|
+
const gutterIcon = {
|
|
409
|
+
label: ( localize('gutter', 'Gutter command decorations')),
|
|
410
|
+
picked: configValue !== 'never' && configValue !== 'overviewRuler'
|
|
411
|
+
};
|
|
412
|
+
const overviewRulerIcon = {
|
|
413
|
+
label: ( localize('overviewRuler', 'Overview ruler command decorations')),
|
|
414
|
+
picked: configValue !== 'never' && configValue !== 'gutter'
|
|
415
|
+
};
|
|
416
|
+
quickPick.items = [gutterIcon, overviewRulerIcon];
|
|
417
|
+
const selectedItems = [];
|
|
418
|
+
if (configValue !== 'never') {
|
|
419
|
+
if (configValue !== 'gutter') {
|
|
420
|
+
selectedItems.push(gutterIcon);
|
|
421
|
+
}
|
|
422
|
+
if (configValue !== 'overviewRuler') {
|
|
423
|
+
selectedItems.push(overviewRulerIcon);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
quickPick.selectedItems = selectedItems;
|
|
427
|
+
quickPick.onDidChangeSelection(async (e) => {
|
|
428
|
+
let newValue = 'never';
|
|
429
|
+
if (e.includes(gutterIcon)) {
|
|
430
|
+
if (e.includes(overviewRulerIcon)) {
|
|
431
|
+
newValue = 'both';
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
newValue = 'gutter';
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
else if (e.includes(overviewRulerIcon)) {
|
|
438
|
+
newValue = 'overviewRuler';
|
|
439
|
+
}
|
|
440
|
+
await this._configurationService.updateValue("terminal.integrated.shellIntegration.decorationsEnabled" , newValue);
|
|
441
|
+
});
|
|
442
|
+
quickPick.ok = false;
|
|
443
|
+
quickPick.show();
|
|
444
|
+
}
|
|
445
|
+
_getDecorationCssColor(decorationOrCommand) {
|
|
446
|
+
let colorId;
|
|
447
|
+
if (decorationOrCommand?.exitCode === undefined) {
|
|
448
|
+
colorId = TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR;
|
|
449
|
+
}
|
|
450
|
+
else {
|
|
451
|
+
colorId = decorationOrCommand.exitCode ? TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR : TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR;
|
|
452
|
+
}
|
|
453
|
+
return this._themeService.getColorTheme().getColor(colorId)?.toString();
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
DecorationAddon = ( __decorate([
|
|
457
|
+
( __param(1, IClipboardService)),
|
|
458
|
+
( __param(2, IContextMenuService)),
|
|
459
|
+
( __param(3, IConfigurationService)),
|
|
460
|
+
( __param(4, IThemeService)),
|
|
461
|
+
( __param(5, IOpenerService)),
|
|
462
|
+
( __param(6, IQuickInputService)),
|
|
463
|
+
( __param(7, ILifecycleService)),
|
|
464
|
+
( __param(8, ICommandService)),
|
|
465
|
+
( __param(9, IInstantiationService)),
|
|
466
|
+
( __param(10, IAudioCueService)),
|
|
467
|
+
( __param(11, INotificationService))
|
|
468
|
+
], DecorationAddon));
|
|
469
|
+
export { DecorationAddon };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
3
|
+
import { Delayer } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
4
|
+
import { fromNow } from '../../../../../base/common/date.js';
|
|
5
|
+
import { MarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
|
|
6
|
+
import { Disposable, combinedDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
7
|
+
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
8
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
9
|
+
import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
|
|
10
|
+
import { IHoverService } from '../../../../services/hover/browser/hover.js';
|
|
11
|
+
let TerminalDecorationHoverManager = class TerminalDecorationHoverManager extends Disposable {
|
|
12
|
+
constructor(_hoverService, configurationService, contextMenuService) {
|
|
13
|
+
super();
|
|
14
|
+
this._hoverService = _hoverService;
|
|
15
|
+
this._contextMenuVisible = false;
|
|
16
|
+
this._register(contextMenuService.onDidShowContextMenu(() => this._contextMenuVisible = true));
|
|
17
|
+
this._register(contextMenuService.onDidHideContextMenu(() => this._contextMenuVisible = false));
|
|
18
|
+
this._hoverDelayer = this._register(( (new Delayer(configurationService.getValue('workbench.hover.delay')))));
|
|
19
|
+
}
|
|
20
|
+
hideHover() {
|
|
21
|
+
this._hoverDelayer.cancel();
|
|
22
|
+
this._hoverService.hideHover();
|
|
23
|
+
}
|
|
24
|
+
createHover(element, command, hoverMessage) {
|
|
25
|
+
return combinedDisposable(dom.addDisposableListener(element, dom.EventType.MOUSE_ENTER, () => {
|
|
26
|
+
if (this._contextMenuVisible) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this._hoverDelayer.trigger(() => {
|
|
30
|
+
let hoverContent = `${( ( localize('terminalPromptContextMenu', "Show Command Actions")))}`;
|
|
31
|
+
hoverContent += '\n\n---\n\n';
|
|
32
|
+
if (!command) {
|
|
33
|
+
if (hoverMessage) {
|
|
34
|
+
hoverContent = hoverMessage;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else if (command.markProperties || hoverMessage) {
|
|
41
|
+
if (command.markProperties?.hoverMessage || hoverMessage) {
|
|
42
|
+
hoverContent = command.markProperties?.hoverMessage || hoverMessage || '';
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else if (command.exitCode) {
|
|
49
|
+
if (command.exitCode === -1) {
|
|
50
|
+
hoverContent += ( (localize(
|
|
51
|
+
'terminalPromptCommandFailed',
|
|
52
|
+
'Command executed {0} and failed',
|
|
53
|
+
fromNow(command.timestamp, true)
|
|
54
|
+
)));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
hoverContent += ( (localize(
|
|
58
|
+
'terminalPromptCommandFailedWithExitCode',
|
|
59
|
+
'Command executed {0} and failed (Exit Code {1})',
|
|
60
|
+
fromNow(command.timestamp, true),
|
|
61
|
+
command.exitCode
|
|
62
|
+
)));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
hoverContent += ( (localize(
|
|
67
|
+
'terminalPromptCommandSuccess',
|
|
68
|
+
'Command executed {0}',
|
|
69
|
+
fromNow(command.timestamp, true)
|
|
70
|
+
)));
|
|
71
|
+
}
|
|
72
|
+
this._hoverService.showHover({ content: ( (new MarkdownString(hoverContent))), target: element });
|
|
73
|
+
});
|
|
74
|
+
}), dom.addDisposableListener(element, dom.EventType.MOUSE_LEAVE, () => this.hideHover()), dom.addDisposableListener(element, dom.EventType.MOUSE_OUT, () => this.hideHover()));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
TerminalDecorationHoverManager = ( (__decorate([
|
|
78
|
+
( (__param(0, IHoverService))),
|
|
79
|
+
( (__param(1, IConfigurationService))),
|
|
80
|
+
( (__param(2, IContextMenuService)))
|
|
81
|
+
], TerminalDecorationHoverManager)));
|
|
82
|
+
function updateLayout(configurationService, element) {
|
|
83
|
+
if (!element) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const fontSize = configurationService.inspect("terminal.integrated.fontSize" ).value;
|
|
87
|
+
const defaultFontSize = configurationService.inspect("terminal.integrated.fontSize" ).defaultValue;
|
|
88
|
+
const lineHeight = configurationService.inspect("terminal.integrated.lineHeight" ).value;
|
|
89
|
+
if (typeof fontSize === 'number' && typeof defaultFontSize === 'number' && typeof lineHeight === 'number') {
|
|
90
|
+
const scalar = (fontSize / defaultFontSize) <= 1 ? (fontSize / defaultFontSize) : 1;
|
|
91
|
+
element.style.width = `${scalar * 16 }px`;
|
|
92
|
+
element.style.height = `${scalar * 16 * lineHeight}px`;
|
|
93
|
+
element.style.fontSize = `${scalar * 16 }px`;
|
|
94
|
+
element.style.marginLeft = `${scalar * -17 }px`;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export { TerminalDecorationHoverManager, updateLayout };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
2
|
+
import { Disposable, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
3
|
+
class LineDataEventAddon extends Disposable {
|
|
4
|
+
constructor(_initializationPromise) {
|
|
5
|
+
super();
|
|
6
|
+
this._initializationPromise = _initializationPromise;
|
|
7
|
+
this._isOsSet = false;
|
|
8
|
+
this._onLineData = this._register(( new Emitter()));
|
|
9
|
+
this.onLineData = this._onLineData.event;
|
|
10
|
+
}
|
|
11
|
+
async activate(xterm) {
|
|
12
|
+
this._xterm = xterm;
|
|
13
|
+
await this._initializationPromise;
|
|
14
|
+
this._register(xterm.onLineFeed(() => {
|
|
15
|
+
const buffer = xterm.buffer;
|
|
16
|
+
const newLine = buffer.active.getLine(buffer.active.baseY + buffer.active.cursorY);
|
|
17
|
+
if (newLine && !newLine.isWrapped) {
|
|
18
|
+
this._sendLineData(buffer.active, buffer.active.baseY + buffer.active.cursorY - 1);
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
this._register(toDisposable(() => {
|
|
22
|
+
const buffer = xterm.buffer;
|
|
23
|
+
this._sendLineData(buffer.active, buffer.active.baseY + buffer.active.cursorY);
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
setOperatingSystem(os) {
|
|
27
|
+
if (this._isOsSet || !this._xterm) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
this._isOsSet = true;
|
|
31
|
+
if (os === 1 ) {
|
|
32
|
+
const xterm = this._xterm;
|
|
33
|
+
this._register(xterm.parser.registerCsiHandler({ final: 'H' }, () => {
|
|
34
|
+
const buffer = xterm.buffer;
|
|
35
|
+
this._sendLineData(buffer.active, buffer.active.baseY + buffer.active.cursorY);
|
|
36
|
+
return false;
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
_sendLineData(buffer, lineIndex) {
|
|
41
|
+
let line = buffer.getLine(lineIndex);
|
|
42
|
+
if (!line) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
let lineData = line.translateToString(true);
|
|
46
|
+
while (lineIndex > 0 && line.isWrapped) {
|
|
47
|
+
line = buffer.getLine(--lineIndex);
|
|
48
|
+
if (!line) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
lineData = line.translateToString(false) + lineData;
|
|
52
|
+
}
|
|
53
|
+
this._onLineData.fire(lineData);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export { LineDataEventAddon };
|