feat: Add instructions to /copy-context command

This commit is contained in:
Paul Gauthier 2024-12-12 12:08:29 -08:00 committed by Paul Gauthier (aider)
parent 39fa8ba831
commit e10ef8b9e0
2 changed files with 5 additions and 3 deletions

View file

@ -1417,12 +1417,13 @@ class Commands:
else: else:
markdown += content + "\n\n" markdown += content + "\n\n"
markdown += """ args = args or ""
markdown += f"""
Just tell me how to edit the files to make the changes. Just tell me how to edit the files to make the changes.
Don't give me back entire files. Don't give me back entire files.
Just show me the edits I need to make. Just show me the edits I need to make.
{args}
""" """
try: try:

View file

@ -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 ### 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: It will include:
- All the files which have been added to the chat via `/add`. - All the files which have been added to the chat via `/add`.
- Any read only files which have been added via `/read`. - 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. - 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. - 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 You can paste the context into your browser, and start interacting with the LLM web chat to
ask for code changes. ask for code changes.