Documentation
¶
Overview ¶
Package present contains terminal rendering helpers and shared styles.
Index ¶
- func IsInputTTY() bool
- func IsOutputTTY() bool
- func MakeGradientRamp(length int) []lipgloss.Color
- func MakeGradientText(baseStyle lipgloss.Style, str string) string
- func PrintConfirmation(action, content string)
- func RenderMarkdownForTTY(input string, wordWrap int) (string, error)
- func Reverse[T any](in []T) []T
- func StderrRenderer() *lipgloss.Renderer
- func StdoutRenderer() *lipgloss.Renderer
- type Styles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeGradientRamp ¶
MakeGradientRamp returns a color ramp of the given length.
func MakeGradientText ¶
MakeGradientText renders str with a gradient applied rune-by-rune.
func PrintConfirmation ¶
func PrintConfirmation(action, content string)
PrintConfirmation prints a short action header plus content.
func RenderMarkdownForTTY ¶
RenderMarkdownForTTY renders markdown for terminal output.
It mirrors the TUI's markdown rendering behavior closely enough for headless commands (e.g. --show / history show) without requiring Bubble Tea.
func StderrRenderer ¶
StderrRenderer returns a lipgloss renderer bound to stderr.
func StdoutRenderer ¶
StdoutRenderer returns a lipgloss renderer bound to stdout.
Types ¶
type Styles ¶
type Styles struct {
AppName,
CliArgs,
Comment,
CyclingChars,
ErrorHeader,
ErrorDetails,
ErrPadding,
Flag,
FlagComma,
FlagDesc,
InlineCode,
Link,
Pipe,
Quote,
ConversationList,
SHA1,
Timeago lipgloss.Style
}
Styles groups reusable terminal styles for consistent CLI output.
func MakeStyles ¶
MakeStyles builds styles bound to the given renderer.