mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-03 11:00:58 +08:00
🐛 Problem:
- AI returns JSON with fullwidth characters: [{
- Regex \[ cannot match fullwidth [
- extractDecisions() fails with "无法找到JSON数组起始"
🔧 Root Cause:
- fixMissingQuotes() was called AFTER regex matching
- If regex fails to match fullwidth chars, fix function never executes
✅ Solution:
- Call fixMissingQuotes(s) BEFORE regex matching (line 461)
- Convert fullwidth to halfwidth first: [→[, {→{
- Then regex can successfully match the JSON array
📊 Impact:
- Fixes "无法找到JSON数组起始" error
- Supports AI responses with fullwidth JSON characters
- Backward compatible with halfwidth JSON
This fix is identical to z-dev commit 3676cc0