opencode
opencode copied to clipboard
[FEATURE]: Add command palette action to reload configuration without restart
Feature Description
Add a command to the command palette that reloads/restarts OpenCode to reflect configuration changes without having to manually exit and start again.
Use Case
When making changes to OpenCode configuration files (e.g., opencode.json, AGENTS.md, etc.), users currently need to:
- Exit OpenCode completely
- Restart OpenCode manually
This is similar to how shell users need to run source ~/.zshrc after editing their zsh configuration - but ideally OpenCode could handle this more seamlessly.
Proposed Solution
Add a command in the command palette (accessible via ctrl+p) such as:
-
/reloador/restart- Reloads configuration and restarts the session - Or a keyboard shortcut like
ctrl+shift+r
This command would:
- Re-read all configuration files
- Reload any changed settings (providers, models, keybindings, hooks, etc.)
- Optionally preserve the current session/conversation state
This would greatly improve the developer experience when:
- Testing new model configurations
- Adding/modifying custom tools or MCP servers
- Tweaking keybindings or hooks
- Updating AGENTS.md instructions