From d2d8dbab65b1232fa9d5840707d722aad2aee6f3 Mon Sep 17 00:00:00 2001 From: OoO Date: Mon, 18 May 2026 15:44:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B7=E5=8C=96=20PPT=20=E7=94=A2=E7=B7=9A?= =?UTF-8?q?=E8=88=87=E7=B7=9A=E4=B8=8A=E9=A0=90=E8=A6=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 2 +- Dockerfile | 1 + TODO_NEXT_STEPS.txt | 2 + config.py | 2 +- docker-compose.yml | 5 + docs/AI_INTELLIGENCE_MODULE_SOT.md | 2 +- routes/admin_observability_routes.py | 58 ++++- services/ppt_auto_generation_service.py | 163 ++++++++++++++ services/ppt_preview_service.py | 103 +++++++++ services/ppt_vision_service.py | 30 ++- templates/admin/ppt_audit_history.html | 111 ++++++++-- templates/admin/ppt_audit_preview.html | 48 ++++ tests/test_admin_observability_routes.py | 75 +++++++ tests/test_ppt_auto_generation_service.py | 37 ++++ web/static/css/page-ppt-audit-history.css | 257 +++++++++++++++++++++- web/static/css/page-ppt-preview.css | 111 ++++++++++ 16 files changed, 980 insertions(+), 27 deletions(-) create mode 100644 services/ppt_preview_service.py create mode 100644 templates/admin/ppt_audit_preview.html create mode 100644 web/static/css/page-ppt-preview.css diff --git a/.env.example b/.env.example index ddd4cab..2adcc83 100644 --- a/.env.example +++ b/.env.example @@ -312,7 +312,7 @@ RAG_DEFAULT_TOP_K=5 RAG_EMBED_MODEL=bge-m3:latest RAG_EMBED_DIM=1024 RAG_EMBED_NORMALIZE=true -PPT_VISION_ENABLED=false +PPT_VISION_ENABLED=true PPT_VISION_MODEL=minicpm-v:latest PPT_VISION_TIMEOUT=60 PPT_AUTO_GENERATION_ENABLED=true diff --git a/Dockerfile b/Dockerfile index 07716ca..c4aee75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,7 @@ RUN apt-get update && apt-get install -y \ fonts-liberation \ fonts-noto-cjk \ fonts-noto-cjk-extra \ + libreoffice-impress \ openssh-client \ libappindicator3-1 || true \ && rm -rf /var/lib/apt/lists/* diff --git a/TODO_NEXT_STEPS.txt b/TODO_NEXT_STEPS.txt index 6379bec..4ec848d 100644 --- a/TODO_NEXT_STEPS.txt +++ b/TODO_NEXT_STEPS.txt @@ -4,6 +4,8 @@ ================================================================================ 【已完成】 + - V10.190 補 `/observability/ppt_audit_file/` 站內線上預覽:PPTX 由 LibreOffice 轉 PDF 快取後以 iframe 預覽,保留原始 PPTX 下載;Dockerfile 加 `libreoffice-impress`,compose 預設啟用 `PPT_VISION_ENABLED=true`,PPT 產線頁新增視覺 QA 停用原因與更精簡的控制台式排版。 + - V10.188 補強 `/observability/ppt_audit_history` PPT 視覺 QA 產線:頁面明確呈現每日、每週、每月、每季、每半年、每年定期產出節奏,並顯示 `ppt_generation_runs` DB 寫入紀錄;保留自動補齊缺漏與資料庫/檔案覆蓋狀態。 - V10.187 修正 `/daily_sales`、`/growth_analysis` 圖表空白:Chart JSON 改從 `