This website requires JavaScript.
Explore
Help
Sign In
earthjasonlin
/
ai-mail-bot
Watch
1
Star
0
Fork
0
You've already forked ai-mail-bot
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
c28825ec87c57698caadfe511e2d115453f0c6b0
ai-mail-bot
/
src
History
Zichao Lin
c28825ec87
fix: use find_user_by_chat_id for expand_promo_detail AI config
2026-07-23 11:28:28 +08:00
..
__init__.py
feat: init AI email summarization bot
2026-07-02 19:45:34 +08:00
ai_client.py
feat: cleanup reply flow messages + AI comparison explanation - Track extra_msg_ids in conversation for code block messages - _cleanup_conv_messages: delete all intermediate messages on cancel/send - Cancel/send/edit all clean up extra messages before restoring summary view - AI prompts now return 'comparison' field with Chinese explanation of differences - _show_ai_suggestions displays comparison text above button list - generate_more_replies returns {suggestions, comparison}
2026-07-19 01:28:05 +08:00
config.py
feat: multi-user support - Config format: JSON with bot_token (global), users array - Each user has chat_id, AI config, email_accounts - Each email account has separate IMAP/SMTP with ssl/starttls - Config module: new dataclasses (UserConfig, ImapConfig, SmtpConfig) - find_user_by_chat_id() for callback dispatch - Main: email poller iterates all users, queues carry user object - Summarizer: accepts UserConfig, uses user-specific AI and chat_id - TG bot: all functions use bot_token string instead of TelegramConfig - Callback/message handlers look up user by chat_id - AI regen/hint threads use find_user_by_chat_id for AI config - Config example: config.example.json - Tests: 3/3 passing
2026-07-17 22:05:59 +08:00
database.py
fix: clear all database tables on startup
2026-07-15 19:09:41 +08:00
email_client.py
feat: show full recipient and CC in email summary - Email class: add cc field - fetch_unseen_emails: parse Cc header - _format_normal: display full recipient, add CC line if present - send_summary/ai_process: pass cc through to email_context - save_email_context: store cc for callback use
2026-07-18 20:07:21 +08:00
retry.py
fix: 修复 _email_poller 线程静默死亡问题
2026-07-06 19:54:23 +08:00
smtp_client.py
fix: update email_client and smtp_client for new config structure - email_client: use account.imap.server/port/ssl/starttls instead of flat fields - smtp_client: use s.ssl/starttls instead of s.use_ssl/use_starttls - tg_bot: fix _do_send_reply to use find_user_by_chat_id for email_accounts
2026-07-17 22:19:20 +08:00
summarizer.py
fix: use original email subject for reply, not AI-extracted title Reply emails should use the original subject from IMAP header (e.g. 'Re: [original]'), not the AI-generated Chinese summary title.
2026-07-22 13:28:36 +08:00
tg_bot.py
fix: use find_user_by_chat_id for expand_promo_detail AI config
2026-07-23 11:28:28 +08:00