Widgets / ChatTranscript
ChatTranscript
A virtualized chat/agent transcript: messages, tool calls, diffs, and notices.
Signature
ChatTranscript.view
(theme: AppTheme)
(wrapWidth: int) (frame: int)
(viewportH: int) (offset: int)
(trackStyle: Style) (thumbStyle: Style)
(blocks: TranscriptBlock list)
: LayoutNode<'msg> Parameters
| parameter | type | what it is |
|---|---|---|
wrapWidth | int | Markdown / content wrap width. |
frame | int | A spinner tick, so running tool calls animate. |
viewportH / offset | int | Visible rows and the scroll offset (yours; follow the tail with toBottom). |
blocks | TranscriptBlock list | User / assistant / tool / diff / notice blocks — newest last. |
Notes
Only the blocks intersecting the viewport are built, while the scrollbar reflects the true content height. The offset is your state; ChatTranscript.toBottom/atBottom/clampOffset make following the tail a one-liner in update.