totopo 3.6.0-rc-1 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -41,6 +41,10 @@ parsed=$(jq -r '
|
|
|
41
41
|
$parsed
|
|
42
42
|
EOF
|
|
43
43
|
|
|
44
|
+
# Capture "now" once for both the rate-limit countdown and the Claude Code freshness check.
|
|
45
|
+
# Status line runs on every prompt render, so avoid spawning `date` twice.
|
|
46
|
+
now_epoch=$(date +%s)
|
|
47
|
+
|
|
44
48
|
# Colors
|
|
45
49
|
GREEN='\033[32m'
|
|
46
50
|
YELLOW='\033[33m'
|
|
@@ -120,7 +124,6 @@ reset_label=""
|
|
|
120
124
|
case "$rate_resets_at" in
|
|
121
125
|
'' | *[!0-9]*) ;;
|
|
122
126
|
*)
|
|
123
|
-
now_epoch=$(date +%s)
|
|
124
127
|
delta=$(( rate_resets_at - now_epoch ))
|
|
125
128
|
if [ "$delta" -gt 0 ]; then
|
|
126
129
|
delta_h=$(( delta / 3600 ))
|
|
@@ -154,8 +157,7 @@ if [ -r "$cc_ts_file" ]; then
|
|
|
154
157
|
if [ -n "$cc_iso" ]; then
|
|
155
158
|
cc_secs=$(date -d "$cc_iso" +%s 2>/dev/null)
|
|
156
159
|
if [ -n "$cc_secs" ]; then
|
|
157
|
-
|
|
158
|
-
cc_age_days=$(( (cc_now - cc_secs) / 86400 ))
|
|
160
|
+
cc_age_days=$(( (now_epoch - cc_secs) / 86400 ))
|
|
159
161
|
[ "$cc_age_days" -lt 0 ] && cc_age_days=0
|
|
160
162
|
fi
|
|
161
163
|
fi
|