|
|
db992be02a
|
refactor: 架构演进任务 1.2 + 2 + 3 完成
任务 1.2: Blueprint 迁移到 Repository
- alerts.py: get_alerts 和 resolve_alert 改用 alert_repo
- workorders.py: get_workorders 改用 workorder_repo.list_workorders
- 去掉了 blueprint 中的直接 session.query 调用
任务 2: 统一 LLM 客户端
- LLMClient 新增 async_generate/async_chat 异步方法(线程池包装)
- agent_assistant.py 改用统一的 LLMClient(不再依赖 agent/llm_client.py 的 LLMManager)
- 所有 LLM 调用统一走 src/core/llm_client.py
任务 3: MessagePipeline
- 创建 src/dialogue/message_pipeline.py
- 统一消息处理流程:租户解析 会话管理 消息处理
- handle_message 一步到位方法,各入口只需传 user_id + message
- service_manager.get_pipeline() 注册
|
2026-04-08 08:35:31 +08:00 |
|
|
|
24a5fad630
|
docs: 更新架构演进任务状态 1.1/1.3/10 已完成
|
2026-04-08 08:27:59 +08:00 |
|
|
|
e0316af12e
|
refactor: 架构演进 Repository 层 + 旧代码清理
任务 1.1: 引入 Repository 层
- BaseRepository 基类:自动 tenant_id 过滤、CRUD、分页、批量删除
- WorkOrderRepository: 工单列表(状态/优先级过滤)、飞书记录查找
- AlertRepository: 预警列表(级别/活跃过滤)、解决预警
- ChatSessionRepository: 会话列表(状态/搜索过滤)
- ConversationRepository: 按 session_id 查对话
- KnowledgeRepository: 知识库列表(分类/验证过滤)
任务 10: 清理旧代码
- 删除 src/web/static/js/core/ 目录(5个文件)
- 删除 src/web/static/js/services/ 目录
- 删除 src/web/static/js/components/ 目录
- 删除 src/web/static/js/pages/ 目录(12个文件)
- 修复 index.html/chat.html/chat_http.html 中对已删除 JS 的引用
|
2026-04-08 08:25:12 +08:00 |
|
|
|
7503355512
|
docs: 架构演进任务清单 10 个结构性改进任务
|
2026-04-07 17:10:02 +08:00 |
|