fix: 前端消息拆分+动作消息样式+DevTools自主思考状态保持+记忆表名修复

- 侧边栏底部 "昔涟 AI" 改为 "昔涟"
- 暂时禁用消息朗读按钮
- 修复前端 response 处理器:支持 gateway 发送的 content+role+msg_type 字段,
  使动作消息(括号内容)正确拆分为独立的 ActionMessageBubble 显示
- 修复 DevTools 自主思考面板:5秒自动刷新后展开的思考日志不再自动折叠
- 修复 memory-service 表名不一致:memory_entries → memories,
  解决 DevTools 记忆管理页面查不到 admin 用户记忆的问题
- 修复 sessionStore 解析历史消息时 msgType 未定义引用

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 10:50:42 +08:00
parent 26a5c69aba
commit 31be1b71eb
14 changed files with 442 additions and 154 deletions
@@ -529,7 +529,8 @@ func (h *MemoryHandler) handleThinkingStats(w http.ResponseWriter, r *http.Reque
return
}
stats, err := h.svc.GetThinkingStats(r.Context())
userID := r.URL.Query().Get("user_id")
stats, err := h.svc.GetThinkingStats(r.Context(), userID)
if err != nil {
log.Printf("[memory-handler] 获取思考日志统计失败: %v", err)
writeError(w, http.StatusInternalServerError, err.Error())
@@ -537,6 +538,9 @@ func (h *MemoryHandler) handleThinkingStats(w http.ResponseWriter, r *http.Reque
}
writeJSON(w, http.StatusOK, map[string]interface{}{
"stats": stats,
"total_logs": stats.TotalLogs,
"total_tool_calls": stats.TotalToolCalls,
"avg_content_length": stats.AvgContentLen,
"latest_at": stats.LatestAt,
})
}