From 4bc4e6f611e3b14f355220f1571b18d00ab45fee Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 27 May 2023 08:47:21 -0700 Subject: [PATCH] aider: Updated `Coder` class in `aider/coder.py` to call the new `get_input` function with `root` parameter and `rel_fnames` instead of absolute file names. # Context: USER: update coder.py to call the new get_input ASSISTANT: I will update the `Coder` class in the `aider/coder.py` file to call the new `get_input` function. ```python aider/coder.py <<<<<<< ORIGINAL inp = self.io.get_input(self.abs_fnames, self.commands) ======= rel_fnames = [os.path.relpath(fname, self.root) for fname in self.abs_fnames] inp = self.io.get_input(self.root, rel_fnames, self.commands) >>>>>>> UPDATED ``` This change updates the `run_loop` method in the `Coder` class to call the new `get_input` function with the `root` parameter and the `rel_fnames` instead of the absolute file names. --- aider/coder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/coder.py b/aider/coder.py index a49f1edba..a19630215 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -237,7 +237,8 @@ class Coder: return True def run_loop(self): - inp = self.io.get_input(self.abs_fnames, self.commands) + rel_fnames = [os.path.relpath(fname, self.root) for fname in self.abs_fnames] + inp = self.io.get_input(self.root, rel_fnames, self.commands) self.num_control_c = 0