Documentation
¶
Index ¶
- Constants
- func RailConnector(depth int) string
- func RailDetail(text string, depth, width int) []string
- func RailNode(glyph, text string, depth, width int) []string
- func RailNodeStyled(glyph, text string, textStyle lipgloss.Style, depth, width int) []string
- func RailSpine(n int) string
- func WrapToWidth(s string, width int) []string
Constants ¶
const RailWidth = 2
railWidth is the display width of one rail column (and of a node glyph), so nested content indents by a whole number of aligned columns.
Variables ¶
This section is empty.
Functions ¶
func RailConnector ¶
railConnector renders a bare connector row between two nodes at depth: the node column continued as a rail with no glyph — railSpine(depth) plus a trailing rail glyph trimmed of its trailing space, so the row is just the faint vertical bars.
func RailDetail ¶
railDetail renders detail rows under a node at depth: the detail belongs to the node's own column, which is one rail level deeper, so each row is railSpine(depth+1) plus faint (styles.ToolResultStyle) width-wrapped text. Trailing spaces are trimmed per row.
func RailNode ¶
railNode renders a node row at depth: `depth` leading rail columns, then the node glyph (2 cols, e.g. styles.LitDot / styles.ToolNode(...)), then width-wrapped text hanging under the glyph. Continuation lines replace the node's glyph column with another rail level, preserving both text alignment and the step's continuous timeline. glyph is pre-styled by the caller; text is plain. Trailing spaces are trimmed per row.
func RailNodeStyled ¶
railNodeStyled is railNode with a per-line text style applied to each wrapped text row (e.g. faint tool headers) before assembly — the glyph and rail columns are left unstyled by this helper (the glyph is pre-styled by the caller; the spine carries its own faint style). railNode delegates here with a no-op style. Because the styling is zero-width ANSI, an ANSI-stripped assertion sees the SAME text as railNode.
func RailSpine ¶
railSpine returns n leading styled rail columns ("│ " each). railSpine(0) == "". It is the quiet vertical spine shared by thinking, wrapped nodes, and tool details, so nodes at nesting depth n hang below n bars.
func WrapToWidth ¶
WrapToWidth word-wraps s to width columns and trims trailing layout padding.
Types ¶
This section is empty.