feat: 多功能升级 — 流式逐字渲染、对话缓存、会话组织优化、记忆管理修复、性能仪表盘
- 前端消息流式逐字渲染 (AI-Core ChatStream → SSE → Gateway → WebSocket stream_chunk → fadeInUp + cursorBlink) - 后端对话缓存 (conversationCache sync.Map, GET /sessions/:id/messages) - 前端侧边栏历史多轮对话显示 - DevTools 性能监控图标移至首页仪表盘 - DevTools 用户记忆查询/删减功能修复 (补全 DELETE 数据链路) - 后端和 DevTools 按用户分类组织实时活动会话 (map[userID]map[sessionID]*Client) - 新增 docs/api-reference/ 路由参考文档 - 新增 docs/message-flow-architecture.md 消息链路架构文档
This commit is contained in:
@@ -69,6 +69,48 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== 流式渲染动画 ===== */
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(4px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cursorBlink {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0; }
|
||||
}
|
||||
|
||||
/* 流式消息容器:每个新 chunk 有微淡入效果 */
|
||||
.message-streaming {
|
||||
animation: fadeInUp 0.3s ease-out;
|
||||
}
|
||||
|
||||
/* 流式消息尾部闪烁光标 */
|
||||
.message-streaming::after {
|
||||
content: '▊';
|
||||
animation: cursorBlink 1s step-end infinite;
|
||||
color: #7c3aed;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
/* 独立的闪烁光标工具类,可用于显式 span 元素 */
|
||||
.animate-streaming-cursor {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.animate-streaming-cursor::after {
|
||||
content: '▊';
|
||||
animation: cursorBlink 1s step-end infinite;
|
||||
color: #7c3aed;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
/* 深色模式 */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
|
||||
Reference in New Issue
Block a user