@ynhcj/xiaoyi-channel 0.0.228-next → 0.0.230-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.
- package/dist/src/reply-dispatcher.js +4 -11
- package/package.json +1 -1
|
@@ -206,6 +206,10 @@ export function createXYReplyDispatcher(params) {
|
|
|
206
206
|
// 捕获权威最终文本(canonical,来自最后一条 assistant 消息,
|
|
207
207
|
// 非流式累计),供 onIdle 拼接最终帧。compaction 通知不是答案
|
|
208
208
|
// 文本,不能污染 finalReplyText。
|
|
209
|
+
// ⚙️ 前缀是 openclaw 系统消息的稳定标记(infra/system-message.ts
|
|
210
|
+
// SYSTEM_MARK),如 ACP 绑定会话投递的 "Session ids resolved"
|
|
211
|
+
// 诊断通知 —— 它会在同一 run 内尾随真实答案以 kind=final 投递,
|
|
212
|
+
// 若被捕获,最终帧会把客户端气泡里的答案整体替换成通知文本。
|
|
209
213
|
if (info?.kind === "final" && !payload.isCompactionNotice) {
|
|
210
214
|
finalReplyText = text;
|
|
211
215
|
scopedLog().log(`[DELIVER] Captured final reply text, length=${finalReplyText.length}`);
|
|
@@ -215,17 +219,6 @@ export function createXYReplyDispatcher(params) {
|
|
|
215
219
|
scopedLog().log(`[DELIVER SKIP] Already sent via onPartialReply`);
|
|
216
220
|
return;
|
|
217
221
|
}
|
|
218
|
-
hasSentResponse = true;
|
|
219
|
-
// 非流式回退路径(onPartialReply 未触发时)
|
|
220
|
-
await sendA2AResponse({
|
|
221
|
-
config,
|
|
222
|
-
sessionId,
|
|
223
|
-
taskId: getActiveTaskId(),
|
|
224
|
-
messageId: getActiveMessageId(),
|
|
225
|
-
text,
|
|
226
|
-
append: false,
|
|
227
|
-
final: false,
|
|
228
|
-
});
|
|
229
222
|
}
|
|
230
223
|
catch (deliverError) {
|
|
231
224
|
scopedLog().error(`Failed to deliver message:`, deliverError);
|