tui

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Documents []review.AttachedDocument
	Project   string
	Topic     string
	Version   string
	Session   *review.Session
	Author    string
	// Staged reads code-review files and diffs from the Git index.
	Staged    bool
	Patch     *gitpkg.Patch
	Source    *gitpkg.ReviewSource
	FinishCh  chan<- FinishEvent
	FocusPath string
	FocusLine int
}

AppConfig carries the cross-cutting dependencies of the TUI.

type AppModel

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

func NewApp

func NewApp(filePath string, cfg AppConfig) AppModel

func NewCodeReviewApp

func NewCodeReviewApp(files []gitpkg.FileChange, ref string, cfg AppConfig) AppModel

NewCodeReviewApp creates a multi-file code review TUI.

func (AppModel) Init

func (m AppModel) Init() tea.Cmd

func (*AppModel) SaveUnsubmittedDraft

func (m *AppModel) SaveUnsubmittedDraft() error

SaveUnsubmittedDraft preserves the editor when the program is stopped externally rather than through the modal's own controls.

func (AppModel) Update

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

func (AppModel) View

func (m AppModel) View() tea.View

type FileTab

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

FileTab holds per-file state for a single tab in the code review TUI.

type FinishEvent

type FinishEvent struct {
	Approved bool
	Result   *review.FormResult
}

FinishEvent is emitted on the finish channel when the reviewer finishes a round. The runner turns it into a payload for blocked agent clients.

type ImageCapability added in v1.1.2

type ImageCapability struct {
	Checked   bool
	Supported bool
	Reason    string
}

ImageCapability records an actual terminal probe, or why it was skipped.

func CheckTerminalImages added in v1.1.2

func CheckTerminalImages() (result ImageCapability, err error)

CheckTerminalImages probes only this process's foreground controlling TTY. Terminal traffic goes to /dev/tty, keeping redirected reports free of escapes.

Jump to

Keyboard shortcuts

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