mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 14:16:43 +00:00
fix(cliproxy): show clear message for paused accounts in Live Monitor
- Check isAccountPaused() before readAuthData() in fetchAccountQuota() - Return "Account is paused" instead of confusing "Auth file not found" - Improves UX by explaining why quota fetch fails for paused accounts
This commit is contained in:
@@ -11,6 +11,7 @@ import { getAuthDir } from './config-generator';
|
||||
import { CLIProxyProvider } from './types';
|
||||
import {
|
||||
getProviderAccounts,
|
||||
isAccountPaused,
|
||||
setAccountTier,
|
||||
type AccountInfo,
|
||||
type AccountTier,
|
||||
@@ -553,6 +554,18 @@ export async function fetchAccountQuota(
|
||||
};
|
||||
}
|
||||
|
||||
// Check if account is paused (token moved to auth-paused/ directory)
|
||||
if (isAccountPaused(provider, accountId)) {
|
||||
const error = 'Account is paused';
|
||||
if (verbose) console.error(`[i] ${error}`);
|
||||
return {
|
||||
success: false,
|
||||
models: [],
|
||||
lastUpdated: Date.now(),
|
||||
error,
|
||||
};
|
||||
}
|
||||
|
||||
// Read auth data from auth file
|
||||
const authData = readAuthData(provider, accountId);
|
||||
if (!authData) {
|
||||
|
||||
Reference in New Issue
Block a user