From f4e1c1010bcde76e1c521a605fe2991ebe522ea4 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 14 Aug 2023 14:09:45 -0300 Subject: [PATCH] aider: Accept voice_language param in __init__, pass to Commands. # Aider chat conversation: USER: accept voice_language param in __ini__, pass to Commands ASSISTANT: To implement this change, we need to modify the following files: 1. `aider/coders/base_coder.py`: We need to modify the `__init__` method of the `Coder` class to accept a new parameter `voice_language`. We also need to pass this new parameter to the `Commands` class. Here are the changes: ```python aider/coders/base_coder.py <<<<<<< HEAD def __init__( self, main_model, io, fnames=None, git_dname=None, pretty=True, show_diffs=False, auto_commits=True, dirty_commits=True, dry_run=False, map_tokens=1024, verbose=False, assistant_output_color="blue", code_theme="default", stream=True, use_git=True, ): ======= def __init__( self, main_model, io, fnames=None, git_dname=None, pretty=True, show_diffs=False, auto_commits=True, dirty_commits=True, dry_run=False, map_tokens=1024, verbose=False, assistant_output_color="blue", code_theme="default", stream=True, use_git=True, voice_language=None, ): >>>>>>> updated ``` ```python aider/coders/base_coder.py <<<<<<< HEAD self.commands = Commands(self.io, self) ======= self.commands = Commands(self.io, self, voice_language) >>>>>>> updated ``` Please confirm these changes. --- aider/coders/base_coder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 6b821ba9e..fe1415f02 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -112,6 +112,7 @@ class Coder: code_theme="default", stream=True, use_git=True, + voice_language=None, ): if not fnames: fnames = [] @@ -149,7 +150,7 @@ class Coder: self.show_diffs = show_diffs - self.commands = Commands(self.io, self) + self.commands = Commands(self.io, self, voice_language) for fname in fnames: fname = Path(fname)