merge main:把 t176(拔雲端 LLM 下發)與 workers_ai_chat 種子併進 CIS 分支
出貨前發現兩條分支各有一半: main → t176 拔掉雲端下發 extractor/刪 admin/extractor/workers_ai_chat 種子 fix/cis-round3-portal → t181 新萃取端點 /portal/daemon/extract、CIS 視覺 **要合起來才是完整的出貨內容**(實測:合併前 bundle 仍含 admin/extractor ×2)。 原始碼三檔全自動合併;只有 portal-admin.test.ts 衝突—— HEAD 側是**過時的 t131/t122 測試**(測 main 已刪的端點,留著必紅), main 側是刪除。解法:接受刪除、保留我這側的 t181 守衛。 測試 31 passed,唯一 failed 是基準線既有的 GET /portal 靜態資源案。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -92,7 +92,12 @@
|
||||
.theme-btn { flex: none; margin-left: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(var(--ink-rgb),.25); background: none; color: rgba(var(--ink-rgb),.65); font-size: 16px; cursor: pointer; line-height: 1; align-self: center; }
|
||||
</style>
|
||||
<script src="/config.js"></script>
|
||||
<script>window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "https://cypher.arcrun.dev";</script>
|
||||
<script>
|
||||
// 2026-08-01(arcrun-rag#10 同族):拔掉寫死中央位址的 fallback。
|
||||
// apiBase 由 worker 動態產生的 /config.js 注入;缺它就讓它明顯壞掉,
|
||||
// **不要靜默把請求(可能含金鑰)送去中央實例**。
|
||||
window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
||||
@@ -220,7 +220,12 @@
|
||||
.kvline { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin: 5px 0; }
|
||||
</style>
|
||||
<script src="/config.js"></script>
|
||||
<script>window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "https://cypher.arcrun.dev";</script>
|
||||
<script>
|
||||
// 2026-08-01(arcrun-rag#10 同族):拔掉寫死中央位址的 fallback。
|
||||
// apiBase 由 worker 動態產生的 /config.js 注入;缺它就讓它明顯壞掉,
|
||||
// **不要靜默把請求(可能含金鑰)送去中央實例**。
|
||||
window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -186,7 +186,23 @@
|
||||
.kvline { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin: 5px 0; }
|
||||
</style>
|
||||
<script src="/config.js"></script>
|
||||
<script>window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "https://cypher.arcrun.dev";</script>
|
||||
<script>
|
||||
// apiBase 由安裝器注入的 config.js 提供(實查用戶實例:
|
||||
// window.ARCRUN_CONFIG = { apiBase: "https://arcrun-cypher-executor.<subdomain>.workers.dev" })。
|
||||
// 🔴 2026-08-01 拔掉舊的 `|| "https://cypher.arcrun.dev"` fallback:
|
||||
// 那是「靜默打到別人家」的未爆彈——config.js 一旦沒載入/被擋/改名,
|
||||
// 前端會安靜地把請求(含**用戶金鑰**)送去中央實例,而不是明顯壞掉。
|
||||
// **寧可明顯失敗,不要靜默錯置。**
|
||||
window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "";
|
||||
if (!window.ARCRUN_API_BASE) {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var b = document.createElement('div');
|
||||
b.style.cssText = 'position:fixed;top:0;left:0;right:0;z-index:99999;background:#b4462f;color:#fff;padding:12px 16px;font:14px/1.5 system-ui;text-align:center';
|
||||
b.textContent = '設定檔沒載入(config.js),這個頁面連不到你的服務。請重新整理;若持續發生,請重跑一次安裝。';
|
||||
document.body.appendChild(b);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -698,11 +714,19 @@ function taipeiMonthDay(ms) { var d = new Date(ms + TAIPEI_OFFSET_MS); return {
|
||||
if (!location.hash) location.hash = '#/' + HOME;
|
||||
route();
|
||||
}
|
||||
function dropSession() {
|
||||
// t161(leo 07-31 實撞:「實際上根本沒連上任何庫,清單空白」):session 過期時
|
||||
// 舊行為=靜默清 token 跳回登入頁,**畫面不說任何原因** ⇒ 用戶以為「庫不見了/系統壞了」。
|
||||
// 友善=前端:踢回登入頁時一定要說「為什麼」,用戶才知道下一步做什麼(重新登入即可,資料都在)。
|
||||
function dropSession(reason) {
|
||||
S.token = '';
|
||||
S.profile = null;
|
||||
try { localStorage.removeItem('arcrun_portal_session'); } catch (e) { /* noop */ }
|
||||
showAuth();
|
||||
var msg = reason || '你的登入已過期,請重新登入(你的資料都還在,不會遺失)。';
|
||||
try {
|
||||
var el = $('login-status');
|
||||
if (el) el.textContent = msg;
|
||||
} catch (e) { /* 登入殼還沒渲染就算了 */ }
|
||||
}
|
||||
function boot() {
|
||||
if (!S.token) { showAuth(); return; }
|
||||
|
||||
Reference in New Issue
Block a user