mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
feat: add chat_language parameter to Coder class
This commit is contained in:
parent
2bcc9a54a9
commit
3d73fac84c
1 changed files with 6 additions and 0 deletions
|
@ -93,6 +93,7 @@ class Coder:
|
|||
num_cache_warming_pings = 0
|
||||
suggest_shell_commands = True
|
||||
ignore_mentions = None
|
||||
chat_language = None
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
|
@ -260,7 +261,9 @@ class Coder:
|
|||
cache_prompts=False,
|
||||
num_cache_warming_pings=0,
|
||||
suggest_shell_commands=True,
|
||||
chat_language=None,
|
||||
):
|
||||
self.chat_language = chat_language
|
||||
self.commit_before_message = []
|
||||
self.aider_commit_hashes = set()
|
||||
self.rejected_urls = set()
|
||||
|
@ -856,6 +859,9 @@ class Coder:
|
|||
self.cur_messages = []
|
||||
|
||||
def get_user_language(self):
|
||||
if self.chat_language:
|
||||
return self.chat_language
|
||||
|
||||
try:
|
||||
lang = locale.getlocale()[0]
|
||||
if lang:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue