@codingame/monaco-vscode-extension-gallery-service-override 3.2.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extensionGallery.js +7 -1
- package/override/vs/platform/dialogs/common/dialogs.js +2 -0
- package/package.json +9 -9
- package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js +18 -16
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js +24 -23
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementIpc.js +5 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionTipsService.js +10 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +33 -19
- package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/deprecatedExtensionsChecker.js +8 -5
- package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +109 -40
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +11 -8
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +31 -11
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.js +35 -21
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +54 -29
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsList.js +6 -6
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +11 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +18 -17
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +71 -31
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +63 -20
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +551 -134
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/browser/keymapRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/languageRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extension.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/remoteRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +78 -4
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +7 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionsProfileScannerService.js +24 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +15 -8
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementChannelClient.js +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js +3 -2
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js +469 -57
- package/vscode/src/vs/workbench/services/extensionManagement/common/webExtensionManagementService.js +5 -2
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionsScannerService.js +33 -0
|
@@ -2,11 +2,11 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
4
4
|
import { registerAction2, MenuRegistry, MenuId, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
6
|
+
import { IExtensionGalleryService, IExtensionManagementService, ExtensionsLocalizedLabel, PreferencesLocalizedLabel } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
7
|
+
import { extensionsConfigurationNodeBase, IWorkbenchExtensionManagementService, IExtensionManagementServerService, IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
|
|
7
8
|
import { IExtensionIgnoredRecommendationsService } from 'vscode/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations';
|
|
8
9
|
import { Extensions as Extensions$4 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
|
-
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
10
10
|
import { VIEWLET_ID, IExtensionsWorkbenchService, CONTEXT_HAS_GALLERY, AutoUpdateConfigurationKey, HasOutdatedExtensionsContext, OUTDATED_EXTENSIONS_VIEW_ID, SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID, INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID, extensionsSearchActionsMenu, LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID, WORKSPACE_RECOMMENDATIONS_VIEW_ID, THEME_ACTIONS_GROUP, INSTALL_ACTIONS_GROUP, UPDATE_ACTIONS_GROUP, TOGGLE_IGNORE_EXTENSION_ACTION_ID } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions';
|
|
11
11
|
import { SearchExtensionsAction, PromptExtensionInstallFailureAction, ConfigureWorkspaceFolderRecommendedExtensionsAction, InstallSpecificVersionOfExtensionAction, ReinstallAction, SetColorThemeAction, SetFileIconThemeAction, SetProductIconThemeAction, ToggleAutoUpdateForExtensionAction, ToggleAutoUpdatesForPublisherAction, TogglePreReleaseExtensionAction, ClearLanguageAction, ConfigureWorkspaceRecommendedExtensionsAction } from 'vscode/vscode/vs/workbench/contrib/extensions/browser/extensionsActions';
|
|
12
12
|
import { ExtensionsInput } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensionsInput';
|
|
@@ -32,10 +32,13 @@ import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/prefere
|
|
|
32
32
|
import { RawContextKey, ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
33
33
|
import { Extensions } from 'vscode/vscode/vs/platform/quickinput/common/quickAccess';
|
|
34
34
|
import { ManageExtensionsQuickAccessProvider, InstallExtensionQuickAccessProvider } from './extensionsQuickAccess.js';
|
|
35
|
+
import './extensionRecommendationsService.js';
|
|
35
36
|
import { CONTEXT_SYNC_ENABLEMENT } from 'vscode/vscode/vs/workbench/services/userDataSync/common/userDataSync';
|
|
36
37
|
import { CopyAction, CutAction, PasteAction } from 'vscode/vscode/vs/editor/contrib/clipboard/browser/clipboard';
|
|
37
38
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
39
|
+
import './extensionsWorkbenchService.js';
|
|
38
40
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
41
|
+
import './extensionRecommendationNotificationService.js';
|
|
39
42
|
import { IExtensionService, toExtensionDescription } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
40
43
|
import { INotificationService, Severity } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
41
44
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host';
|
|
@@ -50,6 +53,7 @@ import { Disposable, DisposableStore, isDisposable } from 'vscode/vscode/vs/base
|
|
|
50
53
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
51
54
|
import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
52
55
|
import { mnemonicButtonLabel } from 'vscode/vscode/vs/base/common/labels';
|
|
56
|
+
import 'vscode/vscode/vs/base/common/arrays';
|
|
53
57
|
import { Promises } from 'vscode/vscode/vs/base/common/async';
|
|
54
58
|
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
55
59
|
import { WORKSPACE_TRUST_EXTENSION_SUPPORT } from 'vscode/vscode/vs/workbench/services/workspaces/common/workspaceTrust';
|
|
@@ -111,14 +115,7 @@ import { IFileDialogService, IDialogService } from 'vscode/vscode/vs/platform/di
|
|
|
111
115
|
}, 0 );
|
|
112
116
|
( Registry.as(Extensions$2.Configuration))
|
|
113
117
|
.registerConfiguration({
|
|
114
|
-
|
|
115
|
-
order: 30,
|
|
116
|
-
title: ( localizeWithPath(
|
|
117
|
-
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
118
|
-
'extensionsConfigurationTitle',
|
|
119
|
-
"Extensions"
|
|
120
|
-
)),
|
|
121
|
-
type: 'object',
|
|
118
|
+
...extensionsConfigurationNodeBase,
|
|
122
119
|
properties: {
|
|
123
120
|
'extensions.autoUpdate': {
|
|
124
121
|
enum: [true, 'onlyEnabledExtensions', 'onlySelectedExtensions', false,],
|
|
@@ -354,6 +351,15 @@ import { IFileDialogService, IDialogService } from 'vscode/vscode/vs/platform/di
|
|
|
354
351
|
"When enabled, extensions which declare the `onStartupFinished` activation event will be activated after a timeout."
|
|
355
352
|
)),
|
|
356
353
|
default: false
|
|
354
|
+
},
|
|
355
|
+
'extensions.experimental.issueQuickAccess': {
|
|
356
|
+
type: 'boolean',
|
|
357
|
+
description: ( localizeWithPath(
|
|
358
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
359
|
+
'extensionsInQuickAccess',
|
|
360
|
+
"When enabled, extensions can be searched for via Quick Access and report issues from there."
|
|
361
|
+
)),
|
|
362
|
+
default: true
|
|
357
363
|
}
|
|
358
364
|
}
|
|
359
365
|
});
|
|
@@ -431,6 +437,23 @@ CommandsRegistry.registerCommand({
|
|
|
431
437
|
)),
|
|
432
438
|
default: false
|
|
433
439
|
},
|
|
440
|
+
'justification': {
|
|
441
|
+
'type': ['string', 'object'],
|
|
442
|
+
'description': ( localizeWithPath(
|
|
443
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
444
|
+
'workbench.extensions.installExtension.option.justification',
|
|
445
|
+
"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."
|
|
446
|
+
)),
|
|
447
|
+
},
|
|
448
|
+
'enable': {
|
|
449
|
+
'type': 'boolean',
|
|
450
|
+
'description': ( localizeWithPath(
|
|
451
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
452
|
+
'workbench.extensions.installExtension.option.enable',
|
|
453
|
+
"When enabled, the extension will be enabled if it is installed but disabled. If the extension is already enabled, this has no effect."
|
|
454
|
+
)),
|
|
455
|
+
default: false
|
|
456
|
+
},
|
|
434
457
|
'context': {
|
|
435
458
|
'type': 'object',
|
|
436
459
|
'description': ( localizeWithPath(
|
|
@@ -447,30 +470,32 @@ CommandsRegistry.registerCommand({
|
|
|
447
470
|
handler: async (accessor, arg, options) => {
|
|
448
471
|
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
449
472
|
const extensionManagementService = accessor.get(IWorkbenchExtensionManagementService);
|
|
473
|
+
const extensionGalleryService = accessor.get(IExtensionGalleryService);
|
|
450
474
|
try {
|
|
451
475
|
if (typeof arg === 'string') {
|
|
452
476
|
const [id, version] = getIdAndVersion(arg);
|
|
453
|
-
const
|
|
454
|
-
if (extension) {
|
|
455
|
-
const
|
|
477
|
+
const extension = extensionsWorkbenchService.local.find(e => areSameExtensions(e.identifier, { id, uuid: version }));
|
|
478
|
+
if (extension?.enablementState === 1 ) {
|
|
479
|
+
const [gallery] = await extensionGalleryService.getExtensions([{ id, preRelease: options?.installPreReleaseVersion }], CancellationToken.None);
|
|
480
|
+
if (gallery) {
|
|
481
|
+
throw new Error(localizeWithPath('vs/workbench/contrib/extensions/browser/extensions.contribution', 'notFound', "Extension '{0}' not found.", arg));
|
|
482
|
+
}
|
|
483
|
+
await extensionManagementService.installFromGallery(gallery, {
|
|
456
484
|
isMachineScoped: options?.donotSync ? true : undefined,
|
|
457
485
|
installPreReleaseVersion: options?.installPreReleaseVersion,
|
|
458
486
|
installGivenVersion: !!version,
|
|
459
487
|
context: options?.context
|
|
460
|
-
};
|
|
461
|
-
if (extension.gallery && extension.enablementState === 1 ) {
|
|
462
|
-
await extensionManagementService.installFromGallery(extension.gallery, installOptions);
|
|
463
|
-
return;
|
|
464
|
-
}
|
|
465
|
-
if (version) {
|
|
466
|
-
await extensionsWorkbenchService.installVersion(extension, version, installOptions);
|
|
467
|
-
}
|
|
468
|
-
else {
|
|
469
|
-
await extensionsWorkbenchService.install(extension, installOptions);
|
|
470
|
-
}
|
|
488
|
+
});
|
|
471
489
|
}
|
|
472
490
|
else {
|
|
473
|
-
|
|
491
|
+
await extensionsWorkbenchService.install(arg, {
|
|
492
|
+
version,
|
|
493
|
+
installPreReleaseVersion: options?.installPreReleaseVersion,
|
|
494
|
+
context: options?.context,
|
|
495
|
+
justification: options?.justification,
|
|
496
|
+
enable: options?.enable,
|
|
497
|
+
isMachineScoped: options?.donotSync ? true : undefined,
|
|
498
|
+
}, 15 );
|
|
474
499
|
}
|
|
475
500
|
}
|
|
476
501
|
else {
|
|
@@ -1881,7 +1906,7 @@ let ExtensionsContributions = class ExtensionsContributions extends Disposable {
|
|
|
1881
1906
|
menu: {
|
|
1882
1907
|
id: MenuId.ExtensionContext,
|
|
1883
1908
|
group: '2_configure',
|
|
1884
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('extensionStatus', 'installed')), ( ( ContextKeyExpr.has('isDefaultApplicationScopedExtension')).negate()), ( ( ContextKeyExpr.has('isBuiltinExtension')).negate()))),
|
|
1909
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('extensionStatus', 'installed')), ( ( ContextKeyExpr.has('isDefaultApplicationScopedExtension')).negate()), ( ( ContextKeyExpr.has('isBuiltinExtension')).negate()), ( ContextKeyExpr.equals('isWorkspaceScopedExtension', false)))),
|
|
1885
1910
|
order: 3
|
|
1886
1911
|
},
|
|
1887
1912
|
run: async (accessor, id) => {
|
|
@@ -1901,7 +1926,7 @@ let ExtensionsContributions = class ExtensionsContributions extends Disposable {
|
|
|
1901
1926
|
menu: {
|
|
1902
1927
|
id: MenuId.ExtensionContext,
|
|
1903
1928
|
group: '2_configure',
|
|
1904
|
-
when: ( ContextKeyExpr.and(CONTEXT_SYNC_ENABLEMENT)),
|
|
1929
|
+
when: ( ContextKeyExpr.and(CONTEXT_SYNC_ENABLEMENT, ( ContextKeyExpr.equals('isWorkspaceScopedExtension', false)))),
|
|
1905
1930
|
order: 4
|
|
1906
1931
|
},
|
|
1907
1932
|
run: async (accessor, id) => {
|
|
@@ -1951,7 +1976,7 @@ let ExtensionsContributions = class ExtensionsContributions extends Disposable {
|
|
|
1951
1976
|
menu: {
|
|
1952
1977
|
id: MenuId.ExtensionContext,
|
|
1953
1978
|
group: '3_recommendations',
|
|
1954
|
-
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo('empty')), ( ( ContextKeyExpr.has('isBuiltinExtension')).negate()), ( ( ContextKeyExpr.has('isExtensionWorkspaceRecommended')).negate()), ( ( ContextKeyExpr.has('isUserIgnoredRecommendation')).negate()))),
|
|
1979
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo('empty')), ( ( ContextKeyExpr.has('isBuiltinExtension')).negate()), ( ( ContextKeyExpr.has('isExtensionWorkspaceRecommended')).negate()), ( ( ContextKeyExpr.has('isUserIgnoredRecommendation')).negate()), ( ContextKeyExpr.notEquals('extensionSource', 'resource')))),
|
|
1955
1980
|
order: 2
|
|
1956
1981
|
},
|
|
1957
1982
|
run: (accessor, id) => accessor.get(IWorkspaceExtensionsConfigService).toggleRecommendation(id)
|
|
@@ -6,7 +6,7 @@ import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar'
|
|
|
6
6
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
7
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
8
8
|
import { ExtensionContainers, IExtensionsWorkbenchService } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions';
|
|
9
|
-
import { ActionWithDropDownAction, ExtensionActionWithDropdownActionViewItem, ExtensionDropDownAction, ExtensionStatusAction, ExtensionStatusLabelAction, MigrateDeprecatedExtensionAction,
|
|
9
|
+
import { ActionWithDropDownAction, ExtensionActionWithDropdownActionViewItem, ExtensionDropDownAction, ExtensionStatusAction, ExtensionStatusLabelAction, MigrateDeprecatedExtensionAction, ExtensionRuntimeStateAction, UpdateAction, ToggleAutoUpdateForExtensionAction, InstallDropdownAction, InstallingLabelAction, SetLanguageAction, ClearLanguageAction, RemoteInstallAction, LocalInstallAction, WebInstallAction, ManageExtensionAction } from 'vscode/vscode/vs/workbench/contrib/extensions/browser/extensionsActions';
|
|
10
10
|
import { areSameExtensions } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
11
11
|
import { extensionVerifiedPublisherIconColor, RecommendationWidget, PreReleaseBookmarkWidget, RemoteBadgeWidget, ExtensionPackCountWidget, VerifiedPublisherWidget, ExtensionHoverWidget, SyncIgnoredWidget, ExtensionActivationStatusWidget, InstallCountWidget, RatingsWidget } from './extensionsWidgets.js';
|
|
12
12
|
import { IExtensionService, toExtension } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
@@ -59,16 +59,16 @@ let Renderer = class Renderer {
|
|
|
59
59
|
const verifiedPublisherWidget = this.instantiationService.createInstance(VerifiedPublisherWidget, append(publisher, $(`.verified-publisher`)), true);
|
|
60
60
|
const publisherDisplayName = append(publisher, $('.publisher-name.ellipsis'));
|
|
61
61
|
const actionbar = ( new ActionBar(footer, {
|
|
62
|
-
actionViewItemProvider: (action) => {
|
|
62
|
+
actionViewItemProvider: (action, options) => {
|
|
63
63
|
if (action instanceof ActionWithDropDownAction) {
|
|
64
64
|
return ( new ExtensionActionWithDropdownActionViewItem(
|
|
65
65
|
action,
|
|
66
|
-
{ icon: true, label: true, menuActionsOrProvider: { getActions: () => action.menuActions }, menuActionClassNames: (action.class || '').split(' ') },
|
|
66
|
+
{ ...options, icon: true, label: true, menuActionsOrProvider: { getActions: () => action.menuActions }, menuActionClassNames: (action.class || '').split(' ') },
|
|
67
67
|
this.contextMenuService
|
|
68
68
|
));
|
|
69
69
|
}
|
|
70
70
|
if (action instanceof ExtensionDropDownAction) {
|
|
71
|
-
return action.createActionViewItem();
|
|
71
|
+
return action.createActionViewItem(options);
|
|
72
72
|
}
|
|
73
73
|
return undefined;
|
|
74
74
|
},
|
|
@@ -80,7 +80,7 @@ let Renderer = class Renderer {
|
|
|
80
80
|
const actions = [
|
|
81
81
|
this.instantiationService.createInstance(ExtensionStatusLabelAction),
|
|
82
82
|
this.instantiationService.createInstance(MigrateDeprecatedExtensionAction, true),
|
|
83
|
-
this.instantiationService.createInstance(
|
|
83
|
+
this.instantiationService.createInstance(ExtensionRuntimeStateAction),
|
|
84
84
|
this.instantiationService.createInstance(ActionWithDropDownAction, 'extensions.updateActions', '', [[this.instantiationService.createInstance(UpdateAction, false)], [this.instantiationService.createInstance(ToggleAutoUpdateForExtensionAction, true, [true, 'onlyEnabledExtensions'])]]),
|
|
85
85
|
this.instantiationService.createInstance(InstallDropdownAction),
|
|
86
86
|
this.instantiationService.createInstance(InstallingLabelAction),
|
|
@@ -173,7 +173,7 @@ let Renderer = class Renderer {
|
|
|
173
173
|
data.name.textContent = extension.displayName;
|
|
174
174
|
data.description.textContent = extension.description;
|
|
175
175
|
const updatePublisher = () => {
|
|
176
|
-
data.publisherDisplayName.textContent = extension.publisherDisplayName;
|
|
176
|
+
data.publisherDisplayName.textContent = !extension.resourceExtension && extension.local?.source !== 'resource' ? extension.publisherDisplayName : '';
|
|
177
177
|
};
|
|
178
178
|
updatePublisher();
|
|
179
179
|
Event.filter(this.extensionsWorkbenchService.onChange, e => !!e && areSameExtensions(e.identifier, extension.identifier))(() => updatePublisher(), this, data.extensionDisposables);
|
|
@@ -13,7 +13,17 @@ import { registerThemingParticipant } from 'vscode/vscode/vs/platform/theme/comm
|
|
|
13
13
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
14
14
|
import { isNonEmptyArray } from 'vscode/vscode/vs/base/common/arrays';
|
|
15
15
|
import { Renderer } from './extensionsList.js';
|
|
16
|
-
import
|
|
16
|
+
import 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
17
|
+
import { foreground } from 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
18
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
19
|
+
import { editorBackground } from 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
|
|
20
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
|
|
21
|
+
import { listFocusBackground, listFocusForeground } from 'vscode/vscode/vs/platform/theme/common/colors/listColors';
|
|
22
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
|
|
23
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
24
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
25
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
26
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
17
27
|
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
18
28
|
import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
|
|
19
29
|
import { getAriaLabelForExtension } from './extensionsViews.js';
|
|
@@ -19,7 +19,7 @@ import { ExtensionsInput } from 'vscode/vscode/vs/workbench/contrib/extensions/c
|
|
|
19
19
|
import { ServerInstalledExtensionsView, DefaultPopularExtensionsView, DefaultRecommendedExtensionsView, EnabledExtensionsView, DisabledExtensionsView, SearchMarketplaceExtensionsView, ExtensionsListView, RecentlyUpdatedExtensionsView, OutdatedExtensionsView, WorkspaceRecommendedExtensionsView, RecommendedExtensionsView, NONE_CATEGORY, StaticQueryExtensionsView, UntrustedWorkspaceUnsupportedExtensionsView, UntrustedWorkspacePartiallySupportedExtensionsView, VirtualWorkspaceUnsupportedExtensionsView, VirtualWorkspacePartiallySupportedExtensionsView, DeprecatedExtensionsView } from './extensionsViews.js';
|
|
20
20
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
21
21
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
22
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
22
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
23
23
|
import { NumberBadge, IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
|
|
24
24
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
25
25
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
@@ -79,8 +79,9 @@ const REMOTE_CATEGORY = ( localize2WithPath(
|
|
|
79
79
|
{ key: 'remote', comment: ['Remote as in remote machine'] },
|
|
80
80
|
"Remote"
|
|
81
81
|
));
|
|
82
|
-
let ExtensionsViewletViewsContribution = class ExtensionsViewletViewsContribution {
|
|
82
|
+
let ExtensionsViewletViewsContribution = class ExtensionsViewletViewsContribution extends Disposable {
|
|
83
83
|
constructor(extensionManagementServerService, labelService, viewDescriptorService, contextKeyService) {
|
|
84
|
+
super();
|
|
84
85
|
this.extensionManagementServerService = extensionManagementServerService;
|
|
85
86
|
this.labelService = labelService;
|
|
86
87
|
this.contextKeyService = contextKeyService;
|
|
@@ -145,7 +146,7 @@ let ExtensionsViewletViewsContribution = class ExtensionsViewletViewsContributio
|
|
|
145
146
|
canToggleVisibility: servers.length === 1
|
|
146
147
|
});
|
|
147
148
|
if (server === this.extensionManagementServerService.remoteExtensionManagementServer && this.extensionManagementServerService.localExtensionManagementServer) {
|
|
148
|
-
registerAction2(class InstallLocalExtensionsInRemoteAction2 extends Action2 {
|
|
149
|
+
this._register(registerAction2(class InstallLocalExtensionsInRemoteAction2 extends Action2 {
|
|
149
150
|
constructor() {
|
|
150
151
|
super({
|
|
151
152
|
id: 'workbench.extensions.installLocalExtensions',
|
|
@@ -170,11 +171,11 @@ let ExtensionsViewletViewsContribution = class ExtensionsViewletViewsContributio
|
|
|
170
171
|
run(accessor) {
|
|
171
172
|
return accessor.get(IInstantiationService).createInstance(InstallLocalExtensionsInRemoteAction).run();
|
|
172
173
|
}
|
|
173
|
-
});
|
|
174
|
+
}));
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
177
|
if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) {
|
|
177
|
-
registerAction2(class InstallRemoteExtensionsInLocalAction2 extends Action2 {
|
|
178
|
+
this._register(registerAction2(class InstallRemoteExtensionsInLocalAction2 extends Action2 {
|
|
178
179
|
constructor() {
|
|
179
180
|
super({
|
|
180
181
|
id: 'workbench.extensions.actions.installLocalExtensionsInRemote',
|
|
@@ -190,7 +191,7 @@ let ExtensionsViewletViewsContribution = class ExtensionsViewletViewsContributio
|
|
|
190
191
|
run(accessor) {
|
|
191
192
|
return accessor.get(IInstantiationService).createInstance(InstallRemoteExtensionsInLocalAction, 'workbench.extensions.actions.installLocalExtensionsInRemote').run();
|
|
192
193
|
}
|
|
193
|
-
});
|
|
194
|
+
}));
|
|
194
195
|
}
|
|
195
196
|
viewDescriptors.push({
|
|
196
197
|
id: 'workbench.views.extensions.popular',
|
|
@@ -832,9 +833,9 @@ let StatusUpdater = class StatusUpdater extends Disposable {
|
|
|
832
833
|
}
|
|
833
834
|
onServiceChange() {
|
|
834
835
|
this.badgeHandle.clear();
|
|
835
|
-
const
|
|
836
|
-
const outdated = this.extensionsWorkbenchService.outdated.reduce((r, e) => r + (this.extensionEnablementService.isEnabled(e.local) && !
|
|
837
|
-
const newBadgeNumber = outdated +
|
|
836
|
+
const actionRequired = this.extensionsWorkbenchService.installed.filter(e => e.runtimeState !== undefined);
|
|
837
|
+
const outdated = this.extensionsWorkbenchService.outdated.reduce((r, e) => r + (this.extensionEnablementService.isEnabled(e.local) && !actionRequired.includes(e) ? 1 : 0), 0);
|
|
838
|
+
const newBadgeNumber = outdated + actionRequired.length;
|
|
838
839
|
if (newBadgeNumber > 0) {
|
|
839
840
|
let msg = '';
|
|
840
841
|
if (outdated) {
|
|
@@ -850,20 +851,20 @@ let StatusUpdater = class StatusUpdater extends Disposable {
|
|
|
850
851
|
outdated
|
|
851
852
|
));
|
|
852
853
|
}
|
|
853
|
-
if (outdated > 0 &&
|
|
854
|
+
if (outdated > 0 && actionRequired.length > 0) {
|
|
854
855
|
msg += ', ';
|
|
855
856
|
}
|
|
856
|
-
if (
|
|
857
|
-
msg +=
|
|
857
|
+
if (actionRequired.length) {
|
|
858
|
+
msg += actionRequired.length === 1 ? ( localizeWithPath(
|
|
858
859
|
'vs/workbench/contrib/extensions/browser/extensionsViewlet',
|
|
859
860
|
'extensionToReload',
|
|
860
|
-
'{0} requires
|
|
861
|
-
|
|
861
|
+
'{0} requires restart',
|
|
862
|
+
actionRequired.length
|
|
862
863
|
)) : ( localizeWithPath(
|
|
863
864
|
'vs/workbench/contrib/extensions/browser/extensionsViewlet',
|
|
864
865
|
'extensionsToReload',
|
|
865
|
-
'{0} require
|
|
866
|
-
|
|
866
|
+
'{0} require restart',
|
|
867
|
+
actionRequired.length
|
|
867
868
|
));
|
|
868
869
|
}
|
|
869
870
|
const badge = ( new NumberBadge(newBadgeNumber, () => msg));
|
|
@@ -899,7 +900,7 @@ let MaliciousExtensionChecker = class MaliciousExtensionChecker {
|
|
|
899
900
|
.filter(e => ( extensionsControlManifest.malicious.some(identifier => areSameExtensions(e.identifier, identifier))));
|
|
900
901
|
if (maliciousExtensions.length) {
|
|
901
902
|
return Promises.settled(( maliciousExtensions.map(e => this.extensionsManagementService.uninstall(e).then(() => {
|
|
902
|
-
this.notificationService.prompt(Severity.Warning, ( localizeWithPath(
|
|
903
|
+
this.notificationService.prompt(Severity$1.Warning, ( localizeWithPath(
|
|
903
904
|
'vs/workbench/contrib/extensions/browser/extensionsViewlet',
|
|
904
905
|
'malicious warning',
|
|
905
906
|
"We have uninstalled '{0}' which was reported to be problematic.",
|
|
@@ -48,6 +48,8 @@ import { isOfflineError } from 'vscode/vscode/vs/base/parts/request/common/reque
|
|
|
48
48
|
import { defaultCountBadgeStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
49
49
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
50
50
|
import { Extensions, IExtensionFeaturesManagementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
51
|
+
import { isString } from 'vscode/vscode/vs/base/common/types';
|
|
52
|
+
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
|
|
51
53
|
|
|
52
54
|
var ExtensionsListView_1;
|
|
53
55
|
const NONE_CATEGORY = 'none';
|
|
@@ -74,7 +76,7 @@ function isLocalSortBy(value) {
|
|
|
74
76
|
let ExtensionsListView = class ExtensionsListView extends ViewPane {
|
|
75
77
|
static { ExtensionsListView_1 = this; }
|
|
76
78
|
static { this.RECENT_UPDATE_DURATION = 7 * 24 * 60 * 60 * 1000; }
|
|
77
|
-
constructor(options, viewletViewOptions, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, extensionRecommendationsService, telemetryService, configurationService, contextService, extensionManagementServerService, extensionManifestPropertiesService, extensionManagementService, workspaceService, productService, contextKeyService, viewDescriptorService, openerService, preferencesService, storageService, workspaceTrustManagementService, extensionEnablementService, layoutService, extensionFeaturesManagementService, logService) {
|
|
79
|
+
constructor(options, viewletViewOptions, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, extensionRecommendationsService, telemetryService, configurationService, contextService, extensionManagementServerService, extensionManifestPropertiesService, extensionManagementService, workspaceService, productService, contextKeyService, viewDescriptorService, openerService, preferencesService, storageService, workspaceTrustManagementService, extensionEnablementService, layoutService, extensionFeaturesManagementService, uriIdentityService, logService) {
|
|
78
80
|
super({
|
|
79
81
|
...viewletViewOptions,
|
|
80
82
|
showActions: ViewPaneShowActions.Always,
|
|
@@ -97,6 +99,7 @@ let ExtensionsListView = class ExtensionsListView extends ViewPane {
|
|
|
97
99
|
this.extensionEnablementService = extensionEnablementService;
|
|
98
100
|
this.layoutService = layoutService;
|
|
99
101
|
this.extensionFeaturesManagementService = extensionFeaturesManagementService;
|
|
102
|
+
this.uriIdentityService = uriIdentityService;
|
|
100
103
|
this.logService = logService;
|
|
101
104
|
this.list = null;
|
|
102
105
|
this.queryRequest = null;
|
|
@@ -123,7 +126,20 @@ let ExtensionsListView = class ExtensionsListView extends ViewPane {
|
|
|
123
126
|
const messageBox = append(messageContainer, $('.message'));
|
|
124
127
|
const delegate = ( new Delegate());
|
|
125
128
|
const extensionsViewState = ( new ExtensionsViewState());
|
|
126
|
-
const renderer = this.instantiationService.createInstance(Renderer, extensionsViewState, {
|
|
129
|
+
const renderer = this.instantiationService.createInstance(Renderer, extensionsViewState, {
|
|
130
|
+
hoverOptions: {
|
|
131
|
+
position: () => {
|
|
132
|
+
const viewLocation = this.viewDescriptorService.getViewLocationById(this.id);
|
|
133
|
+
if (viewLocation === 0 ) {
|
|
134
|
+
return this.layoutService.getSideBarPosition() === 0 ? 1 : 0 ;
|
|
135
|
+
}
|
|
136
|
+
if (viewLocation === 2 ) {
|
|
137
|
+
return this.layoutService.getSideBarPosition() === 0 ? 0 : 1 ;
|
|
138
|
+
}
|
|
139
|
+
return 1 ;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
});
|
|
127
143
|
this.list = this.instantiationService.createInstance(WorkbenchPagedList, 'Extensions', extensionsList, delegate, [renderer], {
|
|
128
144
|
multipleSelectionSupport: false,
|
|
129
145
|
setRowLineHeight: false,
|
|
@@ -420,7 +436,7 @@ let ExtensionsListView = class ExtensionsListView extends ViewPane {
|
|
|
420
436
|
result = this.sortExtensions(result, options);
|
|
421
437
|
}
|
|
422
438
|
else {
|
|
423
|
-
result = local.filter(e => (!e.isBuiltin || e.outdated || e.
|
|
439
|
+
result = local.filter(e => (!e.isBuiltin || e.outdated || e.runtimeState !== undefined) && matchingText(e));
|
|
424
440
|
const runningExtensionsById = runningExtensions.reduce((result, e) => { result.set(e.identifier.value, e); return result; }, ( new ExtensionIdentifierMap()));
|
|
425
441
|
const defaultSort = (e1, e2) => {
|
|
426
442
|
const running1 = runningExtensionsById.get(e1.identifier.id);
|
|
@@ -447,20 +463,20 @@ let ExtensionsListView = class ExtensionsListView extends ViewPane {
|
|
|
447
463
|
return isE1Running ? -1 : 1;
|
|
448
464
|
};
|
|
449
465
|
const outdated = [];
|
|
450
|
-
const
|
|
466
|
+
const actionRequired = [];
|
|
451
467
|
const noActionRequired = [];
|
|
452
468
|
result.forEach(e => {
|
|
453
469
|
if (e.outdated) {
|
|
454
470
|
outdated.push(e);
|
|
455
471
|
}
|
|
456
|
-
else if (e.
|
|
457
|
-
|
|
472
|
+
else if (e.runtimeState) {
|
|
473
|
+
actionRequired.push(e);
|
|
458
474
|
}
|
|
459
475
|
else {
|
|
460
476
|
noActionRequired.push(e);
|
|
461
477
|
}
|
|
462
478
|
});
|
|
463
|
-
result = [...outdated.sort(defaultSort), ...
|
|
479
|
+
result = [...outdated.sort(defaultSort), ...actionRequired.sort(defaultSort), ...noActionRequired.sort(defaultSort)];
|
|
464
480
|
}
|
|
465
481
|
return result;
|
|
466
482
|
}
|
|
@@ -715,12 +731,28 @@ let ExtensionsListView = class ExtensionsListView extends ViewPane {
|
|
|
715
731
|
async getInstallableRecommendations(recommendations, options, token) {
|
|
716
732
|
const result = [];
|
|
717
733
|
if (recommendations.length) {
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
734
|
+
const galleryExtensions = [];
|
|
735
|
+
const resourceExtensions = [];
|
|
736
|
+
for (const recommendation of recommendations) {
|
|
737
|
+
if (typeof recommendation === 'string') {
|
|
738
|
+
galleryExtensions.push(recommendation);
|
|
739
|
+
}
|
|
740
|
+
else {
|
|
741
|
+
resourceExtensions.push(recommendation);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
if (galleryExtensions.length) {
|
|
745
|
+
const extensions = await this.extensionsWorkbenchService.getExtensions(( galleryExtensions.map(id => ({ id }))), { source: options.source }, token);
|
|
746
|
+
for (const extension of extensions) {
|
|
747
|
+
if (extension.gallery && !extension.deprecationInfo && (await this.extensionManagementService.canInstall(extension.gallery))) {
|
|
748
|
+
result.push(extension);
|
|
749
|
+
}
|
|
722
750
|
}
|
|
723
751
|
}
|
|
752
|
+
if (resourceExtensions.length) {
|
|
753
|
+
const extensions = await this.extensionsWorkbenchService.getResourceExtensions(resourceExtensions, true);
|
|
754
|
+
result.push(...extensions);
|
|
755
|
+
}
|
|
724
756
|
}
|
|
725
757
|
return result;
|
|
726
758
|
}
|
|
@@ -737,10 +769,7 @@ let ExtensionsListView = class ExtensionsListView extends ViewPane {
|
|
|
737
769
|
async getWorkspaceRecommendationsModel(query, options, token) {
|
|
738
770
|
const recommendations = await this.getWorkspaceRecommendations();
|
|
739
771
|
const installableRecommendations = (await this.getInstallableRecommendations(recommendations, { ...options, source: 'recommendations-workspace' }, token));
|
|
740
|
-
|
|
741
|
-
id => installableRecommendations.find(i => areSameExtensions(i.identifier, { id }))
|
|
742
|
-
)));
|
|
743
|
-
return ( new PagedModel(result));
|
|
772
|
+
return ( new PagedModel(installableRecommendations));
|
|
744
773
|
}
|
|
745
774
|
async getKeymapRecommendationsModel(query, options, token) {
|
|
746
775
|
const value = query.value.replace(/@recommended:keymaps/g, '').trim().toLowerCase();
|
|
@@ -781,7 +810,9 @@ let ExtensionsListView = class ExtensionsListView extends ViewPane {
|
|
|
781
810
|
const local = ( (await this.extensionsWorkbenchService.queryLocal(this.options.server))
|
|
782
811
|
.map(e => e.identifier.id.toLowerCase()));
|
|
783
812
|
const workspaceRecommendations = ( (await this.getWorkspaceRecommendations())
|
|
784
|
-
.map(
|
|
813
|
+
.map(
|
|
814
|
+
extensionId => isString(extensionId) ? extensionId.toLowerCase() : extensionId
|
|
815
|
+
));
|
|
785
816
|
return distinct(flatten(await Promise.all([
|
|
786
817
|
this.extensionRecommendationsService.getImportantRecommendations(),
|
|
787
818
|
this.extensionRecommendationsService.getFileBasedRecommendations(),
|
|
@@ -795,22 +826,16 @@ let ExtensionsListView = class ExtensionsListView extends ViewPane {
|
|
|
795
826
|
this.extensionRecommendationsService.getImportantRecommendations(),
|
|
796
827
|
this.extensionRecommendationsService.getFileBasedRecommendations(),
|
|
797
828
|
this.extensionRecommendationsService.getOtherRecommendations()
|
|
798
|
-
])).filter(extensionId => !local.includes(extensionId.toLowerCase()))
|
|
829
|
+
])).filter(extensionId => !isString(extensionId) || !local.includes(extensionId.toLowerCase())));
|
|
799
830
|
const installableRecommendations = await this.getInstallableRecommendations(allRecommendations, { ...options, source: 'recommendations-all', sortBy: undefined }, token);
|
|
800
|
-
|
|
801
|
-
id => installableRecommendations.find(i => areSameExtensions(i.identifier, { id }))
|
|
802
|
-
)));
|
|
803
|
-
return ( new PagedModel(result.slice(0, 8)));
|
|
831
|
+
return ( new PagedModel(installableRecommendations.slice(0, 8)));
|
|
804
832
|
}
|
|
805
833
|
async searchRecommendations(query, options, token) {
|
|
806
834
|
const value = query.value.replace(/@recommended/g, '').trim().toLowerCase();
|
|
807
835
|
const recommendations = distinct([...(await this.getWorkspaceRecommendations()), ...(await this.getOtherRecommendations())]);
|
|
808
836
|
const installableRecommendations = (await this.getInstallableRecommendations(recommendations, { ...options, source: 'recommendations', sortBy: undefined }, token))
|
|
809
837
|
.filter(extension => extension.identifier.id.toLowerCase().indexOf(value) > -1);
|
|
810
|
-
|
|
811
|
-
id => installableRecommendations.find(i => areSameExtensions(i.identifier, { id }))
|
|
812
|
-
)));
|
|
813
|
-
return ( new PagedModel(this.sortExtensions(result, options)));
|
|
838
|
+
return ( new PagedModel(this.sortExtensions(installableRecommendations, options)));
|
|
814
839
|
}
|
|
815
840
|
setModel(model, error, donotResetScrollTop) {
|
|
816
841
|
if (this.list) {
|
|
@@ -1052,7 +1077,8 @@ ExtensionsListView = ExtensionsListView_1 = ( __decorate([
|
|
|
1052
1077
|
( __param(24, IWorkbenchExtensionEnablementService)),
|
|
1053
1078
|
( __param(25, IWorkbenchLayoutService)),
|
|
1054
1079
|
( __param(26, IExtensionFeaturesManagementService)),
|
|
1055
|
-
( __param(27,
|
|
1080
|
+
( __param(27, IUriIdentityService)),
|
|
1081
|
+
( __param(28, ILogService))
|
|
1056
1082
|
], ExtensionsListView));
|
|
1057
1083
|
class DefaultPopularExtensionsView extends ExtensionsListView {
|
|
1058
1084
|
async show() {
|
|
@@ -1106,8 +1132,8 @@ class RecentlyUpdatedExtensionsView extends ExtensionsListView {
|
|
|
1106
1132
|
}
|
|
1107
1133
|
}
|
|
1108
1134
|
let StaticQueryExtensionsView = class StaticQueryExtensionsView extends ExtensionsListView {
|
|
1109
|
-
constructor(options, viewletViewOptions, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, extensionRecommendationsService, telemetryService, configurationService, contextService, extensionManagementServerService, extensionManifestPropertiesService, extensionManagementService, workspaceService, productService, contextKeyService, viewDescriptorService, openerService, preferencesService, storageService, workspaceTrustManagementService, extensionEnablementService, layoutService, extensionFeaturesManagementService, logService) {
|
|
1110
|
-
super(options, viewletViewOptions, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, extensionRecommendationsService, telemetryService, configurationService, contextService, extensionManagementServerService, extensionManifestPropertiesService, extensionManagementService, workspaceService, productService, contextKeyService, viewDescriptorService, openerService, preferencesService, storageService, workspaceTrustManagementService, extensionEnablementService, layoutService, extensionFeaturesManagementService, logService);
|
|
1135
|
+
constructor(options, viewletViewOptions, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, extensionRecommendationsService, telemetryService, configurationService, contextService, extensionManagementServerService, extensionManifestPropertiesService, extensionManagementService, workspaceService, productService, contextKeyService, viewDescriptorService, openerService, preferencesService, storageService, workspaceTrustManagementService, extensionEnablementService, layoutService, extensionFeaturesManagementService, uriIdentityService, logService) {
|
|
1136
|
+
super(options, viewletViewOptions, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, extensionRecommendationsService, telemetryService, configurationService, contextService, extensionManagementServerService, extensionManifestPropertiesService, extensionManagementService, workspaceService, productService, contextKeyService, viewDescriptorService, openerService, preferencesService, storageService, workspaceTrustManagementService, extensionEnablementService, layoutService, extensionFeaturesManagementService, uriIdentityService, logService);
|
|
1111
1137
|
this.options = options;
|
|
1112
1138
|
}
|
|
1113
1139
|
show() {
|
|
@@ -1140,7 +1166,8 @@ StaticQueryExtensionsView = ( __decorate([
|
|
|
1140
1166
|
( __param(24, IWorkbenchExtensionEnablementService)),
|
|
1141
1167
|
( __param(25, IWorkbenchLayoutService)),
|
|
1142
1168
|
( __param(26, IExtensionFeaturesManagementService)),
|
|
1143
|
-
( __param(27,
|
|
1169
|
+
( __param(27, IUriIdentityService)),
|
|
1170
|
+
( __param(28, ILogService))
|
|
1144
1171
|
], StaticQueryExtensionsView));
|
|
1145
1172
|
function toSpecificWorkspaceUnsupportedQuery(query, qualifier) {
|
|
1146
1173
|
if (!query) {
|
|
@@ -1258,13 +1285,26 @@ class WorkspaceRecommendedExtensionsView extends ExtensionsListView {
|
|
|
1258
1285
|
const installed = (await this.extensionsWorkbenchService.queryLocal())
|
|
1259
1286
|
.filter(l => l.enablementState !== 1 );
|
|
1260
1287
|
const recommendations = (await this.getWorkspaceRecommendations())
|
|
1261
|
-
.filter(
|
|
1288
|
+
.filter(recommendation => installed.every(local => isString(recommendation) ? !areSameExtensions({ id: recommendation }, local.identifier) : !this.uriIdentityService.extUri.isEqual(recommendation, local.local?.location)));
|
|
1262
1289
|
return this.getInstallableRecommendations(recommendations, { source: 'install-all-workspace-recommendations' }, CancellationToken.None);
|
|
1263
1290
|
}
|
|
1264
1291
|
async installWorkspaceRecommendations() {
|
|
1265
1292
|
const installableRecommendations = await this.getInstallableWorkspaceRecommendations();
|
|
1266
1293
|
if (installableRecommendations.length) {
|
|
1267
|
-
|
|
1294
|
+
const galleryExtensions = [];
|
|
1295
|
+
const resourceExtensions = [];
|
|
1296
|
+
for (const recommendation of installableRecommendations) {
|
|
1297
|
+
if (recommendation.gallery) {
|
|
1298
|
+
galleryExtensions.push({ extension: recommendation.gallery, options: {} });
|
|
1299
|
+
}
|
|
1300
|
+
else {
|
|
1301
|
+
resourceExtensions.push(recommendation);
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
await Promise.all([
|
|
1305
|
+
this.extensionManagementService.installGalleryExtensions(galleryExtensions),
|
|
1306
|
+
...( resourceExtensions.map(extension => this.extensionsWorkbenchService.install(extension)))
|
|
1307
|
+
]);
|
|
1268
1308
|
}
|
|
1269
1309
|
else {
|
|
1270
1310
|
this.notificationService.notify({
|