From 7d13baadc84d7377a352c6d58ed9deeea2c918be Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Thu, 26 Jun 2025 10:16:07 -0500 Subject: feat: default system theme (#419) Co-authored-by: adamdottv <2363879+adamdottv@users.noreply.github.com> --- packages/tui/internal/components/status/status.go | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'packages/tui/internal/components/status') diff --git a/packages/tui/internal/components/status/status.go b/packages/tui/internal/components/status/status.go index 62d207088..fb5ff8ced 100644 --- a/packages/tui/internal/components/status/status.go +++ b/packages/tui/internal/components/status/status.go @@ -36,14 +36,15 @@ func (m statusComponent) Update(msg tea.Msg) (tea.Model, tea.Cmd) { func (m statusComponent) logo() string { t := theme.CurrentTheme() - base := lipgloss.NewStyle().Background(t.BackgroundElement()).Foreground(t.TextMuted()).Render - emphasis := lipgloss.NewStyle().Bold(true).Background(t.BackgroundElement()).Foreground(t.Text()).Render + base := styles.NewStyle().Foreground(t.TextMuted()).Background(t.BackgroundElement()).Render + emphasis := styles.NewStyle().Foreground(t.Text()).Background(t.BackgroundElement()).Bold(true).Render open := base("open") code := emphasis("code ") version := base(m.app.Version) - return styles.Padded(). + return styles.NewStyle(). Background(t.BackgroundElement()). + Padding(0, 1). Render(open + code + version) } @@ -77,7 +78,7 @@ func formatTokensAndCost(tokens float32, contextWindow float32, cost float32) st func (m statusComponent) View() string { t := theme.CurrentTheme() if m.app.Session.Id == "" { - return styles.BaseStyle(). + return styles.NewStyle(). Background(t.Background()). Width(m.width). Height(2). @@ -86,9 +87,10 @@ func (m statusComponent) View() string { logo := m.logo() - cwd := styles.Padded(). + cwd := styles.NewStyle(). Foreground(t.TextMuted()). Background(t.BackgroundPanel()). + Padding(0, 1). Render(m.app.Info.Path.Cwd) sessionInfo := "" @@ -111,9 +113,10 @@ func (m statusComponent) View() string { } } - sessionInfo = styles.Padded(). - Background(t.BackgroundElement()). + sessionInfo = styles.NewStyle(). Foreground(t.TextMuted()). + Background(t.BackgroundElement()). + Padding(0, 1). Render(formatTokensAndCost(tokens, contextWindow, cost)) } @@ -123,11 +126,11 @@ func (m statusComponent) View() string { 0, m.width-lipgloss.Width(logo)-lipgloss.Width(cwd)-lipgloss.Width(sessionInfo), ) - spacer := lipgloss.NewStyle().Background(t.BackgroundPanel()).Width(space).Render("") + spacer := styles.NewStyle().Background(t.BackgroundPanel()).Width(space).Render("") status := logo + cwd + spacer + sessionInfo - blank := styles.BaseStyle().Background(t.Background()).Width(m.width).Render("") + blank := styles.NewStyle().Background(t.Background()).Width(m.width).Render("") return blank + "\n" + status } -- cgit v1.2.3