新增 Codex Spark 额度展示

解析 GPT-5.3-Codex-Spark 额度窗口,并在号池页面和提供商账号抽屉中展示 Spark 周额度与 5H 额度。Spark 额度仅用于展示,不影响普通 Codex 周额度和 5H 额度的调度与筛选逻辑。
This commit is contained in:
Alice
2026-05-09 10:44:45 +08:00
parent fa22384f24
commit 757c264e3e
9 changed files with 394 additions and 19 deletions

View File

@@ -96,7 +96,12 @@ function formatQuotaValue(value: number | null | undefined): string {
function getCodexQuotaText(quota: QuotaStatusSnapshot): string | null {
const parts: string[] = []
for (const [label, code] of [['周', 'weekly'], ['5H', '5h']] as const) {
for (const [label, code] of [
['周', 'weekly'],
['5H', '5h'],
['Spark5H', 'spark_5h'],
['Spark周', 'spark_weekly'],
] as const) {
const remainingPercent = getQuotaWindowRemainingPercent(getQuotaWindow(quota, code))
if (remainingPercent == null) continue
parts.push(`${label}剩余 ${formatPercent(remainingPercent)}`)