Commit Graph

8 Commits

Author SHA1 Message Date
bolade 6db9f5255d feat: Update AI analysis and alert processing for improved email thread management
- Increased the maximum number of messages analyzed in the `analyze_thread` function from 4 to 6 for better context.
- Enhanced the system prompt to clarify the criteria for determining if a thread is actionable.
- Improved logging in the `process_alerts` function to provide detailed insights during alert processing.
- Refactored the WhatsApp sender to include better error handling and logging for Twilio integration.
- Updated email ingestion logic to return whether analysis is needed based on the folder processed.
2025-11-03 22:51:43 +01:00
bolade 0c94225ff8 feat: Enhance home route to filter threads requiring replies and waiting over an hour 2025-08-13 16:23:46 +01:00
bolade bd4a795a5a feat: Enhance notification system with WebSocket support and auto-hide alerts 2025-08-13 14:49:23 +01:00
bolade 411f47e039 feat: Increase max email fetch results and enhance email body extraction 2025-08-13 09:00:18 +01:00
bolade 3ea27caca6 feat: Add alert processing functionality and UI feedback 2025-08-12 10:41:47 +01:00
bolade 1fd3a95093 Refactor AI analysis and email fetching functionality
- Removed AI analysis guide and related documentation files.
- Updated email fetching logic to intelligently determine start date based on the latest email date in the database.
- Enhanced the app module to include a button for re-analyzing threads with AI.
- Improved database interactions to trigger AI analysis after ingesting sent emails.
- Adjusted the UI to display additional information about threads, including formatted latest message dates.
- Removed outdated test scripts for AI analysis and email fetching.
- Updated styles for better responsiveness and layout in the frontend.
2025-08-12 09:54:10 +01:00
bolade 75a0a3fde7 feat: Implement async AI analysis for email threads
- Added `get_latest_email_date()` function in `database.py` to retrieve the most recent email date for a given account and folder.
- Enhanced `fetch_folder_emails()` in `zoho_client.py` to intelligently determine the start date for fetching emails based on the latest email date in the database.
- Introduced `analyze_and_update_threads_async()` for asynchronous analysis of email threads, allowing concurrent processing.
- Created a synchronous wrapper `analyze_and_update_threads()` for easier integration.
- Updated `fetch_emails()` to support database session and account email parameters.
- Added comprehensive documentation in `AI_ANALYSIS_GUIDE.md` detailing the new AI analysis functionality.
- Implemented tests for the new features, including `test_fetch_with_db.py`, `test_ai_analysis.py`, and `test_single_analysis.py`.
- Added error handling and logging improvements throughout the codebase.
2025-08-11 23:20:20 +01:00
bolade d553d6f31e Implement email alert system with WhatsApp notifications
- Added alerts processing logic in src/alerts.py to analyze threads and send WhatsApp alerts based on configured time frames.
- Created FastAPI application in src/app.py to manage threads, display configurations, and trigger alert processing.
- Developed database models and utility functions in src/database.py for managing threads and messages.
- Integrated Twilio API for sending WhatsApp messages in src/whatsapp_sender.py.
- Implemented Zoho email client in src/zoho_client.py to fetch emails and check for replies.
- Added configuration management for email settings and alert parameters.
- Established auto-processing loop for periodic email syncing and alert generation.
2025-08-11 17:34:35 +01:00