feat(ai-moderation): add user profile self-learning system
Add user_profiles table, store, and background learner worker that summarizes user communication style, topics, and personality. - New user_profiles table (user_id PK, guild_id, profile_summary, last_analyzed_at) - userProfileStore.ts — CRUD (get/update) following channelCultureStore pattern - userProfileLearner.ts — background worker: queries 100 recent msgs per user, calls LLM for personality summary, updates every 12h - Inject <user_profile> XML tag per-message in moderation prompt - Start worker alongside cultureLearner in aiAnalyzer.ts - Migration 0008 for user_profiles table Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -133,6 +133,9 @@ export function startPendingAIAnalysisWorker(
|
||||
import("./cultureLearner.js")
|
||||
.then((m) => m.startCultureLearnerWorker())
|
||||
.catch(console.error);
|
||||
import("./userProfileLearner.js")
|
||||
.then((m) => m.startUserProfileLearnerWorker())
|
||||
.catch(console.error);
|
||||
|
||||
setInterval(() => {
|
||||
revertStuckProcessingMessages(300000).catch((err: unknown) => {
|
||||
|
||||
Reference in New Issue
Block a user