@bgicli/bgicli 2.2.2 → 2.2.3
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/bgi.js +27 -7
- package/package.json +1 -1
package/dist/bgi.js
CHANGED
|
@@ -15144,14 +15144,34 @@ ${summary}` },
|
|
|
15144
15144
|
case "sk": {
|
|
15145
15145
|
if (!arg) {
|
|
15146
15146
|
listSkills();
|
|
15147
|
+
break;
|
|
15148
|
+
}
|
|
15149
|
+
const allSkills = collectAllSkills();
|
|
15150
|
+
const idMatch = allSkills.find((e2) => e2.id === arg || e2.id.startsWith(arg) || e2.id.includes(arg));
|
|
15151
|
+
if (idMatch) {
|
|
15152
|
+
injectSkill(arg, history);
|
|
15153
|
+
break;
|
|
15154
|
+
}
|
|
15155
|
+
const { routes, topScore } = routeSkill(arg);
|
|
15156
|
+
if (routes.length === 0 || topScore < 4) {
|
|
15157
|
+
listSkills(arg);
|
|
15158
|
+
break;
|
|
15159
|
+
}
|
|
15160
|
+
if (routes.length === 1 || topScore >= 10) {
|
|
15161
|
+
console.log(source_default.dim(`\u6839\u636E\u63CF\u8FF0\u5339\u914D\u5230: ${routes[0].id}`));
|
|
15162
|
+
injectSkill(routes[0].id, history);
|
|
15147
15163
|
} else {
|
|
15148
|
-
|
|
15149
|
-
|
|
15150
|
-
|
|
15151
|
-
|
|
15152
|
-
|
|
15153
|
-
|
|
15154
|
-
|
|
15164
|
+
console.log(source_default.bold(`
|
|
15165
|
+
\u6839\u636E\u63CF\u8FF0\u63A8\u8350\u4EE5\u4E0B Skills:
|
|
15166
|
+
`));
|
|
15167
|
+
routes.forEach((r2, i2) => {
|
|
15168
|
+
const marker = i2 === 0 ? source_default.green("\u25B6") : source_default.dim(" ");
|
|
15169
|
+
console.log(` ${marker} ${source_default.cyan(r2.id)} \u2014 ${r2.name}`);
|
|
15170
|
+
if (i2 > 0) console.log(source_default.dim(` /sk ${r2.id} \u53EF\u6FC0\u6D3B\u6B64\u9879`));
|
|
15171
|
+
});
|
|
15172
|
+
console.log();
|
|
15173
|
+
console.log(source_default.dim("\u5DF2\u81EA\u52A8\u6FC0\u6D3B\u7B2C\u4E00\u4E2A\uFF0C\u5982\u9700\u5207\u6362\u8BF7\u4F7F\u7528\u4E0A\u65B9\u547D\u4EE4"));
|
|
15174
|
+
injectSkill(routes[0].id, history);
|
|
15155
15175
|
}
|
|
15156
15176
|
break;
|
|
15157
15177
|
}
|