Documentation
¶
Overview ¶
Package tui renders a form.Field tree as an interactive terminal form using the charmbracelet huh library. It is the bridge between clic's UI-agnostic field description and a concrete, runnable form; the field-to-value assembly is kept separate from the rendering so it can be tested without a terminal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PromptBody ¶
PromptBody renders an interactive form for the given fields and returns the collected values assembled into a request-body map. Optional fields left blank are omitted from the result.
Types ¶
type Command ¶ added in v0.8.0
type Command struct {
Name string
Description string
Provider provider.Provider
Subcommands []Command
}
Command is the studio's view of one node in an app's command tree: a runnable leaf (Provider set) or a group (Subcommands set). It deliberately mirrors only what the studio needs, so the tui package depends on provider but not on spec.
type StudioApp ¶ added in v0.8.0
type StudioApp struct {
Name string
Description string
Server string
// Invocation is the headless launch prefix (e.g. "clic ./petstore.yaml")
// used to render "copy as clic command".
Invocation string
Commands []Command
}
StudioApp is the input to RunStudio: an app's identity plus its command tree.