Experimental community plugin for extensible actions on AI messages in the OpenCode TUI.
This project explores a missing extension point: actions on a specific response from the AI in the conversation feed. The first experiment is a local favorite for assistant responses.
The first use case is favoriting an AI response. The current prototype exposes this through a TUI command because OpenCode does not yet provide a plugin callback for selecting a message in the conversation feed.
This project is independent and is not affiliated with the OpenCode team.
Experimental. The plugin works as a TUI command, but it does not yet add an action to OpenCode's built-in Message Actions dialog.
- OpenCode
1.18.16or a compatible version with external TUI plugins. - Bun.
This repository is currently distributed as source code. To use the experiment locally, clone it, install dependencies, and start OpenCode from the project root:
bun install
opencodeThe included tui.json loads the local plugin. In the TUI, open the command palette with Ctrl+P and choose Favorite AI responses. You can also use /favorites.
Select an assistant response to toggle its favorite status. Favorites are stored in OpenCode's local TUI key-value storage.
The package is available as an experimental npm package.
To install the plugin only for the current project, run this command from the project root:
opencode plugin opencode-message-actionsOpenCode detects the TUI entrypoint and adds the package to the project's .opencode/tui.json configuration. Restart OpenCode after installation. Other projects are not affected.
To make the plugin available in every project, run:
opencode plugin -g opencode-message-actionsOpenCode adds the package to the global TUI configuration, usually located at ~/.config/opencode/tui.json. The plugin is then loaded in every project unless it is disabled or overridden by a more specific configuration.
The equivalent configuration is:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": [
"opencode-message-actions"
]
}If you prefer manual configuration, add the package to tui.json instead.
Response previews are shown as a single normalized line, which keeps the selection list compact when assistant messages contain Markdown or multiple paragraphs.
This prototype validates the action contract and persistence. It does not yet add a contextual action to the built-in Message Actions dialog. That requires a small upstream extension in OpenCode.
The broader set of candidate actions and experiments is tracked in docs/roadmap.md.
- #33584: Built-in per-message feedback and a plugin hook
- #32967: Reorder message actions
- #24017: Saving prompts and threads
See CONTRIBUTING.md for issue and pull request guidelines.
MIT. This project is not affiliated with or maintained by the OpenCode team.