8e4213e634
问题:
- 删除对话实际成功但前端报错"Failed to delete conversation: 500"
- Dify删除API返回的可能不是JSON格式(空响应或文本)
- 原代码直接调用response.json()导致解析失败抛出异常
修复:
1. 添加Content-Type检查,只有JSON才解析
2. 非JSON响应直接返回成功标识 { result: 'success' }
3. 添加详细日志方便调试
现在删除对话能正确显示成功,无需刷新页面
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>