diff --git a/.env.example b/.env.example index 1b1e082..f10d863 100644 --- a/.env.example +++ b/.env.example @@ -23,7 +23,7 @@ PI_BIN= SUMMARY_SKILL=daily-paper-summary SUMMARY_CONCURRENCY=3 SUMMARY_TIMEOUT_SECONDS=900 -SUMMARY_MAX_RETRIES=1 +SUMMARY_MAX_RETRIES=2 SUMMARY_PDF_MODE=auto # ─── 调度 ───────────────────────────────── diff --git a/app/config.py b/app/config.py index d2f3ebc..a838f0d 100644 --- a/app/config.py +++ b/app/config.py @@ -33,7 +33,7 @@ class Settings(BaseSettings): SUMMARY_SKILL: str = "daily-paper-summary" SUMMARY_CONCURRENCY: int = 3 SUMMARY_TIMEOUT_SECONDS: int = 900 - SUMMARY_MAX_RETRIES: int = 1 + SUMMARY_MAX_RETRIES: int = 2 SUMMARY_PDF_MODE: str = "auto" # "auto" = ≤80k 用 inject,>80k 用 search;也可强制 "inject" / "search" # 调度 diff --git a/app/services/pdf_image_extractor.py b/app/services/pdf_image_extractor.py index ed7ea34..c733687 100644 --- a/app/services/pdf_image_extractor.py +++ b/app/services/pdf_image_extractor.py @@ -145,8 +145,11 @@ def _find_figure_top(page, caption: dict) -> float: bbox = img_info.get("bbox") if bbox is None: continue - # Rect 对象: x0, y0, x1, y1 - ix0, iy0, ix1, iy1 = bbox.x0, bbox.y0, bbox.x1, bbox.y1 + # bbox 可能是 Rect 对象或 tuple,兼容两种格式 + if hasattr(bbox, 'x0'): + ix0, iy0, ix1, iy1 = bbox.x0, bbox.y0, bbox.x1, bbox.y1 + else: + ix0, iy0, ix1, iy1 = bbox[0], bbox[1], bbox[2], bbox[3] if iy1 <= caption_y and iy1 > caption_y - _FIGURE_MAX_HEIGHT: if ix1 > cx0 and ix0 < cx1: above_blocks.append((ix0, iy0, ix1, iy1)) diff --git a/app/static/css/style.css b/app/static/css/style.css index 03d2313..946052a 100644 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -1356,7 +1356,7 @@ mark { /* 管理后台日期输入框样式 */ .kami-date-input { cursor: pointer; - width: 110px; + min-width: 130px; } .kami-date-input::placeholder { color: var(--ink-muted); diff --git a/app/templates/admin_dashboard.html b/app/templates/admin_dashboard.html index e58d84d..3adfde5 100644 --- a/app/templates/admin_dashboard.html +++ b/app/templates/admin_dashboard.html @@ -92,7 +92,7 @@
{% for log in scheduler_history %}