mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 10:57:03 +08:00
新增 Codex Spark 额度展示
解析 GPT-5.3-Codex-Spark 额度窗口,并在号池页面和提供商账号抽屉中展示 Spark 周额度与 5H 额度。Spark 额度仅用于展示,不影响普通 Codex 周额度和 5H 额度的调度与筛选逻辑。
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { getQuotaDisplayText } from '../providerKeyQuota'
|
||||
|
||||
describe('providerKeyQuota', () => {
|
||||
it('includes Codex Spark quota windows in display text', () => {
|
||||
expect(getQuotaDisplayText({
|
||||
status_snapshot: {
|
||||
oauth: {
|
||||
code: 'valid',
|
||||
},
|
||||
account: {
|
||||
code: 'ok',
|
||||
blocked: false,
|
||||
},
|
||||
quota: {
|
||||
provider_type: 'codex',
|
||||
code: 'ok',
|
||||
exhausted: false,
|
||||
windows: [
|
||||
{
|
||||
code: 'weekly',
|
||||
remaining_ratio: 0.9,
|
||||
},
|
||||
{
|
||||
code: '5h',
|
||||
remaining_ratio: 0.8,
|
||||
},
|
||||
{
|
||||
code: 'spark_5h',
|
||||
remaining_ratio: 0.6,
|
||||
},
|
||||
{
|
||||
code: 'spark_weekly',
|
||||
remaining_ratio: 0.95,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}, 'codex')).toBe('周剩余 90.0% | 5H剩余 80.0% | Spark5H剩余 60.0% | Spark周剩余 95.0%')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user