maybe_extract_skill() sliced the LLM response from the first '{' to the
last '}'. When a model emits a stray brace in prose before the real
object (e.g. "uses {placeholder} then {...}"), the slice starts at the
prose brace, json.loads fails, and a valid skill is silently dropped.
Factor parsing into _extract_json_object(), which tries the whole
(de-fenced) string first and then each '{' start position, returning the
first candidate that parses to a JSON object.
Adds tests/test_skill_extractor_json.py.
|
||
|---|---|---|
| .. | ||
| docs | ||
| faces | ||
| hwfit | ||
| memory | ||
| research | ||
| search | ||
| shell | ||
| stt | ||
| tts | ||
| youtube | ||
| __init__.py | ||