promptimizer-cli 0.1.19 → 0.1.21

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