Fix: Ensure UTF-8 encoding and ensure_ascii=False for remaining file/JSON operations

This commit is contained in:
chtangwin
2026-02-18 18:37:17 -08:00
parent c7b5dd9350
commit a2379a08ac
5 changed files with 11 additions and 11 deletions

View File

@@ -243,7 +243,7 @@ Information about the user goes here.
for filename, content in templates.items():
file_path = workspace / filename
if not file_path.exists():
file_path.write_text(content)
file_path.write_text(content, encoding="utf-8")
console.print(f" [dim]Created {filename}[/dim]")
# Create memory directory and MEMORY.md
@@ -266,12 +266,12 @@ This file stores important information that should persist across sessions.
## Important Notes
(Things to remember)
""")
""", encoding="utf-8")
console.print(" [dim]Created memory/MEMORY.md[/dim]")
history_file = memory_dir / "HISTORY.md"
if not history_file.exists():
history_file.write_text("")
history_file.write_text("", encoding="utf-8")
console.print(" [dim]Created memory/HISTORY.md[/dim]")
# Create skills directory for custom user skills