feat(config): add seven-day usage threshold (#107)

This commit is contained in:
Jarrod Watts
2026-02-03 12:15:13 +11:00
committed by GitHub
parent 44adb2631d
commit f25627d7f8
19 changed files with 46 additions and 16 deletions

View File

@@ -34,7 +34,8 @@ export function renderUsageLine(ctx) {
: (fiveHourReset
? `5h: ${fiveHourDisplay} (${fiveHourReset})`
: `5h: ${fiveHourDisplay}`);
if (sevenDay !== null && sevenDay >= 80) {
const sevenDayThreshold = display?.sevenDayThreshold ?? 80;
if (sevenDay !== null && sevenDay >= sevenDayThreshold) {
const sevenDayDisplay = formatUsagePercent(sevenDay);
const sevenDayReset = formatResetTime(ctx.usageData.sevenDayResetAt);
const sevenDayPart = usageBarEnabled