@templmf/temp-solf-lmf 0.0.55 → 0.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/fe-flow.md +348 -0
  2. package/package.json +1 -1
  3. package/ui-parse.md +308 -0
  4. package//345/242/236/351/207/217/351/234/200/346/261/202prompt +72 -0
  5. package/guanwang/README.md +0 -95
  6. package/guanwang/docs/changelog.md +0 -145
  7. package/guanwang/docs/doc-maintenance.md +0 -229
  8. package/guanwang/docs/product.md +0 -181
  9. package/guanwang/docs/test-cases.md +0 -395
  10. package/guanwang/docs/usage.md +0 -291
  11. package/guanwang/env.example +0 -27
  12. package/guanwang/index.html +0 -13
  13. package/guanwang/package-lock.json +0 -3825
  14. package/guanwang/package.json +0 -32
  15. package/guanwang/public/favicon.svg +0 -4
  16. package/guanwang/public/react-runtime/babel.min.js +0 -4
  17. package/guanwang/public/react-runtime/react-dom.min.js +0 -267
  18. package/guanwang/public/react-runtime/react.min.js +0 -31
  19. package/guanwang/public/vue-repl-assets/compiler-sfc.esm-browser.js +0 -50795
  20. package/guanwang/public/vue-repl-assets/runtime-dom.esm-browser.js +0 -12758
  21. package/guanwang/public/vue-repl-assets/server-renderer.esm-browser.js +0 -8600
  22. package/guanwang/public/vue-repl-assets/vue.esm-browser.js +0 -18672
  23. package/guanwang/src/App.vue +0 -61
  24. package/guanwang/src/chat-sdk/core/components/ChatBox.vue +0 -305
  25. package/guanwang/src/chat-sdk/core/components/ChatSidebar.vue +0 -84
  26. package/guanwang/src/chat-sdk/core/components/InputBar.vue +0 -354
  27. package/guanwang/src/chat-sdk/core/components/MessageBubble.vue +0 -703
  28. package/guanwang/src/chat-sdk/core/useTheme.js +0 -31
  29. package/guanwang/src/chat-sdk/features/artifact/ArtifactCard.vue +0 -172
  30. package/guanwang/src/chat-sdk/features/artifact/ArtifactPanel.vue +0 -963
  31. package/guanwang/src/chat-sdk/features/artifact/index.js +0 -13
  32. package/guanwang/src/chat-sdk/features/artifact/useArtifactStore.js +0 -275
  33. package/guanwang/src/chat-sdk/features/codepreview/CodePreview.vue +0 -523
  34. package/guanwang/src/chat-sdk/features/codepreview/index.js +0 -7
  35. package/guanwang/src/chat-sdk/features/markdown/index.js +0 -13
  36. package/guanwang/src/chat-sdk/features/markdown/useMarkdown.js +0 -724
  37. package/guanwang/src/chat-sdk/features/mermaid/MermaidZoom.vue +0 -254
  38. package/guanwang/src/chat-sdk/features/upload/FileAttachment.vue +0 -142
  39. package/guanwang/src/chat-sdk/features/upload/index.js +0 -17
  40. package/guanwang/src/chat-sdk/features/upload/useFileHandler.js +0 -336
  41. package/guanwang/src/chat-sdk/headless/api/adapters/openai.js +0 -76
  42. package/guanwang/src/chat-sdk/headless/api/chatApi.js +0 -126
  43. package/guanwang/src/chat-sdk/headless/buildSystemPrompt.js +0 -351
  44. package/guanwang/src/chat-sdk/headless/index.js +0 -15
  45. package/guanwang/src/chat-sdk/headless/useChat.js +0 -77
  46. package/guanwang/src/chat-sdk/headless/useChatDB.js +0 -147
  47. package/guanwang/src/chat-sdk/headless/useChatStore.js +0 -529
  48. package/guanwang/src/chat-sdk/index.js +0 -79
  49. package/guanwang/src/chat-sdk/modes/architect.js +0 -27
  50. package/guanwang/src/chat-sdk/modes/ask.js +0 -26
  51. package/guanwang/src/chat-sdk/modes/code.js +0 -25
  52. package/guanwang/src/chat-sdk/modes/index.js +0 -36
  53. package/guanwang/src/chat-sdk/modes/requirements.js +0 -175
  54. package/guanwang/src/chat-sdk/settings/SettingsPanel.vue +0 -170
  55. package/guanwang/src/chat-sdk/settings/index.js +0 -9
  56. package/guanwang/src/chat-sdk/settings/useSettings.js +0 -122
  57. package/guanwang/src/chat-sdk/tools/defaults.js +0 -89
  58. package/guanwang/src/chat-sdk/tools/index.js +0 -16
  59. package/guanwang/src/chat-sdk/tools/parser.js +0 -116
  60. package/guanwang/src/components/CustomCursor.vue +0 -69
  61. package/guanwang/src/components/Footer.vue +0 -24
  62. package/guanwang/src/components/LoginModal.vue +0 -109
  63. package/guanwang/src/components/Navbar.vue +0 -193
  64. package/guanwang/src/components/ThemeToggle.vue +0 -25
  65. package/guanwang/src/composables/useArtifactStore.js +0 -253
  66. package/guanwang/src/composables/useAuth.js +0 -88
  67. package/guanwang/src/composables/useChatDB.js +0 -147
  68. package/guanwang/src/composables/useCountUp.js +0 -24
  69. package/guanwang/src/composables/useFileHandler.js +0 -345
  70. package/guanwang/src/composables/useTheme.js +0 -31
  71. package/guanwang/src/config/api.js +0 -71
  72. package/guanwang/src/main.js +0 -23
  73. package/guanwang/src/router/index.js +0 -23
  74. package/guanwang/src/services/authApi.js +0 -27
  75. package/guanwang/src/services/chatApi.js +0 -66
  76. package/guanwang/src/styles/global.css +0 -478
  77. package/guanwang/src/tracker/analyze.js +0 -73
  78. package/guanwang/src/tracker/config.js +0 -82
  79. package/guanwang/src/tracker/index.js +0 -18
  80. package/guanwang/src/tracker/service.js +0 -102
  81. package/guanwang/src/tracker/useChatTracker.js +0 -179
  82. package/guanwang/src/tracker/useTracker.js +0 -45
  83. package/guanwang/src/views/ChatView.vue +0 -65
  84. package/guanwang/src/views/HomeView.vue +0 -156
  85. package/guanwang/src/views/MarketView.vue +0 -143
  86. package/guanwang/src/views/PracticesView.vue +0 -190
  87. package/guanwang/src/views/SkillsView.vue +0 -129
  88. package/guanwang/temp +0 -19
  89. package/guanwang/vite.config.js +0 -6
@@ -1,143 +0,0 @@
1
- <template>
2
- <div class="dot-grid" style="min-height: 100vh; position: relative;">
3
- <div class="glow-orb" style="width: 288px; height: 288px; background: rgba(26,111,196,0.15); top: 40px; right: 40px;" />
4
- <div style="max-width: 1280px; margin: 0 auto; padding: 48px 24px;">
5
-
6
- <div style="margin-bottom: 36px;">
7
- <span class="tag" style="margin-bottom: 10px; display: inline-block;">组件市场</span>
8
- <h1 class="section-title" style="margin-bottom: 10px;">官方组件市场</h1>
9
- <p style="color: var(--text-secondary); font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;">经过验证的脚手架模板、UI 组件库与 CLI 工具,开箱即用</p>
10
- </div>
11
-
12
- <!-- Filters -->
13
- <div style="display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; align-items: center;">
14
- <el-input
15
- v-model="search"
16
- placeholder="搜索组件..."
17
- style="flex: 1; min-width: 200px; max-width: 380px;"
18
- clearable
19
- >
20
- <template #prefix><Search :size="14" style="color: var(--text-muted);" /></template>
21
- </el-input>
22
-
23
- <el-select v-model="sort" style="width: 140px;">
24
- <el-option label="最多下载" value="downloads" />
25
- <el-option label="最高评分" value="rating" />
26
- <el-option label="最新发布" value="newest" />
27
- </el-select>
28
-
29
- <div style="display: flex; gap: 6px; flex-wrap: wrap;">
30
- <el-button
31
- v-for="fw in FRAMEWORKS"
32
- :key="fw"
33
- :type="activeFw === fw ? 'primary' : 'default'"
34
- size="small"
35
- round
36
- class="font-mono"
37
- @click="activeFw = activeFw === fw ? '' : fw"
38
- >{{ fw }}</el-button>
39
- </div>
40
- </div>
41
-
42
- <!-- Tabs -->
43
- <el-tabs v-model="activeTab" style="margin-bottom: 20px;">
44
- <el-tab-pane
45
- v-for="tab in TABS"
46
- :key="tab.value"
47
- :name="tab.value"
48
- >
49
- <template #label>
50
- {{ tab.label }}&nbsp;<span class="font-mono" style="font-size: 11px; opacity: 0.6;">{{ tab.count }}</span>
51
- </template>
52
- </el-tab-pane>
53
- </el-tabs>
54
-
55
- <!-- Grid -->
56
- <div v-if="filtered.length > 0" style="display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;">
57
- <div v-for="pkg in filtered" :key="pkg.name" class="card">
58
- <div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px;">
59
- <div>
60
- <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 6px;">
61
- <div style="width: 32px; height: 32px; border-radius: 8px; background: var(--tag-bg); border: 1px solid var(--tag-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0;">
62
- <component :is="pkg.Icon" :size="16" color="var(--brand-400)" :stroke-width="1.75" />
63
- </div>
64
- <h3 class="font-display" style="font-weight: 600; color: var(--text-primary); font-size: 14px;">{{ pkg.name }}</h3>
65
- </div>
66
- <div style="display: flex; flex-wrap: wrap; gap: 5px;">
67
- <el-tag v-for="t in pkg.tags" :key="t" size="small" style="font-size: 10px;">{{ t }}</el-tag>
68
- </div>
69
- </div>
70
- <div style="text-align: right; flex-shrink: 0;">
71
- <div class="font-mono" style="font-size: 11px; color: #f59e0b;">★ {{ pkg.rating }}</div>
72
- <div class="font-mono" style="font-size: 11px; color: var(--text-muted); margin-top: 1px;">{{ pkg.downloads }}</div>
73
- </div>
74
- </div>
75
- <p style="color: var(--text-secondary); font-size: 13px; line-height: 1.6; margin-bottom: 14px; font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;">{{ pkg.desc }}</p>
76
- <div class="code-block" style="display: flex; align-items: center; justify-content: space-between; gap: 8px;">
77
- <span style="font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ pkg.install }}</span>
78
- <el-tooltip :content="copied === pkg.name ? '已复制!' : '复制安装命令'" placement="top">
79
- <el-button text circle size="small" @click="copyInstall(pkg.install, pkg.name)">
80
- <Check v-if="copied === pkg.name" :size="14" color="#4ade80" />
81
- <Copy v-else :size="14" color="var(--text-muted)" />
82
- </el-button>
83
- </el-tooltip>
84
- </div>
85
- </div>
86
- </div>
87
-
88
- <!-- Empty -->
89
- <el-empty v-else description="没有找到匹配的组件,换个关键词试试?" style="padding: 80px 0;" />
90
- </div>
91
- </div>
92
- </template>
93
-
94
- <script setup>
95
- import { ref, computed } from 'vue'
96
- import { Rocket, Package, FileText, Zap, BarChart2, Settings2, Upload, RefreshCw, Search, Copy, Check } from 'lucide-vue-next'
97
-
98
- const PACKAGES = [
99
- { name: 'create-citic-app', Icon: Rocket, category: 'scaffold', tags: ['脚手架','Vue','TypeScript'], rating: '4.9', downloads: '45.2k', desc: '企业级 Vue 3 项目脚手架,内置 Pinia、Router、Tailwind、ESLint、单元测试配置', install: 'npx create-citic-app my-app', fw: 'Vue' },
100
- { name: 'DTable', Icon: Package, category: 'ui', tags: ['UI','Vue','TypeScript'], rating: '4.8', downloads: '32.1k', desc: '高性能企业级数据表格,支持虚拟滚动、多级表头、自定义列渲染、服务端分页', install: 'npm install @citic/d-table', fw: 'Vue' },
101
- { name: 'DForm', Icon: FileText, category: 'ui', tags: ['UI','Vue','表单'], rating: '4.7', downloads: '28.6k', desc: '基于 JSON Schema 的动态表单引擎,支持联动、校验、布局配置,零代码生成表单', install: 'npm install @citic/d-form', fw: 'Vue' },
102
- { name: 'citic-cli', Icon: Zap, category: 'cli', tags: ['CLI','通用'], rating: '4.8', downloads: '19.4k', desc: 'DaaS 官方命令行工具,支持项目初始化、组件发布、Skills 管理、流水线触发', install: 'npm install -g @citic/cli', fw: '通用' },
103
- { name: 'react-citic-kit', Icon: Rocket, category: 'scaffold', tags: ['脚手架','React','TypeScript'], rating: '4.7', downloads: '18.2k', desc: 'React 18 + TypeScript 项目模板,内置 Zustand、React Query、shadcn/ui', install: 'npx create-citic-app --template react', fw: 'React' },
104
- { name: 'DChart', Icon: BarChart2, category: 'ui', tags: ['UI','Vue','图表'], rating: '4.6', downloads: '15.3k', desc: '基于 ECharts 的 Vue 3 图表组件库,30+ 图表类型,支持主题定制与响应式', install: 'npm install @citic/d-chart', fw: 'Vue' },
105
- { name: 'eslint-config-citic', Icon: Settings2, category: 'config', tags: ['配置','通用','ESLint'], rating: '4.9', downloads: '41.0k', desc: '企业级 ESLint 配置,支持 Vue、React、TypeScript,内置 Prettier 集成', install: 'npm install -D eslint-config-citic', fw: '通用' },
106
- { name: 'DUpload', Icon: Upload, category: 'ui', tags: ['UI','Vue','文件'], rating: '4.5', downloads: '12.8k', desc: '文件上传组件,支持拖拽、分片、断点续传、进度显示,兼容主流云存储', install: 'npm install @citic/d-upload', fw: 'Vue' },
107
- { name: 'citic-pipeline-sdk', Icon: RefreshCw, category: 'cli', tags: ['SDK','通用','CI/CD'], rating: '4.7', downloads: '8.9k', desc: '流水线对接 SDK,支持 Jenkins、GitLab CI、GitHub Actions 数据读取与触发', install: 'npm install @citic/pipeline-sdk', fw: '通用' },
108
- ]
109
-
110
- const TABS = [
111
- { label: '全部', value: 'all', count: 24 },
112
- { label: '脚手架模板', value: 'scaffold', count: 6 },
113
- { label: 'UI 组件库', value: 'ui', count: 12 },
114
- { label: 'CLI 工具', value: 'cli', count: 4 },
115
- { label: '配置模板', value: 'config', count: 2 },
116
- ]
117
- const FRAMEWORKS = ['Vue', 'React', 'TypeScript', '通用']
118
-
119
- const search = ref('')
120
- const sort = ref('downloads')
121
- const activeTab = ref('all')
122
- const activeFw = ref('')
123
- const copied = ref('')
124
-
125
- const filtered = computed(() => {
126
- let list = [...PACKAGES]
127
- if (activeTab.value !== 'all') list = list.filter(p => p.category === activeTab.value)
128
- if (activeFw.value) list = list.filter(p => p.fw === activeFw.value || p.fw === '通用')
129
- if (search.value) {
130
- const q = search.value.toLowerCase()
131
- list = list.filter(p => p.name.toLowerCase().includes(q) || p.desc.toLowerCase().includes(q))
132
- }
133
- if (sort.value === 'downloads') list.sort((a, b) => parseFloat(b.downloads) - parseFloat(a.downloads))
134
- if (sort.value === 'rating') list.sort((a, b) => parseFloat(b.rating) - parseFloat(a.rating))
135
- return list
136
- })
137
-
138
- function copyInstall(text, name) {
139
- navigator.clipboard?.writeText(text).catch(() => {})
140
- copied.value = name
141
- setTimeout(() => { copied.value = '' }, 2000)
142
- }
143
- </script>
@@ -1,190 +0,0 @@
1
- <template>
2
- <div class="dot-grid" style="min-height: 100vh; position: relative;">
3
- <div class="glow-orb" style="width: 288px; height: 288px; background: rgba(26,111,196,0.12); top: 80px; right: 80px;" />
4
- <div style="max-width: 1152px; margin: 0 auto; padding: 48px 24px;">
5
-
6
- <div style="margin-bottom: 36px;">
7
- <span class="tag" style="margin-bottom: 10px; display: inline-block;">最佳实践</span>
8
- <h1 class="section-title" style="margin-bottom: 10px;">研发工作流规范指南</h1>
9
- <p style="color: var(--text-secondary); font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;">从 CI/CD 集成到组件开发规范,帮助团队建立高效研发流程</p>
10
- </div>
11
-
12
- <!-- Category pills -->
13
- <div style="display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px;">
14
- <button
15
- v-for="cat in CATEGORIES"
16
- :key="cat.value"
17
- :style="{
18
- display: 'flex', alignItems: 'center', gap: '7px',
19
- padding: '7px 14px', borderRadius: '10px', fontSize: '13px',
20
- fontFamily: '\'DM Sans\', sans-serif', cursor: 'pointer', transition: 'all 0.15s',
21
- border: `1px solid ${activeCategory === cat.value ? 'rgba(26,111,196,0.4)' : 'var(--border-subtle)'}`,
22
- background: activeCategory === cat.value ? 'var(--tag-bg)' : 'transparent',
23
- color: activeCategory === cat.value ? 'var(--text-primary)' : 'var(--text-secondary)',
24
- }"
25
- @click="activeCategory = activeCategory === cat.value ? 'all' : cat.value"
26
- >
27
- <component :is="cat.Icon" :size="14" :stroke-width="1.75" /> {{ cat.label }}
28
- </button>
29
- </div>
30
-
31
- <!-- Two-column layout -->
32
- <div :style="{ display: 'grid', gridTemplateColumns: isNarrow ? '1fr' : '1fr 2fr', gap: '20px' }">
33
-
34
- <!-- Article list -->
35
- <div style="display: flex; flex-direction: column; gap: 6px;">
36
- <div
37
- v-for="article in filtered"
38
- :key="article.id"
39
- class="glass article-item"
40
- :style="{
41
- borderRadius: '10px', padding: '14px', cursor: 'pointer', transition: 'all 0.15s',
42
- border: `1px solid ${activeArticle?.id === article.id ? 'rgba(26,111,196,0.4)' : 'var(--border-subtle)'}`,
43
- background: activeArticle?.id === article.id ? 'var(--tag-bg)' : undefined,
44
- }"
45
- @click="activeArticle = article"
46
- >
47
- <div style="display: flex; gap: 10px;">
48
- <div style="width: 32px; height: 32px; border-radius: 8px; background: var(--bg-secondary); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; flex-shrink: 0;">
49
- <component :is="article.CatIcon" :size="15" color="var(--brand-400)" :stroke-width="1.75" />
50
- </div>
51
- <div>
52
- <div style="display: flex; gap: 6px; margin-bottom: 5px; flex-wrap: wrap;">
53
- <span class="tag" style="font-size: 10px;">{{ article.category }}</span>
54
- <span
55
- class="font-mono"
56
- :style="{
57
- fontSize: '10px', padding: '2px 7px', borderRadius: '999px',
58
- color: article.level === '入门' ? '#16a34a' : '#c2410c',
59
- background: article.level === '入门' ? 'rgba(74,222,128,0.1)' : 'rgba(251,146,60,0.1)',
60
- }"
61
- >{{ article.level }}</span>
62
- </div>
63
- <h3 class="font-display" style="font-weight: 600; color: var(--text-primary); font-size: 13px; line-height: 1.4;">{{ article.title }}</h3>
64
- <p class="font-mono" style="font-size: 10px; color: var(--text-muted); margin-top: 3px;">阅读 {{ article.readTime }}</p>
65
- </div>
66
- </div>
67
- </div>
68
- </div>
69
-
70
- <!-- Article reader -->
71
- <div>
72
- <div v-if="activeArticle" class="glass" style="border-radius: 12px; padding: 28px;">
73
- <div style="display: flex; gap: 14px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border-subtle);">
74
- <div style="width: 48px; height: 48px; border-radius: 12px; background: var(--tag-bg); border: 1px solid var(--tag-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0;">
75
- <component :is="activeArticle.CatIcon" :size="22" color="var(--brand-400)" :stroke-width="1.5" />
76
- </div>
77
- <div>
78
- <div style="display: flex; gap: 7px; margin-bottom: 7px; flex-wrap: wrap;">
79
- <span class="tag" style="font-size: 11px;">{{ activeArticle.category }}</span>
80
- <span
81
- class="font-mono"
82
- :style="{
83
- fontSize: '11px', padding: '2px 9px', borderRadius: '999px',
84
- border: `1px solid ${activeArticle.level === '入门' ? 'rgba(74,222,128,0.2)' : 'rgba(251,146,60,0.2)'}`,
85
- color: activeArticle.level === '入门' ? '#16a34a' : '#c2410c',
86
- background: activeArticle.level === '入门' ? 'rgba(74,222,128,0.1)' : 'rgba(251,146,60,0.1)',
87
- }"
88
- >{{ activeArticle.level }}</span>
89
- </div>
90
- <h2 class="font-display" style="font-weight: 700; color: var(--text-primary); font-size: 19px; margin-bottom: 4px;">{{ activeArticle.title }}</h2>
91
- <p class="font-mono" style="font-size: 12px; color: var(--text-muted);">预计阅读 {{ activeArticle.readTime }}</p>
92
- </div>
93
- </div>
94
-
95
- <div style="display: flex; flex-direction: column; gap: 20px;">
96
- <div v-for="section in activeArticle.sections" :key="section.title">
97
- <h3 class="font-display" style="font-weight: 600; color: var(--text-primary); font-size: 14px; margin-bottom: 9px; display: flex; align-items: center; gap: 8px;">
98
- <span style="width: 3px; height: 14px; background: var(--brand-500); border-radius: 2px; display: inline-block; flex-shrink: 0;" />
99
- {{ section.title }}
100
- </h3>
101
- <p style="color: var(--text-secondary); font-size: 14px; line-height: 1.7; font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;" :style="{ marginBottom: section.code ? '10px' : '0' }">{{ section.content }}</p>
102
- <div v-if="section.code" class="code-block"><pre>{{ section.code }}</pre></div>
103
- </div>
104
- </div>
105
-
106
- <div style="margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border-subtle); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;">
107
- <p style="font-size: 13px; color: var(--text-secondary); font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;">想快速实践这篇指南?</p>
108
- <button class="btn-primary" style="font-size: 13px;" @click="router.push('/chat')">
109
- <MessageSquare :size="14" /> 在对话框中尝试
110
- </button>
111
- </div>
112
- </div>
113
-
114
- <div v-else class="glass" style="border-radius: 12px; padding: 48px; text-align: center; color: var(--text-muted);">
115
- <LayoutList :size="38" style="margin: 0 auto 12px; display: block; opacity: 0.4;" />
116
- <p style="font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;">从左侧选择一篇文章开始阅读</p>
117
- </div>
118
- </div>
119
- </div>
120
- </div>
121
- </div>
122
- </template>
123
-
124
- <script setup>
125
- import { ref, computed } from 'vue'
126
- import { useRouter } from 'vue-router'
127
- import { LayoutList, RefreshCw, Package, Wrench, Bot, MessageSquare } from 'lucide-vue-next'
128
-
129
- const router = useRouter()
130
-
131
- const CATEGORIES = [
132
- { value: 'all', label: '全部', Icon: LayoutList },
133
- { value: 'cicd', label: 'CI/CD 集成', Icon: RefreshCw },
134
- { value: 'component', label: '组件开发规范', Icon: Package },
135
- { value: 'debug', label: '异常排查', Icon: Wrench },
136
- { value: 'citic', label: 'DaaS 接入', Icon: Bot },
137
- ]
138
-
139
- const CAT_MAP = { cicd: 'CI/CD 集成', component: '组件开发', debug: '异常排查', citic: 'DaaS 接入' }
140
-
141
- const ARTICLES = [
142
- {
143
- id: 1, CatIcon: RefreshCw, category: 'CI/CD 集成', level: '入门', readTime: '8 分钟',
144
- title: '在 GitLab CI 中集成 DaaS 监控',
145
- sections: [
146
- { title: '前置准备', content: '确保已安装 @citic/pipeline-sdk >= 1.5.0,并在项目根目录创建 .citic.config.js 配置文件,填写 GitLab 访问令牌和项目 ID。', code: `// .citic.config.js\nmodule.exports = {\n platform: 'gitlab',\n token: process.env.GITLAB_TOKEN,\n projectId: process.env.CI_PROJECT_ID,\n notify: { onFail: true }\n}` },
147
- { title: '添加监控步骤', content: '在流水线配置文件中引入 DaaS 报告步骤,建议放在 after_script 阶段确保始终执行。', code: `citic-report:\n stage: report\n when: always\n script:\n - npx citic-cli pipeline report\n --status $CI_JOB_STATUS` },
148
- { title: '验证与调试', content: '配置完成后,触发一次流水线运行,在 DaaS 对话框中输入「查看最近一次构建状态」验证数据是否正常上报。' },
149
- ],
150
- },
151
- {
152
- id: 2, CatIcon: Package, category: '组件开发', level: '进阶', readTime: '12 分钟',
153
- title: '向组件市场发布你的第一个组件',
154
- sections: [
155
- { title: '组件命名规范', content: '组件名使用 PascalCase,包名使用 @scope/kebab-case 格式。组件必须提供完整的 TypeScript 类型声明文件,以及 README、CHANGELOG 文档。', code: `my-component/\n├── src/index.ts\n├── types/index.d.ts\n├── README.md\n└── package.json` },
156
- { title: '发布前检查', content: '运行 citic-cli publish --dry-run 进行预检,工具会自动检查包体积、类型完整性、ESM/CJS 双格式输出。', code: `npx citic-cli publish --dry-run\nnpx citic-cli publish --access public` },
157
- ],
158
- },
159
- {
160
- id: 3, CatIcon: Wrench, category: '异常排查', level: '入门', readTime: '6 分钟',
161
- title: '构建失败?5 步快速定位根因',
162
- sections: [
163
- { title: '复制完整错误日志', content: '不要只复制最后几行错误,完整的日志包含调用堆栈和上下文,能帮助 AI 更准确地定位问题。' },
164
- { title: '在对话框中描述问题', content: '将日志粘贴到 DaaS 对话框,并补充环境信息,AI 会给出针对性分析。', code: `"Cannot find module" → 依赖未安装\n"Type 'X' is not assignable" → TS 类型不匹配\n"heap out of memory" → 添加 --max-old-space-size=4096` },
165
- ],
166
- },
167
- {
168
- id: 4, CatIcon: Bot, category: 'DaaS 接入', level: '进阶', readTime: '15 分钟',
169
- title: '在自有平台中接入 DaaS API',
170
- sections: [
171
- { title: '获取 API 凭证', content: '在 DaaS 控制台创建 API Key,建议按项目隔离不同 Key,并设置访问频率限制(默认 100 RPM)。' },
172
- { title: '实现流式输出', content: '使用 SSE 接收流式响应,前端通过 fetch ReadableStream 逐 token 追加内容,实现打字机效果。', code: `app.post('/api/chat', async (req, res) => {\n res.setHeader('Content-Type', 'text/event-stream')\n const stream = await citic.chat.stream({ messages: req.body.messages })\n for await (const chunk of stream) res.write(\`data: \${JSON.stringify(chunk)}\\n\\n\`)\n res.end()\n})` },
173
- ],
174
- },
175
- ]
176
-
177
- const activeCategory = ref('all')
178
- const activeArticle = ref(ARTICLES[0])
179
- const isNarrow = window.innerWidth < 900
180
-
181
- const filtered = computed(() =>
182
- activeCategory.value === 'all'
183
- ? ARTICLES
184
- : ARTICLES.filter(a => a.category === CAT_MAP[activeCategory.value])
185
- )
186
- </script>
187
-
188
- <style scoped>
189
- .article-item:hover { border-color: var(--border-default) !important; }
190
- </style>
@@ -1,129 +0,0 @@
1
- <template>
2
- <div class="dot-grid" style="min-height: 100vh; position: relative;">
3
- <div class="glow-orb" style="width: 320px; height: 320px; background: rgba(26,111,196,0.12); top: 80px; left: 40px;" />
4
- <div style="max-width: 1280px; margin: 0 auto; padding: 48px 24px;">
5
-
6
- <div style="margin-bottom: 36px;">
7
- <span class="tag" style="margin-bottom: 10px; display: inline-block;">Skills 市场</span>
8
- <h1 class="section-title" style="margin-bottom: 10px;">可复用 AI 能力单元</h1>
9
- <p style="color: var(--text-secondary); font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;">一键接入官方与社区贡献的 Skills,扩展 DaaS AI 的能力边界</p>
10
- </div>
11
-
12
- <el-tabs v-model="activeTab" style="margin-bottom: 28px;">
13
- <el-tab-pane label="全部" name="全部" />
14
- <el-tab-pane label="官方 Skills" name="官方 Skills" />
15
- <el-tab-pane label="社区 Skills" name="社区 Skills" />
16
- </el-tabs>
17
-
18
- <!-- Skills Grid -->
19
- <div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;">
20
- <div
21
- v-for="skill in filtered"
22
- :key="skill.name"
23
- class="card"
24
- style="position: relative; display: flex; flex-direction: column;"
25
- >
26
- <el-tag v-if="skill.official" size="small" style="position: absolute; top: 14px; right: 14px;">官方</el-tag>
27
-
28
- <div style="display: flex; align-items: center; gap: 12px; margin-bottom: 10px;">
29
- <div style="width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--tag-bg); border: 1px solid var(--tag-border); flex-shrink: 0;">
30
- <component :is="skill.Icon" :size="18" color="var(--brand-400)" :stroke-width="1.75" />
31
- </div>
32
- <div>
33
- <h3 class="font-display" style="font-weight: 600; color: var(--text-primary); font-size: 14px;">{{ skill.name }}</h3>
34
- <p class="font-mono" style="font-size: 11px; color: var(--text-muted); margin-top: 1px;">{{ skill.uses }} 次使用</p>
35
- </div>
36
- </div>
37
-
38
- <p style="color: var(--text-secondary); font-size: 13px; line-height: 1.6; margin-bottom: 14px; font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;">{{ skill.desc }}</p>
39
-
40
- <div style="flex: 1; margin-bottom: 14px;">
41
- <p class="font-mono" style="font-size: 10px; color: var(--text-muted); margin-bottom: 7px;">触发示例:</p>
42
- <div
43
- v-for="ex in skill.examples"
44
- :key="ex"
45
- style="display: flex; gap: 8px; font-size: 12px; color: var(--text-secondary); background: var(--bg-secondary); border-radius: 8px; padding: 7px 10px; margin-bottom: 5px; border: 1px solid var(--border-subtle); font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;"
46
- >
47
- <span class="font-mono" style="color: var(--brand-400); flex-shrink: 0;">›</span>
48
- <span>{{ ex }}</span>
49
- </div>
50
- </div>
51
-
52
- <div style="display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-subtle);">
53
- <el-button style="flex: 1; border-radius: 8px;" size="small" @click="previewSkill = skill">预览</el-button>
54
- <el-button type="primary" style="flex: 1; border-radius: 8px;" size="small" @click="navigator.clipboard?.writeText(skill.config).catch(() => {})">一键接入</el-button>
55
- </div>
56
- </div>
57
- </div>
58
-
59
- <!-- Contribute banner -->
60
- <div class="glass" style="margin-top: 44px; border-radius: 16px; padding: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;">
61
- <div>
62
- <h3 class="font-display" style="font-weight: 600; color: var(--text-primary); font-size: 17px; margin-bottom: 4px;">贡献你的 Skill</h3>
63
- <p style="color: var(--text-secondary); font-size: 14px; font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;">将你的 AI 能力分享给社区</p>
64
- </div>
65
- <el-button type="primary" style="flex-shrink: 0; border-radius: 8px;">
66
- <Plus :size="14" style="margin-right: 6px;" /> 提交 Skill
67
- </el-button>
68
- </div>
69
- </div>
70
-
71
- <!-- Preview Dialog -->
72
- <el-dialog
73
- v-model="showPreview"
74
- :title="previewSkill?.name"
75
- width="500px"
76
- align-center
77
- @closed="previewSkill = null"
78
- >
79
- <template v-if="previewSkill">
80
- <div style="display: flex; align-items: center; gap: 10px; margin-bottom: 14px;">
81
- <div style="width: 32px; height: 32px; border-radius: 8px; background: var(--tag-bg); border: 1px solid var(--tag-border); display: flex; align-items: center; justify-content: center;">
82
- <component :is="previewSkill.Icon" :size="16" color="var(--brand-400)" :stroke-width="1.75" />
83
- </div>
84
- <p style="color: var(--text-secondary); font-size: 13px; font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; margin: 0;">{{ previewSkill.desc }}</p>
85
- </div>
86
- <div class="code-block"><pre>{{ previewSkill.config }}</pre></div>
87
- </template>
88
- <template #footer>
89
- <el-button type="primary" style="width: 100%; border-radius: 10px;" @click="copyConfig">
90
- {{ configCopied ? '已复制配置 ✓' : '复制接入配置' }}
91
- </el-button>
92
- </template>
93
- </el-dialog>
94
- </div>
95
- </template>
96
-
97
- <script setup>
98
- import { ref, computed, watch } from 'vue'
99
- import { Rocket, Package, BarChart2, Wrench, Eye, BookOpen, Plus } from 'lucide-vue-next'
100
-
101
- const SKILLS = [
102
- { name: '脚手架生成器', Icon: Rocket, official: true, uses: '24.3k', desc: '通过对话描述技术栈,自动生成可运行的工程模板,支持 Vue、React、Node.js 等', examples: ['帮我生成一个 Vue 3 + TypeScript 的后台管理项目', '创建一个带 GraphQL 的 React 全栈模板'], config: '{\n "skill": "scaffold-generator",\n "version": "1.2.0",\n "trigger": ["生成脚手架", "创建项目"]\n}' },
103
- { name: '组件智能推荐', Icon: Package, official: true, uses: '18.7k', desc: '基于需求描述,从组件市场中匹配最合适的组件,并提供安装命令和使用示例', examples: ['我需要一个支持大数据量的表格组件', '找一个好用的富文本编辑器'], config: '{\n "skill": "component-recommender",\n "version": "2.0.1",\n "trigger": ["推荐组件", "找组件"]\n}' },
104
- { name: '流水线监控', Icon: BarChart2, official: true, uses: '11.2k', desc: '对接 CI/CD 平台,实时查询流水线状态、构建日志,异常时提供智能分析', examples: ['查看 main 分支最近一次构建状态', '列出今天失败的所有流水线'], config: '{\n "skill": "pipeline-monitor",\n "version": "1.5.0",\n "requires": ["GITLAB_TOKEN"]\n}' },
105
- { name: '异常修复助手', Icon: Wrench, official: true, uses: '15.9k', desc: '粘贴报错信息或构建日志,AI 自动定位根因并给出分步修复方案', examples: ['帮我分析这个 TypeScript 类型错误', '我的 webpack 构建失败了'], config: '{\n "skill": "error-fixer",\n "version": "1.3.2",\n "trigger": ["报错", "失败", "exception"]\n}' },
106
- { name: 'Code Review', Icon: Eye, official: false, uses: '6.4k', desc: '提交代码片段,获取安全性、性能、可读性多维度的代码审查意见', examples: ['帮我 review 这段 Vue 组件代码', '检查这个函数有没有安全问题'], config: '{\n "skill": "code-review",\n "version": "1.0.3",\n "author": "community"\n}' },
107
- { name: 'API 文档生成', Icon: BookOpen, official: false, uses: '4.1k', desc: '从代码注释或函数签名自动生成 OpenAPI/Swagger 格式的接口文档', examples: ['为这个 Express 路由生成接口文档', '把这些 TypeScript 类型转换为 JSON Schema'], config: '{\n "skill": "api-doc-gen",\n "version": "0.9.1",\n "author": "community"\n}' },
108
- ]
109
-
110
- const activeTab = ref('全部')
111
- const previewSkill = ref(null)
112
- const configCopied = ref(false)
113
- const showPreview = computed({
114
- get: () => !!previewSkill.value,
115
- set: v => { if (!v) previewSkill.value = null },
116
- })
117
-
118
- const filtered = computed(() => {
119
- if (activeTab.value === '官方 Skills') return SKILLS.filter(s => s.official)
120
- if (activeTab.value === '社区 Skills') return SKILLS.filter(s => !s.official)
121
- return SKILLS
122
- })
123
-
124
- function copyConfig() {
125
- navigator.clipboard?.writeText(previewSkill.value.config).catch(() => {})
126
- configCopied.value = true
127
- setTimeout(() => { configCopied.value = false }, 2000)
128
- }
129
- </script>
package/guanwang/temp DELETED
@@ -1,19 +0,0 @@
1
- 你当前处于 Code 模式,职责是:
2
- - 编写、修改、重构代码
3
- - 生成完整可运行的代码文件(使用 render_artifact 工具输出)
4
- - 解释代码逻辑和技术选型
5
- - 发现并修复代码问题
6
-
7
- 你在 Code 模式下的行为准则:
8
- 1. 代码超过 20 行或构成完整可运行文件时,MUST 使用 render_artifact 工具输出,不得用普通代码块代替
9
- 2. 输出代码时 MUST 给出完整代码,严禁省略、截断、使用注释代替未完成部分
10
- 3. 若需要用户提供现有代码才能继续,MUST 使用 request_context 工具请求,不得凭空假设代码内容
11
- 4. 技术方案存在多个可选路径时,先简要说明各方案的取舍,再按用户场景给出推荐
12
- 5. NEVER 主动切换到其他模式,若用户有规划类需求请提示用户切换到 Architect 模式
13
- 6. 输出 Markdown 文档内容时,MUST 使用 <artifact type="markdown"> 标签包裹,
14
- NEVER 使用 \`\`\`markdown 代码块,原因是内部嵌套代码块会导致解析异常。
15
- 格式示例:
16
- <artifact type="markdown">
17
- # 标题
18
- 内容(内部可自由使用各类代码块)
19
- </artifact>
@@ -1,6 +0,0 @@
1
- import { defineConfig } from 'vite'
2
- import vue from '@vitejs/plugin-vue'
3
-
4
- export default defineConfig({
5
- plugins: [vue()],
6
- })