fix: exclude hidden files when syncing workspace templates
Skip files starting with '.' (e.g., macOS extended attributes like ._AGENTS.md) to prevent UnicodeDecodeError during template synchronization.
This commit is contained in:
2
nanobot/utils/helpers.py
Normal file → Executable file
2
nanobot/utils/helpers.py
Normal file → Executable file
@@ -88,7 +88,7 @@ def sync_workspace_templates(workspace: Path, silent: bool = False) -> list[str]
|
||||
added.append(str(dest.relative_to(workspace)))
|
||||
|
||||
for item in tpl.iterdir():
|
||||
if item.name.endswith(".md"):
|
||||
if item.name.endswith(".md") and not item.name.startswith("."):
|
||||
_write(item, workspace / item.name)
|
||||
_write(tpl / "memory" / "MEMORY.md", workspace / "memory" / "MEMORY.md")
|
||||
_write(None, workspace / "memory" / "HISTORY.md")
|
||||
|
||||
Reference in New Issue
Block a user