ui

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Colors
	ColorBg      = lipgloss.Color("#000000") // Black
	ColorFg      = lipgloss.Color("#FFFFFF") // White
	ColorSub     = lipgloss.Color("#9CA3AF") // Gray-400
	ColorAccent  = lipgloss.Color("#F59E0B") // Amber-500
	ColorSuccess = lipgloss.Color("#10B981") // Emerald-500
	ColorError   = lipgloss.Color("#EF4444") // Red-500

	// Text Styles
	TitleStyle = lipgloss.NewStyle().
				Foreground(ColorBg).
				Background(ColorAccent).
				Bold(true).
				Padding(0, 1).
				MarginBottom(1)

	SubtitleStyle = lipgloss.NewStyle().
					Foreground(ColorSub).
					MarginBottom(1)

	// Status Indicators
	PassStyle = lipgloss.NewStyle().Foreground(ColorSuccess)
	FailStyle = lipgloss.NewStyle().Foreground(ColorError)
	InfoStyle = lipgloss.NewStyle().Foreground(ColorSub)

	// List Items
	ItemStyle = lipgloss.NewStyle().
				PaddingLeft(2)

	SelectedItemStyle = lipgloss.NewStyle().
						PaddingLeft(1).
						Foreground(ColorAccent).
						Bold(true).
						Border(lipgloss.NormalBorder(), false, false, false, true).
						BorderForeground(ColorAccent)

	// Box/Container
	BoxStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(ColorSub).
				Padding(1, 2)

	// Code/Detail View
	DetailStyle = lipgloss.NewStyle().
				Foreground(ColorSub).
				PaddingLeft(4)
)

Functions

func ShowAPIKeyError

func ShowAPIKeyError(provider string)

ShowAPIKeyError displays a helpful error when API key is missing

func ShowError

func ShowError(message string, details string)

func ShowResults

func ShowResults(results []*models.GenerationResult) error

func ShowSimpleError

func ShowSimpleError(message string)

func ShowSimpleSuccess

func ShowSimpleSuccess(message string)

func ShowSuccess

func ShowSuccess(stats SuccessStats)

Types

type ProgressModel

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

func NewProgressModel

func NewProgressModel(message string) ProgressModel

func (ProgressModel) Init

func (m ProgressModel) Init() tea.Cmd

func (ProgressModel) Update

func (m ProgressModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ProgressModel) View

func (m ProgressModel) View() string

type ProgressTracker

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

ProgressTracker manages a progress display

func NewProgressTracker

func NewProgressTracker(message string, total int) *ProgressTracker

func (*ProgressTracker) Done

func (t *ProgressTracker) Done()

func (*ProgressTracker) Increment

func (t *ProgressTracker) Increment()

func (*ProgressTracker) Start

func (t *ProgressTracker) Start()

type ResultsModel

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

func NewResultsModel

func NewResultsModel(results []*models.GenerationResult) ResultsModel

func (ResultsModel) Init

func (m ResultsModel) Init() tea.Cmd

func (ResultsModel) Update

func (m ResultsModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ResultsModel) View

func (m ResultsModel) View() string

type SpinnerModel

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

func NewSpinner

func NewSpinner(message string) SpinnerModel

func (SpinnerModel) Init

func (m SpinnerModel) Init() tea.Cmd

func (SpinnerModel) Update

func (m SpinnerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SpinnerModel) View

func (m SpinnerModel) View() string

type StatusSpinner

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

func NewStatusSpinner

func NewStatusSpinner(message string) *StatusSpinner

func (*StatusSpinner) Start

func (s *StatusSpinner) Start()

func (*StatusSpinner) Stop

func (s *StatusSpinner) Stop()

func (*StatusSpinner) UpdateMessage

func (s *StatusSpinner) UpdateMessage(msg string)

type SuccessStats

type SuccessStats struct {
	FilesProcessed int
	TestsGenerated int
	FunctionsFound int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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