mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 19:46:38 +00:00
fix(gateway): skip heartbeat wake on deduped notifications
This commit is contained in:
@@ -63,12 +63,12 @@ export function enqueueSystemEvent(text: string, options: SystemEventOptions) {
|
||||
})();
|
||||
const cleaned = text.trim();
|
||||
if (!cleaned) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
const normalizedContextKey = normalizeContextKey(options?.contextKey);
|
||||
entry.lastContextKey = normalizedContextKey;
|
||||
if (entry.lastText === cleaned) {
|
||||
return;
|
||||
return false;
|
||||
} // skip consecutive duplicates
|
||||
entry.lastText = cleaned;
|
||||
entry.queue.push({
|
||||
@@ -79,6 +79,7 @@ export function enqueueSystemEvent(text: string, options: SystemEventOptions) {
|
||||
if (entry.queue.length > MAX_EVENTS) {
|
||||
entry.queue.shift();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export function drainSystemEventEntries(sessionKey: string): SystemEvent[] {
|
||||
|
||||
Reference in New Issue
Block a user