From 0affe087985ab2d05765d748d0638e713bff78e1 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Mon, 25 May 2026 06:01:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E6=8F=8F=E7=BB=88=E7=AB=AF=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E7=BC=BA=E5=A4=B1=E6=A6=82=E7=8E=87=E5=88=86=E5=B8=83?= =?UTF-8?q?=E6=97=B6=E8=87=AA=E5=8A=A8=E5=BC=BA=E5=88=B6=E5=88=B7=E6=96=B0?= =?UTF-8?q?=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=89=80=E6=9C=89=E5=9F=8E=E5=B8=82?= =?UTF-8?q?=E4=BA=A7=E7=94=9F=E5=B8=82=E5=9C=BA=E6=89=AB=E6=8F=8F=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/scan_terminal_city_row.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/scan_terminal_city_row.py b/web/scan_terminal_city_row.py index 48eff4aa..a814c37b 100644 --- a/web/scan_terminal_city_row.py +++ b/web/scan_terminal_city_row.py @@ -138,12 +138,21 @@ def _scan_city_terminal_rows( *, force_refresh: bool = False, ) -> Dict[str, Any]: + # Try cached analysis first; force-refresh if probability distribution is missing data = _analyze( city, force_refresh=force_refresh, include_llm_commentary=False, detail_mode="market", ) + probs = data.get("probabilities") or {} + if not probs.get("distribution") and not force_refresh: + data = _analyze( + city, + force_refresh=True, + include_llm_commentary=False, + detail_mode="market", + ) target_dates = _resolve_time_range_dates(data, filters["time_range"]) rows: List[Dict[str, Any]] = [] primary_scores: List[float] = []