v0.1.5 — single-Enter slash commands
Features
- Single-Enter slash commands:
/peers,/list-agents,/peers-name,/peers-inboxnow execute on the first Enter in the opencode TUI. The package ships a TUI entry (exports["./tui"]) that registers the four commands as palette slash commands; selecting one runs the canonical server command through the same interception path as a normal submit. Enable it by adding"opencode-plugin-peers"to~/.config/opencode/tui.json(the TUI's plugin list, separate fromopencode.json) — see README. Older opencode versions ignore the entry entirely; without it, behavior is unchanged (two-Enter insert). - Commands typed with arguments (e.g.
/peers-name frontend) are untouched: no autocomplete row matches, Enter submits normally and the argument is preserved.
Tests
- 7 new TUI-entry tests (module shape, registerLayer shape, run ordering, home-route and error toasts, dispose, zero-runtime-import invariant) —
npm test64/64 green. - Real-TUI E2E (pty-driven
opencode -c): single-Enter execution PASS; argument-preserved submit PASS.
Docs
- README: tui.json setup for single-Enter commands, duplicate-autocomplete-row cosmetic note, backward compatibility.
- CLAUDE.md: TUI entry architecture notes (zero-runtime-import constraint, fuzzysort tie-break lever, tui.json discovery).
Notes
- Known cosmetic: the autocomplete shows two identical
/peers*rows (instant-execute entry + server-defined command); the highlighted row is the instant one.
Full Changelog: v0.1.4...v0.1.5