You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Paul Gauthier | The prompt for the `improve code` step is strongly based on Paul's prompt in Aider | /preprompts/improve.txt | https://github.com/paul-gauthier/aider/blob/main/aider/coders/editblock_coder.py
Copy file name to clipboardExpand all lines: docs/intro/chat_parsing.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,9 @@ Here are the functions defined in the `chat_to_files.py` module:
8
8
9
9
`parse_chat(chat)`: This function takes the chat as an argument and returns a list of tuples. Each tuple contains a filename and the corresponding file content. The function uses regular expressions to extract the filenames and the file contents from the chat. The filenames are cleaned up to remove any non-allowed characters.
10
10
11
-
`to_files(chat, dbs)`: This function takes the chat and the DBs as arguments. DBs contains the workspace and memory path. The function first saves the entire chat as a text file in the memory path. Then it calls the parse_chat function to parse the chat and get the files. Each file is then saved to the workspace.
11
+
`to_files_and_memory(chat, dbs)`: This function takes the chat and the DBs as arguments. DBs contains the workspace and memory path. The function first saves the entire chat as a text file in the memory path. Then it calls the to_files function to write each file to the workspace.
12
+
13
+
`to_files(chat, db)`: This function takes the chat and workspace DB as arguments. It calls the parse_chat function to parse the chat and get the files. Each file is then saved to the workspace.
Copy file name to clipboardExpand all lines: docs/intro/quick_overview.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,9 @@ This module contains two main functions:
15
15
16
16
`parse_chat(chat)`: This function takes a chat conversation and extracts all the code blocks and preceding filenames. It returns a list of tuples, where each tuple contains a filename and the corresponding code block.
17
17
18
-
`to_files(chat, dbs)`: This function takes the chat and the DBs as arguments. DBs contains the workspace and memory path. The function first saves the entire chat as a text file in the memory path. Then it calls the parse_chat function to parse the chat and get the files. Each file is then saved to the workspace.
18
+
`to_files_and_memory(chat, dbs)`: This function takes the chat and the DBs as arguments. DBs contains the workspace and memory path. The function first saves the entire chat as a text file in the memory path. Then it calls the to_files function to write each file to the workspace.
19
+
20
+
`to_files(chat, db)`: This function takes the chat and workspace DB as arguments. It calls the parse_chat function to parse the chat and get the files. Each file is then saved to the workspace.
f"The edit to be applied wants to create a new file `{filename}`, but that already exists. The file will be overwritten. See `.gpteng/memory` for previous version."
242
+
)
223
243
workspace[filename] =edit.after# new file
224
244
else:
245
+
ifworkspace[filename].count(edit.before) >1:
246
+
logger.warn(
247
+
f"While applying an edit to `{filename}`, the code block to be replaced was found multiple times. All instances will be replaced."
0 commit comments