settings.local.json
9.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
"permissions": {
"allow": [
"Bash(tree:*)",
"Bash(xargs awk:*)",
"Bash(find:*)",
"Bash(grep:*)",
"Bash(git diff:*)",
"mcp__web-search-prime__webSearchPrime",
"mcp__web-reader__webReader",
"Bash(ls:*)",
"Bash(for:*)",
"Bash(do if [ -f \"$dirskill.md\" ])",
"Bash(fi:*)",
"Bash(done:*)",
"Bash(if:*)",
"Bash(then echo \"找到项目本地技能:\")",
"Bash(else echo \"当前项目没有本地技能目录\")",
"Bash(command:*)",
"Bash(then mv \"$dirskill.md\" \"$dirSKILL.md\")",
"Bash(do if [ -f \"$dirSKILL.md\" ])",
"Bash(then rmdir ~/.config/claude-code/skills)",
"Bash(else echo \"目录不为空或不存在,跳过删除\")",
"Bash(chmod:*)",
"Bash(scripts/upload-to-qiniu.sh:*)",
"Bash(curl:*)",
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(git push)",
"Bash(git restore:*)",
"Bash(pnpm add:*)",
"Bash(pnpm lint:check:*)",
"Bash(pnpm format:check:*)",
"Bash(pnpm list:*)",
"Bash(npx husky init:*)",
"Bash(npx lint-staged:*)",
"Bash(__NEW_LINE_9f2146480c6bc5cf__ echo \"✅ Husky + lint-staged 配置完成!\" echo \"\" echo \"📁 配置文件:\" echo \" - .husky/pre-commit\" echo \" - package.json \\(lint-staged 配置\\)\" echo \"\" echo \"🔧 已配置的 Git Hooks:\" ls -la .husky/)",
"Bash(__NEW_LINE_d9f17a4e47d5be4b__ echo \"╔════════════════════════════════════════════════════════════╗\" echo \"║ ✅ Husky + lint-staged 配置完成! ║\" echo \"╚════════════════════════════════════════════════════════════╝\" echo \"\" echo \"📁 配置文件:\" echo \" • .husky/pre-commit - Git pre-commit hook\" echo \" • package.json - lint-staged 配置\" echo \" • docs/HUSKY_LINT_STAGED.md - 使用文档\" echo \"\" echo \"📦 已安装的包:\" pnpm list husky lint-staged --depth 0)",
"Bash(npx playwright install:*)",
"Bash(git push:*)",
"Bash(pnpm test:e2e:*)",
"mcp__zai-mcp-server__ui_to_artifact",
"mcp__zai-mcp-server__extract_text_from_screenshot",
"mcp__zai-mcp-server__analyze_image",
"Bash(git mv:*)",
"Bash(yarn api:generate:*)",
"Bash(./test-mcp.sh:*)",
"Bash(npx:*)",
"Bash(APIFOX_ACCESS_TOKEN=\"APS-t3Lm53YUvYMwNWEqb5Y5nnrRSlDz04Mc\" npx -y apifox-mcp-server@latest --project-id=6084040:*)",
"Bash(git checkout:*)",
"Bash(python3:*)",
"Bash(./test-mcp-connection.sh:*)",
"Bash(timeout:*)",
"Bash(pnpm lint:*)",
"Bash(pnpm dev:weapp:*)",
"Bash(tee:*)",
"Bash(node:*)",
"Bash(~/.claude/bin/check-changelog.sh:*)",
"Bash(pnpm api:generate:*)",
"Bash(do if [ -d \"/Users/huyirui/program/itomix/git/manulife-weapp/docs/$dir\" ])",
"Bash(then echo \"=== $dir/ ===\" ls -1 /Users/huyirui/program/itomix/git/manulife-weapp/docs/$dir/*.md)",
"Bash(bash:*)",
"Bash(~/.bun/bin/bun --version)",
"Bash(npm run dev:weapp:*)",
"Bash(__NEW_LINE_19c6a134b9496225__ echo \"✅ 已删除不再使用的 Apifox 相关脚本\")",
"Bash(cat:*)",
"Bash(pkill:*)",
"Bash(then echo \" ❌ 仍然存在\")",
"Bash(else echo \" ✅ 已成功删除\")",
"Bash(__NEW_LINE_91a02bd62c4bd02a__ echo \"2. qrCodeSearch.vue\")",
"Bash(__NEW_LINE_91a02bd62c4bd02a__ echo \"3. time-picker-data 目录\")",
"Bash(__NEW_LINE_91a02bd62c4bd02a__ echo \"4. PosterBuilder 目录\")",
"Bash(__NEW_LINE_91a02bd62c4bd02a__ echo \"5. PlanSchemes 目录\")",
"Bash(__NEW_LINE_91a02bd62c4bd02a__ echo \"6. 根目录 SavingsTemplate.vue\")",
"Bash(__NEW_LINE_91a02bd62c4bd02a__ echo \"7. PlanFields/AmountInput.vue\")",
"Bash(__NEW_LINE_91a02bd62c4bd02a__ echo \"\")",
"Bash(/tmp/update-imports.py << 'EOF'\n#!/usr/bin/env python3\nimport os\nimport re\n\n# 定义路径映射\npath_mappings = {\n '@/components/TabBar': '@/components/navigation/TabBar',\n '@/components/NavHeader': '@/components/navigation/NavHeader',\n '@/components/IconFont': '@/components/icons/IconFont',\n '@/components/MaterialCard': '@/components/cards/MaterialCard',\n '@/components/ProductCard': '@/components/cards/ProductCard',\n '@/components/FilterTabs': '@/components/forms/FilterTabs',\n '@/components/SearchBar': '@/components/forms/SearchBar',\n '@/components/SectionCard': '@/components/list/SectionCard',\n '@/components/SectionItem': '@/components/list/SectionItem',\n '@/components/OfficeViewer': '@/components/documents/OfficeViewer',\n '@/components/PdfPreview': '@/components/documents/PdfPreview',\n '@/components/DocumentPreview': '@/components/documents/DocumentPreview',\n '@/components/PlanFormContainer': '@/components/plan/PlanFormContainer',\n '@/components/PlanPopupNew': '@/components/plan/PlanPopupNew',\n '@/components/ListItemActions': '@/components/list/ListItemActions',\n '@/components/LoadMoreList': '@/components/list/LoadMoreList',\n}\n\ndef update_file\\(filepath\\):\n \"\"\"更新单个文件的导入路径\"\"\"\n try:\n with open\\(filepath, 'r', encoding='utf-8'\\) as f:\n content = f.read\\(\\)\n \n original_content = content\n \n # 替换所有路径映射\n for old_path, new_path in path_mappings.items\\(\\):\n # 替换 import 语句\n content = re.sub\\(\n r\"from ['\\\\\"]\" + re.escape\\(old_path\\) + r\"['\\\\\"]\",\n f\"from '{new_path}'\",\n content\n \\)\n # 替换 import 语句(带 .vue 后缀)\n content = re.sub\\(\n r\"from ['\\\\\"]\" + re.escape\\(old_path\\) + r\"\\\\.vue['\\\\\"]\",\n f\"from '{new_path}.vue'\",\n content\n \\)\n \n # 如果内容有变化,写回文件\n if content != original_content:\n with open\\(filepath, 'w', encoding='utf-8'\\) as f:\n f.write\\(content\\)\n return True\n return False\n except Exception as e:\n print\\(f\"Error processing {filepath}: {e}\"\\)\n return False\n\ndef main\\(\\):\n src_dir = '/Users/huyirui/program/itomix/git/manulife-weapp/src'\n updated_count = 0\n \n # 遍历所有 .vue 和 .js 文件\n for root, dirs, files in os.walk\\(src_dir\\):\n for file in files:\n if file.endswith\\(\\('.vue', '.js'\\)\\):\n filepath = os.path.join\\(root, file\\)\n if update_file\\(filepath\\):\n updated_count += 1\n print\\(f\"✅ Updated: {filepath}\"\\)\n \n print\\(f\"\\\\n总计更新了 {updated_count} 个文件\"\\)\n\nif __name__ == '__main__':\n main\\(\\)\nEOF)",
"Bash(__NEW_LINE_b32968d45b3e16a9__ python3 /tmp/update-imports.py)",
"Bash(/Users/huyirui/program/itomix/git/manulife-weapp/docs/reports/2026-02-09/components-cleanup-report.md <<'EOF'\n\n---\n\n## ✅ 执行结果(2026-02-09)\n\n### 已完成的清理和重组\n\n#### 阶段 1: 清理未使用组件 ✅\n- ✅ 删除 `qrCode.vue` \\(11KB\\)\n- ✅ 删除 `FilterTabs.example.vue`\n- ✅ 删除 `PlanPopup/` 目录(旧版本)\n\n#### 阶段 2: 组件目录重组 ✅\n\n**创建的分类目录**:\n1. `navigation/` - 导航组件\n2. `list/` - 列表组件\n3. `forms/` - 表单组件\n4. `cards/` - 卡片组件\n5. `documents/` - 文档相关组件\n6. `plan/` - 计划书相关组件\n7. `icons/` - 图标组件\n\n**组件迁移清单**:\n```\nnavigation/\n├── TabBar.vue\n└── NavHeader.vue\n\nlist/\n├── ListItemActions/\n├── LoadMoreList/\n├── SectionCard.vue\n└── SectionItem.vue\n\nforms/\n├── FilterTabs.vue\n└── SearchBar.vue\n\ncards/\n├── MaterialCard.vue\n└── ProductCard.vue\n\ndocuments/\n├── DocumentPreview/\n├── OfficeViewer.vue\n└── PdfPreview.vue\n\nplan/\n├── PlanFields/\n├── PlanFormContainer.vue\n├── PlanPopupNew.vue\n└── PlanTemplates/\n\nicons/\n└── IconFont.vue\n```\n\n**路径更新统计**:\n- 更新文件数:38 个\n- 更新类型:import 语句\n- 更新范围:src/pages/, src/components/\n- 验证结果:✅ 通过(0 errors, 30 warnings)\n\n### 📊 最终收益\n\n**代码质量**:\n- ✅ 删除 3 个未使用组件(约 11KB)\n- ✅ 组件按功能分类,结构清晰\n- ✅ 所有引用路径已更新\n- ✅ 代码检查通过(0 errors)\n\n**可维护性**:\n- ✅ 组件查找更快速\n- ✅ 功能边界更明确\n- ✅ 为未来组件扩展预留空间\n- ✅ 符合项目架构原则\n\n**文档更新**:\n- ✅ CHANGELOG.md 已更新\n- ✅ 本报告已创建\n\n---\n\n**执行时间**: 2026-02-09\n**执行状态**: ✅ 完成\n**下一步**: 可以继续优化组件内部实现,或清理其他未使用代码\nEOF)",
"Bash(tail:*)",
"Bash(pnpm build:weapp:*)"
]
},
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": [
"chrome-devtools"
]
}