junecoder 1.0.18 → 1.0.19

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tui.mjs +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "junecoder",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Zero Npm Dependencies Agent Framework",
5
5
  "main": "agent.mjs",
6
6
  "type": "module",
package/tui.mjs CHANGED
@@ -245,7 +245,7 @@ export async function startTUI(agent, opts = {}) {
245
245
  const taskHint = state.tasks.length > 0 ? " \u2502 \u2713" + state.tasks.filter(t => t.status === "done").length + "/" + state.tasks.length : "";
246
246
  const tk = state.tokens, fmtK = n => n >= 10000 ? Math.round(n/1000) + "k" : n >= 1000 ? (n/1000).toFixed(1) + "k" : String(n);
247
247
  const tokenHint = tk.prompt > 0 ? " \u2502 \u2191" + fmtK(tk.prompt) + " \u2193" + fmtK(tk.completion) : "";
248
- const cacheHint = tk.cacheHit > 0 ? " \u2502 Hit " + fmtK(tk.cacheHit) : "";
248
+ const cacheHint = tk.prompt > 0 && tk.cacheHit > 0 ? " \u2502 Hit " + Math.round(tk.cacheHit / tk.prompt * 100) + "%" : "";
249
249
  const elapsed = state.processing ? " " + Math.floor((Date.now() - state.processingStarted)/1000) + "s" : "";
250
250
  const toolHint = state.currentTool ? " " + state.currentTool + "\u2026" : "";
251
251
  const statusText = state.processing ? state.status + toolHint + elapsed : state.status;