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
+10
View File
@@ -166,3 +166,13 @@ class TestMessageToolTurnTracking:
tool._sent_in_turn = True
tool.start_turn()
assert not tool._sent_in_turn
def test_schema_discourages_current_chat_replies(self) -> None:
tool = MessageTool()
assert "Do not use this for the normal reply in the current chat" in tool.description
assert "generate_image creates images in the current chat" in tool.description
assert (
"Do not use this for a normal reply in the current chat"
in tool.parameters["properties"]["content"]["description"]
)