refactored lazy_prompt in all coders

This commit is contained in:
Paul Gauthier 2024-05-08 13:07:35 -07:00
parent 3fcb5d9781
commit fb8ed21b13
4 changed files with 9 additions and 13 deletions

View file

@ -7,6 +7,9 @@ class CoderPrompts:
files_content_local_edits = "I edited the files myself." files_content_local_edits = "I edited the files myself."
lazy_prompt = "" lazy_prompt = """You are diligent and tireless!
You NEVER leave comments describing code without implementing it!
You always COMPLETELY IMPLEMENT the needed code!
"""
example_messages = [] example_messages = []

View file

@ -145,9 +145,4 @@ ONLY EVER RETURN CODE IN A *SEARCH/REPLACE BLOCK*!
repo_content_prefix = """Below here are summaries of files present in the user's git repository. repo_content_prefix = """Below here are summaries of files present in the user's git repository.
Do not propose changes to these files, they are *read-only*. Do not propose changes to these files, they are *read-only*.
To make a file *read-write*, ask the user to *add it to the chat*. To make a file *read-write*, ask the user to *add it to the chat*.
"""
lazy_prompt = """You are diligent and tireless!
You NEVER leave comments describing code without implementing it!
You always COMPLETELY IMPLEMENT the needed code!
""" """

View file

@ -5,9 +5,7 @@ from .base_prompts import CoderPrompts
class UnifiedDiffPrompts(CoderPrompts): class UnifiedDiffPrompts(CoderPrompts):
main_system = """Act as an expert software developer. main_system = """Act as an expert software developer.
You are diligent and tireless! {lazy_prompt}
You NEVER leave comments describing code without implementing it!
You always COMPLETELY IMPLEMENT the needed code!
Always use best practices when coding. Always use best practices when coding.
Respect and use existing conventions, libraries, etc that are already present in the code base. Respect and use existing conventions, libraries, etc that are already present in the code base.
@ -106,9 +104,7 @@ To move code within a file, use 2 hunks: 1 to delete it from its current locatio
To make a new file, show a diff from `--- /dev/null` to `+++ path/to/new/file.ext`. To make a new file, show a diff from `--- /dev/null` to `+++ path/to/new/file.ext`.
You are diligent and tireless! {lazy_prompt}
You NEVER leave comments describing code without implementing it!
You always COMPLETELY IMPLEMENT the needed code!
""" """
files_content_prefix = "These are the *read-write* files:\n" files_content_prefix = "These are the *read-write* files:\n"

View file

@ -7,7 +7,7 @@ class WholeFilePrompts(CoderPrompts):
main_system = """Act as an expert software developer. main_system = """Act as an expert software developer.
Take requests for changes to the supplied code. Take requests for changes to the supplied code.
If the request is ambiguous, ask questions. If the request is ambiguous, ask questions.
{lazy_prompt}
Once you understand the request you MUST: Once you understand the request you MUST:
1. Determine if any code changes are needed. 1. Determine if any code changes are needed.
2. Explain any needed changes. 2. Explain any needed changes.
@ -57,6 +57,8 @@ Every *file listing* MUST use this format:
To suggest changes to a file you MUST return a *file listing* that contains the entire content of the file. To suggest changes to a file you MUST return a *file listing* that contains the entire content of the file.
*NEVER* skip, omit or elide content from a *file listing* using "..." or by adding comments like "... rest of code..."! *NEVER* skip, omit or elide content from a *file listing* using "..." or by adding comments like "... rest of code..."!
Create a new file you MUST return a *file listing* which includes an appropriate filename, including any appropriate path. Create a new file you MUST return a *file listing* which includes an appropriate filename, including any appropriate path.
{lazy_prompt}
""" """
files_content_prefix = "Here is the current content of the files:\n" files_content_prefix = "Here is the current content of the files:\n"