Skip to content

Commit 8861a8d

Browse files
benibenjlszomoru
authored andcommitted
Merge pull request #315232 from microsoft/benibenj/strategic-salmon
Allow more extensions to be enabled in the sessions window
2 parents 6c8ff55 + 7c661a3 commit 8861a8d

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { Delayer } from '../../../../base/common/async.js';
3434
import { IProductService } from '../../../../platform/product/common/productService.js';
3535
import { isWeb } from '../../../../base/common/platform.js';
3636
import { ChatEntitlementService, IChatEntitlementService } from '../../chat/common/chatEntitlementService.js';
37+
import { SESSIONS_WINDOW_ALLOWED_EXTENSIONS } from './sessionsWindowAllowedExtensions.js';
3738

3839
const SOURCE = 'IWorkbenchExtensionEnablementService';
3940

@@ -638,6 +639,11 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench
638639
return false;
639640
}
640641

642+
// Allow-listed extensions are always enabled in the sessions window.
643+
if (SESSIONS_WINDOW_ALLOWED_EXTENSIONS.has(extension.identifier.id.toLowerCase())) {
644+
return false;
645+
}
646+
641647
// Built-in extensions are enabled in sessions window except the chat extension and extensions that contribute not supported features.
642648
if (extension.isBuiltin) {
643649
if (extension.identifier.id.toLowerCase() === this._chatExtensionId) {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
/**
7+
* List of extension ids (lowercased) that are allowed to run in the sessions window
8+
* even if they would otherwise be disabled by the sessions window environment check.
9+
*/
10+
export const SESSIONS_WINDOW_ALLOWED_EXTENSIONS: ReadonlySet<string> = new Set<string>([
11+
'pkief.material-icon-theme',
12+
'zhuangtongfa.material-theme',
13+
'vscode-icons-team.vscode-icons',
14+
'oderwat.indent-rainbow',
15+
'formulahendry.auto-close-tag',
16+
'pranaygp.vscode-css-peek',
17+
'codezombiech.gitignore',
18+
'usernamehw.errorlens',
19+
'wayou.vscode-todo-highlight',
20+
'bierner.markdown-mermaid',
21+
'kisstkondoros.vscode-gutter-preview',
22+
'tomoki1207.pdf',
23+
].map(id => id.toLowerCase()));

0 commit comments

Comments
 (0)