Skip to content

aiCustomization: make plugin/extension/builtin files read-only#302592

Open
connor4312 wants to merge 3 commits intomainfrom
connor4312/301292
Open

aiCustomization: make plugin/extension/builtin files read-only#302592
connor4312 wants to merge 3 commits intomainfrom
connor4312/301292

Conversation

@connor4312
Copy link
Member

aiCustomization: make plugin/extension/builtin files read-only

  • 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)

- 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)
Copilot AI review requested due to automatic review settings March 17, 2026 22:40
@connor4312 connor4312 enabled auto-merge (squash) March 17, 2026 22:40
@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 on storage) 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.

Copy link
Member

@joshspicer joshspicer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'built-in' for the sessions app should be editable (to let the user customize)

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should plugin customizations be read only?

3 participants