fix: memory and path bug

This commit is contained in:
zhayujie
2026-01-31 16:53:33 +08:00
parent 489894c61d
commit 624917fac4
8 changed files with 71 additions and 32 deletions

View File

@@ -117,7 +117,7 @@ class MemoryFlushManager:
return user_dir / "MEMORY.md"
else:
# Return workspace root MEMORY.md
return Path(self.workspace_root) / "MEMORY.md"
return Path(self.workspace_dir) / "MEMORY.md"
def create_flush_prompt(self) -> str:
"""
@@ -214,7 +214,7 @@ def create_memory_files_if_needed(workspace_dir: Path, user_id: Optional[str] =
user_dir.mkdir(parents=True, exist_ok=True)
main_memory = user_dir / "MEMORY.md"
else:
main_memory = Path(workspace_root) / "MEMORY.md"
main_memory = Path(workspace_dir) / "MEMORY.md"
if not main_memory.exists():
# Create empty file or with minimal structure (no obvious "Memory" header)