niahere 0.3.5 → 0.3.6
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/package.json +1 -1
- package/src/channels/slack.ts +14 -4
package/package.json
CHANGED
package/src/channels/slack.ts
CHANGED
|
@@ -430,10 +430,20 @@ class SlackChannel implements Channel {
|
|
|
430
430
|
);
|
|
431
431
|
|
|
432
432
|
const reply = result.trim();
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
433
|
+
const cleaned = cleanSentinel(reply);
|
|
434
|
+
|
|
435
|
+
// [NO_REPLY] anywhere in the reply suppresses the send. If it appeared
|
|
436
|
+
// alongside real content the model got confused — warn so we can spot it.
|
|
437
|
+
if (!reply || cleaned.includes("[NO_REPLY]")) {
|
|
438
|
+
const exact = !reply || cleaned === "[NO_REPLY]";
|
|
439
|
+
if (exact) {
|
|
440
|
+
log.info({ channel: msg.channel, key }, "slack: agent chose not to reply");
|
|
441
|
+
} else {
|
|
442
|
+
log.warn(
|
|
443
|
+
{ channel: msg.channel, key, reply },
|
|
444
|
+
"slack: [NO_REPLY] sentinel mixed with content; suppressing send",
|
|
445
|
+
);
|
|
446
|
+
}
|
|
437
447
|
if (messageId) await Message.updateDeliveryStatus(messageId, "sent").catch(() => {});
|
|
438
448
|
return;
|
|
439
449
|
}
|