Update docs for terminal emulation
This commit is contained in:
parent
6bd599d47b
commit
0ac5eec30d
2 changed files with 11 additions and 0 deletions
10
CLAUDE.md
10
CLAUDE.md
|
|
@ -13,6 +13,16 @@ Core tech:
|
||||||
- Bun.serve() for HTTP + WebSocket + SSE
|
- Bun.serve() for HTTP + WebSocket + SSE
|
||||||
- plain text output (no xterm.js) for mobile-friendly display
|
- plain text output (no xterm.js) for mobile-friendly display
|
||||||
|
|
||||||
|
## Terminal Emulation
|
||||||
|
|
||||||
|
Output processing uses @xterm/headless for proper VT100 emulation:
|
||||||
|
- src/terminal.ts - headless terminal wrapper
|
||||||
|
- One terminal instance per session (created on auth, disposed on close)
|
||||||
|
- serializeAsHTML() produces HTML for SSE broadcast
|
||||||
|
- ansi.ts and ansi-carryover.ts are deprecated (kept for rollback)
|
||||||
|
|
||||||
|
See docs/terminal-emulation.md for design rationale.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
Inspiration and patterns to steal from:
|
Inspiration and patterns to steal from:
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ Pure Bun stack:
|
||||||
- bun-pty for PTY wrapper
|
- bun-pty for PTY wrapper
|
||||||
- bun:sqlite for persistence
|
- bun:sqlite for persistence
|
||||||
- Bun.serve() for HTTP + WebSocket + SSE
|
- Bun.serve() for HTTP + WebSocket + SSE
|
||||||
|
- @xterm/headless for terminal emulation and state tracking
|
||||||
- plain text output (mobile-friendly)
|
- plain text output (mobile-friendly)
|
||||||
|
|
||||||
Target: ~1000-1500 lines total.
|
Target: ~1000-1500 lines total.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue