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:
+3
-2
@@ -96,7 +96,8 @@
|
||||
|
||||
- [x] 四角色 Dashboard · 平台只读 · ChatPanel · 游客试聊 · 行情 · 风控台账+筛选+适当性+AML+模拟交易 · 问数工作台+资产沉淀
|
||||
- [x] **问数结果标签**:`AnalystQueryPage` 展示 `template_hit` / `cache_hit`(2026-09-10)
|
||||
- [ ] **分析对话与问数合一** / **看板钻取** — 规格 D-09/D-12,往后排
|
||||
- [x] **问数 / 解读拆分(D-09 子集 · 2026-09-11)**:`interpret=false` 默认只出表 · `POST /api/analyst/interpret` · 问数页「分析该数据/解读我的数据」· spec `docs/superpowers/specs/2026-09-11-query-interpret-split-design.md`
|
||||
- [ ] **分析对话菜单下线或强引导**(问数页已承载解读)· **看板钻取** — D-12 往后排
|
||||
- [ ] **Vitest 补测**(可选):`useChatPanel` · `api/analyst.ts` mock
|
||||
|
||||
### 前端/API · 优化 TODO(2026-09-10 硬伤盘点 · 仅现有功能)
|
||||
@@ -112,7 +113,7 @@
|
||||
|
||||
**P1 · 产品语义 / 安全观感**
|
||||
|
||||
- [ ] **分析对话与问数合一**(或下线/强引导 `AnalystChatShell`,避免菜单双入口自相矛盾)— 与上方 D-09 同项
|
||||
- [ ] **分析对话菜单下线或强引导**(解读已并入问数页按钮)— 原 D-09 合一项剩余
|
||||
- [ ] **前端角色路由守卫**:`menus.tsx` 允许路径 ↔ URL 不一致时重定向(改 Hash 进别角色工作台仅 UX,后端仍 403)
|
||||
- [ ] **SSE 断流**:半条 assistant 的提示/重试或续发策略(四角色 `ChatPanel` stream)
|
||||
- [ ] **会话侧栏性能**:后端稳定后改为 `status=active` 分页即可,去掉全量扫页 + 双端 close 兜底
|
||||
|
||||
Reference in New Issue
Block a user