Skip to content

Commit 85028b4

Browse files
Code clean up
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent 3d29b66 commit 85028b4

2 files changed

Lines changed: 0 additions & 44 deletions

File tree

code/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ import { IExtensionIgnoredRecommendationsService, IExtensionRecommendationsServi
5757
import { IWorkspaceExtensionsConfigService } from '../../../services/extensionRecommendations/common/workspaceExtensionsConfig.js';
5858
import { IHostService } from '../../../services/host/browser/host.js';
5959
import { LifecyclePhase } from '../../../services/lifecycle/common/lifecycle.js';
60-
import { IBrowserWorkbenchEnvironmentService } from '../../../services/environment/browser/environmentService.js';
6160
import { IPreferencesService } from '../../../services/preferences/common/preferences.js';
6261
import { CONTEXT_SYNC_ENABLEMENT } from '../../../services/userDataSync/common/userDataSync.js';
6362
import { IViewsService } from '../../../services/views/common/viewsService.js';
@@ -2016,22 +2015,6 @@ class TrustedPublishersInitializer implements IWorkbenchContribution {
20162015
}
20172016
}
20182017
}
2019-
2020-
class DefaultExtensionsInitializer implements IWorkbenchContribution {
2021-
constructor(
2022-
@IAllowedExtensionsService allowedExtensionsService: IAllowedExtensionsService,
2023-
@IBrowserWorkbenchEnvironmentService environmentService: IBrowserWorkbenchEnvironmentService,
2024-
) {
2025-
// Initialize AllowedExtensionsService with DEFAULT_EXTENSIONS from environment service
2026-
// This allows the service to validate extensions against the environment variable
2027-
// Note: Actual installation happens on the server side where file system access is available
2028-
const defaultExtensions = environmentService.defaultExtensions;
2029-
if (defaultExtensions) {
2030-
(allowedExtensionsService as any).setDefaultExtensionsEnv(defaultExtensions);
2031-
}
2032-
}
2033-
}
2034-
20352018
class ExtensionToolsContribution extends Disposable implements IWorkbenchContribution {
20362019

20372020
static readonly ID = 'extensions.chat.toolsContribution';
@@ -2059,7 +2042,6 @@ workbenchRegistry.registerWorkbenchContribution(ExtensionsCompletionItemsProvide
20592042
workbenchRegistry.registerWorkbenchContribution(UnsupportedExtensionsMigrationContrib, LifecyclePhase.Eventually);
20602043
workbenchRegistry.registerWorkbenchContribution(TrustedPublishersInitializer, LifecyclePhase.Eventually);
20612044
workbenchRegistry.registerWorkbenchContribution(ExtensionMarketplaceStatusUpdater, LifecyclePhase.Eventually);
2062-
workbenchRegistry.registerWorkbenchContribution(DefaultExtensionsInitializer, LifecyclePhase.Restored);
20632045
if (isWeb) {
20642046
workbenchRegistry.registerWorkbenchContribution(ExtensionStorageCleaner, LifecyclePhase.Eventually);
20652047
}

code/src/vs/workbench/services/environment/browser/environmentService.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ export interface IBrowserWorkbenchEnvironmentService extends IWorkbenchEnvironme
3838
* Gets whether a resolver extension is expected for the environment.
3939
*/
4040
readonly expectsResolverExtension: boolean;
41-
42-
/**
43-
* Gets the DEFAULT_EXTENSIONS environment variable value.
44-
* This is a semicolon-separated list of extension IDs that should be installed by default.
45-
*/
46-
readonly defaultExtensions?: string;
4741
}
4842

4943
export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService {
@@ -267,26 +261,6 @@ export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvi
267261
@memoize
268262
get editSessionId(): string | undefined { return this.options.editSessionId; }
269263

270-
@memoize
271-
get defaultExtensions(): string | undefined {
272-
// First check payload (if passed via workspace provider)
273-
if (this.payload?.has('defaultExtensions')) {
274-
const value = this.payload.get('defaultExtensions');
275-
console.log('!!!!!!!! BrowserWorkbenchEnvironmentService.defaultExtensions from payload:', value);
276-
return value;
277-
}
278-
// Fallback to process.env (for Che Code and other environments)
279-
// Note: In web environments, env may be empty, so this will return undefined
280-
const envValue = env['DEFAULT_EXTENSIONS'];
281-
console.log('!!!!!!!! BrowserWorkbenchEnvironmentService.defaultExtensions from env:', envValue);
282-
console.log('!!!!!!!! BrowserWorkbenchEnvironmentService.defaultExtensions - env object:', env);
283-
console.log('!!!!!!!! BrowserWorkbenchEnvironmentService.defaultExtensions - typeof process:', typeof process);
284-
if (typeof process !== 'undefined' && process.env) {
285-
console.log('!!!!!!!! BrowserWorkbenchEnvironmentService.defaultExtensions - process.env.DEFAULT_EXTENSIONS:', process.env['DEFAULT_EXTENSIONS']);
286-
}
287-
return envValue;
288-
}
289-
290264
private payload: Map<string, string> | undefined;
291265

292266
constructor(

0 commit comments

Comments
 (0)