chore(align): sync Git with running container as authoritative source
Phase 0 SSE 流式聊天 landed in the running container and captured in Git so
the three sources (container := image := Git) agree.
Phase 0 — SSE 流式聊天(Web 端,IM bot 路径保持不变、共用引擎):
- app/api/chat.py: 新增独立 SSE 端点
POST /app/api/chat/conversations/{conv_id}/messages/stream
基于 asyncio.Queue + create_task 将 _send_message_core 桥接为
text/event-stream 生成器,吐出 delta / reasoning / done / error 事件
- app/api/chat_service.py: _send_message_core 增加 stream + on_event 参数;
普通(无工具)聊天 round-0 主调用走 achat_complete(stream=True) 流式;
done 事件携带 message_id / content / process_steps / used_skills /
used_mcp / generating
- app/core/llm_client.py: 修复 _create_kwargs 硬编码 stream=False 的根因 bug
(流式调用传 stream=True 导致 TypeError: multiple values for keyword),
现 _create_kwargs(request_body, stream=True) 字段随参数变化
- frontend/src/pages/front/ChatPage.tsx + ChatPage.css + types/index.ts:
发消息改为 fetch SSE 消费,实时增量渲染 AI 回复文本与思考链(reasoning),
done 事件用 message_id 定稿并渲染过程步骤;网络/流式失败自动回退非流式
Alignment performed 2026-07-24 16:28:19. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
This commit is contained in:
1 parent
e8a1791c9f
commit
3788a93425
6 files changed
+11764
-5862
No files matched your search
@@ -1759,3 +1759,23 @@ html.dark .ai-sending-timeout {
|
||||
.ai-cancel-btn:hover {
|
||||
background: color-mix(in srgb, #e74c3c 15%, var(--color-bg-tertiary)) !important;
|
||||
}
|
||||
|
||||
/* ===== Phase 0 SSE 流式:思考链实时渲染 ===== */
|
||||
/* 思考链文本保留模型原始换行(deepseek 原生 reasoning 含多段换行) */
|
||||
.ai-process-thinking .ai-process-text {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
/* 流式生成中提示 */
|
||||
.streaming-hint {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--color-text-secondary);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.streaming-hint svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
Reference in new issue
Block a user