Skip to content

v0.1.5 — single-Enter slash commands

Choose a tag to compare

@jkrandom-sudo jkrandom-sudo released this 09 Aug 07:35
· 28 commits to main since this release
53896fd

Features

  • Single-Enter slash commands: /peers, /list-agents, /peers-name, /peers-inbox now 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 from opencode.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 test 64/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