input

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package input provides terminal input collection for interactive plan creation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	// AskQuestion presents a question with options and returns the selected answer.
	// Returns the selected option text or error if selection fails.
	AskQuestion(ctx context.Context, question string, options []string) (string, error)
}

Collector provides interactive input collection for plan creation.

type TerminalCollector

type TerminalCollector struct {
	// contains filtered or unexported fields
}

TerminalCollector implements Collector using fzf (if available) or numbered selection fallback.

func NewTerminalCollector

func NewTerminalCollector() *TerminalCollector

NewTerminalCollector creates a new TerminalCollector with default stdin/stdout.

func (*TerminalCollector) AskQuestion

func (c *TerminalCollector) AskQuestion(ctx context.Context, question string, options []string) (string, error)

AskQuestion presents options using fzf if available, otherwise falls back to numbered selection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL