Documentation
¶
Overview ¶
Package picker provides fzf-based interactive session selection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatPreview ¶
func FormatPreview(pd *PreviewData) string
FormatPreview renders preview data into a styled terminal output matching sidebar aesthetics.
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, tmux 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 ¶
type CreateStartOptions struct {
Master bool
Primary string
Companion string
NoCompanion bool
Prompt string
}
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", "tmux", "* current tmux"
Title string
Cwd string
PrimaryAgent string
IsSep bool // separator line between active and resumable
}
Entry represents a single row in the picker display.
func BuildEntries ¶
BuildEntries constructs picker rows from discovery and tmux state. Mirrors the hierarchy from party-picker.sh: standalone, masters with workers, orphans, then stale.
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, tmuxEntries []Entry, store *state.Store, client *tmux.Client, deleteFn DeleteFunc, startFn StartFunc, tmuxStartFn TmuxStartFunc, agentOpts AgentOptions) Model
NewModel creates a picker model with the given entries.
type PreviewData ¶
type PreviewData struct {
Status string // "master", "active", "resumable", "tmux"
WorkerCount int
Cwd string
Timestamp string
PrimaryAgent string
Prompt string
ClaudeID string
CodexID string
PaneLines []string // last lines from the primary pane
}
PreviewData holds the information rendered in the fzf preview pane.