Documentation
¶
Index ¶
- func BG(color, text string) string
- func BGANSI(color string) string
- func BashModeBorderColor() func(string) string
- func Bold(value string) string
- func ColorModeGlobal() string
- func EditorTheme() tui.EditorTheme
- func FG(color, text string) string
- func FGANSI(color string) string
- func GetAllThemes() []extensions.ThemeInfo
- func Highlight(code, language string, theme *Theme) []string
- func Inverse(value string) string
- func Italic(value string) string
- func LanguageFromPath(path string) string
- func MarkdownTheme() tui.MarkdownTheme
- func ResolveSetting(setting string, terminal TerminalTheme) (string, bool)
- func SetCurrent(t *Theme)
- func SetTheme(name string) error
- func Strikethrough(value string) string
- func ThinkingBorderColor(level agent.ThinkingLevel) func(string) string
- func Underline(value string) string
- type AutoSetting
- type Collision
- type ColorMode
- type ColorValue
- type Controller
- func (controller *Controller) Available() []string
- func (controller *Controller) Current() *Theme
- func (controller *Controller) Name() string
- func (controller *Controller) Reload() error
- func (controller *Controller) Set(name string) error
- func (controller *Controller) SetInstance(value *Theme) error
- type Detection
- type Diagnostic
- type LoadOptions
- type Registry
- func (registry *Registry) Available() []string
- func (registry *Registry) Diagnostics() []Diagnostic
- func (registry *Registry) Extend(paths []string)
- func (registry *Registry) Get(name string) (*Theme, bool)
- func (registry *Registry) Loaded() []*Theme
- func (registry *Registry) Register(theme *Theme) error
- func (registry *Registry) ReplaceLoaded(themes []*Theme) error
- type TerminalTheme
- type Theme
- func (theme *Theme) Background(name, value string) string
- func (theme *Theme) BackgroundANSI(name string) (string, error)
- func (theme *Theme) ColorMode() ColorMode
- func (theme *Theme) ExportColors() map[string]string
- func (theme *Theme) Foreground(name, value string) string
- func (theme *Theme) ForegroundANSI(name string) (string, error)
- func (theme *Theme) Markdown(codeBlockIndent string) tui.MarkdownTheme
- func (theme *Theme) ResolvedColors(light bool) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BashModeBorderColor ¶
func ColorModeGlobal ¶
func ColorModeGlobal() string
func EditorTheme ¶
func EditorTheme() tui.EditorTheme
func GetAllThemes ¶
func GetAllThemes() []extensions.ThemeInfo
func LanguageFromPath ¶
func MarkdownTheme ¶
func MarkdownTheme() tui.MarkdownTheme
func ResolveSetting ¶
func ResolveSetting(setting string, terminal TerminalTheme) (string, bool)
func SetCurrent ¶
func SetCurrent(t *Theme)
func Strikethrough ¶
func ThinkingBorderColor ¶
func ThinkingBorderColor(level agent.ThinkingLevel) func(string) string
Types ¶
type AutoSetting ¶
func ParseAutoSetting ¶
func ParseAutoSetting(setting string) (AutoSetting, bool)
type ColorValue ¶
func (*ColorValue) UnmarshalJSON ¶
func (value *ColorValue) UnmarshalJSON(data []byte) error
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func Initialize ¶
func Initialize(registry *Registry, setting string, terminal TerminalTheme, onChange func()) *Controller
Initialize installs the production registry/controller used by package-level render helpers and extension theme APIs.
func NewController ¶
func NewController(registry *Registry, setting string, terminal TerminalTheme, onChange func()) *Controller
func (*Controller) Available ¶
func (controller *Controller) Available() []string
func (*Controller) Current ¶
func (controller *Controller) Current() *Theme
func (*Controller) Name ¶
func (controller *Controller) Name() string
func (*Controller) Reload ¶
func (controller *Controller) Reload() error
func (*Controller) Set ¶
func (controller *Controller) Set(name string) error
func (*Controller) SetInstance ¶
func (controller *Controller) SetInstance(value *Theme) error
type Detection ¶
type Detection struct {
Theme TerminalTheme
Source string
Detail string
Confidence string
}
func DetectBackground ¶
type Diagnostic ¶
type LoadOptions ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func Load ¶
func Load(options LoadOptions) *Registry
func (*Registry) Diagnostics ¶
func (registry *Registry) Diagnostics() []Diagnostic
func (*Registry) Loaded ¶
Loaded returns non-builtin themes in first-winner path order. ResourceLoader exposes these exact objects to interactive mode, matching upstream identity.
func (*Registry) ReplaceLoaded ¶
ReplaceLoaded atomically replaces every nonbuiltin theme with the supplied loader-owned objects. Validation happens before mutation so a bad override leaves the prior registered set intact.
type TerminalTheme ¶
type TerminalTheme string
const ( Dark TerminalTheme = "dark" Light TerminalTheme = "light" )
type Theme ¶
type Theme struct {
Name string
SourcePath string
SourceInfo *extensions.SourceInfo
// contains filtered or unexported fields
}
func (*Theme) Background ¶
func (*Theme) ExportColors ¶
func (*Theme) Foreground ¶
Click to show internal directories.
Click to hide internal directories.