fix: 数据确认面板修复 - 显示实际数值+确认关闭+侧边栏刷新+清理旧数据
- Handler返回value/unit/isAbnormal到metadata - DataConfirmCard显示实际数值和单位 - 确认按钮关闭卡片+刷新健康概览 - 健康Agent欢迎卡简化为'查看趋势' - 清空87条旧健康测试数据
This commit is contained in:
@@ -408,8 +408,10 @@ public static class AiChatEndpoints
|
||||
messageType = "data_confirm";
|
||||
if (toolResult is IDictionary<string, object> resultDict)
|
||||
{
|
||||
if (resultDict.TryGetValue("type", out var type))
|
||||
metadata["type"] = type.ToString();
|
||||
if (resultDict.TryGetValue("type", out var type)) metadata["type"] = type.ToString();
|
||||
if (resultDict.TryGetValue("value", out var val)) metadata["value"] = val.ToString();
|
||||
if (resultDict.TryGetValue("unit", out var unit)) metadata["unit"] = unit.ToString();
|
||||
if (resultDict.TryGetValue("isAbnormal", out var abn) && abn is bool b2) metadata["abnormal"] = b2;
|
||||
if (resultDict.TryGetValue("success", out var success) && success is bool b && b)
|
||||
metadata["success"] = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user