fix(telegram): default notifications to 'important' (silence intermediate)

Per-tool-call push notifications on Telegram are noisy enough that
'all' is the wrong default — long agent runs spam the user's notification
shade with status messages they didn't ask to be pinged about. Final
responses, approval prompts, and slash confirmations still notify;
intermediate progress, streaming, and tool-progress messages now
deliver silently via disable_notification.

Users who want the legacy behavior can opt back in with:
  display:
    platforms:
      telegram:
        notifications: all
or HERMES_TELEGRAM_NOTIFICATIONS=all.
This commit is contained in:
Teknium 2026-05-09 13:34:19 -07:00
parent b4d3092f69
commit 448c11f16d
2 changed files with 9 additions and 6 deletions

View file

@ -4662,14 +4662,14 @@ class GatewayRunner:
_notify_mode = str(_raw).strip().lower()
except Exception:
pass
_notify_mode = _notify_mode or "all"
_notify_mode = _notify_mode or "important"
if _notify_mode not in ("all", "important"):
logger.warning(
"Unknown telegram notifications mode '%s', "
"defaulting to 'all' (valid: all, important)",
"defaulting to 'important' (valid: all, important)",
_notify_mode,
)
_notify_mode = "all"
_notify_mode = "important"
adapter._notifications_mode = _notify_mode
return adapter