offgrid-ai 0.7.0 → 0.7.1
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/package.json +1 -1
- package/src/model-presenters.mjs +4 -3
package/package.json
CHANGED
package/src/model-presenters.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import { findBenchmarkRepo } from "./benchmark.mjs";
|
|
|
12
12
|
const OPTION_SEPARATOR = pc.dim(" │ ");
|
|
13
13
|
const OPTION_STATUS_WIDTH = 10;
|
|
14
14
|
const OPTION_SOURCE_WIDTH = 14;
|
|
15
|
+
const OPTION_CTX_WIDTH = 5;
|
|
15
16
|
|
|
16
17
|
const { stripVTControlCharacters } = await import("node:util");
|
|
17
18
|
|
|
@@ -45,9 +46,9 @@ function optionSourceTag(sourceId, label) {
|
|
|
45
46
|
|
|
46
47
|
function optionCtxLabel(item) {
|
|
47
48
|
if (item.type === "profile" && item.profile.flags?.ctxSize) {
|
|
48
|
-
return `${(item.profile.flags.ctxSize / 1000).toFixed(0)}k
|
|
49
|
+
return optionPad(`${(item.profile.flags.ctxSize / 1000).toFixed(0)}k`, null, OPTION_CTX_WIDTH);
|
|
49
50
|
}
|
|
50
|
-
return "—";
|
|
51
|
+
return optionPad("—", null, OPTION_CTX_WIDTH);
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
function optionSizeLabel(item) {
|
|
@@ -75,7 +76,7 @@ export function modelNameWidth(items) {
|
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
function optionLabel({ status, source, name, ctx, size, nameWidth }) {
|
|
78
|
-
return [status, source, pc.bold(optionPad(name, null, nameWidth)), ctx, pc.dim(size)].
|
|
79
|
+
return [status, source, pc.bold(optionPad(name, null, nameWidth)), ctx, pc.dim(size)].join(OPTION_SEPARATOR);
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
export function modelSelectOption(item, { runningProfilesNow, nameWidth }) {
|