From 988398abfca3db85ee9b5a22e0d26ccc5f570aff Mon Sep 17 00:00:00 2001 From: iamtoruk Date: Sun, 3 May 2026 12:11:10 -0700 Subject: [PATCH] Fix $0.0000 display for near-zero costs Closes #205 --- src/currency.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/currency.ts b/src/currency.ts index 8788e07..9901698 100644 --- a/src/currency.ts +++ b/src/currency.ts @@ -151,5 +151,6 @@ export function formatCost(costUSD: number): string { if (cost >= 1) return `${symbol}${cost.toFixed(2)}` if (cost >= 0.01) return `${symbol}${cost.toFixed(3)}` - return `${symbol}${cost.toFixed(4)}` + if (cost >= 0.0001) return `${symbol}${cost.toFixed(4)}` + return `${symbol}${cost.toFixed(2)}` }