tui

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetThemeNames

func GetThemeNames() []string

Types

type ConfirmModel

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

ConfirmModel is a custom component for the confirm step Shows: Yes - commit, Cancel, Regenerate with inline feedback input

func NewConfirmModel

func NewConfirmModel(theme *Theme) *ConfirmModel

func (*ConfirmModel) Action

func (m *ConfirmModel) Action() string

func (*ConfirmModel) Feedback

func (m *ConfirmModel) Feedback() string

func (*ConfirmModel) Init

func (m *ConfirmModel) Init() tea.Cmd

func (*ConfirmModel) Submitted

func (m *ConfirmModel) Submitted() bool

func (*ConfirmModel) Update

func (m *ConfirmModel) Update(msg tea.Msg) (*ConfirmModel, tea.Cmd)

func (*ConfirmModel) View

func (m *ConfirmModel) View() string

type Model

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

func New

func New(cfg *config.Config, repo *git.Repository, aiClient *ai.Client, isFirstRun bool) (*Model, error)

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

type Styles

type Styles struct {
	Title   lipgloss.Style
	Success lipgloss.Style
	Error   lipgloss.Style
	Dim     lipgloss.Style
	Message lipgloss.Style
}

Styles holds all the styled components using a theme

func NewStyles

func NewStyles(theme *Theme) *Styles

type Theme

type Theme struct {
	Name       string
	Primary    lipgloss.Color
	Secondary  lipgloss.Color
	Success    lipgloss.Color
	Error      lipgloss.Color
	Dim        lipgloss.Color
	Border     lipgloss.Color
	Background lipgloss.Color
	HuhTheme   *huh.Theme
}

func GetTheme

func GetTheme(name string) *Theme

func (*Theme) GetHuhTheme

func (t *Theme) GetHuhTheme() *huh.Theme

Jump to

Keyboard shortcuts

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