@ynhcj/xiaoyi-channel 0.0.185-next → 0.0.186-next

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.
@@ -164,7 +164,6 @@ function createRetryingStream(createStream, cronJob) {
164
164
  // suspends and can never reach resolve, causing a permanent deadlock.
165
165
  if (event.type === "done") {
166
166
  logger.log(`[xiaoyiprovider] stream completed, usage: input=${event.message?.usage?.input} output=${event.message?.usage?.output}`);
167
- logger.log(`[xiaoyiprovider] full model response: ${JSON.stringify(fullResponseEvents)}`);
168
167
  resultResolve(event.message);
169
168
  yield event;
170
169
  return;
@@ -187,6 +187,8 @@ export function createXYReplyDispatcher(params) {
187
187
  scopedLog().log(`[DELIVER SKIP] Already sent via onPartialReply`);
188
188
  return;
189
189
  }
190
+ // DEBUG: 记录 deliver 发送内容
191
+ scopedLog().log(`[DEBUG-DEDUP] deliver: text_len=${text.length}, accumulated_len=${accumulatedText.length}, text_preview="${text.slice(0, 100)}", accumulated_preview="${accumulatedText.slice(0, 100)}"`);
190
192
  accumulatedText += text;
191
193
  hasSentResponse = true;
192
194
  // 🔑 使用动态taskId发送A2A响应(流式append)
@@ -424,9 +426,12 @@ export function createXYReplyDispatcher(params) {
424
426
  // 模型可能返回完整文本(非纯增量),如果新文本以已累积内容开头,
425
427
  // 则只取新增的后缀部分,避免 append 模式下重复拼接。
426
428
  let sendText = text;
427
- if (accumulatedText.length > 0 && text.startsWith(accumulatedText)) {
429
+ const dedupApplied = accumulatedText.length > 0 && text.startsWith(accumulatedText);
430
+ if (dedupApplied) {
428
431
  sendText = text.slice(accumulatedText.length);
429
432
  }
433
+ // DEBUG: 记录 onPartialReply 去重详情
434
+ scopedLog().log(`[DEBUG-DEDUP] onPartialReply: text_len=${text.length}, accumulated_len=${accumulatedText.length}, sendText_len=${sendText.length}, dedup=${dedupApplied}, text_preview="${text.slice(0, 100)}", accumulated_preview="${accumulatedText.slice(0, 100)}", sendText_preview="${sendText.slice(0, 100)}"`);
430
435
  accumulatedText += sendText;
431
436
  hasSentResponse = true;
432
437
  if (sendText.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.185-next",
3
+ "version": "0.0.186-next",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,7 +49,7 @@
49
49
  }
50
50
  },
51
51
  "peerDependencies": {
52
- "openclaw": ">=2026.5.6"
52
+ "openclaw": ">=2026.6.6"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "openclaw": {