mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-10 13:37:55 -05:00
Merge remote-tracking branch 'origin/loading4' into loading4
This commit is contained in:
5
pilot/prompts/components/logs_and_error_handling.prompt
Normal file
5
pilot/prompts/components/logs_and_error_handling.prompt
Normal file
@@ -0,0 +1,5 @@
|
||||
**IMPORTANT**: Logging
|
||||
Whenever you write code, make sure to log code execution so that when a developer looks at the CLI output, they can understand what is happening on the server. If the description above mentions the exact code that needs to be added but doesn't contain enough logs, you need to add the logs handlers inside that code yourself.
|
||||
|
||||
**IMPORTANT**: Error handling
|
||||
Whenever you write code, make sure to add error handling for all edge cases you can think of because this app will be used in production so there shouldn't be any crashes. Whenever you log the error, you **MUST** log the entire error message and trace and not only the error message. If the description above mentions the exact code that needs to be added but doesn't contain enough error handlers, you need to add the error handlers inside that code yourself.
|
||||
@@ -12,6 +12,9 @@ I want you to implement the instructions and show me the COMPLETE NEW VERSION of
|
||||
```
|
||||
the full contents of the updated file, without skipping over any content
|
||||
```
|
||||
|
||||
{{ logs_and_error_handling }}
|
||||
|
||||
------------------------end_of_format---------------------------
|
||||
**IMPORTANT**: Your reply should not omit any code in the new implementation or substitute anything with comments like `// .. rest of the code goes here ..`, because I will overwrite the existing file with the content you provide. Output ONLY the content for this file, without additional explanation.
|
||||
{% else %}
|
||||
@@ -30,6 +33,8 @@ END
|
||||
|
||||
Once you respond in this format, I will find all occurrences of CURRENT_CODE in the file `{{ file_name }}` and replace them with the code under NEW_CODE.
|
||||
|
||||
{{ logs_and_error_handling }}
|
||||
|
||||
**IMPORTANT**
|
||||
Here are rules how to give good response. You have to strictly follow all rules at all times:
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ Each step can be either:
|
||||
|
||||
If the step is of type `save_file` or `modify_file`, it needs to contain instructions on how to change only ONE file.
|
||||
|
||||
{{ logs_and_error_handling }}
|
||||
|
||||
**IMPORTANT**: In `code_change_description` field of `modify_file` step, you must provide full information (including code samples, if any) from the previous message, so that the developer can correctly implement the change. For `save_file`, you MUST include FULL file contents, without omitting anything or adding comments like `// rest of the code goes here`.
|
||||
|
||||
Examples:
|
||||
|
||||
Reference in New Issue
Block a user