修复重置次数缓存问题

This commit is contained in:
ZheFox
2026-07-16 18:09:10 +08:00
parent 5cf38d1b35
commit 715a5ed626
2 changed files with 33 additions and 29 deletions
@@ -2443,8 +2443,8 @@ function shouldAutoRefreshCodexQuota(): boolean {
if (isTokenExpiringSoon(key, now)) return true
// 只要有一个活跃 key 没有配额数据,就刷新一次
if (!hasCodexQuotaDisplayData(key)) {
// 旧缓存可能已有普通配额但没有 reset-credit 数据,仍需补拉一次
if (!hasCodexQuotaDisplayData(key) || getCodexResetCreditAvailableCount(key) === null) {
return true
}
// 配额数据超过 5 分钟未更新,也触发刷新