"""Catalyst summary agent.""" from __future__ import annotations def build_catalyst_summary(theme_views: list[dict]) -> dict: strong = [item for item in theme_views if item.get("heat_score", 0) >= 70] themes = [item["theme"] for item in strong[:3]] if themes: summary = f"强催化/强热度主题集中在 {'、'.join(themes)}。" elif theme_views: summary = "主题热度存在但强催化不足,需等待新闻、政策或资金进一步确认。" else: summary = "暂未形成有效主题催化。" return {"summary": summary, "strong_theme_count": len(strong), "themes": themes}