Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ This project aims to be compatible with upstream Aider, but with priority commit
* [Fix Deepseek model configurations](https://github.com/Aider-AI/aider/commit/c839a6dd8964d702172cae007375e299732d3823)
* [Relax Version Pinning For Easier Distribution](https://github.com/dwash96/aider-ce/issues/18)
* [Remove Confirm Responses from History](https://github.com/Aider-AI/aider/pull/3958)
* [Benchmark Results By Language](https://github.com/dwash96/aider-ce/pull/27)
* [Allow Benchmarks to Use Repo Map For Better Accuracy](https://github.com/dwash96/aider-ce/pull/25)

### Other Notes
* [MCP Configuration](https://github.com/dwash96/aider-ce/blob/main/aider/website/docs/config/mcp.md)
Expand Down
2 changes: 1 addition & 1 deletion aider/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from packaging import version

__version__ = "0.87.7.dev"
__version__ = "0.87.8.dev"
safe_version = __version__

try:
Expand Down
16 changes: 16 additions & 0 deletions aider/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def __init__(
context_compaction_max_tokens=None,
context_compaction_summary_tokens=8192,
map_cache_dir=".",
repomap_in_memory=False,
):
# initialize from args.map_cache_dir
self.map_cache_dir = map_cache_dir
Expand Down Expand Up @@ -555,6 +556,8 @@ def __init__(
map_mul_no_files=map_mul_no_files,
refresh=map_refresh,
max_code_line_length=map_max_line_length,
repo_root=self.root,
use_memory_cache=repomap_in_memory,
)

self.summarizer = summarizer or ChatSummary(
Expand Down Expand Up @@ -853,6 +856,19 @@ def get_repo_map(self, force_refresh=False):
mentioned_fnames.update(self.get_ident_filename_matches(mentioned_idents))

all_abs_files = set(self.get_all_abs_files())

# Exclude metadata/docs from repo map inputs to reduce parsing overhead
def _include_in_map(abs_path):
try:
rel = self.get_rel_fname(abs_path)
except Exception:
rel = str(abs_path)
parts = Path(rel).parts
if ".meta" in parts or ".docs" in parts:
return False
return True

all_abs_files = {p for p in all_abs_files if _include_in_map(p)}
repo_abs_read_only_fnames = set(self.abs_read_only_fnames) & all_abs_files
repo_abs_read_only_stubs_fnames = set(self.abs_read_only_stubs_fnames) & all_abs_files
chat_files = (
Expand Down
11 changes: 9 additions & 2 deletions aider/repomap.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,22 @@ def __init__(
map_mul_no_files=8,
refresh="auto",
max_code_line_length=100,
repo_root=None,
use_memory_cache=False,
):
self.io = io
self.verbose = verbose
self.refresh = refresh

self.map_cache_dir = map_cache_dir
self.root = os.getcwd()
# Prefer an explicit repo root (eg per-test repo), fallback to CWD
self.root = repo_root or os.getcwd()

self.load_tags_cache()
# Allow opting into an in-memory tags cache to avoid disk/SQLite locks
if use_memory_cache:
self.TAGS_CACHE = dict()
else:
self.load_tags_cache()
self.cache_threshold = 0.95

self.max_map_tokens = map_tokens
Expand Down
1 change: 1 addition & 0 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ You can run `./benchmark/benchmark.py --help` for a list of all the arguments, b
- `--num-tests` specifies how many of the tests to run before stopping. This is another way to start gently as you debug your benchmarking setup.
- `--keywords` filters the tests to run to only the ones whose name match the supplied argument (similar to `pytest -k xxxx`).
- `--read-model-settings=<filename.yml>` specify model settings, see here: https://aider.chat/docs/config/adv-model-settings.html#model-settings
- `--map-tokens` sets a token budget for the repo map sent with each request. Set `0` to disable the repo map. This lets you enable repo map usage for any model (e.g., `--map-tokens 1024`).

### Benchmark report

Expand Down
Loading
Loading