qidao-openclaw-plugin 1.2.6 → 1.2.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/package.json +1 -1
- package/src/index.js +5 -4
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -71,12 +71,13 @@ const qidaoChannel = {
|
|
|
71
71
|
console.log('请访问栖岛官方网站完成认证后,输入获取到的 chatId');
|
|
72
72
|
console.log('');
|
|
73
73
|
|
|
74
|
-
const
|
|
74
|
+
const chatIdInput = await prompter.text({
|
|
75
75
|
message: '请输入栖岛 Chat ID:',
|
|
76
76
|
default: qidaoConfig.chatId?.toString() || '',
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
// 检查输入是否为空或只有空格
|
|
80
|
+
if (!chatIdInput || chatIdInput.trim() === '') {
|
|
80
81
|
console.log('未输入 chatId,取消配置');
|
|
81
82
|
return { cfg };
|
|
82
83
|
}
|
|
@@ -93,8 +94,8 @@ const qidaoChannel = {
|
|
|
93
94
|
...cfg.channels,
|
|
94
95
|
qidao: {
|
|
95
96
|
enabled: true,
|
|
96
|
-
chatId: parseInt(
|
|
97
|
-
serverUrl: serverUrl || 'wss://oc.qidao.chat/ws',
|
|
97
|
+
chatId: parseInt(chatIdInput.trim()),
|
|
98
|
+
serverUrl: (serverUrl && serverUrl.trim()) || 'wss://oc.qidao.chat/ws',
|
|
98
99
|
},
|
|
99
100
|
},
|
|
100
101
|
};
|