diff --git a/.memory/worklog.json b/.memory/worklog.json index 0b047ee..97fce2e 100644 --- a/.memory/worklog.json +++ b/.memory/worklog.json @@ -1,11 +1,5 @@ { "entries": [ - { - "files_changed": 2, - "message": "Codex 会话活跃 · 最近命令:codex · 分支 main · 2 项未提交变更 · 最近提交:auto-save 2026-05-19 11:02 (~4)", - "ts": "2026-05-19T03:04:32Z", - "type": "session-heartbeat" - }, { "files_changed": 4, "hash": "3462758", @@ -3222,6 +3216,13 @@ "type": "session-heartbeat", "message": "Codex 会话活跃 · 最近命令:codex · 分支 main · 2 项未提交变更 · 最近提交:auto-save 2026-05-21 15:15 (+2, ~3)", "files_changed": 2 + }, + { + "ts": "2026-05-21T15:20:33+08:00", + "type": "commit", + "message": "auto-save 2026-05-21 15:20 (~2)", + "hash": "b6fec10", + "files_changed": 2 } ] } diff --git a/api/main.py b/api/main.py index 410e8fd..1f08055 100644 --- a/api/main.py +++ b/api/main.py @@ -8255,16 +8255,16 @@ def agent_submit_shot( return ids[0] -def agent_compose_final(run: AgentRun, ordered_ids: list[str]) -> None: - d = agent_run_dir(run.id) +def agent_compose_final(agent: AgentRun, ordered_ids: list[str]) -> None: + d = agent_run_dir(agent.id) d.mkdir(parents=True, exist_ok=True) - final_dir = job_dir(run.job_id) / "final" + final_dir = job_dir(agent.job_id) / "final" final_dir.mkdir(parents=True, exist_ok=True) - final = final_dir / f"agent-{run.id}.mp4" + final = final_dir / f"agent-{agent.id}.mp4" concat_file = d / "concat.txt" paths: list[Path] = [] for video_id in ordered_ids: - p = job_dir(run.job_id) / "storyboard_videos" / video_id / "video.mp4" + p = job_dir(agent.job_id) / "storyboard_videos" / video_id / "video.mp4" if p.exists() and p.stat().st_size > 0: paths.append(p.resolve()) if not paths: @@ -8287,11 +8287,11 @@ def agent_compose_final(run: AgentRun, ordered_ids: list[str]) -> None: "-vf", "select='not(mod(n,120))',scale=180:320,tile=12x1", "-frames:v", "1", str(contact), ]) - run.contact_sheet_url = f"/agent-runs/{run.id}/contact.jpg" + agent.contact_sheet_url = f"/agent-runs/{agent.id}/contact.jpg" except Exception as e: - agent_log(run, f"抽帧审片图生成失败:{str(e)[:180]}", level="warn") - run.final_video_url = f"/agent-runs/{run.id}/final.mp4" - save_agent_run(run) + agent_log(agent, f"抽帧审片图生成失败:{str(e)[:180]}", level="warn") + agent.final_video_url = f"/agent-runs/{agent.id}/final.mp4" + save_agent_run(agent) def agent_run_worker(run_id: str, product_refs: list[dict]) -> None: