Documentation
¶
Index ¶
Constants ¶
const ( // Primary colors ColorWhite = "#E5F2FC" ColorAccentBlue = "#7AA2F7" ColorMutedBlue = "#8B95C1" ColorMutedGray = "#808080" ColorBackgroundAlt = "#24283B" ColorBorderSecondary = "#6B75A8" ColorTextPrimary = "#C0C0C0" ColorTextSecondary = "#808080" ColorSuccessGreen = "#9ECE6A" ColorErrorRed = "#F7768E" ColorWarningYellow = "#E0AF68" ColorMobyBlue = "#1D63ED" ColorDarkBlue = "#202a4b" ColorErrorStrong = "#d74532" ColorErrorDark = "#4a2523" // Spinner glow colors (transition from base blue towards white) ColorSpinnerDim = "#9AB8F9" ColorSpinnerBright = "#B8CFFB" ColorSpinnerBrightest = "#D6E5FC" // Background colors ColorBackground = "#1C1C22" // Status colors ColorInfoCyan = "#7DCFFF" ColorHighlight = "#99f868" // Diff colors ColorDiffAddBg = "#20303B" ColorDiffRemoveBg = "#3C2A2A" // Line number and UI element colors ColorLineNumber = "#565F89" ColorSeparator = "#414868" // Interactive element colors ColorSelected = "#364A82" // AutoCompleteGhost colors ColorSuggestionGhost = "#6B6B6B" // Tab colors ColorTab = "#25252c" )
Color hex values (used throughout the file)
const ( ChromaErrorFgColor = "#F1F1F1" ChromaSuccessColor = "#00D787" ChromaErrorBgColor = "#F05B5B" ChromaCommentColor = "#676767" ChromaCommentPreprocColor = "#FF875F" ChromaKeywordColor = "#00AAFF" ChromaKeywordReservedColor = "#FF5FD2" ChromaKeywordNamespaceColor = "#FF5F87" ChromaKeywordTypeColor = "#6E6ED8" ChromaOperatorColor = "#EF8080" ChromaPunctuationColor = "#E8E8A8" ChromaNameBuiltinColor = "#FF8EC7" ChromaNameTagColor = "#B083EA" ChromaNameAttributeColor = "#7A7AE6" ChromaNameDecoratorColor = "#FFFF87" ChromaLiteralNumberColor = "#6EEFC0" ChromaLiteralStringColor = "#C69669" ChromaLiteralStringEscapeColor = "#AFFFD7" ChromaGenericDeletedColor = "#FD5B5B" ChromaGenericSubheadingColor = "#777777" ChromaBackgroundColor = "#373737" )
Chroma syntax highlighting colors (Monokai theme)
const ( ANSIColor252 = "252" ANSIColor39 = "39" ANSIColor35 = "35" ANSIColor212 = "212" ANSIColor243 = "243" ANSIColor244 = "244" )
ANSI color codes (8-bit color codes)
const AppPaddingLeft = 1 // Keep in sync with AppStyle padding
Base Styles
Variables ¶
var ( // Background colors Background = lipgloss.Color(ColorBackground) BackgroundAlt = lipgloss.Color(ColorBackgroundAlt) // Primary accent colors White = lipgloss.Color(ColorWhite) MobyBlue = lipgloss.Color(ColorMobyBlue) Accent = lipgloss.Color(ColorAccentBlue) // Status colors - softer, more professional Success = lipgloss.Color(ColorSuccessGreen) Error = lipgloss.Color(ColorErrorRed) Warning = lipgloss.Color(ColorWarningYellow) Info = lipgloss.Color(ColorInfoCyan) Highlight = lipgloss.Color(ColorHighlight) // Text hierarchy TextPrimary = lipgloss.Color(ColorTextPrimary) TextSecondary = lipgloss.Color(ColorTextSecondary) TextMuted = lipgloss.Color(ColorMutedBlue) TextMutedGray = lipgloss.Color(ColorMutedGray) // Border colors BorderPrimary = lipgloss.Color(ColorAccentBlue) BorderSecondary = lipgloss.Color(ColorBorderSecondary) BorderMuted = lipgloss.Color(ColorBackgroundAlt) BorderWarning = lipgloss.Color(ColorWarningYellow) // Diff colors (matching glamour/markdown "dark" theme) DiffAddBg = lipgloss.Color(ColorDiffAddBg) DiffRemoveBg = lipgloss.Color(ColorDiffRemoveBg) DiffAddFg = lipgloss.Color(ColorSuccessGreen) DiffRemoveFg = lipgloss.Color(ColorErrorRed) // UI element colors LineNumber = lipgloss.Color(ColorLineNumber) Separator = lipgloss.Color(ColorSeparator) // Interactive element colors Selected = lipgloss.Color(ColorSelected) SelectedFg = lipgloss.Color(ColorTextPrimary) PlaceholderColor = lipgloss.Color(ColorMutedGray) // Badge colors AgentBadgeFg = White AgentBadgeBg = MobyBlue // Tabs TabBg = lipgloss.Color(ColorTab) TabPrimaryFg = lipgloss.Color(ColorMutedGray) TabAccentFg = lipgloss.Color(ColorHighlight) )
Tokyo Night-inspired Color Palette
var ( NoStyle = lipgloss.NewStyle() BaseStyle = NoStyle.Foreground(TextPrimary) AppStyle = BaseStyle.Padding(0, 1, 0, AppPaddingLeft) )
var ( HighlightWhiteStyle = BaseStyle.Foreground(White).Bold(true) MutedStyle = BaseStyle.Foreground(TextMutedGray) SecondaryStyle = BaseStyle.Foreground(TextSecondary) BoldStyle = BaseStyle.Bold(true) )
Text Styles
var ( SuccessStyle = BaseStyle.Foreground(Success) ErrorStyle = BaseStyle.Foreground(Error) WarningStyle = BaseStyle.Foreground(Warning) InfoStyle = BaseStyle.Foreground(Info) ActiveStyle = BaseStyle.Foreground(Success) ToBeDoneStyle = BaseStyle.Foreground(TextPrimary) InProgressStyle = BaseStyle.Foreground(Highlight) CompletedStyle = BaseStyle.Foreground(TextMutedGray) )
Status Styles
var ( BaseMessageStyle = BaseStyle. Padding(1, 1). BorderLeft(true). BorderStyle(lipgloss.HiddenBorder()). BorderForeground(BorderPrimary) UserMessageStyle = BaseMessageStyle. BorderStyle(lipgloss.ThickBorder()). BorderForeground(BorderPrimary). Background(BackgroundAlt). Bold(true) AssistantMessageStyle = BaseMessageStyle. Padding(0, 1) WelcomeMessageStyle = BaseMessageStyle. BorderStyle(lipgloss.DoubleBorder()). Bold(true) ErrorMessageStyle = BaseMessageStyle. BorderStyle(lipgloss.ThickBorder()). Foreground(Error) SelectedMessageStyle = AssistantMessageStyle. BorderStyle(lipgloss.NormalBorder()). BorderForeground(Success) )
Border Styles
var ( DialogStyle = BaseStyle. Border(lipgloss.RoundedBorder()). BorderForeground(BorderSecondary). Foreground(TextPrimary). Padding(1, 2). Align(lipgloss.Left) DialogWarningStyle = BaseStyle. Border(lipgloss.RoundedBorder()). BorderForeground(BorderWarning). Foreground(TextPrimary). Padding(1, 2). Align(lipgloss.Left) DialogTitleStyle = BaseStyle. Bold(true). Foreground(TextSecondary). Align(lipgloss.Center) DialogTitleWarningStyle = BaseStyle. Bold(true). Foreground(Warning). Align(lipgloss.Center) DialogTitleInfoStyle = BaseStyle. Bold(true). Foreground(Info). Align(lipgloss.Center) DialogContentStyle = BaseStyle. Foreground(TextPrimary) DialogSeparatorStyle = BaseStyle. Foreground(BorderMuted) DialogQuestionStyle = BaseStyle. Bold(true). Foreground(TextPrimary). Align(lipgloss.Center) DialogOptionsStyle = BaseStyle. Foreground(TextMuted). Align(lipgloss.Center) DialogHelpStyle = BaseStyle. Foreground(TextMuted). Italic(true) TabTitleStyle = BaseStyle. Foreground(TabPrimaryFg) TabStyle = TabPrimaryStyle. Padding(1, 0) TabPrimaryStyle = BaseStyle. Foreground(TextPrimary) TabAccentStyle = BaseStyle. Foreground(TabAccentFg). Background(TabBg) )
Dialog Styles
var ( PaletteCategoryStyle = BaseStyle. Bold(true). Foreground(White). MarginTop(1) PaletteUnselectedActionStyle = BaseStyle. Foreground(TextPrimary). Bold(true) PaletteSelectedActionStyle = PaletteUnselectedActionStyle. Background(MobyBlue). Foreground(White) PaletteUnselectedDescStyle = BaseStyle. Foreground(TextSecondary) PaletteSelectedDescStyle = PaletteUnselectedDescStyle. Background(MobyBlue). Foreground(White) )
Command Palette Styles
var ( DiffAddStyle = BaseStyle. Background(DiffAddBg). Foreground(DiffAddFg) DiffRemoveStyle = BaseStyle. Background(DiffRemoveBg). Foreground(DiffRemoveFg) DiffUnchangedStyle = BaseStyle.Background(BackgroundAlt) )
Diff Styles (matching glamour markdown theme)
var ( LineNumberStyle = BaseStyle.Foreground(LineNumber).Background(BackgroundAlt) SeparatorStyle = BaseStyle.Foreground(Separator).Background(BackgroundAlt) )
Syntax highlighting UI element styles
var ( ToolMessageStyle = BaseStyle. Foreground(TextMutedGray) ToolErrorMessageStyle = BaseStyle. Foreground(lipgloss.Color(ColorErrorStrong)) ToolName = ToolMessageStyle. Foreground(MobyBlue). Background(lipgloss.Color(ColorDarkBlue)). Padding(0, 1) ToolNameError = ToolName. Foreground(lipgloss.Color(ColorErrorStrong)). Background(lipgloss.Color(ColorErrorDark)) ToolCompletedIcon = BaseStyle. MarginLeft(2). Foreground(White). Background(MobyBlue) ToolErrorIcon = ToolCompletedIcon. Background(lipgloss.Color(ColorErrorStrong)) ToolPendingIcon = ToolCompletedIcon. Background(lipgloss.Color(ColorWarningYellow)) ToolCallArgs = ToolMessageStyle. Padding(0, 0, 0, 2) ToolCallResult = ToolMessageStyle. Padding(0, 0, 0, 2) )
Tool Call Styles
var ( InputStyle = textarea.Styles{ Focused: textarea.StyleState{ Base: BaseStyle, Placeholder: BaseStyle.Foreground(PlaceholderColor), }, Blurred: textarea.StyleState{ Base: BaseStyle, Placeholder: BaseStyle.Foreground(PlaceholderColor), }, Cursor: textarea.CursorStyle{ Color: Accent, }, } EditorStyle = BaseStyle.Padding(1, 0, 0, 0) // SuggestionGhostStyle renders inline auto-complete hints in a muted tone. // Use a distinct grey so suggestion text is visually separate from the user's input. SuggestionGhostStyle = BaseStyle.Foreground(lipgloss.Color(ColorSuggestionGhost)) // SuggestionCursorStyle renders the first character of a suggestion inside the cursor. // Uses the same blue accent background as the normal cursor, with ghost-colored foreground text. SuggestionCursorStyle = BaseStyle.Background(Accent).Foreground(lipgloss.Color(ColorSuggestionGhost)) // Attachment banner styles - polished look with subtle border AttachmentBannerStyle = BaseStyle. Foreground(TextSecondary) AttachmentBadgeStyle = BaseStyle. Foreground(lipgloss.Color(ColorInfoCyan)). Bold(true) AttachmentSizeStyle = BaseStyle. Foreground(TextMuted). Italic(true) AttachmentIconStyle = BaseStyle. Foreground(lipgloss.Color(ColorInfoCyan)) )
Input Styles
var ( TrackStyle = lipgloss.NewStyle().Foreground(BorderSecondary) ThumbStyle = lipgloss.NewStyle().Foreground(Accent) )
Scrollbar
var ( ResizeHandleStyle = BaseStyle. Foreground(BorderSecondary) ResizeHandleHoverStyle = BaseStyle. Foreground(Accent) ResizeHandleActiveStyle = BaseStyle. Foreground(lipgloss.Color(ColorTextPrimary)) )
Resize Handle Style
var ( NotificationStyle = BaseStyle. Border(lipgloss.RoundedBorder()). BorderForeground(Success). Padding(0, 1) NotificationInfoStyle = BaseStyle. Border(lipgloss.RoundedBorder()). BorderForeground(Info). Padding(0, 1) NotificationWarningStyle = BaseStyle. Border(lipgloss.RoundedBorder()). BorderForeground(Warning). Padding(0, 1) NotificationErrorStyle = BaseStyle. Border(lipgloss.RoundedBorder()). BorderForeground(Error). Padding(0, 1) )
Notification Styles
var ( CompletionBoxStyle = BaseStyle. Border(lipgloss.RoundedBorder()). BorderForeground(BorderSecondary). Padding(0, 1) CompletionNormalStyle = BaseStyle. Foreground(TextPrimary). Bold(true) CompletionSelectedStyle = CompletionNormalStyle. Foreground(White). Background(MobyBlue) CompletionDescStyle = BaseStyle. Foreground(TextSecondary) CompletionSelectedDescStyle = CompletionDescStyle. Foreground(White). Background(MobyBlue) CompletionNoResultsStyle = BaseStyle. Foreground(TextMuted). Italic(true). Align(lipgloss.Center) )
Completion Styles
var ( SpinnerDotsAccentStyle = BaseStyle.Foreground(Accent) SpinnerDotsHighlightStyle = BaseStyle.Foreground(TabAccentFg) SpinnerTextBrightestStyle = BaseStyle.Foreground(lipgloss.Color(ColorSpinnerBrightest)) SpinnerTextBrightStyle = BaseStyle.Foreground(lipgloss.Color(ColorSpinnerBright)) SpinnerTextDimStyle = BaseStyle.Foreground(lipgloss.Color(ColorSpinnerDim)) SpinnerTextDimmestStyle = BaseStyle.Foreground(Accent) )
Spinner Styles
var ( AgentBadgeStyle = BaseStyle. Foreground(AgentBadgeFg). Background(AgentBadgeBg). Padding(0, 1) )
Agent and transfer badge styles
Layout Styles
var (
ChatStyle = BaseStyle
)
Deprecated styles (kept for backward compatibility)
var ( SelectionStyle = BaseStyle. Background(Selected). Foreground(SelectedFg) )
Selection Styles
Functions ¶
func ChromaStyle ¶ added in v1.9.2
func MarkdownStyle ¶ added in v1.9.2
func MarkdownStyle() ansi.StyleConfig
func RenderComposite ¶ added in v1.9.22
RenderComposite renders the content with the given style, but ensures that any ANSI reset codes in the content are replaced with the style's active sequences, preventing the style's background/foreground from being interrupted.
Types ¶
This section is empty.