[中] AgentChat模板中JSON.parse无异常捕获 #92

Closed
opened 2026-05-10 18:39:18 +08:00 by admin · 0 comments
Owner

问题描述

frontend/src/views/AgentChat.vue 第98行,模板中直接使用 JSON.parse() 解析可能为空的字符串,无异常保护,会导致页面渲染崩溃。

涉及文件

  • frontend/src/views/AgentChat.vue:98

修复建议

使用 computed 属性或在方法中安全解析 JSON,异常时返回默认值。

严重程度

中 - 页面崩溃风险

## 问题描述 frontend/src/views/AgentChat.vue 第98行,模板中直接使用 JSON.parse() 解析可能为空的字符串,无异常保护,会导致页面渲染崩溃。 ## 涉及文件 - frontend/src/views/AgentChat.vue:98 ## 修复建议 使用 computed 属性或在方法中安全解析 JSON,异常时返回默认值。 ## 严重程度 中 - 页面崩溃风险
admin closed this issue 2026-05-10 18:59:12 +08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/aiagent#92