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:
|
if not dirty_fnames:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.console.print("[red]Files have uncommitted changes:")
|
self.console.print(Text(diffs))
|
||||||
for fname in dirty_fnames:
|
|
||||||
self.console.print(f"[red] {fname}")
|
#for fname in dirty_fnames:
|
||||||
|
# self.console.print(f"[red] {fname}")
|
||||||
|
|
||||||
context = ""
|
context = ""
|
||||||
if message_history:
|
if message_history:
|
||||||
|
@ -465,10 +466,11 @@ class Coder:
|
||||||
if prefix:
|
if prefix:
|
||||||
commit_message = prefix + commit_message
|
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:
|
if ask:
|
||||||
res = Confirm.ask("[red]Commit?")
|
res = Confirm.ask("[red]Commit before starting the chat?")
|
||||||
|
|
||||||
if not res:
|
if not res:
|
||||||
self.console.print("[red]Skipped commmit.")
|
self.console.print("[red]Skipped commmit.")
|
||||||
|
@ -511,14 +513,13 @@ def main():
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
dump(args)
|
|
||||||
|
|
||||||
use_gpt_4 = not args.gpt_3_5_turbo
|
use_gpt_4 = not args.gpt_3_5_turbo
|
||||||
fnames = args.files
|
fnames = args.files
|
||||||
pretty = args.pretty
|
pretty = args.pretty
|
||||||
|
|
||||||
coder = Coder(use_gpt_4, fnames, pretty)
|
coder = Coder(use_gpt_4, fnames, pretty)
|
||||||
coder.commit("", ask=args.commit)
|
coder.commit("", ask=not args.commit)
|
||||||
|
|
||||||
if args.apply:
|
if args.apply:
|
||||||
with open(args.apply, "r") as f:
|
with open(args.apply, "r") as f:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue