Skip to content

Add ability to disable individual customizations#311806

Open
pwang347 wants to merge 41 commits intomainfrom
pawang/disableCustomizations
Open

Add ability to disable individual customizations#311806
pwang347 wants to merge 41 commits intomainfrom
pawang/disableCustomizations

Conversation

@pwang347
Copy link
Copy Markdown
Member

@pwang347 pwang347 commented Apr 21, 2026

Fixes #290290

Copilot AI review requested due to automatic review settings April 21, 2026 23:24
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Base: 96d2420e Current: c6971bd0

No screenshot changes.

Copy link
Copy Markdown
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

joshspicer added a commit that referenced this pull request Apr 23, 2026
Replace the per-URI checkbox sync model with an auto-sync approach
where all eligible local customizations are automatically synced to
remote agents. Users opt OUT of syncing specific files rather than
opting in.

Changes:
 AgentCustomizationDisableProvider
  The new provider tracks per-URI `disabled` state instead of
  per-URI `synced` state. Storage key migrated from
 `<harnessId>.customizationDisabled`.
- Remove ICustomizationSyncProvider from IHarnessDescriptor; replace
  with ICustomizationDisableProvider (isDisabled/setDisabled API)
- Remove Checkbox UI from  the syncaiCustomizationListWidget
  checkboxes, template data, and toggle logic are all removed.
  A future PR (#311806) will add a proper disable toggle UI.
- Clean up  remove syncProviderProviderCustomizationItemSource
  coupling; the item source no longer merges synced/unsynced state.
- pluginListWidget: remove syncProvider references

Tests: delete agentCustomizationSyncProvider.test.ts (old opt-in
model), add agentCustomizationDisableProvider.test.ts (new opt-out
model).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pwang347 pwang347 marked this pull request as ready for review April 24, 2026 16:36
@pwang347 pwang347 added the api label Apr 24, 2026
* instead of the individual item, and the item's own
* {@link enablementScope} is ignored.
*/
readonly pluginUri?: Uri;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(shared with you IRL too) This feels like the odd man out in the API, especially since a plugin itself is a ChatSessionCustomizationType

* Whether this customization is currently enabled.
* Defaults to `true` when omitted.
*/
readonly enabled?: boolean;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I generally don't like default to true as it means conditional checks don't work nicely in js. Could this be something like: disabled?: { reason: string }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Part of what is confusing me is that there are a few different concepts here:

  • Is the contribution actually enabled / disabled?
  • Can the contribution be enabled / disabled by the user?

I feel like we need clearer names around this

Also making it more complicated is if a setting is user configurable, then enabled just reflects the initial state, right? Or is the extension supposed to update this value in response to when the command is fired?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks @mjbvz, agree that disabled?: { reason: string } would be a cleaner pattern and removes the need for an extra property.

To be clear, the API here is for presentation purposes only and to allow a user to configure settings from this panel. I don't think it is a goal for this to be always 100% in-sync with the actual contents, rather it would update when the view is refreshed (e.g., by changing tabs). Maybe @joshspicer might have some more thoughts on the lifecycle of this.

Another thing we could do to better group the "Can the contribution be enabled / disabled by the user?" is to put it under a grouped object like disableAction?: { command: Command, scopeHint: ChatSessionCustomizationEnablementScope } but that doesn't seem to be a common pattern in our API.

* {@link ChatSessionCustomizationProvider.onDidChange} so the UI
* re-queries the updated state.
*/
readonly enablementCommand?: string;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should be a Command

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent Skill: Allow users to enable/disable specific skills

4 participants