fix(image): prevent duplicate delivery and replay artifacts

This commit is contained in:
Xubin Ren
2026-05-09 05:45:13 +00:00
parent 4d168c571c
commit 3231aaf9ee
9 changed files with 128 additions and 32 deletions
+3
View File
@@ -75,6 +75,7 @@ def test_generated_image_paths_from_tool_results() -> None:
{"id": "img_2", "path": "/tmp/two.png"},
]
)
payload = json.loads(result)
assert generated_image_paths_from_messages(
[
@@ -82,3 +83,5 @@ def test_generated_image_paths_from_tool_results() -> None:
{"role": "tool", "name": "other", "content": result},
]
) == ["/tmp/one.png", "/tmp/two.png"]
assert "runtime attaches generated images automatically" in payload["next_step"]
assert "Do not call message" in payload["next_step"]