ui

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName    = "asmgr"
	AppVersion = "0.7.8"
)

Version info

View Source
const (
	ListPaneWidth       = 45                     // Fixed width for session list panel
	BorderPadding       = 3                      // Border and padding offset
	MinPreviewWidth     = 40                     // Minimum preview panel width
	TmuxWidthOffset     = 2                      // Offset to prevent line wrapping in tmux
	HeightOffset        = 8                      // Height offset for UI elements
	MinContentHeight    = 10                     // Minimum content height
	MinPreviewLines     = 5                      // Minimum preview lines to show
	PreviewHeaderHeight = 6                      // Height of preview header area
	ColorPickerHeader   = 12                     // Height of color picker header
	MinColorPickerRows  = 5                      // Minimum visible color options
	SessionListMaxItems = 8                      // Max visible items in session selector
	PreviewLineCount    = 100                    // Number of lines to capture for preview
	ScrollbackLines     = 1000                   // Number of lines for scroll history
	GradientColorCount  = 15                     // Number of gradient options (for background exclusion)
	PromptMinWidth      = 50                     // Minimum prompt input width
	PromptMaxWidth      = 70                     // Maximum prompt input width
	TickInterval        = 100 * time.Millisecond // UI refresh interval for selected
	SlowTickInterval    = 500 * time.Millisecond // UI refresh interval for others
	FavoritesGroupID    = "__favorites__"        // Virtual group ID for favorites
)

Layout constants

View Source
const (
	ColorPurple       = "#7D56F4"
	ColorWhite        = "#FAFAFA"
	ColorGray         = "#666666"
	ColorLightGray    = "#888888"
	ColorDarkGray     = "#555555"
	ColorGreen        = "#04B575"
	ColorOrange       = "#FFA500"
	ColorCyan         = "#00CED1"
	ColorRed          = "#FF5F87"
	ColorYellow       = "#FFD700"
	ColorProjectLabel = "#9CA3AF"
	ColorProjectName  = "#A78BFA"
)

Color constants for consistent theming

Variables

This section is empty.

Functions

func RefreshTmuxStatusBar added in v0.6.5

func RefreshTmuxStatusBar(sessionName, instanceName, fgColor, bgColor string, autoYes bool)

RefreshTmuxStatusBar is the exported version for external calls

func RefreshTmuxStatusBarFull added in v0.6.5

func RefreshTmuxStatusBarFull(sessionName, instanceName, fgColor, bgColor string, inst *session.Instance)

RefreshTmuxStatusBarFull is the full version with per-window YOLO support

Types

type ColorOption

type ColorOption struct {
	Name  string
	Color string
}

ColorOption represents a color choice for session styling

type DiffMode added in v0.6.5

type DiffMode int

DiffMode represents the type of diff to display

const (
	DiffModeSession DiffMode = iota // Changes since session start
	DiffModeFull                    // All uncommitted changes
)

type DiffPane added in v0.6.5

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

DiffPane manages the diff display with scrolling support

func NewDiffPane added in v0.6.5

func NewDiffPane() *DiffPane

NewDiffPane creates a new diff pane

func (*DiffPane) GetMode added in v0.6.5

func (d *DiffPane) GetMode() DiffMode

GetMode returns the current diff mode

func (*DiffPane) GetModeLabel added in v0.6.5

func (d *DiffPane) GetModeLabel() string

GetModeLabel returns a human-readable label for current mode

func (*DiffPane) GotoBottom added in v0.6.5

func (d *DiffPane) GotoBottom()

GotoBottom scrolls to the end of the content

func (*DiffPane) GotoTop added in v0.6.5

func (d *DiffPane) GotoTop()

GotoTop scrolls to the beginning of the content

func (*DiffPane) PageDown added in v0.6.5

func (d *DiffPane) PageDown()

PageDown scrolls the viewport down by a page

func (*DiffPane) PageUp added in v0.6.5

func (d *DiffPane) PageUp()

PageUp scrolls the viewport up by a page

func (*DiffPane) ScrollDown added in v0.6.5

func (d *DiffPane) ScrollDown()

ScrollDown scrolls the viewport down

func (*DiffPane) ScrollUp added in v0.6.5

func (d *DiffPane) ScrollUp()

ScrollUp scrolls the viewport up

func (*DiffPane) SetDiff added in v0.6.5

func (d *DiffPane) SetDiff(inst *session.Instance)

SetDiff updates the diff content from an instance

func (*DiffPane) SetSize added in v0.6.5

func (d *DiffPane) SetSize(width, height int)

SetSize updates the diff pane dimensions

func (*DiffPane) ToggleMode added in v0.6.5

func (d *DiffPane) ToggleMode()

ToggleMode switches between session diff and full diff

func (*DiffPane) View added in v0.6.5

func (d *DiffPane) View() string

View renders the diff pane

type Model

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

Model represents the main TUI application state for Agent Session Manager. It manages multiple Claude Code instances, handles user input, and renders the split-pane interface with session list and preview.

func NewModel

func NewModel() (Model, error)

NewModel creates and initializes a new TUI Model. It loads existing sessions from storage, sets up input fields, and prepares the initial state for the Bubble Tea program.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model and returns the initial command for the program. It sets up the terminal appearance and starts the tick timer.

func (Model) Update

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

Update implements tea.Model and handles all incoming messages. It delegates to specialized handlers based on the current state.

func (Model) View

func (m Model) View() string

View implements tea.Model and renders the current UI state. It returns different views based on the current application state.

Jump to

Keyboard shortcuts

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