@wendongfly/myhi 1.3.19 → 1.3.21
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/dist/chat.html +60 -2
- package/dist/index.js +1 -1
- package/dist/index.min.js +87 -87
- package/package.json +1 -1
package/dist/chat.html
CHANGED
|
@@ -458,7 +458,8 @@
|
|
|
458
458
|
<div class="action-sheet-title" style="display:flex;align-items:center;justify-content:space-between;text-align:left">
|
|
459
459
|
<span id="skill-sheet-title">技能管理</span>
|
|
460
460
|
<div style="display:flex;gap:0.4rem">
|
|
461
|
-
<button onclick="
|
|
461
|
+
<button onclick="showSkillMarket()" style="background:#21262d;color:#c9d1d9;border:1px solid #30363d;border-radius:6px;padding:0.3rem 0.7rem;font-size:0.75rem;cursor:pointer">市场</button>
|
|
462
|
+
<button onclick="showSkillImport()" style="background:#21262d;color:#c9d1d9;border:1px solid #30363d;border-radius:6px;padding:0.3rem 0.7rem;font-size:0.75rem;cursor:pointer">Git</button>
|
|
462
463
|
<button onclick="showSkillEditor()" style="background:#7c3aed;color:#fff;border:none;border-radius:6px;padding:0.3rem 0.7rem;font-size:0.75rem;cursor:pointer">+ 新建</button>
|
|
463
464
|
</div>
|
|
464
465
|
</div>
|
|
@@ -486,6 +487,10 @@
|
|
|
486
487
|
<input id="skill-git-url" class="slash-inp" placeholder="Git 仓库地址 (https:// 或 git@...)" autocomplete="off" style="flex:1">
|
|
487
488
|
<button onclick="scanGitSkills()" style="background:#7c3aed;color:#fff;border:none;border-radius:8px;padding:0.5rem 0.8rem;font-size:0.82rem;cursor:pointer;white-space:nowrap">扫描</button>
|
|
488
489
|
</div>
|
|
490
|
+
<div id="skill-git-auth" style="display:flex;gap:0.4rem">
|
|
491
|
+
<input id="skill-git-user" class="slash-inp" placeholder="用户名 (可选)" autocomplete="off" style="flex:1">
|
|
492
|
+
<input id="skill-git-pass" class="slash-inp" placeholder="密码/Token (可选)" type="password" autocomplete="off" style="flex:1">
|
|
493
|
+
</div>
|
|
489
494
|
<select id="skill-import-scope" class="slash-inp" style="background:#0d1117;color:#c9d1d9;border:1px solid #30363d;border-radius:8px;padding:0.5rem;font-size:0.82rem">
|
|
490
495
|
<option value="user">安装到用户级 (~/.claude/commands/)</option>
|
|
491
496
|
<option value="project">安装到项目级 (.claude/commands/)</option>
|
|
@@ -496,6 +501,11 @@
|
|
|
496
501
|
<button id="skill-import-install-btn" class="action-sheet-cancel" style="display:none;background:#3fb950;color:#000;font-weight:600;margin-bottom:0.4rem" onclick="installGitSkills()">安装选中的技能</button>
|
|
497
502
|
<button class="action-sheet-cancel" onclick="backToSkillList()">返回列表</button>
|
|
498
503
|
</div>
|
|
504
|
+
<!-- 技能市场视图 -->
|
|
505
|
+
<div id="skill-market-view" style="display:none;flex:1;overflow-y:auto;scrollbar-width:thin;padding:0.3rem 0">
|
|
506
|
+
<div id="skill-market-list"></div>
|
|
507
|
+
<button class="action-sheet-cancel" onclick="backToSkillList()" style="margin-top:0.5rem">返回列表</button>
|
|
508
|
+
</div>
|
|
499
509
|
<button id="skill-close-btn" class="action-sheet-cancel" onclick="closeSkillSheet()">关闭</button>
|
|
500
510
|
</div>
|
|
501
511
|
</div>
|
|
@@ -2062,6 +2072,7 @@
|
|
|
2062
2072
|
document.getElementById('skill-list-view').style.display = '';
|
|
2063
2073
|
document.getElementById('skill-edit-view').style.display = 'none';
|
|
2064
2074
|
document.getElementById('skill-import-view').style.display = 'none';
|
|
2075
|
+
document.getElementById('skill-market-view').style.display = 'none';
|
|
2065
2076
|
document.getElementById('skill-close-btn').style.display = '';
|
|
2066
2077
|
document.getElementById('skill-sheet-title').textContent = '技能管理';
|
|
2067
2078
|
refreshSkillList();
|
|
@@ -2136,10 +2147,12 @@
|
|
|
2136
2147
|
document.getElementById('skill-import-preview').style.display = 'none';
|
|
2137
2148
|
document.getElementById('skill-import-install-btn').style.display = 'none';
|
|
2138
2149
|
try {
|
|
2150
|
+
const username = document.getElementById('skill-git-user').value.trim();
|
|
2151
|
+
const password = document.getElementById('skill-git-pass').value;
|
|
2139
2152
|
const resp = await fetch('/api/skills/scan-git', {
|
|
2140
2153
|
method: 'POST',
|
|
2141
2154
|
headers: { 'Content-Type': 'application/json' },
|
|
2142
|
-
body: JSON.stringify({ url }),
|
|
2155
|
+
body: JSON.stringify({ url, username: username || undefined, password: password || undefined }),
|
|
2143
2156
|
});
|
|
2144
2157
|
const data = await resp.json();
|
|
2145
2158
|
statusEl.innerHTML = '';
|
|
@@ -2198,6 +2211,51 @@
|
|
|
2198
2211
|
loadSkills();
|
|
2199
2212
|
};
|
|
2200
2213
|
|
|
2214
|
+
// ── 技能市场 ──────────────────────────────────
|
|
2215
|
+
const SKILL_MARKET = [
|
|
2216
|
+
{ name: 'Claude Command Suite', desc: '216+ 命令, 12 技能, 54 AI Agent — 全面的软件工程工作流', repo: 'qdhenry/Claude-Command-Suite', stars: '1k+', path: 'commands' },
|
|
2217
|
+
{ name: 'Production Commands', desc: '全栈开发、安全、数据/ML、DevOps 命令集', repo: 'wshobson/commands', stars: '500+', path: '' },
|
|
2218
|
+
{ name: 'Claude Slash Commands', desc: '轻量级常用命令集合,直接可用', repo: 'artemgetmann/claude-slash-commands', stars: '200+', path: '' },
|
|
2219
|
+
{ name: 'Claude Commands', desc: '自定义命令合集,附完整文档', repo: 'david-t-martel/claude-commands', stars: '100+', path: '' },
|
|
2220
|
+
{ name: 'Claude Code Skills', desc: '专业技能市场,生产级 Skill 合集', repo: 'daymade/claude-code-skills', stars: '100+', path: '' },
|
|
2221
|
+
{ name: 'My Claude Code', desc: '日常使用的精选命令和工作流', repo: 'vincenthopf/My-Claude-Code', stars: '50+', path: '' },
|
|
2222
|
+
];
|
|
2223
|
+
|
|
2224
|
+
window.showSkillMarket = function() {
|
|
2225
|
+
document.getElementById('skill-list-view').style.display = 'none';
|
|
2226
|
+
document.getElementById('skill-edit-view').style.display = 'none';
|
|
2227
|
+
document.getElementById('skill-import-view').style.display = 'none';
|
|
2228
|
+
document.getElementById('skill-market-view').style.display = '';
|
|
2229
|
+
document.getElementById('skill-close-btn').style.display = 'none';
|
|
2230
|
+
document.getElementById('skill-sheet-title').textContent = '技能市场';
|
|
2231
|
+
|
|
2232
|
+
const list = document.getElementById('skill-market-list');
|
|
2233
|
+
list.innerHTML = '<div style="font-size:0.72rem;color:#8b949e;padding:0.3rem 0.5rem;border-bottom:1px solid #21262d">热门社区技能仓库 · 点击安装</div>' +
|
|
2234
|
+
SKILL_MARKET.map((m, i) => `
|
|
2235
|
+
<div class="action-sheet-item" style="gap:0.5rem">
|
|
2236
|
+
<div style="min-width:0;flex:1;cursor:pointer" onclick="installFromMarket(${i})">
|
|
2237
|
+
<div style="font-weight:500">${escHtml(m.name)} <span style="color:#8b949e;font-size:0.7rem">★ ${m.stars}</span></div>
|
|
2238
|
+
<div class="desc">${escHtml(m.desc)}</div>
|
|
2239
|
+
<div style="color:#58a6ff;font-size:0.68rem">${escHtml(m.repo)}</div>
|
|
2240
|
+
</div>
|
|
2241
|
+
</div>
|
|
2242
|
+
`).join('') +
|
|
2243
|
+
'<div style="padding:0.6rem 0.5rem;font-size:0.72rem;color:#8b949e;border-top:1px solid #21262d">' +
|
|
2244
|
+
'更多: <a href="https://github.com/hesreallyhim/awesome-claude-code" target="_blank" style="color:#58a6ff">awesome-claude-code</a>' +
|
|
2245
|
+
' · <a href="https://skillsmp.com" target="_blank" style="color:#58a6ff">skillsmp.com</a>' +
|
|
2246
|
+
' · <a href="https://www.skillhub.club" target="_blank" style="color:#58a6ff">skillhub.club</a></div>';
|
|
2247
|
+
};
|
|
2248
|
+
|
|
2249
|
+
window.installFromMarket = async function(idx) {
|
|
2250
|
+
const m = SKILL_MARKET[idx];
|
|
2251
|
+
const url = `https://github.com/${m.repo}.git`;
|
|
2252
|
+
// 复用 Git 安装流程
|
|
2253
|
+
showSkillImport();
|
|
2254
|
+
document.getElementById('skill-git-url').value = url;
|
|
2255
|
+
// 自动触发扫描
|
|
2256
|
+
await scanGitSkills();
|
|
2257
|
+
};
|
|
2258
|
+
|
|
2201
2259
|
// ── Git 提交推送 ──────────────────────────────
|
|
2202
2260
|
const GIT_STORAGE_KEY = 'myhi-git-' + SESSION_ID;
|
|
2203
2261
|
|