mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-07 13:48:43 +08:00
fix(frontend): 补充 Claude Sonnet 5 状态别名
This commit is contained in:
@@ -229,6 +229,7 @@ const formatScopeName = (scope: string): string => {
|
||||
'claude-sonnet-4-6': 'CSon46',
|
||||
'claude-sonnet-4-5': 'CSon45',
|
||||
'claude-sonnet-4-5-thinking': 'CSon45T',
|
||||
'claude-sonnet-5': 'CSon5',
|
||||
// Gemini 2.5 系列
|
||||
'gemini-2.5-flash': 'G25F',
|
||||
'gemini-2.5-flash-lite': 'G25FL',
|
||||
|
||||
@@ -51,6 +51,36 @@ function makeAccount(overrides: Partial<Account>): Account {
|
||||
}
|
||||
|
||||
describe('AccountStatusIndicator', () => {
|
||||
it('Claude 5 模型限流时显示 Opus 和 Sonnet 的短别名', () => {
|
||||
const wrapper = mount(AccountStatusIndicator, {
|
||||
props: {
|
||||
account: makeAccount({
|
||||
extra: {
|
||||
model_rate_limits: {
|
||||
'claude-opus-5': {
|
||||
rate_limited_at: '2026-07-28T00:00:00Z',
|
||||
rate_limit_reset_at: '2099-07-28T00:00:00Z'
|
||||
},
|
||||
'claude-sonnet-5': {
|
||||
rate_limited_at: '2026-07-28T00:00:00Z',
|
||||
rate_limit_reset_at: '2099-07-28T00:00:00Z'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
global: {
|
||||
stubs: {
|
||||
Icon: true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
expect(wrapper.text()).toContain('COpus5')
|
||||
expect(wrapper.text()).toContain('CSon5')
|
||||
expect(wrapper.text()).not.toContain('claude-sonnet-5')
|
||||
})
|
||||
|
||||
it('Grok 账号额度限流时显示自动恢复时间而非临时不可调度', () => {
|
||||
const wrapper = mount(AccountStatusIndicator, {
|
||||
props: {
|
||||
|
||||
Reference in New Issue
Block a user