ui

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

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

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
)

Layout constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorOption

type ColorOption struct {
	Name  string
	Color string
}

ColorOption represents a color choice for session styling

type Model

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

Model represents the main TUI application state for Claude 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