aiCustomization: make plugin/extension/builtin files read-only#302592
Open
connor4312 wants to merge 3 commits intomainfrom
Open
aiCustomization: make plugin/extension/builtin files read-only#302592connor4312 wants to merge 3 commits intomainfrom
connor4312 wants to merge 3 commits intomainfrom
Conversation
- Open plugin, extension, and built-in customization files as read-only in the editor, with a message explaining they cannot be edited. - Extract isReadonlyStorage() helper to DRY the repeated storage type check used in both the open and delete actions. Fixes #301292 (Commit message generated by Copilot)
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the AI Customization management actions so that customization files coming from non-user-editable sources (plugins/extensions/built-in) open as read-only, aligning the editor experience with the intended immutability of those artifacts.
Changes:
- Add
isReadonlyStorage()helper to centralize the “extension/plugin/built-in” storage check. - Attempt to open read-only storages in the editor as read-only with a dedicated read-only message.
- Reuse the same read-only storage check for the delete action gate.
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.ts:258
- This info dialog is now shown for plugin and built-in files as well (via
isReadonlyStorage(storage)), but the title/detail still specifically mention extensions and recommend disabling the extension. Please update the localized strings (or branch onstorage) so the guidance is correct for plugin and built-in sources too.
if (isReadonlyStorage(storage)) {
await dialogService.info(
localize('cannotDeleteExtension', "Cannot Delete Extension File"),
localize('cannotDeleteExtensionDetail', "Files provided by extensions cannot be deleted. You can disable the extension if you no longer want to use this customization.")
);
You can also share your feedback on Copilot code review. Take the survey.
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.ts
Show resolved
Hide resolved
joshspicer
requested changes
Mar 17, 2026
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.

aiCustomization: make plugin/extension/builtin files read-only
in the editor, with a message explaining they cannot be edited.
check used in both the open and delete actions.
Fixes #301292
(Commit message generated by Copilot)