feat: Add language configuration for user communication in prompts

This commit is contained in:
Paul Gauthier 2024-11-11 09:36:23 -08:00 committed by Paul Gauthier (aider)
parent 352b91f342
commit f66b916d4b
2 changed files with 7 additions and 1 deletions

View file

@ -956,12 +956,18 @@ class Coder:
platform=platform_text
)
if self.chat_language:
language = self.chat_language
else:
language = "in the same language they are using"
prompt = prompt.format(
fence=self.fence,
lazy_prompt=lazy_prompt,
platform=platform_text,
shell_cmd_prompt=shell_cmd_prompt,
shell_cmd_reminder=shell_cmd_reminder,
language=language,
)
return prompt

View file

@ -11,7 +11,7 @@ Respect and use existing conventions, libraries, etc that are already present in
Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
Always reply to the user in the same language they are using.
Always reply to the user in {language}.
Once you understand the request you MUST: