feat(dc): Complete Tool C quick action buttons Phase 1-2 - 7 functions

Summary:
- Implement 7 quick action functions (filter, recode, binning, conditional, dropna, compute, pivot)
- Refactor to pre-written Python functions architecture (stable and secure)
- Add 7 Python operations modules with full type hints
- Add 7 frontend Dialog components with user-friendly UI
- Fix NaN serialization issues and auto type conversion
- Update all related documentation

Technical Details:
- Python: operations/ module (filter.py, recode.py, binning.py, conditional.py, dropna.py, compute.py, pivot.py)
- Backend: QuickActionService.ts with 7 execute methods
- Frontend: 7 Dialog components with complete validation
- Toolbar: Enable 7 quick action buttons

Status: Phase 1-2 completed, basic testing passed, ready for further testing
This commit is contained in:
2025-12-08 17:38:08 +08:00
parent af325348b8
commit f729699510
158 changed files with 13814 additions and 273 deletions

View File

@@ -8,6 +8,8 @@ import { FastifyInstance } from 'fastify';
import { testController } from '../controllers/TestController.js';
import { sessionController } from '../controllers/SessionController.js';
import { aiController } from '../controllers/AIController.js';
import { streamAIController } from '../controllers/StreamAIController.js';
import { quickActionController } from '../controllers/QuickActionController.js';
export async function toolCRoutes(fastify: FastifyInstance) {
// ==================== 测试路由Day 1 ====================
@@ -85,5 +87,29 @@ export async function toolCRoutes(fastify: FastifyInstance) {
fastify.get('/ai/history/:sessionId', {
handler: aiController.getHistory.bind(aiController),
});
// ✨ 流式AI处理新增
fastify.post('/ai/stream-process', {
handler: streamAIController.streamProcess.bind(streamAIController),
});
// ==================== 导出功能(新增) ====================
// 导出Excel文件
fastify.get('/sessions/:id/export', {
handler: sessionController.exportData.bind(sessionController),
});
// ==================== 快速操作(功能按钮) ====================
// 执行快速操作
fastify.post('/quick-action', {
handler: quickActionController.execute.bind(quickActionController),
});
// 预览操作结果
fastify.post('/quick-action/preview', {
handler: quickActionController.preview.bind(quickActionController),
});
}