From cdf3cca3b7cfb4cc7853bce1dffff0f348abbbe0 Mon Sep 17 00:00:00 2001 From: 0xallam Date: Thu, 8 Jan 2026 12:19:04 -0800 Subject: [PATCH] fix(tui): hide cost in stats panel when zero --- strix/interface/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/strix/interface/utils.py b/strix/interface/utils.py index e5be17e..e188267 100644 --- a/strix/interface/utils.py +++ b/strix/interface/utils.py @@ -381,9 +381,10 @@ def build_tui_stats_text(tracer: Any, agent_config: dict[str, Any] | None = None stats_text.append("Total Tokens: ", style="bold white") stats_text.append(format_token_count(total_tokens), style="dim white") - stats_text.append(" • ", style="dim white") - stats_text.append("Cost: ", style="bold white") - stats_text.append(f"${total_stats['cost']:.4f}", style="dim white") + if total_stats["cost"] > 0: + stats_text.append(" • ", style="dim white") + stats_text.append("Cost: ", style="bold white") + stats_text.append(f"${total_stats['cost']:.4f}", style="dim white") return stats_text