Skip to content

Commit

Permalink
feat: Updated gpt_engineer/core/chat_to_files.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Oct 8, 2023
1 parent c58a37c commit 83c9784
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gpt_engineer/core/chat_to_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import os
from pathlib import Path
import re
import codecs

from typing import List, Tuple

Expand Down Expand Up @@ -159,7 +160,9 @@ def get_all_files_in_dir(directory):
), "Trying to edit files outside of the workspace"
file_name = os.path.relpath(path, workspace.path)
if file_name in workspace:
files_dict[file_name] = workspace[file_name]
with codecs.open(file_path, 'r', encoding='utf-8', errors='ignore') as file:
file_data = file.read()
files_dict[file_name] = file_data
return files_dict


Expand Down

0 comments on commit 83c9784

Please sign in to comment.