openclaw-sync-assistant 0.0.6 → 0.0.7
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/index.js +16 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -18,9 +18,22 @@ module.exports = {
|
|
|
18
18
|
console.log("✅ openclaw-sync-assistant 插件已激活!");
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
// 对于一些旧版本的 OpenClaw 或不同规范,可能需要挂载在 extensions 对象上
|
|
22
|
+
if (
|
|
23
|
+
context.api &&
|
|
24
|
+
context.api.commands &&
|
|
25
|
+
typeof context.api.commands.registerCommand === "function"
|
|
26
|
+
) {
|
|
27
|
+
try {
|
|
28
|
+
context.api.commands.registerCommand("sync.setup", () =>
|
|
29
|
+
this.executeCommand("sync.setup", {}, context),
|
|
30
|
+
);
|
|
31
|
+
} catch (e) {
|
|
32
|
+
if (process.env.DEBUG === "openclaw:sync") {
|
|
33
|
+
console.error(e);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
24
37
|
},
|
|
25
38
|
|
|
26
39
|
/**
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED