auto-sync: 2026-05-26 23:28:32

This commit is contained in:
cfdaily
2026-05-26 23:28:32 +08:00
parent 62fb62f981
commit 5b9973b7b8
+10 -1
View File
@@ -184,8 +184,17 @@ def parse_v3_jsonl(filepath: str) -> list:
continue
content = msg.get('content', '')
text = extract_text_from_content(content)
tool_names, has_error = extract_tool_info(content)
tool_names, has_error = extract_tool_info(role, content)
ts = obj.get('timestamp', '')
# Skip toolResult messages from the main conversation flow
# (they're metadata, not turns)
if role == 'toolResult':
# Still track errors for trial_error pattern
if has_error:
# Attach error to previous assistant message
if messages and messages[-1].role == 'assistant':
messages[-1].has_error = True
continue
messages.append(ParsedMsg(role, text, ts, tool_names, has_error, idx))
idx += 1
except Exception as e: