feat(webapp): add optimization advice section to report UI

- index.html: add section ⑤ advice block (hidden by default, shown when advice_markdown present)
- report.js: add renderAdvice() called in render(), simple Markdown→HTML converter
- app.js: add noise_sensitivity / factual_correctness / semantic_similarity to shortMetric map
- app.css: add .advice-panel, .advice-badge, .advice-md styles (purple left-border theme)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-16 17:26:37 +08:00
parent 91c0dab4f9
commit 1a2cc534b8
4 changed files with 72 additions and 2 deletions

View File

@@ -301,3 +301,27 @@ table.group-table td { border-bottom: 1px solid #f1f5f9; font-variant-numeric: t
.llm-role-row { display: flex; align-items: center; gap: 14px; }
.llm-role-label { font-size: 13px; font-weight: 600; min-width: 180px; color: var(--ink); }
.llm-role-select { min-width: 240px; }
/* ---------- ⑤ 优化建议面板 ---------- */
.advice-panel { border-left: 3px solid #7c3aed; }
.advice-header {
display: flex; align-items: center; gap: 10px;
margin-bottom: 14px;
}
.advice-badge {
background: #7c3aed; color: #fff;
font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
padding: 3px 8px; border-radius: 4px; text-transform: uppercase;
}
.advice-model { font-size: 12px; color: var(--slate); }
.advice-body { line-height: 1.7; color: var(--ink); }
.advice-md h1 { font-size: 16px; font-weight: 700; margin: 16px 0 8px; color: var(--ink); }
.advice-md h2 {
font-size: 14px; font-weight: 700; margin: 20px 0 8px;
padding-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--ink-soft);
}
.advice-md h3 { font-size: 13px; font-weight: 600; margin: 12px 0 6px; color: var(--slate); }
.advice-md hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.advice-md ul { padding-left: 20px; margin: 6px 0; }
.advice-md li { margin: 3px 0; font-size: 13px; }
.advice-md strong { color: var(--ink); font-weight: 600; }