fix(ai): Copilot 审计修复 — C-1/H-1/H-2/H-3/H-4/H-5/L-2

- L-2: value_to_f64 对 Null 返回 NaN(防止误触发规则)
- C-1: load_patient_data 空数据时跳过写入快照
- H-1: 每日刷新定时器添加初始延迟
- H-2: copilot_consumer 传内层 content
- H-3: 前端 hooks/Alert 修复分页响应解析
- H-4: risk_handler 动态选择 AI provider
- H-5: 新增 DELETE /copilot/rules/{id} 软删除路由
This commit is contained in:
iven
2026-05-13 00:21:27 +08:00
parent 6d97328ff6
commit d6676abecf
9 changed files with 73 additions and 9 deletions

View File

@@ -19,8 +19,8 @@ export function CopilotAlert() {
setLoading(true);
try {
const res = await listAlerts({ page_size: 50 });
const result = res.data as unknown as { items: CopilotInsight[]; total: number };
setAlerts(result.items ?? []);
const payload = (res.data as { data?: CopilotInsight[] }).data ?? [];
setAlerts(payload);
} catch {
// 静默
} finally {