mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-05 20:03:48 +00:00
Update notification_manager.py
This commit is contained in:
@@ -778,28 +778,28 @@ class NotificationManager:
|
||||
rich_key = f'{ch_name}.rich_format'
|
||||
use_rich_format = self._config.get(rich_key, 'false') == 'true'
|
||||
|
||||
# ── Per-channel AI enhancement ──
|
||||
# Apply AI with channel-specific detail level and emoji setting
|
||||
# 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)
|
||||
channel_ai_config = {**ai_config, 'channel_type': ch_name}
|
||||
|
||||
# Enrich context with uptime, frequency, SMART data, and known errors
|
||||
enriched_context = enrich_context_for_ai(
|
||||
title=ch_title,
|
||||
body=ch_body,
|
||||
event_type=event_type,
|
||||
data=data,
|
||||
journal_context=raw_journal_context,
|
||||
detail_level=detail_level
|
||||
)
|
||||
|
||||
ai_result = format_with_ai_full(
|
||||
ch_title, ch_body, severity, channel_ai_config,
|
||||
detail_level=detail_level,
|
||||
journal_context=enriched_context,
|
||||
use_emojis=use_rich_format
|
||||
)
|
||||
# ── Per-channel AI enhancement ──
|
||||
# Apply AI with channel-specific detail level and emoji setting
|
||||
# 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)
|
||||
channel_ai_config = {**ai_config, 'channel_type': ch_name}
|
||||
|
||||
# Enrich context with uptime, frequency, SMART data, and known errors
|
||||
enriched_context = enrich_context_for_ai(
|
||||
title=ch_title,
|
||||
body=ch_body,
|
||||
event_type=event_type,
|
||||
data=data,
|
||||
journal_context=raw_journal_context,
|
||||
detail_level=detail_level
|
||||
)
|
||||
|
||||
ai_result = format_with_ai_full(
|
||||
ch_title, ch_body, severity, channel_ai_config,
|
||||
detail_level=detail_level,
|
||||
journal_context=enriched_context,
|
||||
use_emojis=use_rich_format
|
||||
)
|
||||
ch_title = ai_result.get('title', ch_title)
|
||||
ch_body = ai_result.get('body', ch_body)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user