初始化模版工程
This commit is contained in:
61
components/nova-sdk/tools/REPLACE_SUMMARY.md
Normal file
61
components/nova-sdk/tools/REPLACE_SUMMARY.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Nova SDK Tools - 组件替换总结
|
||||
|
||||
## ✅ 已完成工作
|
||||
|
||||
### 1. 清理和简化
|
||||
- ✅ 删除了所有 API 相关组件(api-form, form-components)
|
||||
- ✅ 删除了列表查看功能(custom-list-view, tool-item, tool-type-badge)
|
||||
- ✅ 删除了示例功能(useExampleList, example-popover)
|
||||
- ✅ 删除了所有 localize 相关代码
|
||||
|
||||
### 2. 只保留 SKILL 和 MCP 组件
|
||||
**剩余文件(6个):**
|
||||
```
|
||||
tools/
|
||||
├── components/
|
||||
│ ├── skill-form.tsx ✅ 已替换为 shadcn + lucide-react
|
||||
│ ├── mcp-json-editor.tsx ✅ 已替换为 shadcn + lucide-react
|
||||
│ └── message-mcp.tsx 🔄 待替换
|
||||
├── settings/
|
||||
│ ├── mcp-editor-modal.tsx 🔄 待替换
|
||||
│ ├── ai-parse-config.tsx 🔄 待替换
|
||||
│ └── mcp-store-popover.tsx 🔄 待替换
|
||||
└── index.ts
|
||||
```
|
||||
|
||||
### 3. UI 框架替换进度
|
||||
|
||||
**已完成(2/6):**
|
||||
- ✅ skill-form.tsx - Button, Input, Textarea, Label, toast (shadcn) + Inbox (lucide-react)
|
||||
- ✅ mcp-json-editor.tsx - Button, Textarea, toast (shadcn)
|
||||
|
||||
**待完成(4/6):**
|
||||
- 🔄 message-mcp.tsx - 需替换 Spin, Button
|
||||
- 🔄 mcp-editor-modal.tsx - 需替换 Button, Form, Input, message, Select, Tooltip
|
||||
- 🔄 ai-parse-config.tsx - 需替换 Button, Form, Input, message, Popover, Tooltip
|
||||
- 🔄 mcp-store-popover.tsx - 需替换 Popover, Tooltip
|
||||
|
||||
## 📋 替换方案
|
||||
|
||||
### antd → shadcn/ui 映射表
|
||||
| antd | shadcn/ui |
|
||||
|------|-----------|
|
||||
| Button | Button |
|
||||
| Input | Input |
|
||||
| Input.TextArea | Textarea |
|
||||
| Form | Label + Input/Textarea + 自定义验证 |
|
||||
| Select | Select |
|
||||
| message | toast (from @/hooks/use-toast) |
|
||||
| Popover | Popover |
|
||||
| Tooltip | Tooltip |
|
||||
| Spin | Loader2 (from lucide-react) |
|
||||
| Upload | 自定义文件上传 |
|
||||
|
||||
### @ant-design/icons → lucide-react 映射表
|
||||
| antd icons | lucide-react |
|
||||
|------------|--------------|
|
||||
| InboxOutlined | Inbox |
|
||||
| 其他图标 | 相应的 lucide-react 图标 |
|
||||
|
||||
## 🎯 下一步
|
||||
继续替换剩余 4 个文件中的 antd 组件为 shadcn/ui
|
||||
Reference in New Issue
Block a user