Documentation
¶
Overview ¶
Package render turns session events into readable terminal lines: one event becomes one or a few lines, streamed agent text is joined, and charts and tables in answers are drawn.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatMarkdown ¶
FormatMarkdown renders a whole answer at once.
Types ¶
type MD ¶
type MD struct {
// contains filtered or unexported fields
}
MD turns streamed Markdown into terminal text: charts become a plot and a table, Markdown tables become aligned tables, everything else passes through. Text can arrive in any chunking; ordinary lines are written as soon as they start, so a streamed answer reads live.
type MDOptions ¶
type MDOptions struct {
Style style.Style
Width int // terminal columns, for plots
Draw bool // draw charts above their tables
}
MDOptions say how an answer's Markdown is shown in a terminal.
type Options ¶
type Options struct {
Style style.Style
Width int // terminal columns (0: 80)
Charts bool // draw plots above chart tables
Live bool // stream agent text as it arrives and show tool calls when they start
Timestamps bool
// Names maps user ids to what people read ("maya"); "rafiiq" and agents read "Waniis".
Names map[string]string
}
Options say how events are shown.