Documentation
¶
Index ¶
- Variables
- func CheckAgentCommand(inst *Instance) error
- func GetClaudeProjectDir(projectPath string) string
- type AgentConfig
- type AgentType
- type ClaudeSession
- type Group
- type Instance
- func (i *Instance) Attach() error
- func (i *Instance) GetAgentConfig() AgentConfig
- func (i *Instance) GetLastLine() string
- func (i *Instance) GetPreview(lines int) (string, error)
- func (i *Instance) IsAlive() bool
- func (i *Instance) ResizePane(width, height int) error
- func (i *Instance) SendKeys(keys string) error
- func (i *Instance) Start() error
- func (i *Instance) StartWithResume(resumeID string) error
- func (i *Instance) Stop() error
- func (i *Instance) TmuxSessionName() string
- func (i *Instance) UpdateDetachBinding(previewWidth, previewHeight int)
- func (i *Instance) UpdateStatus()
- type Settings
- type Status
- type Storage
- func (s *Storage) AddGroup(name string) (*Group, error)
- func (s *Storage) AddInstance(instance *Instance) error
- func (s *Storage) GetGroups() ([]*Group, error)
- func (s *Storage) GetInstance(id string) (*Instance, error)
- func (s *Storage) GetInstanceByName(name string) (*Instance, error)
- func (s *Storage) Load() ([]*Instance, error)
- func (s *Storage) LoadAll() ([]*Instance, []*Group, error)
- func (s *Storage) LoadAllWithSettings() ([]*Instance, []*Group, *Settings, error)
- func (s *Storage) RemoveGroup(id string) error
- func (s *Storage) RemoveInstance(id string) error
- func (s *Storage) RenameGroup(id, name string) error
- func (s *Storage) Save(instances []*Instance) error
- func (s *Storage) SaveAll(instances []*Instance, groups []*Group, settings *Settings) error
- func (s *Storage) SaveSettings(settings *Settings) error
- func (s *Storage) SaveWithGroups(instances []*Instance, groups []*Group) error
- func (s *Storage) SetInstanceGroup(instanceID, groupID string) error
- func (s *Storage) ToggleGroupCollapsed(id string) error
- func (s *Storage) UpdateInstance(instance *Instance) error
- type StorageData
Constants ¶
This section is empty.
Variables ¶
var AgentConfigs = map[AgentType]AgentConfig{ AgentClaude: { Command: "claude", SupportsResume: true, SupportsAutoYes: true, AutoYesFlag: "--dangerously-skip-permissions", ResumeFlag: "--resume", }, AgentGemini: { Command: "gemini", SupportsResume: false, SupportsAutoYes: false, }, AgentAider: { Command: "aider", SupportsResume: false, SupportsAutoYes: true, AutoYesFlag: "--yes", }, AgentCodex: { Command: "codex", SupportsResume: false, SupportsAutoYes: true, AutoYesFlag: "--full-auto", }, AgentAmazonQ: { Command: "q", SupportsResume: false, SupportsAutoYes: true, AutoYesFlag: "--trust-all-tools", }, AgentOpenCode: { Command: "opencode", SupportsResume: false, SupportsAutoYes: false, }, AgentCustom: { Command: "", SupportsResume: false, SupportsAutoYes: false, }, }
AgentConfigs maps agent types to their configurations
Functions ¶
func CheckAgentCommand ¶
CheckAgentCommand verifies that the agent command exists in PATH
func GetClaudeProjectDir ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Command string // Base command to run
SupportsResume bool // Whether agent supports session resume
SupportsAutoYes bool // Whether agent has auto-approve flag
AutoYesFlag string // The flag for auto-approve (e.g., "--dangerously-skip-permissions")
ResumeFlag string // The flag for resume (e.g., "--resume")
}
AgentConfig contains configuration for each agent type
type ClaudeSession ¶
type ClaudeSession struct {
SessionID string `json:"session_id"`
FirstPrompt string `json:"first_prompt"`
LastPrompt string `json:"last_prompt"`
MessageCount int `json:"message_count"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func ListClaudeSessions ¶
func ListClaudeSessions(projectPath string) ([]ClaudeSession, error)
type Group ¶
type Group struct {
ID string `json:"id"`
Name string `json:"name"`
Collapsed bool `json:"collapsed"`
Color string `json:"color,omitempty"` // Group name color
BgColor string `json:"bg_color,omitempty"` // Background color
FullRowColor bool `json:"full_row_color,omitempty"` // Extend background to full row
}
Group represents a session group for organizing sessions
type Instance ¶
type Instance struct {
ID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Status Status `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
AutoYes bool `json:"auto_yes"`
ResumeSessionID string `json:"resume_session_id,omitempty"` // Claude session ID to resume
Color string `json:"color,omitempty"` // Foreground color
BgColor string `json:"bg_color,omitempty"` // Background color
FullRowColor bool `json:"full_row_color,omitempty"` // Extend background to full row
GroupID string `json:"group_id,omitempty"` // Session group ID
Agent AgentType `json:"agent,omitempty"` // Agent type (claude, gemini, aider, custom)
CustomCommand string `json:"custom_command,omitempty"` // Custom command for AgentCustom
}
func NewInstance ¶
func (*Instance) GetAgentConfig ¶
func (i *Instance) GetAgentConfig() AgentConfig
GetAgentConfig returns the agent configuration for this instance
func (*Instance) GetLastLine ¶
GetLastLine returns the last non-empty line of output (for status display)
func (*Instance) ResizePane ¶
ResizePane resizes the tmux pane to the specified dimensions
func (*Instance) StartWithResume ¶
func (*Instance) TmuxSessionName ¶
func (*Instance) UpdateDetachBinding ¶
UpdateDetachBinding updates Ctrl+Q to resize to preview size before detaching
func (*Instance) UpdateStatus ¶
func (i *Instance) UpdateStatus()
type Settings ¶
type Settings struct {
CompactList bool `json:"compact_list"`
HideStatusLines bool `json:"hide_status_lines"`
SplitView bool `json:"split_view,omitempty"`
MarkedSessionID string `json:"marked_session_id,omitempty"`
Cursor int `json:"cursor,omitempty"`
SplitFocus int `json:"split_focus,omitempty"`
}
Settings stores UI preferences
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Storage) AddInstance ¶
func (*Storage) GetInstanceByName ¶
func (*Storage) LoadAllWithSettings ¶
LoadAllWithSettings loads instances, groups, and settings
func (*Storage) RemoveGroup ¶
RemoveGroup removes a group (sessions become ungrouped)
func (*Storage) RemoveInstance ¶
func (*Storage) RenameGroup ¶
RenameGroup renames a group
func (*Storage) SaveSettings ¶
SaveSettings saves only the settings (preserves instances and groups)
func (*Storage) SaveWithGroups ¶
SaveWithGroups saves instances and groups (preserves settings)
func (*Storage) SetInstanceGroup ¶
SetInstanceGroup assigns an instance to a group
func (*Storage) ToggleGroupCollapsed ¶
ToggleGroupCollapsed toggles the collapsed state of a group