From f2c5b7b7a28908904dfc26a34c7f0d61d6536895 Mon Sep 17 00:00:00 2001 From: Codebuddy Date: Sat, 15 Aug 2026 18:11:56 +0800 Subject: [PATCH] =?utf8?q?feat:=20=E6=B5=8F=E8=A7=88=E5=99=A8=E6=A0=87?= =?utf8?q?=E7=AD=BE=E9=A1=B5=E6=A0=87=E9=A2=98=E6=94=B9=E4=B8=BA=E3=80=8C?= =?utf8?q?=E4=BC=9A=E8=AF=9D=E5=90=8D=20-=20CLI=E3=80=8D=EF=BC=8C=E5=8E=BB?= =?utf8?q?=E6=8E=89=E6=97=A0=E6=84=8F=E4=B9=89=E7=8A=B6=E6=80=81=E7=82=B9?= =?utf8?q?=EF=BC=8C=E4=BE=BF=E4=BA=8E=E5=A4=9A=E6=A0=87=E7=AD=BE=E5=8C=BA?= =?utf8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- frontend/index.html | 9 +++++++++ 1 file changed, 9 insertions(+) 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){} } } -- 2.43.0