0.2.1:列表工作目錄只顯示資料夾名稱,完整路徑滑鼠停留才顯示
This commit is contained in:
+1
-1
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
'<td><strong>' + esc(b.name) + '</strong>' + engineTag(b.engine) +
|
||||
(b.error ? '<br><span style="font-size:11px;color:#ed4245">' + esc(b.error) + '</span>' : '') + '</td>' +
|
||||
'<td>' + statusBadge(b.status) + '</td>' +
|
||||
'<td><span class="mono" title="' + esc(b.workDir) + '">' + esc(shortPath(b.workDir)) + '</span></td>' +
|
||||
'<td><span class="mono workdir" title="' + esc(b.workDir) + '">' + esc(folderName(b.workDir)) + '</span></td>' +
|
||||
'<td class="mono">' + esc(b.sandbox || '-') +
|
||||
((b.model || b.reasoningEffort || b.sessionMode !== 'per-chat' || b.networkAccess)
|
||||
? '<br><span class="script-name">' + 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(' / ')) + '</span>'
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user