From 4ba39862370f7ef070bd7eb25ae91dc81b3103d5 Mon Sep 17 00:00:00 2001 From: Zvonimir Sabljic Date: Sat, 2 Sep 2023 17:26:41 +0200 Subject: [PATCH] Improved prompts by removing unnecessary new lines --- .../development/env_setup/cli_response.prompt | 4 +--- .../prompts/development/implement_changes.prompt | 8 ++------ pilot/prompts/development/task/breakdown.prompt | 16 ++++++++-------- .../task/request_files_for_code_changes.prompt | 9 ++------- 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/pilot/prompts/development/env_setup/cli_response.prompt b/pilot/prompts/development/env_setup/cli_response.prompt index 2f596d0..6c551e3 100644 --- a/pilot/prompts/development/env_setup/cli_response.prompt +++ b/pilot/prompts/development/env_setup/cli_response.prompt @@ -1,4 +1,2 @@ Response from the CLI: -``` -{{ cli_response }} -``` \ No newline at end of file +{{ cli_response }} \ No newline at end of file diff --git a/pilot/prompts/development/implement_changes.prompt b/pilot/prompts/development/implement_changes.prompt index d5d77f1..b299425 100644 --- a/pilot/prompts/development/implement_changes.prompt +++ b/pilot/prompts/development/implement_changes.prompt @@ -1,14 +1,10 @@ -{% if files|length > 0 %} -Here is how files look now: +{% if files|length > 0 %}Here is how files look now: {% for file in files %} **{{ file.path }}** ```{# file.language #} {{ file.content }} ``` -{% endfor %} -{% endif %} - -Now, think step by step and apply the needed changes for step #{{ step_index }} - {{ step_description }}. +{% endfor %}{% endif %}Now, think step by step and apply the needed changes for step #{{ step_index }} - `{{ step_description }}`. Within the file modifications, anything needs to be written by the user, add the comment in the same line as the code that starts with `// INPUT_REQUIRED {input_description}` where `input_description` is a description of what needs to be added here by the user. Finally, you can save the modified files on the disk by calling `save_files` function. \ No newline at end of file diff --git a/pilot/prompts/development/task/breakdown.prompt b/pilot/prompts/development/task/breakdown.prompt index 4258f6e..1509b57 100644 --- a/pilot/prompts/development/task/breakdown.prompt +++ b/pilot/prompts/development/task/breakdown.prompt @@ -20,15 +20,15 @@ Here are the technologies that you need to use for this project: - {{ tech }}{% endfor %} ``` -{% if parent_task %} -You are currently working on this task: -``` -{{ array_of_objects_to_string(parent_task) }} -``` -We've broken it down to these subtasks: -```{% for subtask in sibling_tasks %} -- {{ subtask['description'] }}{% endfor %} +{% if current_task_index != 0 %} +So far, this code has been implemented +{% for file in files %} +**{{ file.path }}** +```{# file.language #} +{{ file.content }} ``` + +{% endfor %} {% endif %} Now, tell me all the code that needs to be written to implement this app and have it fully working and all commands that need to be run to implement this app. diff --git a/pilot/prompts/development/task/request_files_for_code_changes.prompt b/pilot/prompts/development/task/request_files_for_code_changes.prompt index da866ad..2b74657 100644 --- a/pilot/prompts/development/task/request_files_for_code_changes.prompt +++ b/pilot/prompts/development/task/request_files_for_code_changes.prompt @@ -1,13 +1,8 @@ {#You need to implement the current changes into a codebase: -- INSTRUCTIONS -- {{ instructions }} --- END OF INSTRUCTIONS --#} -{% if step_index != 0 %} -So far, steps {{ finished_steps }} are finished so let's do -{% else %} -Let's start with the -{% endif %} - step #{{ step_index }} - `{{ step_description }}`. +-- END OF INSTRUCTIONS -- +#}{% if step_index != 0 %}So far, steps {{ finished_steps }} are finished so let's do{% else %}Let's start with the{% endif %} step #{{ step_index }} - `{{ step_description }}`. {# 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. {#