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

@@ -3,27 +3,59 @@
* 基于 Ant Design X
*/
/* ========== ChatContainer ========== */
/* ========== ChatContainer(✅ 优化4.2:浅渐变背景)========== */
.chat-container {
display: flex;
flex-direction: column;
height: 100%;
background: #ffffff;
border-left: 1px solid #e2e8f0; /* 增强左侧边框 */
border-left: 1px solid #e2e8f0;
}
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 20px;
background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%); /* 渐变背景 */
padding: 24px; /* ✅ 优化增加内边距到24px */
background: linear-gradient(to bottom, #fafafa 0%, #f0f0f0 100%); /* ✅ 优化:渐变更明显 */
}
.chat-input {
border-top: 2px solid #e2e8f0; /* 增强顶部边框 */
border-top: 2px solid #e2e8f0;
padding: 16px;
background: #ffffff;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05); /* 添加阴影 */
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}
/* ========== 对话气泡样式(✅ 优化4.5:白卡片阴影+用户右对齐)========== */
/* AI助手消息白卡片带阴影 */
:global(.ant-bubble-message-role-assistant) {
background: #ffffff !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
border: 1px solid #e5e7eb !important;
border-radius: 12px !important;
padding: 16px !important;
max-width: 85%;
margin-left: 0;
margin-right: auto;
}
/* 用户消息Emerald绿色气泡右对齐 */
:global(.ant-bubble-message-role-user) {
background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
color: white !important;
box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2) !important;
border: none !important;
border-radius: 12px !important;
padding: 12px 16px !important;
max-width: 70%;
margin-left: auto !important;
margin-right: 0 !important;
text-align: left;
}
/* 用户消息文字颜色 */
:global(.ant-bubble-message-role-user *) {
color: white !important;
}
/* ========== MessageRenderer ========== */
@@ -45,14 +77,14 @@
color: #595959;
}
/* ========== CodeBlockRenderer ========== */
/* ========== CodeBlockRenderer(✅ 优化4.3-4.4:幽灵按钮+代码块阴影)========== */
.code-block-container {
margin-top: 12px;
border: 2px solid #10b981; /* 翠绿色边框 */
border: 1px solid #d1d5db; /* ✅ 优化4.4:边框变细 */
border-radius: 12px;
overflow: hidden;
background: #1e1e1e;
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15); /* 翠绿色阴影 */
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* ✅ 优化4.4:阴影柔和化 */
}
.code-block-header {
@@ -71,8 +103,20 @@
font-weight: 500;
}
/* ✅ 优化4.3:幽灵按钮样式 */
.execute-button {
font-size: 12px;
border: 1px solid rgba(16, 185, 129, 0.4) !important;
background: transparent !important;
color: #10b981 !important;
transition: all 0.2s ease;
}
.execute-button:hover {
border-color: #10b981 !important;
background: rgba(16, 185, 129, 0.1) !important;
color: #10b981 !important;
transform: translateY(-1px);
}
.code-block {
@@ -123,21 +167,22 @@
}
}
/* ========== 滚动条样式 ========== */
/* ========== 滚动条样式(✅ 优化:统一样式)========== */
.chat-messages::-webkit-scrollbar {
width: 6px;
width: 8px;
}
.chat-messages::-webkit-scrollbar-track {
background: #f0f0f0;
border-radius: 3px;
background: #f8fafc;
border-radius: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
background: #bfbfbf;
border-radius: 3px;
background: #cbd5e1;
border-radius: 4px;
border: 2px solid #f8fafc;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
background: #8c8c8c;
background: #94a3b8;
}

View File

@@ -10,3 +10,5 @@ export * from './Chat';
// 其他通用组件
export { default as Placeholder } from './Placeholder';