promptimizer-cli 0.1.18 → 0.1.20

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.
@@ -151,7 +151,8 @@ function banner(session, version) {
151
151
  out(` ${color(ANSI.green, "●")} ${label}${models ? ` · ${models} models` : ""}`);
152
152
  out(` ${color(ANSI.dim, `baseline ${baseline}`)}`);
153
153
  out();
154
- out(` ${color(ANSI.dim, "Type a prompt, or /help /models /savings /clear /quit")}`);
154
+ out(` ${color(ANSI.dim, "Type a prompt, or /help /models /savings /clear /logout /quit")}`);
155
+ out(` ${color(ANSI.dim, "Cache keys on full history — /clear then repeat a prompt to see cache hit")}`);
155
156
  out();
156
157
  }
157
158
 
@@ -242,7 +243,9 @@ function printMeta(result) {
242
243
  const saved = result.usage?.cost?.saved_usd;
243
244
  const bits = [meta.model || result.model, meta.tier].filter(Boolean);
244
245
  if (saved != null) bits.push(`saved ${usd(saved)}`);
245
- if (meta.cache_hit) bits.push("cache");
246
+ if (meta.exact_cache_hit) bits.push(color(ANSI.green, "cache hit"));
247
+ else if (meta.prefix_cache_hit) bits.push(color(ANSI.green, "prefix cache"));
248
+ else if ("cache_hit" in meta) bits.push(color(ANSI.gray, "miss"));
246
249
  if (meta.escalated) bits.push("escalated");
247
250
  if (meta.latency_ms != null) bits.push(`${Math.round(Number(meta.latency_ms))}ms`);
248
251
  out(color(ANSI.dim, ` ↳ ${bits.join(" · ")}`));
@@ -414,6 +417,7 @@ async function interactive(flags) {
414
417
  out(` ${color(ANSI.bold, "/savings")} account ledger`);
415
418
  out(` ${color(ANSI.bold, "/session")} provider status`);
416
419
  out(` ${color(ANSI.bold, "/clear")} clear chat history`);
420
+ out(` ${color(ANSI.bold, "/logout")} remove saved API key`);
417
421
  out(` ${color(ANSI.bold, "/quit")} exit`);
418
422
  out();
419
423
  };
@@ -443,6 +447,11 @@ async function interactive(flags) {
443
447
  continue;
444
448
  }
445
449
 
450
+ if (trimmed === "/logout") {
451
+ cmdLogout();
452
+ break;
453
+ }
454
+
446
455
  if (trimmed === "/session") {
447
456
  try {
448
457
  session = await loadSession(flags, readConfig());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptimizer-cli",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Interactive Promptimizer CLI — Gemini-style REPL for quality-aware routing.",
5
5
  "type": "module",
6
6
  "bin": {