omoclaw 3.2.1 → 3.2.3
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/index.js +9 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1087,26 +1087,24 @@ function handleUserEvent(event, dedup, state, notify, debugLog) {
|
|
|
1087
1087
|
return;
|
|
1088
1088
|
if (part.synthetic === true) {
|
|
1089
1089
|
debugLog?.(`User prompt part SKIPPED (synthetic): msg=${messageID2}`);
|
|
1090
|
-
seenMessageIDs.add(messageID2);
|
|
1091
|
-
evictOldestSeen();
|
|
1092
|
-
clearTimeout(pending.timer);
|
|
1093
|
-
pendingPrompts.delete(messageID2);
|
|
1094
1090
|
return;
|
|
1095
1091
|
}
|
|
1096
1092
|
const partText = asString(part.text);
|
|
1097
1093
|
if (!partText)
|
|
1098
1094
|
return;
|
|
1095
|
+
const partID = asString(part.id);
|
|
1099
1096
|
const trimmed = partText.trimStart();
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
evictOldestSeen();
|
|
1104
|
-
clearTimeout(pending.timer);
|
|
1105
|
-
pendingPrompts.delete(messageID2);
|
|
1097
|
+
const isContextInjection = partID.startsWith("supermemory-context") || trimmed.startsWith("[SUPERMEMORY]") || trimmed.startsWith("<system-reminder>") || trimmed.startsWith("<system");
|
|
1098
|
+
if (isContextInjection) {
|
|
1099
|
+
debugLog?.(`User prompt part SKIPPED (context-injection): msg=${messageID2} partId=${partID.slice(0, 30)} text="${trimmed.slice(0, 40)}"`);
|
|
1106
1100
|
return;
|
|
1107
1101
|
}
|
|
1108
1102
|
pending.text += (pending.text ? " " : "") + partText;
|
|
1109
|
-
|
|
1103
|
+
debugLog?.(`User prompt part CAPTURED: msg=${messageID2} text="${partText.slice(0, 60)}"`);
|
|
1104
|
+
clearTimeout(pending.timer);
|
|
1105
|
+
pending.timer = setTimeout(() => {
|
|
1106
|
+
flushPendingPrompt(messageID2, notify, debugLog);
|
|
1107
|
+
}, 500);
|
|
1110
1108
|
return;
|
|
1111
1109
|
}
|
|
1112
1110
|
if (event.type !== "message.updated")
|
package/package.json
CHANGED