feat: показывать заполнение контекста в статусной строке для всех моделей

ctx:35% отображается серым в конце строки у всех провайдеров.
Для Kimi (нет rate limits) это единственная полезная метрика.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 12:58:57 +03:00
parent 08be1dfc08
commit 01b69c341b

View File

@@ -6,6 +6,7 @@ five_pct=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empt
five_reset=$(echo "$input" | jq -r '.rate_limits.five_hour.resets_at // empty') five_reset=$(echo "$input" | jq -r '.rate_limits.five_hour.resets_at // empty')
week_pct=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // empty') week_pct=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // empty')
week_reset=$(echo "$input" | jq -r '.rate_limits.seven_day.resets_at // empty') week_reset=$(echo "$input" | jq -r '.rate_limits.seven_day.resets_at // empty')
ctx_pct=$(echo "$input" | jq -r '.context_window.used_percentage // empty')
branch=$(git -C "$cwd" --no-optional-locks symbolic-ref --short HEAD 2>/dev/null) branch=$(git -C "$cwd" --no-optional-locks symbolic-ref --short HEAD 2>/dev/null)
@@ -50,3 +51,5 @@ else
printf " \033[00;35m%s:$(printf '%.0f' "$week_pct")%%\033[00m" "$remaining" printf " \033[00;35m%s:$(printf '%.0f' "$week_pct")%%\033[00m" "$remaining"
fi fi
fi fi
[ -n "$ctx_pct" ] && printf " \033[00;90mctx:$(printf '%.0f' "$ctx_pct")%%\033[00m"