Let only a typed entry's leading < pass as the human's

This commit is contained in:
2026-09-28 20:28:28 +02:00
parent 8e15ff7f37
commit 4adcefdc21
+1 -1
View File
@@ -71,7 +71,7 @@ def user_entry_kind(entry):
# {"type": "user", "promptSource": "typed", "message": {"content": "merge it"}}
if isinstance(text := content(entry), str):
source = entry.get("promptSource")
return UserEntryKind.COMMAND if source == "system" or (source is None and text.startswith("<")) else UserEntryKind.HUMAN
return UserEntryKind.COMMAND if source == "system" or (source != "typed" and text.startswith("<")) else UserEntryKind.HUMAN
if not parts(entry):
return UserEntryKind.EMPTY
# {"type": "user", "message": {"content": [{"tool_use_id": "toolu_01…", "type": "tool_result", "content": "hi"}]}}