feat: generate topic drift redirects via LLM with full conversation context

Replace static random templates with LLM-generated redirect messages that
reference what the user actually said and why it's off-topic. Sass escalates
with higher strike counts. Falls back to static templates if LLM fails or
use_llm is disabled in config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 15:28:24 -05:00
parent 2525216828
commit 0ff962c95e
3 changed files with 162 additions and 32 deletions

View File

@@ -29,6 +29,7 @@ game_channels:
topic_drift:
enabled: true
use_llm: true # Generate redirect messages via LLM instead of static templates
ignored_channels: ["general"] # Channel names or IDs to skip topic drift monitoring
remind_cooldown_minutes: 10 # Don't remind same user more than once per this window
escalation_count: 3 # After this many reminds, DM the server owner
@@ -48,8 +49,19 @@ messages:
warning: "Easy there, {username}. The Breehavior Monitor is watching. \U0001F440"
mute_title: "\U0001F6A8 BREEHAVIOR ALERT \U0001F6A8"
mute_description: "{username} has been placed in timeout for {duration}.\n\nReason: Sustained elevated drama levels detected.\nDrama Score: {score}/1.0\nCategories: {categories}\n\nCool down and come back when you've resolved your skill issues."
topic_remind: "Hey {username}, this is a gaming server \U0001F3AE — maybe take the personal stuff to DMs?"
topic_nudge: "{username}, we've chatted about this before — let's keep it to gaming talk in here. Personal drama belongs in DMs."
topic_reminds:
- "Hey {username}, this is a gaming server 🎮 — maybe take the personal stuff to DMs?"
- "{username}, sir this is a gaming channel."
- "Hey {username}, I don't remember this being a therapy session. Gaming talk, please. 🎮"
- "{username}, I'm gonna need you to take that energy to DMs. This channel has a vibe to protect."
- "Not to be dramatic {username}, but this is wildly off-topic. Back to gaming? 🎮"
topic_nudges:
- "{username}, we've been over this. Gaming. Channel. Please. 🎮"
- "{username}, you keep drifting off-topic like it's a speedrun category. Reel it in."
- "Babe. {username}. The gaming channel. We talked about this. 😭"
- "{username}, I will not ask again (I will definitely ask again). Stay on topic. 🎮"
- "{username}, at this point I'm keeping score. That's off-topic strike {count}. Gaming talk only!"
- "Look, {username}, I love the enthusiasm but this ain't the channel for it. Back to games. 🎮"
topic_owner_dm: "Heads up: {username} keeps going off-topic with personal drama in #{channel}. They've been reminded {count} times. Might need a word."
channel_redirect: "Hey {username}, that sounds like {game} talk — head over to {channel} for that!"