tui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tui provides terminal UI components.

Index

Constants

This section is empty.

Variables

View Source
var (
	UserStyle      = lipgloss.NewStyle().Foreground(lipgloss.Color("2")).Bold(true)
	AssistantStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("4")).Bold(true)
	ErrorStyle     = lipgloss.NewStyle().Foreground(lipgloss.Color("1"))
	HelpStyle      = lipgloss.NewStyle().Foreground(lipgloss.Color("241"))
	InputBoxStyle  = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(lipgloss.Color("62")).
					Padding(0, 1)

	// Autocomplete styles
	AutocompleteBoxStyle = lipgloss.NewStyle().
							Border(lipgloss.RoundedBorder()).
							BorderForeground(lipgloss.Color("63")).
							Padding(0, 1)
	AutocompleteItemStyle     = lipgloss.NewStyle().PaddingLeft(2)
	AutocompleteSelectedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("170"))
	AutocompleteDescStyle     = lipgloss.NewStyle().Foreground(lipgloss.Color("241"))

	// State-aware styles
	EscWarningStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color("#FF6B6B")).
					Bold(true)

	EscWarningBoxStyle = lipgloss.NewStyle().
						Border(lipgloss.RoundedBorder()).
						BorderForeground(lipgloss.Color("#FF6B6B")).
						Padding(0, 1)

	HistoryModeStyle = lipgloss.NewStyle().
						Foreground(lipgloss.Color("#A78BFA")).
						Italic(true)

	KeyHintStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color("#6EE7B7")).
					Bold(true)

	DimHelpStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color("243")) // Slightly brighter than current 241

	HistoryBorderStyle = lipgloss.NewStyle().
						Border(lipgloss.RoundedBorder()).
						BorderForeground(lipgloss.Color("#A78BFA")).
						Padding(0, 1)

	SessionWarningStyle = lipgloss.NewStyle().
						Foreground(lipgloss.Color("#FFA500")) // Orange - warning but not error
)

Chat styles

View Source
var (
	TitleStyle        = lipgloss.NewStyle().MarginLeft(2)
	ItemStyle         = lipgloss.NewStyle().PaddingLeft(4)
	SelectedItemStyle = lipgloss.NewStyle().PaddingLeft(2).Foreground(lipgloss.Color("170"))
	PaginationStyle   = list.DefaultStyles().PaginationStyle.PaddingLeft(4)
	HelpListStyle     = list.DefaultStyles().HelpStyle.PaddingLeft(4).PaddingBottom(1)
)

Picker styles

Functions

This section is empty.

Types

type MarkdownRenderer

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

MarkdownRenderer wraps glamour for rendering markdown to styled terminal output.

func NewMarkdownRenderer

func NewMarkdownRenderer(width int) (*MarkdownRenderer, error)

NewMarkdownRenderer creates a new markdown renderer with the specified width.

func (*MarkdownRenderer) Render

func (m *MarkdownRenderer) Render(content string) (string, error)

Render renders markdown content to styled terminal output.

func (*MarkdownRenderer) SetWidth

func (m *MarkdownRenderer) SetWidth(width int) error

SetWidth updates the word wrap width by creating a new renderer.

Directories

Path Synopsis
Package picker provides reusable list picker components.
Package picker provides reusable list picker components.

Jump to

Keyboard shortcuts

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