agent-Specialization/server
JOJO aeb782d479 refactor: 清理WebSocket遗留代码,标记为废弃
Phase 2 WebSocket代码清理:

前端 (useLegacySocket.ts):
1. 添加文件头注释说明架构变更
   - 聊天流式事件已废弃,改用 REST API 轮询
   - 保留系统事件、配额事件、对话事件、子智能体事件
   - 标记待清理的流式处理代码

2. 简化 ai_message_start 事件处理器
   - 只保留子智能体模式的处理
   - 删除复杂的流式状态管理逻辑

3. 保留备份文件 useLegacySocket.ts.backup
   - 用于紧急回退

后端 (socket_handlers.py):
1. 标记 handle_message 为废弃
   - 添加废弃警告和迁移指南
   - 返回错误提示引导用户使用 REST API
   - 保留原代码用于紧急回退(注释掉)

2. 说明新架构优势
   - 支持分布式部署
   - 更好的错误恢复
   - 减少 WebSocket 连接压力

注意:
- 未删除大量流式处理代码,只添加注释标记
- 保留向后兼容性,避免破坏现有功能
- 后续可逐步清理标记为废弃的代码

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 01:15:31 +08:00
..
__init__.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
admin.py fix: refine host mode controls and kimi-k2.5 support 2026-01-28 11:19:50 +08:00
api_auth.py feat: add api admin ui and container status fix 2026-01-25 10:49:52 +08:00
api_v1.py feat: update model support and multimodal 2026-02-25 01:41:05 +08:00
app_legacy.py fix: remove legacy file edit tags 2026-03-17 22:43:51 +08:00
app.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
auth_helpers.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
auth.py fix: refine host mode controls and kimi-k2.5 support 2026-01-28 11:19:50 +08:00
chat_flow_helpers.py fix: remove legacy file edit tags 2026-03-17 22:43:51 +08:00
chat_flow_runner_helpers.py refactor: split terminal and server chat flow modules 2026-03-07 18:38:30 +08:00
chat_flow_runner.py refactor: further split runner and tools mixins 2026-03-07 20:25:58 +08:00
chat_flow_runtime.py refactor: further split runner and tools mixins 2026-03-07 20:25:58 +08:00
chat_flow_stream_loop.py fix(stream): prevent tool-call argument leakage into text chunks 2026-04-03 16:09:29 +08:00
chat_flow_task_main.py fix: remove legacy file edit tags 2026-03-17 22:43:51 +08:00
chat_flow_task_runner.py refactor: isolate chat task main pipeline module 2026-03-07 20:32:02 +08:00
chat_flow_task_support.py fix: enrich sub-agent results 2026-03-11 18:05:01 +08:00
chat_flow_tool_loop.py fix: improve sub-agent ui and state 2026-03-11 15:40:28 +08:00
chat_flow.py refactor: split terminal and server chat flow modules 2026-03-07 18:38:30 +08:00
chat.py feat: add skills framework and controls 2026-02-07 00:20:35 +08:00
context.py feat: update model support and multimodal 2026-02-25 01:41:05 +08:00
conversation_stats.py refactor: split terminal and server chat flow modules 2026-03-07 18:38:30 +08:00
conversation.py feat(web): remove socket dependency from main chat flow 2026-04-03 11:34:42 +08:00
extensions.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
files.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
monitor.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
security.py feat: add api v1 bearer auth and polling docs 2026-01-24 02:35:07 +08:00
socket_handlers.py refactor: 清理WebSocket遗留代码,标记为废弃 2026-04-04 01:15:31 +08:00
state.py fix: remove legacy file edit tags 2026-03-17 22:43:51 +08:00
status.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
tasks.py feat: 优化轮询机制(重试、清理、错误提示) 2026-04-04 01:04:35 +08:00
usage.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
utils_common.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00