Skip to content

Port TUI sidebar to v2 CLI-plugin slot API #74

Description

@frap129

Question

Port the TUI sidebar (tui/index.tsx, tui/slots/sidebar-content.tsx) to the v2 CLI-plugin API:

  • Module contract: v2 default export { id, setup(ctx) } (v1's (api, options, meta) TuiPlugin is rejected; our current { id, tui } shape would fail isPlugin).
  • Slot: api.slots.register({ order, slots: { sidebar_content } })ctx.ui.slot({ target: "sidebar.content", placement, render }) (check exact claim schema in packages/plugin/src/tui/* on the sst/opencode beta branch; placement kinds prepend/append/before/after/replace).
  • Rebuild data flow: v1 read matched-rule state via api.client + file reads; v2 CLI-plugin ctx has data stores (cached session/message stores + data.on event bus), client (OpenCodeClient), theme/themeMode. Check whether matched-rule state (still written to ~/.opencode/state/opencode-rules/{sessionID}.json by the server) is best read via the new client, storage, or direct fs read.
  • Keep peer deps (solid-js ≥1.9, @opentui/* ≥0.5.10); verify the build (build-tui.mjs) still emits dist/tui/index.js with the right shape for Host.resolve (./tui entry).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

v2Part of the opencode v2 migration effortwayfinder:taskWork required to unblock a wayfinding decision

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions