Repository navigation
Support opencode v2 in Pulse for opencode (0.2.0) - #17
Merged
Merged
Conversation
opencode v2 (@opencode/cli 2.x) loads the same ./tui entry but calls a
setup(context) function with a new plugin API. The module now exports
{ id, tui, setup }: v1.tsx keeps the 1.15+ host, v2.tsx adds the v2 host
(slot claims on sidebar.content, app and prompt.footer; keymap layer;
storage; promise dialogs), and both render the shared views in view.tsx.
v2's storage store updates only after its file is written, so an edit is
held in memory until then; without this the next refresh read the old
list back and the panel lagged one edit behind.
Tested in opencode 2.2.5 and 1.19.5. Version 0.2.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DuYf7wf62kLrVeZHzMtocm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
opencode v2 (
@opencode/cli2.x) has a new TUI plugin API. The opencode Ecosystem reviewer asked for v2 support before listing the plugin (anomalyco/opencode#61387).What changed
src/tui.tsxexports{ id, tui, setup }. v1 (1.15+) callstuiand v2 callssetup; both resolve the same./tuientry.src/v1.tsx: the existing v1 host, unchanged in behavior.src/v2.tsx: the new v2 host. The sidebar panel appends tosidebar.content. The quote band appends toapp(the bottom line, which is the default) or toprompt.footer(right). Commands are added withkeymap.layer(palette and slash), state is kept withstorage.store, and dialogs use v2's promise API. Nothing in opencode's own UI is replaced.src/view.tsx: the panel and band, shared by both hosts.storage.storeupdates only after its file is written, so an edit is held in memory until then. Without this, the panel lagged one edit behind.opencode plugin add,cli.json) and v1 (tui.json). AGENTS.md is updated to match. Version bumped to 0.2.0.Testing
make test-opencodepasses.rightplacement,/pulse-add,/pulse-remove,/pulse-pauseand/pulse-band. Also checked clicking a row (detail dialog), folding the panel, and that state persists in v2 storage.Generated by Claude Code