Skip to content

Releases

0.3.1: Ghostty rendering and session-loading fixes

Choose a tag to compare

@kriss-spy kriss-spy released this 02 Dec 03:39

0.3.1 fixes Ghostty formula backgrounds, theme colors, and a reproduced session-opening failure. Obsidian image quality problems remain unresolved.

Fixed

  • Match Kitty formula backgrounds and cell padding to the enclosing UI instead of exposing Ghostty's dark terminal default.
  • Use the current theme foreground and refresh existing formulas after theme changes.
  • Remove an image helper whose mixed OpenTUI runtime could allocate colliding native node numbers and stop an existing session from rendering.
  • Initialize MathJax in a lazy worker. Import failures no longer block plugin loading; graphics errors or a 15-second timeout use cell fallback.

Known unresolved issues

  • Blurry formula images in obsidian-opencode. Source inspection points to CSS-pixel canvas sizing in the embedded xterm image addon and the SIXEL sizing path. Runtime pixel-density verification and a host-side fix remain outstanding. Increasing the plugin's pixelRatio alone does not fix the final canvas resolution.
  • Light bottom/right image-edge lines in Obsidian dark mode. Unfilled SIXEL padding, background differences, or scaling may contribute. The precise encoder/decoder cause is not verified. This release does not fix these lines.

Neither problem appeared in the corresponding Ghostty screenshots. This comparison does not establish that Obsidian alone is responsible. No Obsidian integration changes are included. Unicode cells through /latex-render-mode avoid the graphical image path.

Installation

opencode plugin add opencode-latex@0.3.1

Replace older npm pins or local development entries so only one LaTeX package is configured. Restart OpenCode terminals after upgrading.

Verification and compatibility

  • Typecheck and 44 tests pass on Core 0.9.4 / SDK 2.4.0, Core 0.9.9 / SDK 2.4.2, and Core 0.9.12 / SDK 2.4.3.
  • Tests also pass with Bun 1.3.14.
  • The existing pi session opens with graphical formulas and matching light backgrounds in Linux Ghostty 1.4.0 / OpenCode 2.4.1.
  • The 0.3.1 changes have not been verified on Windows or macOS. Obsidian runtime DPI behavior remains unverified.
  • Requires OpenCode 2.4.0+, Core >=0.9.4 <0.10.0, and Bun >=1.3.14. Core 0.7/0.8 still requires separate compatibility adapters. No additional adapter was needed for the tested 0.9.x versions.

Detailed verification

opencode-latex v0.3.0

Choose a tag to compare

@kriss-spy kriss-spy released this 29 Nov 15:28

Fixes the SIXEL background mismatch (#7) and Unicode cells alignment failure (#9). Includes the OpenCode 2.4 migration that the Windows reporter confirmed resolves #8.

  • SIXEL formulas and cell padding use the enclosing painted background. Cached images refresh after a background change. Scroll container fills are included; Kitty keeps transparent pixels.
  • Unicode cells accept empty alignment cells and &-initial continuation rows. Literal text and public TeX content are preserved. Macro-generated alignment cells work, and \blacksquare renders as ■.
  • Requires OpenCode 2.4.0+ with OpenTUI Core >=0.9.4 <0.10.0.

Install

Version 0.3.0 is now available on npm with the latest tag. Install it through OpenCode:

opencode plugin add opencode-latex@0.3.0

The GitHub tarball remains available for a local install.

For Windows, with Node.js/npm available:

$testDir = Join-Path $env:USERPROFILE "opencode-latex-0.3.0"
New-Item -ItemType Directory -Force $testDir | Out-Null
Invoke-WebRequest "https://github.com/kriss-spy/opencode-latex/releases/download/v0.3.0/opencode-latex-0.3.0.tgz" -OutFile (Join-Path $testDir "opencode-latex-0.3.0.tgz")
tar -xzf (Join-Path $testDir "opencode-latex-0.3.0.tgz") -C $testDir
Set-Location (Join-Path $testDir "package")
npm install

Replace the existing LaTeX entry in opencode.jsonc with the extracted package's absolute path. Preserve other plugins and remove duplicate LaTeX entries. Restart OpenCode.

{
  "plugins": ["C:/Users/YOUR_NAME/opencode-latex-0.3.0/package"]
}

Use your actual path. The attached SHA256SUMS records the package checksum. Core 0.9.9 declares Node.js >=26.4.0 for local npm installs. Node 24 may emit an engine warning; the reporter successfully used it for beta.2. OpenCode renders with its bundled runtime.

Verification

  • Typecheck and all 42 tests pass on Core 0.9.4 / SDK 2.4.0 and Core 0.9.9 / SDK 2.4.2.
  • The extracted release package passes typecheck and all 42 tests after an offline Bun install from the dependency cache.
  • Native SIXEL output replayed into isolated Obsidian 1.14.5 / obsidian-opencode 2.4.1 reproduces the beta.2 mismatch. The fixed output matches the surrounding block in both dark and light screenshot checks.
  • The #8 reporter confirmed beta.2 on Windows 11 / OpenCode 2.4.2 / Windows Terminal. The new #7/#9 changes have not been retested on Windows or macOS. A complete OpenCode 2.4.2 session and real Kitty scrolling were not run for this release.

Verification details and screenshots

Older versions

There were no Git merge conflicts. Core 0.7/0.8 hosts need separate Markdown hook and native image adapters, plus their own test matrix. Widening this package's peer range cannot make it compatible. The historical 0.2.1 source targets OpenCode 2.2.2 / Core 0.7 and does not establish Core 0.8 support.

No extra compatibility code is needed outside this release for the tested Core 0.9.4 and 0.9.9 endpoints. The release includes handling for their different scroll-container representations.

opencode-latex v0.3.0-beta.2

Pre-release

Choose a tag to compare

@kriss-spy kriss-spy released this 28 Nov 13:52

Compatibility candidate for OpenCode 2.4.x and issue #8. Windows confirmation is pending.

Changes:

  • Migrates the Markdown renderer to block.text and renderBlock.
  • Requires OpenCode 2.4.0+ and OpenTUI Core >=0.9.4 <0.10.0.
  • Tests against plugin SDK 2.4.2 and Core 0.9.9.

Install on Windows with Node.js/npm available:

$testDir = Join-Path $env:USERPROFILE "opencode-latex-beta"
New-Item -ItemType Directory -Force $testDir | Out-Null
Invoke-WebRequest "https://github.com/kriss-spy/opencode-latex/releases/download/v0.3.0-beta.2/opencode-latex-0.3.0-beta.2.tgz" -OutFile (Join-Path $testDir "opencode-latex-0.3.0-beta.2.tgz")
tar -xzf (Join-Path $testDir "opencode-latex-0.3.0-beta.2.tgz") -C $testDir
Set-Location (Join-Path $testDir "package")
npm install

Replace your existing LaTeX entry in opencode.jsonc with the extracted package's absolute path, then restart OpenCode. Preserve your other plugins. Remove the old opencode-latex@0.2.0 entry and any duplicate LaTeX entries.

{
  "plugins": ["C:/Users/YOUR_NAME/opencode-latex-beta/package"]
}

Use your actual Windows username/path. Forward slashes avoid JSON backslash escaping. To roll back, restore the previous LaTeX entry and restart OpenCode.

This local installation avoids a Git-dependency preparation failure observed with opencode plugin add on Linux OpenCode 2.4.1. The candidate package can also be installed locally on other platforms using the tarball and npm install.

Verification:

  • Standards review found no code blocker. Its documentation finding was corrected.
  • Specification review found no implementation defect. Prerelease metadata and Windows verification wording were corrected.
  • Linux typecheck and all 24 behavior tests pass.
  • The extracted candidate passes all 24 tests after installing its dependencies with npm.
  • No Windows test or complete OpenCode 2.4.2 session check has been performed. This release does not establish that issue #8 is fixed on Windows.

Please test on Windows 11 with OpenCode 2.4.2 and Windows Terminal. Confirm that a latex fence such as \frac{1}{2} renders as Unicode cells instead of raw source. Confirm that /latex-render-mode still opens and works. Report any installation or rendering error.

Known limitation: issue #7 remains open. SIXEL formula backgrounds can differ from surrounding blocks in Obsidian.

The attached .tgz is the package artifact. SHA256SUMS records its checksum. This is a GitHub prerelease, not an npm publication. npm latest remains 0.2.0, and the stable GitHub release is unchanged.

opencode-latex v0.2.1

Choose a tag to compare

@kriss-spy kriss-spy released this 03 Nov 03:30

This release restores graphical LaTeX rendering alongside OpenCode's built-in Unicode renderer on OpenCode 2.2.2 / Core 0.7.x.

  • Uses io.github.kriss-spy.opencode-latex and io.github.kriss-spy.opencode-latex.tui IDs. The external latex renderer takes precedence; built-in math remains available.
  • Replaces the Core <0.6.0 workaround with host-runtime compatibility. Adapts the removed Yoga API and uses public, host-owned native images. Addresses the load failure tracked in #6 for this supported host version.
  • Reuses padded SIXEL images across movement and delegates transparency/encoding to native OpenTUI. This removes JavaScript image reconstruction while scrolling. The reported Obsidian latency in #3 has not been retested in that terminal.
  • Explains when OpenCode's built-in Unicode renderer suffices and when MathJax images are useful. Preserves and packages the README demos.

Requirements and migration:

  • Requires OpenCode 2.2.2 with Core 0.7.x. Older hosts are outside this release's compatibility scope.
  • The renamed TUI ID resets the saved render-mode preference. Select the mode again after updating. ID-based selectors must use the new IDs.
  • SIXEL now uses Core's native alpha handling instead of JavaScript background compositing. It does not provide Kitty-style alpha blending.

Validation passed:

  • bun run check: type checking and 24 tests.
  • npm pack --dry-run: nine required files, including both demo images.
  • Clean tarball installation, server/TUI import checks, and Kitty/SIXEL native paint checks.
  • Installed OpenCode 2.2.2: built-in and external plugin setup both succeed; the external callback paints a forced-Kitty MathJax formula.

Actual Ghostty/Kitty and Obsidian visual appearance, interactive scrolling, and physical terminal negotiation have not been manually verified for this release.

npm publication is pending. The publish attempt returned 404, and npm whoami returned 401. The tested package is attached as opencode-latex-0.2.1.tgz. After npm access is restored, publish this same tarball.

Full changelog

opencode-latex v0.2.0

Choose a tag to compare

@kriss-spy kriss-spy released this 19 Sep 12:06

What's changed

  • Choose a default LaTeX render mode from the OpenCode command palette or with /latex-render-mode.
  • Persist automatic, Kitty, or Unicode-cell rendering preferences across TUI restarts.
  • Clear the saved preference with Use configured default to restore the graphicsMode plugin option.
  • Add regression coverage for preference precedence, command exposure, and resetting to configuration.

Full changelog: v0.1.1...v0.2.0

opencode-latex v0.1.1

Choose a tag to compare

@kriss-spy kriss-spy released this 19 Sep 09:55

Fixes visible right and bottom seams around SIXEL-rendered formulas in embedded xterm.js terminals such as obsidian-opencode.

  • Pad SIXEL images to complete terminal-cell boundaries without changing formula scale.
  • Preserve background compositing across the padded edge.
  • Add regression coverage for sub-cell image dimensions.

opencode-latex v0.1.0

Choose a tag to compare

@kriss-spy kriss-spy released this 19 Sep 09:17

Initial public release.

  • Adds an OpenCode v2 server instruction for readable inline and display math.
  • Registers graphical rendering for fenced latex blocks without replacing other Markdown renderers.
  • Uses Kitty graphics or SIXEL when supported, with selectable Unicode-cell fallback.
  • Preserves a consistent formula scale across single-line and multiline expressions.
  • Tracks terminal zoom without permanently enlarging later formulas.
  • Normalizes commonly double-escaped model output while preserving TeX row breaks.
  • Composites SIXEL images against OpenTUI cell backgrounds for embedded xterm.js terminals.