From 0c412b3728a430f3fed7daea753a23962ad84fa1 Mon Sep 17 00:00:00 2001 From: Yingwen Luo-LUOYW Date: Sun, 22 Feb 2026 23:13:09 +0800 Subject: [PATCH] feat(channels): add send_progress option to control progress message delivery Add a boolean config option `channels.sendProgress` (default: false) to control whether progress messages (marked with `_progress` metadata) are sent to chat channels. When disabled, progress messages are filtered out in the outbound dispatcher. --- nanobot/channels/manager.py | 3 +++ nanobot/config/schema.py | 1 + 2 files changed, 4 insertions(+) diff --git a/nanobot/channels/manager.py b/nanobot/channels/manager.py index 6fbab04..8a03883 100644 --- a/nanobot/channels/manager.py +++ b/nanobot/channels/manager.py @@ -193,6 +193,9 @@ class ChannelManager: timeout=1.0 ) + if msg.metadata.get("_progress") and not self.config.channels.send_progress: + continue + channel = self.channels.get(msg.channel) if channel: try: diff --git a/nanobot/config/schema.py b/nanobot/config/schema.py index 966d11d..bd602dc 100644 --- a/nanobot/config/schema.py +++ b/nanobot/config/schema.py @@ -168,6 +168,7 @@ class QQConfig(Base): class ChannelsConfig(Base): """Configuration for chat channels.""" + send_progress: bool = False whatsapp: WhatsAppConfig = Field(default_factory=WhatsAppConfig) telegram: TelegramConfig = Field(default_factory=TelegramConfig) discord: DiscordConfig = Field(default_factory=DiscordConfig)