cli+dashboard: --panel flag, panel dict keys, TF-dialog panel section
main.py: --panel runs the agent panel on demand (force bypasses enabled/surface/quality toggles; daily budget + LLM cap still apply), prints the verdict + persona takes, and report_to_dict carries the four panel keys — which auto-propagates them into the dashboard's snapshot.json via report_to_webapp_dict. dashboard_publisher attaches in scan_tf gated by agent_panel.dashboard (default off); dashboard.html renders an "AI panel (advisory)" section in the TF detail dialog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SisdfkxnXNL9iZsXxN3T15
This commit is contained in:
@@ -981,6 +981,22 @@ function detailHTML(tf) {
|
||||
${esc(r.news_summary || "")}</div>`);
|
||||
}
|
||||
|
||||
/* AI agent panel (advisory) */
|
||||
if (r.panel_verdict) {
|
||||
const vcls = r.panel_verdict === "AGREE" ? "buy"
|
||||
: r.panel_verdict === "OPPOSE" ? "sell" : "neutral";
|
||||
const takes = (r.panel_takes || []).map(t =>
|
||||
`<tr><td class="ind-k">${esc(t.persona)}</td>
|
||||
<td>${esc(t.stance)}</td>
|
||||
<td class="num">${t.confidence != null ? Math.round(t.confidence) : "—"}</td>
|
||||
<td>${esc(t.note || "")}</td></tr>`).join("");
|
||||
out += sec("AI panel (advisory)", `<div class="d-note" style="margin-bottom:8px">
|
||||
<b class="sig-txt ${vcls}">${esc(r.panel_verdict)}</b> ·
|
||||
conf ${Math.round(r.panel_confidence || 0)}%<br>
|
||||
${esc(r.panel_rationale || "")}</div>
|
||||
${takes ? `<table class="d-table"><tbody>${takes}</tbody></table>` : ""}`);
|
||||
}
|
||||
|
||||
/* provenance */
|
||||
out += sec("Scan detail", `<table class="d-table"><tbody>
|
||||
<tr><td class="ind-k">Instrument</td><td colspan="5">${esc(r.display_name || r.symbol || "—")}</td></tr>
|
||||
|
||||
Reference in New Issue
Block a user