tui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	State            SessionState
	Spinner          spinner.Model
	TextArea         textarea.Model
	Viewport         viewport.Model
	Err              error
	Config           *config.Config
	AIClient         ai.Provider
	Diff             string
	History          string
	HistoryCtx       []string
	Questions        []string
	Answers          map[string]string
	CurrentQIdx      int
	CommitMsg        string
	SetupStep        SetupStep
	SelectedProvider config.ProviderType
	Width            int
	Height           int
}

func NewModel

func NewModel() Model

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 SessionState

type SessionState int
const (
	StateLoading SessionState = iota
	StateAnalysis
	StateHistoryAnalysis
	StateQuestioning
	StateReview
	StateCommit
	StateError
	StateSuccess
	StateSetup
	StateNoRepo
	StateWelcome
	StateDiffTooLarge
)

type SetupStep

type SetupStep int
const (
	SetupStepProvider SetupStep = iota
	SetupStepOpenAIKey
	SetupStepConfirmOpenAIKey
	SetupStepOllamaURL
	SetupStepOllamaModel
)

Jump to

Keyboard shortcuts

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