mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-05 04:05:04 +00:00
Added test_check_for_ambiguous_filename_mentions_of_longer_paths
This commit is contained in:
parent
08164034ff
commit
4fd1bf7f21
2 changed files with 22 additions and 5 deletions
|
@ -352,8 +352,12 @@ class Coder:
|
|||
fname_to_rel_fnames[fname].append(rel_fname)
|
||||
|
||||
for fname, rel_fnames in fname_to_rel_fnames.items():
|
||||
if len(rel_fnames) == 1 and (fname in words or rel_fnames[0] in words):
|
||||
if len(rel_fnames) == 1 and fname in words:
|
||||
mentioned_rel_fnames.add(rel_fnames[0])
|
||||
else:
|
||||
for rel_fname in rel_fnames:
|
||||
if rel_fname in words:
|
||||
mentioned_rel_fnames.add(rel_fname)
|
||||
|
||||
if not mentioned_rel_fnames:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue