mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 22:04:59 +00:00
Changed the way to display git diff in coder.py.
This commit is contained in:
parent
ff62c39feb
commit
ff23292f83
1 changed files with 6 additions and 4 deletions
|
@ -529,12 +529,14 @@ class Coder:
|
|||
self.console.print("[red]No previous aider commit found.")
|
||||
return
|
||||
|
||||
diff = self.repo.git.diff(f"{self.last_aider_commit_hash}~1", self.last_aider_commit_hash)
|
||||
commits = f"{self.last_aider_commit_hash}~1"
|
||||
if self.pretty:
|
||||
syntax_diff = Syntax(diff, "diff", theme="monokai", line_numbers=False)
|
||||
self.console.print(syntax_diff)
|
||||
diff = self.repo.git.diff(commits, "--color", self.last_aider_commit_hash)
|
||||
else:
|
||||
diff = self.repo.git.diff(commits, self.last_aider_commit_hash)
|
||||
|
||||
self.console.print(Text(diff))
|
||||
|
||||
def cmd_add(self, args):
|
||||
"Add matching files to the chat"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue