Documentation
¶
Overview ¶
Package tui renders Ghost's terminal interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
HandlePoll(poller.Result)
Snapshot() engine.Snapshot
PRState(repo string, number int) engine.PRState
Rereview(github.PR) error
PostPending(ctx context.Context, repo string, number int) error
TogglePause() bool
Changes() <-chan struct{}
Approve(ctx context.Context, repo string, number int) error
}
Engine is what the TUI needs from the review engine.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (Model) CurrentView ¶ added in v0.6.0
CurrentView returns the view whose tab is selected.
type Options ¶
type Options struct {
Views []config.View
MaxDailyCostUSD float64
Checks []preflight.Result
Results <-chan poller.Result // nil when polling is disabled
PollNow func()
PollDisabled string // why polling is off; shown in empty lists
OpenURL func(string) error
Engine Engine // nil: browse only
SaveViews func([]config.View) error // persists views; nil disables n/e/d
Theme string // config theme; "" = dark
NoColor bool // NO_COLOR set: force mono
ConfigPath string // shown when suggesting a theme setting
Themes *theme.Registry // available themes; nil = built-ins only
Agents []string // agent names for the view form
ReviewLabel string // review_label: the view form's default
MaxPRsPerView int // max_prs_per_view: the view form's default
Log *slog.Logger // receives errors in full; nil = discard
ActiveView string // view to start on (e.g. ghost review's one-off tab)
Flash string // message to show at startup
}
Click to show internal directories.
Click to hide internal directories.