refactor: Improve text processing by stripping whitespace after removing reasoning tags

This commit is contained in:
Paul Gauthier 2025-01-28 14:16:02 -08:00 committed by Paul Gauthier (aider)
parent ebb8596f03
commit aa339d0851

View file

@ -1889,7 +1889,7 @@ class Coder:
pattern = ( pattern = (
f"<{self.main_model.remove_reasoning}>.*?</{self.main_model.remove_reasoning}>" f"<{self.main_model.remove_reasoning}>.*?</{self.main_model.remove_reasoning}>"
) )
res = re.sub(pattern, "", res, flags=re.DOTALL) res = re.sub(pattern, "", res, flags=re.DOTALL).strip()
return res return res