openclaw-xiaoyou 1.3.3 → 1.3.4

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/channel.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-xiaoyou",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "type": "module",
5
5
  "description": "Xiaoyou channel plugin for OpenClaw — connects enterprise services via persistent outbound WebSocket",
6
6
  "openclaw": {
package/src/channel.ts CHANGED
@@ -205,7 +205,7 @@ export const xiayouPlugin = {
205
205
  // 我们在 deliver 内部进一步按标点/换行拆分,实现更细粒度的流式推送。
206
206
  //
207
207
  const replyMessageId = `xiaoyou-${Date.now()}`;
208
- let chunkSeq = 0;
208
+ let chunkSeq = 1;
209
209
  let fullText = "";
210
210
  let replyEndSent = false;
211
211
 
@@ -257,7 +257,7 @@ export const xiayouPlugin = {
257
257
  });
258
258
 
259
259
  // dispatch resolve 后,如果 onComplete 未被调用(兼容),手动发 end
260
- if (!replyEndSent && chunkSeq > 0 && _client && _client.isConnected()) {
260
+ if (!replyEndSent && chunkSeq > 1 && _client && _client.isConnected()) {
261
261
  _client.sendReply({
262
262
  type: "reply",
263
263
  conversationId,
@@ -268,7 +268,7 @@ export const xiayouPlugin = {
268
268
  timestamp: Date.now(),
269
269
  });
270
270
  logger.info(`[xiaoyou] stream end (fallback) sent to ${conversationId} (${chunkSeq} chunks)${inboundMessageId ? ` (replyTo=${inboundMessageId})` : ""}`);
271
- } else if (chunkSeq === 0) {
271
+ } else if (chunkSeq === 1) {
272
272
  logger.warn(`[xiaoyou] no reply generated for ${conversationId}`);
273
273
  }
274
274
  },