promptimizer-cli 0.1.29 → 0.1.31
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 +12 -5
- package/package.json +1 -1
package/bin/promptimizer.mjs
CHANGED
|
@@ -191,7 +191,7 @@ function banner(session, version) {
|
|
|
191
191
|
out(` ${color(ANSI.dim, `baseline ${baseline}`)}`);
|
|
192
192
|
out();
|
|
193
193
|
out(` ${color(ANSI.dim, "Type a prompt, or /help /hosts /models /connect /disconnect /clear /quit")}`);
|
|
194
|
-
out(` ${color(ANSI.dim, "
|
|
194
|
+
out(` ${color(ANSI.dim, "Same last message → prompt cache; identical thread → exact cache; /clear resets the thread")}`);
|
|
195
195
|
out();
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -299,15 +299,22 @@ function printMeta(result) {
|
|
|
299
299
|
if (meta.routing_policy) bits.push(String(meta.routing_policy));
|
|
300
300
|
if (meta.provider_id || meta.host) bits.push(String(meta.provider_id || meta.host));
|
|
301
301
|
if (saved != null) bits.push(`saved ${usd(saved)}`);
|
|
302
|
-
if (meta.exact_cache_hit) bits.push(color(ANSI.green, "cache
|
|
302
|
+
if (meta.exact_cache_hit) bits.push(color(ANSI.green, "exact cache"));
|
|
303
303
|
else if (meta.prompt_cache_hit) bits.push(color(ANSI.green, "prompt cache"));
|
|
304
304
|
else if (meta.semantic_cache_hit) {
|
|
305
|
-
const mode =
|
|
305
|
+
const mode =
|
|
306
|
+
meta.semantic_cache_mode === "full"
|
|
307
|
+
? "semantic full"
|
|
308
|
+
: meta.semantic_cache_mode === "prompt"
|
|
309
|
+
? "prompt cache"
|
|
310
|
+
: meta.semantic_cache_mode === "hybrid"
|
|
311
|
+
? "semantic hybrid"
|
|
312
|
+
: "semantic cache";
|
|
306
313
|
const sim =
|
|
307
314
|
meta.semantic_similarity != null ? ` ${Math.round(Number(meta.semantic_similarity) * 100)}%` : "";
|
|
308
315
|
bits.push(color(ANSI.green, `${mode}${sim}`));
|
|
309
|
-
} else if (meta.prefix_cache_hit) bits.push(color(ANSI.
|
|
310
|
-
else
|
|
316
|
+
} else if (meta.prefix_cache_hit) bits.push(color(ANSI.dim, "prefix cache"));
|
|
317
|
+
else bits.push(color(ANSI.gray, "miss"));
|
|
311
318
|
if (meta.quality_gate) bits.push(`gate:${meta.quality_gate}`);
|
|
312
319
|
if (meta.quality_audit) {
|
|
313
320
|
bits.push(meta.quality_audit_pass === false ? color(ANSI.yellow, "audit fail") : "audit ok");
|