qidao-openclaw-plugin 1.2.7 → 1.2.8
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 +7 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -136,9 +136,14 @@ export default function register(api) {
|
|
|
136
136
|
// 注册认证命令
|
|
137
137
|
registerAuthCommand(api);
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
// 延迟初始化,确保配置已加载
|
|
140
|
+
setTimeout(async () => {
|
|
140
141
|
try {
|
|
141
142
|
const cfg = api.getGatewayConfig?.() || {};
|
|
143
|
+
|
|
144
|
+
// 调试日志
|
|
145
|
+
api.logger.info(`栖岛聊天配置: ${JSON.stringify(cfg.channels?.qidao || {})}`);
|
|
146
|
+
|
|
142
147
|
const account = qidaoChannel.config.resolveAccount(cfg);
|
|
143
148
|
|
|
144
149
|
if (!account.enabled) {
|
|
@@ -191,7 +196,7 @@ export default function register(api) {
|
|
|
191
196
|
} catch (error) {
|
|
192
197
|
api.logger.error(`栖岛聊天插件初始化失败: ${error.message}`);
|
|
193
198
|
}
|
|
194
|
-
});
|
|
199
|
+
}, 2000); // 延迟2秒,确保配置已加载
|
|
195
200
|
|
|
196
201
|
api.logger.info('栖岛聊天插件加载完成');
|
|
197
202
|
}
|