Skip to content

Conversation

@agustif
Copy link

@agustif agustif commented Dec 14, 2025

Add 'List plugins' command to the Ctrl+P command dialog.

  • Shows up in command dialog (Ctrl+P)
  • Opens modal displaying all enabled plugins
  • Shows plugin names and versions
image image

@agustif agustif force-pushed the feat/plugins-command-dialog branch from adaf760 to d6981ae Compare December 14, 2025 03:21
- Add 'List plugins' command to Ctrl+P dialog
- Opens modal showing all enabled plugins with versions
- Uses sync.data.config for synchronous access
@agustif agustif force-pushed the feat/plugins-command-dialog branch from d6981ae to 2f34eb9 Compare December 14, 2025 03:24
- Fix Config.update to write to opencode.jsonc/opencode.json instead of config.json
  This ensures config changes persist between sessions since the loader reads
  opencode.jsonc/opencode.json, not config.json

- Fix plugin loading to respect disabled_plugins array
  Plugins in disabled_plugins are now properly filtered out and not loaded

Fixes issue where plugin enable/disable changes were not persisting between
sessions and disabled plugins were still being loaded.
@rekram1-node
Copy link
Collaborator

do you think it's better to have it's own section instead of in status?

Config.update now uses Filesystem.findUp to find existing config files
using the same logic as config loading. This ensures we write to the
same file that will be loaded on the next session, fixing persistence
issues when config files exist in parent directories.
- Fix mergeConfigWithPlugins to merge disabled_plugins arrays (union) instead of replacing
- Simplify Config.update() to write update directly to file, clear cache, and reload
- Update server endpoint to return actual merged config result
- Ensure changes persist between sessions by properly clearing state cache

This fixes the issue where plugin enable/disable changes were not persisting
between restarts. The key was ensuring we write to file, clear cache, and
reload the full merged config state.
Use reconcile() when updating the config in the sync store to ensure
deep reactive updates trigger the enabledPlugins memo to recompute,
providing immediate visual feedback when toggling plugins in the UI.
Add a note in the plugins dialog indicating that changes require
a restart to take effect, making it clearer to users that the
UI state reflects the config state (what will be after restart)
rather than the currently running plugins.
When updating plugin config, we should REPLACE the arrays, not merge/concatenate them.
The merge logic is for loading configs from multiple sources, not for updates.

This fixes the issue where enabling plugins wasn't persisting correctly because
the arrays were being concatenated instead of replaced.
@agustif
Copy link
Author

agustif commented Dec 14, 2025

do you think it's better to have it's own section instead of in status?

wdym by this, I just couldn't see them anywhere else and was bugging me out discoverability wise

I'd also like to be able to enable/disable from the app not just config files

@agustif
Copy link
Author

agustif commented Dec 14, 2025

Also no discussions for RFC but would be nice to try to give more power to plugins like be able to hook on the ui wise and maybe some way to install them easily from a repo like opencode plugin install owner/repo or such

lmk where would be a good place to discuss these!

@rekram1-node
Copy link
Collaborator

what i mean is we have the /status command and im wondering if showing the plugins there would make more sense

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.

2 participants