fix: suppress heartbeat progress messages to external channels
This commit is contained in:
@@ -363,11 +363,17 @@ def gateway(
|
|||||||
async def on_heartbeat(prompt: str) -> str:
|
async def on_heartbeat(prompt: str) -> str:
|
||||||
"""Execute heartbeat through the agent."""
|
"""Execute heartbeat through the agent."""
|
||||||
channel, chat_id = _pick_heartbeat_target()
|
channel, chat_id = _pick_heartbeat_target()
|
||||||
|
|
||||||
|
async def _silent(*_args, **_kwargs):
|
||||||
|
pass
|
||||||
|
|
||||||
return await agent.process_direct(
|
return await agent.process_direct(
|
||||||
prompt,
|
prompt,
|
||||||
session_key="heartbeat",
|
session_key="heartbeat",
|
||||||
channel=channel,
|
channel=channel,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
# suppress: heartbeat should not push progress to external channels
|
||||||
|
on_progress=_silent,
|
||||||
)
|
)
|
||||||
|
|
||||||
heartbeat = HeartbeatService(
|
heartbeat = HeartbeatService(
|
||||||
|
|||||||
Reference in New Issue
Block a user