From d8f205b34907c9fef3a044a0546011b9d17d32c6 Mon Sep 17 00:00:00 2001 From: JianMiau Date: Mon, 24 Aug 2026 12:15:22 +0800 Subject: [PATCH] =?UTF-8?q?0.2.1=EF=BC=9A=E5=88=97=E8=A1=A8=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=9B=AE=E9=8C=84=E5=8F=AA=E9=A1=AF=E7=A4=BA=E8=B3=87?= =?UTF-8?q?=E6=96=99=E5=A4=BE=E5=90=8D=E7=A8=B1=EF=BC=8C=E5=AE=8C=E6=95=B4?= =?UTF-8?q?=E8=B7=AF=E5=BE=91=E6=BB=91=E9=BC=A0=E5=81=9C=E7=95=99=E6=89=8D?= =?UTF-8?q?=E9=A1=AF=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/web/public/index.html | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 250b260..a165ded 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telegram-bot", - "version": "0.2.0", + "version": "0.2.1", "description": "Telegram bot powered by your local AI CLI (OpenAI Codex or Claude Code) — zero-dependency, pm2-managed, with a web console to manage multiple bots", "license": "MIT", "type": "commonjs", diff --git a/src/web/public/index.html b/src/web/public/index.html index c510bbe..5a6c1af 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -109,6 +109,7 @@ .notice-steps { color: #e2e8f0; } .notice-steps b { color: #e2e8f0; background: rgba(88,101,242,0.18); padding: 1px 7px; border-radius: 5px; font-weight: 600; } + .workdir { cursor: help; border-bottom: 1px dotted #475569; } .tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 10px; font-weight: 700; margin-left: 6px; vertical-align: middle; letter-spacing: .3px; } .tag-codex { background: rgba(16,163,127,0.18); color: #34d399; } @@ -484,7 +485,7 @@ function renderBots(bots) { '' + esc(b.name) + '' + engineTag(b.engine) + (b.error ? '
' + esc(b.error) + '' : '') + '' + '' + statusBadge(b.status) + '' + - '' + esc(shortPath(b.workDir)) + '' + + '' + esc(folderName(b.workDir)) + '' + '' + esc(b.sandbox || '-') + ((b.model || b.reasoningEffort || b.sessionMode !== 'per-chat' || b.networkAccess) ? '
' + esc([b.model, b.reasoningEffort, b.sessionMode === 'shared' ? '共用會話' : b.sessionMode === 'stateless' ? '無記憶' : '', b.networkAccess ? '可連網' : '', (b.writeUsers && b.writeUsers.length) ? '限 @' + b.writeUsers.join(' @') + ' 可寫' : '', b.promptRules ? '有回覆規範' : ''].filter(Boolean).join(' / ')) + '' @@ -506,9 +507,11 @@ function renderBots(bots) { }).join(''); } -function shortPath(p) { +// 列表只顯示資料夾名稱,完整路徑放 title(滑鼠停上去才看) +function folderName(p) { if (!p) return '-'; - return p.length > 34 ? '…' + p.slice(-32) : p; + const parts = String(p).replace(/[\\/]+$/, '').split(/[\\/]/); + return parts[parts.length - 1] || p; } async function botAction(action, name) {