qidao-openclaw-plugin 1.2.1 → 1.2.2
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/package.json +1 -1
- package/src/index.js +36 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -36,6 +36,42 @@ const qidaoChannel = {
|
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
|
|
39
|
+
onboarding: {
|
|
40
|
+
configure: async ({ cfg, prompter }) => {
|
|
41
|
+
const qidaoConfig = cfg.channels?.qidao ?? {};
|
|
42
|
+
|
|
43
|
+
const chatId = await prompter.text({
|
|
44
|
+
message: '请输入栖岛 Chat ID:',
|
|
45
|
+
default: qidaoConfig.chatId?.toString() || '',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const userId = await prompter.text({
|
|
49
|
+
message: '请输入栖岛 User ID (可选):',
|
|
50
|
+
default: qidaoConfig.userId?.toString() || '',
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const serverUrl = await prompter.text({
|
|
54
|
+
message: '请输入服务器地址:',
|
|
55
|
+
default: qidaoConfig.serverUrl || 'wss://oc.qidao.chat/ws',
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const newCfg = {
|
|
59
|
+
...cfg,
|
|
60
|
+
channels: {
|
|
61
|
+
...cfg.channels,
|
|
62
|
+
qidao: {
|
|
63
|
+
enabled: true,
|
|
64
|
+
chatId: parseInt(chatId),
|
|
65
|
+
userId: userId ? parseInt(userId) : undefined,
|
|
66
|
+
serverUrl,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return { cfg: newCfg, accountId: 'default' };
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
|
|
39
75
|
outbound: {
|
|
40
76
|
deliveryMode: 'direct',
|
|
41
77
|
|