mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 21:29:12 +00:00
Unescape special characters in prompt traces for better readability
This commit is contained in:
@@ -431,6 +431,8 @@ def commit_conversation_trace(
|
||||
# Write files and stage them
|
||||
for filename, content in files_to_commit.items():
|
||||
file_path = os.path.join(repo_path, filename)
|
||||
# Unescape special characters in content for better readability
|
||||
content = content.strip().replace("\\n", "\n").replace("\\t", "\t")
|
||||
with open(file_path, "w", encoding="utf-8") as f:
|
||||
f.write(content)
|
||||
repo.index.add([filename])
|
||||
|
||||
Reference in New Issue
Block a user