mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
feat: improve AI comment handling and documentation
This commit is contained in:
parent
117b7afd81
commit
9639395937
3 changed files with 46 additions and 3 deletions
|
@ -1432,7 +1432,7 @@ Just show me the edits I need to make.
|
|||
"""
|
||||
|
||||
pyperclip.copy(markdown)
|
||||
self.io.tool_output("Copied context to clipboard.")
|
||||
self.io.tool_output("Copied code context to clipboard.")
|
||||
|
||||
|
||||
def expand_subdir(file_path):
|
||||
|
|
|
@ -171,7 +171,8 @@ class FileWatcher:
|
|||
|
||||
self.io.tool_output("Processing your request...")
|
||||
|
||||
res = """The "AI" comments below can be found in the code files I've shared with you.
|
||||
res = """
|
||||
The "AI" comments below marked with █ can be found in the code files I've shared with you.
|
||||
They contain your instructions.
|
||||
Make the requested changes.
|
||||
Be sure to remove all these "AI" comments from the code!
|
||||
|
@ -202,7 +203,7 @@ Be sure to remove all these "AI" comments from the code!
|
|||
child_context=False,
|
||||
last_line=False,
|
||||
margin=0,
|
||||
mark_lois=False,
|
||||
mark_lois=True,
|
||||
loi_pad=3,
|
||||
show_top_of_file_parent_scope=False,
|
||||
)
|
||||
|
|
|
@ -211,3 +211,45 @@ def factorial(n):
|
|||
|
||||
As you use aider with your chosen LLM, you can develop a sense for how
|
||||
explicit you need to make your AI comments.
|
||||
|
||||
## Behind the scenes
|
||||
|
||||
Aider sends your AI comments to the LLM with the
|
||||
[repo map](https://aider.chat/docs/repomap.html)
|
||||
and all the other code context you've added to the chat.
|
||||
|
||||
It also pulls out and highlights the AI comments with specific context, showing the LLM
|
||||
exactly how they fit into the code base.
|
||||
|
||||
```
|
||||
The "AI" comments below marked with █ can be found in the code files I've shared with you.
|
||||
They contain your instructions.
|
||||
Make the requested changes.
|
||||
Be sure to remove all these "AI" comments from the code!
|
||||
|
||||
todo_app.py:
|
||||
⋮...
|
||||
class TodoList:
|
||||
⋮...
|
||||
│ def __init__(self):
|
||||
│ """Initialize an empty todo list"""
|
||||
⋮...
|
||||
│
|
||||
│ def list_tasks(self):
|
||||
│ """Display all tasks"""
|
||||
█ # Implement this. AI!
|
||||
│
|
||||
│def main():
|
||||
│ todo = TodoList()
|
||||
│
|
||||
⋮...
|
||||
```
|
||||
|
||||
--------
|
||||
|
||||
#### Credits
|
||||
|
||||
*This feature was inspired by
|
||||
the way [Overide](https://github.com/oi-overide) watches for file changes
|
||||
to find prompts embedded within `//> a specific set of delimiters <//`.*
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue