Documentation
¶
Overview ¶
Package tmux provides tmux session management for side-by-side agent panes.
Index ¶
- Constants
- func GenerateSessionName(repoName string, runID int) string
- func IsTmuxAvailable() bool
- func ListSessions() ([]string, error)
- type Layout
- func (l *Layout) ClearPane(ctx context.Context, paneIndex int) error
- func (l *Layout) FocusPane(ctx context.Context, paneIndex int) error
- func (l *Layout) GetPaneContent(ctx context.Context, paneIndex int) (string, error)
- func (l *Layout) PairedLayout(ctx context.Context) error
- func (l *Layout) ResizePanes(ctx context.Context) error
- func (l *Layout) SetPaneTitle(ctx context.Context, paneIndex int, title string) error
- func (l *Layout) SyncPanes(ctx context.Context, enable bool) error
- func (l *Layout) TripleLayout(ctx context.Context) error
- type Session
- func (s *Session) Attach(ctx context.Context) error
- func (s *Session) Create(ctx context.Context) error
- func (s *Session) Exists() bool
- func (s *Session) Kill(ctx context.Context) error
- func (s *Session) Name() string
- func (s *Session) RenamePane(ctx context.Context, paneIndex int, name string) error
- func (s *Session) RunInPane(ctx context.Context, paneIndex int, command string) error
- func (s *Session) SendKeys(ctx context.Context, paneIndex int, keys string) error
- func (s *Session) SetupLayout(ctx context.Context) error
- func (s *Session) WasCreated() bool
Constants ¶
const ( PaneClaude = 0 PaneCodex = 1 PaneStatus = 2 )
PaneIndex constants for the paired layout.
Variables ¶
This section is empty.
Functions ¶
func GenerateSessionName ¶
GenerateSessionName creates a session name for a run.
func IsTmuxAvailable ¶
func IsTmuxAvailable() bool
IsTmuxAvailable checks if tmux is installed and available.
func ListSessions ¶
ListSessions returns a list of all tmux sessions.
Types ¶
type Layout ¶
type Layout struct {
// contains filtered or unexported fields
}
Layout represents a tmux pane layout configuration.
func (*Layout) GetPaneContent ¶
GetPaneContent captures the content of a pane.
func (*Layout) PairedLayout ¶
PairedLayout creates the standard paired layout: +-------------+-------------+ | Claude | Codex | +-------------+-------------+
func (*Layout) ResizePanes ¶
ResizePanes resizes panes to equal size.
func (*Layout) SetPaneTitle ¶
SetPaneTitle sets the title of a pane.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents a tmux session.
func NewSession ¶
NewSession creates a new tmux session manager.
func (*Session) RenamePane ¶
RenamePane renames a pane (sets pane title).
func (*Session) SetupLayout ¶
SetupLayout creates the side-by-side layout for Claude and Codex.
func (*Session) WasCreated ¶
WasCreated returns true if this instance created the session.