theme

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package theme provides semantic theming for the TUI. Inspired by Gemini CLI's theme system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTheme

func SetTheme(t *SemanticColors)

SetTheme sets the active theme.

Types

type SemanticColors

type SemanticColors struct {
	// Text colors
	Text struct {
		Primary   lipgloss.Color
		Secondary lipgloss.Color
		Accent    lipgloss.Color
		Link      lipgloss.Color
		Response  lipgloss.Color
	}

	// Background colors
	Background struct {
		Primary  lipgloss.Color
		Message  lipgloss.Color
		Input    lipgloss.Color
		Focus    lipgloss.Color
		Selected lipgloss.Color
	}

	// Border colors
	Border struct {
		Default lipgloss.Color
		Focus   lipgloss.Color
	}

	// Status colors
	Status struct {
		Error   lipgloss.Color
		Success lipgloss.Color
		Warning lipgloss.Color
		Info    lipgloss.Color
	}

	// Accent colors (for spinner gradient)
	Accent []lipgloss.Color
}

SemanticColors defines semantic color tokens for the UI.

func DefaultDarkTheme

func DefaultDarkTheme() *SemanticColors

DefaultDarkTheme returns the default dark theme.

func GetTheme

func GetTheme() *SemanticColors

GetTheme returns the current active theme.

type Styles

type Styles struct {
	// Header styles
	Header       lipgloss.Style
	HeaderInfo   lipgloss.Style
	HeaderStatus lipgloss.Style

	// Message styles
	UserPrompt       lipgloss.Style
	UserContent      lipgloss.Style
	AssistantLabel   lipgloss.Style
	AssistantContent lipgloss.Style
	SystemMessage    lipgloss.Style
	ErrorMessage     lipgloss.Style
	SuccessMessage   lipgloss.Style
	WarningMessage   lipgloss.Style

	// Input styles
	InputBorder lipgloss.Style
	InputPrompt lipgloss.Style
	InputText   lipgloss.Style
	InputGhost  lipgloss.Style
	InputCursor lipgloss.Style

	// Tool styles
	ToolHeader  lipgloss.Style
	ToolName    lipgloss.Style
	ToolArgs    lipgloss.Style
	ToolResult  lipgloss.Style
	ToolError   lipgloss.Style
	ToolConfirm lipgloss.Style

	// Team panel styles
	TeamTitle   lipgloss.Style
	TeamMember  lipgloss.Style
	TeamFocus   lipgloss.Style
	TeamStatus  lipgloss.Style
	TeamMessage lipgloss.Style

	// Suggestion styles
	SuggestionItem   lipgloss.Style
	SuggestionActive lipgloss.Style
	SuggestionDesc   lipgloss.Style

	// Code block styles
	CodeBlock   lipgloss.Style
	CodeHeader  lipgloss.Style
	CodeContent lipgloss.Style
	CodeLineNum lipgloss.Style

	// Footer styles
	Footer lipgloss.Style
}

Styles provides pre-built styles using the current theme.

func GetStyles

func GetStyles() *Styles

GetStyles returns pre-built styles from the current theme.

Jump to

Keyboard shortcuts

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