ui

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BorderedBox added in v0.2.0

func BorderedBox(title, content string) string

BorderedBox creates a bordered box around content

func ErrorBox added in v0.2.0

func ErrorBox(title, message string) string

ErrorBox creates an error box with styled content

func InfoBox added in v0.2.0

func InfoBox(title, message string) string

InfoBox creates an info box with styled content

func LoadingWithText added in v0.2.0

func LoadingWithText(text string) string

LoadingWithText creates a loading indicator with custom text

func PromptModel added in v0.2.2

func PromptModel(provider string) (string, error)

PromptModel prompts the user to select a model for the given provider

func PromptProvider added in v0.2.2

func PromptProvider() (string, error)

PromptProvider prompts the user to select an LLM provider

func RunLoadingAnimation

func RunLoadingAnimation(text string) (*tea.Program, func())

RunLoadingAnimation starts a loading animation and returns a function to stop it

func Separator added in v0.2.0

func Separator(width int) string

Separator creates a visual separator

func ShowAPIKeyHelp added in v0.2.2

func ShowAPIKeyHelp(provider string)

ShowAPIKeyHelp shows helpful information about setting up API keys

func SuccessBox added in v0.2.0

func SuccessBox(title, message string) string

SuccessBox creates a success box with styled content

func Timestamp added in v0.2.0

func Timestamp() string

Timestamp formats a timestamp with style

func WarningBox added in v0.2.0

func WarningBox(title, message string) string

WarningBox creates a warning box with styled content

Types

type AnimatedProgress added in v0.2.0

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

AnimatedProgress represents an animated progress indicator

func NewAnimatedProgress added in v0.2.0

func NewAnimatedProgress(text string) *AnimatedProgress

NewAnimatedProgress creates a new animated progress

func (*AnimatedProgress) Stop added in v0.2.0

func (a *AnimatedProgress) Stop()

Stop stops the animation

func (*AnimatedProgress) Tick added in v0.2.0

func (a *AnimatedProgress) Tick() string

Tick advances the animation

type FileTable added in v0.2.0

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

FileTable represents a styled file table

func NewFileTable added in v0.2.0

func NewFileTable() *FileTable

NewFileTable creates a new file table

func (*FileTable) AddRow added in v0.2.0

func (ft *FileTable) AddRow(file, status, fileType string)

AddRow adds a row to the table

func (*FileTable) String added in v0.2.0

func (ft *FileTable) String() string

String returns the table as a string

type KeyBindings added in v0.2.0

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

Key bindings display

func NewKeyBindings added in v0.2.0

func NewKeyBindings() *KeyBindings

NewKeyBindings creates a new key bindings display

func (*KeyBindings) Add added in v0.2.0

func (kb *KeyBindings) Add(key, description string)

Add adds a key binding

func (*KeyBindings) View added in v0.2.0

func (kb *KeyBindings) View() string

View renders the key bindings

type LoadingModel

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

LoadingModel represents a loading animation model

func NewLoading

func NewLoading(text string) *LoadingModel

NewLoading creates a new loading animation model

func (*LoadingModel) Init

func (m *LoadingModel) Init() tea.Cmd

Init implements tea.Model

func (*LoadingModel) Update

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

Update implements tea.Model

func (*LoadingModel) View

func (m *LoadingModel) View() string

View implements tea.Model

type LoadingMsg

type LoadingMsg struct{}

LoadingMsg is a message to update the loading animation

type MarkdownRenderer

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

MarkdownRenderer handles markdown rendering with glamour

func NewMarkdownRenderer

func NewMarkdownRenderer() (*MarkdownRenderer, error)

NewMarkdownRenderer creates a new markdown renderer

func (*MarkdownRenderer) Render

func (r *MarkdownRenderer) Render(markdown string) (string, error)

Render renders markdown text

func (*MarkdownRenderer) RenderResponse

func (r *MarkdownRenderer) RenderResponse(content string) string

RenderResponse renders an LLM response with markdown

type ProgressModel added in v0.2.0

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

ProgressModel represents a progress bar

func NewProgress added in v0.2.0

func NewProgress(width, total int, text string) *ProgressModel

NewProgress creates a new progress bar

func (*ProgressModel) Update added in v0.2.0

func (p *ProgressModel) Update(current int)

Update updates the progress bar

func (*ProgressModel) View added in v0.2.0

func (p *ProgressModel) View() string

View renders the progress bar

type SpinnerModel

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

SpinnerModel represents a compact spinner model

func NewSpinner

func NewSpinner(text string) *SpinnerModel

NewSpinner creates a new spinner model

func (*SpinnerModel) Tick

func (m *SpinnerModel) Tick() string

Tick updates the spinner

type StatusBar added in v0.2.0

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

StatusBar represents a status bar

func NewStatusBar added in v0.2.0

func NewStatusBar(left, right string) *StatusBar

NewStatusBar creates a new status bar

func (*StatusBar) View added in v0.2.0

func (s *StatusBar) View() string

View renders the status bar

Jump to

Keyboard shortcuts

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