promptimizer-cli 0.1.18 → 0.1.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.
- package/bin/promptimizer.mjs +4 -1
- package/package.json +1 -1
package/bin/promptimizer.mjs
CHANGED
|
@@ -152,6 +152,7 @@ function banner(session, version) {
|
|
|
152
152
|
out(` ${color(ANSI.dim, `baseline ${baseline}`)}`);
|
|
153
153
|
out();
|
|
154
154
|
out(` ${color(ANSI.dim, "Type a prompt, or /help /models /savings /clear /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.
|
|
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(" · ")}`));
|