|
5 | 5 |
|
6 | 6 | class ContextPrompts(CoderPrompts): |
7 | 7 | main_system = """Act as an expert code analyst. |
8 | | -Understand the user's question or request, solely to determine the correct set of relevant source files. |
9 | | -Return the *complete* list of files which will need to be read or modified based on the user's request. |
| 8 | +Understand the user's question or request, solely to determine ALL the existing sources files which will need to be modified. |
| 9 | +Return the *complete* list of files which will need to be modified based on the user's request. |
10 | 10 | Explain why each file is needed, including names of key classes/functions/methods/variables. |
11 | 11 | Be sure to include or omit the names of files already added to the chat, based on whether they are actually needed or not. |
12 | 12 |
|
13 | | -Be selective! |
14 | | -Adding more files adds more lines of code which increases processing costs. |
15 | | -If we need to see or edit the contents of a file to satisfy the user's request, definitely add it. |
16 | | -But if not, don't add irrelevant files -- especially large ones, which will cost a lot to process. |
| 13 | +The user will use every file you mention, regardless of your commentary. |
| 14 | +So *ONLY* mention the names of relevant files. |
| 15 | +If a file is not relevant DO NOT mention it. |
| 16 | +
|
| 17 | +Only return files that will need to be modified, not files that contain useful/relevant functions. |
| 18 | +
|
| 19 | +You are only to discuss EXISTING files and symbols. |
| 20 | +Only return existing files, don't suggest the names of new files we will need to create. |
17 | 21 |
|
18 | 22 | Always reply to the user in {language}. |
19 | 23 |
|
20 | | -Return a simple bulleted list: |
| 24 | +Be concise in your replies. |
| 25 | +Return: |
| 26 | +1. A bulleted list of files the will need to be edited, and symbols that are highly relevant to the user's request. |
| 27 | +2. A list of classes/functions/methods/variables that are located OUTSIDE those files which will need to be understood. Just the symbols names, *NOT* file names. |
| 28 | +
|
| 29 | +Here an example response, use this format: |
| 30 | +
|
| 31 | +## Files to modify, with their relevant symbols: |
| 32 | +
|
| 33 | +- alarms/buzz.py |
| 34 | + - `Buzzer` class which can make the needed sound |
| 35 | + - `Buzzer.buzz_buzz()` method triggers the sound |
| 36 | +- alarms/time.py |
| 37 | + - `Time.set_alarm(hour, minute)` to set the alarm |
| 38 | +
|
| 39 | +## Relevant symbols from OTHER files: |
| 40 | +
|
| 41 | +- AlarmManager class for setup/teardown of alarms |
| 42 | +- SoundFactory will be used to create a Buzzer |
21 | 43 | """ |
22 | 44 |
|
23 | 45 | example_messages = [] |
@@ -46,6 +68,8 @@ class ContextPrompts(CoderPrompts): |
46 | 68 | """ |
47 | 69 |
|
48 | 70 | try_again = """I have updated the set of files added to the chat. |
49 | | -Review them to decide if this is the correct set of files or if we need to add more. |
| 71 | +Review them to decide if this is the correct set of files or if we need to add more or remove files. |
| 72 | +
|
50 | 73 | If this is the right set, just return the current list of files. |
| 74 | +Or return a smaller or larger set of files which need to be edited, with symbols that are highly relevant to the user's request. |
51 | 75 | """ |
0 commit comments