ui

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Header colors - light gray
	HeaderColor = color.New(color.FgHiBlack)

	// Timestamp colors - deeper gray
	TimestampColor = color.New(color.FgWhite)

	// ID colors - accent color (cyan/blue)
	IDColor = color.New(color.FgCyan)

	// Status colors - secondary accent with semantic colors
	StatusReady    = color.New(color.FgGreen)
	StatusError    = color.New(color.FgRed)
	StatusBuilding = color.New(color.FgYellow)
	StatusPending  = color.New(color.FgBlue)
	StatusDefault  = color.New(color.FgHiWhite)

	// Regular text
	TextColor = color.New(color.FgHiWhite)
)

Color definitions matching GitHub CLI aesthetics

Functions

func FormatDuration

func FormatDuration(d time.Duration) string

FormatDuration formats a duration in a human-readable way

func FormatTimestamp

func FormatTimestamp(t time.Time) string

FormatTimestamp formats a time.Time for consistent display in local timezone

Types

type TableWriter

type TableWriter struct {
	// contains filtered or unexported fields
}

TableWriter provides a styled table writer similar to GitHub CLI

func NewAvatarTable

func NewAvatarTable(output io.Writer) *TableWriter

NewAvatarTable creates a table for displaying avatar information

func NewSessionTable

func NewSessionTable(output io.Writer) *TableWriter

NewSessionTable creates a table for displaying session information

func NewTableWriter

func NewTableWriter(output io.Writer) *TableWriter

NewTableWriter creates a new styled table writer

func NewVoiceProfileTable

func NewVoiceProfileTable(output io.Writer) *TableWriter

NewVoiceProfileTable creates a table for displaying voice profile information

func (*TableWriter) AddRow

func (t *TableWriter) AddRow(values []interface{})

AddRow adds a row to the table with automatic styling based on content type

func (*TableWriter) AddStyledRow

func (t *TableWriter) AddStyledRow(values []interface{}, columnStyles map[int]*color.Color)

AddStyledRow adds a row with custom styling for specific columns

func (*TableWriter) Flush

func (t *TableWriter) Flush() error

Flush writes the table to output

func (*TableWriter) SetHeader

func (t *TableWriter) SetHeader(headers []string)

SetHeader sets the table header with styled formatting

Jump to

Keyboard shortcuts

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