From 90a28e31e8c23c5bf18f78d3550abf2bb787491d Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 19 Nov 2024 17:33:16 -0800 Subject: [PATCH] feat: Add --show-release-notes option to control release notes display --- aider/args.py | 6 ++++++ aider/main.py | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/aider/args.py b/aider/args.py index c083f21a1..2a266f303 100644 --- a/aider/args.py +++ b/aider/args.py @@ -620,6 +620,12 @@ def get_parser(default_config_files, git_root): help="Check for new aider versions on launch", default=True, ) + group.add_argument( + "--show-release-notes", + action=argparse.BooleanOptionalAction, + help="Show release notes on first run of new version (default: None, ask user)", + default=None, + ) group.add_argument( "--install-main-branch", action="store_true", diff --git a/aider/main.py b/aider/main.py index 2dc2cf054..4cbbfc77e 100644 --- a/aider/main.py +++ b/aider/main.py @@ -747,7 +747,14 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F coder.show_announcements() if is_first_run: - io.offer_url(urls.release_notes, "Would you like to see what's new in this version?") + if args.show_release_notes is None: + show = io.confirm_ask("Would you like to see what's new in this version?") + else: + show = args.show_release_notes + + if show: + io.tool_output(f"Opening release notes: {urls.release_notes}") + utils.open_url(urls.release_notes) io.tool_output() if args.show_prompts: