From 53a2bd2c87a1500149cf9bbb19ffc7603450d52e Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 25 Sep 2025 15:57:29 -0700 Subject: fix(gateway:aiModeration): Improve message and history context --- packages/gateway/src/listeners/aiModeration.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/gateway/src/listeners/aiModeration.ts b/packages/gateway/src/listeners/aiModeration.ts index 9674958..25e6a29 100644 --- a/packages/gateway/src/listeners/aiModeration.ts +++ b/packages/gateway/src/listeners/aiModeration.ts @@ -107,11 +107,13 @@ Attachments: ${message.attachments.size > 0 ? message.attachments.map((a) => a.n MESSAGE CONTEXT (recent messages in this channel): ${context} -Please analyze this message for any rule violations. Consider: -1. The full context of the conversation +Please analyze THIS SPECIFIC MESSAGE for any rule violations. Consider: +1. The content of the current message being analyzed (not the chat history) 2. The specific channel this was posted in -3. The content and any attachments -4. Whether this violates any of the server rules +3. The content and any attachments of the current message only +4. Whether THIS MESSAGE violates any of the server rules + +IMPORTANT: Only analyze the current message content. The chat history is provided for context but should not be the basis for flagging the current message. If the current message itself is innocent but appears in a conversation with inappropriate content, do NOT flag it. Respond with a JSON object containing: { -- cgit v1.2.3