Expect the loop's own prompts, promptSource sdk, to be no human turn

This commit is contained in:
2026-09-26 13:28:17 +02:00
parent 2341c50450
commit bd7a41a57b
+2
View File
@@ -74,6 +74,7 @@ class Render(unittest.TestCase):
human([{"type": "tool_result", "content": "not typed"}]),
human("<command-name>/exit</command-name>"),
human([{"type": "text", "text": "yes, "}, {"type": "text", "text": "merge it"}]),
{**human("Continue the task; the previous run stopped before it was finished."), "promptSource": "sdk"},
])
self.assertEqual(said, '[human] do it\n\nStarting.\n\n[tool Bash] {"command": "ls"}\n\n[human] yes, merge it')
@@ -86,6 +87,7 @@ class HumanTurns(unittest.TestCase):
human([{"type": "tool_result", "content": "not typed"}]),
human("<command-name>/model</command-name>"),
{**human("peer message"), "isMeta": True},
{**human("the loop's own prompt"), "promptSource": "sdk"},
human([{"type": "text", "text": "[Request interrupted by user]"}]),
human([]),
assistant({"type": "text", "text": "said"}),