mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-09 08:11:09 +00:00
style: format with oxfmt
This commit is contained in:
@@ -348,11 +348,7 @@ function pickChatModelRemains(modelRemains: unknown[]): Record<string, unknown>
|
||||
const chatRecord = records.find((r) => {
|
||||
const name = typeof r.model_name === "string" ? r.model_name : "";
|
||||
const total = parseFiniteNumber(r.current_interval_total_count);
|
||||
return (
|
||||
name.toLowerCase().startsWith("minimax-m") &&
|
||||
total !== undefined &&
|
||||
total > 0
|
||||
);
|
||||
return name.toLowerCase().startsWith("minimax-m") && total !== undefined && total > 0;
|
||||
});
|
||||
|
||||
if (chatRecord) {
|
||||
@@ -448,9 +444,7 @@ export async function fetchMinimaxUsage(
|
||||
parseEpoch(pickNumber(usageRecord, RESET_KEYS)) ??
|
||||
parseEpoch(pickString(payload, RESET_KEYS)) ??
|
||||
parseEpoch(pickNumber(payload, RESET_KEYS));
|
||||
const windowLabel = chatRemains
|
||||
? deriveWindowLabel(chatRemains)
|
||||
: deriveWindowLabel(usageRecord);
|
||||
const windowLabel = chatRemains ? deriveWindowLabel(chatRemains) : deriveWindowLabel(usageRecord);
|
||||
const windows: UsageWindow[] = [
|
||||
{
|
||||
label: windowLabel,
|
||||
@@ -460,9 +454,7 @@ export async function fetchMinimaxUsage(
|
||||
];
|
||||
|
||||
const modelName =
|
||||
chatRemains && typeof chatRemains.model_name === "string"
|
||||
? chatRemains.model_name
|
||||
: undefined;
|
||||
chatRemains && typeof chatRemains.model_name === "string" ? chatRemains.model_name : undefined;
|
||||
const plan =
|
||||
pickString(usageRecord, PLAN_KEYS) ??
|
||||
pickString(payload, PLAN_KEYS) ??
|
||||
|
||||
Reference in New Issue
Block a user