mcp-probe-kit 2.2.0 → 2.2.1
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/build/tools/gencommit.d.ts +1 -1
- package/build/tools/gencommit.js +10 -19
- package/docs/pages/all-tools.html +97 -4
- package/docs/styles/page.css +9 -5
- package/package.json +1 -1
package/build/tools/gencommit.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { parseArgs, getString } from "../utils/parseArgs.js";
|
|
2
|
-
import { okStructured } from "../lib/response.js";
|
|
3
|
-
import { CommitMessageSchema } from "../schemas/structured-output.js";
|
|
4
2
|
// gencommit 工具实现
|
|
5
3
|
export async function gencommit(args) {
|
|
6
4
|
try {
|
|
@@ -112,24 +110,17 @@ chore: 🤖 升级依赖版本至 1.2.9
|
|
|
112
110
|
- 如果暂存区为空,提示用户先使用 \`git add\` 添加文件
|
|
113
111
|
- 如果变更较多,建议分多次提交
|
|
114
112
|
- 确保 commit 消息清晰描述了"做了什么"和"为什么"`;
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
113
|
+
// 返回纯文本指导
|
|
114
|
+
// AI 会根据这些指导分析代码变更并生成符合规范的 commit 消息
|
|
115
|
+
return {
|
|
116
|
+
content: [
|
|
117
|
+
{
|
|
118
|
+
type: "text",
|
|
119
|
+
text: textMessage,
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
isError: false,
|
|
125
123
|
};
|
|
126
|
-
// 返回结构化输出
|
|
127
|
-
// textMessage 提供人类可读的指导信息
|
|
128
|
-
// exampleCommitData 提供结构化数据示例(AI 会根据实际情况生成真实数据)
|
|
129
|
-
return okStructured(textMessage, exampleCommitData, {
|
|
130
|
-
schema: CommitMessageSchema,
|
|
131
|
-
note: 'AI 应该根据实际代码变更生成真实的 commit 数据,而不是使用这个示例',
|
|
132
|
-
});
|
|
133
124
|
}
|
|
134
125
|
catch (error) {
|
|
135
126
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -477,6 +477,72 @@
|
|
|
477
477
|
submenu.classList.toggle('expanded');
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
+
// 工具简短描述(最多4个字)
|
|
481
|
+
const toolDescriptions = {
|
|
482
|
+
// 工作流编排
|
|
483
|
+
'start_feature': '新功能',
|
|
484
|
+
'start_bugfix': '修Bug',
|
|
485
|
+
'start_review': '代码审查',
|
|
486
|
+
'start_release': '发版本',
|
|
487
|
+
'start_refactor': '重构',
|
|
488
|
+
'start_onboard': '快速上手',
|
|
489
|
+
'start_api': 'API开发',
|
|
490
|
+
'start_doc': '写文档',
|
|
491
|
+
'start_ui': 'UI开发',
|
|
492
|
+
'start_ralph': '循环开发',
|
|
493
|
+
|
|
494
|
+
// 代码分析
|
|
495
|
+
'code_review': '审查代码',
|
|
496
|
+
'security_scan': '安全扫描',
|
|
497
|
+
'debug': '调试',
|
|
498
|
+
'perf': '性能优化',
|
|
499
|
+
'refactor': '重构建议',
|
|
500
|
+
'fix_bug': '修复Bug',
|
|
501
|
+
'estimate': '工作量',
|
|
502
|
+
|
|
503
|
+
// Git 工具
|
|
504
|
+
'gencommit': '生成提交',
|
|
505
|
+
'genchangelog': '生成日志',
|
|
506
|
+
'genpr': '生成PR',
|
|
507
|
+
'resolve_conflict': '解决冲突',
|
|
508
|
+
|
|
509
|
+
// 生成工具
|
|
510
|
+
'genapi': 'API文档',
|
|
511
|
+
'gendoc': '生成注释',
|
|
512
|
+
'gentest': '生成测试',
|
|
513
|
+
'gensql': '生成SQL',
|
|
514
|
+
'genreadme': '生成说明',
|
|
515
|
+
'gen_mock': '生成数据',
|
|
516
|
+
'genui': '生成UI',
|
|
517
|
+
|
|
518
|
+
// 项目管理
|
|
519
|
+
'init_project': '初始化',
|
|
520
|
+
'analyze_project': '分析项目',
|
|
521
|
+
'init_project_context': '项目上下文',
|
|
522
|
+
'add_feature': '添加功能',
|
|
523
|
+
'check_deps': '检查依赖',
|
|
524
|
+
'interview': '需求访谈',
|
|
525
|
+
'ask_user': '提问用户',
|
|
526
|
+
|
|
527
|
+
// UI/UX 工具
|
|
528
|
+
'ui_design_system': '设计系统',
|
|
529
|
+
'ui_search': '搜索UI',
|
|
530
|
+
'sync_ui_data': '同步数据',
|
|
531
|
+
'init_component_catalog': '组件目录',
|
|
532
|
+
'render_ui': '渲染UI',
|
|
533
|
+
'design2code': '设计转码',
|
|
534
|
+
|
|
535
|
+
// 其他工具
|
|
536
|
+
'fix': '修复',
|
|
537
|
+
'split': '拆分',
|
|
538
|
+
'convert': '转换',
|
|
539
|
+
'explain': '解释',
|
|
540
|
+
'css_order': 'CSS排序',
|
|
541
|
+
'detect_shell': '检测Shell',
|
|
542
|
+
'init_setting': '初始设置',
|
|
543
|
+
'gen_skill': '生成技能'
|
|
544
|
+
};
|
|
545
|
+
|
|
480
546
|
// 生成侧边栏工具列表
|
|
481
547
|
function generateSidebarTools() {
|
|
482
548
|
const submenu = document.getElementById('tools-submenu');
|
|
@@ -488,9 +554,12 @@
|
|
|
488
554
|
|
|
489
555
|
tools.forEach(tool => {
|
|
490
556
|
const toolId = tool.name.replace(/_/g, '-');
|
|
557
|
+
const desc = toolDescriptions[tool.name] || '';
|
|
558
|
+
const displayText = desc ? `${tool.name} (${desc})` : tool.name;
|
|
559
|
+
|
|
491
560
|
html += `
|
|
492
|
-
<a href="
|
|
493
|
-
${
|
|
561
|
+
<a href="javascript:void(0)" class="nav-subitem" onclick="scrollToTool('${toolId}', event)" title="${tool.description}">
|
|
562
|
+
${displayText}
|
|
494
563
|
</a>
|
|
495
564
|
`;
|
|
496
565
|
});
|
|
@@ -500,10 +569,34 @@
|
|
|
500
569
|
}
|
|
501
570
|
|
|
502
571
|
// 滚动到指定工具
|
|
503
|
-
function scrollToTool(toolId) {
|
|
572
|
+
function scrollToTool(toolId, event) {
|
|
573
|
+
// 阻止默认行为
|
|
574
|
+
if (event) {
|
|
575
|
+
event.preventDefault();
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// 移除所有选中状态
|
|
579
|
+
document.querySelectorAll('.nav-subitem').forEach(item => {
|
|
580
|
+
item.classList.remove('active');
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
// 添加当前选中状态
|
|
584
|
+
if (event && event.currentTarget) {
|
|
585
|
+
event.currentTarget.classList.add('active');
|
|
586
|
+
}
|
|
587
|
+
|
|
504
588
|
const element = document.getElementById(toolId);
|
|
505
589
|
if (element) {
|
|
506
|
-
|
|
590
|
+
// 计算滚动位置,留出 header 高度 (60px) + 间距 (40px)
|
|
591
|
+
const headerHeight = 100;
|
|
592
|
+
const elementPosition = element.getBoundingClientRect().top + window.pageYOffset;
|
|
593
|
+
const offsetPosition = elementPosition - headerHeight;
|
|
594
|
+
|
|
595
|
+
window.scrollTo({
|
|
596
|
+
top: offsetPosition,
|
|
597
|
+
behavior: 'smooth'
|
|
598
|
+
});
|
|
599
|
+
|
|
507
600
|
// 高亮显示
|
|
508
601
|
element.style.transition = 'background 0.3s';
|
|
509
602
|
element.style.background = 'rgba(37, 99, 235, 0.05)';
|
package/docs/styles/page.css
CHANGED
|
@@ -126,7 +126,7 @@ body {
|
|
|
126
126
|
|
|
127
127
|
/* ========== Sidebar ========== */
|
|
128
128
|
.sidebar {
|
|
129
|
-
width:
|
|
129
|
+
width: 300px;
|
|
130
130
|
background: var(--bg-card);
|
|
131
131
|
border-right: 1px solid var(--border);
|
|
132
132
|
position: fixed;
|
|
@@ -246,14 +246,18 @@ body {
|
|
|
246
246
|
|
|
247
247
|
.nav-subitem {
|
|
248
248
|
display: block;
|
|
249
|
-
padding: 8px
|
|
250
|
-
margin: 2px
|
|
249
|
+
padding: 8px 16px 8px 40px;
|
|
250
|
+
margin: 2px 8px;
|
|
251
251
|
color: var(--text-secondary);
|
|
252
252
|
text-decoration: none;
|
|
253
253
|
transition: all 0.2s;
|
|
254
254
|
border-radius: 6px;
|
|
255
|
-
font-size:
|
|
255
|
+
font-size: 12px;
|
|
256
256
|
position: relative;
|
|
257
|
+
white-space: nowrap;
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
text-overflow: ellipsis;
|
|
260
|
+
font-family: 'Courier New', monospace;
|
|
257
261
|
}
|
|
258
262
|
|
|
259
263
|
.nav-subitem:hover {
|
|
@@ -350,7 +354,7 @@ body {
|
|
|
350
354
|
/* ========== Main Content ========== */
|
|
351
355
|
.main-content {
|
|
352
356
|
flex: 1;
|
|
353
|
-
margin-left:
|
|
357
|
+
margin-left: 300px;
|
|
354
358
|
display: flex;
|
|
355
359
|
flex-direction: column;
|
|
356
360
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-probe-kit",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "AI-Powered Development Toolkit - MCP Server with 39 practical tools covering code quality, development efficiency, project management, and UI/UX design. Features: Structured Output, Workflow Orchestration, UI/UX Pro Max, and Requirements Interview.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|