From 16f4b479956eefbd9d29d89d8e8a942e4ea4a54e Mon Sep 17 00:00:00 2001 From: Amolith Date: Tue, 2 Dec 2025 16:34:56 -0700 Subject: [PATCH] fix(quota): round usage percentage to integer Assisted-by: Claude Opus 4.5 via Crush --- functions/synu.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/synu.fish b/functions/synu.fish index dbb3fe142d14d3cafa43113d9d6bfb948b3995b5..779c1c838bcfac2a0436628831e956db43306feb 100644 --- a/functions/synu.fish +++ b/functions/synu.fish @@ -13,7 +13,7 @@ function synu --description "Universal agent wrapper with Synthetic API quota tr set -l requests (echo "$quota" | cut -d' ' -f1) set -l limit (echo "$quota" | cut -d' ' -f2) set -l remaining (math "$limit - $requests") - set -l percent_used (math "$requests * 100 / $limit") + set -l percent_used (math -s0 "$requests * 100 / $limit") printf "Usage: " if test $percent_used -lt 33 set_color green @@ -157,7 +157,7 @@ function synu --description "Universal agent wrapper with Synthetic API quota tr set -l remaining (math "$limit - $requests_after") # Calculate percentage used: (requests_after * 100) / limit - set -l percent_used (math "$requests_after * 100 / $limit") + set -l percent_used (math -s0 "$requests_after * 100 / $limit") # Display session usage and remaining quota with color # Force a newline first for proper separation from agent output