Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

feat(config): add disabled_plugins support for per-project plugin filtering#16509

Open
JWhiteCat wants to merge 1 commit intoanomalyco:devfrom
JWhiteCat:feat/disabled-plugins
Open

feat(config): add disabled_plugins support for per-project plugin filtering#16509
JWhiteCat wants to merge 1 commit intoanomalyco:devfrom
JWhiteCat:feat/disabled-plugins

Conversation

@JWhiteCat
Copy link

@JWhiteCat JWhiteCat commented Mar 7, 2026

Issue for this PR

N/A (new feature, no existing issue)

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a disabled_plugins config field that lets users disable specific plugins by name per-project. Follows the same pattern as the existing disabled_providers — accepts an array of canonical plugin names matched via getPluginName() (supports npm-pkg@version, @scope/pkg@version, file:// URLs). The field merges across config levels through mergeConfigConcatArrays, so both global and project-level disabling work together.

Example usage in opencode.json:

{
  "disabled_plugins": ["oh-my-opencode"]
}

Changes:

  • packages/opencode/src/config/config.ts: Added disabled_plugins to mergeConfigConcatArrays, added the field to Info schema, added filtering logic after deduplicatePlugins().
  • packages/opencode/test/config/config.test.ts: Added 4 test cases covering basic filtering, project-level override, scoped package matching, and cross-level merging.

How did you verify your code works?

Ran the 4 new test cases in packages/opencode/test/config/config.test.ts — all pass. Also manually verified by adding disabled_plugins to a local opencode.json and confirming the specified plugin was excluded from the loaded plugin list.

Screenshots / recordings

N/A (no UI changes)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

…tering

Allow disabling specific plugins by name via the disabled_plugins config field. Follows the same pattern as disabled_providers - accepts an array of canonical plugin names that are matched using getPluginName(). The field merges across config levels (global + project), so both global and project-level disabling works.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Mar 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

1 participant