This commit is contained in:
2026-07-06 00:01:34 +07:00
parent 2729408ef3
commit e7470e955e
108 changed files with 4131 additions and 529 deletions

View File

@@ -109,15 +109,22 @@ export async function getCodeBuddyCnUsage(accessToken, apiKey, providerSpecificD
total: num(acc.CycleCapacitySizePrecise, acc.CycleCapacitySize),
resetAt: parseResetTime(acc.CycleEndTime),
unlimited: false,
// Recurring allowance: the CycleEndTime is the next refresh, not the
// final expiry. The UI must show "Resets in", not "Expires in".
recurring: true,
};
});
// Bonus packs: use the lifetime Capacity balance; resetAt is the expiry.
// These are one-shot credits (CycleEndTime == DeductionEndTime), so they
// never replenish — mark recurring:false so the UI shows "Expires in"
// instead of implying a monthly refill.
bonuses.forEach((acc, i) => {
quotas[`Bonus Pack ${i + 1}`] = {
used: num(acc.CapacityUsedPrecise, acc.CapacityUsed),
total: num(acc.CapacitySizePrecise, acc.CapacitySize),
resetAt: parseResetTime(acc.CycleEndTime),
unlimited: false,
recurring: false,
};
});