feat(agent): record task run history (#6305)

This commit is contained in:
InfinityPacer
2026-08-13 22:13:36 +08:00
committed by GitHub
parent 4de4fa4391
commit 57e7f86f38
12 changed files with 1016 additions and 128 deletions
@@ -64,6 +64,15 @@ class QueryAgentTasksTool(MoviePilotTool):
next_run_at=scheduler.get_agent_task_next_run(task.id),
timezone=settings.TZ,
)
if task_id:
data["recent_runs"] = [
oper.run_to_dict(run)
for run in oper.list_runs(
task_id=task.id,
user_id=str(self._user_id),
limit=10,
)
]
result.append(data)
return result