QihuAI Design
3788a93425
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).
2026-07-24 16:28:19 +08:00
..
2026-07-24 16:28:19 +08:00
2026-07-24 16:28:19 +08:00
2026-07-19 08:51:28 +08:00
2026-07-02 14:40:46 +08:00
2026-07-20 19:02:40 +08:00
2026-07-19 20:17:49 +08:00
2026-07-21 19:27:27 +08:00
2026-07-02 14:40:46 +08:00
2026-07-23 09:16:31 +08:00
2026-07-11 11:40:39 +08:00
2026-07-21 18:29:51 +08:00
2026-07-20 19:02:40 +08:00
2026-07-02 14:40:46 +08:00
2026-07-14 20:56:53 +08:00
2026-07-02 14:40:46 +08:00
2026-07-21 19:27:27 +08:00
2026-07-24 12:18:52 +08:00
2026-07-02 14:40:46 +08:00
2026-07-02 14:40:46 +08:00
2026-07-22 12:42:43 +08:00
2026-07-24 12:18:52 +08:00
2026-07-11 16:32:45 +08:00
2026-07-02 14:40:46 +08:00
2026-07-23 22:16:25 +08:00
2026-07-14 18:49:27 +08:00
2026-07-21 12:56:57 +08:00