feat(analyst): Enhance dashboard metrics and customer service interactions

- Updated the `dashboard` function in `analyst.py` to include additional metrics for different user roles, improving data visibility for analysts, customers, advisors, and risk officers.
- Introduced a new `prepare_customer_stream` function in `customer_service.py` to facilitate streaming responses for customer interactions, enhancing the chat experience.
- Added new API endpoints in `analyst.ts` for fetching dashboard metrics and managing analyst assets, streamlining data handling and user interactions.
- Updated frontend components to support new dashboard features and asset management, ensuring a cohesive user experience across the application.

This update significantly improves the functionality and usability of the analyst and customer service features, providing users with enhanced tools for data analysis and interaction.
This commit is contained in:
2026-09-09 21:32:59 +08:00
parent af9fb719e5
commit 3ad244add0
24 changed files with 727 additions and 103 deletions
@@ -55,6 +55,7 @@ scripts/agent/migrate-customer-agent-cs-c11.sql
| --- | --- |
| `POST /api/chat/visitor` | `main.py` 挂载 `visitor_router` · 免登录试聊 |
| `POST /api/chat` + `X-Agent-Type: customer` | `chat.py` 分流 → `customer_service.run_customer_chat`(14 节点 LangGraph) |
| `POST /api/chat/stream` + `X-Agent-Type: customer` | `chat.py` 分流 → `prepare_customer_stream`(图跑完后分块 SSE) |
| 其余 Agent | 仍走 `agent_service.chat` |
**接缝文件:**