gearbox-code 0.1.25 → 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/dist/cli.mjs +38 -20
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -146701,6 +146701,23 @@ ${fetched.join(`
|
|
|
146701
146701
|
{
|
|
146702
146702
|
const cli = activeCliRef.current;
|
|
146703
146703
|
if (cli) {
|
|
146704
|
+
const looksVersioned = /\d/.test(arg);
|
|
146705
|
+
if (looksVersioned) {
|
|
146706
|
+
const r3 = resolveModelSwitch(arg);
|
|
146707
|
+
if (r3.ok && r3.modelId) {
|
|
146708
|
+
const left = leaveSubscription();
|
|
146709
|
+
setSelector(new FixedSelector(r3.modelId));
|
|
146710
|
+
setLastPick(null);
|
|
146711
|
+
routedRef.current = null;
|
|
146712
|
+
updatePrefs({ pinnedModel: r3.modelId });
|
|
146713
|
+
const newSpec2 = findModel(r3.modelId);
|
|
146714
|
+
const effortSuffix2 = applyEffortClamp(newSpec2 ? effortLevels(newSpec2) : []);
|
|
146715
|
+
notice(`${r3.message} — pinned (left subscription).${left}${effortSuffix2}`);
|
|
146716
|
+
const kind = classify(lastPromptRef.current ?? "").replace("code", "code");
|
|
146717
|
+
push({ kind: "preference", id: idRef.current++, text: `Remember ${r3.modelId} for ${kind} tasks?`, acceptCommand: `/prefer ${kind} ${r3.modelId}` });
|
|
146718
|
+
return;
|
|
146719
|
+
}
|
|
146720
|
+
}
|
|
146704
146721
|
const cr = resolveCliModel(cli.binary, arg);
|
|
146705
146722
|
if (!cr.ok) {
|
|
146706
146723
|
const r3 = resolveModelSwitch(arg);
|
|
@@ -147867,7 +147884,7 @@ init_permission();
|
|
|
147867
147884
|
var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
|
|
147868
147885
|
process.env.LANG = process.env.LANG || "en_US.UTF-8";
|
|
147869
147886
|
process.env.LC_ALL = process.env.LC_ALL || "en_US.UTF-8";
|
|
147870
|
-
var VERSION16 = "0.1.
|
|
147887
|
+
var VERSION16 = "0.1.27";
|
|
147871
147888
|
var args = process.argv.slice(2);
|
|
147872
147889
|
var supportsAnsi = process.env.FORCE_COLOR === "1" || process.env.TERM !== "dumb" && process.env.NO_COLOR !== "1" && process.stdout.isTTY;
|
|
147873
147890
|
var ansi = (code) => supportsAnsi ? `\x1B[${code}m` : "";
|
|
@@ -147882,27 +147899,28 @@ var stripAnsi2 = (text2) => text2.replace(/\x1b\[[0-9;]*m/g, "");
|
|
|
147882
147899
|
var visibleLength = (text2) => stripAnsi2(text2).length;
|
|
147883
147900
|
var padVisible = (text2, width) => text2 + " ".repeat(Math.max(width - visibleLength(text2), 0));
|
|
147884
147901
|
function onboardingBanner(termWidth) {
|
|
147885
|
-
const
|
|
147886
|
-
const
|
|
147887
|
-
|
|
147888
|
-
|
|
147889
|
-
|
|
147890
|
-
const
|
|
147891
|
-
|
|
147892
|
-
|
|
147893
|
-
|
|
147902
|
+
const w = Math.min(termWidth, 120);
|
|
147903
|
+
const center = (s2) => {
|
|
147904
|
+
const pad3 = Math.max(0, Math.floor((w - visibleLength(s2)) / 2));
|
|
147905
|
+
return " ".repeat(pad3) + s2;
|
|
147906
|
+
};
|
|
147907
|
+
const F2 = {
|
|
147908
|
+
G: [" █████", "██ ", "██ ██", "██ █", " █████"],
|
|
147909
|
+
E: ["█████ ", "█ ", "████ ", "█ ", "█████ "],
|
|
147910
|
+
A: [" ██ ", " █ █ ", "██████", "█ █", "█ █"],
|
|
147911
|
+
R: ["████ ", "█ █ ", "████ ", "█ █ ", "█ █ "],
|
|
147912
|
+
B: ["████ ", "█ █ ", "████ ", "█ █ ", "████ "],
|
|
147913
|
+
O: [" ████ ", "█ █", "█ █", "█ █", " ████ "],
|
|
147914
|
+
X: ["█ █", " █ █ ", " ██ ", " █ █ ", "█ █"]
|
|
147894
147915
|
};
|
|
147895
147916
|
console.log("");
|
|
147896
|
-
|
|
147897
|
-
|
|
147898
|
-
|
|
147899
|
-
|
|
147900
|
-
console.log(
|
|
147901
|
-
console.log(
|
|
147902
|
-
console.log(
|
|
147903
|
-
console.log(row(dim("keys stay local, never sent anywhere")));
|
|
147904
|
-
console.log(blank);
|
|
147905
|
-
console.log(lp + accent("╰" + hr2 + "╯"));
|
|
147917
|
+
for (let r2 = 0;r2 < 5; r2++) {
|
|
147918
|
+
const line = "GEARBOX".split("").map((ch) => F2[ch]?.[r2] ?? " ").join(" ");
|
|
147919
|
+
console.log(center(accent(line)));
|
|
147920
|
+
}
|
|
147921
|
+
console.log("");
|
|
147922
|
+
console.log(center(dim("one terminal · every model you pay for")));
|
|
147923
|
+
console.log(center(dim("keys stay local · never sent anywhere")));
|
|
147906
147924
|
console.log("");
|
|
147907
147925
|
}
|
|
147908
147926
|
var centerStr = (text2, width) => {
|
package/package.json
CHANGED