feat(analyst): Introduce interpret functionality and enhance chat API

- Added `interpret` flag to `AnalystChatRequest` for optional immediate interpretation of queries.
- Implemented new `POST /api/analyst/interpret` endpoint for on-demand data interpretation based on the latest query snapshot.
- Updated `AnalystAgent` to handle interpretation logic, including error handling and response formatting.
- Enhanced `AnalystQueryPage` to include a button for triggering interpretations, improving user interaction.
- Updated frontend API calls to support the new interpret functionality, ensuring seamless integration with existing workflows.

This update significantly enhances the analytical capabilities of the application, allowing users to request interpretations of their queries directly.
This commit is contained in:
2026-09-11 12:15:18 +08:00
parent 0e35eb84ba
commit aea97a243c
15 changed files with 715 additions and 42 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
| ID | 需求 | 验收对照 | 状态 | TODO |
| --- | --- | --- | --- | --- |
| D-01~D-04 | 分析:客户/产品/预警查数 + SQL 留痕 | analytics_query_log | **已实现(S3 · 2026-09-09)**:`POST /api/analyst/chat` + sql_guard/guardrail · customer self 域 · 尾注 · Wave6 测试 | ~~T-10~~ |
| D-01~D-04 | 分析:客户/产品/预警查数 + SQL 留痕 | analytics_query_log | **已实现(S3+D-09 子集 · 2026-09-11)**:问数默认 `interpret=false`(仅表/SQL)· **`POST /api/analyst/interpret` 按需解读(看图说话)** · sql_guard/guardrail · self 域尾注 | ~~T-10~~ |
| A-01~A-05 | 代理人:画像/规则/草稿/流程/合规巡检 | 非归属 403;草稿不外发 | 未做 | T-20 |
## Wave 2 · 风控 P0