fix: suppress intermediate progress output in cron jobs
Cron jobs now pass on_progress=_silent to process_direct, matching the heartbeat pattern. Previously, tool hints and streaming deltas were published to the user channel via bus during execution, but the final response could be rejected by evaluate_response — leaving users with confusing partial output and no conclusion. Closes #3319
This commit is contained in:
@@ -726,12 +726,17 @@ def _run_gateway(
|
||||
cron_token = None
|
||||
if isinstance(cron_tool, CronTool):
|
||||
cron_token = cron_tool.set_cron_context(True)
|
||||
|
||||
async def _silent(*_args, **_kwargs):
|
||||
pass
|
||||
|
||||
try:
|
||||
resp = await agent.process_direct(
|
||||
reminder_note,
|
||||
session_key=f"cron:{job.id}",
|
||||
channel=job.payload.channel or "cli",
|
||||
chat_id=job.payload.to or "direct",
|
||||
on_progress=_silent,
|
||||
)
|
||||
finally:
|
||||
if isinstance(cron_tool, CronTool) and cron_token is not None:
|
||||
|
||||
Reference in New Issue
Block a user