优化第一阶段

This commit is contained in:
yinsx
2025-12-22 12:07:12 +08:00
parent dd99e932b4
commit 1df41ac4ab
38 changed files with 340 additions and 300 deletions

View File

@ -33,7 +33,11 @@ while (true) {
console.log(color.cyan("\n正在启动: " + selected.name + "...\n"));
try {
const result = await selected.tool.run();
const runner = selected.run || selected.tool?.run;
if (typeof runner !== "function") {
throw new Error("当前菜单项缺少 run 方法");
}
const result = await runner();
if (result === "back") continue;
break;
} catch (err) {