@codingame/monaco-vscode-api 32.0.0 → 32.0.2
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/package.json +8 -8
- package/services.js +3 -3
- package/vscode/src/vs/base/common/paging.js +66 -2
- package/vscode/src/vs/platform/extensionManagement/common/unsupportedExtensionsMigration.d.ts +14 -0
- package/vscode/src/vs/platform/extensionManagement/common/unsupportedExtensionsMigration.js +145 -0
- package/vscode/src/vs/platform/extensionRecommendations/common/extensionRecommendations.d.ts +19 -0
- package/vscode/src/vs/platform/extensionRecommendations/common/extensionRecommendations.js +25 -0
- package/vscode/src/vs/platform/extensionRecommendations/common/extensionRecommendations.service.d.ts +1 -1
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatScreenshotContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +43 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.js +86 -86
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatModes.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/editing/chatEditingService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookSchema.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookTypes.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptFileAttributes.js +79 -79
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptTypes.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/widget/input/modelPickerWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +11 -11
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +12 -12
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/common/languageConfigurationExtensionPoint.js +65 -65
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +9 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +14 -14
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +16 -16
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +12 -12
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorDiffInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +29 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +75 -75
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +38 -38
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +57 -57
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +18 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +9 -9
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +65 -65
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.js +2 -2
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.d.ts +76 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +470 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +83 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +66 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.d.ts +83 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +1353 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.js +49 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +728 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.d.ts +63 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +522 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.js +18 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.js +263 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +2227 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +179 -179
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.js +40 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.js +77 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.js +93 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +25 -25
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.js +100 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +7 -7
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.d.ts +151 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +1031 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.d.ts +235 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +1600 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +30 -30
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.d.ts +314 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +3449 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +368 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/keymapRecommendations.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/keymapRecommendations.js +30 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/languageRecommendations.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/languageRecommendations.js +30 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionEditor.css +910 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionManagement.css +12 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionsViewlet.css +229 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/loading-dark.svg +31 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/loading-hc.svg +31 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/loading.svg +31 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/runtimeExtensionsEditor.css +86 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/remoteRecommendations.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/remoteRecommendations.js +38 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/unsupportedExtensionsMigrationContribution.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/unsupportedExtensionsMigrationContribution.js +41 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +38 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +179 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionQuery.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionQuery.js +90 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +5 -5
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +50 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +47 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -4
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +3 -3
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +8 -8
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +18 -18
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +14 -14
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +39 -39
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +84 -84
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands._save.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +28 -28
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +50 -50
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +7 -7
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +17 -17
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +7 -7
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/common/files.js +16 -16
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommandsAddConfiguration.js +66 -66
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +40 -40
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpConfiguration.js +42 -42
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +16 -16
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +4 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +23 -23
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +8 -8
- package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnection.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/meteredConnection/browser/meteredConnectionStatus.js +4 -4
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +17 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +29 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +3 -3
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +13 -13
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +10 -10
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +60 -60
- package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +3 -3
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +21 -21
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +15 -15
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +17 -17
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +59 -59
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistory.js +11 -11
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.js +6 -6
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.js +14 -14
- package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +9 -9
- package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +9 -9
- package/vscode/src/vs/workbench/contrib/search/browser/searchChatContext.js +5 -5
- package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +20 -20
- package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +14 -14
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +55 -55
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +2 -2
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +5 -5
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +6 -6
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +6 -6
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +13 -13
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +40 -40
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +10 -10
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -23
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +17 -17
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +26 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/common/terminalAccessibilityConfiguration.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/autoReplies/common/terminalAutoRepliesConfiguration.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.js +72 -72
- package/vscode/src/vs/workbench/contrib/terminalContrib/commandGuide/common/terminalCommandGuideConfiguration.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/history/common/terminal.history.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/inlineHint/common/terminalInitialHintConfiguration.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/notification/common/terminalNotificationConfiguration.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/common/terminalStickyScrollConfiguration.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/suggest/common/terminalSuggestConfiguration.js +30 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/typeAhead/common/terminalTypeAheadConfiguration.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/zoom/common/terminal.zoom.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomains.js +6 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindAccessibilityHelp.js +30 -30
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.js +14 -14
- package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +2 -2
- package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +35 -0
- package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +876 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +11 -11
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +5 -5
- package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.js +16 -16
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +16 -16
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +1 -1
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionsIcons.js +3 -3
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +6 -6
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +10 -10
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +88 -88
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +5 -5
- package/vscode/src/vs/workbench/services/language/common/languageService.js +24 -24
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/policies/common/accountPolicyService.js +1 -1
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +2 -2
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +7 -7
- package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +4 -4
- package/vscode/src/vs/workbench/services/preferences/common/preferencesModels.js +2 -2
- package/vscode/src/vs/workbench/services/preferences/common/preferencesValidation.js +30 -30
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +9 -9
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +3 -3
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +18 -18
- package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +8 -8
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +24 -24
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -3
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +16 -16
|
@@ -0,0 +1,2227 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerCss } from '../../../../../../../css.js';
|
|
3
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
4
|
+
import { CancellationToken } from '../../../../base/common/cancellation.js';
|
|
5
|
+
import { onUnexpectedError } from '../../../../base/common/errors.js';
|
|
6
|
+
import { Event } from '../../../../base/common/event.js';
|
|
7
|
+
import { KeyMod as KeyMod$1, KeyCode } from '../../../../base/common/keyCodes.js';
|
|
8
|
+
import { mnemonicButtonLabel } from '../../../../base/common/labels.js';
|
|
9
|
+
import { isDisposable, Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';
|
|
10
|
+
import { Schemas } from '../../../../base/common/network.js';
|
|
11
|
+
import { isNative, isWeb } from '../../../../base/common/platform.js';
|
|
12
|
+
import { PolicyCategory } from '../../../../base/common/policy.js';
|
|
13
|
+
import { URI } from '../../../../base/common/uri.js';
|
|
14
|
+
import { CopyAction, CutAction, PasteAction } from '../../../../editor/contrib/clipboard/browser/clipboard.js';
|
|
15
|
+
import { localize, localize2 } from '../../../../nls.js';
|
|
16
|
+
import { Categories } from '../../../../platform/action/common/actionCommonCategories.js';
|
|
17
|
+
import { MenuRegistry, MenuId, registerAction2, Action2 } from '../../../../platform/actions/common/actions.js';
|
|
18
|
+
import { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.service.js';
|
|
19
|
+
import { CommandsRegistry } from '../../../../platform/commands/common/commands.js';
|
|
20
|
+
import { ICommandService } from '../../../../platform/commands/common/commands.service.js';
|
|
21
|
+
import { Extensions as Extensions$2, ConfigurationScope } from '../../../../platform/configuration/common/configurationRegistry.js';
|
|
22
|
+
import { RawContextKey, ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';
|
|
23
|
+
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
24
|
+
import { IFileDialogService, IDialogService } from '../../../../platform/dialogs/common/dialogs.service.js';
|
|
25
|
+
import { ExtensionGalleryServiceUrlConfigKey, ExtensionGalleryManifestStatus, getExtensionGalleryManifestResourceUri, ExtensionGalleryResourceType } from '../../../../platform/extensionManagement/common/extensionGalleryManifest.js';
|
|
26
|
+
import { IExtensionGalleryManifestService } from '../../../../platform/extensionManagement/common/extensionGalleryManifest.service.js';
|
|
27
|
+
import { ExtensionRequestsTimeoutConfigKey, VerifyExtensionSignatureConfigKey, EXTENSION_INSTALL_SOURCE_CONTEXT, ExtensionInstallSource, ExtensionsLocalizedLabel, PreferencesLocalizedLabel, FilterType } from '../../../../platform/extensionManagement/common/extensionManagement.js';
|
|
28
|
+
import { IExtensionGalleryService, IExtensionManagementService } from '../../../../platform/extensionManagement/common/extensionManagement.service.js';
|
|
29
|
+
import { areSameExtensions, getIdAndVersion } from '../../../../platform/extensionManagement/common/extensionManagementUtil.js';
|
|
30
|
+
import { ExtensionStorageService } from '../../../../platform/extensionManagement/common/extensionStorage.js';
|
|
31
|
+
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
32
|
+
import { EXTENSION_CATEGORIES, ExtensionType } from '../../../../platform/extensions/common/extensions.js';
|
|
33
|
+
import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js';
|
|
34
|
+
import '../../../../platform/instantiation/common/extensions.js';
|
|
35
|
+
import { Extensions as Extensions$3 } from '../../../../platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
36
|
+
import '../../../../platform/notification/common/notification.js';
|
|
37
|
+
import { INotificationService } from '../../../../platform/notification/common/notification.service.js';
|
|
38
|
+
import product from '../../../../platform/product/common/product.js';
|
|
39
|
+
import { IProductService } from '../../../../platform/product/common/productService.service.js';
|
|
40
|
+
import { ProgressLocation } from '../../../../platform/progress/common/progress.js';
|
|
41
|
+
import { Extensions } from '../../../../platform/quickinput/common/quickAccess.js';
|
|
42
|
+
import { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.service.js';
|
|
43
|
+
import { Registry } from '../../../../platform/registry/common/platform.js';
|
|
44
|
+
import { StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js';
|
|
45
|
+
import { IStorageService } from '../../../../platform/storage/common/storage.service.js';
|
|
46
|
+
import { IUriIdentityService } from '../../../../platform/uriIdentity/common/uriIdentity.service.js';
|
|
47
|
+
import { IUserDataProfilesService } from '../../../../platform/userDataProfile/common/userDataProfile.service.js';
|
|
48
|
+
import { EditorPaneDescriptor } from '../../../browser/editor.js';
|
|
49
|
+
import { Extensions as Extensions$5 } from '../../../common/configuration.js';
|
|
50
|
+
import { IsSessionsWindowContext, WorkbenchStateContext, ResourceContextKey } from '../../../common/contextkeys.js';
|
|
51
|
+
import { Extensions as Extensions$4, registerWorkbenchContribution2, WorkbenchPhase } from '../../../common/contributions.js';
|
|
52
|
+
import { EditorExtensions } from '../../../common/editor.js';
|
|
53
|
+
import { Extensions as Extensions$1, ViewContainerLocation } from '../../../common/views.js';
|
|
54
|
+
import { DEFAULT_ACCOUNT_SIGN_IN_COMMAND } from '../../../services/accounts/browser/defaultAccount.js';
|
|
55
|
+
import { IEditorService } from '../../../services/editor/common/editorService.service.js';
|
|
56
|
+
import { EnablementState } from '../../../services/extensionManagement/common/extensionManagement.js';
|
|
57
|
+
import { IWorkbenchExtensionManagementService, IExtensionManagementServerService, IWorkbenchExtensionEnablementService } from '../../../services/extensionManagement/common/extensionManagement.service.js';
|
|
58
|
+
import { IExtensionIgnoredRecommendationsService } from '../../../services/extensionRecommendations/common/extensionRecommendations.service.js';
|
|
59
|
+
import { IWorkspaceExtensionsConfigService } from '../../../services/extensionRecommendations/common/workspaceExtensionsConfig.service.js';
|
|
60
|
+
import { EXTENSIONS_SUPPORT_AGENTS_WINDOW } from '../../../services/extensions/common/extensionManifestPropertiesService.js';
|
|
61
|
+
import { IHostService } from '../../../services/host/browser/host.service.js';
|
|
62
|
+
import { LifecyclePhase } from '../../../services/lifecycle/common/lifecycle.js';
|
|
63
|
+
import { IPreferencesService } from '../../../services/preferences/common/preferences.service.js';
|
|
64
|
+
import { CONTEXT_SYNC_ENABLEMENT } from '../../../services/userDataSync/common/userDataSync.js';
|
|
65
|
+
import { IViewsService } from '../../../services/views/common/viewsService.service.js';
|
|
66
|
+
import { WORKSPACE_TRUST_EXTENSION_SUPPORT } from '../../../services/workspaces/common/workspaceTrust.js';
|
|
67
|
+
import { IPluginInstallService } from '../../chat/common/plugins/pluginInstallService.service.js';
|
|
68
|
+
import { ILanguageModelToolsService } from '../../chat/common/tools/languageModelToolsService.service.js';
|
|
69
|
+
import { CONTEXT_KEYBINDINGS_EDITOR } from '../../preferences/common/preferences.js';
|
|
70
|
+
import '../../../services/extensionManagement/common/extensionFeatures.js';
|
|
71
|
+
import { VIEWLET_ID, AutoRestartConfigurationKey, CONTEXT_HAS_GALLERY, CONTEXT_EXTENSIONS_GALLERY_STATUS, AutoUpdateConfigurationKey, OUTDATED_EXTENSIONS_VIEW_ID, HasOutdatedExtensionsContext, INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID, SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID, ExtensionRuntimeActionType, extensionsSearchActionsMenu, extensionsFilterSubMenu, LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID, DefaultViewsContext, WORKSPACE_RECOMMENDATIONS_VIEW_ID, THEME_ACTIONS_GROUP, INSTALL_ACTIONS_GROUP, UPDATE_ACTIONS_GROUP, TOGGLE_IGNORE_EXTENSION_ACTION_ID, EXTENSIONS_CATEGORY } from '../common/extensions.js';
|
|
72
|
+
import { IExtensionsWorkbenchService } from '../common/extensions.service.js';
|
|
73
|
+
import { ExtensionsConfigurationSchemaId, ExtensionsConfigurationSchema } from '../common/extensionsFileTemplate.js';
|
|
74
|
+
import { ExtensionsInput } from '../common/extensionsInput.js';
|
|
75
|
+
import { KeymapExtensions } from '../common/extensionsUtils.js';
|
|
76
|
+
import { SearchExtensionsTool, SearchExtensionsToolData } from '../common/searchExtensionsTool.js';
|
|
77
|
+
import { ShowRuntimeExtensionsAction } from './abstractRuntimeExtensionsEditor.js';
|
|
78
|
+
import { ExtensionEditor } from './extensionEditor.js';
|
|
79
|
+
import { ExtensionEnablementWorkspaceTrustTransitionParticipant } from './extensionEnablementWorkspaceTrustTransitionParticipant.js';
|
|
80
|
+
import './extensionRecommendationNotificationService.js';
|
|
81
|
+
import './extensionRecommendationsService.js';
|
|
82
|
+
import { ConfigureWorkspaceFolderRecommendedExtensionsAction, InstallSpecificVersionOfExtensionAction, SetColorThemeAction, SetFileIconThemeAction, SetProductIconThemeAction, ToggleAutoUpdateForExtensionAction, ToggleAutoUpdatesForPublisherAction, TogglePreReleaseExtensionAction, ClearLanguageAction, InstallAction, InstallAnotherVersionAction, ConfigureWorkspaceRecommendedExtensionsAction } from './extensionsActions.js';
|
|
83
|
+
import { ExtensionActivationProgress } from './extensionsActivationProgress.js';
|
|
84
|
+
import { ExtensionsCompletionItemsProvider } from './extensionsCompletionItemsProvider.js';
|
|
85
|
+
import { ExtensionDependencyChecker } from './extensionsDependencyChecker.js';
|
|
86
|
+
import { extensionsViewIcon, installWorkspaceRecommendedIcon, filterIcon, clearSearchResultsIcon, refreshIcon, configureRecommendedIcon } from './extensionsIcons.js';
|
|
87
|
+
import { ManageExtensionsQuickAccessProvider, InstallExtensionQuickAccessProvider } from './extensionsQuickAccess.js';
|
|
88
|
+
import { ExtensionsViewPaneContainer, SearchHasTextContext, StatusUpdater, MaliciousExtensionChecker, ExtensionsViewletViewsContribution, ExtensionMarketplaceStatusUpdater } from './extensionsViewlet.js';
|
|
89
|
+
import './extensionsWorkbenchService.js';
|
|
90
|
+
import * as extensionManagement from './media/extensionManagement.css';
|
|
91
|
+
import { UnsupportedExtensionsMigrationContrib } from './unsupportedExtensionsMigrationContribution.js';
|
|
92
|
+
import Severity$1 from '../../../../base/common/severity.js';
|
|
93
|
+
|
|
94
|
+
registerCss(extensionManagement);
|
|
95
|
+
( Registry.as(Extensions.Quickaccess)).registerQuickAccessProvider({
|
|
96
|
+
ctor: ManageExtensionsQuickAccessProvider,
|
|
97
|
+
prefix: ManageExtensionsQuickAccessProvider.PREFIX,
|
|
98
|
+
placeholder: ( localize(9450, "Press Enter to manage extensions.")),
|
|
99
|
+
helpEntries: [{
|
|
100
|
+
description: ( localize(9451, "Manage Extensions"))
|
|
101
|
+
}]
|
|
102
|
+
});
|
|
103
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
104
|
+
EditorPaneDescriptor.create(ExtensionEditor, ExtensionEditor.ID, ( localize(9452, "Extension"))),
|
|
105
|
+
[( new SyncDescriptor(ExtensionsInput))]
|
|
106
|
+
);
|
|
107
|
+
const VIEW_CONTAINER = ( Registry.as(Extensions$1.ViewContainersRegistry)).registerViewContainer({
|
|
108
|
+
id: VIEWLET_ID,
|
|
109
|
+
title: ( localize2(9453, "Extensions")),
|
|
110
|
+
openCommandActionDescriptor: {
|
|
111
|
+
id: VIEWLET_ID,
|
|
112
|
+
mnemonicTitle: ( localize(9454, "E&&xtensions")),
|
|
113
|
+
keybindings: {
|
|
114
|
+
primary: KeyMod$1.CtrlCmd | KeyMod$1.Shift | KeyCode.KeyX
|
|
115
|
+
},
|
|
116
|
+
order: 4
|
|
117
|
+
},
|
|
118
|
+
ctorDescriptor: ( new SyncDescriptor(ExtensionsViewPaneContainer)),
|
|
119
|
+
icon: extensionsViewIcon,
|
|
120
|
+
order: 4,
|
|
121
|
+
rejectAddedViews: true,
|
|
122
|
+
alwaysUseContainerInfo: true
|
|
123
|
+
}, ViewContainerLocation.Sidebar);
|
|
124
|
+
( Registry.as(Extensions$2.Configuration)).registerConfiguration({
|
|
125
|
+
id: "extensions",
|
|
126
|
+
order: 30,
|
|
127
|
+
title: ( localize(9455, "Extensions")),
|
|
128
|
+
type: "object",
|
|
129
|
+
properties: {
|
|
130
|
+
"extensions.autoUpdate": {
|
|
131
|
+
enum: [true, "onlyEnabledExtensions", false],
|
|
132
|
+
enumItemLabels: [( localize(9456, "All Extensions")), ( localize(9457, "Only Enabled Extensions")), ( localize(9458, "None"))],
|
|
133
|
+
enumDescriptions: [( localize(9459, "Download and install updates automatically for all extensions.")), ( localize(
|
|
134
|
+
9460,
|
|
135
|
+
"Download and install updates automatically only for enabled extensions."
|
|
136
|
+
)), ( localize(9461, "Extensions are not automatically updated."))],
|
|
137
|
+
description: ( localize(
|
|
138
|
+
9462,
|
|
139
|
+
"Controls the automatic update behavior of extensions. The updates are fetched from a Microsoft online service."
|
|
140
|
+
)),
|
|
141
|
+
default: true,
|
|
142
|
+
scope: ConfigurationScope.APPLICATION,
|
|
143
|
+
tags: ["usesOnlineServices"]
|
|
144
|
+
},
|
|
145
|
+
"extensions.autoCheckUpdates": {
|
|
146
|
+
type: "boolean",
|
|
147
|
+
description: ( localize(
|
|
148
|
+
9463,
|
|
149
|
+
"When enabled, automatically checks extensions for updates. If an extension has an update, it is marked as outdated in the Extensions view. The updates are fetched from a Microsoft online service."
|
|
150
|
+
)),
|
|
151
|
+
default: true,
|
|
152
|
+
scope: ConfigurationScope.APPLICATION,
|
|
153
|
+
tags: ["usesOnlineServices"]
|
|
154
|
+
},
|
|
155
|
+
"extensions.ignoreRecommendations": {
|
|
156
|
+
type: "boolean",
|
|
157
|
+
description: ( localize(
|
|
158
|
+
9464,
|
|
159
|
+
"When enabled, the notifications for extension recommendations will not be shown."
|
|
160
|
+
)),
|
|
161
|
+
default: false,
|
|
162
|
+
agentsWindow: {
|
|
163
|
+
default: true,
|
|
164
|
+
readOnly: true
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"extensions.showRecommendationsOnlyOnDemand": {
|
|
168
|
+
type: "boolean",
|
|
169
|
+
deprecationMessage: ( localize(
|
|
170
|
+
9465,
|
|
171
|
+
"This setting is deprecated. Use extensions.ignoreRecommendations setting to control recommendation notifications. Use Extensions view's visibility actions to hide Recommended view by default."
|
|
172
|
+
)),
|
|
173
|
+
default: false,
|
|
174
|
+
tags: ["usesOnlineServices"]
|
|
175
|
+
},
|
|
176
|
+
"extensions.closeExtensionDetailsOnViewChange": {
|
|
177
|
+
type: "boolean",
|
|
178
|
+
description: ( localize(
|
|
179
|
+
9466,
|
|
180
|
+
"When enabled, editors with extension details will be automatically closed upon navigating away from the Extensions View."
|
|
181
|
+
)),
|
|
182
|
+
default: false
|
|
183
|
+
},
|
|
184
|
+
"extensions.confirmedUriHandlerExtensionIds": {
|
|
185
|
+
type: "array",
|
|
186
|
+
items: {
|
|
187
|
+
type: "string"
|
|
188
|
+
},
|
|
189
|
+
description: ( localize(
|
|
190
|
+
9467,
|
|
191
|
+
"When an extension is listed here, a confirmation prompt will not be shown when that extension handles a URI."
|
|
192
|
+
)),
|
|
193
|
+
default: [],
|
|
194
|
+
scope: ConfigurationScope.APPLICATION
|
|
195
|
+
},
|
|
196
|
+
"extensions.webWorker": {
|
|
197
|
+
type: ["boolean", "string"],
|
|
198
|
+
enum: [true, false, "auto"],
|
|
199
|
+
enumDescriptions: [( localize(9468, "The Web Worker Extension Host will always be launched.")), ( localize(9469, "The Web Worker Extension Host will never be launched.")), ( localize(
|
|
200
|
+
9470,
|
|
201
|
+
"The Web Worker Extension Host will be launched when a web extension needs it."
|
|
202
|
+
))],
|
|
203
|
+
description: ( localize(9471, "Enable web worker extension host.")),
|
|
204
|
+
default: "auto"
|
|
205
|
+
},
|
|
206
|
+
"extensions.supportVirtualWorkspaces": {
|
|
207
|
+
type: "object",
|
|
208
|
+
markdownDescription: ( localize(9472, "Override the virtual workspaces support of an extension.")),
|
|
209
|
+
patternProperties: {
|
|
210
|
+
"([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$": {
|
|
211
|
+
type: "boolean",
|
|
212
|
+
default: false
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
additionalProperties: false,
|
|
216
|
+
default: {},
|
|
217
|
+
defaultSnippets: [{
|
|
218
|
+
"body": {
|
|
219
|
+
"pub.name": false
|
|
220
|
+
}
|
|
221
|
+
}]
|
|
222
|
+
},
|
|
223
|
+
[EXTENSIONS_SUPPORT_AGENTS_WINDOW]: {
|
|
224
|
+
type: "object",
|
|
225
|
+
scope: ConfigurationScope.APPLICATION,
|
|
226
|
+
markdownDescription: ( localize(
|
|
227
|
+
9473,
|
|
228
|
+
"Override the Agents window support of an extension. Extensions using `true` will be enabled in the Agents window even when they would otherwise be disabled."
|
|
229
|
+
)),
|
|
230
|
+
patternProperties: {
|
|
231
|
+
"([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$": {
|
|
232
|
+
type: "boolean",
|
|
233
|
+
default: false
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
additionalProperties: false,
|
|
237
|
+
default: {},
|
|
238
|
+
defaultSnippets: [{
|
|
239
|
+
"body": {
|
|
240
|
+
"pub.name": true
|
|
241
|
+
}
|
|
242
|
+
}]
|
|
243
|
+
},
|
|
244
|
+
"extensions.experimental.affinity": {
|
|
245
|
+
type: "object",
|
|
246
|
+
markdownDescription: ( localize(
|
|
247
|
+
9474,
|
|
248
|
+
"Configure an extension to execute in a different extension host process."
|
|
249
|
+
)),
|
|
250
|
+
patternProperties: {
|
|
251
|
+
"([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$": {
|
|
252
|
+
type: "integer",
|
|
253
|
+
default: 1
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
additionalProperties: false,
|
|
257
|
+
default: {},
|
|
258
|
+
defaultSnippets: [{
|
|
259
|
+
"body": {
|
|
260
|
+
"pub.name": 1
|
|
261
|
+
}
|
|
262
|
+
}]
|
|
263
|
+
},
|
|
264
|
+
[WORKSPACE_TRUST_EXTENSION_SUPPORT]: {
|
|
265
|
+
type: "object",
|
|
266
|
+
scope: ConfigurationScope.APPLICATION,
|
|
267
|
+
markdownDescription: ( localize(
|
|
268
|
+
9475,
|
|
269
|
+
"Override the untrusted workspace support of an extension. Extensions using `true` will always be enabled. Extensions using `limited` will always be enabled, and the extension will hide functionality that requires trust. Extensions using `false` will only be enabled only when the workspace is trusted."
|
|
270
|
+
)),
|
|
271
|
+
patternProperties: {
|
|
272
|
+
"([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$": {
|
|
273
|
+
type: "object",
|
|
274
|
+
properties: {
|
|
275
|
+
"supported": {
|
|
276
|
+
type: ["boolean", "string"],
|
|
277
|
+
enum: [true, false, "limited"],
|
|
278
|
+
enumDescriptions: [( localize(9476, "Extension will always be enabled.")), ( localize(9477, "Extension will only be enabled only when the workspace is trusted.")), ( localize(
|
|
279
|
+
9478,
|
|
280
|
+
"Extension will always be enabled, and the extension will hide functionality requiring trust."
|
|
281
|
+
))],
|
|
282
|
+
description: ( localize(9479, "Defines the untrusted workspace support setting for the extension."))
|
|
283
|
+
},
|
|
284
|
+
"version": {
|
|
285
|
+
type: "string",
|
|
286
|
+
description: ( localize(
|
|
287
|
+
9480,
|
|
288
|
+
"Defines the version of the extension for which the override should be applied. If not specified, the override will be applied independent of the extension version."
|
|
289
|
+
))
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"extensions.experimental.deferredStartupFinishedActivation": {
|
|
296
|
+
type: "boolean",
|
|
297
|
+
description: ( localize(
|
|
298
|
+
9481,
|
|
299
|
+
"When enabled, extensions which declare the `onStartupFinished` activation event will be activated after a timeout."
|
|
300
|
+
)),
|
|
301
|
+
default: false
|
|
302
|
+
},
|
|
303
|
+
"extensions.experimental.issueQuickAccess": {
|
|
304
|
+
type: "boolean",
|
|
305
|
+
description: ( localize(
|
|
306
|
+
9482,
|
|
307
|
+
"When enabled, extensions can be searched for via Quick Access and report issues from there."
|
|
308
|
+
)),
|
|
309
|
+
default: true
|
|
310
|
+
},
|
|
311
|
+
"extensions.allowOpenInModalEditor": {
|
|
312
|
+
type: "boolean",
|
|
313
|
+
description: ( localize(
|
|
314
|
+
9483,
|
|
315
|
+
"Controls whether extensions and MCP servers open in a modal editor overlay."
|
|
316
|
+
)),
|
|
317
|
+
default: false,
|
|
318
|
+
tags: ["experimental"],
|
|
319
|
+
experiment: {
|
|
320
|
+
mode: "auto"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
[VerifyExtensionSignatureConfigKey]: {
|
|
324
|
+
type: "boolean",
|
|
325
|
+
description: ( localize(
|
|
326
|
+
9484,
|
|
327
|
+
"When enabled, extensions are verified to be signed before getting installed."
|
|
328
|
+
)),
|
|
329
|
+
default: true,
|
|
330
|
+
scope: ConfigurationScope.APPLICATION,
|
|
331
|
+
included: isNative
|
|
332
|
+
},
|
|
333
|
+
[AutoRestartConfigurationKey]: {
|
|
334
|
+
type: "boolean",
|
|
335
|
+
description: ( localize(
|
|
336
|
+
9485,
|
|
337
|
+
"If activated, extensions will automatically restart following an update if the window is not in focus. There can be a data loss if you have open Notebooks or Custom Editors."
|
|
338
|
+
)),
|
|
339
|
+
default: false,
|
|
340
|
+
included: product.quality !== "stable"
|
|
341
|
+
},
|
|
342
|
+
[ExtensionGalleryServiceUrlConfigKey]: {
|
|
343
|
+
type: "string",
|
|
344
|
+
description: ( localize(9486, "Configure the Marketplace service URL to connect to")),
|
|
345
|
+
default: "",
|
|
346
|
+
scope: ConfigurationScope.APPLICATION,
|
|
347
|
+
tags: ["usesOnlineServices"],
|
|
348
|
+
included: false,
|
|
349
|
+
policy: {
|
|
350
|
+
name: "ExtensionGalleryServiceUrl",
|
|
351
|
+
category: PolicyCategory.Extensions,
|
|
352
|
+
minimumVersion: "1.99",
|
|
353
|
+
localization: {
|
|
354
|
+
description: {
|
|
355
|
+
key: "extensions.gallery.serviceUrl",
|
|
356
|
+
value: ( localize(9486, "Configure the Marketplace service URL to connect to"))
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"extensions.supportNodeGlobalNavigator": {
|
|
362
|
+
type: "boolean",
|
|
363
|
+
description: ( localize(
|
|
364
|
+
9487,
|
|
365
|
+
"When enabled, Node.js navigator object is exposed on the global scope."
|
|
366
|
+
)),
|
|
367
|
+
default: false
|
|
368
|
+
},
|
|
369
|
+
[ExtensionRequestsTimeoutConfigKey]: {
|
|
370
|
+
type: "number",
|
|
371
|
+
description: ( localize(
|
|
372
|
+
9488,
|
|
373
|
+
"Controls the timeout in milliseconds for HTTP requests made when fetching extensions from the Marketplace"
|
|
374
|
+
)),
|
|
375
|
+
default: 60_000,
|
|
376
|
+
scope: ConfigurationScope.APPLICATION,
|
|
377
|
+
tags: ["advanced", "usesOnlineServices"]
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
const jsonRegistry = ( Registry.as(Extensions$3.JSONContribution));
|
|
382
|
+
jsonRegistry.registerSchema(ExtensionsConfigurationSchemaId, ExtensionsConfigurationSchema);
|
|
383
|
+
CommandsRegistry.registerCommand(
|
|
384
|
+
"_extensions.manage",
|
|
385
|
+
(accessor, extensionId, tab, preserveFocus, feature) => {
|
|
386
|
+
const extensionService = accessor.get(IExtensionsWorkbenchService);
|
|
387
|
+
const extension = extensionService.local.find(e => areSameExtensions(e.identifier, {
|
|
388
|
+
id: extensionId
|
|
389
|
+
}));
|
|
390
|
+
if (extension) {
|
|
391
|
+
extensionService.open(extension, {
|
|
392
|
+
tab,
|
|
393
|
+
preserveFocus,
|
|
394
|
+
feature
|
|
395
|
+
});
|
|
396
|
+
} else {
|
|
397
|
+
throw ( new Error(( localize(9489, "Extension '{0}' not found.", extensionId))));
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
);
|
|
401
|
+
CommandsRegistry.registerCommand(
|
|
402
|
+
"extension.open",
|
|
403
|
+
async (accessor, extensionId, tab, preserveFocus, feature, sideByside) => {
|
|
404
|
+
const extensionService = accessor.get(IExtensionsWorkbenchService);
|
|
405
|
+
const commandService = accessor.get(ICommandService);
|
|
406
|
+
const [extension] = await extensionService.getExtensions([{
|
|
407
|
+
id: extensionId
|
|
408
|
+
}], CancellationToken.None);
|
|
409
|
+
if (extension) {
|
|
410
|
+
return extensionService.open(extension, {
|
|
411
|
+
tab,
|
|
412
|
+
preserveFocus,
|
|
413
|
+
feature,
|
|
414
|
+
sideByside
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
return commandService.executeCommand("_extensions.manage", extensionId, tab, preserveFocus, feature);
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
CommandsRegistry.registerCommand({
|
|
421
|
+
id: "workbench.extensions.installExtension",
|
|
422
|
+
metadata: {
|
|
423
|
+
description: ( localize(9490, "Install the given extension")),
|
|
424
|
+
args: [{
|
|
425
|
+
name: "extensionIdOrVSIXUri",
|
|
426
|
+
description: ( localize(9491, "Extension id or VSIX resource uri")),
|
|
427
|
+
constraint: value => typeof value === "string" || value instanceof URI
|
|
428
|
+
}, {
|
|
429
|
+
name: "options",
|
|
430
|
+
description: "(optional) Options for installing the extension. Object with the following properties: " + "`installOnlyNewlyAddedFromExtensionPackVSIX`: When enabled, VS Code installs only newly added extensions from the extension pack VSIX. This option is considered only when installing VSIX. ",
|
|
431
|
+
isOptional: true,
|
|
432
|
+
schema: {
|
|
433
|
+
"type": "object",
|
|
434
|
+
"properties": {
|
|
435
|
+
"installOnlyNewlyAddedFromExtensionPackVSIX": {
|
|
436
|
+
"type": "boolean",
|
|
437
|
+
"description": ( localize(
|
|
438
|
+
9492,
|
|
439
|
+
"When enabled, VS Code installs only newly added extensions from the extension pack VSIX. This option is considered only while installing a VSIX."
|
|
440
|
+
)),
|
|
441
|
+
default: false
|
|
442
|
+
},
|
|
443
|
+
"installPreReleaseVersion": {
|
|
444
|
+
"type": "boolean",
|
|
445
|
+
"description": ( localize(
|
|
446
|
+
9493,
|
|
447
|
+
"When enabled, VS Code installs the pre-release version of the extension if available."
|
|
448
|
+
)),
|
|
449
|
+
default: false
|
|
450
|
+
},
|
|
451
|
+
"donotSync": {
|
|
452
|
+
"type": "boolean",
|
|
453
|
+
"description": ( localize(
|
|
454
|
+
9494,
|
|
455
|
+
"When enabled, VS Code do not sync this extension when Settings Sync is on."
|
|
456
|
+
)),
|
|
457
|
+
default: false
|
|
458
|
+
},
|
|
459
|
+
"justification": {
|
|
460
|
+
"type": ["string", "object"],
|
|
461
|
+
"description": ( localize(
|
|
462
|
+
9495,
|
|
463
|
+
"Justification for installing the extension. This is a string or an object that can be used to pass any information to the installation handlers. i.e. `{reason: 'This extension wants to open a URI', action: 'Open URI'}` will show a message box with the reason and action upon install."
|
|
464
|
+
))
|
|
465
|
+
},
|
|
466
|
+
"enable": {
|
|
467
|
+
"type": "boolean",
|
|
468
|
+
"description": ( localize(
|
|
469
|
+
9496,
|
|
470
|
+
"When enabled, the extension will be enabled if it is installed but disabled. If the extension is already enabled, this has no effect."
|
|
471
|
+
)),
|
|
472
|
+
default: false
|
|
473
|
+
},
|
|
474
|
+
"context": {
|
|
475
|
+
"type": "object",
|
|
476
|
+
"description": ( localize(
|
|
477
|
+
9497,
|
|
478
|
+
"Context for the installation. This is a JSON object that can be used to pass any information to the installation handlers. i.e. `{skipWalkthrough: true}` will skip opening the walkthrough upon install."
|
|
479
|
+
))
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}]
|
|
484
|
+
},
|
|
485
|
+
handler: async (accessor, arg, options) => {
|
|
486
|
+
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
487
|
+
const extensionManagementService = accessor.get(IWorkbenchExtensionManagementService);
|
|
488
|
+
const extensionGalleryService = accessor.get(IExtensionGalleryService);
|
|
489
|
+
try {
|
|
490
|
+
if (typeof arg === "string") {
|
|
491
|
+
const [id, version] = getIdAndVersion(arg);
|
|
492
|
+
const extension = extensionsWorkbenchService.local.find(e => areSameExtensions(e.identifier, {
|
|
493
|
+
id,
|
|
494
|
+
uuid: version
|
|
495
|
+
}));
|
|
496
|
+
if (extension?.enablementState === EnablementState.DisabledByExtensionKind) {
|
|
497
|
+
const [gallery] = await extensionGalleryService.getExtensions([{
|
|
498
|
+
id,
|
|
499
|
+
preRelease: options?.installPreReleaseVersion
|
|
500
|
+
}], CancellationToken.None);
|
|
501
|
+
if (!gallery) {
|
|
502
|
+
throw ( new Error(( localize(9489, "Extension '{0}' not found.", arg))));
|
|
503
|
+
}
|
|
504
|
+
await extensionManagementService.installFromGallery(gallery, {
|
|
505
|
+
isMachineScoped: options?.donotSync ? true : undefined,
|
|
506
|
+
installPreReleaseVersion: options?.installPreReleaseVersion,
|
|
507
|
+
installGivenVersion: !!version,
|
|
508
|
+
context: {
|
|
509
|
+
...options?.context,
|
|
510
|
+
[EXTENSION_INSTALL_SOURCE_CONTEXT]: ExtensionInstallSource.COMMAND
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
} else {
|
|
514
|
+
await extensionsWorkbenchService.install(id, {
|
|
515
|
+
version,
|
|
516
|
+
installPreReleaseVersion: options?.installPreReleaseVersion,
|
|
517
|
+
context: {
|
|
518
|
+
...options?.context,
|
|
519
|
+
[EXTENSION_INSTALL_SOURCE_CONTEXT]: ExtensionInstallSource.COMMAND
|
|
520
|
+
},
|
|
521
|
+
justification: options?.justification,
|
|
522
|
+
enable: options?.enable,
|
|
523
|
+
isMachineScoped: options?.donotSync ? true : undefined
|
|
524
|
+
}, ProgressLocation.Notification);
|
|
525
|
+
}
|
|
526
|
+
} else {
|
|
527
|
+
const vsix = URI.revive(arg);
|
|
528
|
+
await extensionsWorkbenchService.install(vsix, {
|
|
529
|
+
installGivenVersion: true
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
} catch (e) {
|
|
533
|
+
onUnexpectedError(e);
|
|
534
|
+
throw e;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
CommandsRegistry.registerCommand({
|
|
539
|
+
id: "workbench.extensions.uninstallExtension",
|
|
540
|
+
metadata: {
|
|
541
|
+
description: ( localize(9498, "Uninstall the given extension")),
|
|
542
|
+
args: [{
|
|
543
|
+
name: ( localize(9499, "Id of the extension to uninstall")),
|
|
544
|
+
schema: {
|
|
545
|
+
"type": "string"
|
|
546
|
+
}
|
|
547
|
+
}]
|
|
548
|
+
},
|
|
549
|
+
handler: async (accessor, id) => {
|
|
550
|
+
if (!id) {
|
|
551
|
+
throw ( new Error(( localize(9500, "Extension id required."))));
|
|
552
|
+
}
|
|
553
|
+
const extensionManagementService = accessor.get(IExtensionManagementService);
|
|
554
|
+
const installed = await extensionManagementService.getInstalled();
|
|
555
|
+
const [extensionToUninstall] = installed.filter(e => areSameExtensions(e.identifier, {
|
|
556
|
+
id
|
|
557
|
+
}));
|
|
558
|
+
if (!extensionToUninstall) {
|
|
559
|
+
throw ( new Error(( localize(
|
|
560
|
+
9501,
|
|
561
|
+
"Extension '{0}' is not installed. Make sure you use the full extension ID, including the publisher, e.g.: ms-dotnettools.csharp.",
|
|
562
|
+
id
|
|
563
|
+
))));
|
|
564
|
+
}
|
|
565
|
+
if (extensionToUninstall.isBuiltin) {
|
|
566
|
+
throw ( new Error(( localize(
|
|
567
|
+
9502,
|
|
568
|
+
"Extension '{0}' is a Built-in extension and cannot be uninstalled",
|
|
569
|
+
id
|
|
570
|
+
))));
|
|
571
|
+
}
|
|
572
|
+
try {
|
|
573
|
+
await extensionManagementService.uninstall(extensionToUninstall);
|
|
574
|
+
} catch (e) {
|
|
575
|
+
onUnexpectedError(e);
|
|
576
|
+
throw e;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
CommandsRegistry.registerCommand({
|
|
581
|
+
id: "workbench.extensions.search",
|
|
582
|
+
metadata: {
|
|
583
|
+
description: ( localize(9503, "Search for a specific extension")),
|
|
584
|
+
args: [{
|
|
585
|
+
name: ( localize(9504, "Query to use in search")),
|
|
586
|
+
schema: {
|
|
587
|
+
"type": "string"
|
|
588
|
+
}
|
|
589
|
+
}]
|
|
590
|
+
},
|
|
591
|
+
handler: async (accessor, query = "") => {
|
|
592
|
+
return accessor.get(IExtensionsWorkbenchService).openSearch(query);
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
function overrideActionForActiveExtensionEditorWebview(command, f) {
|
|
596
|
+
command?.addImplementation(105, "extensions-editor", accessor => {
|
|
597
|
+
const editorService = accessor.get(IEditorService);
|
|
598
|
+
const editor = editorService.activeEditorPane;
|
|
599
|
+
if (editor instanceof ExtensionEditor) {
|
|
600
|
+
if (editor.activeWebview?.isFocused) {
|
|
601
|
+
f(editor.activeWebview);
|
|
602
|
+
return true;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
return false;
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
overrideActionForActiveExtensionEditorWebview(CopyAction, webview => webview.copy());
|
|
609
|
+
overrideActionForActiveExtensionEditorWebview(CutAction, webview => webview.cut());
|
|
610
|
+
overrideActionForActiveExtensionEditorWebview(PasteAction, webview => webview.paste());
|
|
611
|
+
const CONTEXT_HAS_LOCAL_SERVER = ( new RawContextKey("hasLocalServer", false));
|
|
612
|
+
const CONTEXT_HAS_REMOTE_SERVER = ( new RawContextKey("hasRemoteServer", false));
|
|
613
|
+
const CONTEXT_HAS_WEB_SERVER = ( new RawContextKey("hasWebServer", false));
|
|
614
|
+
const CONTEXT_GALLERY_SORT_CAPABILITIES = ( new RawContextKey("gallerySortCapabilities", ""));
|
|
615
|
+
const CONTEXT_GALLERY_FILTER_CAPABILITIES = ( new RawContextKey("galleryFilterCapabilities", ""));
|
|
616
|
+
const CONTEXT_GALLERY_ALL_PUBLIC_REPOSITORY_SIGNED = ( new RawContextKey("galleryAllPublicRepositorySigned", false));
|
|
617
|
+
const CONTEXT_GALLERY_ALL_PRIVATE_REPOSITORY_SIGNED = ( new RawContextKey("galleryAllPrivateRepositorySigned", false));
|
|
618
|
+
const CONTEXT_GALLERY_HAS_EXTENSION_LINK = ( new RawContextKey("galleryHasExtensionLink", false));
|
|
619
|
+
async function runAction(action) {
|
|
620
|
+
try {
|
|
621
|
+
await action.run();
|
|
622
|
+
} finally {
|
|
623
|
+
if (isDisposable(action)) {
|
|
624
|
+
action.dispose();
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
let ExtensionsContributions = class ExtensionsContributions extends Disposable {
|
|
629
|
+
constructor(
|
|
630
|
+
extensionManagementService,
|
|
631
|
+
extensionManagementServerService,
|
|
632
|
+
extensionGalleryManifestService,
|
|
633
|
+
contextKeyService,
|
|
634
|
+
viewsService,
|
|
635
|
+
extensionsWorkbenchService,
|
|
636
|
+
extensionEnablementService,
|
|
637
|
+
instantiationService,
|
|
638
|
+
dialogService,
|
|
639
|
+
commandService,
|
|
640
|
+
productService,
|
|
641
|
+
pluginInstallService
|
|
642
|
+
) {
|
|
643
|
+
super();
|
|
644
|
+
this.extensionManagementService = extensionManagementService;
|
|
645
|
+
this.extensionManagementServerService = extensionManagementServerService;
|
|
646
|
+
this.extensionGalleryManifestService = extensionGalleryManifestService;
|
|
647
|
+
this.contextKeyService = contextKeyService;
|
|
648
|
+
this.viewsService = viewsService;
|
|
649
|
+
this.extensionsWorkbenchService = extensionsWorkbenchService;
|
|
650
|
+
this.extensionEnablementService = extensionEnablementService;
|
|
651
|
+
this.instantiationService = instantiationService;
|
|
652
|
+
this.dialogService = dialogService;
|
|
653
|
+
this.commandService = commandService;
|
|
654
|
+
this.productService = productService;
|
|
655
|
+
this.pluginInstallService = pluginInstallService;
|
|
656
|
+
const hasLocalServerContext = CONTEXT_HAS_LOCAL_SERVER.bindTo(contextKeyService);
|
|
657
|
+
if (this.extensionManagementServerService.localExtensionManagementServer) {
|
|
658
|
+
hasLocalServerContext.set(true);
|
|
659
|
+
}
|
|
660
|
+
const hasRemoteServerContext = CONTEXT_HAS_REMOTE_SERVER.bindTo(contextKeyService);
|
|
661
|
+
if (this.extensionManagementServerService.remoteExtensionManagementServer) {
|
|
662
|
+
hasRemoteServerContext.set(true);
|
|
663
|
+
}
|
|
664
|
+
const hasWebServerContext = CONTEXT_HAS_WEB_SERVER.bindTo(contextKeyService);
|
|
665
|
+
if (this.extensionManagementServerService.webExtensionManagementServer) {
|
|
666
|
+
hasWebServerContext.set(true);
|
|
667
|
+
}
|
|
668
|
+
this.updateExtensionGalleryStatusContexts();
|
|
669
|
+
this._register(
|
|
670
|
+
extensionGalleryManifestService.onDidChangeExtensionGalleryManifestStatus(() => this.updateExtensionGalleryStatusContexts())
|
|
671
|
+
);
|
|
672
|
+
extensionGalleryManifestService.getExtensionGalleryManifest().then(extensionGalleryManifest => {
|
|
673
|
+
this.updateGalleryCapabilitiesContexts(extensionGalleryManifest);
|
|
674
|
+
this._register(extensionGalleryManifestService.onDidChangeExtensionGalleryManifest(
|
|
675
|
+
extensionGalleryManifest => this.updateGalleryCapabilitiesContexts(extensionGalleryManifest)
|
|
676
|
+
));
|
|
677
|
+
});
|
|
678
|
+
this.registerGlobalActions();
|
|
679
|
+
this.registerContextMenuActions();
|
|
680
|
+
this.registerQuickAccessProvider();
|
|
681
|
+
}
|
|
682
|
+
async updateExtensionGalleryStatusContexts() {
|
|
683
|
+
CONTEXT_HAS_GALLERY.bindTo(this.contextKeyService).set(
|
|
684
|
+
this.extensionGalleryManifestService.extensionGalleryManifestStatus === ExtensionGalleryManifestStatus.Available
|
|
685
|
+
);
|
|
686
|
+
CONTEXT_EXTENSIONS_GALLERY_STATUS.bindTo(this.contextKeyService).set(this.extensionGalleryManifestService.extensionGalleryManifestStatus);
|
|
687
|
+
}
|
|
688
|
+
async updateGalleryCapabilitiesContexts(extensionGalleryManifest) {
|
|
689
|
+
CONTEXT_GALLERY_SORT_CAPABILITIES.bindTo(this.contextKeyService).set(
|
|
690
|
+
`_${extensionGalleryManifest?.capabilities.extensionQuery.sorting?.map(s => s.name)?.join("_")}_UpdateDate_`
|
|
691
|
+
);
|
|
692
|
+
CONTEXT_GALLERY_FILTER_CAPABILITIES.bindTo(this.contextKeyService).set(
|
|
693
|
+
`_${extensionGalleryManifest?.capabilities.extensionQuery.filtering?.map(s => s.name)?.join("_")}_`
|
|
694
|
+
);
|
|
695
|
+
CONTEXT_GALLERY_ALL_PUBLIC_REPOSITORY_SIGNED.bindTo(this.contextKeyService).set(
|
|
696
|
+
!!extensionGalleryManifest?.capabilities?.signing?.allPublicRepositorySigned
|
|
697
|
+
);
|
|
698
|
+
CONTEXT_GALLERY_ALL_PRIVATE_REPOSITORY_SIGNED.bindTo(this.contextKeyService).set(
|
|
699
|
+
!!extensionGalleryManifest?.capabilities?.signing?.allPrivateRepositorySigned
|
|
700
|
+
);
|
|
701
|
+
CONTEXT_GALLERY_HAS_EXTENSION_LINK.bindTo(this.contextKeyService).set(!!(extensionGalleryManifest && getExtensionGalleryManifestResourceUri(
|
|
702
|
+
extensionGalleryManifest,
|
|
703
|
+
ExtensionGalleryResourceType.ExtensionDetailsViewUri
|
|
704
|
+
)));
|
|
705
|
+
}
|
|
706
|
+
registerQuickAccessProvider() {
|
|
707
|
+
if (this.extensionManagementServerService.localExtensionManagementServer || this.extensionManagementServerService.remoteExtensionManagementServer || this.extensionManagementServerService.webExtensionManagementServer) {
|
|
708
|
+
( Registry.as(Extensions.Quickaccess)).registerQuickAccessProvider({
|
|
709
|
+
ctor: InstallExtensionQuickAccessProvider,
|
|
710
|
+
prefix: InstallExtensionQuickAccessProvider.PREFIX,
|
|
711
|
+
placeholder: ( localize(9505, "Type the name of an extension to install or search.")),
|
|
712
|
+
helpEntries: [{
|
|
713
|
+
description: ( localize(9506, "Install or Search Extensions"))
|
|
714
|
+
}]
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
registerGlobalActions() {
|
|
719
|
+
this._register(MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
720
|
+
command: {
|
|
721
|
+
id: VIEWLET_ID,
|
|
722
|
+
title: ( localize(9507, "&&Extensions"))
|
|
723
|
+
},
|
|
724
|
+
group: "2_configuration",
|
|
725
|
+
order: 3,
|
|
726
|
+
when: ( IsSessionsWindowContext.negate())
|
|
727
|
+
}));
|
|
728
|
+
this._register(MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
729
|
+
command: {
|
|
730
|
+
id: VIEWLET_ID,
|
|
731
|
+
title: ( localize(9508, "Extensions"))
|
|
732
|
+
},
|
|
733
|
+
group: "2_configuration",
|
|
734
|
+
order: 3
|
|
735
|
+
}));
|
|
736
|
+
this.registerExtensionAction({
|
|
737
|
+
id: "workbench.extensions.action.focusExtensionsView",
|
|
738
|
+
title: ( localize2(9509, "Focus on Extensions View")),
|
|
739
|
+
category: ExtensionsLocalizedLabel,
|
|
740
|
+
f1: true,
|
|
741
|
+
run: async accessor => {
|
|
742
|
+
await accessor.get(IExtensionsWorkbenchService).openSearch("");
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
this.registerExtensionAction({
|
|
746
|
+
id: "workbench.extensions.action.installExtensions",
|
|
747
|
+
title: ( localize2(9510, "Install Extensions")),
|
|
748
|
+
category: ExtensionsLocalizedLabel,
|
|
749
|
+
menu: {
|
|
750
|
+
id: MenuId.CommandPalette,
|
|
751
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.or(
|
|
752
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
753
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
754
|
+
CONTEXT_HAS_WEB_SERVER
|
|
755
|
+
))))
|
|
756
|
+
},
|
|
757
|
+
run: async accessor => {
|
|
758
|
+
accessor.get(IViewsService).openViewContainer(VIEWLET_ID, true);
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
this.registerExtensionAction({
|
|
762
|
+
id: "workbench.extensions.action.showRecommendedKeymapExtensions",
|
|
763
|
+
title: ( localize2(9511, "Keymaps")),
|
|
764
|
+
category: PreferencesLocalizedLabel,
|
|
765
|
+
menu: [{
|
|
766
|
+
id: MenuId.CommandPalette,
|
|
767
|
+
when: CONTEXT_HAS_GALLERY
|
|
768
|
+
}, {
|
|
769
|
+
id: MenuId.EditorTitle,
|
|
770
|
+
when: ( ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_HAS_GALLERY)),
|
|
771
|
+
group: "2_keyboard_discover_actions"
|
|
772
|
+
}],
|
|
773
|
+
menuTitles: {
|
|
774
|
+
[MenuId.EditorTitle.id]: ( localize(9512, "Migrate Keyboard Shortcuts from..."))
|
|
775
|
+
},
|
|
776
|
+
run: () => this.extensionsWorkbenchService.openSearch("@recommended:keymaps ")
|
|
777
|
+
});
|
|
778
|
+
this.registerExtensionAction({
|
|
779
|
+
id: "workbench.extensions.action.showLanguageExtensions",
|
|
780
|
+
title: ( localize2(9513, "Language Extensions")),
|
|
781
|
+
category: PreferencesLocalizedLabel,
|
|
782
|
+
menu: {
|
|
783
|
+
id: MenuId.CommandPalette,
|
|
784
|
+
when: CONTEXT_HAS_GALLERY
|
|
785
|
+
},
|
|
786
|
+
run: () => this.extensionsWorkbenchService.openSearch("@recommended:languages ")
|
|
787
|
+
});
|
|
788
|
+
this.registerExtensionAction({
|
|
789
|
+
id: "workbench.extensions.action.checkForUpdates",
|
|
790
|
+
title: ( localize2(9514, "Check for Extension Updates")),
|
|
791
|
+
category: ExtensionsLocalizedLabel,
|
|
792
|
+
menu: [{
|
|
793
|
+
id: MenuId.CommandPalette,
|
|
794
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.or(
|
|
795
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
796
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
797
|
+
CONTEXT_HAS_WEB_SERVER
|
|
798
|
+
))))
|
|
799
|
+
}, {
|
|
800
|
+
id: MenuId.ViewContainerTitle,
|
|
801
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)), CONTEXT_HAS_GALLERY)),
|
|
802
|
+
group: "1_updates",
|
|
803
|
+
order: 1
|
|
804
|
+
}],
|
|
805
|
+
run: async () => {
|
|
806
|
+
const [, pluginResult] = await Promise.all([
|
|
807
|
+
this.extensionsWorkbenchService.checkForUpdates(),
|
|
808
|
+
this.pluginInstallService.updateAllPlugins({
|
|
809
|
+
silent: true
|
|
810
|
+
}, CancellationToken.None)
|
|
811
|
+
]);
|
|
812
|
+
const outdated = this.extensionsWorkbenchService.outdated;
|
|
813
|
+
if (outdated.length) {
|
|
814
|
+
return this.extensionsWorkbenchService.openSearch("@outdated ");
|
|
815
|
+
} else if (pluginResult.updatedNames.length === 0 && pluginResult.failedNames.length === 0) {
|
|
816
|
+
return this.dialogService.info(( localize(9515, "All extensions are up to date.")));
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
const enableAutoUpdateWhenCondition = ( ContextKeyExpr.equals(`config.${AutoUpdateConfigurationKey}`, false));
|
|
821
|
+
this.registerExtensionAction({
|
|
822
|
+
id: "workbench.extensions.action.enableAutoUpdate",
|
|
823
|
+
title: ( localize2(9516, "Enable Auto Update for All Extensions")),
|
|
824
|
+
category: ExtensionsLocalizedLabel,
|
|
825
|
+
precondition: enableAutoUpdateWhenCondition,
|
|
826
|
+
menu: [{
|
|
827
|
+
id: MenuId.ViewContainerTitle,
|
|
828
|
+
order: 5,
|
|
829
|
+
group: "1_updates",
|
|
830
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)), enableAutoUpdateWhenCondition))
|
|
831
|
+
}, {
|
|
832
|
+
id: MenuId.CommandPalette
|
|
833
|
+
}],
|
|
834
|
+
run: accessor => accessor.get(IExtensionsWorkbenchService).updateAutoUpdateForAllExtensions(true)
|
|
835
|
+
});
|
|
836
|
+
const disableAutoUpdateWhenCondition = ( ContextKeyExpr.notEquals(`config.${AutoUpdateConfigurationKey}`, false));
|
|
837
|
+
this.registerExtensionAction({
|
|
838
|
+
id: "workbench.extensions.action.disableAutoUpdate",
|
|
839
|
+
title: ( localize2(9517, "Disable Auto Update for All Extensions")),
|
|
840
|
+
precondition: disableAutoUpdateWhenCondition,
|
|
841
|
+
category: ExtensionsLocalizedLabel,
|
|
842
|
+
menu: [{
|
|
843
|
+
id: MenuId.ViewContainerTitle,
|
|
844
|
+
order: 5,
|
|
845
|
+
group: "1_updates",
|
|
846
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)), disableAutoUpdateWhenCondition))
|
|
847
|
+
}, {
|
|
848
|
+
id: MenuId.CommandPalette
|
|
849
|
+
}],
|
|
850
|
+
run: accessor => accessor.get(IExtensionsWorkbenchService).updateAutoUpdateForAllExtensions(false)
|
|
851
|
+
});
|
|
852
|
+
this.registerExtensionAction({
|
|
853
|
+
id: "workbench.extensions.action.updateAllExtensions",
|
|
854
|
+
title: ( localize2(9518, "Update All Extensions")),
|
|
855
|
+
category: ExtensionsLocalizedLabel,
|
|
856
|
+
precondition: HasOutdatedExtensionsContext,
|
|
857
|
+
menu: [{
|
|
858
|
+
id: MenuId.CommandPalette,
|
|
859
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.or(
|
|
860
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
861
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
862
|
+
CONTEXT_HAS_WEB_SERVER
|
|
863
|
+
))))
|
|
864
|
+
}, {
|
|
865
|
+
id: MenuId.ViewContainerTitle,
|
|
866
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)), ( ContextKeyExpr.or(( ( ContextKeyExpr.has(`config.${AutoUpdateConfigurationKey}`)).negate()), ( ContextKeyExpr.equals(`config.${AutoUpdateConfigurationKey}`, "onlyEnabledExtensions")))))),
|
|
867
|
+
group: "1_updates",
|
|
868
|
+
order: 2
|
|
869
|
+
}, {
|
|
870
|
+
id: MenuId.ViewTitle,
|
|
871
|
+
when: ( ContextKeyExpr.equals("view", OUTDATED_EXTENSIONS_VIEW_ID)),
|
|
872
|
+
group: "navigation",
|
|
873
|
+
order: 1
|
|
874
|
+
}],
|
|
875
|
+
icon: installWorkspaceRecommendedIcon,
|
|
876
|
+
run: async () => {
|
|
877
|
+
await this.extensionsWorkbenchService.updateAll();
|
|
878
|
+
}
|
|
879
|
+
});
|
|
880
|
+
this.registerExtensionAction({
|
|
881
|
+
id: "workbench.extensions.action.enableAll",
|
|
882
|
+
title: ( localize2(9519, "Enable All Extensions")),
|
|
883
|
+
category: ExtensionsLocalizedLabel,
|
|
884
|
+
menu: [{
|
|
885
|
+
id: MenuId.CommandPalette,
|
|
886
|
+
when: ( ContextKeyExpr.or(
|
|
887
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
888
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
889
|
+
CONTEXT_HAS_WEB_SERVER
|
|
890
|
+
))
|
|
891
|
+
}, {
|
|
892
|
+
id: MenuId.ViewContainerTitle,
|
|
893
|
+
when: ( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)),
|
|
894
|
+
group: "2_enablement",
|
|
895
|
+
order: 1
|
|
896
|
+
}],
|
|
897
|
+
run: async () => {
|
|
898
|
+
const extensionsToEnable = this.extensionsWorkbenchService.local.filter(
|
|
899
|
+
e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && !this.extensionEnablementService.isEnabled(e.local)
|
|
900
|
+
);
|
|
901
|
+
if (extensionsToEnable.length) {
|
|
902
|
+
await this.extensionsWorkbenchService.setEnablement(extensionsToEnable, EnablementState.EnabledGlobally);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
this.registerExtensionAction({
|
|
907
|
+
id: "workbench.extensions.action.enableAllWorkspace",
|
|
908
|
+
title: ( localize2(9520, "Enable All Extensions for this Workspace")),
|
|
909
|
+
category: ExtensionsLocalizedLabel,
|
|
910
|
+
menu: {
|
|
911
|
+
id: MenuId.CommandPalette,
|
|
912
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo("empty")), ( ContextKeyExpr.or(
|
|
913
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
914
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
915
|
+
CONTEXT_HAS_WEB_SERVER
|
|
916
|
+
))))
|
|
917
|
+
},
|
|
918
|
+
run: async () => {
|
|
919
|
+
const extensionsToEnable = this.extensionsWorkbenchService.local.filter(
|
|
920
|
+
e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && !this.extensionEnablementService.isEnabled(e.local)
|
|
921
|
+
);
|
|
922
|
+
if (extensionsToEnable.length) {
|
|
923
|
+
await this.extensionsWorkbenchService.setEnablement(extensionsToEnable, EnablementState.EnabledWorkspace);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
this.registerExtensionAction({
|
|
928
|
+
id: "workbench.extensions.action.disableAll",
|
|
929
|
+
title: ( localize2(9521, "Disable All Installed Extensions")),
|
|
930
|
+
category: ExtensionsLocalizedLabel,
|
|
931
|
+
menu: [{
|
|
932
|
+
id: MenuId.CommandPalette,
|
|
933
|
+
when: ( ContextKeyExpr.or(
|
|
934
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
935
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
936
|
+
CONTEXT_HAS_WEB_SERVER
|
|
937
|
+
))
|
|
938
|
+
}, {
|
|
939
|
+
id: MenuId.ViewContainerTitle,
|
|
940
|
+
when: ( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)),
|
|
941
|
+
group: "2_enablement",
|
|
942
|
+
order: 2
|
|
943
|
+
}],
|
|
944
|
+
run: async () => {
|
|
945
|
+
const extensionsToDisable = this.extensionsWorkbenchService.local.filter(
|
|
946
|
+
e => !e.isBuiltin && !!e.local && this.extensionEnablementService.isEnabled(e.local) && this.extensionEnablementService.canChangeEnablement(e.local)
|
|
947
|
+
);
|
|
948
|
+
if (extensionsToDisable.length) {
|
|
949
|
+
await this.extensionsWorkbenchService.setEnablement(extensionsToDisable, EnablementState.DisabledGlobally);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
this.registerExtensionAction({
|
|
954
|
+
id: "workbench.extensions.action.disableAllWorkspace",
|
|
955
|
+
title: ( localize2(9522, "Disable All Installed Extensions for this Workspace")),
|
|
956
|
+
category: ExtensionsLocalizedLabel,
|
|
957
|
+
menu: {
|
|
958
|
+
id: MenuId.CommandPalette,
|
|
959
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo("empty")), ( ContextKeyExpr.or(
|
|
960
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
961
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
962
|
+
CONTEXT_HAS_WEB_SERVER
|
|
963
|
+
))))
|
|
964
|
+
},
|
|
965
|
+
run: async () => {
|
|
966
|
+
const extensionsToDisable = this.extensionsWorkbenchService.local.filter(
|
|
967
|
+
e => !e.isBuiltin && !!e.local && this.extensionEnablementService.isEnabled(e.local) && this.extensionEnablementService.canChangeEnablement(e.local)
|
|
968
|
+
);
|
|
969
|
+
if (extensionsToDisable.length) {
|
|
970
|
+
await this.extensionsWorkbenchService.setEnablement(extensionsToDisable, EnablementState.DisabledWorkspace);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
this.registerExtensionAction({
|
|
975
|
+
id: SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID,
|
|
976
|
+
title: ( localize2(9523, "Install from VSIX...")),
|
|
977
|
+
category: ExtensionsLocalizedLabel,
|
|
978
|
+
menu: [{
|
|
979
|
+
id: MenuId.CommandPalette,
|
|
980
|
+
when: ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER))
|
|
981
|
+
}, {
|
|
982
|
+
id: MenuId.ViewContainerTitle,
|
|
983
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)), ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER)))),
|
|
984
|
+
group: "3_install",
|
|
985
|
+
order: 1
|
|
986
|
+
}],
|
|
987
|
+
run: async accessor => {
|
|
988
|
+
const fileDialogService = accessor.get(IFileDialogService);
|
|
989
|
+
const commandService = accessor.get(ICommandService);
|
|
990
|
+
const vsixPaths = await fileDialogService.showOpenDialog({
|
|
991
|
+
title: ( localize(9524, "Install from VSIX")),
|
|
992
|
+
filters: [{
|
|
993
|
+
name: "VSIX Extensions",
|
|
994
|
+
extensions: ["vsix"]
|
|
995
|
+
}],
|
|
996
|
+
canSelectFiles: true,
|
|
997
|
+
canSelectMany: true,
|
|
998
|
+
openLabel: mnemonicButtonLabel(( localize(9525, "&&Install")))
|
|
999
|
+
});
|
|
1000
|
+
if (vsixPaths) {
|
|
1001
|
+
await commandService.executeCommand(INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID, vsixPaths);
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
this.registerExtensionAction({
|
|
1006
|
+
id: INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID,
|
|
1007
|
+
title: ( localize(9526, "Install Extension VSIX")),
|
|
1008
|
+
menu: [{
|
|
1009
|
+
id: MenuId.ExplorerContext,
|
|
1010
|
+
group: "extensions",
|
|
1011
|
+
when: ( ContextKeyExpr.and(( ResourceContextKey.Extension.isEqualTo(".vsix")), ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER))))
|
|
1012
|
+
}],
|
|
1013
|
+
run: async (accessor, resources) => {
|
|
1014
|
+
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1015
|
+
const hostService = accessor.get(IHostService);
|
|
1016
|
+
const notificationService = accessor.get(INotificationService);
|
|
1017
|
+
const vsixs = Array.isArray(resources) ? resources : [resources];
|
|
1018
|
+
const result = await Promise.allSettled(( vsixs.map(async vsix => await extensionsWorkbenchService.install(vsix, {
|
|
1019
|
+
installGivenVersion: true
|
|
1020
|
+
}))));
|
|
1021
|
+
let error, requireReload = false, requireRestart = false;
|
|
1022
|
+
for (const r of result) {
|
|
1023
|
+
if (r.status === "rejected") {
|
|
1024
|
+
error = ( new Error(r.reason));
|
|
1025
|
+
break;
|
|
1026
|
+
}
|
|
1027
|
+
requireReload = requireReload || r.value.runtimeState?.action === ExtensionRuntimeActionType.ReloadWindow;
|
|
1028
|
+
requireRestart = requireRestart || r.value.runtimeState?.action === ExtensionRuntimeActionType.RestartExtensions;
|
|
1029
|
+
}
|
|
1030
|
+
if (error) {
|
|
1031
|
+
throw error;
|
|
1032
|
+
}
|
|
1033
|
+
if (requireReload) {
|
|
1034
|
+
notificationService.prompt(Severity$1.Info, vsixs.length > 1 ? ( localize(
|
|
1035
|
+
9527,
|
|
1036
|
+
"Completed installing extensions. Please reload Visual Studio Code to enable them."
|
|
1037
|
+
)) : ( localize(
|
|
1038
|
+
9528,
|
|
1039
|
+
"Completed installing extension. Please reload Visual Studio Code to enable it."
|
|
1040
|
+
)), [{
|
|
1041
|
+
label: ( localize(9529, "Reload Now")),
|
|
1042
|
+
run: () => hostService.reload()
|
|
1043
|
+
}]);
|
|
1044
|
+
} else if (requireRestart) {
|
|
1045
|
+
notificationService.prompt(Severity$1.Info, vsixs.length > 1 ? ( localize(
|
|
1046
|
+
9530,
|
|
1047
|
+
"Completed installing extensions. Please restart extensions to enable them."
|
|
1048
|
+
)) : ( localize(
|
|
1049
|
+
9531,
|
|
1050
|
+
"Completed installing extension. Please restart extensions to enable it."
|
|
1051
|
+
)), [{
|
|
1052
|
+
label: ( localize(9532, "Restart Extensions")),
|
|
1053
|
+
run: () => extensionsWorkbenchService.updateRunningExtensions()
|
|
1054
|
+
}]);
|
|
1055
|
+
} else {
|
|
1056
|
+
notificationService.prompt(Severity$1.Info, vsixs.length > 1 ? ( localize(9533, "Completed installing extensions.")) : ( localize(9534, "Completed installing extension.")), []);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
});
|
|
1060
|
+
this.registerExtensionAction({
|
|
1061
|
+
id: "workbench.extensions.action.installExtensionFromLocation",
|
|
1062
|
+
title: ( localize2(9535, "Install Extension from Location...")),
|
|
1063
|
+
category: Categories.Developer,
|
|
1064
|
+
menu: [{
|
|
1065
|
+
id: MenuId.CommandPalette,
|
|
1066
|
+
when: ( ContextKeyExpr.or(CONTEXT_HAS_WEB_SERVER, CONTEXT_HAS_LOCAL_SERVER))
|
|
1067
|
+
}],
|
|
1068
|
+
run: async accessor => {
|
|
1069
|
+
const extensionManagementService = accessor.get(IWorkbenchExtensionManagementService);
|
|
1070
|
+
if (isWeb) {
|
|
1071
|
+
return (new Promise((c, e) => {
|
|
1072
|
+
const quickInputService = accessor.get(IQuickInputService);
|
|
1073
|
+
const disposables = ( new DisposableStore());
|
|
1074
|
+
const quickPick = disposables.add(quickInputService.createQuickPick());
|
|
1075
|
+
quickPick.title = ( localize(9536, "Install Extension from Location"));
|
|
1076
|
+
quickPick.customButton = true;
|
|
1077
|
+
quickPick.customLabel = ( localize(9537, "Install"));
|
|
1078
|
+
quickPick.placeholder = ( localize(9538, "Location of the web extension"));
|
|
1079
|
+
quickPick.ignoreFocusOut = true;
|
|
1080
|
+
disposables.add(Event.any(quickPick.onDidAccept, quickPick.onDidCustom)(async () => {
|
|
1081
|
+
quickPick.hide();
|
|
1082
|
+
if (quickPick.value) {
|
|
1083
|
+
try {
|
|
1084
|
+
await extensionManagementService.installFromLocation(( URI.parse(quickPick.value)));
|
|
1085
|
+
} catch (error) {
|
|
1086
|
+
e(error);
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
c();
|
|
1091
|
+
}));
|
|
1092
|
+
disposables.add(quickPick.onDidHide(() => disposables.dispose()));
|
|
1093
|
+
quickPick.show();
|
|
1094
|
+
}));
|
|
1095
|
+
} else {
|
|
1096
|
+
const fileDialogService = accessor.get(IFileDialogService);
|
|
1097
|
+
const extensionLocation = await fileDialogService.showOpenDialog({
|
|
1098
|
+
canSelectFolders: true,
|
|
1099
|
+
canSelectFiles: false,
|
|
1100
|
+
canSelectMany: false,
|
|
1101
|
+
title: ( localize(9536, "Install Extension from Location"))
|
|
1102
|
+
});
|
|
1103
|
+
if (extensionLocation?.[0]) {
|
|
1104
|
+
await extensionManagementService.installFromLocation(extensionLocation[0]);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
});
|
|
1109
|
+
MenuRegistry.appendMenuItem(extensionsSearchActionsMenu, {
|
|
1110
|
+
submenu: extensionsFilterSubMenu,
|
|
1111
|
+
title: ( localize(9539, "Filter Extensions...")),
|
|
1112
|
+
group: "navigation",
|
|
1113
|
+
order: 2,
|
|
1114
|
+
icon: filterIcon
|
|
1115
|
+
});
|
|
1116
|
+
const showFeaturedExtensionsId = "extensions.filter.featured";
|
|
1117
|
+
const featuresExtensionsWhenContext = ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.regex(CONTEXT_GALLERY_FILTER_CAPABILITIES.key, ( new RegExp(`_${FilterType.Featured}_`))))));
|
|
1118
|
+
this.registerExtensionAction({
|
|
1119
|
+
id: showFeaturedExtensionsId,
|
|
1120
|
+
title: ( localize2(9540, "Show Featured Extensions")),
|
|
1121
|
+
category: ExtensionsLocalizedLabel,
|
|
1122
|
+
menu: [{
|
|
1123
|
+
id: MenuId.CommandPalette,
|
|
1124
|
+
when: featuresExtensionsWhenContext
|
|
1125
|
+
}, {
|
|
1126
|
+
id: extensionsFilterSubMenu,
|
|
1127
|
+
when: featuresExtensionsWhenContext,
|
|
1128
|
+
group: "1_predefined",
|
|
1129
|
+
order: 1
|
|
1130
|
+
}],
|
|
1131
|
+
menuTitles: {
|
|
1132
|
+
[extensionsFilterSubMenu.id]: ( localize(9541, "Featured"))
|
|
1133
|
+
},
|
|
1134
|
+
run: () => this.extensionsWorkbenchService.openSearch("@featured ")
|
|
1135
|
+
});
|
|
1136
|
+
this.registerExtensionAction({
|
|
1137
|
+
id: "workbench.extensions.action.showPopularExtensions",
|
|
1138
|
+
title: ( localize2(9542, "Show Popular Extensions")),
|
|
1139
|
+
category: ExtensionsLocalizedLabel,
|
|
1140
|
+
menu: [{
|
|
1141
|
+
id: MenuId.CommandPalette,
|
|
1142
|
+
when: CONTEXT_HAS_GALLERY
|
|
1143
|
+
}, {
|
|
1144
|
+
id: extensionsFilterSubMenu,
|
|
1145
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1146
|
+
group: "1_predefined",
|
|
1147
|
+
order: 2
|
|
1148
|
+
}],
|
|
1149
|
+
menuTitles: {
|
|
1150
|
+
[extensionsFilterSubMenu.id]: ( localize(9543, "Most Popular"))
|
|
1151
|
+
},
|
|
1152
|
+
run: () => this.extensionsWorkbenchService.openSearch("@popular ")
|
|
1153
|
+
});
|
|
1154
|
+
this.registerExtensionAction({
|
|
1155
|
+
id: "workbench.extensions.action.showRecommendedExtensions",
|
|
1156
|
+
title: ( localize2(9544, "Show Recommended Extensions")),
|
|
1157
|
+
category: ExtensionsLocalizedLabel,
|
|
1158
|
+
menu: [{
|
|
1159
|
+
id: MenuId.CommandPalette,
|
|
1160
|
+
when: CONTEXT_HAS_GALLERY
|
|
1161
|
+
}, {
|
|
1162
|
+
id: extensionsFilterSubMenu,
|
|
1163
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1164
|
+
group: "1_predefined",
|
|
1165
|
+
order: 2
|
|
1166
|
+
}],
|
|
1167
|
+
menuTitles: {
|
|
1168
|
+
[extensionsFilterSubMenu.id]: ( localize(9545, "Recommended"))
|
|
1169
|
+
},
|
|
1170
|
+
run: () => this.extensionsWorkbenchService.openSearch("@recommended ")
|
|
1171
|
+
});
|
|
1172
|
+
this.registerExtensionAction({
|
|
1173
|
+
id: "workbench.extensions.action.recentlyPublishedExtensions",
|
|
1174
|
+
title: ( localize2(9546, "Show Recently Published Extensions")),
|
|
1175
|
+
category: ExtensionsLocalizedLabel,
|
|
1176
|
+
menu: [{
|
|
1177
|
+
id: MenuId.CommandPalette,
|
|
1178
|
+
when: CONTEXT_HAS_GALLERY
|
|
1179
|
+
}, {
|
|
1180
|
+
id: extensionsFilterSubMenu,
|
|
1181
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1182
|
+
group: "1_predefined",
|
|
1183
|
+
order: 2
|
|
1184
|
+
}],
|
|
1185
|
+
menuTitles: {
|
|
1186
|
+
[extensionsFilterSubMenu.id]: ( localize(9547, "Recently Published"))
|
|
1187
|
+
},
|
|
1188
|
+
run: () => this.extensionsWorkbenchService.openSearch("@recentlyPublished ")
|
|
1189
|
+
});
|
|
1190
|
+
const extensionsCategoryFilterSubMenu = ( new MenuId("extensionsCategoryFilterSubMenu"));
|
|
1191
|
+
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, {
|
|
1192
|
+
submenu: extensionsCategoryFilterSubMenu,
|
|
1193
|
+
title: ( localize(9548, "Category")),
|
|
1194
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.regex(CONTEXT_GALLERY_FILTER_CAPABILITIES.key, ( new RegExp(`_${FilterType.Category}_`)))))),
|
|
1195
|
+
group: "2_categories",
|
|
1196
|
+
order: 1
|
|
1197
|
+
});
|
|
1198
|
+
EXTENSION_CATEGORIES.forEach((category, index) => {
|
|
1199
|
+
this.registerExtensionAction({
|
|
1200
|
+
id: `extensions.actions.searchByCategory.${category}`,
|
|
1201
|
+
title: category,
|
|
1202
|
+
menu: [{
|
|
1203
|
+
id: extensionsCategoryFilterSubMenu,
|
|
1204
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1205
|
+
order: index
|
|
1206
|
+
}],
|
|
1207
|
+
run: () => this.extensionsWorkbenchService.openSearch(`@category:"${category.toLowerCase()}"`)
|
|
1208
|
+
});
|
|
1209
|
+
});
|
|
1210
|
+
this.registerExtensionAction({
|
|
1211
|
+
id: "workbench.extensions.action.installedExtensions",
|
|
1212
|
+
title: ( localize2(9549, "Show Installed Extensions")),
|
|
1213
|
+
category: ExtensionsLocalizedLabel,
|
|
1214
|
+
f1: true,
|
|
1215
|
+
menu: [{
|
|
1216
|
+
id: extensionsFilterSubMenu,
|
|
1217
|
+
group: "3_installed",
|
|
1218
|
+
order: 1
|
|
1219
|
+
}],
|
|
1220
|
+
menuTitles: {
|
|
1221
|
+
[extensionsFilterSubMenu.id]: ( localize(9550, "Installed"))
|
|
1222
|
+
},
|
|
1223
|
+
run: () => this.extensionsWorkbenchService.openSearch("@installed ")
|
|
1224
|
+
});
|
|
1225
|
+
this.registerExtensionAction({
|
|
1226
|
+
id: "workbench.extensions.action.listBuiltInExtensions",
|
|
1227
|
+
title: ( localize2(9551, "Show Built-in Extensions")),
|
|
1228
|
+
category: ExtensionsLocalizedLabel,
|
|
1229
|
+
menu: [{
|
|
1230
|
+
id: MenuId.CommandPalette,
|
|
1231
|
+
when: ( ContextKeyExpr.or(
|
|
1232
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
1233
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
1234
|
+
CONTEXT_HAS_WEB_SERVER
|
|
1235
|
+
))
|
|
1236
|
+
}, {
|
|
1237
|
+
id: extensionsFilterSubMenu,
|
|
1238
|
+
group: "3_installed",
|
|
1239
|
+
order: 3
|
|
1240
|
+
}],
|
|
1241
|
+
menuTitles: {
|
|
1242
|
+
[extensionsFilterSubMenu.id]: ( localize(9552, "Built-in"))
|
|
1243
|
+
},
|
|
1244
|
+
run: () => this.extensionsWorkbenchService.openSearch("@builtin ")
|
|
1245
|
+
});
|
|
1246
|
+
this.registerExtensionAction({
|
|
1247
|
+
id: "workbench.extensions.action.extensionUpdates",
|
|
1248
|
+
title: ( localize2(9553, "Show Extension Updates")),
|
|
1249
|
+
category: ExtensionsLocalizedLabel,
|
|
1250
|
+
precondition: CONTEXT_HAS_GALLERY,
|
|
1251
|
+
f1: true,
|
|
1252
|
+
menu: [{
|
|
1253
|
+
id: extensionsFilterSubMenu,
|
|
1254
|
+
group: "3_installed",
|
|
1255
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1256
|
+
order: 2
|
|
1257
|
+
}],
|
|
1258
|
+
menuTitles: {
|
|
1259
|
+
[extensionsFilterSubMenu.id]: ( localize(9554, "Updates"))
|
|
1260
|
+
},
|
|
1261
|
+
run: () => this.extensionsWorkbenchService.openSearch("@updates")
|
|
1262
|
+
});
|
|
1263
|
+
this.registerExtensionAction({
|
|
1264
|
+
id: LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID,
|
|
1265
|
+
title: ( localize2(9555, "Show Extensions Unsupported By Workspace")),
|
|
1266
|
+
category: ExtensionsLocalizedLabel,
|
|
1267
|
+
menu: [{
|
|
1268
|
+
id: MenuId.CommandPalette,
|
|
1269
|
+
when: ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER))
|
|
1270
|
+
}, {
|
|
1271
|
+
id: extensionsFilterSubMenu,
|
|
1272
|
+
group: "3_installed",
|
|
1273
|
+
order: 6,
|
|
1274
|
+
when: ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER))
|
|
1275
|
+
}],
|
|
1276
|
+
menuTitles: {
|
|
1277
|
+
[extensionsFilterSubMenu.id]: ( localize(9556, "Workspace Unsupported"))
|
|
1278
|
+
},
|
|
1279
|
+
run: () => this.extensionsWorkbenchService.openSearch("@workspaceUnsupported")
|
|
1280
|
+
});
|
|
1281
|
+
this.registerExtensionAction({
|
|
1282
|
+
id: "workbench.extensions.action.showEnabledExtensions",
|
|
1283
|
+
title: ( localize2(9557, "Show Enabled Extensions")),
|
|
1284
|
+
category: ExtensionsLocalizedLabel,
|
|
1285
|
+
menu: [{
|
|
1286
|
+
id: MenuId.CommandPalette,
|
|
1287
|
+
when: ( ContextKeyExpr.or(
|
|
1288
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
1289
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
1290
|
+
CONTEXT_HAS_WEB_SERVER
|
|
1291
|
+
))
|
|
1292
|
+
}, {
|
|
1293
|
+
id: extensionsFilterSubMenu,
|
|
1294
|
+
group: "3_installed",
|
|
1295
|
+
order: 4
|
|
1296
|
+
}],
|
|
1297
|
+
menuTitles: {
|
|
1298
|
+
[extensionsFilterSubMenu.id]: ( localize(9558, "Enabled"))
|
|
1299
|
+
},
|
|
1300
|
+
run: () => this.extensionsWorkbenchService.openSearch("@enabled ")
|
|
1301
|
+
});
|
|
1302
|
+
this.registerExtensionAction({
|
|
1303
|
+
id: "workbench.extensions.action.showDisabledExtensions",
|
|
1304
|
+
title: ( localize2(9559, "Show Disabled Extensions")),
|
|
1305
|
+
category: ExtensionsLocalizedLabel,
|
|
1306
|
+
menu: [{
|
|
1307
|
+
id: MenuId.CommandPalette,
|
|
1308
|
+
when: ( ContextKeyExpr.or(
|
|
1309
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
1310
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
1311
|
+
CONTEXT_HAS_WEB_SERVER
|
|
1312
|
+
))
|
|
1313
|
+
}, {
|
|
1314
|
+
id: extensionsFilterSubMenu,
|
|
1315
|
+
group: "3_installed",
|
|
1316
|
+
order: 5
|
|
1317
|
+
}],
|
|
1318
|
+
menuTitles: {
|
|
1319
|
+
[extensionsFilterSubMenu.id]: ( localize(9560, "Disabled"))
|
|
1320
|
+
},
|
|
1321
|
+
run: () => this.extensionsWorkbenchService.openSearch("@disabled ")
|
|
1322
|
+
});
|
|
1323
|
+
const extensionsSortSubMenu = ( new MenuId("extensionsSortSubMenu"));
|
|
1324
|
+
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, {
|
|
1325
|
+
submenu: extensionsSortSubMenu,
|
|
1326
|
+
title: ( localize(9561, "Sort By")),
|
|
1327
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(CONTEXT_HAS_GALLERY, DefaultViewsContext)))),
|
|
1328
|
+
group: "4_sort",
|
|
1329
|
+
order: 1
|
|
1330
|
+
});
|
|
1331
|
+
this.registerExtensionAction({
|
|
1332
|
+
id: "workbench.extensions.action.clearExtensionsSearchResults",
|
|
1333
|
+
title: ( localize2(9562, "Clear Extensions Search Results")),
|
|
1334
|
+
category: ExtensionsLocalizedLabel,
|
|
1335
|
+
icon: clearSearchResultsIcon,
|
|
1336
|
+
f1: true,
|
|
1337
|
+
precondition: SearchHasTextContext,
|
|
1338
|
+
menu: {
|
|
1339
|
+
id: extensionsSearchActionsMenu,
|
|
1340
|
+
group: "navigation",
|
|
1341
|
+
order: 1
|
|
1342
|
+
},
|
|
1343
|
+
run: async accessor => {
|
|
1344
|
+
const viewPaneContainer = accessor.get(IViewsService).getActiveViewPaneContainerWithId(VIEWLET_ID);
|
|
1345
|
+
if (viewPaneContainer) {
|
|
1346
|
+
const extensionsViewPaneContainer = viewPaneContainer;
|
|
1347
|
+
extensionsViewPaneContainer.search("");
|
|
1348
|
+
extensionsViewPaneContainer.focus();
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
});
|
|
1352
|
+
this.registerExtensionAction({
|
|
1353
|
+
id: "workbench.extensions.action.refreshExtension",
|
|
1354
|
+
title: ( localize2(9563, "Refresh")),
|
|
1355
|
+
category: ExtensionsLocalizedLabel,
|
|
1356
|
+
icon: refreshIcon,
|
|
1357
|
+
f1: true,
|
|
1358
|
+
menu: {
|
|
1359
|
+
id: MenuId.ViewContainerTitle,
|
|
1360
|
+
when: ( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)),
|
|
1361
|
+
group: "navigation",
|
|
1362
|
+
order: 2
|
|
1363
|
+
},
|
|
1364
|
+
run: async accessor => {
|
|
1365
|
+
const viewPaneContainer = accessor.get(IViewsService).getActiveViewPaneContainerWithId(VIEWLET_ID);
|
|
1366
|
+
if (viewPaneContainer) {
|
|
1367
|
+
await viewPaneContainer.refresh();
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
});
|
|
1371
|
+
this.registerExtensionAction({
|
|
1372
|
+
id: "workbench.extensions.action.installWorkspaceRecommendedExtensions",
|
|
1373
|
+
title: ( localize(9564, "Install Workspace Recommended Extensions")),
|
|
1374
|
+
icon: installWorkspaceRecommendedIcon,
|
|
1375
|
+
menu: {
|
|
1376
|
+
id: MenuId.ViewTitle,
|
|
1377
|
+
when: ( ContextKeyExpr.equals("view", WORKSPACE_RECOMMENDATIONS_VIEW_ID)),
|
|
1378
|
+
group: "navigation",
|
|
1379
|
+
order: 1
|
|
1380
|
+
},
|
|
1381
|
+
run: async accessor => {
|
|
1382
|
+
const view = accessor.get(IViewsService).getActiveViewWithId(WORKSPACE_RECOMMENDATIONS_VIEW_ID);
|
|
1383
|
+
return view.installWorkspaceRecommendations();
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
this.registerExtensionAction({
|
|
1387
|
+
id: ConfigureWorkspaceFolderRecommendedExtensionsAction.ID,
|
|
1388
|
+
title: ConfigureWorkspaceFolderRecommendedExtensionsAction.LABEL,
|
|
1389
|
+
icon: configureRecommendedIcon,
|
|
1390
|
+
menu: [{
|
|
1391
|
+
id: MenuId.CommandPalette,
|
|
1392
|
+
when: ( WorkbenchStateContext.notEqualsTo("empty"))
|
|
1393
|
+
}, {
|
|
1394
|
+
id: MenuId.ViewTitle,
|
|
1395
|
+
when: ( ContextKeyExpr.equals("view", WORKSPACE_RECOMMENDATIONS_VIEW_ID)),
|
|
1396
|
+
group: "navigation",
|
|
1397
|
+
order: 2
|
|
1398
|
+
}],
|
|
1399
|
+
run: () => runAction(this.instantiationService.createInstance(
|
|
1400
|
+
ConfigureWorkspaceFolderRecommendedExtensionsAction,
|
|
1401
|
+
ConfigureWorkspaceFolderRecommendedExtensionsAction.ID,
|
|
1402
|
+
ConfigureWorkspaceFolderRecommendedExtensionsAction.LABEL
|
|
1403
|
+
))
|
|
1404
|
+
});
|
|
1405
|
+
this.registerExtensionAction({
|
|
1406
|
+
id: InstallSpecificVersionOfExtensionAction.ID,
|
|
1407
|
+
title: {
|
|
1408
|
+
value: InstallSpecificVersionOfExtensionAction.LABEL,
|
|
1409
|
+
original: "Install Specific Version of Extension..."
|
|
1410
|
+
},
|
|
1411
|
+
category: ExtensionsLocalizedLabel,
|
|
1412
|
+
menu: {
|
|
1413
|
+
id: MenuId.CommandPalette,
|
|
1414
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.or(
|
|
1415
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
1416
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
1417
|
+
CONTEXT_HAS_WEB_SERVER
|
|
1418
|
+
))))
|
|
1419
|
+
},
|
|
1420
|
+
run: () => runAction(this.instantiationService.createInstance(
|
|
1421
|
+
InstallSpecificVersionOfExtensionAction,
|
|
1422
|
+
InstallSpecificVersionOfExtensionAction.ID,
|
|
1423
|
+
InstallSpecificVersionOfExtensionAction.LABEL
|
|
1424
|
+
))
|
|
1425
|
+
});
|
|
1426
|
+
}
|
|
1427
|
+
registerContextMenuActions() {
|
|
1428
|
+
this.registerExtensionAction({
|
|
1429
|
+
id: SetColorThemeAction.ID,
|
|
1430
|
+
title: SetColorThemeAction.TITLE,
|
|
1431
|
+
menu: {
|
|
1432
|
+
id: MenuId.ExtensionContext,
|
|
1433
|
+
group: THEME_ACTIONS_GROUP,
|
|
1434
|
+
order: 0,
|
|
1435
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not("inExtensionEditor"), ( ContextKeyExpr.equals("extensionStatus", "installed")), ( ContextKeyExpr.has("extensionHasColorThemes"))))
|
|
1436
|
+
},
|
|
1437
|
+
run: async (accessor, extensionId) => {
|
|
1438
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1439
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1440
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, {
|
|
1441
|
+
id: extensionId
|
|
1442
|
+
}));
|
|
1443
|
+
if (extension) {
|
|
1444
|
+
const action = instantiationService.createInstance(SetColorThemeAction);
|
|
1445
|
+
action.extension = extension;
|
|
1446
|
+
return action.run();
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
});
|
|
1450
|
+
this.registerExtensionAction({
|
|
1451
|
+
id: SetFileIconThemeAction.ID,
|
|
1452
|
+
title: SetFileIconThemeAction.TITLE,
|
|
1453
|
+
menu: {
|
|
1454
|
+
id: MenuId.ExtensionContext,
|
|
1455
|
+
group: THEME_ACTIONS_GROUP,
|
|
1456
|
+
order: 0,
|
|
1457
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not("inExtensionEditor"), ( ContextKeyExpr.equals("extensionStatus", "installed")), ( ContextKeyExpr.has("extensionHasFileIconThemes"))))
|
|
1458
|
+
},
|
|
1459
|
+
run: async (accessor, extensionId) => {
|
|
1460
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1461
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1462
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, {
|
|
1463
|
+
id: extensionId
|
|
1464
|
+
}));
|
|
1465
|
+
if (extension) {
|
|
1466
|
+
const action = instantiationService.createInstance(SetFileIconThemeAction);
|
|
1467
|
+
action.extension = extension;
|
|
1468
|
+
return action.run();
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
});
|
|
1472
|
+
this.registerExtensionAction({
|
|
1473
|
+
id: SetProductIconThemeAction.ID,
|
|
1474
|
+
title: SetProductIconThemeAction.TITLE,
|
|
1475
|
+
menu: {
|
|
1476
|
+
id: MenuId.ExtensionContext,
|
|
1477
|
+
group: THEME_ACTIONS_GROUP,
|
|
1478
|
+
order: 0,
|
|
1479
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not("inExtensionEditor"), ( ContextKeyExpr.equals("extensionStatus", "installed")), ( ContextKeyExpr.has("extensionHasProductIconThemes"))))
|
|
1480
|
+
},
|
|
1481
|
+
run: async (accessor, extensionId) => {
|
|
1482
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1483
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1484
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, {
|
|
1485
|
+
id: extensionId
|
|
1486
|
+
}));
|
|
1487
|
+
if (extension) {
|
|
1488
|
+
const action = instantiationService.createInstance(SetProductIconThemeAction);
|
|
1489
|
+
action.extension = extension;
|
|
1490
|
+
return action.run();
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
});
|
|
1494
|
+
this.registerExtensionAction({
|
|
1495
|
+
id: "workbench.extensions.action.showPreReleaseVersion",
|
|
1496
|
+
title: ( localize2(9565, "Show Pre-Release Version")),
|
|
1497
|
+
menu: {
|
|
1498
|
+
id: MenuId.ExtensionContext,
|
|
1499
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1500
|
+
order: 0,
|
|
1501
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.has("inExtensionEditor")), ( ContextKeyExpr.has("galleryExtensionHasPreReleaseVersion")), ( ContextKeyExpr.has("isPreReleaseExtensionAllowed")), ContextKeyExpr.not("showPreReleaseVersion"), ContextKeyExpr.not("isBuiltinExtension")))
|
|
1502
|
+
},
|
|
1503
|
+
run: async (accessor, extensionId) => {
|
|
1504
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1505
|
+
const extension = (await extensionWorkbenchService.getExtensions([{
|
|
1506
|
+
id: extensionId
|
|
1507
|
+
}], CancellationToken.None))[0];
|
|
1508
|
+
extensionWorkbenchService.open(extension, {
|
|
1509
|
+
showPreReleaseVersion: true
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
this.registerExtensionAction({
|
|
1514
|
+
id: "workbench.extensions.action.showReleasedVersion",
|
|
1515
|
+
title: ( localize2(9566, "Show Release Version")),
|
|
1516
|
+
menu: {
|
|
1517
|
+
id: MenuId.ExtensionContext,
|
|
1518
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1519
|
+
order: 1,
|
|
1520
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.has("inExtensionEditor")), ( ContextKeyExpr.has("galleryExtensionHasPreReleaseVersion")), ( ContextKeyExpr.has("extensionHasReleaseVersion")), ( ContextKeyExpr.has("showPreReleaseVersion")), ContextKeyExpr.not("isBuiltinExtension")))
|
|
1521
|
+
},
|
|
1522
|
+
run: async (accessor, extensionId) => {
|
|
1523
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1524
|
+
const extension = (await extensionWorkbenchService.getExtensions([{
|
|
1525
|
+
id: extensionId
|
|
1526
|
+
}], CancellationToken.None))[0];
|
|
1527
|
+
extensionWorkbenchService.open(extension, {
|
|
1528
|
+
showPreReleaseVersion: false
|
|
1529
|
+
});
|
|
1530
|
+
}
|
|
1531
|
+
});
|
|
1532
|
+
this.registerExtensionAction({
|
|
1533
|
+
id: ToggleAutoUpdateForExtensionAction.ID,
|
|
1534
|
+
title: ToggleAutoUpdateForExtensionAction.LABEL,
|
|
1535
|
+
category: ExtensionsLocalizedLabel,
|
|
1536
|
+
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.or(( ContextKeyExpr.notEquals(`config.${AutoUpdateConfigurationKey}`, "onlyEnabledExtensions")), ( ContextKeyExpr.equals("isExtensionEnabled", true)))), ContextKeyExpr.not("extensionDisallowInstall"), ( ContextKeyExpr.has("isExtensionAllowed")))),
|
|
1537
|
+
menu: {
|
|
1538
|
+
id: MenuId.ExtensionContext,
|
|
1539
|
+
group: UPDATE_ACTIONS_GROUP,
|
|
1540
|
+
order: 1,
|
|
1541
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not("inExtensionEditor"), ( ContextKeyExpr.equals("extensionStatus", "installed")), ContextKeyExpr.not("isBuiltinExtension")))
|
|
1542
|
+
},
|
|
1543
|
+
run: async (accessor, id) => {
|
|
1544
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1545
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1546
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, {
|
|
1547
|
+
id
|
|
1548
|
+
}));
|
|
1549
|
+
if (extension) {
|
|
1550
|
+
const action = instantiationService.createInstance(ToggleAutoUpdateForExtensionAction);
|
|
1551
|
+
action.extension = extension;
|
|
1552
|
+
return action.run();
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
});
|
|
1556
|
+
this.registerExtensionAction({
|
|
1557
|
+
id: ToggleAutoUpdatesForPublisherAction.ID,
|
|
1558
|
+
title: {
|
|
1559
|
+
value: ToggleAutoUpdatesForPublisherAction.LABEL,
|
|
1560
|
+
original: "Auto Update (Publisher)"
|
|
1561
|
+
},
|
|
1562
|
+
category: ExtensionsLocalizedLabel,
|
|
1563
|
+
precondition: ( ContextKeyExpr.equals(`config.${AutoUpdateConfigurationKey}`, false)),
|
|
1564
|
+
menu: {
|
|
1565
|
+
id: MenuId.ExtensionContext,
|
|
1566
|
+
group: UPDATE_ACTIONS_GROUP,
|
|
1567
|
+
order: 2,
|
|
1568
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "installed")), ContextKeyExpr.not("isBuiltinExtension")))
|
|
1569
|
+
},
|
|
1570
|
+
run: async (accessor, id) => {
|
|
1571
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1572
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1573
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, {
|
|
1574
|
+
id
|
|
1575
|
+
}));
|
|
1576
|
+
if (extension) {
|
|
1577
|
+
const action = instantiationService.createInstance(ToggleAutoUpdatesForPublisherAction);
|
|
1578
|
+
action.extension = extension;
|
|
1579
|
+
return action.run();
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
});
|
|
1583
|
+
this.registerExtensionAction({
|
|
1584
|
+
id: "workbench.extensions.action.switchToPreRlease",
|
|
1585
|
+
title: ( localize(9567, "Switch to Pre-Release Version")),
|
|
1586
|
+
category: ExtensionsLocalizedLabel,
|
|
1587
|
+
menu: {
|
|
1588
|
+
id: MenuId.ExtensionContext,
|
|
1589
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1590
|
+
order: 2,
|
|
1591
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.has("galleryExtensionHasPreReleaseVersion")), ( ContextKeyExpr.has("isPreReleaseExtensionAllowed")), ContextKeyExpr.not("installedExtensionIsOptedToPreRelease"), ContextKeyExpr.not("inExtensionEditor"), ( ContextKeyExpr.equals("extensionStatus", "installed")), ContextKeyExpr.not("isBuiltinExtension")))
|
|
1592
|
+
},
|
|
1593
|
+
run: async (accessor, id) => {
|
|
1594
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1595
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1596
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, {
|
|
1597
|
+
id
|
|
1598
|
+
}));
|
|
1599
|
+
if (extension) {
|
|
1600
|
+
const action = instantiationService.createInstance(TogglePreReleaseExtensionAction);
|
|
1601
|
+
action.extension = extension;
|
|
1602
|
+
return action.run();
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
});
|
|
1606
|
+
this.registerExtensionAction({
|
|
1607
|
+
id: "workbench.extensions.action.switchToRelease",
|
|
1608
|
+
title: ( localize(9568, "Switch to Release Version")),
|
|
1609
|
+
category: ExtensionsLocalizedLabel,
|
|
1610
|
+
menu: {
|
|
1611
|
+
id: MenuId.ExtensionContext,
|
|
1612
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1613
|
+
order: 2,
|
|
1614
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.has("galleryExtensionHasPreReleaseVersion")), ( ContextKeyExpr.has("isExtensionAllowed")), ( ContextKeyExpr.has("installedExtensionIsOptedToPreRelease")), ContextKeyExpr.not("inExtensionEditor"), ( ContextKeyExpr.equals("extensionStatus", "installed")), ContextKeyExpr.not("isBuiltinExtension")))
|
|
1615
|
+
},
|
|
1616
|
+
run: async (accessor, id) => {
|
|
1617
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1618
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1619
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, {
|
|
1620
|
+
id
|
|
1621
|
+
}));
|
|
1622
|
+
if (extension) {
|
|
1623
|
+
const action = instantiationService.createInstance(TogglePreReleaseExtensionAction);
|
|
1624
|
+
action.extension = extension;
|
|
1625
|
+
return action.run();
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
});
|
|
1629
|
+
this.registerExtensionAction({
|
|
1630
|
+
id: ClearLanguageAction.ID,
|
|
1631
|
+
title: ClearLanguageAction.TITLE,
|
|
1632
|
+
menu: {
|
|
1633
|
+
id: MenuId.ExtensionContext,
|
|
1634
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1635
|
+
order: 0,
|
|
1636
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not("inExtensionEditor"), ( ContextKeyExpr.has("canSetLanguage")), ( ContextKeyExpr.has("isActiveLanguagePackExtension"))))
|
|
1637
|
+
},
|
|
1638
|
+
run: async (accessor, extensionId) => {
|
|
1639
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1640
|
+
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1641
|
+
const extension = (await extensionsWorkbenchService.getExtensions([{
|
|
1642
|
+
id: extensionId
|
|
1643
|
+
}], CancellationToken.None))[0];
|
|
1644
|
+
const action = instantiationService.createInstance(ClearLanguageAction);
|
|
1645
|
+
action.extension = extension;
|
|
1646
|
+
return action.run();
|
|
1647
|
+
}
|
|
1648
|
+
});
|
|
1649
|
+
this.registerExtensionAction({
|
|
1650
|
+
id: "workbench.extensions.action.installUnsigned",
|
|
1651
|
+
title: ( localize(9569, "Install")),
|
|
1652
|
+
menu: {
|
|
1653
|
+
id: MenuId.ExtensionContext,
|
|
1654
|
+
group: "0_install",
|
|
1655
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "uninstalled")), ( ContextKeyExpr.has("isGalleryExtension")), ContextKeyExpr.not("extensionDisallowInstall"), ( ContextKeyExpr.has("extensionIsUnsigned")), ( ContextKeyExpr.or(( ContextKeyExpr.and(
|
|
1656
|
+
CONTEXT_GALLERY_ALL_PUBLIC_REPOSITORY_SIGNED,
|
|
1657
|
+
ContextKeyExpr.not("extensionIsPrivate")
|
|
1658
|
+
)), ( ContextKeyExpr.and(CONTEXT_GALLERY_ALL_PRIVATE_REPOSITORY_SIGNED, ( ContextKeyExpr.has("extensionIsPrivate")))))))),
|
|
1659
|
+
order: 1
|
|
1660
|
+
},
|
|
1661
|
+
run: async (accessor, extensionId) => {
|
|
1662
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1663
|
+
const extension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, {
|
|
1664
|
+
id: extensionId
|
|
1665
|
+
}))[0] || (await this.extensionsWorkbenchService.getExtensions([{
|
|
1666
|
+
id: extensionId
|
|
1667
|
+
}], CancellationToken.None))[0];
|
|
1668
|
+
if (extension) {
|
|
1669
|
+
const action = instantiationService.createInstance(InstallAction, {
|
|
1670
|
+
installPreReleaseVersion: this.extensionManagementService.preferPreReleases
|
|
1671
|
+
});
|
|
1672
|
+
action.extension = extension;
|
|
1673
|
+
return action.run();
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
});
|
|
1677
|
+
this.registerExtensionAction({
|
|
1678
|
+
id: "workbench.extensions.action.installAndDonotSync",
|
|
1679
|
+
title: ( localize(9570, "Install (Do not Sync)")),
|
|
1680
|
+
menu: {
|
|
1681
|
+
id: MenuId.ExtensionContext,
|
|
1682
|
+
group: "0_install",
|
|
1683
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "uninstalled")), ( ContextKeyExpr.has("isGalleryExtension")), ( ContextKeyExpr.has("isExtensionAllowed")), ContextKeyExpr.not("extensionDisallowInstall"), CONTEXT_SYNC_ENABLEMENT)),
|
|
1684
|
+
order: 1
|
|
1685
|
+
},
|
|
1686
|
+
run: async (accessor, extensionId) => {
|
|
1687
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1688
|
+
const extension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, {
|
|
1689
|
+
id: extensionId
|
|
1690
|
+
}))[0] || (await this.extensionsWorkbenchService.getExtensions([{
|
|
1691
|
+
id: extensionId
|
|
1692
|
+
}], CancellationToken.None))[0];
|
|
1693
|
+
if (extension) {
|
|
1694
|
+
const action = instantiationService.createInstance(InstallAction, {
|
|
1695
|
+
installPreReleaseVersion: this.extensionManagementService.preferPreReleases,
|
|
1696
|
+
isMachineScoped: true
|
|
1697
|
+
});
|
|
1698
|
+
action.extension = extension;
|
|
1699
|
+
return action.run();
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
});
|
|
1703
|
+
this.registerExtensionAction({
|
|
1704
|
+
id: "workbench.extensions.action.installPrereleaseAndDonotSync",
|
|
1705
|
+
title: ( localize(9571, "Install Pre-Release (Do not Sync)")),
|
|
1706
|
+
menu: {
|
|
1707
|
+
id: MenuId.ExtensionContext,
|
|
1708
|
+
group: "0_install",
|
|
1709
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "uninstalled")), ( ContextKeyExpr.has("isGalleryExtension")), ( ContextKeyExpr.has("extensionHasPreReleaseVersion")), ( ContextKeyExpr.has("isPreReleaseExtensionAllowed")), ContextKeyExpr.not("extensionDisallowInstall"), CONTEXT_SYNC_ENABLEMENT)),
|
|
1710
|
+
order: 2
|
|
1711
|
+
},
|
|
1712
|
+
run: async (accessor, extensionId) => {
|
|
1713
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1714
|
+
const extension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, {
|
|
1715
|
+
id: extensionId
|
|
1716
|
+
}))[0] || (await this.extensionsWorkbenchService.getExtensions([{
|
|
1717
|
+
id: extensionId
|
|
1718
|
+
}], CancellationToken.None))[0];
|
|
1719
|
+
if (extension) {
|
|
1720
|
+
const action = instantiationService.createInstance(InstallAction, {
|
|
1721
|
+
isMachineScoped: true,
|
|
1722
|
+
preRelease: true
|
|
1723
|
+
});
|
|
1724
|
+
action.extension = extension;
|
|
1725
|
+
return action.run();
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
});
|
|
1729
|
+
this.registerExtensionAction({
|
|
1730
|
+
id: InstallAnotherVersionAction.ID,
|
|
1731
|
+
title: InstallAnotherVersionAction.LABEL,
|
|
1732
|
+
menu: {
|
|
1733
|
+
id: MenuId.ExtensionContext,
|
|
1734
|
+
group: "0_install",
|
|
1735
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "uninstalled")), ( ContextKeyExpr.has("isGalleryExtension")), ( ContextKeyExpr.has("isExtensionAllowed")), ContextKeyExpr.not("extensionDisallowInstall"))),
|
|
1736
|
+
order: 3
|
|
1737
|
+
},
|
|
1738
|
+
run: async (accessor, extensionId) => {
|
|
1739
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1740
|
+
const extension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, {
|
|
1741
|
+
id: extensionId
|
|
1742
|
+
}))[0] || (await this.extensionsWorkbenchService.getExtensions([{
|
|
1743
|
+
id: extensionId
|
|
1744
|
+
}], CancellationToken.None))[0];
|
|
1745
|
+
if (extension) {
|
|
1746
|
+
return instantiationService.createInstance(InstallAnotherVersionAction, extension, false).run();
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
});
|
|
1750
|
+
this.registerExtensionAction({
|
|
1751
|
+
id: "workbench.extensions.action.copyExtension",
|
|
1752
|
+
title: ( localize2(9572, "Copy")),
|
|
1753
|
+
menu: {
|
|
1754
|
+
id: MenuId.ExtensionContext,
|
|
1755
|
+
group: "1_copy"
|
|
1756
|
+
},
|
|
1757
|
+
run: async (accessor, extensionId) => {
|
|
1758
|
+
const clipboardService = accessor.get(IClipboardService);
|
|
1759
|
+
const extension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, {
|
|
1760
|
+
id: extensionId
|
|
1761
|
+
}))[0] || (await this.extensionsWorkbenchService.getExtensions([{
|
|
1762
|
+
id: extensionId
|
|
1763
|
+
}], CancellationToken.None))[0];
|
|
1764
|
+
if (extension) {
|
|
1765
|
+
const name = ( localize(9573, "Name: {0}", extension.displayName));
|
|
1766
|
+
const id = ( localize(9574, "Id: {0}", extensionId));
|
|
1767
|
+
const description = ( localize(9575, "Description: {0}", extension.description));
|
|
1768
|
+
const verision = ( localize(9576, "Version: {0}", extension.version));
|
|
1769
|
+
const publisher = ( localize(9577, "Publisher: {0}", extension.publisherDisplayName));
|
|
1770
|
+
const link = extension.url ? ( localize(9578, "VS Marketplace Link: {0}", `${extension.url}`)) : null;
|
|
1771
|
+
const clipboardStr = `${name}\n${id}\n${description}\n${verision}\n${publisher}${link ? "\n" + link : ""}`;
|
|
1772
|
+
await clipboardService.writeText(clipboardStr);
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
this.registerExtensionAction({
|
|
1777
|
+
id: "workbench.extensions.action.copyExtensionId",
|
|
1778
|
+
title: ( localize2(9579, "Copy Extension ID")),
|
|
1779
|
+
menu: {
|
|
1780
|
+
id: MenuId.ExtensionContext,
|
|
1781
|
+
group: "1_copy"
|
|
1782
|
+
},
|
|
1783
|
+
run: async (accessor, id) => accessor.get(IClipboardService).writeText(id)
|
|
1784
|
+
});
|
|
1785
|
+
this.registerExtensionAction({
|
|
1786
|
+
id: "workbench.extensions.action.copyLink",
|
|
1787
|
+
title: ( localize2(9580, "Copy Link")),
|
|
1788
|
+
menu: {
|
|
1789
|
+
id: MenuId.ExtensionContext,
|
|
1790
|
+
group: "1_copy",
|
|
1791
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.has("isGalleryExtension")), CONTEXT_GALLERY_HAS_EXTENSION_LINK))
|
|
1792
|
+
},
|
|
1793
|
+
run: async (accessor, _, extension) => {
|
|
1794
|
+
const clipboardService = accessor.get(IClipboardService);
|
|
1795
|
+
if (extension.galleryLink) {
|
|
1796
|
+
await clipboardService.writeText(extension.galleryLink);
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
});
|
|
1800
|
+
this.registerExtensionAction({
|
|
1801
|
+
id: "workbench.extensions.action.configure",
|
|
1802
|
+
title: ( localize2(9581, "Settings")),
|
|
1803
|
+
menu: {
|
|
1804
|
+
id: MenuId.ExtensionContext,
|
|
1805
|
+
group: "2_configure",
|
|
1806
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "installed")), ( ContextKeyExpr.has("extensionHasConfiguration")))),
|
|
1807
|
+
order: 1
|
|
1808
|
+
},
|
|
1809
|
+
run: async (accessor, id) => accessor.get(IPreferencesService).openSettings({
|
|
1810
|
+
jsonEditor: false,
|
|
1811
|
+
query: `@ext:${id}`
|
|
1812
|
+
})
|
|
1813
|
+
});
|
|
1814
|
+
this.registerExtensionAction({
|
|
1815
|
+
id: "workbench.extensions.action.download",
|
|
1816
|
+
title: ( localize(9582, "Download VSIX")),
|
|
1817
|
+
menu: {
|
|
1818
|
+
id: MenuId.ExtensionContext,
|
|
1819
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not("extensionDisallowInstall"), ( ContextKeyExpr.has("isGalleryExtension")))),
|
|
1820
|
+
order: this.productService.quality === "stable" ? 0 : 1
|
|
1821
|
+
},
|
|
1822
|
+
run: async (accessor, extensionId) => {
|
|
1823
|
+
accessor.get(IExtensionsWorkbenchService).downloadVSIX(extensionId, "release");
|
|
1824
|
+
}
|
|
1825
|
+
});
|
|
1826
|
+
this.registerExtensionAction({
|
|
1827
|
+
id: "workbench.extensions.action.downloadPreRelease",
|
|
1828
|
+
title: ( localize(9583, "Download Pre-Release VSIX")),
|
|
1829
|
+
menu: {
|
|
1830
|
+
id: MenuId.ExtensionContext,
|
|
1831
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not("extensionDisallowInstall"), ( ContextKeyExpr.has("isGalleryExtension")), ( ContextKeyExpr.has("extensionHasPreReleaseVersion")))),
|
|
1832
|
+
order: this.productService.quality === "stable" ? 1 : 0
|
|
1833
|
+
},
|
|
1834
|
+
run: async (accessor, extensionId) => {
|
|
1835
|
+
accessor.get(IExtensionsWorkbenchService).downloadVSIX(extensionId, "prerelease");
|
|
1836
|
+
}
|
|
1837
|
+
});
|
|
1838
|
+
this.registerExtensionAction({
|
|
1839
|
+
id: "workbench.extensions.action.downloadSpecificVersion",
|
|
1840
|
+
title: ( localize(9584, "Download Specific Version VSIX...")),
|
|
1841
|
+
menu: {
|
|
1842
|
+
id: MenuId.ExtensionContext,
|
|
1843
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not("extensionDisallowInstall"), ( ContextKeyExpr.has("isGalleryExtension")))),
|
|
1844
|
+
order: 2
|
|
1845
|
+
},
|
|
1846
|
+
run: async (accessor, extensionId) => {
|
|
1847
|
+
accessor.get(IExtensionsWorkbenchService).downloadVSIX(extensionId, "any");
|
|
1848
|
+
}
|
|
1849
|
+
});
|
|
1850
|
+
this.registerExtensionAction({
|
|
1851
|
+
id: "workbench.extensions.action.manageAccountPreferences",
|
|
1852
|
+
title: ( localize2(9585, "Account Preferences")),
|
|
1853
|
+
menu: {
|
|
1854
|
+
id: MenuId.ExtensionContext,
|
|
1855
|
+
group: "2_configure",
|
|
1856
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "installed")), ( ContextKeyExpr.has("extensionHasAccountPreferences")))),
|
|
1857
|
+
order: 2
|
|
1858
|
+
},
|
|
1859
|
+
run: (accessor, id) => accessor.get(ICommandService).executeCommand("_manageAccountPreferencesForExtension", id)
|
|
1860
|
+
});
|
|
1861
|
+
this.registerExtensionAction({
|
|
1862
|
+
id: "workbench.extensions.action.configureKeybindings",
|
|
1863
|
+
title: ( localize2(9586, "Keyboard Shortcuts")),
|
|
1864
|
+
menu: {
|
|
1865
|
+
id: MenuId.ExtensionContext,
|
|
1866
|
+
group: "2_configure",
|
|
1867
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "installed")), ( ContextKeyExpr.has("extensionHasKeybindings")))),
|
|
1868
|
+
order: 2
|
|
1869
|
+
},
|
|
1870
|
+
run: async (accessor, id) => accessor.get(IPreferencesService).openGlobalKeybindingSettings(false, {
|
|
1871
|
+
query: `@ext:${id}`
|
|
1872
|
+
})
|
|
1873
|
+
});
|
|
1874
|
+
this.registerExtensionAction({
|
|
1875
|
+
id: "workbench.extensions.action.toggleApplyToAllProfiles",
|
|
1876
|
+
title: ( localize2(9587, "Apply Extension to all Profiles")),
|
|
1877
|
+
toggled: ( ContextKeyExpr.has("isApplicationScopedExtension")),
|
|
1878
|
+
menu: {
|
|
1879
|
+
id: MenuId.ExtensionContext,
|
|
1880
|
+
group: "2_configure",
|
|
1881
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "installed")), ( ( ContextKeyExpr.has("isDefaultApplicationScopedExtension")).negate()), ( ( ContextKeyExpr.has("isBuiltinExtension")).negate()), ( ContextKeyExpr.equals("isWorkspaceScopedExtension", false)))),
|
|
1882
|
+
order: 3
|
|
1883
|
+
},
|
|
1884
|
+
run: async (accessor, _, extensionArg) => {
|
|
1885
|
+
const uriIdentityService = accessor.get(IUriIdentityService);
|
|
1886
|
+
const extension = extensionArg.location ? this.extensionsWorkbenchService.installed.find(
|
|
1887
|
+
e => uriIdentityService.extUri.isEqual(e.local?.location, extensionArg.location)
|
|
1888
|
+
) : undefined;
|
|
1889
|
+
if (extension) {
|
|
1890
|
+
return this.extensionsWorkbenchService.toggleApplyExtensionToAllProfiles(extension);
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
});
|
|
1894
|
+
this.registerExtensionAction({
|
|
1895
|
+
id: TOGGLE_IGNORE_EXTENSION_ACTION_ID,
|
|
1896
|
+
title: ( localize2(9588, "Sync This Extension")),
|
|
1897
|
+
menu: {
|
|
1898
|
+
id: MenuId.ExtensionContext,
|
|
1899
|
+
group: "2_configure",
|
|
1900
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("extensionStatus", "installed")), CONTEXT_SYNC_ENABLEMENT, ( ContextKeyExpr.equals("isWorkspaceScopedExtension", false)))),
|
|
1901
|
+
order: 4
|
|
1902
|
+
},
|
|
1903
|
+
run: async (accessor, id) => {
|
|
1904
|
+
const extension = this.extensionsWorkbenchService.local.find(e => areSameExtensions({
|
|
1905
|
+
id
|
|
1906
|
+
}, e.identifier));
|
|
1907
|
+
if (extension) {
|
|
1908
|
+
return this.extensionsWorkbenchService.toggleExtensionIgnoredToSync(extension);
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
});
|
|
1912
|
+
this.registerExtensionAction({
|
|
1913
|
+
id: "workbench.extensions.action.ignoreRecommendation",
|
|
1914
|
+
title: ( localize2(9589, "Ignore Recommendation")),
|
|
1915
|
+
menu: {
|
|
1916
|
+
id: MenuId.ExtensionContext,
|
|
1917
|
+
group: "3_recommendations",
|
|
1918
|
+
when: ( ContextKeyExpr.has("isExtensionRecommended")),
|
|
1919
|
+
order: 1
|
|
1920
|
+
},
|
|
1921
|
+
run: async (accessor, id) => accessor.get(IExtensionIgnoredRecommendationsService).toggleGlobalIgnoredRecommendation(id, true)
|
|
1922
|
+
});
|
|
1923
|
+
this.registerExtensionAction({
|
|
1924
|
+
id: "workbench.extensions.action.undoIgnoredRecommendation",
|
|
1925
|
+
title: ( localize2(9590, "Undo Ignored Recommendation")),
|
|
1926
|
+
menu: {
|
|
1927
|
+
id: MenuId.ExtensionContext,
|
|
1928
|
+
group: "3_recommendations",
|
|
1929
|
+
when: ( ContextKeyExpr.has("isUserIgnoredRecommendation")),
|
|
1930
|
+
order: 1
|
|
1931
|
+
},
|
|
1932
|
+
run: async (accessor, id) => accessor.get(IExtensionIgnoredRecommendationsService).toggleGlobalIgnoredRecommendation(id, false)
|
|
1933
|
+
});
|
|
1934
|
+
this.registerExtensionAction({
|
|
1935
|
+
id: "workbench.extensions.action.addExtensionToWorkspaceRecommendations",
|
|
1936
|
+
title: ( localize2(9591, "Add to Workspace Recommendations")),
|
|
1937
|
+
menu: {
|
|
1938
|
+
id: MenuId.ExtensionContext,
|
|
1939
|
+
group: "3_recommendations",
|
|
1940
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo("empty")), ( ( ContextKeyExpr.has("isBuiltinExtension")).negate()), ( ( ContextKeyExpr.has("isExtensionWorkspaceRecommended")).negate()), ( ( ContextKeyExpr.has("isUserIgnoredRecommendation")).negate()), ( ContextKeyExpr.notEquals("extensionSource", "resource")))),
|
|
1941
|
+
order: 2
|
|
1942
|
+
},
|
|
1943
|
+
run: (accessor, id) => accessor.get(IWorkspaceExtensionsConfigService).toggleRecommendation(id)
|
|
1944
|
+
});
|
|
1945
|
+
this.registerExtensionAction({
|
|
1946
|
+
id: "workbench.extensions.action.removeExtensionFromWorkspaceRecommendations",
|
|
1947
|
+
title: ( localize2(9592, "Remove from Workspace Recommendations")),
|
|
1948
|
+
menu: {
|
|
1949
|
+
id: MenuId.ExtensionContext,
|
|
1950
|
+
group: "3_recommendations",
|
|
1951
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo("empty")), ( ( ContextKeyExpr.has("isBuiltinExtension")).negate()), ( ContextKeyExpr.has("isExtensionWorkspaceRecommended")))),
|
|
1952
|
+
order: 2
|
|
1953
|
+
},
|
|
1954
|
+
run: (accessor, id) => accessor.get(IWorkspaceExtensionsConfigService).toggleRecommendation(id)
|
|
1955
|
+
});
|
|
1956
|
+
this.registerExtensionAction({
|
|
1957
|
+
id: "workbench.extensions.action.addToWorkspaceRecommendations",
|
|
1958
|
+
title: ( localize2(9593, "Add Extension to Workspace Recommendations")),
|
|
1959
|
+
category: EXTENSIONS_CATEGORY,
|
|
1960
|
+
menu: {
|
|
1961
|
+
id: MenuId.CommandPalette,
|
|
1962
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo("workspace")), ( ContextKeyExpr.equals("resourceScheme", Schemas.extension))))
|
|
1963
|
+
},
|
|
1964
|
+
async run(accessor) {
|
|
1965
|
+
const editorService = accessor.get(IEditorService);
|
|
1966
|
+
const workspaceExtensionsConfigService = accessor.get(IWorkspaceExtensionsConfigService);
|
|
1967
|
+
if (!(editorService.activeEditor instanceof ExtensionsInput)) {
|
|
1968
|
+
return;
|
|
1969
|
+
}
|
|
1970
|
+
const extensionId = editorService.activeEditor.extension.identifier.id.toLowerCase();
|
|
1971
|
+
const recommendations = await workspaceExtensionsConfigService.getRecommendations();
|
|
1972
|
+
if (recommendations.includes(extensionId)) {
|
|
1973
|
+
return;
|
|
1974
|
+
}
|
|
1975
|
+
await workspaceExtensionsConfigService.toggleRecommendation(extensionId);
|
|
1976
|
+
}
|
|
1977
|
+
});
|
|
1978
|
+
this.registerExtensionAction({
|
|
1979
|
+
id: "workbench.extensions.action.addToWorkspaceFolderRecommendations",
|
|
1980
|
+
title: ( localize2(9594, "Add Extension to Workspace Folder Recommendations")),
|
|
1981
|
+
category: EXTENSIONS_CATEGORY,
|
|
1982
|
+
menu: {
|
|
1983
|
+
id: MenuId.CommandPalette,
|
|
1984
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo("folder")), ( ContextKeyExpr.equals("resourceScheme", Schemas.extension))))
|
|
1985
|
+
},
|
|
1986
|
+
run: () => this.commandService.executeCommand("workbench.extensions.action.addToWorkspaceRecommendations")
|
|
1987
|
+
});
|
|
1988
|
+
this.registerExtensionAction({
|
|
1989
|
+
id: "workbench.extensions.action.addToWorkspaceIgnoredRecommendations",
|
|
1990
|
+
title: ( localize2(9595, "Add Extension to Workspace Ignored Recommendations")),
|
|
1991
|
+
category: EXTENSIONS_CATEGORY,
|
|
1992
|
+
menu: {
|
|
1993
|
+
id: MenuId.CommandPalette,
|
|
1994
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo("workspace")), ( ContextKeyExpr.equals("resourceScheme", Schemas.extension))))
|
|
1995
|
+
},
|
|
1996
|
+
async run(accessor) {
|
|
1997
|
+
const editorService = accessor.get(IEditorService);
|
|
1998
|
+
const workspaceExtensionsConfigService = accessor.get(IWorkspaceExtensionsConfigService);
|
|
1999
|
+
if (!(editorService.activeEditor instanceof ExtensionsInput)) {
|
|
2000
|
+
return;
|
|
2001
|
+
}
|
|
2002
|
+
const extensionId = editorService.activeEditor.extension.identifier.id.toLowerCase();
|
|
2003
|
+
const unwantedRecommendations = await workspaceExtensionsConfigService.getUnwantedRecommendations();
|
|
2004
|
+
if (unwantedRecommendations.includes(extensionId)) {
|
|
2005
|
+
return;
|
|
2006
|
+
}
|
|
2007
|
+
await workspaceExtensionsConfigService.toggleUnwantedRecommendation(extensionId);
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
2010
|
+
this.registerExtensionAction({
|
|
2011
|
+
id: "workbench.extensions.action.addToWorkspaceFolderIgnoredRecommendations",
|
|
2012
|
+
title: ( localize2(9596, "Add Extension to Workspace Folder Ignored Recommendations")),
|
|
2013
|
+
category: EXTENSIONS_CATEGORY,
|
|
2014
|
+
menu: {
|
|
2015
|
+
id: MenuId.CommandPalette,
|
|
2016
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo("folder")), ( ContextKeyExpr.equals("resourceScheme", Schemas.extension))))
|
|
2017
|
+
},
|
|
2018
|
+
run: () => this.commandService.executeCommand("workbench.extensions.action.addToWorkspaceIgnoredRecommendations")
|
|
2019
|
+
});
|
|
2020
|
+
this.registerExtensionAction({
|
|
2021
|
+
id: ConfigureWorkspaceRecommendedExtensionsAction.ID,
|
|
2022
|
+
title: {
|
|
2023
|
+
value: ConfigureWorkspaceRecommendedExtensionsAction.LABEL,
|
|
2024
|
+
original: "Configure Recommended Extensions (Workspace)"
|
|
2025
|
+
},
|
|
2026
|
+
category: EXTENSIONS_CATEGORY,
|
|
2027
|
+
menu: {
|
|
2028
|
+
id: MenuId.CommandPalette,
|
|
2029
|
+
when: ( WorkbenchStateContext.isEqualTo("workspace"))
|
|
2030
|
+
},
|
|
2031
|
+
run: () => runAction(this.instantiationService.createInstance(
|
|
2032
|
+
ConfigureWorkspaceRecommendedExtensionsAction,
|
|
2033
|
+
ConfigureWorkspaceRecommendedExtensionsAction.ID,
|
|
2034
|
+
ConfigureWorkspaceRecommendedExtensionsAction.LABEL
|
|
2035
|
+
))
|
|
2036
|
+
});
|
|
2037
|
+
this.registerExtensionAction({
|
|
2038
|
+
id: "workbench.extensions.action.manageTrustedPublishers",
|
|
2039
|
+
title: ( localize2(9597, "Manage Trusted Extension Publishers")),
|
|
2040
|
+
category: EXTENSIONS_CATEGORY,
|
|
2041
|
+
f1: true,
|
|
2042
|
+
run: async accessor => {
|
|
2043
|
+
const quickInputService = accessor.get(IQuickInputService);
|
|
2044
|
+
const extensionManagementService = accessor.get(IWorkbenchExtensionManagementService);
|
|
2045
|
+
const trustedPublishers = extensionManagementService.getTrustedPublishers();
|
|
2046
|
+
const trustedPublisherItems = ( trustedPublishers.map(publisher => ({
|
|
2047
|
+
id: publisher.publisher,
|
|
2048
|
+
label: publisher.publisherDisplayName,
|
|
2049
|
+
description: publisher.publisher,
|
|
2050
|
+
picked: true
|
|
2051
|
+
}))).sort((a, b) => a.label.localeCompare(b.label));
|
|
2052
|
+
const result = await quickInputService.pick(trustedPublisherItems, {
|
|
2053
|
+
canPickMany: true,
|
|
2054
|
+
title: ( localize(9598, "Manage Trusted Extension Publishers")),
|
|
2055
|
+
placeHolder: ( localize(9599, "Choose which publishers to trust"))
|
|
2056
|
+
});
|
|
2057
|
+
if (result) {
|
|
2058
|
+
const untrustedPublishers = [];
|
|
2059
|
+
for (const {
|
|
2060
|
+
publisher
|
|
2061
|
+
} of trustedPublishers) {
|
|
2062
|
+
if (!( result.some(r => r.id === publisher))) {
|
|
2063
|
+
untrustedPublishers.push(publisher);
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
trustedPublishers.filter(publisher => !( result.some(r => r.id === publisher.publisher)));
|
|
2067
|
+
extensionManagementService.untrustPublishers(...untrustedPublishers);
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
});
|
|
2071
|
+
}
|
|
2072
|
+
registerExtensionAction(extensionActionOptions) {
|
|
2073
|
+
const menus = extensionActionOptions.menu ? Array.isArray(extensionActionOptions.menu) ? extensionActionOptions.menu : [extensionActionOptions.menu] : [];
|
|
2074
|
+
let menusWithOutTitles = [];
|
|
2075
|
+
const menusWithTitles = [];
|
|
2076
|
+
if (extensionActionOptions.menuTitles) {
|
|
2077
|
+
for (let index = 0; index < menus.length; index++) {
|
|
2078
|
+
const menu = menus[index];
|
|
2079
|
+
const menuTitle = extensionActionOptions.menuTitles[menu.id.id];
|
|
2080
|
+
if (menuTitle) {
|
|
2081
|
+
menusWithTitles.push({
|
|
2082
|
+
id: menu.id,
|
|
2083
|
+
item: {
|
|
2084
|
+
...menu,
|
|
2085
|
+
command: {
|
|
2086
|
+
id: extensionActionOptions.id,
|
|
2087
|
+
title: menuTitle
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
});
|
|
2091
|
+
} else {
|
|
2092
|
+
menusWithOutTitles.push(menu);
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
} else {
|
|
2096
|
+
menusWithOutTitles = menus;
|
|
2097
|
+
}
|
|
2098
|
+
const disposables = ( new DisposableStore());
|
|
2099
|
+
disposables.add(registerAction2(class extends Action2 {
|
|
2100
|
+
constructor() {
|
|
2101
|
+
super({
|
|
2102
|
+
...extensionActionOptions,
|
|
2103
|
+
menu: menusWithOutTitles
|
|
2104
|
+
});
|
|
2105
|
+
}
|
|
2106
|
+
run(accessor, ...args) {
|
|
2107
|
+
return extensionActionOptions.run(accessor, ...args);
|
|
2108
|
+
}
|
|
2109
|
+
}));
|
|
2110
|
+
if (menusWithTitles.length) {
|
|
2111
|
+
disposables.add(MenuRegistry.appendMenuItems(menusWithTitles));
|
|
2112
|
+
}
|
|
2113
|
+
return disposables;
|
|
2114
|
+
}
|
|
2115
|
+
};
|
|
2116
|
+
ExtensionsContributions = ( __decorate([( __param(0, IExtensionManagementService)), ( __param(1, IExtensionManagementServerService)), ( __param(2, IExtensionGalleryManifestService)), ( __param(3, IContextKeyService)), ( __param(4, IViewsService)), ( __param(5, IExtensionsWorkbenchService)), ( __param(6, IWorkbenchExtensionEnablementService)), ( __param(7, IInstantiationService)), ( __param(8, IDialogService)), ( __param(9, ICommandService)), ( __param(10, IProductService)), ( __param(11, IPluginInstallService))], ExtensionsContributions));
|
|
2117
|
+
let ExtensionStorageCleaner = class ExtensionStorageCleaner {
|
|
2118
|
+
constructor(extensionManagementService, storageService) {
|
|
2119
|
+
ExtensionStorageService.removeOutdatedExtensionVersions(extensionManagementService, storageService);
|
|
2120
|
+
}
|
|
2121
|
+
};
|
|
2122
|
+
ExtensionStorageCleaner = ( __decorate([( __param(0, IExtensionManagementService)), ( __param(1, IStorageService))], ExtensionStorageCleaner));
|
|
2123
|
+
let TrustedPublishersInitializer = class TrustedPublishersInitializer {
|
|
2124
|
+
constructor(
|
|
2125
|
+
extensionManagementService,
|
|
2126
|
+
userDataProfilesService,
|
|
2127
|
+
productService,
|
|
2128
|
+
storageService
|
|
2129
|
+
) {
|
|
2130
|
+
const trustedPublishersInitStatusKey = "trusted-publishers-init-migration";
|
|
2131
|
+
if (!storageService.get(trustedPublishersInitStatusKey, StorageScope.APPLICATION)) {
|
|
2132
|
+
for (const profile of userDataProfilesService.profiles) {
|
|
2133
|
+
extensionManagementService.getInstalled(ExtensionType.User, profile.extensionsResource).then(async extensions => {
|
|
2134
|
+
const trustedPublishers = ( new Map());
|
|
2135
|
+
for (const extension of extensions) {
|
|
2136
|
+
if (!extension.publisherDisplayName) {
|
|
2137
|
+
continue;
|
|
2138
|
+
}
|
|
2139
|
+
const publisher = extension.manifest.publisher.toLowerCase();
|
|
2140
|
+
if (productService.trustedExtensionPublishers?.includes(publisher) || (extension.publisherDisplayName && productService.trustedExtensionPublishers?.includes(extension.publisherDisplayName.toLowerCase()))) {
|
|
2141
|
+
continue;
|
|
2142
|
+
}
|
|
2143
|
+
trustedPublishers.set(publisher, {
|
|
2144
|
+
publisher,
|
|
2145
|
+
publisherDisplayName: extension.publisherDisplayName
|
|
2146
|
+
});
|
|
2147
|
+
}
|
|
2148
|
+
if (trustedPublishers.size) {
|
|
2149
|
+
extensionManagementService.trustPublishers(...( trustedPublishers.values()));
|
|
2150
|
+
}
|
|
2151
|
+
storageService.store(
|
|
2152
|
+
trustedPublishersInitStatusKey,
|
|
2153
|
+
"true",
|
|
2154
|
+
StorageScope.APPLICATION,
|
|
2155
|
+
StorageTarget.MACHINE
|
|
2156
|
+
);
|
|
2157
|
+
});
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
};
|
|
2162
|
+
TrustedPublishersInitializer = ( __decorate([( __param(0, IWorkbenchExtensionManagementService)), ( __param(1, IUserDataProfilesService)), ( __param(2, IProductService)), ( __param(3, IStorageService))], TrustedPublishersInitializer));
|
|
2163
|
+
let ExtensionToolsContribution = class ExtensionToolsContribution extends Disposable {
|
|
2164
|
+
static {
|
|
2165
|
+
this.ID = "extensions.chat.toolsContribution";
|
|
2166
|
+
}
|
|
2167
|
+
constructor(toolsService, instantiationService) {
|
|
2168
|
+
super();
|
|
2169
|
+
const searchExtensionsTool = instantiationService.createInstance(SearchExtensionsTool);
|
|
2170
|
+
this._register(toolsService.registerTool(SearchExtensionsToolData, searchExtensionsTool));
|
|
2171
|
+
this._register(toolsService.vscodeToolSet.addTool(SearchExtensionsToolData));
|
|
2172
|
+
}
|
|
2173
|
+
};
|
|
2174
|
+
ExtensionToolsContribution = ( __decorate([( __param(0, ILanguageModelToolsService)), ( __param(1, IInstantiationService))], ExtensionToolsContribution));
|
|
2175
|
+
const workbenchRegistry = ( Registry.as(Extensions$4.Workbench));
|
|
2176
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionsContributions, LifecyclePhase.Restored);
|
|
2177
|
+
workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Eventually);
|
|
2178
|
+
workbenchRegistry.registerWorkbenchContribution(MaliciousExtensionChecker, LifecyclePhase.Eventually);
|
|
2179
|
+
workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Restored);
|
|
2180
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Restored);
|
|
2181
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, LifecyclePhase.Eventually);
|
|
2182
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, LifecyclePhase.Eventually);
|
|
2183
|
+
workbenchRegistry.registerWorkbenchContribution(
|
|
2184
|
+
ExtensionEnablementWorkspaceTrustTransitionParticipant,
|
|
2185
|
+
LifecyclePhase.Restored
|
|
2186
|
+
);
|
|
2187
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionsCompletionItemsProvider, LifecyclePhase.Restored);
|
|
2188
|
+
workbenchRegistry.registerWorkbenchContribution(UnsupportedExtensionsMigrationContrib, LifecyclePhase.Eventually);
|
|
2189
|
+
workbenchRegistry.registerWorkbenchContribution(TrustedPublishersInitializer, LifecyclePhase.Eventually);
|
|
2190
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionMarketplaceStatusUpdater, LifecyclePhase.Eventually);
|
|
2191
|
+
if (isWeb) {
|
|
2192
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionStorageCleaner, LifecyclePhase.Eventually);
|
|
2193
|
+
}
|
|
2194
|
+
registerWorkbenchContribution2(
|
|
2195
|
+
ExtensionToolsContribution.ID,
|
|
2196
|
+
ExtensionToolsContribution,
|
|
2197
|
+
WorkbenchPhase.AfterRestored
|
|
2198
|
+
);
|
|
2199
|
+
registerAction2(ShowRuntimeExtensionsAction);
|
|
2200
|
+
registerAction2(class ExtensionsGallerySignInAction extends Action2 {
|
|
2201
|
+
constructor() {
|
|
2202
|
+
super({
|
|
2203
|
+
id: "workbench.extensions.actions.gallery.signIn",
|
|
2204
|
+
title: ( localize2(9600, "Sign in to access Extensions Marketplace")),
|
|
2205
|
+
menu: {
|
|
2206
|
+
id: MenuId.AccountsContext,
|
|
2207
|
+
when: ( CONTEXT_EXTENSIONS_GALLERY_STATUS.isEqualTo(ExtensionGalleryManifestStatus.RequiresSignIn))
|
|
2208
|
+
}
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
run(accessor) {
|
|
2212
|
+
return accessor.get(ICommandService).executeCommand(DEFAULT_ACCOUNT_SIGN_IN_COMMAND);
|
|
2213
|
+
}
|
|
2214
|
+
});
|
|
2215
|
+
( Registry.as(Extensions$5.ConfigurationMigration)).registerConfigurationMigrations([{
|
|
2216
|
+
key: AutoUpdateConfigurationKey,
|
|
2217
|
+
migrateFn: (value, accessor) => {
|
|
2218
|
+
if (value === "onlySelectedExtensions") {
|
|
2219
|
+
return {
|
|
2220
|
+
value: false
|
|
2221
|
+
};
|
|
2222
|
+
}
|
|
2223
|
+
return [];
|
|
2224
|
+
}
|
|
2225
|
+
}]);
|
|
2226
|
+
|
|
2227
|
+
export { CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER, CONTEXT_HAS_WEB_SERVER, VIEW_CONTAINER };
|