Commit Graph

23 Commits

Author SHA1 Message Date
bedf5b887c feat: 2-col reply buttons, direct send, language-matched prompts - Buttons: [回复N 直接发送] [回复N 编辑] in 2-column layout - CALLBACK_SEND_REPLY: send immediately without editing - Prompts enforce matching email language (no Chinese forced on English) - Full mode: greeting + comma only, no [Your Name] placeholder - Tests: 5/5 passing 2026-07-17 20:49:11 +08:00
ab2bf7facb feat: AI reply modes - full (formal email) and short (concise) - Split 'AI回复' button into 'AI完整回复' and 'AI简洁回复' - Full mode: complete email format with greeting/signature, 300 char limit - Short mode: brief text message style, 50 char limit - Style persists in conversation state for regen/hint consistency - Tests: 6/6 passing 2026-07-17 20:14:48 +08:00
c3132f746a feat: AI generates plain_text field, view full text shows readable version instead of HTML 2026-07-14 14:37:12 +08:00
5113d78662 prompt: detailed instructions for extracting unsubscribe links from promotional emails 2026-07-13 08:38:05 +08:00
8b577b4c12 prompt: emphasize extracting unsubscribe links from promotional emails 2026-07-13 08:30:44 +08:00
46bc7c7057 prompt: force simplified Chinese for all AI outputs except reply suggestions 2026-07-13 00:12:50 +08:00
87e4b0b01e prompt: refine link extraction to exclude promotional links 2026-07-12 10:15:25 +08:00
fc4c5a175c feat: show thinking indicator during AI processing, accept non-numeric verification codes 2026-07-11 22:54:06 +08:00
57191ab00e feat: remove body truncation for all AI requests, increase API timeout to 120s 2026-07-11 22:32:47 +08:00
13b76c00ab feat: add tell me more button for promotion emails with AI-generated details 2026-07-11 22:17:10 +08:00
cf0f7d3956 style: restructure email formats with 收件账户 and app_name for verification 2026-07-11 22:11:15 +08:00
a992af0e02 refactor: remove action_required/action_items/key_points, keep summary concise 2026-07-11 19:46:18 +08:00
1957eb2a73 feat: extract clickable links from email and show as URL buttons 2026-07-11 19:38:33 +08:00
be4e957af9 feat: verification emails displayed as platform + code 2026-07-08 16:15:51 +08:00
9991e4ef17 feat: promotional emails summarized as who promotes what 2026-07-08 16:13:54 +08:00
c684090b9c feat: handle Reply-To header, add account_email field, decode address headers 2026-07-02 22:37:15 +08:00
d334b6f3eb feat: enhance logging detail across all modules
- email_client: log IMAP connection, login, UNSEEN count, each email
  details (subject/sender/body size), mark-as-seen progress
- ai_client: log AI request params, timing, token usage, response size
- smtp_client: log SMTP connect, login, send details
- tg_bot: log all callback actions with subject context, message states
- main: periodic queue depth report (email_queue/tg_queue/pending_uids)
2026-07-02 21:00:40 +08:00
09d11a6c03 feat: cancel button, regenerate AI replies, custom reply hints
- Reply prompt now has an inline '取消回复' button instead of typing text
- AI reply selection adds '换一批' button: passes all previous suggestions
  to AI to generate different replies
- '我想说:' button: lets user type a hint/tone instruction, AI tailors
  suggestions accordingly
- Cancel button also works on prompt/hint messages (deletes them)
- Extract _show_ai_suggestions helper for reuse
2026-07-02 20:45:40 +08:00
870ab4a59a refactor: merge reply suggestions into single AI request
- Summary prompt now includes can_reply + reply_suggestions fields
- Removed separate generate_reply_suggestions function and REPLY_PROMPT
- tg_bot reads reply suggestions from cached summary_data
- AI Reply button conditionally hidden based on can_reply
2026-07-02 20:22:54 +08:00
0dbc7ee661 feat: interactive inline buttons, SMTP reply, AI reply suggestions
- Inline keyboard: view original / back to summary toggle per message
- SMTP config per account for sending replies
- Reply button: click, type message, auto-send via SMTP
- AI Reply button: generates 3 suggestions via DeepSeek
  - Simple replies (OK, Got it) send immediately on tap
  - Substantive replies require confirm before send
  - Hides AI Reply button when AI determines reply unnecessary
- Telegram long polling integrated into main loop for real-time interaction
2026-07-02 20:21:06 +08:00
279f8c50e7 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
2026-07-02 20:05:16 +08:00
a6817d3e11 feat: add retry(10) on all network requests
- New src/retry.py with configurable retry decorator
- Applied @retry() to fetch_unseen_emails, mark_as_seen,
  summarize_email, and send_message
- No backoff delay between retries
2026-07-02 20:02:03 +08:00
e2826a3e3b feat: init AI email summarization bot
- Multi-account IMAP email polling with UID tracking
- DeepSeek API integration with JSON Mode structured output
- Telegram notification with formatted MarkdownV2 message
- YAML config with dataclass-based type validation
- Graceful shutdown on SIGINT/SIGTERM
- 60s default polling interval
2026-07-02 19:45:34 +08:00