From 89fabd85dae59850407d0daacc35e60dcb2b857f Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Thu, 26 Feb 2026 12:54:05 -0500 Subject: [PATCH] feat: add set_user_profile method to DramaTracker Replaces the entire notes field with an LLM-generated profile summary, used by the memory extraction system for permanent facts. Co-Authored-By: Claude Opus 4.6 --- utils/drama_tracker.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/drama_tracker.py b/utils/drama_tracker.py index e0c1bfc..d144639 100644 --- a/utils/drama_tracker.py +++ b/utils/drama_tracker.py @@ -209,6 +209,11 @@ class DramaTracker: if len(lines) > 10: user.notes = "\n".join(lines[-10:]) + def set_user_profile(self, user_id: int, profile: str) -> None: + """Replace the user's profile summary (permanent memory).""" + user = self.get_user(user_id) + user.notes = profile[:500] + def clear_user_notes(self, user_id: int) -> None: self.get_user(user_id).notes = ""