From b20a7e349b3e4aa34f50d7a58e66722fc7b9e259 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 26 Sep 2026 13:22:44 +0200 Subject: [PATCH] Expect render to carry the human's typed turns --- bin/test_loop_claude.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index c8276ae3..d222fbf2 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -66,13 +66,16 @@ class ReadPremises(unittest.TestCase): class Render(unittest.TestCase): - def test_joins_assistant_text_and_tool_calls_and_skips_the_rest(self): + def test_joins_assistant_text_and_tool_calls_and_human_turns_and_skips_the_rest(self): said = loop.render([ human("do it"), assistant({"type": "text", "text": "Starting."}, {"type": "tool_use", "name": "Bash", "input": {"command": "ls"}}), assistant({"type": "text", "text": " "}), + human([{"type": "tool_result", "content": "not typed"}]), + human("/exit"), + human([{"type": "text", "text": "yes, "}, {"type": "text", "text": "merge it"}]), ]) - self.assertEqual(said, 'Starting.\n\n[tool Bash] {"command": "ls"}') + self.assertEqual(said, '[human] do it\n\nStarting.\n\n[tool Bash] {"command": "ls"}\n\n[human] yes, merge it') class HumanTurns(unittest.TestCase):