From d038c150ada3070a224db891565952d1cfc44c53 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Fri, 20 Oct 2023 18:38:24 -0700 Subject: [PATCH 1/6] Update repomap.md --- docs/repomap.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/repomap.md b/docs/repomap.md index 87e5316a8..f10c48463 100644 --- a/docs/repomap.md +++ b/docs/repomap.md @@ -136,6 +136,8 @@ Mapping out the repo like this provides some key benefits: - GPT can see classes, methods and function signatures from everywhere in the repo. This alone may give it enough context to solve many tasks. For example, it can probably figure out how to use the API exported from a module just based on the details shown in the map. - If it needs to see more code, GPT can use the map to figure out by itself which files it needs to look at in more detail. GPT will then ask to see these specific files, and aider will automatically add them to the chat context. +## Optimizing the map + Of course, for large repositories even just the repo map might be too large for GPT's context window. Aider solves this problem by sending just the **most relevant** From 0e4555203dc960d0e2828f799b9e9a5630db156d Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:35:53 -0700 Subject: [PATCH 2/6] Update repomap.md --- docs/repomap.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/repomap.md b/docs/repomap.md index f10c48463..4034eff03 100644 --- a/docs/repomap.md +++ b/docs/repomap.md @@ -90,8 +90,9 @@ full files of code just to convey context. Aider also strives to reduce the manual work involved in -coding with AI, so it would be better if we could automatically -provide the needed code context. +coding with AI. +So in an ideal world, we'd like aider to automatically +identify and provide the needed code context. ## Using a repo map to provide context From b28c4154730b0af003028b30b0f4924bf76809f1 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:44:54 -0700 Subject: [PATCH 3/6] Update repomap.md --- docs/repomap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/repomap.md b/docs/repomap.md index 4034eff03..8cf05c88b 100644 --- a/docs/repomap.md +++ b/docs/repomap.md @@ -25,7 +25,7 @@ This article is going to focus on the problem of "code context" (2): - We need to help GPT understand the overall codebase. - This will help it understand the code it needs to change, which may depend on other parts of the codebase. - It will also help GPT write new code and modify the existing code in a way -that respect and utilize existing libraries, modules and abstractions +that respects and utilizes existing libraries, modules and abstractions found elsewhere in the codebase. - We must convey all of this "code context" to GPT in an efficient manner that fits within the limited context window. From c005e6692d9f9cce0b196a32047122840316c8b1 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:50:14 -0700 Subject: [PATCH 4/6] Update repomap.md --- docs/repomap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/repomap.md b/docs/repomap.md index 8cf05c88b..998059c91 100644 --- a/docs/repomap.md +++ b/docs/repomap.md @@ -20,7 +20,7 @@ GPT-4 is actually great at making the code changes (3), once you tell it which files need to be changed (1) and show it how they fit into the rest of the codebase (2). -This article is going to focus on the problem of "code context" (2): +This article is going to focus on step (2), providing "code context": - We need to help GPT understand the overall codebase. - This will help it understand the code it needs to change, which may depend on other parts of the codebase. From 1a690c731e09e64ca2c97aa06c699648077f182a Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:55:58 -0700 Subject: [PATCH 5/6] Update repomap.md --- docs/repomap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/repomap.md b/docs/repomap.md index 998059c91..8c5f92650 100644 --- a/docs/repomap.md +++ b/docs/repomap.md @@ -157,7 +157,7 @@ The sample map shown above doesn't contain *every* class, method and function fr files. It only includes the most important identifiers, the ones which are most often referenced by other portions of the code. -These are the key piece of context that GPT needs to know to understand +These are the key pieces of context that GPT needs to know to understand the overall codebase. From 5b1e360223826b37a0445df9e9be530bd3656710 Mon Sep 17 00:00:00 2001 From: paul-gauthier <69695708+paul-gauthier@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:58:23 -0700 Subject: [PATCH 6/6] Update repomap.md --- docs/repomap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/repomap.md b/docs/repomap.md index 8c5f92650..d47363414 100644 --- a/docs/repomap.md +++ b/docs/repomap.md @@ -200,7 +200,7 @@ Switching from ctags to tree-sitter provides a bunch of benefits: You'll recall that we identified the 3 key steps required to use GPT -to code within a large, pre-existing codebase: +to complete a coding task within a large, pre-existing codebase: 1. Find the code that needs to be changed. 2. Understand how that code relates to the rest of the codebase.