autosnippet 3.0.2 → 3.0.6
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.
- package/README.md +85 -239
- package/bin/mcp-server.js +12 -1
- package/dashboard/dist/assets/{icons-Cdq22n2i.js → icons-eQ_rWCus.js} +97 -102
- package/dashboard/dist/assets/index-B3Nnkdxi.js +133 -0
- package/dashboard/dist/assets/index-BFNDAqh3.css +1 -0
- package/dashboard/dist/index.html +3 -3
- package/lib/cli/SetupService.js +9 -12
- package/lib/cli/UpgradeService.js +15 -17
- package/lib/core/AstAnalyzer.js +2 -2
- package/lib/core/ast/ensure-grammars.js +2 -0
- package/lib/core/ast/index.js +8 -0
- package/lib/core/ast/lang-rust.js +695 -0
- package/lib/core/discovery/PythonDiscoverer.js +3 -0
- package/lib/core/discovery/RustDiscoverer.js +467 -0
- package/lib/core/discovery/index.js +3 -0
- package/lib/core/enhancement/django-enhancement.js +169 -3
- package/lib/core/enhancement/fastapi-enhancement.js +149 -3
- package/lib/core/enhancement/go-grpc-enhancement.js +4 -0
- package/lib/core/enhancement/go-web-enhancement.js +6 -0
- package/lib/core/enhancement/index.js +5 -0
- package/lib/core/enhancement/langchain-enhancement.js +233 -0
- package/lib/core/enhancement/ml-enhancement.js +265 -0
- package/lib/core/enhancement/nextjs-enhancement.js +219 -0
- package/lib/core/enhancement/node-server-enhancement.js +178 -4
- package/lib/core/enhancement/react-enhancement.js +165 -4
- package/lib/core/enhancement/rust-tokio-enhancement.js +231 -0
- package/lib/core/enhancement/rust-web-enhancement.js +256 -0
- package/lib/core/enhancement/spring-enhancement.js +2 -0
- package/lib/core/enhancement/vue-enhancement.js +143 -2
- package/lib/external/ai/AiProvider.js +45 -6
- package/lib/external/mcp/handlers/bootstrap/skills.js +2 -0
- package/lib/external/mcp/handlers/bootstrap.js +33 -9
- package/lib/external/mcp/handlers/guard.js +42 -0
- package/lib/http/routes/candidates.js +7 -1
- package/lib/service/chat/ChatAgent.js +1 -0
- package/lib/service/chat/tools.js +5 -1
- package/lib/service/guard/ComplianceReporter.js +20 -7
- package/lib/service/guard/GuardCheckEngine.js +156 -5
- package/lib/service/guard/SourceFileCollector.js +15 -0
- package/package.json +28 -6
- package/scripts/install-vscode-copilot.js +32 -97
- package/scripts/setup-mcp-config.js +18 -36
- package/skills/autosnippet-coldstart/SKILL.md +4 -2
- package/skills/autosnippet-concepts/SKILL.md +5 -3
- package/skills/autosnippet-reference-rust/SKILL.md +401 -0
- package/skills/autosnippet-structure/SKILL.md +1 -1
- package/templates/recipes-setup/README.md +2 -2
- package/templates/recipes-setup/_template.md +1 -1
- package/dashboard/dist/assets/index-ClkyPkDX.js +0 -133
- package/dashboard/dist/assets/index-t4QrJwv1.css +0 -1
|
@@ -126,7 +126,7 @@ function getMcpServerPath() {
|
|
|
126
126
|
// ============ 配置 VSCode settings.json ============
|
|
127
127
|
|
|
128
128
|
function configureVSCodeSettings() {
|
|
129
|
-
log('\n📝 配置 VSCode
|
|
129
|
+
log('\n📝 配置 VSCode MCP 设置...', 'blue');
|
|
130
130
|
|
|
131
131
|
if (isAutoSnippetRepo && !args.path) {
|
|
132
132
|
log('ℹ️ 检测到在 AutoSnippet 仓库内执行,仅配置全局设置', 'yellow');
|
|
@@ -134,8 +134,8 @@ function configureVSCodeSettings() {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
const mcpServerPath = getMcpServerPath();
|
|
137
|
-
const
|
|
138
|
-
|
|
137
|
+
const mcpServerConfig = {
|
|
138
|
+
type: 'stdio',
|
|
139
139
|
command: 'node',
|
|
140
140
|
args: [mcpServerPath],
|
|
141
141
|
env: {
|
|
@@ -143,71 +143,32 @@ function configureVSCodeSettings() {
|
|
|
143
143
|
},
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
let
|
|
147
|
-
let workspaceConfigured = false;
|
|
146
|
+
let configured = false;
|
|
148
147
|
|
|
149
|
-
//
|
|
150
|
-
if (configGlobal) {
|
|
151
|
-
const globalSettingsPath = getVSCodeSettingsPath(true);
|
|
152
|
-
const globalSettings = readJsonFile(globalSettingsPath, {});
|
|
153
|
-
|
|
154
|
-
if (!globalSettings['github.copilot.mcp']) {
|
|
155
|
-
globalSettings['github.copilot.mcp'] = {};
|
|
156
|
-
}
|
|
157
|
-
if (!globalSettings['github.copilot.mcp'].servers) {
|
|
158
|
-
globalSettings['github.copilot.mcp'].servers = [];
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
const existingIndex = globalSettings['github.copilot.mcp'].servers.findIndex(
|
|
162
|
-
(s) => s.name === 'autosnippet'
|
|
163
|
-
);
|
|
164
|
-
|
|
165
|
-
if (existingIndex >= 0) {
|
|
166
|
-
globalSettings['github.copilot.mcp'].servers[existingIndex] = mcpConfig;
|
|
167
|
-
} else {
|
|
168
|
-
globalSettings['github.copilot.mcp'].servers.push(mcpConfig);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// 添加推荐的全局设置
|
|
172
|
-
globalSettings['github.copilot.enable'] = globalSettings['github.copilot.enable'] || {};
|
|
173
|
-
globalSettings['github.copilot.enable']['*'] = true;
|
|
174
|
-
globalSettings['github.copilot.chat.localeOverride'] = 'zh-CN';
|
|
175
|
-
|
|
176
|
-
if (writeJsonFile(globalSettingsPath, globalSettings)) {
|
|
177
|
-
log(`✅ 全局配置完成: ${globalSettingsPath}`, 'green');
|
|
178
|
-
globalConfigured = true;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// 工作区配置
|
|
148
|
+
// 工作区配置 → .vscode/mcp.json(新标准格式)
|
|
183
149
|
if (configWorkspace) {
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
150
|
+
const vscodeDir = path.join(projectPath, '.vscode');
|
|
151
|
+
const mcpConfigPath = path.join(vscodeDir, 'mcp.json');
|
|
152
|
+
|
|
153
|
+
let config = {};
|
|
154
|
+
if (fs.existsSync(mcpConfigPath)) {
|
|
155
|
+
try {
|
|
156
|
+
config = JSON.parse(fs.readFileSync(mcpConfigPath, 'utf8'));
|
|
157
|
+
} catch { /* ignore */ }
|
|
192
158
|
}
|
|
193
159
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
);
|
|
197
|
-
|
|
198
|
-
if (existingIndex >= 0) {
|
|
199
|
-
workspaceSettings['github.copilot.mcp'].servers[existingIndex] = mcpConfig;
|
|
200
|
-
} else {
|
|
201
|
-
workspaceSettings['github.copilot.mcp'].servers.push(mcpConfig);
|
|
160
|
+
if (!config.servers) {
|
|
161
|
+
config.servers = {};
|
|
202
162
|
}
|
|
163
|
+
config.servers.autosnippet = mcpServerConfig;
|
|
203
164
|
|
|
204
|
-
if (writeJsonFile(
|
|
205
|
-
log(`✅
|
|
206
|
-
|
|
165
|
+
if (writeJsonFile(mcpConfigPath, config)) {
|
|
166
|
+
log(`✅ 工作区 MCP 配置完成: ${mcpConfigPath}`, 'green');
|
|
167
|
+
configured = true;
|
|
207
168
|
}
|
|
208
169
|
}
|
|
209
170
|
|
|
210
|
-
return
|
|
171
|
+
return configured;
|
|
211
172
|
}
|
|
212
173
|
|
|
213
174
|
// ============ 创建推荐扩展配置 ============
|
|
@@ -270,41 +231,18 @@ function verifyConfiguration() {
|
|
|
270
231
|
|
|
271
232
|
log('\n🔍 验证配置...', 'blue');
|
|
272
233
|
|
|
273
|
-
//
|
|
274
|
-
if (configGlobal) {
|
|
275
|
-
const globalSettingsPath = getVSCodeSettingsPath(true);
|
|
276
|
-
if (fs.existsSync(globalSettingsPath)) {
|
|
277
|
-
const settings = readJsonFile(globalSettingsPath, {});
|
|
278
|
-
if (settings['github.copilot.mcp']?.servers) {
|
|
279
|
-
const hasAutosnippet = settings['github.copilot.mcp'].servers.some(
|
|
280
|
-
(s) => s.name === 'autosnippet'
|
|
281
|
-
);
|
|
282
|
-
if (hasAutosnippet) {
|
|
283
|
-
log(`✅ VSCode 全局 MCP 配置验证成功`, 'green');
|
|
284
|
-
} else {
|
|
285
|
-
log(`⚠️ 未在全局设置中找到 autosnippet MCP 服务器`, 'yellow');
|
|
286
|
-
}
|
|
287
|
-
} else {
|
|
288
|
-
log(`⚠️ 全局设置中未找到 MCP 配置`, 'yellow');
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// 检查工作区设置
|
|
234
|
+
// 检查工作区 MCP 配置(.vscode/mcp.json)
|
|
294
235
|
if (configWorkspace) {
|
|
295
|
-
const
|
|
296
|
-
if (fs.existsSync(
|
|
297
|
-
const
|
|
298
|
-
if (
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
);
|
|
302
|
-
if (hasAutosnippet) {
|
|
303
|
-
log(`✅ VSCode 工作区 MCP 配置验证成功`, 'green');
|
|
304
|
-
} else {
|
|
305
|
-
log(`⚠️ 未在工作区设置中找到 autosnippet MCP 服务器`, 'yellow');
|
|
306
|
-
}
|
|
236
|
+
const mcpConfigPath = path.join(projectPath, '.vscode/mcp.json');
|
|
237
|
+
if (fs.existsSync(mcpConfigPath)) {
|
|
238
|
+
const config = readJsonFile(mcpConfigPath, {});
|
|
239
|
+
if (config.servers?.autosnippet) {
|
|
240
|
+
log(`✅ VSCode 工作区 MCP 配置验证成功 (.vscode/mcp.json)`, 'green');
|
|
241
|
+
} else {
|
|
242
|
+
log(`⚠️ .vscode/mcp.json 中未找到 autosnippet 服务器`, 'yellow');
|
|
307
243
|
}
|
|
244
|
+
} else {
|
|
245
|
+
log(`⚠️ 未找到 .vscode/mcp.json`, 'yellow');
|
|
308
246
|
}
|
|
309
247
|
}
|
|
310
248
|
|
|
@@ -353,18 +291,15 @@ function printQuickStart() {
|
|
|
353
291
|
log(` ${path.join(projectPath, '.github/copilot-instructions.md')}`, 'yellow');
|
|
354
292
|
|
|
355
293
|
log('\n📝 配置位置:');
|
|
356
|
-
if (configGlobal) {
|
|
357
|
-
log(` 全局: ${getVSCodeSettingsPath(true)}`, 'yellow');
|
|
358
|
-
}
|
|
359
294
|
if (configWorkspace) {
|
|
360
|
-
log(`
|
|
295
|
+
log(` MCP: ${path.join(projectPath, '.vscode/mcp.json')}`, 'yellow');
|
|
361
296
|
}
|
|
362
297
|
|
|
363
298
|
log('\n💡 提示:');
|
|
364
299
|
log(' - 首次配置需要重启 VSCode');
|
|
365
300
|
log(' - MCP 服务器需要 Node.js 18.0+');
|
|
366
301
|
log(' - Dashboard 运行在 http://localhost:3000');
|
|
367
|
-
log(' -
|
|
302
|
+
log(' - MCP 配置位于 .vscode/mcp.json(可加入版本控制共享给团队)\n');
|
|
368
303
|
|
|
369
304
|
log(`${'='.repeat(60)}\n`, 'blue');
|
|
370
305
|
}
|
|
@@ -64,41 +64,28 @@ if (isVSCode) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function configureVSCode() {
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
} else if (os.platform() === 'win32') {
|
|
71
|
-
settingsPath = path.join(os.getenv('APPDATA'), 'Code/User/settings.json');
|
|
72
|
-
} else {
|
|
73
|
-
settingsPath = path.join(os.homedir(), '.config/Code/User/settings.json');
|
|
74
|
-
}
|
|
67
|
+
// 使用 .vscode/mcp.json(VSCode 新标准格式)
|
|
68
|
+
const vscodeDir = path.join(projectPath, '.vscode');
|
|
69
|
+
const mcpConfigPath = path.join(vscodeDir, 'mcp.json');
|
|
75
70
|
|
|
76
|
-
//
|
|
77
|
-
let
|
|
78
|
-
if (fs.existsSync(
|
|
71
|
+
// 读取现有配置
|
|
72
|
+
let config = {};
|
|
73
|
+
if (fs.existsSync(mcpConfigPath)) {
|
|
79
74
|
try {
|
|
80
|
-
const content = fs.readFileSync(
|
|
81
|
-
|
|
75
|
+
const content = fs.readFileSync(mcpConfigPath, 'utf8');
|
|
76
|
+
config = JSON.parse(content);
|
|
82
77
|
} catch (_e) {
|
|
83
78
|
// 忽略解析错误
|
|
84
79
|
}
|
|
85
80
|
}
|
|
86
81
|
|
|
87
|
-
// 添加 MCP
|
|
88
|
-
if (!
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
if (!settings['github.copilot.mcp'].servers) {
|
|
92
|
-
settings['github.copilot.mcp'].servers = [];
|
|
82
|
+
// 添加 MCP 服务器配置
|
|
83
|
+
if (!config.servers) {
|
|
84
|
+
config.servers = {};
|
|
93
85
|
}
|
|
94
86
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
(s) => s.name === 'autosnippet'
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
const mcpConfig = {
|
|
101
|
-
name: 'autosnippet',
|
|
87
|
+
config.servers.autosnippet = {
|
|
88
|
+
type: 'stdio',
|
|
102
89
|
command: 'node',
|
|
103
90
|
args: [mcpServerPath],
|
|
104
91
|
env: {
|
|
@@ -106,24 +93,19 @@ function configureVSCode() {
|
|
|
106
93
|
},
|
|
107
94
|
};
|
|
108
95
|
|
|
109
|
-
|
|
110
|
-
settings['github.copilot.mcp'].servers[existingIndex] = mcpConfig;
|
|
111
|
-
} else {
|
|
112
|
-
settings['github.copilot.mcp'].servers.push(mcpConfig);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// 写入设置
|
|
96
|
+
// 写入 .vscode/mcp.json
|
|
116
97
|
try {
|
|
117
|
-
fs.mkdirSync(
|
|
118
|
-
fs.writeFileSync(
|
|
98
|
+
fs.mkdirSync(vscodeDir, { recursive: true });
|
|
99
|
+
fs.writeFileSync(mcpConfigPath, JSON.stringify(config, null, 2), 'utf8');
|
|
119
100
|
if (!isQuiet) {
|
|
120
101
|
}
|
|
121
102
|
} catch (e) {
|
|
122
103
|
if (!isQuiet) {
|
|
123
|
-
console.error(`✗
|
|
104
|
+
console.error(`✗ 保存配置失败: ${e.message}`);
|
|
124
105
|
}
|
|
125
106
|
process.exit(1);
|
|
126
107
|
}
|
|
108
|
+
|
|
127
109
|
}
|
|
128
110
|
|
|
129
111
|
function configureCursor() {
|
|
@@ -48,7 +48,7 @@ description: Cold-start knowledge base initialization. Full 9-dimension analysis
|
|
|
48
48
|
| 字段 | 类型 | 说明 |
|
|
49
49
|
|------|------|------|
|
|
50
50
|
| `language` | string | 主语言名称 |
|
|
51
|
-
| `extraDimensions` | array | 语言特有的额外分析维度(如 Swift Concurrency、ObjC Block 模式、Go goroutine/channel、Python async/decorator、Java Stream/Optional、Dart Widget/BLoC/Riverpod 等) |
|
|
51
|
+
| `extraDimensions` | array | 语言特有的额外分析维度(如 Swift Concurrency、ObjC Block 模式、Go goroutine/channel、Python async/decorator、Java Stream/Optional、Dart Widget/BLoC/Riverpod、Rust ownership/borrowing/lifetime/trait 等) |
|
|
52
52
|
| `typicalPatterns` | array | 该语言中典型的代码模式提示 |
|
|
53
53
|
| `commonAntiPatterns` | array | 该语言常见反模式(bad/why/fix) |
|
|
54
54
|
| `suggestedGuardRules` | array | 建议的 Guard 规则(pattern/severity/message) |
|
|
@@ -224,7 +224,7 @@ description: Cold-start knowledge base initialization. Full 9-dimension analysis
|
|
|
224
224
|
{
|
|
225
225
|
"title": "[must] UI 更新必须在主线程",
|
|
226
226
|
"trigger": "@agent-threading",
|
|
227
|
-
"code": "// ✅ 正确 — 使用语言/框架提供的主线程机制\n// Swift: @MainActor func updateUI() { ... }\n// JS/TS: 无需显式处理(单线程)但 Web Worker 返回需 postMessage\n// Python: 使用 loop.call_soon_threadsafe() 或框架 API\n// Go: 使用 channel 或 sync 包\n// Java/Kotlin: runOnUiThread { ... } 或 Dispatchers.Main\n\n// ❌ 错误 — 在后台线程直接操作 UI",
|
|
227
|
+
"code": "// ✅ 正确 — 使用语言/框架提供的主线程机制\n// Swift: @MainActor func updateUI() { ... }\n// JS/TS: 无需显式处理(单线程)但 Web Worker 返回需 postMessage\n// Python: 使用 loop.call_soon_threadsafe() 或框架 API\n// Go: 使用 channel 或 sync 包\n// Java/Kotlin: runOnUiThread { ... } 或 Dispatchers.Main\n// Rust: 使用 tokio::spawn + channel 或 Arc<Mutex<T>> 跨线程共享\n// Dart: 使用 WidgetsBinding.instance.addPostFrameCallback 或 setState\n\n// ❌ 错误 — 在后台线程直接操作 UI",
|
|
228
228
|
"summary_cn": "UI 更新必须在主线程/主 Actor 执行,违反会导致崩溃或数据竞争",
|
|
229
229
|
"summary_en": "UI updates must run on the main thread/actor to prevent crashes and data races",
|
|
230
230
|
"language": "<primaryLanguage>",
|
|
@@ -939,6 +939,7 @@ description: Cold-start knowledge base initialization. Full 9-dimension analysis
|
|
|
939
939
|
> - **autosnippet-reference-kotlin** — Kotlin 专属:空安全/协程/Flow/sealed class/DSL/Compose
|
|
940
940
|
> - **autosnippet-reference-go** — Go 专属:错误处理/接口组合/goroutine/channel/Context/测试
|
|
941
941
|
> - **autosnippet-reference-dart** — Dart (Flutter) 专属:空安全/Widget 设计/状态管理(BLoC/Riverpod)/Freezed/Clean Architecture/测试
|
|
942
|
+
> - **autosnippet-reference-rust** — Rust 专属:所有权/借用/生命周期/trait 系统/错误处理(Result/Option/?)/async-await/unsafe/宏/Cargo 约定
|
|
942
943
|
|
|
943
944
|
---
|
|
944
945
|
|
|
@@ -982,3 +983,4 @@ description: Cold-start knowledge base initialization. Full 9-dimension analysis
|
|
|
982
983
|
- **autosnippet-reference-kotlin**: Kotlin 业界最佳实践参考(空安全/协程/Flow/sealed class/DSL/Compose)
|
|
983
984
|
- **autosnippet-reference-go**: Go 业界最佳实践参考(错误处理/接口组合/goroutine/channel/Context/测试)
|
|
984
985
|
- **autosnippet-reference-dart**: Dart (Flutter) 业界最佳实践参考(空安全/Widget 设计/BLoC/Riverpod/Freezed/Clean Architecture/测试)
|
|
986
|
+
- **autosnippet-reference-rust**: Rust 业界最佳实践参考(所有权/借用/生命周期/trait 系统/错误处理/async-await/unsafe/Cargo 约定)
|
|
@@ -129,8 +129,10 @@ This is a conceptual map. Skills stay semantic; MCP provides capability.
|
|
|
129
129
|
- Java: `["import java.util.List;"]`
|
|
130
130
|
- Kotlin: `["import kotlinx.coroutines.*"]`
|
|
131
131
|
- JS/TS: `["import fs from 'node:fs'"]`
|
|
132
|
+
- Dart: `["import 'package:flutter/material.dart'"]`
|
|
133
|
+
- Rust: `["use std::collections::HashMap;"]`
|
|
132
134
|
- **`trigger`**: MUST start with `@` (e.g. `@request-manager`). kebab-case, no spaces.
|
|
133
|
-
- **`language`**: MUST be one of the supported languages (lowercase): `swift`, `objectivec`, `go`, `python`, `java`, `kotlin`, `javascript`, `typescript`.
|
|
135
|
+
- **`language`**: MUST be one of the supported languages (lowercase): `swift`, `objectivec`, `go`, `python`, `java`, `kotlin`, `javascript`, `typescript`, `dart`, `rust`.
|
|
134
136
|
- **`kind`**: MUST be one of: `rule`, `pattern`, `fact`.
|
|
135
137
|
- **`doClause`**: English imperative sentence, ≤60 tokens.
|
|
136
138
|
- **`description`**: 中文摘要 ≤80字。
|
|
@@ -169,7 +171,7 @@ This is a conceptual map. Skills stay semantic; MCP provides capability.
|
|
|
169
171
|
| `title` | 标准用法的名称 | 人工命名 | **必填**;**中文**;简短精准(✅ "颜色工具方法"、"异步请求处理";❌ 避免 "Use xxx");≤20 字 |
|
|
170
172
|
| `trigger` | 触发词(Snippet/检索) | 人工命名 | **必填**;`@` 开头,kebab-case、无空格;唯一 |
|
|
171
173
|
| `category` | 8 类标准分类 | 人工判断 | **必填**;必须为 8 类之一 |
|
|
172
|
-
| `language` | 代码语言 | 从代码确定 | **必填**;支持 `swift` / `objectivec` / `go` / `python` / `java` / `kotlin` / `javascript` / `typescript` |
|
|
174
|
+
| `language` | 代码语言 | 从代码确定 | **必填**;支持 `swift` / `objectivec` / `go` / `python` / `java` / `kotlin` / `javascript` / `typescript` / `dart` / `rust` |
|
|
173
175
|
| `kind` | 知识类型 | 人工/AI | **必填**;`rule` / `pattern` / `fact` |
|
|
174
176
|
| `doClause` | 英文祈使句指令 | AI/人工 | **必填**;≤60 tokens |
|
|
175
177
|
| `description` | 中文功能摘要 | 人工/AI | **必填**;≤80字 |
|
|
@@ -263,7 +265,7 @@ This is a conceptual map. Skills stay semantic; MCP provides capability.
|
|
|
263
265
|
- [ ] **doClause**: 英文祈使句(≠60 tokens)
|
|
264
266
|
- [ ] **description**: 中文摘要 ≤80字
|
|
265
267
|
- [ ] **category**: ONE of View/Service/Tool/Model/Network/Storage/UI/Utility
|
|
266
|
-
- [ ] **language**: `swift`/`objectivec`/`go`/`python`/`java`/`kotlin`/`javascript`/`typescript`
|
|
268
|
+
- [ ] **language**: `swift`/`objectivec`/`go`/`python`/`java`/`kotlin`/`javascript`/`typescript`/`dart`/`rust`
|
|
267
269
|
- [ ] **headers**: 完整 import 语句数组(无 import 传 `[]`)
|
|
268
270
|
- [ ] **usageGuide**: Markdown `###` 章节格式
|
|
269
271
|
- [ ] **knowledgeType**: `code-pattern` / `architecture` / `best-practice` 等
|