openclaw-lark-multi-agent 1.2.7 → 1.2.8
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/feishu-bot.js +14 -4
- package/package.json +1 -1
package/dist/feishu-bot.js
CHANGED
|
@@ -1119,6 +1119,13 @@ export class FeishuBot {
|
|
|
1119
1119
|
const isNativeCommandTrigger = firstIsNative;
|
|
1120
1120
|
const lastHuman = mergedTriggers[mergedTriggers.length - 1];
|
|
1121
1121
|
const triggerId = lastHuman.id || 0;
|
|
1122
|
+
// Snapshot the stop generation BEFORE the main run starts. If the user runs
|
|
1123
|
+
// /stop at any point during the main run, handleStopCommand bumps the epoch;
|
|
1124
|
+
// auto-retry compares against this baseline and skips retrying entirely. If
|
|
1125
|
+
// we snapshotted inside auto-retry instead, a /stop that landed during the
|
|
1126
|
+
// main run would already be baked into the baseline and go undetected —
|
|
1127
|
+
// that was the "stop then auto-retry anyway" bug.
|
|
1128
|
+
const runStartStopEpoch = this.stopEpoch.get(chatId) || 0;
|
|
1122
1129
|
const mergedContent = mergedTriggers.map((m) => m.content).join("\n");
|
|
1123
1130
|
const mergedTriggerIds = mergedTriggers.map((m) => m.id || 0).filter(Boolean);
|
|
1124
1131
|
const droppedTriggerIds = droppedMergedTriggers.map((m) => m.id || 0).filter(Boolean);
|
|
@@ -1267,6 +1274,7 @@ export class FeishuBot {
|
|
|
1267
1274
|
isNativeCommandTrigger,
|
|
1268
1275
|
initialReply: reply,
|
|
1269
1276
|
liveStatus,
|
|
1277
|
+
runStartStopEpoch,
|
|
1270
1278
|
});
|
|
1271
1279
|
const parsedReply = this.extractBridgeAttachments(reply);
|
|
1272
1280
|
const visibleReply = parsedReply.text;
|
|
@@ -1780,10 +1788,12 @@ export class FeishuBot {
|
|
|
1780
1788
|
if (!autoRetryEnabled() || isNativeCommandTrigger)
|
|
1781
1789
|
return reply;
|
|
1782
1790
|
const maxRetry = autoRetryMax();
|
|
1783
|
-
//
|
|
1784
|
-
//
|
|
1785
|
-
//
|
|
1786
|
-
|
|
1791
|
+
// Baseline stop generation. Prefer the epoch captured before the main run
|
|
1792
|
+
// (runStartStopEpoch) so a /stop that landed DURING the main run is still
|
|
1793
|
+
// seen here; fall back to the current epoch only if the caller did not pass
|
|
1794
|
+
// one. If the user hit /stop at any point from the main run onward, the
|
|
1795
|
+
// epoch is now past the baseline and we must not auto-retry at all.
|
|
1796
|
+
const startStopEpoch = params.runStartStopEpoch ?? (this.stopEpoch.get(chatId) || 0);
|
|
1787
1797
|
const wasStopped = () => (this.stopEpoch.get(chatId) || 0) !== startStopEpoch;
|
|
1788
1798
|
for (let attempt = 1; attempt <= maxRetry; attempt++) {
|
|
1789
1799
|
// /stop while we were looping: abandon retries and deliver what we have.
|