auto-sync: 2026-05-26 23:28:32
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user