mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
refactor: Move lazy/overeager prompts to final reminders in system prompt
This commit is contained in:
parent
e205629a94
commit
849a379a8c
1 changed files with 12 additions and 6 deletions
|
@ -1079,12 +1079,15 @@ class Coder:
|
||||||
return platform_text
|
return platform_text
|
||||||
|
|
||||||
def fmt_system_prompt(self, prompt):
|
def fmt_system_prompt(self, prompt):
|
||||||
|
final_reminders = []
|
||||||
if self.main_model.lazy:
|
if self.main_model.lazy:
|
||||||
lazy_prompt = self.gpt_prompts.lazy_prompt
|
final_reminders.append(self.gpt_prompts.lazy_prompt)
|
||||||
elif self.main_model.overeager:
|
if self.main_model.overeager:
|
||||||
lazy_prompt = self.gpt_prompts.overeager_prompt
|
final_reminders.append(self.gpt_prompts.overeager_prompt)
|
||||||
else:
|
|
||||||
lazy_prompt = ""
|
user_lang = self.get_user_language()
|
||||||
|
if user_lang:
|
||||||
|
final_reminders.append(f"Reply in {user_lang}.")
|
||||||
|
|
||||||
platform_text = self.get_platform_info()
|
platform_text = self.get_platform_info()
|
||||||
|
|
||||||
|
@ -1111,10 +1114,13 @@ class Coder:
|
||||||
else:
|
else:
|
||||||
quad_backtick_reminder = ""
|
quad_backtick_reminder = ""
|
||||||
|
|
||||||
|
final_reminders = "\n\n".join(final_reminders)
|
||||||
|
|
||||||
|
dump(prompt)
|
||||||
prompt = prompt.format(
|
prompt = prompt.format(
|
||||||
fence=self.fence,
|
fence=self.fence,
|
||||||
quad_backtick_reminder=quad_backtick_reminder,
|
quad_backtick_reminder=quad_backtick_reminder,
|
||||||
lazy_prompt=lazy_prompt,
|
final_reminders=final_reminders,
|
||||||
platform=platform_text,
|
platform=platform_text,
|
||||||
shell_cmd_prompt=shell_cmd_prompt,
|
shell_cmd_prompt=shell_cmd_prompt,
|
||||||
rename_with_shell=rename_with_shell,
|
rename_with_shell=rename_with_shell,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue