From a3b8734cc779a8910ae52122be12776960ee8bdd Mon Sep 17 00:00:00 2001 From: kim Date: Sat, 17 Oct 2026 18:19:41 +0900 Subject: [PATCH] =?UTF-8?q?ab-replay:=20write=5Fnote=EB=A1=9C=20=EC=83=9D?= =?UTF-8?q?=EA=B8=B4=20intraday-notes=20=ED=9D=94=EC=A0=81=EB=8F=84=20?= =?UTF-8?q?=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- scripts/ab-replay.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/ab-replay.py b/scripts/ab-replay.py index 5545691..23e7c47 100644 --- a/scripts/ab-replay.py +++ b/scripts/ab-replay.py @@ -102,6 +102,8 @@ def main(): today = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d") daily = os.path.join(USER_DIR, "workspace", "memory", today + ".md") before = open(daily, "rb").read() if os.path.exists(daily) else None + notes = os.path.join(USER_DIR, "workspace", "memory", today + "-intraday-notes.md") + notes_before = open(notes, "rb").read() if os.path.exists(notes) else None # 모델이 write_note로 남긴 흔적 정리용 token = login() if not token: @@ -116,6 +118,12 @@ def main(): for p in glob.glob(os.path.join(USER_DIR, "**", "ab_*.json"), recursive=True): try: os.remove(p) except OSError: pass + if os.path.exists(notes): + cur = open(notes, "rb").read() + if notes_before is None: + os.remove(notes) + elif cur.startswith(notes_before): + open(notes, "wb").write(notes_before) if before is not None and os.path.exists(daily): now = open(daily, "rb").read() if now.startswith(before):