From 159f0b07dc0bde78a5de4c376f896690e794beec Mon Sep 17 00:00:00 2001 From: uncle6me-web Date: Wed, 29 Jul 2026 17:45:30 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=B4=F0=9F=94=B4=20fix:=20portal=20?= =?UTF-8?q?=E7=99=BD=E7=95=AB=E9=9D=A2=E2=80=94=E2=80=94t131=20=E8=AA=A4?= =?UTF-8?q?=E5=88=AA=E4=B8=8A=E4=B8=80=E5=80=8B=20IIFE=20=E7=9A=84?= =?UTF-8?q?=E6=94=B6=E5=B0=BE=20})();?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit leo:「問題是 portal 是白的」。真因:t131 合併 AI 設定時刪掉舊的 chat-key/extractor 兩區, **連同上一個 IIFE 的收尾 })(); 一起刪掉** ⇒ 整段 JS 語法錯(Unexpected end of file) ⇒ 瀏覽器整支 script 不執行=白畫面。 **總管失職**:t131 驗收只跑了 vitest(測後端)+grep 字串,**從未驗過前端 JS 語法**—— portal/index.html 是純前端檔,vitest 根本測不到它。 修:補回 })();;node --check 通過;os-split/safejson 測試綠。 --- console-ui/public/portal/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/console-ui/public/portal/index.html b/console-ui/public/portal/index.html index 9e8d9f3..cb163c3 100644 --- a/console-ui/public/portal/index.html +++ b/console-ui/public/portal/index.html @@ -784,8 +784,10 @@ function taipeiMonthDay(ms) { var d = new Date(ms + TAIPEI_OFFSET_MS); return { if (dl.parentNode) dl.parentNode.insertBefore(both, dl.nextSibling); } } - // t131 AI 設定(合併 Gemini API Key+Claude 加強版) - (function () { + })(); + + // t131 AI 設定(合併 Gemini API Key+Claude 加強版) + (function () { // 進入設定頁時讀取現有設定(GET /portal/admin/ai) function loadAiConfig() { if (!(S.profile && S.profile.role === 'admin')) return;