From 162afd0cdddb981647b922d62a0d523962cd3518 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Thu, 26 Sep 2024 18:58:14 +0200 Subject: [PATCH 1/2] doc: Add tips for including git history in Aider chat context --- aider/website/docs/usage/tips.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/aider/website/docs/usage/tips.md b/aider/website/docs/usage/tips.md index f6ce03afa..7dee834c5 100644 --- a/aider/website/docs/usage/tips.md +++ b/aider/website/docs/usage/tips.md @@ -71,6 +71,24 @@ and aider will scrape and read it. For example: `Add a submit button like this h - Use the [`/read` command](commands.html) to read doc files into the chat from anywhere on your filesystem. - If you have coding conventions or standing instructions you want aider to follow, consider using a [conventions file](conventions.html). +## Including git history in the context + +When starting a fresh aider session, you can include recent git history in the chat context. This can be useful for providing the LLM with information about recent changes. To do this: + +1. Use the `/run` command with `git diff` to show recent changes: + ``` + /run git diff HEAD~1 + ``` + This will include the diff of the last commit in the chat history. + +2. To include diffs from multiple commits, increase the number after the tilde: + ``` + /run git diff HEAD~3 + ``` + This will show changes from the last three commits. + +Remember, the chat history already includes recent changes made during the current session, so this tip is most useful when starting a new aider session and you want to provide context about recent work. + ## Interrupting & inputting Use Control-C to interrupt aider if it isn't providing a useful response. The partial response remains in the conversation, so you can refer to it when you reply with more information or direction. From 0e9f38473279ae242f6520a104093cde9b340e3d Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:03:13 +0200 Subject: [PATCH 2/2] feat: add section on including git history in aider context --- aider/website/docs/faq.md | 18 ++++++++++++++++++ aider/website/docs/usage/tips.md | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index b23564127..4cd95de74 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -106,6 +106,24 @@ The repo map is usually disabled for a good reason. If you would like to force it on, you can run aider with `--map-tokens 1024`. +## How do I include the git history in the context? + +When starting a fresh aider session, you can include recent git history in the chat context. This can be useful for providing the LLM with information about recent changes. To do this: + +1. Use the `/run` command with `git diff` to show recent changes: + ``` + /run git diff HEAD~1 + ``` + This will include the diff of the last commit in the chat history. + +2. To include diffs from multiple commits, increase the number after the tilde: + ``` + /run git diff HEAD~3 + ``` + This will show changes from the last three commits. + +Remember, the chat history already includes recent changes made during the current session, so this tip is most useful when starting a new aider session and you want to provide context about recent work. + ## How can I run aider locally from source code? To run the project locally, follow these steps: diff --git a/aider/website/docs/usage/tips.md b/aider/website/docs/usage/tips.md index 7dee834c5..f6ce03afa 100644 --- a/aider/website/docs/usage/tips.md +++ b/aider/website/docs/usage/tips.md @@ -71,24 +71,6 @@ and aider will scrape and read it. For example: `Add a submit button like this h - Use the [`/read` command](commands.html) to read doc files into the chat from anywhere on your filesystem. - If you have coding conventions or standing instructions you want aider to follow, consider using a [conventions file](conventions.html). -## Including git history in the context - -When starting a fresh aider session, you can include recent git history in the chat context. This can be useful for providing the LLM with information about recent changes. To do this: - -1. Use the `/run` command with `git diff` to show recent changes: - ``` - /run git diff HEAD~1 - ``` - This will include the diff of the last commit in the chat history. - -2. To include diffs from multiple commits, increase the number after the tilde: - ``` - /run git diff HEAD~3 - ``` - This will show changes from the last three commits. - -Remember, the chat history already includes recent changes made during the current session, so this tip is most useful when starting a new aider session and you want to provide context about recent work. - ## Interrupting & inputting Use Control-C to interrupt aider if it isn't providing a useful response. The partial response remains in the conversation, so you can refer to it when you reply with more information or direction.