/** * dsh-widgets — the DeepSeek balance card's drawing. * * THE CARD IN ONE SENTENCE: the platform balance as the headline figure, what the * day has burnt under it, and the three parts of the account those numbers come * from — 充值余额 / 今日消耗 / 对话消耗. * * WHAT IS OFFICIAL AND WHAT IS MEASURED. `total` / `toppedUp` / `granted` are the * vendor's own numbers, passed through. `spentToday` is NOT: the official balance * endpoint publishes no usage, so the host measures it by sampling the balance and * accumulating the drops (see `src/host/deepseek.ts`). That difference is stated on * hover rather than hidden, because a figure that looks like a bill and is really * an observation is the kind of number this repo refuses to print bare. * * WHY 对话消耗 REUSES `session-cost`'s MATH. It is the same question that card * answers (this session, folded to money through the price rule that matches its * route), so it imports the very same pure functions instead of copying 500 lines * of rule selection. The balance card is the only place where that reading sits * BESIDE the account it is spending from; `session-cost` remains the card that * also prints the per-bucket breakdown and the rule's provenance. If the two ever * disagree, the disagreement is the price table, not two implementations of it. * * TONE IS A LEVEL HERE, and this is the one card in the family allowed to use it: * a balance under the user's own threshold is a state that is already wrong * (danger), under twice it is heading there (warn). Nothing else on the card is * coloured — 充值 / 今日消耗 / 对话消耗 are readings, and spending more is not bad. */ import type { WidgetRenderMeta, WidgetRenderOut, WidgetStats } from '../../lib/contract/types'; /** `DeepSeek 余额` — the card, as one pure function of the merged stats. * * `meta.sim` is preview-only (the rail never passes it) and pins the three things * a screenshot would otherwise depend on: the price clock (`at`, the same key * `session-cost` uses, so the peak band is reproducible), the balance to show * (`balance`) and the day's spend (`spentToday`) — which is how the market and * 组件配置 can walk the low-balance colouring without an empty account. */ export declare function deepseekBalanceRender(stats: WidgetStats, meta?: WidgetRenderMeta): WidgetRenderOut;