feat(ai): Day 7 — 会话持久化 Entity + Service

- 新增 3 个 SeaORM Entity: ai_chat_session / ai_chat_message / ai_tool_call_log
- ChatSessionService: create / list / get / close / rename
- ChatMessageService: save_message / list_messages / save_tool_call_log
- 参数封装为 SaveMessageParams / SaveToolCallLogParams 避免 clippy too_many_arguments
- AiState 注册 chat_session + chat_message 服务
- erp-server main.rs 初始化注入
This commit is contained in:
iven
2026-05-19 11:33:37 +08:00
parent b03ea47fed
commit de342f9195
9 changed files with 336 additions and 0 deletions

View File

@@ -2,6 +2,8 @@ pub mod analysis;
pub mod analysis_queue;
pub mod auto_analysis;
pub mod cache;
pub mod chat_message;
pub mod chat_session;
pub mod comparison;
pub mod cost;
pub mod dialysis_risk_scorer;