tui

package
v0.0.0-...-2710d9e Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ScrollAmount = 10 // Number of lines to scroll in diff view
)

Constants for UI behavior

Variables

This section is empty.

Functions

func Run

func Run(stateManager *state.Manager, debugMode bool) error

Run starts the TUI with the given state manager, creating a seamless loop

Types

type ConfirmDialog

type ConfirmDialog struct {
	Message string
	OnYes   func() tea.Cmd
	OnNo    func() tea.Cmd
}

ConfirmDialog represents a yes/no confirmation dialog

type DiffLine

type DiffLine struct {
	Type     DiffLineType
	Content  string
	OldLine  int
	NewLine  int
	HunkID   int
	FileName string
}

DiffLine represents a single line in the diff view

type DiffLineType

type DiffLineType int

DiffLineType represents the type of diff line

const (
	DiffLineContext DiffLineType = iota
	DiffLineAdded
	DiffLineRemoved
	DiffLineHeader
	DiffLineFileHeader
	DiffLineHunkHeader
	DiffLineNoNewline
)

type DiffMode

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

DiffMode represents the diff viewer state

type Model

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

Model represents the main TUI state

func NewModel

func NewModel(stateManager *state.Manager, debugMode bool) (*Model, error)

NewModel creates a new TUI model

func (Model) GetAttachOnExit

func (m Model) GetAttachOnExit() string

GetAttachOnExit returns the session to attach to when exiting TUI

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the TUI model with necessary setup

func (Model) Update

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

Update handles all TUI events and state changes

func (Model) View

func (m Model) View() string

View renders the entire TUI

type NewSessionDialog

type NewSessionDialog struct {
	NameInput     string
	DangerousMode bool
	Error         string
}

NewSessionDialog represents a new session creation dialog

Jump to

Keyboard shortcuts

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