From: Codebuddy Date: Sat, 15 Aug 2026 10:11:56 +0000 (+0800) Subject: feat: 浏览器标签页标题改为「会话名 - CLI」,去掉无意义状态点,便于多标签区分 X-Git-Url: http://acesimba.cloud/gitweb/?a=commitdiff_plain;h=f2c5b7b7a28908904dfc26a34c7f0d61d6536895;p=codebuddy-web.git feat: 浏览器标签页标题改为「会话名 - CLI」,去掉无意义状态点,便于多标签区分 --- diff --git a/frontend/index.html b/frontend/index.html index 55b8a46..4888225 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -435,6 +435,7 @@ body { position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: 100%; over async function showPicker() { show('picker'); + document.title = '任务列表 - CLI'; await renderTasks(); await renderSkillsSidebar(); } @@ -693,6 +694,7 @@ body { position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: 100%; over } document.getElementById('task-title').textContent = '🗂 ' + currentTask.name; document.getElementById('task-cwd').textContent = currentTask.cwd; + updateTitle(); show('terminal'); initTerminal(); connectWS(); @@ -1327,9 +1329,16 @@ body { position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: 100%; over // 输入由 #msg-input 输入区处理,xterm 仅作 TUI 输出展示 } + // 浏览器标签页标题:会话名 - CLI,便于在多标签页间区分 + function updateTitle() { + if (!currentTask) { document.title = 'CLI'; return; } + document.title = currentTask.name + ' - CLI'; + } + function setConnected(v) { statusDot.className = 'dot ' + (v ? 'connected' : 'disconnected'); statusText.textContent = v ? '已连接' : '未连接'; + updateTitle(); if (v && term && term.focus) { try { term.focus(); } catch(e){} } }