feat(frontend): Responses WebSocket 配置与用量展示

provider 表单支持开启 Responses WebSocket;用量列表、状态与详情
区分 WebSocket 请求。
This commit is contained in:
AAEE86
2026-08-17 14:52:25 +08:00
committed by ZheFox
parent 621a528083
commit 1353d76e07
13 changed files with 97 additions and 0 deletions
@@ -342,6 +342,17 @@ describe('UsageRecordsTable', () => {
expect(root.textContent).toContain('gpt-5')
})
it('shows WS in the type column for completed WebSocket usage records', () => {
const root = mountUsageRecordsTable([buildRecord({
is_websocket: true,
status: 'completed',
})])
const badges = [...root.querySelectorAll<HTMLElement>('[data-usage-transport="websocket"]')]
expect(badges.length).toBeGreaterThan(0)
expect(badges.every(badge => badge.textContent?.trim() === 'WS')).toBe(true)
})
it('shows reasoning effort next to the model name', () => {
const root = mountUsageRecordsTable([buildRecord({
requested_reasoning_effort: 'xhigh',