ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProgram

func NewProgram(model Model) *tea.Program

NewProgram creates a new Bubble Tea program.

Types

type Model

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

Model defines the state for the TUI.

func NewUIModel

func NewUIModel(
	commitMsg string,
	diff string,
	language string,
	prompt string,
	commitType string,
	tmpl string,
	enableEmoji bool,
	client *gogpt.Client,
) Model

NewUIModel creates a new UI model.

func (Model) Init

func (m Model) Init() tea.Cmd

Init is the TUI initialization.

func (Model) Update

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

Update updates the UI model based on messages.

func (Model) View

func (m Model) View() string

View renders the UI based on the current state.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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