From efb2000d8ef23297687f47fd00bb361ae8b01a0d Mon Sep 17 00:00:00 2001 From: Noe Date: Thu, 29 Jan 2026 12:12:52 +0000 Subject: [PATCH] chore: merge task-05 with conflict resolution --- src/plugin/accounts.ts | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/plugin/accounts.ts b/src/plugin/accounts.ts index cd8e993..7dfd40f 100644 --- a/src/plugin/accounts.ts +++ b/src/plugin/accounts.ts @@ -749,32 +749,24 @@ export class AccountManager { return false; } - for (const account of this.accounts) { + return this.accounts.some(acc => { // Skip current account - if (account.index === currentAccountIndex) { - continue; + if (acc.index === currentAccountIndex) { + return false; } - // Skip disabled accounts - if (account.enabled === false) { - continue; + if (acc.enabled === false) { + return false; } - // Skip cooling down accounts - if (this.isAccountCoolingDown(account)) { - continue; + if (this.isAccountCoolingDown(acc)) { + return false; } - // Clear expired rate limits before checking - clearExpiredRateLimits(account); - - // Check if this account has antigravity available - if (!isRateLimitedForHeaderStyle(account, family, "antigravity", model)) { - return true; - } - } - - return false; + clearExpiredRateLimits(acc); + // Check if antigravity is available for this account + return !isRateLimitedForHeaderStyle(acc, family, "antigravity", model); + }); } removeAccount(account: ManagedAccount): boolean {