From 077d5afeee3be2e040eb5f59d76ff97e261152c7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 06:30:59 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DXSS:=20innerHTML=E6=94=B9?= =?UTF-8?q?=E4=B8=BADOM=20API=E5=88=9B=E5=BB=BA=E9=87=8D=E8=BF=9E=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/f776c06a-3f23-484d-98a9-322eba565fcf Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- docs/index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index d368a4ad..7af7e013 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2821,7 +2821,14 @@ async function checkChatBackend(){ var tip=document.createElement('div'); tip.id='chatConnTip'; tip.className='cm s'; - tip.innerHTML='⚠️ 后端服务暂时未连接。本地智能回复可用,配置API密钥可解锁AI对话。
'; + var tipText=document.createTextNode('⚠️ 后端服务暂时未连接。本地智能回复可用,配置API密钥可解锁AI对话。'); + tip.appendChild(tipText); + tip.appendChild(document.createElement('br')); + var retryBtn=document.createElement('button'); + retryBtn.textContent='🔄 重新连接'; + retryBtn.style.cssText='margin-top:6px;padding:4px 12px;border-radius:4px;border:1px solid var(--accent,#6ea8fe);background:transparent;color:var(--accent,#6ea8fe);cursor:pointer;font-size:12px'; + retryBtn.addEventListener('click',retryChatBackend); + tip.appendChild(retryBtn); chatMs.appendChild(tip); chatMs.scrollTop=chatMs.scrollHeight; }