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.
- package/package.json +1 -1
- package/src/channel.ts +3 -3
package/package.json
CHANGED
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 =
|
|
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 >
|
|
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 ===
|
|
271
|
+
} else if (chunkSeq === 1) {
|
|
272
272
|
logger.warn(`[xiaoyou] no reply generated for ${conversationId}`);
|
|
273
273
|
}
|
|
274
274
|
},
|