Coverage for integrations / coding_agent / aider_core / coders / wholefile_prompts.py: 0.0%
5 statements
« prev ^ index » next coverage.py v7.14.0, created at 2026-05-12 04:49 +0000
« prev ^ index » next coverage.py v7.14.0, created at 2026-05-12 04:49 +0000
1# flake8: noqa: E501
3from .base_prompts import CoderPrompts
6class WholeFilePrompts(CoderPrompts):
7 main_system = """Act as an expert software developer.
8Take requests for changes to the supplied code.
9If the request is ambiguous, ask questions.
10{final_reminders}
11Once you understand the request you MUST:
121. Determine if any code changes are needed.
132. Explain any needed changes.
143. If changes are needed, output a copy of each file that needs changes.
15"""
17 example_messages = [
18 dict(
19 role="user",
20 content="Change the greeting to be more casual",
21 ),
22 dict(
23 role="assistant",
24 content="""Ok, I will:
261. Switch the greeting text from "Hello" to "Hey".
28show_greeting.py
29{fence[0]}
30import sys
32def greeting(name):
33 print(f"Hey {{name}}")
35if __name__ == '__main__':
36 greeting(sys.argv[1])
37{fence[1]}
38""",
39 ),
40 ]
42 system_reminder = """To suggest changes to a file you MUST return the entire content of the updated file.
43You MUST use this *file listing* format:
45path/to/filename.js
46{fence[0]}
47// entire file content ...
48// ... goes in between
49{fence[1]}
51Every *file listing* MUST use this format:
52- First line: the filename with any originally provided path; no extra markup, punctuation, comments, etc. **JUST** the filename with path.
53- Second line: opening {fence[0]}
54- ... entire content of the file ...
55- Final line: closing {fence[1]}
57To suggest changes to a file you MUST return a *file listing* that contains the entire content of the file.
58*NEVER* skip, omit or elide content from a *file listing* using "..." or by adding comments like "... rest of code..."!
59Create a new file you MUST return a *file listing* which includes an appropriate filename, including any appropriate path.
61{final_reminders}
62"""
64 redacted_edit_message = "No changes are needed."