anomalyco / anomalyco/opencode
[FEATURE]: Expose @opentui/three to external TUI plugins
@simonklee is already working on this.
Since Jul 31, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
External TUI plugins can use host-provided OpenTUI modules, but OpenCode does not currently register @opentui/three in its runtime module map. A file plugin using ThreeRenderable therefore cannot use the host's Three/OpenTUI instances.
Would you accept adding the matching @opentui/three version to OpenCode and merging its runtimeModules into ensureRuntimePluginSupport({ additional })? This would expose the existing OpenTUI capability through the plugin system; it would not add a Three-specific sidebar API or any built-in scene.
I tested this locally with an external plugin rendering an animated, transparent eight-row scene in sidebar_content. A focused loader test verifies that the external plugin imports THREE and ThreeRenderable from the host runtime.
The install footprint includes @opentui/three and its three, jimp, and optional bun-webgpu dependencies. A companion OpenTUI fix can avoid evaluating Jimp for asset-free scenes under OpenCode's browser condition; the underlying Jimp browser-export problem is tracked in https://github.com/jimp-dev/jimp/issues/1402.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.