Skip to content

Commit

Permalink
feat: Add instructions to /copy-context command
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Dec 12, 2024
1 parent 39fa8ba commit e10ef8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions aider/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,12 +1417,13 @@ def cmd_copy_context(self, args=None):
else:
markdown += content + "\n\n"

markdown += """
args = args or ""
markdown += f"""
Just tell me how to edit the files to make the changes.
Don't give me back entire files.
Just show me the edits I need to make.
{args}
"""

try:
Expand Down
3 changes: 2 additions & 1 deletion aider/website/docs/usage/copypaste.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ that o1-preview is suggesting in the web chat.

### Copy aider's code context to your clipboard, paste into the web UI

The `/copy-context` command can be used in chat to copy aider's code context to your clipboard.
The `/copy-context <instructions>` command can be used in chat to copy aider's code context to your clipboard.
It will include:

- All the files which have been added to the chat via `/add`.
- Any read only files which have been added via `/read`.
- Aider's [repository map](https://aider.chat/docs/repomap.html) that brings in code context related to the above files from elsewhere in your git repo.
- Some instructions to the LLM that ask it to output change instructions concisely.
- If you include `<instructions>`, they will be copied too.

You can paste the context into your browser, and start interacting with the LLM web chat to
ask for code changes.
Expand Down

0 comments on commit e10ef8b

Please sign in to comment.