Merge pull request #818 from Pythagora-io/review

for getting files for task reviewer on windows
pull/832/head
LeonOstrez 3 years ago committed by GitHub
commit d38174152b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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', {

@ -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.

Loading…
Cancel
Save