Summary
The usage API's extra_usage.used_credits is already fetched and cached by ccstatusline (extraUsageUsed in CachedUsageDataSchema), but no widget can display it. Please add an extra-usage-used widget — or have extra-usage-remaining fall back to showing the used amount when extraUsageLimit is absent.
Motivation
For accounts with extra usage enabled but no monthly limit configured (monthly_limit: null — pay-as-you-go with no cap), neither existing extra-usage widget can render anything:
| Widget |
Shows |
Needs |
extra-usage-remaining |
limit − used |
extraUsageLimit — absent |
extra-usage-utilization |
used / limit % |
extraUsageUtilization — absent |
used_credits is the only meaningful extra-usage number for such accounts, and arguably interesting for capped accounts too (a used/remaining toggle, similar in spirit to #391).
Current workaround
A custom-command widget reading ccstatusline's own cache:
jq -r '(.extraUsageUsed // 0) / 100' "$HOME/.cache/ccstatusline/usage.json" | LC_ALL=C xargs printf 'extra: €%.2f'
Related: #413 (these widgets currently show a permanent [Timeout] for limit-less accounts), #415 (currency formatting).
Summary
The usage API's
extra_usage.used_creditsis already fetched and cached by ccstatusline (extraUsageUsedinCachedUsageDataSchema), but no widget can display it. Please add anextra-usage-usedwidget — or haveextra-usage-remainingfall back to showing the used amount whenextraUsageLimitis absent.Motivation
For accounts with extra usage enabled but no monthly limit configured (
monthly_limit: null— pay-as-you-go with no cap), neither existing extra-usage widget can render anything:extra-usage-remainingextraUsageLimit— absentextra-usage-utilizationextraUsageUtilization— absentused_creditsis the only meaningful extra-usage number for such accounts, and arguably interesting for capped accounts too (a used/remaining toggle, similar in spirit to #391).Current workaround
A
custom-commandwidget reading ccstatusline's own cache:Related: #413 (these widgets currently show a permanent
[Timeout]for limit-less accounts), #415 (currency formatting).