@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,417 @@
|
|
|
1
|
+
import { __decorate } from '../../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
3
|
+
import { withNullAsUndefined } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
4
|
+
import { OS } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
5
|
+
import * as path from 'monaco-editor/esm/vs/base/common/path.js';
|
|
6
|
+
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
7
|
+
import { getIconRegistry } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
8
|
+
import { debounce } from 'monaco-editor/esm/vs/base/common/decorators.js';
|
|
9
|
+
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
10
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
11
|
+
import { equals } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
12
|
+
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
13
|
+
import { NeverShowAgainScope } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
14
|
+
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
15
|
+
import { deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
16
|
+
import { isUriComponents, terminalProfileArgsMatch } from '../../../../platform/terminal/common/terminalProfiles.js';
|
|
17
|
+
const generatedProfileName = 'Generated';
|
|
18
|
+
let migrationMessageShown = false;
|
|
19
|
+
class BaseTerminalProfileResolverService {
|
|
20
|
+
get defaultProfileName() { return this._defaultProfileName; }
|
|
21
|
+
constructor(_context, _configurationService, _configurationResolverService, _historyService, _logService, _terminalProfileService, _workspaceContextService, _remoteAgentService, _storageService, _notificationService) {
|
|
22
|
+
this._context = _context;
|
|
23
|
+
this._configurationService = _configurationService;
|
|
24
|
+
this._configurationResolverService = _configurationResolverService;
|
|
25
|
+
this._historyService = _historyService;
|
|
26
|
+
this._logService = _logService;
|
|
27
|
+
this._terminalProfileService = _terminalProfileService;
|
|
28
|
+
this._workspaceContextService = _workspaceContextService;
|
|
29
|
+
this._remoteAgentService = _remoteAgentService;
|
|
30
|
+
this._storageService = _storageService;
|
|
31
|
+
this._notificationService = _notificationService;
|
|
32
|
+
this._iconRegistry = getIconRegistry();
|
|
33
|
+
if (this._remoteAgentService.getConnection()) {
|
|
34
|
+
this._remoteAgentService.getEnvironment().then(env => this._primaryBackendOs = env?.os || OS);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this._primaryBackendOs = OS;
|
|
38
|
+
}
|
|
39
|
+
this._configurationService.onDidChangeConfiguration(e => {
|
|
40
|
+
if (e.affectsConfiguration("terminal.integrated.defaultProfile.windows" ) ||
|
|
41
|
+
e.affectsConfiguration("terminal.integrated.defaultProfile.osx" ) ||
|
|
42
|
+
e.affectsConfiguration("terminal.integrated.defaultProfile.linux" )) {
|
|
43
|
+
this._refreshDefaultProfileName();
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
this._terminalProfileService.onDidChangeAvailableProfiles(() => this._refreshDefaultProfileName());
|
|
47
|
+
this.showProfileMigrationNotification();
|
|
48
|
+
}
|
|
49
|
+
async _refreshDefaultProfileName() {
|
|
50
|
+
if (this._primaryBackendOs) {
|
|
51
|
+
this._defaultProfileName = (await this.getDefaultProfile({
|
|
52
|
+
remoteAuthority: this._remoteAgentService.getConnection()?.remoteAuthority,
|
|
53
|
+
os: this._primaryBackendOs
|
|
54
|
+
}))?.profileName;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
resolveIcon(shellLaunchConfig, os) {
|
|
58
|
+
if (shellLaunchConfig.icon) {
|
|
59
|
+
shellLaunchConfig.icon = this._getCustomIcon(shellLaunchConfig.icon) || this.getDefaultIcon();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (shellLaunchConfig.customPtyImplementation) {
|
|
63
|
+
shellLaunchConfig.icon = this.getDefaultIcon();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (shellLaunchConfig.executable) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const defaultProfile = this._getUnresolvedRealDefaultProfile(os);
|
|
70
|
+
if (defaultProfile) {
|
|
71
|
+
shellLaunchConfig.icon = defaultProfile.icon;
|
|
72
|
+
}
|
|
73
|
+
if (!shellLaunchConfig.icon) {
|
|
74
|
+
shellLaunchConfig.icon = this.getDefaultIcon();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
getDefaultIcon(resource) {
|
|
78
|
+
return this._iconRegistry.getIcon(this._configurationService.getValue("terminal.integrated.tabs.defaultIcon" , { resource })) || Codicon.terminal;
|
|
79
|
+
}
|
|
80
|
+
async resolveShellLaunchConfig(shellLaunchConfig, options) {
|
|
81
|
+
let resolvedProfile;
|
|
82
|
+
if (shellLaunchConfig.executable) {
|
|
83
|
+
resolvedProfile = await this._resolveProfile({
|
|
84
|
+
path: shellLaunchConfig.executable,
|
|
85
|
+
args: shellLaunchConfig.args,
|
|
86
|
+
profileName: generatedProfileName,
|
|
87
|
+
isDefault: false
|
|
88
|
+
}, options);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
resolvedProfile = await this.getDefaultProfile(options);
|
|
92
|
+
}
|
|
93
|
+
shellLaunchConfig.executable = resolvedProfile.path;
|
|
94
|
+
shellLaunchConfig.args = resolvedProfile.args;
|
|
95
|
+
if (resolvedProfile.env) {
|
|
96
|
+
if (shellLaunchConfig.env) {
|
|
97
|
+
shellLaunchConfig.env = { ...shellLaunchConfig.env, ...resolvedProfile.env };
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
shellLaunchConfig.env = resolvedProfile.env;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const resource = shellLaunchConfig === undefined || typeof shellLaunchConfig.cwd === 'string' ? undefined : shellLaunchConfig.cwd;
|
|
104
|
+
shellLaunchConfig.icon = this._getCustomIcon(shellLaunchConfig.icon)
|
|
105
|
+
|| this._getCustomIcon(resolvedProfile.icon)
|
|
106
|
+
|| this.getDefaultIcon(resource);
|
|
107
|
+
if (resolvedProfile.overrideName) {
|
|
108
|
+
shellLaunchConfig.name = resolvedProfile.profileName;
|
|
109
|
+
}
|
|
110
|
+
shellLaunchConfig.color = shellLaunchConfig.color
|
|
111
|
+
|| resolvedProfile.color
|
|
112
|
+
|| this._configurationService.getValue("terminal.integrated.tabs.defaultColor" , { resource });
|
|
113
|
+
if (shellLaunchConfig.useShellEnvironment === undefined) {
|
|
114
|
+
shellLaunchConfig.useShellEnvironment = this._configurationService.getValue("terminal.integrated.inheritEnv" );
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
async getDefaultShell(options) {
|
|
118
|
+
return (await this.getDefaultProfile(options)).path;
|
|
119
|
+
}
|
|
120
|
+
async getDefaultShellArgs(options) {
|
|
121
|
+
return (await this.getDefaultProfile(options)).args || [];
|
|
122
|
+
}
|
|
123
|
+
async getDefaultProfile(options) {
|
|
124
|
+
return this._resolveProfile(await this._getUnresolvedDefaultProfile(options), options);
|
|
125
|
+
}
|
|
126
|
+
getEnvironment(remoteAuthority) {
|
|
127
|
+
return this._context.getEnvironment(remoteAuthority);
|
|
128
|
+
}
|
|
129
|
+
_getCustomIcon(icon) {
|
|
130
|
+
if (!icon) {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
if (typeof icon === 'string') {
|
|
134
|
+
return ThemeIcon.fromId(icon);
|
|
135
|
+
}
|
|
136
|
+
if (ThemeIcon.isThemeIcon(icon)) {
|
|
137
|
+
return icon;
|
|
138
|
+
}
|
|
139
|
+
if (URI.isUri(icon) || isUriComponents(icon)) {
|
|
140
|
+
return URI.revive(icon);
|
|
141
|
+
}
|
|
142
|
+
if (typeof icon === 'object' && 'light' in icon && 'dark' in icon) {
|
|
143
|
+
const castedIcon = icon;
|
|
144
|
+
if ((URI.isUri(castedIcon.light) || isUriComponents(castedIcon.light)) && (URI.isUri(castedIcon.dark) || isUriComponents(castedIcon.dark))) {
|
|
145
|
+
return { light: URI.revive(castedIcon.light), dark: URI.revive(castedIcon.dark) };
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
async _getUnresolvedDefaultProfile(options) {
|
|
151
|
+
if (options.allowAutomationShell) {
|
|
152
|
+
const automationShellProfile = this._getUnresolvedAutomationShellProfile(options);
|
|
153
|
+
if (automationShellProfile) {
|
|
154
|
+
return automationShellProfile;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const shellSettingProfile = await this._getUnresolvedShellSettingDefaultProfile(options);
|
|
158
|
+
if (shellSettingProfile) {
|
|
159
|
+
return this._setIconForAutomation(options, shellSettingProfile);
|
|
160
|
+
}
|
|
161
|
+
await this._terminalProfileService.profilesReady;
|
|
162
|
+
const defaultProfile = this._getUnresolvedRealDefaultProfile(options.os);
|
|
163
|
+
if (defaultProfile) {
|
|
164
|
+
return this._setIconForAutomation(options, defaultProfile);
|
|
165
|
+
}
|
|
166
|
+
return this._setIconForAutomation(options, await this._getUnresolvedFallbackDefaultProfile(options));
|
|
167
|
+
}
|
|
168
|
+
_setIconForAutomation(options, profile) {
|
|
169
|
+
if (options.allowAutomationShell) {
|
|
170
|
+
const profileClone = deepClone(profile);
|
|
171
|
+
profileClone.icon = Codicon.tools;
|
|
172
|
+
return profileClone;
|
|
173
|
+
}
|
|
174
|
+
return profile;
|
|
175
|
+
}
|
|
176
|
+
_getUnresolvedRealDefaultProfile(os) {
|
|
177
|
+
return this._terminalProfileService.getDefaultProfile(os);
|
|
178
|
+
}
|
|
179
|
+
async _getUnresolvedShellSettingDefaultProfile(options) {
|
|
180
|
+
let executable = this._configurationService.getValue(`${"terminal.integrated.shell." }${this._getOsKey(options.os)}`);
|
|
181
|
+
if (!this._isValidShell(executable)) {
|
|
182
|
+
const shellArgs = this._configurationService.inspect(`${"terminal.integrated.shellArgs." }${this._getOsKey(options.os)}`);
|
|
183
|
+
if (!shellArgs.userValue && !shellArgs.workspaceValue) {
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (!executable || !this._isValidShell(executable)) {
|
|
188
|
+
executable = await this._context.getDefaultSystemShell(options.remoteAuthority, options.os);
|
|
189
|
+
}
|
|
190
|
+
let args;
|
|
191
|
+
const shellArgsSetting = this._configurationService.getValue(`${"terminal.integrated.shellArgs." }${this._getOsKey(options.os)}`);
|
|
192
|
+
if (this._isValidShellArgs(shellArgsSetting, options.os)) {
|
|
193
|
+
args = shellArgsSetting;
|
|
194
|
+
}
|
|
195
|
+
if (args === undefined) {
|
|
196
|
+
if (options.os === 2 && args === undefined && path.parse(executable).name.match(/(zsh|bash|fish)/)) {
|
|
197
|
+
args = ['--login'];
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
args = [];
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
const icon = this._guessProfileIcon(executable);
|
|
204
|
+
return {
|
|
205
|
+
profileName: generatedProfileName,
|
|
206
|
+
path: executable,
|
|
207
|
+
args,
|
|
208
|
+
icon,
|
|
209
|
+
isDefault: false
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
async _getUnresolvedFallbackDefaultProfile(options) {
|
|
213
|
+
const executable = await this._context.getDefaultSystemShell(options.remoteAuthority, options.os);
|
|
214
|
+
if (options.os === OS) {
|
|
215
|
+
let existingProfile = this._terminalProfileService.availableProfiles.find(e => path.parse(e.path).name === path.parse(executable).name);
|
|
216
|
+
if (existingProfile) {
|
|
217
|
+
if (options.allowAutomationShell) {
|
|
218
|
+
existingProfile = deepClone(existingProfile);
|
|
219
|
+
existingProfile.icon = Codicon.tools;
|
|
220
|
+
}
|
|
221
|
+
return existingProfile;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
let args;
|
|
225
|
+
if (options.os === 2 && path.parse(executable).name.match(/(zsh|bash)/)) {
|
|
226
|
+
args = ['--login'];
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
args = [];
|
|
230
|
+
}
|
|
231
|
+
const icon = this._guessProfileIcon(executable);
|
|
232
|
+
return {
|
|
233
|
+
profileName: generatedProfileName,
|
|
234
|
+
path: executable,
|
|
235
|
+
args,
|
|
236
|
+
icon,
|
|
237
|
+
isDefault: false
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
_getUnresolvedAutomationShellProfile(options) {
|
|
241
|
+
const automationShell = this._configurationService.getValue(`terminal.integrated.automationShell.${this._getOsKey(options.os)}`);
|
|
242
|
+
if (automationShell && typeof automationShell === 'string') {
|
|
243
|
+
return {
|
|
244
|
+
path: automationShell,
|
|
245
|
+
profileName: generatedProfileName,
|
|
246
|
+
isDefault: false,
|
|
247
|
+
icon: Codicon.tools
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const automationProfile = this._configurationService.getValue(`terminal.integrated.automationProfile.${this._getOsKey(options.os)}`);
|
|
251
|
+
if (this._isValidAutomationProfile(automationProfile, options.os)) {
|
|
252
|
+
automationProfile.icon = this._getCustomIcon(automationProfile.icon) || Codicon.tools;
|
|
253
|
+
return automationProfile;
|
|
254
|
+
}
|
|
255
|
+
return undefined;
|
|
256
|
+
}
|
|
257
|
+
async _resolveProfile(profile, options) {
|
|
258
|
+
if (options.os === 1 ) {
|
|
259
|
+
const env = await this._context.getEnvironment(options.remoteAuthority);
|
|
260
|
+
const isWoW64 = !!env.hasOwnProperty('PROCESSOR_ARCHITEW6432');
|
|
261
|
+
const windir = env.windir;
|
|
262
|
+
if (!isWoW64 && windir) {
|
|
263
|
+
const sysnativePath = path.join(windir, 'Sysnative').replace(/\//g, '\\').toLowerCase();
|
|
264
|
+
if (profile.path && profile.path.toLowerCase().indexOf(sysnativePath) === 0) {
|
|
265
|
+
profile.path = path.join(windir, 'System32', profile.path.substr(sysnativePath.length + 1));
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (profile.path) {
|
|
269
|
+
profile.path = profile.path.replace(/\//g, '\\');
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const env = await this._context.getEnvironment(options.remoteAuthority);
|
|
273
|
+
const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(options.remoteAuthority ? Schemas.vscodeRemote : Schemas.file);
|
|
274
|
+
const lastActiveWorkspace = activeWorkspaceRootUri ? withNullAsUndefined(this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri)) : undefined;
|
|
275
|
+
profile.path = await this._resolveVariables(profile.path, env, lastActiveWorkspace);
|
|
276
|
+
if (profile.args) {
|
|
277
|
+
if (typeof profile.args === 'string') {
|
|
278
|
+
profile.args = await this._resolveVariables(profile.args, env, lastActiveWorkspace);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
profile.args = await Promise.all(( profile.args.map(arg => this._resolveVariables(arg, env, lastActiveWorkspace))));
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return profile;
|
|
285
|
+
}
|
|
286
|
+
async _resolveVariables(value, env, lastActiveWorkspace) {
|
|
287
|
+
try {
|
|
288
|
+
value = await this._configurationResolverService.resolveWithEnvironment(env, lastActiveWorkspace, value);
|
|
289
|
+
}
|
|
290
|
+
catch (e) {
|
|
291
|
+
this._logService.error(`Could not resolve shell`, e);
|
|
292
|
+
}
|
|
293
|
+
return value;
|
|
294
|
+
}
|
|
295
|
+
_getOsKey(os) {
|
|
296
|
+
switch (os) {
|
|
297
|
+
case 3 : return 'linux';
|
|
298
|
+
case 2 : return 'osx';
|
|
299
|
+
case 1 : return 'windows';
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
_guessProfileIcon(shell) {
|
|
303
|
+
const file = path.parse(shell).name;
|
|
304
|
+
switch (file) {
|
|
305
|
+
case 'bash':
|
|
306
|
+
return Codicon.terminalBash;
|
|
307
|
+
case 'pwsh':
|
|
308
|
+
case 'powershell':
|
|
309
|
+
return Codicon.terminalPowershell;
|
|
310
|
+
case 'tmux':
|
|
311
|
+
return Codicon.terminalTmux;
|
|
312
|
+
case 'cmd':
|
|
313
|
+
return Codicon.terminalCmd;
|
|
314
|
+
default:
|
|
315
|
+
return undefined;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
_isValidShell(shell) {
|
|
319
|
+
if (!shell) {
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
return typeof shell === 'string';
|
|
323
|
+
}
|
|
324
|
+
_isValidShellArgs(shellArgs, os) {
|
|
325
|
+
if (shellArgs === undefined) {
|
|
326
|
+
return true;
|
|
327
|
+
}
|
|
328
|
+
if (os === 1 && typeof shellArgs === 'string') {
|
|
329
|
+
return true;
|
|
330
|
+
}
|
|
331
|
+
if (Array.isArray(shellArgs) && shellArgs.every(e => typeof e === 'string')) {
|
|
332
|
+
return true;
|
|
333
|
+
}
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
async createProfileFromShellAndShellArgs(shell, shellArgs) {
|
|
337
|
+
const detectedProfile = this._terminalProfileService.availableProfiles?.find(p => {
|
|
338
|
+
if (p.path !== shell) {
|
|
339
|
+
return false;
|
|
340
|
+
}
|
|
341
|
+
if (p.args === undefined || typeof p.args === 'string') {
|
|
342
|
+
return p.args === shellArgs;
|
|
343
|
+
}
|
|
344
|
+
return p.path === shell && equals(p.args, (shellArgs || []));
|
|
345
|
+
});
|
|
346
|
+
const fallbackProfile = (await this.getDefaultProfile({
|
|
347
|
+
remoteAuthority: this._remoteAgentService.getConnection()?.remoteAuthority,
|
|
348
|
+
os: this._primaryBackendOs
|
|
349
|
+
}));
|
|
350
|
+
fallbackProfile.profileName = `${fallbackProfile.path} (migrated)`;
|
|
351
|
+
const profile = detectedProfile || fallbackProfile;
|
|
352
|
+
const args = this._isValidShellArgs(shellArgs, this._primaryBackendOs) ? shellArgs : profile.args;
|
|
353
|
+
const createdProfile = {
|
|
354
|
+
profileName: profile.profileName,
|
|
355
|
+
path: profile.path,
|
|
356
|
+
args,
|
|
357
|
+
isDefault: true
|
|
358
|
+
};
|
|
359
|
+
if (detectedProfile && detectedProfile.profileName === createdProfile.profileName && detectedProfile.path === createdProfile.path && terminalProfileArgsMatch(detectedProfile.args, createdProfile.args)) {
|
|
360
|
+
return detectedProfile.profileName;
|
|
361
|
+
}
|
|
362
|
+
return createdProfile;
|
|
363
|
+
}
|
|
364
|
+
_isValidAutomationProfile(profile, os) {
|
|
365
|
+
if (profile === null || profile === undefined || typeof profile !== 'object') {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
if ('path' in profile && typeof profile.path === 'string') {
|
|
369
|
+
return true;
|
|
370
|
+
}
|
|
371
|
+
return false;
|
|
372
|
+
}
|
|
373
|
+
async showProfileMigrationNotification() {
|
|
374
|
+
const shouldMigrateToProfile = (!!this._configurationService.getValue("terminal.integrated.shell." + this._primaryBackendOs) ||
|
|
375
|
+
!!this._configurationService.inspect("terminal.integrated.shellArgs." + this._primaryBackendOs).userValue) &&
|
|
376
|
+
!!this._configurationService.getValue("terminal.integrated.defaultProfile." + this._primaryBackendOs);
|
|
377
|
+
if (shouldMigrateToProfile && this._storageService.getBoolean("terminals.integrated.profile-migration" , 1 , true) && !migrationMessageShown) {
|
|
378
|
+
this._notificationService.prompt(Severity.Info, ( localize(
|
|
379
|
+
'terminalProfileMigration',
|
|
380
|
+
"The terminal is using deprecated shell/shellArgs settings, do you want to migrate it to a profile?"
|
|
381
|
+
)), [
|
|
382
|
+
{
|
|
383
|
+
label: ( localize('migrateToProfile', "Migrate")),
|
|
384
|
+
run: async () => {
|
|
385
|
+
const shell = this._configurationService.getValue("terminal.integrated.shell." + this._primaryBackendOs);
|
|
386
|
+
const shellArgs = this._configurationService.getValue("terminal.integrated.shellArgs." + this._primaryBackendOs);
|
|
387
|
+
const profile = await this.createProfileFromShellAndShellArgs(shell, shellArgs);
|
|
388
|
+
if (typeof profile === 'string') {
|
|
389
|
+
await this._configurationService.updateValue("terminal.integrated.defaultProfile." + this._primaryBackendOs, profile);
|
|
390
|
+
this._logService.trace(`migrated from shell/shellArgs, using existing profile ${profile}`);
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
const profiles = { ...this._configurationService.inspect("terminal.integrated.profiles." + this._primaryBackendOs).userValue };
|
|
394
|
+
const profileConfig = { path: profile.path };
|
|
395
|
+
if (profile.args) {
|
|
396
|
+
profileConfig.args = profile.args;
|
|
397
|
+
}
|
|
398
|
+
profiles[profile.profileName] = profileConfig;
|
|
399
|
+
await this._configurationService.updateValue("terminal.integrated.profiles." + this._primaryBackendOs, profiles);
|
|
400
|
+
await this._configurationService.updateValue("terminal.integrated.defaultProfile." + this._primaryBackendOs, profile.profileName);
|
|
401
|
+
this._logService.trace(`migrated from shell/shellArgs, ${shell} ${shellArgs} to profile ${JSON.stringify(profile)}`);
|
|
402
|
+
}
|
|
403
|
+
await this._configurationService.updateValue("terminal.integrated.shell." + this._primaryBackendOs, undefined);
|
|
404
|
+
await this._configurationService.updateValue("terminal.integrated.shellArgs." + this._primaryBackendOs, undefined);
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
], {
|
|
408
|
+
neverShowAgain: { id: "terminals.integrated.profile-migration" , scope: NeverShowAgainScope.WORKSPACE }
|
|
409
|
+
});
|
|
410
|
+
migrationMessageShown = true;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
BaseTerminalProfileResolverService.__decorator = ( __decorate([
|
|
415
|
+
debounce(200)
|
|
416
|
+
], BaseTerminalProfileResolverService.prototype, "_refreshDefaultProfileName", null));
|
|
417
|
+
export { BaseTerminalProfileResolverService };
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { equals } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
3
|
+
import { AutoOpenBarrier } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
4
|
+
import { throttle } from 'monaco-editor/esm/vs/base/common/decorators.js';
|
|
5
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
6
|
+
import { toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
7
|
+
import { isWeb, OS, isWindows, isMacintosh } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
8
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
9
|
+
import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
10
|
+
import { registerTerminalDefaultProfileConfiguration } from '../../../../platform/terminal/common/terminalPlatformConfiguration.js';
|
|
11
|
+
import { terminalProfileArgsMatch, terminalIconsEqual } from '../../../../platform/terminal/common/terminalProfiles.js';
|
|
12
|
+
import { ITerminalInstanceService } from './terminal.js';
|
|
13
|
+
import { refreshTerminalActions } from './terminalActions.js';
|
|
14
|
+
import { TerminalContextKeys } from '../common/terminalContextKey.js';
|
|
15
|
+
import { ITerminalContributionService } from '../common/terminalExtensionPoints.js';
|
|
16
|
+
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
|
|
17
|
+
import { IExtensionService } from '../../../services/extensions/common/extensions.js';
|
|
18
|
+
import { IRemoteAgentService } from '../../../services/remote/common/remoteAgentService.js';
|
|
19
|
+
let TerminalProfileService = class TerminalProfileService {
|
|
20
|
+
get onDidChangeAvailableProfiles() { return this._onDidChangeAvailableProfiles.event; }
|
|
21
|
+
get profilesReady() { return this._profilesReadyBarrier.wait().then(() => { }); }
|
|
22
|
+
get availableProfiles() {
|
|
23
|
+
if (!this._platformConfigJustRefreshed) {
|
|
24
|
+
this.refreshAvailableProfiles();
|
|
25
|
+
}
|
|
26
|
+
return this._availableProfiles || [];
|
|
27
|
+
}
|
|
28
|
+
get contributedProfiles() {
|
|
29
|
+
return this._contributedProfiles || [];
|
|
30
|
+
}
|
|
31
|
+
constructor(_contextKeyService, _configurationService, _terminalContributionService, _extensionService, _remoteAgentService, _environmentService, _terminalInstanceService) {
|
|
32
|
+
this._contextKeyService = _contextKeyService;
|
|
33
|
+
this._configurationService = _configurationService;
|
|
34
|
+
this._terminalContributionService = _terminalContributionService;
|
|
35
|
+
this._extensionService = _extensionService;
|
|
36
|
+
this._remoteAgentService = _remoteAgentService;
|
|
37
|
+
this._environmentService = _environmentService;
|
|
38
|
+
this._terminalInstanceService = _terminalInstanceService;
|
|
39
|
+
this._contributedProfiles = [];
|
|
40
|
+
this._platformConfigJustRefreshed = false;
|
|
41
|
+
this._profileProviders = ( new Map());
|
|
42
|
+
this._onDidChangeAvailableProfiles = ( new Emitter());
|
|
43
|
+
this._extensionService.onDidChangeExtensions(() => this.refreshAvailableProfiles());
|
|
44
|
+
this._webExtensionContributedProfileContextKey = TerminalContextKeys.webExtensionContributedProfile.bindTo(this._contextKeyService);
|
|
45
|
+
this._updateWebContextKey();
|
|
46
|
+
this._profilesReadyBarrier = ( new AutoOpenBarrier(20000));
|
|
47
|
+
this.refreshAvailableProfiles();
|
|
48
|
+
this._setupConfigListener();
|
|
49
|
+
}
|
|
50
|
+
async _setupConfigListener() {
|
|
51
|
+
const platformKey = await this.getPlatformKey();
|
|
52
|
+
this._configurationService.onDidChangeConfiguration(async (e) => {
|
|
53
|
+
if (e.affectsConfiguration("terminal.integrated.defaultProfile." + platformKey) ||
|
|
54
|
+
e.affectsConfiguration("terminal.integrated.profiles." + platformKey) ||
|
|
55
|
+
e.affectsConfiguration("terminal.integrated.useWslProfiles" )) {
|
|
56
|
+
if (e.source !== 7 ) {
|
|
57
|
+
this.refreshAvailableProfiles();
|
|
58
|
+
this._platformConfigJustRefreshed = false;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this._platformConfigJustRefreshed = true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
getDefaultProfileName() {
|
|
67
|
+
return this._defaultProfileName;
|
|
68
|
+
}
|
|
69
|
+
getDefaultProfile(os) {
|
|
70
|
+
let defaultProfileName;
|
|
71
|
+
if (os) {
|
|
72
|
+
defaultProfileName = this._configurationService.getValue(`${"terminal.integrated.defaultProfile." }${this._getOsKey(os)}`);
|
|
73
|
+
if (!defaultProfileName || typeof defaultProfileName !== 'string') {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
defaultProfileName = this._defaultProfileName;
|
|
79
|
+
}
|
|
80
|
+
if (!defaultProfileName) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
return this.availableProfiles.find(e => e.profileName === defaultProfileName && !e.isAutoDetected);
|
|
84
|
+
}
|
|
85
|
+
_getOsKey(os) {
|
|
86
|
+
switch (os) {
|
|
87
|
+
case 3 : return 'linux';
|
|
88
|
+
case 2 : return 'osx';
|
|
89
|
+
case 1 : return 'windows';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
refreshAvailableProfiles() {
|
|
93
|
+
this._refreshAvailableProfilesNow();
|
|
94
|
+
}
|
|
95
|
+
async _refreshAvailableProfilesNow() {
|
|
96
|
+
const profiles = await this._detectProfiles(true);
|
|
97
|
+
const profilesChanged = !(equals(profiles, this._availableProfiles, profilesEqual));
|
|
98
|
+
const contributedProfilesChanged = await this._updateContributedProfiles();
|
|
99
|
+
if (profilesChanged || contributedProfilesChanged) {
|
|
100
|
+
this._availableProfiles = profiles;
|
|
101
|
+
this._onDidChangeAvailableProfiles.fire(this._availableProfiles);
|
|
102
|
+
this._profilesReadyBarrier.open();
|
|
103
|
+
this._updateWebContextKey();
|
|
104
|
+
await this._refreshPlatformConfig(this._availableProfiles);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async _updateContributedProfiles() {
|
|
108
|
+
const platformKey = await this.getPlatformKey();
|
|
109
|
+
const excludedContributedProfiles = [];
|
|
110
|
+
const configProfiles = this._configurationService.getValue("terminal.integrated.profiles." + platformKey);
|
|
111
|
+
for (const [profileName, value] of Object.entries(configProfiles)) {
|
|
112
|
+
if (value === null) {
|
|
113
|
+
excludedContributedProfiles.push(profileName);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const filteredContributedProfiles = Array.from(this._terminalContributionService.terminalProfiles.filter(p => !excludedContributedProfiles.includes(p.title)));
|
|
117
|
+
const contributedProfilesChanged = !equals(filteredContributedProfiles, this._contributedProfiles, contributedProfilesEqual);
|
|
118
|
+
this._contributedProfiles = filteredContributedProfiles;
|
|
119
|
+
return contributedProfilesChanged;
|
|
120
|
+
}
|
|
121
|
+
getContributedProfileProvider(extensionIdentifier, id) {
|
|
122
|
+
const extMap = this._profileProviders.get(extensionIdentifier);
|
|
123
|
+
return extMap?.get(id);
|
|
124
|
+
}
|
|
125
|
+
async _detectProfiles(includeDetectedProfiles) {
|
|
126
|
+
const primaryBackend = await this._terminalInstanceService.getBackend(this._environmentService.remoteAuthority);
|
|
127
|
+
if (!primaryBackend) {
|
|
128
|
+
return this._availableProfiles || [];
|
|
129
|
+
}
|
|
130
|
+
const platform = await this.getPlatformKey();
|
|
131
|
+
this._defaultProfileName = this._configurationService.getValue(`${"terminal.integrated.defaultProfile." }${platform}`) ?? undefined;
|
|
132
|
+
return primaryBackend.getProfiles(this._configurationService.getValue(`${"terminal.integrated.profiles." }${platform}`), this._defaultProfileName, includeDetectedProfiles);
|
|
133
|
+
}
|
|
134
|
+
_updateWebContextKey() {
|
|
135
|
+
this._webExtensionContributedProfileContextKey.set(isWeb && this._contributedProfiles.length > 0);
|
|
136
|
+
}
|
|
137
|
+
async _refreshPlatformConfig(profiles) {
|
|
138
|
+
const env = await this._remoteAgentService.getEnvironment();
|
|
139
|
+
registerTerminalDefaultProfileConfiguration({ os: env?.os || OS, profiles }, this._contributedProfiles);
|
|
140
|
+
refreshTerminalActions(profiles);
|
|
141
|
+
}
|
|
142
|
+
async getPlatformKey() {
|
|
143
|
+
const env = await this._remoteAgentService.getEnvironment();
|
|
144
|
+
if (env) {
|
|
145
|
+
return env.os === 1 ? 'windows' : (env.os === 2 ? 'osx' : 'linux');
|
|
146
|
+
}
|
|
147
|
+
return isWindows ? 'windows' : (isMacintosh ? 'osx' : 'linux');
|
|
148
|
+
}
|
|
149
|
+
registerTerminalProfileProvider(extensionIdentifier, id, profileProvider) {
|
|
150
|
+
let extMap = this._profileProviders.get(extensionIdentifier);
|
|
151
|
+
if (!extMap) {
|
|
152
|
+
extMap = ( new Map());
|
|
153
|
+
this._profileProviders.set(extensionIdentifier, extMap);
|
|
154
|
+
}
|
|
155
|
+
extMap.set(id, profileProvider);
|
|
156
|
+
return toDisposable(() => this._profileProviders.delete(id));
|
|
157
|
+
}
|
|
158
|
+
async registerContributedProfile(args) {
|
|
159
|
+
const platformKey = await this.getPlatformKey();
|
|
160
|
+
const profilesConfig = await this._configurationService.getValue(`${"terminal.integrated.profiles." }${platformKey}`);
|
|
161
|
+
if (typeof profilesConfig === 'object') {
|
|
162
|
+
const newProfile = {
|
|
163
|
+
extensionIdentifier: args.extensionIdentifier,
|
|
164
|
+
icon: args.options.icon,
|
|
165
|
+
id: args.id,
|
|
166
|
+
title: args.title,
|
|
167
|
+
color: args.options.color
|
|
168
|
+
};
|
|
169
|
+
profilesConfig[args.title] = newProfile;
|
|
170
|
+
}
|
|
171
|
+
await this._configurationService.updateValue(`${"terminal.integrated.profiles." }${platformKey}`, profilesConfig, 2 );
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
async getContributedDefaultProfile(shellLaunchConfig) {
|
|
175
|
+
if (shellLaunchConfig && !shellLaunchConfig.extHostTerminalId && !('executable' in shellLaunchConfig)) {
|
|
176
|
+
const key = await this.getPlatformKey();
|
|
177
|
+
const defaultProfileName = this._configurationService.getValue(`${"terminal.integrated.defaultProfile." }${key}`);
|
|
178
|
+
const contributedDefaultProfile = this.contributedProfiles.find(p => p.title === defaultProfileName);
|
|
179
|
+
return contributedDefaultProfile;
|
|
180
|
+
}
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
TerminalProfileService.__decorator = ( __decorate([
|
|
185
|
+
throttle(2000)
|
|
186
|
+
], TerminalProfileService.prototype, "refreshAvailableProfiles", null));
|
|
187
|
+
TerminalProfileService = ( __decorate([
|
|
188
|
+
( __param(0, IContextKeyService)),
|
|
189
|
+
( __param(1, IConfigurationService)),
|
|
190
|
+
( __param(2, ITerminalContributionService)),
|
|
191
|
+
( __param(3, IExtensionService)),
|
|
192
|
+
( __param(4, IRemoteAgentService)),
|
|
193
|
+
( __param(5, IWorkbenchEnvironmentService)),
|
|
194
|
+
( __param(6, ITerminalInstanceService))
|
|
195
|
+
], TerminalProfileService));
|
|
196
|
+
function profilesEqual(one, other) {
|
|
197
|
+
return one.profileName === other.profileName &&
|
|
198
|
+
terminalProfileArgsMatch(one.args, other.args) &&
|
|
199
|
+
one.color === other.color &&
|
|
200
|
+
terminalIconsEqual(one.icon, other.icon) &&
|
|
201
|
+
one.isAutoDetected === other.isAutoDetected &&
|
|
202
|
+
one.isDefault === other.isDefault &&
|
|
203
|
+
one.overrideName === other.overrideName &&
|
|
204
|
+
one.path === other.path;
|
|
205
|
+
}
|
|
206
|
+
function contributedProfilesEqual(one, other) {
|
|
207
|
+
return one.extensionIdentifier === other.extensionIdentifier &&
|
|
208
|
+
one.color === other.color &&
|
|
209
|
+
one.icon === other.icon &&
|
|
210
|
+
one.id === other.id &&
|
|
211
|
+
one.title === other.title;
|
|
212
|
+
}
|
|
213
|
+
export { TerminalProfileService };
|