fix(usage): improve DeepSeek credit balance display
Display DeepSeek prepaid balances as credit with currency instead of a 0/total quota bar, and mark balance items as isCreditBalance.
This commit is contained in:
@@ -91,14 +91,15 @@ export async function getDeepseekUsage(apiKey = null, proxyOptions = null) {
|
||||
const quotas = {};
|
||||
for (const b of balances) {
|
||||
const total = Math.max(0, b.totalBalance);
|
||||
// Credit pot: show full remaining against current balance; never set absolute
|
||||
// `remaining` — QuotaTable treats it as a 0–100 percentage.
|
||||
// Credit balance: show as "Credit: $X.XX USD" not a usage quota
|
||||
quotas[`Balance (${b.currency})`] = {
|
||||
used: 0,
|
||||
total,
|
||||
remainingPercentage: total > 0 ? 100 : 0,
|
||||
resetAt: null,
|
||||
unlimited: total > 0,
|
||||
unlimited: false,
|
||||
isCreditBalance: true,
|
||||
currency: b.currency,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user