Merge branch 'main' into fix/merge-main-into-batch-t173
# Conflicts: # console-ui/public/portal/index.html # cypher-executor/src/routes/health.ts # cypher-executor/src/routes/portal.ts # registry/components/kbdb_upsert_block/component.contract.yaml # registry/examples/km-wiki-ingest/workflow.yaml
This commit is contained in:
@@ -371,6 +371,7 @@ if (!window.ARCRUN_API_BASE) {
|
||||
<div>
|
||||
<div style="font-size:14px;font-weight:500;margin-bottom:4px">Gemini API Key</div>
|
||||
<div style="font-size:13px;line-height:1.6;color:rgba(var(--ink-rgb),.55);margin-bottom:8px">聊天問答與文件萃取都用這一把。<a href="https://aistudio.google.com/apikey" target="_blank" rel="noopener">免費申請</a>,金鑰只存在你自己的知識庫裡。</div>
|
||||
<<<<<<< HEAD
|
||||
<!-- 已存狀態(leo 2026-08-01 規格):唯讀顯示「已輸入」+「修改」鈕,**不顯示 key 本身**。
|
||||
舊版只把 placeholder 改成藍色小字「已設定」⇒ 讀起來像臨時提示、不像已保存的記錄,
|
||||
這正是它看起來像 UI bug 的原因(arcrun-rag#10 附帶修正)。 -->
|
||||
@@ -380,6 +381,8 @@ if (!window.ARCRUN_API_BASE) {
|
||||
</span>
|
||||
<button type="button" class="btn" id="st-ai-key-edit" style="flex:none">修改</button>
|
||||
</div>
|
||||
=======
|
||||
>>>>>>> main
|
||||
<input type="password" id="st-ai-key" class="txt" placeholder="貼上 Gemini API Key" autocomplete="off">
|
||||
</div>
|
||||
<!-- 第二格:Claude 加強版(選填,依 daemon 回報 enable) -->
|
||||
@@ -430,7 +433,11 @@ if (!window.ARCRUN_API_BASE) {
|
||||
<button class="btn3" id="ad-copy-url" style="padding:5px 12px;font-size:13px;white-space:nowrap;flex:none">複製</button>
|
||||
</div>
|
||||
<div style="margin-bottom:12px;padding:12px 15px;border-radius:11px;background:rgba(var(--amber-rgb),.06);border:1px dashed rgba(var(--amber-rgb),.35);font-size:13.5px;line-height:1.7;color:rgba(var(--ink-rgb),.65)">
|
||||
<<<<<<< HEAD
|
||||
<!-- 07-27 leo:拿掉人工建庫表單——庫由「同步小幫手」看守資料夾時自動蓋章產生,
|
||||
=======
|
||||
<!-- 07-27 leo:拿掉「登記新庫」——庫由「同步小幫手」看守資料夾時自動蓋章產生,
|
||||
>>>>>>> main
|
||||
人工登記只會製造對不上的空庫。這裡只做「已存在的庫」的管理。 -->
|
||||
裝好<b style="color:var(--ink)">同步小幫手</b>並選好要看守的資料夾之後,每個資料夾會自動成為一個「庫」出現在下面——<b style="color:var(--ink)">不需要人工新增</b>。下面還是空的,代表小幫手還沒裝好或還沒選資料夾。
|
||||
</div>
|
||||
@@ -821,6 +828,7 @@ function taipeiMonthDay(ms) { var d = new Date(ms + TAIPEI_OFFSET_MS); return {
|
||||
|
||||
// t131 AI 設定(合併 Gemini API Key+Claude 加強版)
|
||||
(function () {
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* 切換金鑰欄的「已存 / 可輸入」兩態(leo 2026-08-01 規格,arcrun-rag#10):
|
||||
* 已存 → 唯讀顯示「已輸入」+「修改」鈕(**不顯示 key 本身**,D36)
|
||||
@@ -849,6 +857,8 @@ function taipeiMonthDay(ms) { var d = new Date(ms + TAIPEI_OFFSET_MS); return {
|
||||
if (input) { input.placeholder = '貼上新的 Gemini API Key(留空取消變更)'; input.focus(); }
|
||||
});
|
||||
|
||||
=======
|
||||
>>>>>>> main
|
||||
// 進入設定頁時讀取現有設定(GET /portal/admin/ai)
|
||||
function loadAiConfig() {
|
||||
if (!(S.profile && S.profile.role === 'admin')) return;
|
||||
@@ -856,8 +866,13 @@ function taipeiMonthDay(ms) { var d = new Date(ms + TAIPEI_OFFSET_MS); return {
|
||||
.then(function (r) { return r.ok ? safeJson(r) : null; })
|
||||
.then(function (d) {
|
||||
if (!d) return;
|
||||
<<<<<<< HEAD
|
||||
// leo 2026-08-01 規格:已存 → 唯讀「已輸入」+「修改」鈕;未存 → 一般輸入框
|
||||
setAiKeySaved(!!d.has_key);
|
||||
=======
|
||||
var ki = $('st-ai-key');
|
||||
if (ki && d.has_key) ki.placeholder = '已設定(留空=不變更)';
|
||||
>>>>>>> main
|
||||
var cb = $('st-ai-use-claude');
|
||||
if (cb) {
|
||||
// 有 claude 才能勾;沒有則停用並顯示提示
|
||||
@@ -903,9 +918,13 @@ function taipeiMonthDay(ms) { var d = new Date(ms + TAIPEI_OFFSET_MS); return {
|
||||
sb.disabled = false;
|
||||
if (guard401(x.status)) return;
|
||||
if (!x.ok) { m.textContent = (x.d && x.d.error) || '儲存失敗'; m.style.color = '#b4462f'; return; }
|
||||
<<<<<<< HEAD
|
||||
// 存好了才切回「已輸入」唯讀態。只有真的送了新 key 才切;
|
||||
// 單純改 Claude 勾選(k 為空)時維持現狀,不誤報「已輸入」。
|
||||
if (k) setAiKeySaved(true);
|
||||
=======
|
||||
if ($('st-ai-key')) { $('st-ai-key').value = ''; $('st-ai-key').placeholder = '已設定(留空=不變更)'; }
|
||||
>>>>>>> main
|
||||
var claudeOn = x.d && x.d.use_claude_for_extract;
|
||||
m.textContent = claudeOn
|
||||
? '已儲存,萃取改用 Claude Code。小幫手請重連一次生效。'
|
||||
|
||||
Reference in New Issue
Block a user