The open source coding agent.
TypeScript
chore(tui): rename theme colors
adamdottv8b73c52f0066
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.goindex ea08d9317aa..c40ee02db4c 100644--- a/packages/tui/internal/components/chat/message.go+++ b/packages/tui/internal/components/chat/message.go@@ -137,7 +137,7 @@ func renderContentBlock(content string, options ...renderingOption) string {PaddingBottom(renderer.paddingBottom).PaddingLeft(renderer.paddingLeft).PaddingRight(renderer.paddingRight).- Background(t.BackgroundSubtle()).+ Background(t.BackgroundPanel()).Foreground(t.TextMuted()).BorderStyle(lipgloss.ThickBorder())@@ -146,7 +146,7 @@ func renderContentBlock(content string, options ...renderingOption) string {align = *renderer.align}- borderColor := t.BackgroundSubtle()+ borderColor := t.BackgroundPanel()if renderer.borderColor != nil {borderColor = *renderer.borderColor}@@ -159,7 +159,7 @@ func renderContentBlock(content string, options ...renderingOption) string {AlignHorizontal(align).BorderLeftForeground(borderColor).BorderLeftBackground(t.Background()).- BorderRightForeground(t.BackgroundSubtle()).+ BorderRightForeground(t.BackgroundPanel()).BorderRightBackground(t.Background())case lipgloss.Right:style = style.@@ -168,7 +168,7 @@ func renderContentBlock(content string, options ...renderingOption) string {AlignHorizontal(align).BorderRightForeground(borderColor).BorderRightBackground(t.Background()).- BorderLeftForeground(t.BackgroundSubtle()).+ BorderLeftForeground(t.BackgroundPanel()).BorderLeftBackground(t.Background())}@@ -229,7 +229,7 @@ func renderText(message client.MessageInfo, text string, author string) string {if message.Role == client.Assistant {markdownWidth = width - padding - 4}- content := toMarkdown(text, markdownWidth, t.BackgroundSubtle())+ content := toMarkdown(text, markdownWidth, t.BackgroundPanel())content = strings.Join([]string{content, info}, "\n")switch message.Role {@@ -274,7 +274,7 @@ func renderToolInvocation(t := theme.CurrentTheme()style := styles.Muted().Width(outerWidth).- Background(t.BackgroundSubtle()).+ Background(t.BackgroundPanel()).PaddingTop(paddingTop).PaddingBottom(paddingBottom).PaddingLeft(2).@@ -282,7 +282,7 @@ func renderToolInvocation(BorderLeft(true).BorderRight(true).BorderBackground(t.Background()).- BorderForeground(t.BackgroundSubtle()).+ BorderForeground(t.BackgroundPanel()).BorderStyle(lipgloss.ThickBorder())if toolCall.State == "partial-call" {@@ -290,7 +290,7 @@ func renderToolInvocation(if !showDetails {title = "∟ " + titlepadding := calculatePadding()- style := lipgloss.NewStyle().Width(outerWidth - padding - 4).Background(t.BackgroundSubtle())+ style := lipgloss.NewStyle().Width(outerWidth - padding - 4).Background(t.BackgroundPanel())return renderContentBlock(style.Render(title),WithAlign(lipgloss.Left),WithBorderColor(t.Accent()),@@ -332,7 +332,7 @@ func renderToolInvocation(if m, ok := metadata.Get("message"); ok {style = style.BorderLeftForeground(t.Error())error = styles.BaseStyle().- Background(t.BackgroundSubtle()).+ Background(t.BackgroundPanel()).Foreground(t.Error()).Render(m.(string))error = renderContentBlock(@@ -374,7 +374,7 @@ func renderToolInvocation(formattedDiff = lipgloss.NewStyle().BorderStyle(lipgloss.ThickBorder()).BorderBackground(t.Background()).- BorderForeground(t.BackgroundSubtle()).+ BorderForeground(t.BackgroundPanel()).BorderLeft(true).BorderRight(true).Render(formattedDiff)@@ -410,7 +410,7 @@ func renderToolInvocation(command := toolArgsMap["command"].(string)stdout := stdout.(string)body = fmt.Sprintf("```console\n> %s\n%s```", command, stdout)- body = toMarkdown(body, innerWidth, t.BackgroundSubtle())+ body = toMarkdown(body, innerWidth, t.BackgroundPanel())body = renderContentBlock(body, WithFullWidth(), WithMarginBottom(1))}case "webfetch":@@ -421,7 +421,7 @@ func renderToolInvocation(body = *resultbody = truncateHeight(body, 10)if format == "html" || format == "markdown" {- body = toMarkdown(body, innerWidth, t.BackgroundSubtle())+ body = toMarkdown(body, innerWidth, t.BackgroundPanel())}body = renderContentBlock(body, WithFullWidth(), WithMarginBottom(1))}@@ -443,7 +443,7 @@ func renderToolInvocation(body += fmt.Sprintf("- [ ] %s\n", content)}}- body = toMarkdown(body, innerWidth, t.BackgroundSubtle())+ body = toMarkdown(body, innerWidth, t.BackgroundPanel())body = renderContentBlock(body, WithFullWidth(), WithMarginBottom(1))}case "task":@@ -503,7 +503,7 @@ func renderToolInvocation(if !showDetails {title = "∟ " + titlepadding := calculatePadding()- style := lipgloss.NewStyle().Width(outerWidth - padding - 4).Background(t.BackgroundSubtle())+ style := lipgloss.NewStyle().Width(outerWidth - padding - 4).Background(t.BackgroundPanel())paddingBottom := 0if isLast {paddingBottom = 1@@ -592,7 +592,7 @@ func renderFile(filename string, content string, options ...fileRenderingOption)content = truncateHeight(content, renderer.height)}content = fmt.Sprintf("```%s\n%s\n```", extension(renderer.filename), content)- content = toMarkdown(content, width, t.BackgroundSubtle())+ content = toMarkdown(content, width, t.BackgroundPanel())return renderContentBlock(content, WithFullWidth(), WithMarginBottom(1))}diff --git a/packages/tui/internal/components/diff/diff.go b/packages/tui/internal/components/diff/diff.goindex 2f655554e83..13f0f562f0b 100644--- a/packages/tui/internal/components/diff/diff.go+++ b/packages/tui/internal/components/diff/diff.go@@ -441,10 +441,10 @@ func SyntaxHighlight(w io.Writer, source, fileName, formatter string, bg color.C<entry type="TextWhitespace" style="%s"/></style>`,- getColor(t.BackgroundSubtle()), // Background- getColor(t.Text()), // Text- getColor(t.Text()), // Other- getColor(t.Error()), // Error+ getColor(t.BackgroundPanel()), // Background+ getColor(t.Text()), // Text+ getColor(t.Text()), // Other+ getColor(t.Error()), // ErrorgetColor(t.SyntaxKeyword()), // KeywordgetColor(t.SyntaxKeyword()), // KeywordConstant@@ -614,7 +614,7 @@ func applyHighlighting(content string, segments []Segment, segmentType LineType,// Get the appropriate color based on terminal backgroundbgColor := lipgloss.Color(getColor(highlightBg))- fgColor := lipgloss.Color(getColor(theme.CurrentTheme().BackgroundSubtle()))+ fgColor := lipgloss.Color(getColor(theme.CurrentTheme().BackgroundPanel()))for i := 0; i < len(content); {// Check if we're at an ANSI sequencediff --git a/packages/tui/internal/components/status/status.go b/packages/tui/internal/components/status/status.goindex 01a2659c654..48e53fafd9b 100644--- a/packages/tui/internal/components/status/status.go+++ b/packages/tui/internal/components/status/status.go@@ -88,7 +88,7 @@ func (m statusComponent) View() string {cwd := styles.Padded().Foreground(t.TextMuted()).- Background(t.BackgroundSubtle()).+ Background(t.BackgroundPanel()).Render(m.app.Info.Path.Cwd)sessionInfo := ""@@ -123,7 +123,7 @@ func (m statusComponent) View() string {0,m.width-lipgloss.Width(logo)-lipgloss.Width(cwd)-lipgloss.Width(sessionInfo),)- spacer := lipgloss.NewStyle().Background(t.BackgroundSubtle()).Width(space).Render("")+ spacer := lipgloss.NewStyle().Background(t.BackgroundPanel()).Width(space).Render("")status := logo + cwd + spacer + sessionInfodiff --git a/packages/tui/internal/styles/styles.go b/packages/tui/internal/styles/styles.goindex fa82640fb54..733fce55c47 100644--- a/packages/tui/internal/styles/styles.go+++ b/packages/tui/internal/styles/styles.go@@ -15,7 +15,7 @@ func BaseStyle() lipgloss.Style {func Panel() lipgloss.Style {t := theme.CurrentTheme()return lipgloss.NewStyle().- Background(t.BackgroundSubtle()).+ Background(t.BackgroundPanel()).Border(lipgloss.NormalBorder(), true, false, true, false).BorderForeground(t.BorderSubtle()).Foreground(t.Text())@@ -131,9 +131,9 @@ func BackgroundColor() compat.AdaptiveColor {return theme.CurrentTheme().Background()}-// BackgroundSubtleColor returns the subtle background color from the current theme-func BackgroundSubtleColor() compat.AdaptiveColor {- return theme.CurrentTheme().BackgroundSubtle()+// BackgroundPanelColor returns the subtle background color from the current theme+func BackgroundPanelColor() compat.AdaptiveColor {+ return theme.CurrentTheme().BackgroundPanel()}// BackgroundElementColor returns the darker background color from the current themediff --git a/packages/tui/internal/theme/ayu.go b/packages/tui/internal/theme/ayu.goindex 108fa056d1c..2cb24a71019 100644--- a/packages/tui/internal/theme/ayu.go+++ b/packages/tui/internal/theme/ayu.go@@ -98,7 +98,7 @@ func NewAyuTheme() *AyuTheme {Dark: lipgloss.Color(darkBg),Light: lipgloss.Color(darkBg),}- theme.BackgroundSubtleColor = compat.AdaptiveColor{+ theme.BackgroundPanelColor = compat.AdaptiveColor{Dark: lipgloss.Color(darkBgAlt),Light: lipgloss.Color(darkBgAlt),}diff --git a/packages/tui/internal/theme/everforest.go b/packages/tui/internal/theme/everforest.goindex d840867d311..60ea3849af8 100644--- a/packages/tui/internal/theme/everforest.go+++ b/packages/tui/internal/theme/everforest.go@@ -120,7 +120,7 @@ func NewEverforestTheme() *EverforestTheme {Dark: lipgloss.Color(darkStep1),Light: lipgloss.Color(lightStep1),}- theme.BackgroundSubtleColor = compat.AdaptiveColor{+ theme.BackgroundPanelColor = compat.AdaptiveColor{Dark: lipgloss.Color(darkStep2),Light: lipgloss.Color(lightStep2),}diff --git a/packages/tui/internal/theme/manager.go b/packages/tui/internal/theme/manager.goindex c54ed11196c..aaf0db26e46 100644--- a/packages/tui/internal/theme/manager.go+++ b/packages/tui/internal/theme/manager.go@@ -146,7 +146,7 @@ func LoadCustomTheme(customTheme map[string]any) (Theme, error) {case "background":theme.BackgroundColor = adaptiveColorcase "backgroundsubtle":- theme.BackgroundSubtleColor = adaptiveColor+ theme.BackgroundPanelColor = adaptiveColorcase "backgroundelement":theme.BackgroundElementColor = adaptiveColorcase "border":diff --git a/packages/tui/internal/theme/opencode.go b/packages/tui/internal/theme/opencode.goindex 8f188be3cae..a9d3f3b4161 100644--- a/packages/tui/internal/theme/opencode.go+++ b/packages/tui/internal/theme/opencode.go@@ -119,7 +119,7 @@ func NewOpenCodeTheme() *OpenCodeTheme {Dark: lipgloss.Color(darkStep1),Light: lipgloss.Color(lightStep1),}- theme.BackgroundSubtleColor = compat.AdaptiveColor{+ theme.BackgroundPanelColor = compat.AdaptiveColor{Dark: lipgloss.Color(darkStep2),Light: lipgloss.Color(lightStep2),}diff --git a/packages/tui/internal/theme/theme.go b/packages/tui/internal/theme/theme.goindex 2769a1720ae..9b1af1cce53 100644--- a/packages/tui/internal/theme/theme.go+++ b/packages/tui/internal/theme/theme.go@@ -14,7 +14,7 @@ import (type Theme interface {// Background colorsBackground() compat.AdaptiveColor // Radix 1- BackgroundSubtle() compat.AdaptiveColor // Radix 2+ BackgroundPanel() compat.AdaptiveColor // Radix 2BackgroundElement() compat.AdaptiveColor // Radix 3// Border colors@@ -84,7 +84,7 @@ type Theme interface {type BaseTheme struct {// Background colorsBackgroundColor compat.AdaptiveColor- BackgroundSubtleColor compat.AdaptiveColor+ BackgroundPanelColor compat.AdaptiveColorBackgroundElementColor compat.AdaptiveColor// Border colors@@ -163,7 +163,7 @@ func (t *BaseTheme) Text() compat.AdaptiveColor { return t.TextColor }func (t *BaseTheme) TextMuted() compat.AdaptiveColor { return t.TextMutedColor }func (t *BaseTheme) Background() compat.AdaptiveColor { return t.BackgroundColor }-func (t *BaseTheme) BackgroundSubtle() compat.AdaptiveColor { return t.BackgroundSubtleColor }+func (t *BaseTheme) BackgroundPanel() compat.AdaptiveColor { return t.BackgroundPanelColor }func (t *BaseTheme) BackgroundElement() compat.AdaptiveColor { return t.BackgroundElementColor }func (t *BaseTheme) Border() compat.AdaptiveColor { return t.BorderColor }diff --git a/packages/tui/internal/theme/tokyonight.go b/packages/tui/internal/theme/tokyonight.goindex 8bb32dcedd8..1c160078a02 100644--- a/packages/tui/internal/theme/tokyonight.go+++ b/packages/tui/internal/theme/tokyonight.go@@ -117,7 +117,7 @@ func NewTokyoNightTheme() *TokyoNightTheme {Dark: lipgloss.Color(darkStep1),Light: lipgloss.Color(lightStep1),}- theme.BackgroundSubtleColor = compat.AdaptiveColor{+ theme.BackgroundPanelColor = compat.AdaptiveColor{Dark: lipgloss.Color(darkStep2),Light: lipgloss.Color(lightStep2),}