fix(hub): simplify AI coach header actions

Hide model name labels and style New Chat as a primary button matching Generate Summary.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-07 00:40:58 +08:00
parent dfcf0f88fb
commit 51c59b073b
2 changed files with 2 additions and 21 deletions
-17
View File
@@ -2939,7 +2939,6 @@
showToast("已添加一行,请填写 URL 后点「保存设置」");
};
let aiMeta = null;
let aiSummaryLoading = false;
let aiChatLoading = false;
let aiChatSessionCache = null;
@@ -3129,17 +3128,6 @@
if (input) input.disabled = busy;
}
async function loadAiMeta() {
const r = await apiFetch("/api/ai/meta");
aiMeta = await r.json();
const sm = document.getElementById("ai-summary-meta");
const cm = document.getElementById("ai-chat-meta");
const label = aiMeta && aiMeta.model ? aiMeta.model : "";
if (sm) sm.textContent = label;
if (cm) cm.textContent = label;
return aiMeta;
}
async function loadAiSummary() {
const body = document.getElementById("ai-summary-body");
try {
@@ -3149,10 +3137,6 @@
if (latest && latest.content_md) {
if (body) setAiSummaryMarkdown(body, latest.content_md, latest.stats_snapshot);
renderAiSummaryStats(latest.stats_snapshot);
const sm = document.getElementById("ai-summary-meta");
if (sm && latest.generated_at) {
sm.textContent = `${j.model || ""} · ${latest.generated_at}`;
}
}
} catch (e) {
if (body) setAiSummaryPlaceholder(body, `<p class="ai-placeholder">${esc(String(e))}</p>`);
@@ -3167,7 +3151,6 @@
}
async function loadAiPage() {
await loadAiMeta();
await Promise.all([loadAiSummary(), loadAiChatSession()]);
}