openclaw-lark-multi-agent 0.1.12 → 0.1.13
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/openclaw-client.js +16 -6
- package/package.json +1 -1
package/dist/openclaw-client.js
CHANGED
|
@@ -352,7 +352,14 @@ export class OpenClawClient {
|
|
|
352
352
|
});
|
|
353
353
|
// Prefer final chat message over accumulated deltas: some providers may
|
|
354
354
|
// emit only partial deltas (e.g. "N") while final contains "NO_REPLY".
|
|
355
|
-
|
|
355
|
+
const latestFinalText = chatFinalText || text;
|
|
356
|
+
if (latestFinalText) {
|
|
357
|
+
finish(latestFinalText);
|
|
358
|
+
}
|
|
359
|
+
else {
|
|
360
|
+
console.warn(`[OpenClaw] collectReply: empty chatFinal fallback ignored; waiting for real text or idle timeout`);
|
|
361
|
+
chatFinalTimer = null;
|
|
362
|
+
}
|
|
356
363
|
}, 5000);
|
|
357
364
|
}
|
|
358
365
|
}
|
|
@@ -369,7 +376,7 @@ export class OpenClawClient {
|
|
|
369
376
|
finish("NO_REPLY");
|
|
370
377
|
return;
|
|
371
378
|
}
|
|
372
|
-
if (!latestFinalText
|
|
379
|
+
if (!latestFinalText) {
|
|
373
380
|
const state = ev.data?.livenessState || "unknown";
|
|
374
381
|
const reason = ev.data?.stopReason || "";
|
|
375
382
|
const replayInvalid = ev.data?.replayInvalid ? ", replayInvalid" : "";
|
|
@@ -379,11 +386,14 @@ export class OpenClawClient {
|
|
|
379
386
|
replayInvalidTimer = setTimeout(() => finish(failureText), 120000);
|
|
380
387
|
return;
|
|
381
388
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
389
|
+
if (ev.data?.livenessState !== "working") {
|
|
390
|
+
finish(failureText);
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
console.warn(`[OpenClaw] empty lifecycle end ignored for runId=${evRunId || runId}; waiting for real text or idle timeout`);
|
|
394
|
+
return;
|
|
386
395
|
}
|
|
396
|
+
finish(latestFinalText);
|
|
387
397
|
};
|
|
388
398
|
// If lifecycle end beats chat final, a short delta like "N" can be a truncated
|
|
389
399
|
// final reply. Wait for chatFinal before resolving; otherwise suppress lone "N".
|