Files
oh-my-opencode/src
PeterPonyu 08959d634e feat(doctor): warn when oh-my-openagent/tui is missing from tui.json
The plugin ships two module entries: the server plugin (registered in
opencode.json) and the TUI plugin (./tui subpath, registered in tui.json).
opencode's TUI loader reads tui.json, not opencode.json, so a fresh install
that only writes opencode.json leaves the Roles - Models sidebar section
and TUI-only commands unloaded.

Commit 19e8cab717 fixed the install flow, but existing users who installed
before that won't have tui.json populated and have no signal that anything
is wrong. This adds a doctor check that detects the mismatch and emits a
clear warning with a one-line fix suggestion (re-run the installer or add
the entry manually).

The check is a soft warning, not a fatal blocker, and is pure (no side
effects, no auto-write). It accepts:
- canonical and legacy package names in either config
- file: URLs pointing at a local checkout of our package (opencode-tui
  loads the ./tui subpath via package.json exports for those entries)

Status matrix:
- both registered                   -> pass
- server registered, TUI missing    -> warn
- TUI provided via file: entry      -> pass
- neither registered                -> skip (plugin not installed at all)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 06:47:43 -04:00
..