mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
Print diffs and commit message separately.
This commit is contained in:
parent
ea63f9b31f
commit
e162f053c8
1 changed files with 8 additions and 7 deletions
15
coder.py
15
coder.py
|
@ -434,9 +434,10 @@ class Coder:
|
|||
if not dirty_fnames:
|
||||
return
|
||||
|
||||
self.console.print("[red]Files have uncommitted changes:")
|
||||
for fname in dirty_fnames:
|
||||
self.console.print(f"[red] {fname}")
|
||||
self.console.print(Text(diffs))
|
||||
|
||||
#for fname in dirty_fnames:
|
||||
# self.console.print(f"[red] {fname}")
|
||||
|
||||
context = ""
|
||||
if message_history:
|
||||
|
@ -465,10 +466,11 @@ class Coder:
|
|||
if prefix:
|
||||
commit_message = prefix + commit_message
|
||||
|
||||
self.console.print(f"[red]\nCommit message: {commit_message}\n")
|
||||
self.console.print("[red]Files have uncommitted changes.")
|
||||
self.console.print(f"[red]Commit message: {commit_message}\n")
|
||||
|
||||
if ask:
|
||||
res = Confirm.ask("[red]Commit?")
|
||||
res = Confirm.ask("[red]Commit before starting the chat?")
|
||||
|
||||
if not res:
|
||||
self.console.print("[red]Skipped commmit.")
|
||||
|
@ -511,14 +513,13 @@ def main():
|
|||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
dump(args)
|
||||
|
||||
use_gpt_4 = not args.gpt_3_5_turbo
|
||||
fnames = args.files
|
||||
pretty = args.pretty
|
||||
|
||||
coder = Coder(use_gpt_4, fnames, pretty)
|
||||
coder.commit("", ask=args.commit)
|
||||
coder.commit("", ask=not args.commit)
|
||||
|
||||
if args.apply:
|
||||
with open(args.apply, "r") as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue