fix(memory): migrate legacy HISTORY.md even when history.jsonl is empty

This commit is contained in:
Xubin Ren
2026-04-04 10:11:53 +00:00
parent 0a3a60a7a4
commit 04419326ad
2 changed files with 21 additions and 1 deletions
+3 -1
View File
@@ -72,7 +72,9 @@ class MemoryStore:
The migration is best-effort and prioritizes preserving as much content
as possible over perfect parsing.
"""
if self.history_file.exists() or not self.legacy_history_file.exists():
if not self.legacy_history_file.exists():
return
if self.history_file.exists() and self.history_file.stat().st_size > 0:
return
try: