refactor: Simplify release notes display logic in main function

This commit is contained in:
Paul Gauthier 2024-11-19 17:37:13 -08:00 committed by Paul Gauthier (aider)
parent 725b2fc16f
commit 12188b6684

View file

@ -745,17 +745,18 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
return coder
coder.show_announcements()
io.tool_output()
if is_first_run:
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 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}")
utils.open_url(urls.release_notes)
io.tool_output()
if show:
io.tool_output(f"Opening release notes: {urls.release_notes}")
utils.open_url(urls.release_notes)
if args.show_prompts:
coder.cur_messages += [