Skip to content

Commit dd9c9da

Browse files
IVY-AI-gifsteipete
authored andcommitted
style: format with oxfmt
1 parent 30de433 commit dd9c9da

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/infra/provider-usage.fetch.minimax.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,7 @@ function pickChatModelRemains(modelRemains: unknown[]): Record<string, unknown>
348348
const chatRecord = records.find((r) => {
349349
const name = typeof r.model_name === "string" ? r.model_name : "";
350350
const total = parseFiniteNumber(r.current_interval_total_count);
351-
return (
352-
name.toLowerCase().startsWith("minimax-m") &&
353-
total !== undefined &&
354-
total > 0
355-
);
351+
return name.toLowerCase().startsWith("minimax-m") && total !== undefined && total > 0;
356352
});
357353

358354
if (chatRecord) {
@@ -448,9 +444,7 @@ export async function fetchMinimaxUsage(
448444
parseEpoch(pickNumber(usageRecord, RESET_KEYS)) ??
449445
parseEpoch(pickString(payload, RESET_KEYS)) ??
450446
parseEpoch(pickNumber(payload, RESET_KEYS));
451-
const windowLabel = chatRemains
452-
? deriveWindowLabel(chatRemains)
453-
: deriveWindowLabel(usageRecord);
447+
const windowLabel = chatRemains ? deriveWindowLabel(chatRemains) : deriveWindowLabel(usageRecord);
454448
const windows: UsageWindow[] = [
455449
{
456450
label: windowLabel,
@@ -460,9 +454,7 @@ export async function fetchMinimaxUsage(
460454
];
461455

462456
const modelName =
463-
chatRemains && typeof chatRemains.model_name === "string"
464-
? chatRemains.model_name
465-
: undefined;
457+
chatRemains && typeof chatRemains.model_name === "string" ? chatRemains.model_name : undefined;
466458
const plan =
467459
pickString(usageRecord, PLAN_KEYS) ??
468460
pickString(payload, PLAN_KEYS) ??

0 commit comments

Comments
 (0)