Documentation
¶
Index ¶
- func ConfirmPrompt(prompt string) (bool, error)
- func InputPrompt(prompt, placeholder string) (string, error)
- func SelectPrompt(prompt string, options []string) (int, error)
- type ConstitutionPrinciple
- type InitModel
- type InitProgram
- type InitStep
- type InitStepType
- type MissingConfig
- type ModeDetector
- type Model
- type Program
- type TerminalMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfirmPrompt ¶
ConfirmPrompt prompts for a yes/no confirmation
func InputPrompt ¶
InputPrompt prompts for user input
Types ¶
type ConstitutionPrinciple ¶ added in v1.0.17
ConstitutionPrinciple represents a toggleable principle in the TUI.
func DefaultPrinciples ¶ added in v1.0.17
func DefaultPrinciples() []ConstitutionPrinciple
DefaultPrinciples returns the default set of constitution principles.
type InitModel ¶ added in v1.0.17
type InitModel struct {
// contains filtered or unexported fields
}
InitModel is the Bubble Tea model for sl init.
func NewInitModel ¶ added in v1.0.17
func NewInitModel(config MissingConfig, projectName string) InitModel
NewInitModel creates an InitModel that presents only the missing configuration steps.
type InitProgram ¶ added in v1.0.17
type InitProgram struct {
// contains filtered or unexported fields
}
InitProgram wraps the init TUI execution.
func NewInitProgram ¶ added in v1.0.17
func NewInitProgram(config MissingConfig, projectName string) *InitProgram
NewInitProgram creates a new sl init TUI program.
type InitStep ¶ added in v1.0.17
type InitStep struct {
Key string // "short_code", "playbook", "agent_preference"
StepType InitStepType
}
InitStep describes a single step in the sl init TUI.
type InitStepType ¶ added in v1.0.17
type InitStepType int
InitStepType identifies the kind of input a step requires.
type MissingConfig ¶ added in v1.0.17
type MissingConfig struct {
NeedsShortCode bool
NeedsPlaybook bool
NeedsAgentPreference bool
ExistingAgentPref string // Pre-select this agent if set
}
MissingConfig describes which configuration steps are still needed.
type ModeDetector ¶
type ModeDetector struct {
// contains filtered or unexported fields
}
ModeDetector detects the terminal mode
func NewModeDetector ¶
func NewModeDetector() *ModeDetector
NewModeDetector creates a new mode detector
func (*ModeDetector) IsInteractive ¶
func (d *ModeDetector) IsInteractive() bool
IsInteractive returns true if in interactive mode
func (*ModeDetector) IsNonInteractive ¶
func (d *ModeDetector) IsNonInteractive() bool
IsNonInteractive returns true if in non-interactive mode
func (*ModeDetector) IsPlainCLI ¶
func (d *ModeDetector) IsPlainCLI() bool
IsPlainCLI returns true if in plain CLI mode
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
TUI model for sl new command
func InitialModel ¶
InitialModel creates initial model with default directory
type Program ¶
type Program struct {
// contains filtered or unexported fields
}
Program wraps Bubble Tea program execution
func NewProgram ¶
NewProgram creates a new interactive Bubble Tea program
type TerminalMode ¶
type TerminalMode int
TerminalMode represents the current terminal mode
const ( ModeInteractive TerminalMode = iota ModeNonInteractive ModePlainCLI )