tui

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBackToSelector = fmt.Errorf("back to selector")
View Source
var ErrSelectorQuit = fmt.Errorf("selector quit")

Functions

func Run

func Run(ctx context.Context, opts cli.Options) error

Run starts the TUI for interactive conflict resolution.

func SelectFile

func SelectFile(ctx context.Context, candidates []FileCandidate) (string, error)

SelectFile opens a TUI selector and returns the chosen repo-relative path.

Types

type FileCandidate

type FileCandidate struct {
	Path     string
	Resolved bool
}

type Theme added in v0.2.0

type Theme struct {
	TitleFg                string `json:"title_fg"`
	PaneBorder             string `json:"pane_border"`
	SelectedPaneBorder     string `json:"selected_pane_border"`
	SidePaneBorder         string `json:"side_pane_border"`
	SelectedSideBorder     string `json:"selected_side_border"`
	HeaderBg               string `json:"header_bg"`
	HeaderFg               string `json:"header_fg"`
	FooterBg               string `json:"footer_bg"`
	FooterFg               string `json:"footer_fg"`
	LineNumberFg           string `json:"line_number"`
	OursHighlightBg        string `json:"ours_highlight_bg"`
	OursHighlightFg        string `json:"ours_highlight_fg"`
	TheirsHighlightBg      string `json:"theirs_highlight_bg"`
	TheirsHighlightFg      string `json:"theirs_highlight_fg"`
	ResultFg               string `json:"result_fg"`
	ResultHighlightBg      string `json:"result_highlight_bg"`
	ResultHighlightFg      string `json:"result_highlight_fg"`
	ModifiedBg             string `json:"modified_bg"`
	ModifiedFg             string `json:"modified_fg"`
	AddedBg                string `json:"added_bg"`
	AddedFg                string `json:"added_fg"`
	RemovedBg              string `json:"removed_bg"`
	RemovedFg              string `json:"removed_fg"`
	ConflictedBg           string `json:"conflicted_bg"`
	ConflictedFg           string `json:"conflicted_fg"`
	InsertMarkerFg         string `json:"insert_marker_fg"`
	SelectedHunkMarkerFg   string `json:"selected_hunk_marker_fg"`
	SelectedHunkMarkerBg   string `json:"selected_hunk_marker_bg"`
	SelectedHunkBg         string `json:"selected_hunk_bg"`
	StatusResolvedFg       string `json:"status_resolved_fg"`
	StatusUnresolvedFg     string `json:"status_unresolved_fg"`
	ResultResolvedFg       string `json:"result_resolved_marker_fg"`
	ResultResolvedBorder   string `json:"result_resolved_border"`
	ResultUnresolvedBorder string `json:"result_unresolved_border"`
	ToastBg                string `json:"toast_bg"`
	ToastFg                string `json:"toast_fg"`
	SelectorResolvedFg     string `json:"selector_resolved_fg"`
	SelectorUnresolvedFg   string `json:"selector_unresolved_fg"`
	DimForegroundLight     string `json:"dim_foreground_light"`
	DimForegroundDark      string `json:"dim_foreground_dark"`
	DimForegroundMuted     string `json:"dim_foreground_muted"`
}

type ThemeConfig added in v0.2.0

type ThemeConfig struct {
	Default string           `json:"default"`
	Themes  map[string]Theme `json:"themes"`
}

Jump to

Keyboard shortcuts

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