Request
Expose the remaining SGR cell attributes and the cursor visibility mode in snapshot() output:
SnapshotCell: inverse (SGR 7), strikethrough (SGR 9), faint (SGR 2), invisible (SGR 8).
TerminalSnapshot: cursor visibility (DECTCEM, ESC[?25h / ESC[?25l), for example cursorVisible: boolean.
Why
agent-tty (coder/agent-tty) replays recordings through snapshot({ includeCells: true }) to export deterministic SVG without a browser (coder/agent-tty#171). In 0.1.0-beta.0, SnapshotCell (dist/types.d.ts) exposes only bold, italic, underline, foreground and background. TerminalSnapshot has cursorRow and cursorCol but no visibility flag. As a result:
- Reverse-video, strikethrough, dim and hidden text render as plain text. Reverse video matters most: TUIs use it for selection bars, status lines and fuzzy-finder highlights (fzf, htop, less).
- The cursor is always drawn, even after an application hides it with
ESC[?25l.
Suggested shape
Optional booleans, following the existing bold?/italic?/underline? convention, so current consumers keep working:
export interface SnapshotCell {
// existing fields...
inverse?: boolean;
strikethrough?: boolean;
faint?: boolean;
invisible?: boolean;
}
export interface TerminalSnapshot {
// existing fields...
cursorVisible?: boolean;
}
Report inverse as the raw attribute rather than pre-swapping foreground and background, so consumers can apply their own default colors. Once this ships, agent-tty can map the fields in its native backend (src/renderer/libghosttyVt/backend.ts) and SVG renderer (src/export/svg.ts), which already honors an optional cursorVisible flag.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
Request
Expose the remaining SGR cell attributes and the cursor visibility mode in
snapshot()output:SnapshotCell:inverse(SGR 7),strikethrough(SGR 9),faint(SGR 2),invisible(SGR 8).TerminalSnapshot: cursor visibility (DECTCEM,ESC[?25h/ESC[?25l), for examplecursorVisible: boolean.Why
agent-tty(coder/agent-tty) replays recordings throughsnapshot({ includeCells: true })to export deterministic SVG without a browser (coder/agent-tty#171). In0.1.0-beta.0,SnapshotCell(dist/types.d.ts) exposes onlybold,italic,underline,foregroundandbackground.TerminalSnapshothascursorRowandcursorColbut no visibility flag. As a result:ESC[?25l.Suggested shape
Optional booleans, following the existing
bold?/italic?/underline?convention, so current consumers keep working:Report
inverseas the raw attribute rather than pre-swappingforegroundandbackground, so consumers can apply their own default colors. Once this ships, agent-tty can map the fields in its native backend (src/renderer/libghosttyVt/backend.ts) and SVG renderer (src/export/svg.ts), which already honors an optionalcursorVisibleflag.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high