V3.3.1 修复:WBS 解析 'Extra data' 报错 + 开工接口空 body 容错

- parse_wbs 改用 raw_decode 提取第一个完整 JSON,忽略尾部杂质/多余 JSON(原按首{到尾}切片,模型输出带第二段JSON或解释文字时解析失败)
- 兼容 subtasks/task_list/items/task 等任务键名
- /autostart 接口 get_json 改 silent 容错(无 body 时不再 400)
This commit is contained in:
2026-08-14 12:55:15 +08:00
parent c8cc945b8d
commit f53e1b264e
2 changed files with 28 additions and 22 deletions
+1 -1
View File
@@ -1076,7 +1076,7 @@ def project_autostart(pid):
return jsonify({'ok': False, 'error': '请先在编辑项目中设置 AI 主管 Worker'}), 400
if not db.q('SELECT 1 FROM project_team_workers WHERE project_id=?', (pid,)):
return jsonify({'ok': False, 'error': '请先在编辑项目中勾选干活团队 Worker(≥1 个)'}), 400
d = request.get_json(force=True) or {}
d = request.get_json(silent=True) or {}
ok = autostart.launch(pid, review_required=1 if d.get('auto_review') else 0)
if not ok:
return jsonify({'ok': False, 'error': 'AI 主管正在工作中,请稍候'}), 400