Skip to content

About

Experimental community project exploring extensible actions for messages in the OpenCode TUI.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

opencode-message-actions

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.

Status

Experimental. The plugin works as a TUI command, but it does not yet add an action to OpenCode's built-in Message Actions dialog.

Requirements

  • OpenCode 1.18.16 or a compatible version with external TUI plugins.
  • Bun.

Use locally

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
opencode

The 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.

Install from npm

The package is available as an experimental npm package.

Project-specific installation

To install the plugin only for the current project, run this command from the project root:

opencode plugin opencode-message-actions

OpenCode 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.

Global installation

To make the plugin available in every project, run:

opencode plugin -g opencode-message-actions

OpenCode 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.

Current prototype

Response previews are shown as a single normalized line, which keeps the selection list compact when assistant messages contain Markdown or multiple paragraphs.

Scope

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.

Related OpenCode discussions

Contributing

See CONTRIBUTING.md for issue and pull request guidelines.

License

MIT. This project is not affiliated with or maintained by the OpenCode team.

About

Experimental community project exploring extensible actions for messages in the OpenCode TUI.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages