diff --git a/aider/commands.py b/aider/commands.py index 017329c2b..3e6ced299 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -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): diff --git a/aider/watch.py b/aider/watch.py index 7804d19aa..a7a0d594b 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -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, ) diff --git a/aider/website/docs/usage/watch.md b/aider/website/docs/usage/watch.md index 7383b2d2d..7581c4f25 100644 --- a/aider/website/docs/usage/watch.md +++ b/aider/website/docs/usage/watch.md @@ -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