galaxy-opc 0.3.5 → 0.3.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/bin/cli.mjs +10 -15
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -225,20 +225,12 @@ ${bold(cyan(" ╚════════════════════
|
|
|
225
225
|
|
|
226
226
|
async function installPlugin() {
|
|
227
227
|
// 清理可能残留的旧插件路径配置,否则 openclaw 会因路径不存在而拒绝启动
|
|
228
|
+
// 清理所有可能导致 openclaw 启动失败的残留插件配置
|
|
228
229
|
const cfg = readJson(CONFIG_PATH);
|
|
229
|
-
|
|
230
|
-
if (cfg.plugins?.load?.paths?.length) {
|
|
231
|
-
delete cfg.plugins.load.paths;
|
|
232
|
-
dirty = true;
|
|
233
|
-
}
|
|
234
|
-
if (cfg.plugins?.load && Object.keys(cfg.plugins.load).length === 0) {
|
|
230
|
+
if (cfg.plugins) {
|
|
235
231
|
delete cfg.plugins.load;
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
delete cfg.plugins.entries["opc-platform"];
|
|
239
|
-
dirty = true;
|
|
240
|
-
}
|
|
241
|
-
if (dirty) {
|
|
232
|
+
delete cfg.plugins.installs;
|
|
233
|
+
delete cfg.plugins.entries;
|
|
242
234
|
writeJson(CONFIG_PATH, cfg);
|
|
243
235
|
console.log(dim(" 已清理旧插件配置"));
|
|
244
236
|
}
|
|
@@ -269,9 +261,12 @@ async function cmdSetup() {
|
|
|
269
261
|
gateway: { mode: "local" },
|
|
270
262
|
});
|
|
271
263
|
|
|
272
|
-
// 清理残留的旧插件路径(由旧版向导写入,openclaw
|
|
273
|
-
if (newConfig.plugins
|
|
274
|
-
|
|
264
|
+
// 清理残留的旧插件路径(由旧版向导写入,openclaw 会因路径/entry不存在报错)
|
|
265
|
+
if (newConfig.plugins) {
|
|
266
|
+
delete newConfig.plugins.load;
|
|
267
|
+
delete newConfig.plugins.installs;
|
|
268
|
+
delete newConfig.plugins.entries;
|
|
269
|
+
}
|
|
275
270
|
|
|
276
271
|
const regionIdx = await askChoice("选择 AI 模型地区", [
|
|
277
272
|
{ label: "国产模型", desc: "通义千问 / MiniMax / 豆包 / Kimi / DeepSeek", recommended: true },
|