feat(inspector): replace xterm.js with ghostty-web

- Replace @xterm/xterm, @xterm/addon-fit, and @xterm/addon-web-links with ghostty-web
- Update Terminal component to use ghostty-web API:
  - Add async WASM initialization via init()
  - Use FitAddon with observeResize() for auto-fitting
  - Use onResize callback for terminal resize events
- ghostty-web is API-compatible with xterm.js but uses Ghostty's WASM-compiled VT100 parser
- Benefits:
  - Better rendering of complex scripts (Devanagari, Arabic)
  - XTPUSHSGR/XTPOPSGR support
  - Same battle-tested code as native Ghostty app

Ref: https://github.com/coder/ghostty-web
This commit is contained in:
Nathan Flurry 2026-01-30 13:26:09 -08:00
parent ac0a22cd07
commit 1d1069d6fb
3 changed files with 128 additions and 110 deletions

View file

@ -22,8 +22,6 @@
"lucide-react": "^0.469.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"@xterm/xterm": "^5.5.0",
"@xterm/addon-fit": "^0.10.0",
"@xterm/addon-web-links": "^0.11.0"
"ghostty-web": "^0.3.0"
}
}