Update notification_manager.py

This commit is contained in:
MacRimi
2026-03-30 19:11:19 +02:00
parent 54eab9af49
commit 30e32e89b2
+20 -20
View File
@@ -778,28 +778,28 @@ class NotificationManager:
rich_key = f'{ch_name}.rich_format' rich_key = f'{ch_name}.rich_format'
use_rich_format = self._config.get(rich_key, 'false') == 'true' use_rich_format = self._config.get(rich_key, 'false') == 'true'
# ── Per-channel AI enhancement ── # ── Per-channel AI enhancement ──
# Apply AI with channel-specific detail level and emoji setting # Apply AI with channel-specific detail level and emoji setting
# If AI is enabled AND rich_format is on, AI will include emojis directly # If AI is enabled AND rich_format is on, AI will include emojis directly
# Pass channel_type so AI knows whether to append original (email only) # Pass channel_type so AI knows whether to append original (email only)
channel_ai_config = {**ai_config, 'channel_type': ch_name} channel_ai_config = {**ai_config, 'channel_type': ch_name}
# Enrich context with uptime, frequency, SMART data, and known errors # Enrich context with uptime, frequency, SMART data, and known errors
enriched_context = enrich_context_for_ai( enriched_context = enrich_context_for_ai(
title=ch_title, title=ch_title,
body=ch_body, body=ch_body,
event_type=event_type, event_type=event_type,
data=data, data=data,
journal_context=raw_journal_context, journal_context=raw_journal_context,
detail_level=detail_level detail_level=detail_level
) )
ai_result = format_with_ai_full( ai_result = format_with_ai_full(
ch_title, ch_body, severity, channel_ai_config, ch_title, ch_body, severity, channel_ai_config,
detail_level=detail_level, detail_level=detail_level,
journal_context=enriched_context, journal_context=enriched_context,
use_emojis=use_rich_format use_emojis=use_rich_format
) )
ch_title = ai_result.get('title', ch_title) ch_title = ai_result.get('title', ch_title)
ch_body = ai_result.get('body', ch_body) ch_body = ai_result.get('body', ch_body)