From 1b6f0385908ddc5bd589d96127826cf4349d2d63 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 27 Apr 2024 08:13:50 -0700 Subject: [PATCH] prettier edit message --- aider/gui.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/aider/gui.py b/aider/gui.py index 7846fbc3e..37d89d4b3 100755 --- a/aider/gui.py +++ b/aider/gui.py @@ -86,16 +86,17 @@ class GUI: show_undo = False res = "" if commit_hash: + prefix = "aider: " + if commit_message.startswith(prefix): + commit_message = commit_message[len(prefix) :] res += f"Commit `{commit_hash}`: {commit_message} \n" if commit_hash == self.coder.last_aider_commit_hash: show_undo = True - if len(fnames) == 1: - res += f"Applied edits to `{fnames[0]}`" - elif len(fnames) > 1: - res += "Applied edits to: \n" - for fname in fnames: - res += f"- `{fname}` \n" + if fnames: + fnames = [f"`{fname}`" for fname in fnames] + fnames = ", ".join(fnames) + res += f"Applied edits to {fnames}." with st.container(border=True): st.write(res)