forms

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package forms is the interactive face of agentlab: charm.land/huh forms that ask for every configuration option and fill in a config.Config.

Index

Constants

This section is empty.

Variables

View Source
var ErrAborted = huh.ErrUserAborted

ErrAborted is huh's user abort (Ctrl-C, Esc), re-exported so callers need no huh import of their own.

Functions

func Accessible added in v0.32.0

func Accessible() bool

Accessible reports huh's prompt-per-question mode (also what screen readers want): the ACCESSIBLE environment variable. `configure`'s --accessible flag ORs with it.

func Confirm added in v0.32.0

func Confirm(title, description, affirmative, negative string, value bool) (bool, error)

Confirm asks one yes/no question on the terminal — the lab's questions outside `configure`: the trust offer before a browser opens, the two questions at the end of `up`. Built through newForm, so this package's test hook drives it like every other form here.

func Run

func Run(cfg *config.Config, accessible bool, hints Hints) error

Run walks the user through the lab configuration and mutates cfg in place. The passed cfg provides the defaults shown in the form (so re-configuring starts from the current answers, not from scratch); hints carry what the discovery on this machine found.

Types

type Hints added in v0.15.0

type Hints struct {
	// ModelServers names the host model servers found (versions and ports),
	// or says that none answers — shown under the managed-models confirm.
	ModelServers string
}

Hints is what `agentlab configure` learned about this machine before the form runs, so the questions can say what the defaults are based on.

Jump to

Keyboard shortcuts

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