## 新增功能 - 文件管理模块:分类树 + 文件上传/下载/删除 - 文件上传支持拖拽(Dragger)+ 手动上传(customRequest 模式) ## 页面布局统一(参照评测执行页) - 仪表盘/评测对象/评测场景/评测报告 全部改为全高 flex 布局 - 统一内联页头样式(h2 + 竖线分隔 + 描述) - 表格撑满高度、overflow 处理 - 每页添加刷新按钮 ## Bug 修复 - 分类树操作按钮 hover 不可见(CSS 规则缺失) - 文件上传失败(multipart boundary 缺失) - LLM API 响应 content blocks 数组格式支持(_extract_content_from_api_response) - response_time_max_ms 被静默忽略(隐式规则传空 params) - 空 messages 导致 IndexError 崩溃 - poll_reply 异常中止整个 run(缺 try/catch) - engine finally 未关闭 session - 3 个页面 UTC 时间戳解析偏差 8 小时 ## 后端 - EvalEngine: poll_reply 异常保护、空 dialog 保护、session 关闭 - LLM API 响应解析支持 content-block-array 格式 - 隐式 response_time 规则正确传递 max_ms 参数 ## 前端 - api.ts: 移除手动 Content-Type(让浏览器自动添加 boundary) - Files.tsx: customRequest 替代 beforeUpload、布局优化 - index.css: 分类树 hover 规则 - Targets/Scenarios/Home/Reports: 全高布局改造 - 3 个页面时间戳改用 formatDateTime()(修复 UTC 偏差) Co-Authored-By: Claude <noreply@anthropic.com>
85 lines
2.3 KiB
TypeScript
85 lines
2.3 KiB
TypeScript
import React from 'react'
|
|
import ReactDOM from 'react-dom/client'
|
|
import { BrowserRouter } from 'react-router-dom'
|
|
import { ConfigProvider, theme } from 'antd'
|
|
import zhCN from 'antd/locale/zh_CN'
|
|
import './index.css'
|
|
import App from './App'
|
|
|
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
<React.StrictMode>
|
|
<ConfigProvider
|
|
locale={zhCN}
|
|
theme={{
|
|
algorithm: theme.defaultAlgorithm,
|
|
token: {
|
|
colorPrimary: '#1677ff',
|
|
colorSuccess: '#52c41a',
|
|
colorWarning: '#faad14',
|
|
colorError: '#ff4d4f',
|
|
colorBgLayout: '#f5f6f8',
|
|
colorBgContainer: '#ffffff',
|
|
colorBgElevated: '#ffffff',
|
|
colorText: '#1f2937',
|
|
colorTextSecondary: '#6b7280',
|
|
colorBorder: '#e5e7eb',
|
|
colorBorderSecondary: '#f0f0f0',
|
|
borderRadius: 6,
|
|
borderRadiusLG: 8,
|
|
fontSize: 14,
|
|
fontFamily:
|
|
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
},
|
|
components: {
|
|
Tabs: {
|
|
itemColor: '#6b7280',
|
|
itemSelectedColor: '#1677ff',
|
|
itemHoverColor: '#1677ff',
|
|
inkBarColor: '#1677ff',
|
|
titleFontSize: 13,
|
|
cardPadding: '8px 16px',
|
|
},
|
|
Table: {
|
|
headerBg: '#fafafa',
|
|
headerColor: '#374151',
|
|
headerSplitColor: '#f0f0f0',
|
|
rowHoverBg: '#f8faff',
|
|
borderColor: '#f5f5f5',
|
|
cellPaddingBlock: 12,
|
|
cellFontSize: 13,
|
|
},
|
|
Card: {
|
|
headerBg: '#ffffff',
|
|
paddingLG: 20,
|
|
},
|
|
Button: {
|
|
borderRadius: 6,
|
|
primaryShadow: '0 2px 6px rgba(22, 119, 255, 0.25)',
|
|
},
|
|
Input: {
|
|
borderRadius: 6,
|
|
paddingBlock: 6,
|
|
},
|
|
Select: {
|
|
borderRadius: 6,
|
|
},
|
|
Segmented: {
|
|
itemSelectedBg: '#1677ff',
|
|
itemSelectedColor: '#ffffff',
|
|
trackBg: '#e8e8e8',
|
|
},
|
|
Tag: {
|
|
borderRadiusSM: 4,
|
|
defaultBg: '#f5f5f5',
|
|
defaultColor: '#4b5563',
|
|
},
|
|
},
|
|
}}
|
|
>
|
|
<BrowserRouter>
|
|
<App />
|
|
</BrowserRouter>
|
|
</ConfigProvider>
|
|
</React.StrictMode>,
|
|
)
|