tui

package
v0.51.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupStaleTUIRuntimes added in v0.47.0

func CleanupStaleTUIRuntimes() int

CleanupStaleTUIRuntimes removes socket and metadata files for TUI processes that are no longer running.

func RemoveTUIRuntime added in v0.47.0

func RemoveTUIRuntime()

RemoveTUIRuntime removes the runtime metadata file for the current process. The socket file is removed separately by the control listener's cleanup function.

func Run

func Run(cfg Config) error

Run starts the interactive TUI.

func WriteTUIRuntime added in v0.47.0

func WriteTUIRuntime(info TUIRuntimeInfo) error

WriteTUIRuntime writes the TUI runtime metadata file atomically.

Types

type ClipboardWriter

type ClipboardWriter interface {
	WriteText(text string) error
}

ClipboardWriter is an interface for clipboard operations (allows mocking in tests)

type Config

type Config struct {
	Endpoint      daemon.DaemonEndpoint
	RepoFilter    string
	BranchFilter  string
	ControlSocket string // Unix socket path for external control (default: auto)
	NoQuit        bool   // Suppress keyboard quit (for managed TUI instances)
}

Config holds resolved parameters for running the TUI.

type TUIRuntimeInfo added in v0.47.0

type TUIRuntimeInfo struct {
	PID        int    `json:"pid"`
	SocketPath string `json:"socket_path"`
	ServerAddr string `json:"server_addr"`
}

TUIRuntimeInfo stores metadata about a running TUI instance for discoverability by external tools. Filter state is intentionally omitted — it changes at runtime and should be queried via the control socket's get-filters command.

func ListAllTUIRuntimes added in v0.47.0

func ListAllTUIRuntimes() ([]*TUIRuntimeInfo, error)

ListAllTUIRuntimes returns metadata for all discovered TUI runtime files.

Jump to

Keyboard shortcuts

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