mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: Simplify release notes display logic in main function
This commit is contained in:
parent
725b2fc16f
commit
12188b6684
1 changed files with 10 additions and 9 deletions
|
@ -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 += [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue