output

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONRenderer

type JSONRenderer struct {
	W        io.Writer
	Pretty   bool
	Colorise bool
}

JSONRenderer renders a Report as JSON.

func (*JSONRenderer) Render

func (r *JSONRenderer) Render(_ context.Context, report app.Report) error

type TTYModel

type TTYModel struct {
	Sections         []TTYSection
	ClosingSeparator string // trailing separator after last section
}

TTYModel is the structured display model for terminal output. It is a pure data structure — no I/O — built by BuildTTYModel.

func BuildTTYModel

func BuildTTYModel(report app.Report, now time.Time) TTYModel

BuildTTYModel converts a Report into a structured TTYModel ready for rendering. It is a pure function — no I/O. The returned model contains pre-styled strings. Sections are built first, then separators are sized to the widest rendered line.

type TTYRenderer

type TTYRenderer struct {
	W   io.Writer
	Now time.Time
}

TTYRenderer renders a Report as styled terminal output.

func (*TTYRenderer) Render

func (r *TTYRenderer) Render(_ context.Context, report app.Report) error

type TTYSection

type TTYSection struct {
	Separator  string         // thick separator line (em-dash)
	Header     string         // "  ✻  Claude max 20x · user@email.com"
	WindowRows []TTYWindowRow // per-window rows
	ThinSep    string         // thin separator before aggregate (empty if none)
	AggHeader  string         // aggregate header (empty if none)
	AggRows    []TTYWindowRow // aggregate rows
}

TTYSection represents one provider block (header + window rows + optional aggregate).

type TTYWindowRow

type TTYWindowRow struct {
	Label    string // "   5h" or "   7d"
	Bar      string // 20-char bar with pace marker
	Pct      string // "󰪟  42%"
	Reset    string // "󰦖 4h 30m"
	PaceDiff string // "󰓅   +3"
	Burndown string // "󰅒 6h 12m"
}

TTYWindowRow holds the pre-formatted fields for a single window line.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL