@ynhcj/xiaoyi-channel 0.0.148-next → 0.0.149-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.
@@ -166,8 +166,7 @@ export function createXYReplyDispatcher(params) {
166
166
  const text = payload.text ?? "";
167
167
  const currentTaskId = getActiveTaskId();
168
168
  const currentMessageId = getActiveMessageId();
169
- // 🔑 诊断日志:确认 deliver 是否被调用及与 onPartialReply 的时序关系
170
- scopedLog().log(`[DELIVER] Called, kind=${info?.kind}, text.length=${text.length}, hasSentResponse=${hasSentResponse}, preview="${text.slice(0, 50)}"`);
169
+ scopedLog().log(`[DELIVER] kind=${info?.kind}, text.length=${text.length}`);
171
170
  try {
172
171
  if (!text.trim()) {
173
172
  scopedLog().log(`[DELIVER SKIP] Empty text, skipping`);
@@ -175,12 +174,11 @@ export function createXYReplyDispatcher(params) {
175
174
  }
176
175
  // 🔑 如果 onPartialReply 已经流式发送过文本,deliver 不再重复发送
177
176
  if (hasSentResponse) {
178
- scopedLog().log(`[DELIVER SKIP] Already sent via onPartialReply, skipping duplicate delivery`);
177
+ scopedLog().log(`[DELIVER SKIP] Already sent via onPartialReply`);
179
178
  return;
180
179
  }
181
180
  accumulatedText += text;
182
181
  hasSentResponse = true;
183
- scopedLog().log(`[DELIVER] First delivery, sending via A2A response, length=${text.length}`);
184
182
  // 🔑 使用动态taskId发送A2A响应(流式append)
185
183
  await sendA2AResponse({
186
184
  config,
@@ -191,7 +189,6 @@ export function createXYReplyDispatcher(params) {
191
189
  append: true,
192
190
  final: false,
193
191
  });
194
- scopedLog().log(`[DELIVER] Sent deliver text as A2A response`);
195
192
  }
196
193
  catch (deliverError) {
197
194
  scopedLog().error(`Failed to deliver message:`, deliverError);
@@ -400,8 +397,7 @@ export function createXYReplyDispatcher(params) {
400
397
  const currentTaskId = getActiveTaskId();
401
398
  const currentMessageId = getActiveMessageId();
402
399
  const text = payload.text ?? "";
403
- // 🔑 诊断日志:确认 onReasoningStream 是否被触发
404
- scopedLog().log(`[REASONING-STREAM] *** CALLED *** text.length=${text.length}, preview="${text.slice(0, 80)}"`);
400
+ scopedLog().log(`[REASONING-STREAM] text.length=${text.length}`);
405
401
  try {
406
402
  if (text.length > 0) {
407
403
  // 🔑 将模型真实的thinking/reasoning内容通过reasoningText转发
@@ -413,7 +409,6 @@ export function createXYReplyDispatcher(params) {
413
409
  text,
414
410
  append: true,
415
411
  });
416
- scopedLog().log(`[REASONING-STREAM] Sent via sendReasoningTextUpdate(append:true)`);
417
412
  }
418
413
  }
419
414
  catch (err) {
@@ -428,8 +423,7 @@ export function createXYReplyDispatcher(params) {
428
423
  const currentTaskId = getActiveTaskId();
429
424
  const currentMessageId = getActiveMessageId();
430
425
  const text = payload.text ?? "";
431
- // 🔑 诊断日志:确认 onPartialReply 是否被调用及内容
432
- scopedLog().log(`[PARTIAL-REPLY] Called, text.length=${text.length}, preview="${text.slice(0, 50)}"`);
426
+ scopedLog().log(`[PARTIAL-REPLY] text.length=${text.length}`);
433
427
  try {
434
428
  if (text.length > 0) {
435
429
  accumulatedText += text;
@@ -441,10 +435,9 @@ export function createXYReplyDispatcher(params) {
441
435
  taskId: currentTaskId,
442
436
  messageId: currentMessageId,
443
437
  text,
444
- append: true,
438
+ append: false,
445
439
  final: false,
446
440
  });
447
- scopedLog().log(`[PARTIAL-REPLY] Sent via sendA2AResponse(append:true, final:false)`);
448
441
  }
449
442
  }
450
443
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.148-next",
3
+ "version": "0.0.149-next",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",