mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
fix: Use repo map only when map_tokens is greater than 0
This commit is contained in:
parent
e20657096f
commit
fb0691914c
2 changed files with 2 additions and 2 deletions
|
@ -317,7 +317,7 @@ class Coder:
|
||||||
use_repo_map = main_model.use_repo_map
|
use_repo_map = main_model.use_repo_map
|
||||||
map_tokens = 1024
|
map_tokens = 1024
|
||||||
else:
|
else:
|
||||||
use_repo_map = True
|
use_repo_map = map_tokens > 0
|
||||||
|
|
||||||
max_inp_tokens = self.main_model.info.get("max_input_tokens") or 0
|
max_inp_tokens = self.main_model.info.get("max_input_tokens") or 0
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ class TestMain(TestCase):
|
||||||
input=DummyInput(),
|
input=DummyInput(),
|
||||||
output=DummyOutput(),
|
output=DummyOutput(),
|
||||||
)
|
)
|
||||||
MockRepoMap.assert_called_once()
|
MockRepoMap.assert_not_called()
|
||||||
|
|
||||||
def test_map_tokens_option_with_non_zero_value(self):
|
def test_map_tokens_option_with_non_zero_value(self):
|
||||||
with GitTemporaryDirectory():
|
with GitTemporaryDirectory():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue