Documentation
¶
Overview ¶
Package picker provides interactive session selection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentOptions ¶
AgentOptions configures the agent selectors shown in the create form.
type CreateForm ¶
type CreateForm struct {
// contains filtered or unexported fields
}
CreateForm handles the new-session creation UI within the picker.
func NewCreateForm ¶
func NewCreateForm(master bool, initialDir string, agentOptions ...AgentOptions) (CreateForm, tea.Cmd)
NewCreateForm creates a form for new session creation. initialDir pre-fills the directory input when available.
func (CreateForm) Update ¶
func (f CreateForm) Update(msg tea.Msg) (CreateForm, tea.Cmd)
Update handles input for the create form.
func (CreateForm) View ¶
func (f CreateForm) View(width, height int) string
View renders the create form.
type CreateStartOptions ¶
CreateStartOptions captures the role selections from the create form.
type DeleteFunc ¶
DeleteFunc deletes a session by ID (typically session.Service.Delete).
type Entry ¶
type Entry struct {
SessionID string
Status string // "active", "* current", "master (N)", "worker", "worker (orphan)", "resumable"
Title string
Cwd string
SessionType string
PrimaryAgent string
IsSep bool // separator line between active and resumable
}
Entry represents a single row in the picker display.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubble Tea model for the interactive session picker.
func NewModel ¶
func NewModel(ctx context.Context, entries []Entry, store *state.Store, client *tmux.Client, deleteFn DeleteFunc, startFn StartFunc, agentOpts AgentOptions) Model
NewModel creates a picker model with the given entries.