feat(cli): tell people at a terminal about a newer release and Tauric's notices

- once a day a background thread records the latest GitHub release and the notices for each version; the welcome screen shows them from that cache, so no run waits on the network
- the release notice names the upgrade command for how TradingAgents was installed
- TRADINGAGENTS_NO_UPDATE_CHECK=1 turns the check off; unattended and CI runs never make it
- notices are read from a new `notices` key, so earlier versions keep reading `announcements`
This commit is contained in:
Yijia-Xiao
2026-10-16 21:11:55 +00:00
parent c9be8b6047
commit c3cdaeb4eb
10 changed files with 574 additions and 91 deletions
+6 -4
View File
@@ -8,7 +8,7 @@ import typer
from rich.align import Align
from rich.panel import Panel
from cli.announcements import display_announcements, fetch_announcements
from cli import updates
from cli.display import (
console,
)
@@ -124,9 +124,11 @@ def _prompt_selections(prefs, flags):
console.print()
console.print() # Add vertical space before announcements
# Fetch and display announcements (silent on failure)
announcements = fetch_announcements()
display_announcements(console, announcements)
# What's new comes from a cache refreshed in the background, and only for
# someone at a terminal: a run never waits on it and unattended runs skip it.
if updates.enabled():
updates.show(console)
updates.start_background_refresh()
def create_question_box(title, prompt, default=None):
box_content = f"[bold]{title}[/bold]\n"