From a059ca2537fc8ca3f809349685168ff21c0fc4be Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 19 Nov 2024 17:41:57 -0800 Subject: [PATCH] refactor: Improve release notes display logic and user interaction flow --- aider/main.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/aider/main.py b/aider/main.py index f0e46afa2..89d01d72c 100644 --- a/aider/main.py +++ b/aider/main.py @@ -746,18 +746,6 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F return coder coder.show_announcements() - io.tool_output() - - if args.show_release_notes is True: - show = True - elif args.show_release_notes is None: - show = is_first_run and io.confirm_ask("Would you like to see what's new in this version?") - else: # args.show_release_notes is False - show = False - - if show: - io.tool_output(f"Opening release notes: {urls.release_notes}") - webbrowser.open(urls.release_notes) if args.show_prompts: coder.cur_messages += [ @@ -811,6 +799,18 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F io.tool_output('Use /help for help, run "aider --help" to see cmd line args') + show = False + if args.show_release_notes is True: + show = True + elif args.show_release_notes is None and is_first_run: + io.tool_output() + show = io.confirm_ask("Would you like to see what's new in this version?") + + if show: + io.tool_output(f"Opening release notes: {urls.release_notes}") + io.tool_output() + webbrowser.open(urls.release_notes) + if git_root and Path.cwd().resolve() != Path(git_root).resolve(): io.tool_warning( "Note: in-chat filenames are always relative to the git working dir, not the current"