feat: Add notification email compression feature
Add intelligent notification email detection and compression: - Detect notification emails from GitLab, GitHub, Jira, Confluence, Datadog, Renovate - Extract structured summaries from notification emails - Compress notifications into terminal-friendly markdown format - Add configuration options for notification compression mode Features: - Rule-based detection using sender domains and subject patterns - Type-specific extractors for each notification platform - Configurable compression modes (summary, detailed, off) - Integrated with ContentContainer for seamless display Files added: - src/mail/notification_detector.py: Notification type detection - src/mail/notification_compressor.py: Content compression Modified: - src/mail/config.py: Add notification_compression_mode config - src/mail/widgets/ContentContainer.py: Integrate compressor - src/mail/app.py: Pass envelope data to display_content - PROJECT_PLAN.md: Document new feature
This commit is contained in:
@@ -265,9 +265,17 @@ class EmailViewerApp(App):
|
||||
content_container = self.query_one(ContentContainer)
|
||||
folder = self.folder if self.folder else None
|
||||
account = self.current_account if self.current_account else None
|
||||
content_container.display_content(message_id, folder=folder, account=account)
|
||||
|
||||
# Get envelope data for notification compression
|
||||
metadata = self.message_store.get_metadata(message_id)
|
||||
envelope = None
|
||||
if metadata:
|
||||
envelope = self.message_store.envelopes.get(metadata["index"])
|
||||
|
||||
content_container.display_content(
|
||||
message_id, folder=folder, account=account, envelope=envelope
|
||||
)
|
||||
|
||||
if metadata:
|
||||
message_date = metadata["date"]
|
||||
if self.current_message_index != metadata["index"]:
|
||||
|
||||
Reference in New Issue
Block a user