ui

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatAsYamlLike

func FormatAsYamlLike(v interface{}, indent int) string

FormatAsYamlLike formats a value as a YAML-like string for console output. It handles nested maps, slices, and primitives recursively.

func NewParallelProgram

func NewParallelProgram(total int, nodeName string) *tea.Program

NewParallelProgram creates a new tea.Program for the parallel progress UI

func ReadInput

func ReadInput(title string, description string) (string, error)

ReadInput prompts the user for text input using huh

func ReadSelection

func ReadSelection(options []string, title string, description string) (string, error)

ReadSelection prompts the user to select from a list of options using huh

func RenderCharmFlow

func RenderCharmFlow(cfg *config.AgentConfig)

RenderCharmFlow prints the flow using Lipgloss styles in a tree-like structure

func RenderErrorBox

func RenderErrorBox(title, reason, suggestion, originalError string) string

RenderErrorBox: Pure lipgloss implementation with dynamic wrapping

func RenderMaxRetriesBox

func RenderMaxRetriesBox(attempts int, originalError string) string

func RenderRetryBadge

func RenderRetryBadge(attempt, maxRetries int, oneLiner string) string

RenderRetryBadge: Clean text-only line

func RenderStatusBadge

func RenderStatusBadge(text string, success bool) string

RenderStatusBadge renders a styled status badge (e.g. "✓ Command approved")

func RenderToolBox

func RenderToolBox(toolName string, args map[string]interface{}) string

RenderToolBox renders a styled box for tool execution approval.

func SmartRender

func SmartRender(input string) string

SmartRender detects content type and renders appropriately using glamour. It automatically wraps JSON in markdown code blocks for syntax highlighting.

Types

type ActiveCountMsg

type ActiveCountMsg int

ActiveCountMsg signals an update to the number of active workers

type ItemFinishedMsg

type ItemFinishedMsg struct{}

ItemFinishedMsg signals that a worker has finished an item

type ItemLogMsg

type ItemLogMsg string

ItemLogMsg signals a log message from a worker

type ParallelModel

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

ParallelModel holds the state of the parallel execution UI

func (ParallelModel) Init

func (m ParallelModel) Init() tea.Cmd

func (ParallelModel) Update

func (m ParallelModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ParallelModel) View

func (m ParallelModel) View() string

type SpinnerModel

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

func NewSpinner

func NewSpinner(text string) SpinnerModel

func (SpinnerModel) Init

func (m SpinnerModel) Init() tea.Cmd

func (SpinnerModel) Update

func (m SpinnerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SpinnerModel) View

func (m SpinnerModel) View() string

Jump to

Keyboard shortcuts

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