@xynogen/pix-models 0.1.26 → 0.1.27
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/README.md +1 -1
- package/package.json +1 -1
- package/src/models.ts +11 -3
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Pi extension — enhanced `/models` picker with coding score/rank.
|
|
|
4
4
|
|
|
5
5
|
## What it does
|
|
6
6
|
|
|
7
|
-
Registers a `/models` slash command that replaces Pi's built-in `/model` selector with a richer TUI picker. Each row shows the model id, context window, per-million-token cost, and a coding-focused score/rank (with star bar) when available. The list is sorted by coding score (best first), then alphabetically for unscored models. Fuzzy search filters the list as you type. Selecting a model switches the active model for the session. Model metadata is sourced from `~/.cache/pi/` via `pix-data`; the coding score/rank is computed locally from the modelgrep catalog (best = #1). Requires `@xynogen/pix-data` as a dependency.
|
|
7
|
+
Registers a `/models` slash command that replaces Pi's built-in `/model` selector with a richer TUI picker. Each row shows the model id, context window, per-million-token cost, and a coding-focused score/rank (with star bar) when available. The list is sorted by coding score (best first), then alphabetically for unscored models. Fuzzy search filters the list as you type. Left/right changes the thinking level (`off` → `minimal` → `low` → `medium` → `high` → `xhigh`), with the effective level shown live in the picker header. Selecting a model switches the active model for the session. Model metadata is sourced from `~/.cache/pi/` via `pix-data`; the coding score/rank is computed locally from the modelgrep catalog (best = #1). Requires `@xynogen/pix-data` as a dependency.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
package/package.json
CHANGED
package/src/models.ts
CHANGED
|
@@ -286,6 +286,14 @@ async function showEnhancedPicker(pi: ExtensionAPI, ctx: ExtensionContext): Prom
|
|
|
286
286
|
1,
|
|
287
287
|
);
|
|
288
288
|
|
|
289
|
+
// Widest cost string so the cost column pads to a common width and the
|
|
290
|
+
// following ⚡score/stars stay column-aligned (e.g. "10.00/50.00" is 11
|
|
291
|
+
// chars — a fixed pad of 10 shifted those rows right by one).
|
|
292
|
+
const maxCostWidth = Math.max(
|
|
293
|
+
...dedupedRows.map((r) => fmtCost(r.dev).length),
|
|
294
|
+
"free".length,
|
|
295
|
+
);
|
|
296
|
+
|
|
289
297
|
// Mute low-info parts (separators, padding, #, ☆) so the actual values pop.
|
|
290
298
|
const mute = (s: string) => theme.fg("muted", s);
|
|
291
299
|
const sep = mute(" · ");
|
|
@@ -343,11 +351,11 @@ async function showEnhancedPicker(pi: ExtensionAPI, ctx: ExtensionContext): Prom
|
|
|
343
351
|
const rawCost = fmtCost(dev);
|
|
344
352
|
let costSeg: string;
|
|
345
353
|
if (rawCost === "—") {
|
|
346
|
-
costSeg = theme.fg("dim", "—".padEnd(
|
|
354
|
+
costSeg = theme.fg("dim", "—".padEnd(maxCostWidth));
|
|
347
355
|
} else if (rawCost === "free") {
|
|
348
|
-
costSeg = mute("free".padEnd(
|
|
356
|
+
costSeg = mute("free".padEnd(maxCostWidth));
|
|
349
357
|
} else {
|
|
350
|
-
costSeg = theme.fg("success", rawCost.padEnd(
|
|
358
|
+
costSeg = theme.fg("success", rawCost.padEnd(maxCostWidth));
|
|
351
359
|
}
|
|
352
360
|
let benchSeg = "";
|
|
353
361
|
if (bench) {
|