mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 21:34:59 +00:00
refactor: Move reasoning content flags initialization to send method
This commit is contained in:
parent
794072bdf8
commit
80de3335b7
2 changed files with 5 additions and 2 deletions
|
@ -1315,8 +1315,6 @@ class Coder:
|
|||
|
||||
litellm_ex = LiteLLMExceptions()
|
||||
|
||||
self.got_reasoning_content = False
|
||||
self.ended_reasoning_content = False
|
||||
self.usage_report = None
|
||||
exhausted = False
|
||||
interrupted = False
|
||||
|
@ -1644,6 +1642,9 @@ class Coder:
|
|||
return prompts.added_files.format(fnames=", ".join(added_fnames))
|
||||
|
||||
def send(self, messages, model=None, functions=None):
|
||||
self.got_reasoning_content = False
|
||||
self.ended_reasoning_content = False
|
||||
|
||||
if not model:
|
||||
model = self.main_model
|
||||
|
||||
|
|
|
@ -131,6 +131,8 @@ class TestReasoning(unittest.TestCase):
|
|||
# Verify mdstream.update was called multiple times
|
||||
mock_mdstream.update.assert_called()
|
||||
|
||||
coder.live_incremental_response(True)
|
||||
|
||||
# Explicitly get all calls to update
|
||||
update_calls = mock_mdstream.update.call_args_list
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue