Commit ac81405
committed
fix: parse embedded JSON in answer field as fallback
Some tools return structured JSON in 'answer' field (escaped string)
instead of 'structured_output' field. Updated parser to:
1. Check for structured_output field (preferred)
2. Fallback: Try parsing answer field as JSON
3. Extract file locations from either format
This handles both:
- New format: {"structured_output": {...}}
- Old wrapper: {"answer": "{\"analysis\": ..., \"hub_nodes\": [...]}"}
Ensures all tools are parsed correctly regardless of format variation.1 parent b0284a2 commit ac81405
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
92 | 103 | | |
93 | 104 | | |
94 | 105 | | |
| |||
0 commit comments