feat(visitor): Implement visitor chat functionality and enhance customer service interactions

- Added a new visitor chat API endpoint (`/api/chat/visitor`) to allow unauthenticated users to engage in conversations without requiring customer data.
- Introduced a visitor context dependency to manage visitor interactions seamlessly.
- Enhanced the chat API to support explicit session termination and improved response handling for customer service interactions.
- Updated the database configuration to include Redis client support for caching visitor data.
- Added a new customer note repository to persist user notes independently of the L1 profile slots.

This update significantly improves the customer service experience by enabling visitor interactions and ensuring efficient data handling for both registered and unregistered users.
This commit is contained in:
2026-09-09 18:32:00 +08:00
parent ad930c26b1
commit b841f68295
98 changed files with 10682 additions and 630 deletions
+2
View File
@@ -20,3 +20,5 @@
| 2026-09-09 | chat 同步/流式落库免责声明口径统一(`_assistant_content_for_persist`) | 评审:sync/stream 落盘一致性 | chat.py / test_chat |
| 2026-09-08 | P1 环境收口(续):补建 `risk_aml_list` + AML 种子 · `fix_utf8_seed.py` 修复 Windows 中文乱码 · 集成测试 11 例恢复 · **530 passed 0 skipped** | 真库集成 skip/失败 | MEMORY / ENVIRONMENT / FLOW / bootstrap 脚本 |
| 2026-09-09 | **四角色收益/洞察 Dashboard 需求 v2**(锚点修正·四角色 Demo 数·风控 Empty·Hook/联调) | 用户再完善需求 | wealth-dashboard spec v2 / frontend-p0 §2.5 / TODO |
| 2026-09-09 | **客服 Agent 代码合并**(`customer-service-agent` 只增不盖) | 用户要求合并上传内容 | `客服Agent-合并说明.md` · Wave1~5 新增文件 · CS-C-11 迁移 SQL · wave 测试暂 ignore |
| 2026-09-09 | **L3 Redis cache-aside 读路径补齐** + 风控/演示测试数据 TODO 拆项 | 画像 Redis 只做写侧 DEL · 测未接接口缺种子 | profile_l3 / redis_gateway / TODO |