Skip to content

v2.1.0 — OpenCode V1 + V2

Choose a tag to compare

@SolitudeRA SolitudeRA released this 19 Oct 00:52
· 3 commits to main since this release
09ca657

Installation advisory: A clean native npm installation of 2.1.0 failed dependency resolution before the TUI launched. The fix is available in v2.1.1; use that patch for installation. This does not invalidate the local-directory rendering checks recorded below, but those checks did not establish npm installation.

OpenCode V1 and V2 in one package

opencode-tui-context@2.1.0 adds the OpenCode V2 plugin API while retaining V1 support. Both hosts use the same package version, panel, and display options; the plugin loads the adapter for the host that is running it.

Installation issue

Post-publication verification with OpenCode V1 1.18.31 failed with unable to resolve dependency tree (ERESOLVE). The package's optional peers caused npm to resolve both host SDK families. The selected @opencode-ai/plugin@1.19.3 dependency tree included @opentui/keymap@0.6.6 and @opentui/solid@0.6.6, conflicting with this plugin's @opentui/solid >=0.4.5 <0.6 declaration. The TUI did not launch during that native registry-install attempt, and no model calls were made.

Use v2.1.1 for the corrected package metadata. The original 2.1.0 tag and assets remain unchanged. Its local ZIP layout is package.json, the root tui.js, and all three files in dist/; the existing local-package acceptance below is separate from npm dependency resolution.

Archived English guide · 原版中文指南 · 当時の日本語ガイド

Changes

  • Native V2 Plugin.define() integration, alongside the V1 module contract. Lazy loading keeps each host's SDK and renderer isolated from the other adapter.
  • Shared context-window and token-composition bars, responsive legends, theme colors, and configuration across both hosts.
  • Usage follows the latest assistant snapshot with positive output tokens in the active context. Reverted messages and usage before completed compaction are excluded; model limits come from the measured message's model.
  • Reactive V2 updates and V1 event-driven refresh with disposal cleanup. The plugin reads existing usage without polling, tokenizing text, or making model calls.
  • Matching ten-file npm and ZIP packages, plus updated English, Chinese, and Japanese installation and configuration guides.

Validation scope

Checks passed locally and in Ubuntu and Windows CI: type checking, 93 unit tests with 185 assertions, three entrypoint-isolation scenarios, nine V2 renderer groups using OpenTUI 0.5.17 / Solid 1.9.15, and eight V1 renderer groups using OpenTUI 0.4.5 / Solid 1.9.12.

The same unpacked release candidate was loaded in isolated Windows configurations with real OpenCode V1 1.18.31 and V2 2.0.32. V1 checked usage, empty state, revert/unrevert, a completed-compaction fixture, sidebar resizing, and plugin disable/re-enable across 40 captured frames. V2 checked usage, empty state, real revert/clear operations, sidebar resizing, and configuration-driven disable/re-enable across 58 captured frames. Archive contents and checksums were validated.

Host checks used synthetic sessions and made no external model calls. These results cover the named hosts and fixtures, not every version in the declared compatibility range or live-provider conversations. The post-publication npm installation failed as described above. The npm website returned Cloudflare HTTP 403, so its README, preview image, and link rendering could not be visually verified.