AgentEvalTool/.scratch/v0.7/issues/04-report-drawer-analysis-section.md
sinohqb e1e067bac4 feat(models): add analysis-default flag for campaign intelligence
Introduce ModelPurpose.ANALYSIS and a globally-unique is_analysis_default
marker on chat model configs so campaign analysis can resolve its model.
Service rejects disabled or non-chat configs; repo clears the previous
holder on set. Documented the analysis role in CONTEXT.md.
2026-08-03 01:46:51 +08:00

15 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 04 — 报告抽屉「智能分析」区块
**What to build:** 活动报告抽屉顶部新增「智能分析」区块。状态行生成中spinner + 5s 轮询直到终态)、失败(错误原因 + 重试按钮)、未生成(「生成分析」按钮;无分析模型时引导去配置中心)。已生成时依次渲染:总体结论 callout → 问题诊断列表(严重度 Tag 高/中/低配色、涉及场景名、证据 chip 点击跳 `/reports?run={id}`)→ 分场景叙述 → 改善建议(按 priority 排序)。生成/重新生成按钮仅终态活动可用,进行中/计划中禁用并提示「活动完成后可生成」。显示所用分析模型名与生成时间。
**Blocked by:** 03API 与结果结构)
**Status:** ready-for-agent
- [ ] `api.ts``CampaignAnalysis` 类型 + `campaignsApi.getAnalysis(id)` / `generateAnalysis(id)`
- [ ] 抽屉顶部「智能分析」区块按状态渲染(生成中轮询复用 `usePolling`
- [ ] 四个结构化区块渲染:总体结论 / 问题诊断(严重度配色 + 场景名 + 证据 chip 跳转)/ 分场景叙述 / 改善建议排序
- [ ] 按钮状态:终态可点;进行中/计划中禁用 + 提示;无分析模型引导配置中心
- [ ] 展示分析模型名 + 生成时间
- [ ] `npx tsc --noEmit` + `npm run build` 通过;浏览器实操验证全流程