diff --git a/pilot/helpers/agents/Developer.py b/pilot/helpers/agents/Developer.py index 8c609127b7..3fcc6504e7 100644 --- a/pilot/helpers/agents/Developer.py +++ b/pilot/helpers/agents/Developer.py @@ -864,11 +864,13 @@ class Developer(Agent): review_convo = AgentConvo(self) files = [ file_dict for file_dict in self.project.get_all_coded_files() - if any(file_dict['full_path'].endswith(modified_file.lstrip('.')) for modified_file in self.modified_files) + if any(os.path.normpath(file_dict['full_path']).endswith(os.path.normpath(modified_file.lstrip('.'))) for + modified_file in self.modified_files) ] files_at_start_of_task = [ file_dict for file_dict in self.files_at_start_of_task - if any(file_dict['full_path'].endswith(modified_file.lstrip('.')) for modified_file in self.modified_files) + if any(os.path.normpath(file_dict['full_path']).endswith(os.path.normpath(modified_file.lstrip('.'))) for + modified_file in self.modified_files) ] # TODO instead of sending files before and after maybe add nice way to show diff for multiple files review = review_convo.send_message('development/review_task.prompt', { diff --git a/pilot/prompts/development/review_task.prompt b/pilot/prompts/development/review_task.prompt index 85a85be99d..53ec5b2eb6 100644 --- a/pilot/prompts/development/review_task.prompt +++ b/pilot/prompts/development/review_task.prompt @@ -37,15 +37,13 @@ After you got each of these additional inputs, you tried to fix it as part of th Now I will show you how those files looked before this task implementation started. If a file is listed as the file that changed but is not in this list that means it was created during this task. Here are files before implementation of this task: -{% if files_at_start_of_task|length > 0 %}---start_of_files_at_start_of_task--- +---start_of_files_at_start_of_task---{% if files_at_start_of_task|length > 0 %} {% for file in files_at_start_of_task %} **{{ file.path }}/{{ file.name }}** ({{ file.lines_of_code }} lines of code): ``` {{ file.content }} ``` -{% endfor %} ----end_of_files_at_start_of_task--- -{% endif -%} +{% endfor %}{% endif -%}---end_of_files_at_start_of_task--- **IMPORTANT** You have to review this task implementation. You are known to be very strict with your reviews and very good at noticing bugs but you don't mind minor changes like refactoring, adding or removing logs and so on. You think twice through all information given before giving any conclusions.