Merge branch 'worktree-agent-a78eaee3'
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
|
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
@@ -375,10 +375,20 @@ class SentimentCog(commands.Cog):
|
|||||||
db_message_id, self._dirty_users,
|
db_message_id, self._dirty_users,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Note update
|
# Note update — route to memory system
|
||||||
if note_update:
|
if note_update:
|
||||||
|
# Still update the legacy notes for backward compat with analysis prompt
|
||||||
self.bot.drama_tracker.update_user_notes(user_id, note_update)
|
self.bot.drama_tracker.update_user_notes(user_id, note_update)
|
||||||
self._dirty_users.add(user_id)
|
self._dirty_users.add(user_id)
|
||||||
|
# Also save as an expiring memory (7d default for passive observations)
|
||||||
|
asyncio.create_task(self.bot.db.save_memory(
|
||||||
|
user_id=user_id,
|
||||||
|
memory=note_update[:500],
|
||||||
|
topics=db_topic_category or "general",
|
||||||
|
importance="medium",
|
||||||
|
expires_at=datetime.now(timezone.utc) + timedelta(days=7),
|
||||||
|
source="passive",
|
||||||
|
))
|
||||||
|
|
||||||
self._dirty_users.add(user_id)
|
self._dirty_users.add(user_id)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user