ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InfoColor    = color.New(color.FgCyan)
	SuccessColor = color.New(color.FgGreen)
	WarningColor = color.New(color.FgYellow)
	ErrorColor   = color.New(color.FgRed)
	HeaderColor  = color.New(color.FgBlue, color.Bold)
)

Colors

Functions

This section is empty.

Types

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

AnimatedLogo represents the animated ASCII art logo

func NewAnimatedLogo() *AnimatedLogo

NewAnimatedLogo creates a new animated logo

func (*AnimatedLogo) Start

func (a *AnimatedLogo) Start()

Start begins the animation

type GeminiInterface

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

GeminiInterface represents the Gemini-style interface

func NewGeminiInterface

func NewGeminiInterface(colorEnabled bool) *GeminiInterface

NewGeminiInterface creates a new Gemini interface

func (*GeminiInterface) ExportConversation

func (g *GeminiInterface) ExportConversation(filename string) error

ExportConversation exports the conversation to a file

func (*GeminiInterface) GetConversationSummary

func (g *GeminiInterface) GetConversationSummary() string

GetConversationSummary returns a summary of the current conversation

func (*GeminiInterface) LoadConversation

func (g *GeminiInterface) LoadConversation(filename string) error

LoadConversation loads a conversation from a file

func (*GeminiInterface) Start

func (g *GeminiInterface) Start() error

Start begins the Gemini interface

type Message

type Message struct {
	Role      string    `json:"role"`
	Content   string    `json:"content"`
	Timestamp time.Time `json:"timestamp"`
}

Message represents a conversation message

type UIManager

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

UIManager manages user interface components

func NewUIManager

func NewUIManager(colorEnabled, verboseMode bool) *UIManager

NewUIManager creates a new UI manager

func (*UIManager) ClearScreen

func (ui *UIManager) ClearScreen()

ClearScreen clears the terminal screen

func (*UIManager) CreateProgressBar

func (ui *UIManager) CreateProgressBar(max int, description string) *progressbar.ProgressBar

CreateProgressBar creates a progress bar

func (*UIManager) CreateSpinnerProgressBar

func (ui *UIManager) CreateSpinnerProgressBar(description string) *progressbar.ProgressBar

CreateSpinnerProgressBar creates a spinner progress bar for indeterminate progress

func (*UIManager) DisplayKeyValue

func (ui *UIManager) DisplayKeyValue(data map[string]interface{})

DisplayKeyValue displays key-value pairs

func (*UIManager) DisplayList

func (ui *UIManager) DisplayList(items []string, title string)

DisplayList displays a formatted list

func (*UIManager) DisplayMenu

func (ui *UIManager) DisplayMenu(title string, options []string) (int, error)

DisplayMenu displays a menu and returns the selected option

func (*UIManager) DisplayTable

func (ui *UIManager) DisplayTable(headers []string, rows [][]string)

DisplayTable displays a formatted table

func (*UIManager) GetTerminalSize

func (ui *UIManager) GetTerminalSize() (int, int)

GetTerminalSize returns the terminal size

func (*UIManager) InteractiveConfirm

func (ui *UIManager) InteractiveConfirm(label string, defaultValue bool) (bool, error)

InteractiveConfirm creates an interactive confirmation

func (*UIManager) InteractiveMultiSelect

func (ui *UIManager) InteractiveMultiSelect(label string, items []string) ([]string, error)

InteractiveMultiSelect creates an interactive multi-selection menu

func (*UIManager) InteractivePassword

func (ui *UIManager) InteractivePassword(label string) (string, error)

InteractivePassword creates an interactive password input

func (*UIManager) InteractivePrompt

func (ui *UIManager) InteractivePrompt(label string, defaultValue string) (string, error)

InteractivePrompt creates an interactive prompt

func (*UIManager) InteractiveSelect

func (ui *UIManager) InteractiveSelect(label string, items []string) (string, error)

InteractiveSelect creates an interactive selection menu

func (*UIManager) InteractiveWizard

func (ui *UIManager) InteractiveWizard(title string, steps []WizardStep) (map[string]interface{}, error)

InteractiveWizard creates an interactive wizard

func (*UIManager) IsTerminalInteractive

func (ui *UIManager) IsTerminalInteractive() bool

IsTerminalInteractive checks if the terminal is interactive

func (*UIManager) MoveCursor

func (ui *UIManager) MoveCursor(x, y int)

MoveCursor moves the cursor to a specific position

func (*UIManager) PressEnterToContinue

func (ui *UIManager) PressEnterToContinue(message string)

PressEnterToContinue waits for user to press Enter

func (*UIManager) PrintBanner

func (ui *UIManager) PrintBanner()

PrintBanner prints the application banner

func (*UIManager) PrintError

func (ui *UIManager) PrintError(format string, args ...interface{})

PrintError prints error message

func (*UIManager) PrintHeader

func (ui *UIManager) PrintHeader(text string)

PrintHeader prints a formatted header

func (*UIManager) PrintInfo

func (ui *UIManager) PrintInfo(format string, args ...interface{})

PrintInfo prints info message

func (*UIManager) PrintSuccess

func (ui *UIManager) PrintSuccess(format string, args ...interface{})

PrintSuccess prints success message

func (*UIManager) PrintVerbose

func (ui *UIManager) PrintVerbose(format string, args ...interface{})

PrintVerbose prints verbose message

func (*UIManager) PrintWarning

func (ui *UIManager) PrintWarning(format string, args ...interface{})

PrintWarning prints warning message

func (*UIManager) RestoreCursor

func (ui *UIManager) RestoreCursor()

RestoreCursor restores the saved cursor position

func (*UIManager) SaveCursor

func (ui *UIManager) SaveCursor()

SaveCursor saves the current cursor position

func (*UIManager) ShowSpinner

func (ui *UIManager) ShowSpinner(message string, duration time.Duration)

ShowSpinner shows a spinner with a message

type WizardStep

type WizardStep struct {
	Title       string
	Description string
	Type        WizardStepType
	Key         string
	Prompt      string
	Default     string
	Options     []string
	Required    bool
}

WizardStep represents a step in an interactive wizard

type WizardStepType

type WizardStepType string

WizardStepType represents the type of wizard step

const (
	WizardStepTypeInput       WizardStepType = "input"
	WizardStepTypeSelect      WizardStepType = "select"
	WizardStepTypeConfirm     WizardStepType = "confirm"
	WizardStepTypePassword    WizardStepType = "password"
	WizardStepTypeMultiSelect WizardStepType = "multiselect"
)

Jump to

Keyboard shortcuts

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