sessions: Apply custom file icon themes in Files explorer - #335185
Closed
Dmitriy Vasyura (dmitrivMS) wants to merge 2 commits into
Closed
sessions: Apply custom file icon themes in Files explorer#335185Dmitriy Vasyura (dmitrivMS) wants to merge 2 commits into
Dmitriy Vasyura (dmitrivMS) wants to merge 2 commits into
Conversation
Register a non-executable manifest containing only the declarative contribution points supported by the Agents window when an extension cannot run there. This lets file icon themes remain available without enabling extension code or unsupported contributions.\n\nRefs #335181\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
September 9, 2026 00:48
View session
Resolve the ExtensionManifestPropertiesService test import conflict by retaining both the upstream Agents window capability coverage and the custom icon theme regression coverage.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Initial host startup can still execute restricted extensions, while restart sanitization can disable exempt built-in extensions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 2
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
src/vs/workbench/services/extensions/common/abstractExtensionService.ts — The restricted manifest is not used to initialize the first local extension host. Both… |
|
src/vs/workbench/services/extensions/common/abstractExtensionService.ts — This predicate does not match the existing Sessions-window enablement rules.… |
|
src/vs/workbench/services/extensions/test/common/extensionManifestPropertiesService.test.ts — This test only calls the pure manifest helper, so it passes even though the initial extension-host… |
What changed in this PR
Enables custom file icon themes in the Agents window while attempting to prevent extension code execution.
Changes:
- Sanitizes unsupported extension manifests.
- Applies sanitization during extension discovery and updates.
- Adds unit coverage for manifest filtering.
| File | Description |
|---|---|
abstractExtensionService.ts |
Applies Sessions-window manifest filtering. |
extensionManifestPropertiesService.ts |
Creates restricted declarative manifests. |
extensionManifestPropertiesService.test.ts |
Tests manifest sanitization. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -520,15 +523,15 @@ export abstract class AbstractExtensionService extends Disposable implements IEx | |||
|
|
|||
| for await (const extensions of this._resolveExtensions()) { | |||
| if (extensions instanceof ResolverExtensions) { | |||
| resolverExtensions = checkEnabledAndProposedAPI(this._logService, this._extensionEnablementService, this._extensionsProposedApi, extensions.extensions, false); | |||
| resolverExtensions = checkEnabledAndProposedAPI(this._logService, this._extensionEnablementService, this._extensionsProposedApi, extensions.extensions.map(extension => this._getExtensionDescriptionForCurrentWindow(extension)), false); | |||
Comment on lines
+1154
to
+1158
| if (!this._environmentService.isSessionsWindow || this._extensionManifestPropertiesService.canExecuteOnSessionsWindow(extension)) { | ||
| return extension; | ||
| } | ||
|
|
||
| const safeExtension = toSessionsWindowSafeExtension(extension); |
| @@ -145,6 +145,45 @@ suite('ExtensionManifestPropertiesService - SessionsWindowSupport', () => { | |||
| ], [true, false, false]); | |||
| }); | |||
|
|
|||
| test('restricts executable extensions to supported declarative contributions', () => { | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
This keeps the Agents window execution boundary intact while allowing its Files explorer to resolve the selected custom icon theme.
Fixes #335181
Validation
npm run compilenode build/hygiene.ts src/vs/workbench/services/extensions/common/abstractExtensionService.ts src/vs/workbench/services/extensions/common/extensionManifestPropertiesService.ts src/vs/workbench/services/extensions/test/common/extensionManifestPropertiesService.test.tsExtensionManifestPropertiesServiceunit tests (35 passing)