The open source coding agent.
TypeScript
feat: better diagnostic visuals in status bar
adamdottvb2f24e38eda0
diff --git a/internal/tui/components/core/status.go b/internal/tui/components/core/status.goindex 28120a430bd..54b8d4872c0 100644--- a/internal/tui/components/core/status.go+++ b/internal/tui/components/core/status.go@@ -216,32 +216,36 @@ func (m *statusCmp) projectDiagnostics() string {diagnostics := []string{}+ errIcon := styles.CircledDigit(len(errorDiagnostics))errStr := lipgloss.NewStyle().Background(t.BackgroundDarker()).Foreground(t.Error()).- Render(fmt.Sprintf("%s %d", styles.ErrorIcon, len(errorDiagnostics)))+ Render(errIcon)diagnostics = append(diagnostics, errStr)+ warnIcon := styles.CircledDigit(len(warnDiagnostics))warnStr := lipgloss.NewStyle().Background(t.BackgroundDarker()).Foreground(t.Warning()).- Render(fmt.Sprintf("%s %d", styles.WarningIcon, len(warnDiagnostics)))+ Render(warnIcon)diagnostics = append(diagnostics, warnStr)+ infoIcon := styles.CircledDigit(len(infoDiagnostics))infoStr := lipgloss.NewStyle().Background(t.BackgroundDarker()).Foreground(t.Info()).- Render(fmt.Sprintf("%s %d", styles.InfoIcon, len(infoDiagnostics)))+ Render(infoIcon)diagnostics = append(diagnostics, infoStr)+ hintIcon := styles.CircledDigit(len(hintDiagnostics))hintStr := lipgloss.NewStyle().Background(t.BackgroundDarker()).Foreground(t.Text()).- Render(fmt.Sprintf("%s %d", styles.HintIcon, len(hintDiagnostics)))+ Render(hintIcon)diagnostics = append(diagnostics, hintStr)return styles.ForceReplaceBackgroundWithLipgloss(- strings.Join(diagnostics, " "),+ styles.Padded().Render(strings.Join(diagnostics, " ")),t.BackgroundDarker(),)}diff --git a/internal/tui/styles/icons.go b/internal/tui/styles/icons.goindex a79ef8bb42d..8a49fce80bb 100644--- a/internal/tui/styles/icons.go+++ b/internal/tui/styles/icons.go@@ -9,3 +9,16 @@ const (HintIcon string = "ⓗ"SpinnerIcon string = "⟳")++// CircledDigit returns the Unicode circled digit/number for 0‑20.+// out‑of‑range → "".+func CircledDigit(n int) string {+ switch {+ case n == 0:+ return "\u24EA" // ⓪+ case 1 <= n && n <= 20:+ return string(rune(0x2460 + n - 1)) // ①–⑳+ default:+ return ""+ }+}