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:
@@ -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),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user