feat: show recipient & AI-generated subject in summary

- AI now generates a concise subject title (not copy original)
- AI prompt includes recipient field in JSON schema
- Telegram message shows recipient and uses AI-generated title
This commit is contained in:
2026-07-02 20:05:16 +08:00
parent a6817d3e11
commit 279f8c50e7
3 changed files with 9 additions and 6 deletions

View File

@@ -23,10 +23,10 @@ def format_summary(data: dict) -> str:
icon = _priority_icon.get(priority, "")
lines = [
f"*📧 新邮件摘要*",
f"*📧 {_escape(data.get('subject', '邮件摘要'))}*",
f"━━━━━━━━━━━━━━━━━━",
f"*收件人:* {_escape(data.get('recipient', '未知'))}",
f"*发件人:* {_escape(data.get('sender', '未知'))}",
f"*主题:* {_escape(data.get('subject', '无主题'))}",
f"*优先级:* {icon} {priority.upper()}",
"",
_escape(data.get("summary", "")),