ReAct loop was terminating early when the model returned:
[Agent ran through N steps...]
{"thought": "...", "action": {...}}
The extract_json function only checked the string start or code fences.
Now scans for { or [ at non-word positions and uses depth-counting
to strip trailing text, allowing JSON buried anywhere in the response.
|
||
|---|---|---|
| .. | ||
| hooks.rs | ||
| loop_core.rs | ||
| mod.rs | ||
| types.rs | ||