mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 02:17:46 +08:00
fix: harden OAuth identity and cookies and correct quota and JSON display
This commit is contained in:
@@ -71,6 +71,37 @@ describe('providerKeyQuota', () => {
|
||||
}, 'codex')).toBe('月剩余 86.0%')
|
||||
})
|
||||
|
||||
it('keeps account and model Codex weekly quotas distinct 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',
|
||||
label: '周',
|
||||
scope: 'account',
|
||||
window_minutes: 10_080,
|
||||
remaining_ratio: 0.9,
|
||||
},
|
||||
{
|
||||
code: 'additional_0_primary',
|
||||
label: 'gpt-reserve',
|
||||
scope: 'model',
|
||||
model: 'gpt-reserve',
|
||||
window_minutes: 10_080,
|
||||
remaining_ratio: 0.4,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}, 'codex')).toBe('周剩余 90.0% | gpt-reserve 周剩余 40.0%')
|
||||
})
|
||||
|
||||
it('formats Grok account quota from structured quota windows', () => {
|
||||
expect(getQuotaDisplayText({
|
||||
status_snapshot: {
|
||||
|
||||
Reference in New Issue
Block a user