ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	App                *tview.Application
	MainFlex           *tview.Flex
	ProgressBar        *tview.TextView
	LogView            *tview.TextView
	StatusBar          *tview.TextView
	CommitDetails      *tview.TextView
	LastCommitDetails  *tview.TextView
	TotalCommits       int
	ProcessedCommits   int
	ConfirmationResult bool
	ConfirmationDone   bool
	// Timing variables for ETA calculation
	StartTime           time.Time
	LastCommitStartTime time.Time
	TotalProcessingTime time.Duration
	CommitTimings       []time.Duration
)

TUI components

Functions

func CloseDebugLog added in v0.2.0

func CloseDebugLog()

CloseDebugLog closes the debug log file if it's open

func InitDebugLogging added in v0.2.0

func InitDebugLogging(logFilePath string) error

InitDebugLogging sets up debug logging to a file if a path is provided

func LogError

func LogError(format string, args ...interface{})

LogError logs an error message

func LogInfo

func LogInfo(format string, args ...interface{})

LogInfo logs an informational message

func LogShellCommand added in v0.2.0

func LogShellCommand(command string, args []string, workDir string)

LogShellCommand logs shell commands to the debug log file

func LogSuccess

func LogSuccess(format string, args ...interface{})

LogSuccess logs a success message

func LogWarning added in v0.2.0

func LogWarning(format string, args ...interface{})

LogWarning logs a warning message

func MoveToLastCommit

func MoveToLastCommit()

MoveToLastCommit moves the current commit details to the last commit details panel

func SetupTUI

func SetupTUI()

SetupTUI initializes the terminal UI components

func ShowConfirmationDialog

func ShowConfirmationDialog(message string) bool

ShowConfirmationDialog displays a confirmation dialog and waits for user input

func UpdateCommitDetails

func UpdateCommitDetails(id string, totalFiles int, diffSize int, old, new string)

UpdateCommitDetails updates the details of the current commit being processed

func UpdateProgressBar

func UpdateProgressBar()

UpdateProgressBar updates the progress bar with the current status

func UpdateStatus

func UpdateStatus(text string)

UpdateStatus updates the status bar text

Types

type TextView

type TextView interface {
	Clear()
	SetText(text string)
	GetText(bool) string
}

TextView defines an interface for text view components This allows for easier mocking in tests

Jump to

Keyboard shortcuts

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