@wendongfly/myhi 1.0.87 → 1.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat.html +2 -1
- package/dist/index.html +7 -5
- package/package.json +1 -1
package/dist/chat.html
CHANGED
|
@@ -368,7 +368,8 @@
|
|
|
368
368
|
if (!s.usage) continue;
|
|
369
369
|
const u = s.usage;
|
|
370
370
|
html += `<div ${T}><b style="color:#e6edf3">${s.title}</b> (${s.owner || '管理员'})</div>`;
|
|
371
|
-
html += `<div style="font-size:0.78rem;color:#8b949e;margin:0.2rem 0 0.
|
|
371
|
+
html += `<div style="font-size:0.78rem;color:#8b949e;margin:0.2rem 0 0.3rem;line-height:1.5">查询 <b style="color:#b1bac4">${u.queryCount}</b>次 输入 <b style="color:#b1bac4">${((u.totalInputTokens+u.totalCacheReadTokens)/1000).toFixed(0)}K</b> 输出 <b style="color:#b1bac4">${(u.totalOutputTokens/1000).toFixed(0)}K</b> 费用 <b style="color:#b1bac4">$${u.totalCostUSD.toFixed(4)}</b></div>`;
|
|
372
|
+
if (u.modelUsage) { for (const [m, mu] of Object.entries(u.modelUsage)) { html += `<div style="font-size:0.72rem;color:#6e7681;line-height:1.4"> ${m.replace(/claude-/,'').replace(/-\d{8}$/,'').replace(/\[.*\]/,'')} ${(mu.inputTokens/1000).toFixed(0)}K/${(mu.outputTokens/1000).toFixed(0)}K $${mu.costUSD.toFixed(4)}</div>`; } }
|
|
372
373
|
}
|
|
373
374
|
html += '</div>';
|
|
374
375
|
}
|
package/dist/index.html
CHANGED
|
@@ -525,10 +525,10 @@
|
|
|
525
525
|
}
|
|
526
526
|
if (data.dir) {
|
|
527
527
|
_userDir = data.dir;
|
|
528
|
-
//
|
|
528
|
+
// 默认填入绑定目录,隐藏盘符栏,保留最近目录
|
|
529
529
|
document.getElementById('inp-cwd').value = data.dir;
|
|
530
|
-
document.getElementById('recent-dirs').style.display = 'none';
|
|
531
530
|
document.getElementById('drive-bar').style.display = 'none';
|
|
531
|
+
renderRecentDirs();
|
|
532
532
|
}
|
|
533
533
|
}).catch(() => {});
|
|
534
534
|
|
|
@@ -564,7 +564,8 @@
|
|
|
564
564
|
if (!s.usage) continue;
|
|
565
565
|
const u = s.usage;
|
|
566
566
|
html += `<div ${T}><b style="color:#e6edf3">${s.title}</b> (${s.owner || '管理员'})</div>`;
|
|
567
|
-
html += `<div style="font-size:0.78rem;color:#8b949e;margin:0.2rem 0 0.
|
|
567
|
+
html += `<div style="font-size:0.78rem;color:#8b949e;margin:0.2rem 0 0.3rem;line-height:1.5">查询 <b style="color:#b1bac4">${u.queryCount}</b>次 输入 <b style="color:#b1bac4">${((u.totalInputTokens+u.totalCacheReadTokens)/1000).toFixed(0)}K</b> 输出 <b style="color:#b1bac4">${(u.totalOutputTokens/1000).toFixed(0)}K</b> 费用 <b style="color:#b1bac4">$${u.totalCostUSD.toFixed(4)}</b></div>`;
|
|
568
|
+
if (u.modelUsage) { for (const [m, mu] of Object.entries(u.modelUsage)) { html += `<div style="font-size:0.72rem;color:#6e7681;line-height:1.4"> ${m.replace(/claude-/,'').replace(/-\d{8}$/,'').replace(/\[.*\]/,'')} ${(mu.inputTokens/1000).toFixed(0)}K/${(mu.outputTokens/1000).toFixed(0)}K $${mu.costUSD.toFixed(4)}</div>`; } }
|
|
568
569
|
}
|
|
569
570
|
html += '</div>';
|
|
570
571
|
}
|
|
@@ -779,8 +780,9 @@
|
|
|
779
780
|
container.innerHTML = '';
|
|
780
781
|
const dirs = getRecentDirs();
|
|
781
782
|
const sorted = Object.entries(dirs).sort((a, b) => b[1] - a[1]);
|
|
782
|
-
|
|
783
|
-
|
|
783
|
+
const filtered = _userDir ? sorted.filter(([path]) => path.startsWith(_userDir)) : sorted;
|
|
784
|
+
if (!filtered.length) return;
|
|
785
|
+
filtered.forEach(([path]) => {
|
|
784
786
|
const btn = document.createElement('button');
|
|
785
787
|
// 只显示最后一级目录名
|
|
786
788
|
const short = path.replace(/[\\/]$/, '').split(/[\\/]/).pop() || path;
|