mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 13:36:48 +00:00
9ad3507e57
Gemini reached through the OpenAI-compatible endpoint returns JavaScript-object-literal output — single-quoted strings, unquoted keys, trailing commas — which strict JSON.parse rejects. The reservation list then came back empty and the booking-import UI showed nothing (#1638). Add a shared parseLenientJson() that tries strict JSON first and falls back to JSON5 (which accepts exactly that relaxed superset), and route both the OpenAI-compatible and Ollama-native parse paths through it, replacing the two identical strict parsers.