mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-06-15 23:34:00 +00:00
fix(email): skip progress messages to prevent empty emails after tool calls
This commit is contained in:
parent
13178f3eaa
commit
cbf1ede179
@ -187,6 +187,11 @@ class EmailChannel(BaseChannel):
|
|||||||
self.logger.warning("SMTP host not configured")
|
self.logger.warning("SMTP host not configured")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Skip progress messages to prevent sending an empty email after each tool call
|
||||||
|
if (msg.metadata or {}).get("_progress"):
|
||||||
|
self.logger.debug("Skip progress message to {}", msg.chat_id)
|
||||||
|
return
|
||||||
|
|
||||||
to_addr = msg.chat_id.strip()
|
to_addr = msg.chat_id.strip()
|
||||||
if not to_addr:
|
if not to_addr:
|
||||||
self.logger.warning("Missing recipient address")
|
self.logger.warning("Missing recipient address")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user