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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidao-openclaw-plugin",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "description": "OpenClaw 栖岛聊天 Channel 插件 - 连接到栖岛聊天服务",
package/src/index.js CHANGED
@@ -136,9 +136,14 @@ export default function register(api) {
136
136
  // 注册认证命令
137
137
  registerAuthCommand(api);
138
138
 
139
- setImmediate(async () => {
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
  }