mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-01-07 03:31:20 +01:00
Fixed code monkey code writing
This commit is contained in:
@@ -22,12 +22,12 @@ class CodeMonkey(Agent):
|
||||
convo.save_branch('after_code_changes_breakdown')
|
||||
for i, step in enumerate(steps):
|
||||
convo.load_branch('after_code_changes_breakdown')
|
||||
if step['type'] == 'run_command':
|
||||
run_command_until_success(step['command'], step['description'], convo)
|
||||
if step['type'] == 'command':
|
||||
run_command_until_success(step['command'], step['command_timeout'], convo)
|
||||
elif step['type'] == 'code_change':
|
||||
files_needed = convo.send_message('development/task/request_files_for_code_changes.prompt', {
|
||||
"instructions": code_changes_description,
|
||||
"step_description": step['description'],
|
||||
"step_description": step['code_change_description'],
|
||||
"directory_tree": self.project.get_directory_tree(),
|
||||
}, GET_FILES)
|
||||
|
||||
|
||||
@@ -14,3 +14,5 @@ You are currently working on this step from the instructions above:
|
||||
```
|
||||
|
||||
I will give you each file that needs to be changed and you will implement changes from the instructions. To do this, you will need to see the currently implemented files so first, filter the files outlined above that are relevant for the instructions. Then, tell me files that you need to see so that you can make appropriate changes to the code. If no files are needed (eg. if you need to create a file), just return an empty array.
|
||||
|
||||
Remember, ask for files relative to the project root. For example, if you need a file with path `{project_root}/models/model.py`, you need to request the file `models/model.py`.
|
||||
Reference in New Issue
Block a user