summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-07-03 06:53:05 -0500
committeradamdottv <[email protected]>2025-07-03 06:53:05 -0500
commit3d9a5d9970b8f4ce56fb706f6cfb8745b61e905d (patch)
tree469e1d81a93a08f584e4de67dcc8a9b7dd22f6b5
parent1f9e195fa6bbe6ba23fa1c7d38dc212453284697 (diff)
downloadopencode-3d9a5d9970b8f4ce56fb706f6cfb8745b61e905d.tar.gz
opencode-3d9a5d9970b8f4ce56fb706f6cfb8745b61e905d.zip
fix(tui): always show status bar
-rw-r--r--packages/tui/internal/components/status/status.go21
1 files changed, 11 insertions, 10 deletions
diff --git a/packages/tui/internal/components/status/status.go b/packages/tui/internal/components/status/status.go
index 68da3ccbe..791267e0a 100644
--- a/packages/tui/internal/components/status/status.go
+++ b/packages/tui/internal/components/status/status.go
@@ -37,7 +37,11 @@ func (m statusComponent) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
func (m statusComponent) logo() string {
t := theme.CurrentTheme()
base := styles.NewStyle().Foreground(t.TextMuted()).Background(t.BackgroundElement()).Render
- emphasis := styles.NewStyle().Foreground(t.Text()).Background(t.BackgroundElement()).Bold(true).Render
+ emphasis := styles.NewStyle().
+ Foreground(t.Text()).
+ Background(t.BackgroundElement()).
+ Bold(true).
+ Render
open := base("open")
code := emphasis("code ")
@@ -72,19 +76,16 @@ func formatTokensAndCost(tokens float64, contextWindow float64, cost float64) st
formattedCost := fmt.Sprintf("$%.2f", cost)
percentage := (float64(tokens) / float64(contextWindow)) * 100
- return fmt.Sprintf("Context: %s (%d%%), Cost: %s", formattedTokens, int(percentage), formattedCost)
+ return fmt.Sprintf(
+ "Context: %s (%d%%), Cost: %s",
+ formattedTokens,
+ int(percentage),
+ formattedCost,
+ )
}
func (m statusComponent) View() string {
t := theme.CurrentTheme()
- if m.app.Session.ID == "" {
- return styles.NewStyle().
- Background(t.Background()).
- Width(m.width).
- Height(2).
- Render("")
- }
-
logo := m.logo()
cwd := styles.NewStyle().