gearbox-code 0.1.23 → 0.1.25

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +25 -41
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -147867,7 +147867,7 @@ init_permission();
147867
147867
  var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
147868
147868
  process.env.LANG = process.env.LANG || "en_US.UTF-8";
147869
147869
  process.env.LC_ALL = process.env.LC_ALL || "en_US.UTF-8";
147870
- var VERSION16 = "0.1.23";
147870
+ var VERSION16 = "0.1.25";
147871
147871
  var args = process.argv.slice(2);
147872
147872
  var supportsAnsi = process.env.FORCE_COLOR === "1" || process.env.TERM !== "dumb" && process.env.NO_COLOR !== "1" && process.stdout.isTTY;
147873
147873
  var ansi = (code) => supportsAnsi ? `\x1B[${code}m` : "";
@@ -147881,37 +147881,29 @@ var errColor = (text2) => paint("31", text2);
147881
147881
  var stripAnsi2 = (text2) => text2.replace(/\x1b\[[0-9;]*m/g, "");
147882
147882
  var visibleLength = (text2) => stripAnsi2(text2).length;
147883
147883
  var padVisible = (text2, width) => text2 + " ".repeat(Math.max(width - visibleLength(text2), 0));
147884
- var hexRgb = (h2) => [parseInt(h2.slice(1, 3), 16), parseInt(h2.slice(3, 5), 16), parseInt(h2.slice(5, 7), 16)];
147885
- var trueFg = (h2) => `\x1B[38;2;${hexRgb(h2).join(";")}m`;
147886
- var trueBg = (h2) => `\x1B[48;2;${hexRgb(h2).join(";")}m`;
147887
- function ghostLines(cells, pad3 = " ") {
147888
- return cells.map((row) => {
147889
- let line = pad3;
147890
- for (const { t: t2, b } of row) {
147891
- if (supportsAnsi && t2 && b)
147892
- line += trueFg(t2) + trueBg(b) + "▀" + ansi("0");
147893
- else if (supportsAnsi && t2)
147894
- line += trueFg(t2) + "▀" + ansi("0");
147895
- else if (supportsAnsi && b)
147896
- line += trueFg(b) + "" + ansi("0");
147897
- else if (t2 && b)
147898
- line += "";
147899
- else if (t2)
147900
- line += "▀";
147901
- else if (b)
147902
- line += "▄";
147903
- else
147904
- line += " ";
147905
- }
147906
- return line;
147907
- });
147908
- }
147909
- function onboardingBoo(termWidth) {
147910
- const cells = renderGhost({ palette: "default", face: "happy", scale: 1 });
147911
- const ghostW = cells[0]?.length ?? 20;
147912
- const leftPad = Math.max(2, Math.floor((termWidth - ghostW) / 2));
147913
- return ghostLines(cells, " ".repeat(leftPad)).join(`
147914
- `);
147884
+ function onboardingBanner(termWidth) {
147885
+ const boxW = Math.min(58, Math.max(36, termWidth - 4));
147886
+ const innerW = boxW - 4;
147887
+ const lp = " ".repeat(Math.max(0, Math.floor((termWidth - boxW) / 2)));
147888
+ const hr2 = "─".repeat(boxW - 2);
147889
+ const blank = lp + accent("│") + " ".repeat(boxW - 2) + accent("│");
147890
+ const row = (text2) => {
147891
+ const vl = visibleLength(text2);
147892
+ const sp = Math.max(0, innerW - vl);
147893
+ return lp + accent("│") + " " + " ".repeat(Math.floor(sp / 2)) + text2 + " ".repeat(sp - Math.floor(sp / 2)) + " " + accent("│");
147894
+ };
147895
+ console.log("");
147896
+ console.log(lp + accent("" + hr2 + ""));
147897
+ console.log(blank);
147898
+ console.log(row(paint("1;97", "G E A R B O X")));
147899
+ console.log(blank);
147900
+ console.log(row(dim("─".repeat(Math.min(28, innerW - 2)))));
147901
+ console.log(blank);
147902
+ console.log(row("one terminal · every model you pay for"));
147903
+ console.log(row(dim("keys stay local, never sent anywhere")));
147904
+ console.log(blank);
147905
+ console.log(lp + accent("╰" + hr2 + "╯"));
147906
+ console.log("");
147915
147907
  }
147916
147908
  var centerStr = (text2, width) => {
147917
147909
  const pad3 = Math.max(0, Math.floor((width - visibleLength(text2)) / 2));
@@ -147979,15 +147971,7 @@ async function runCliOnboarding() {
147979
147971
  };
147980
147972
  try {
147981
147973
  const termWidth = Math.min(process.stdout.columns || 80, 100);
147982
- const ruleW = Math.min(32, termWidth - 8);
147983
- console.log("");
147984
- console.log(onboardingBoo(termWidth));
147985
- console.log("");
147986
- console.log(centerStr(bold(accent("gearbox")), termWidth));
147987
- console.log(centerStr(dim("one terminal · every model you already pay for"), termWidth));
147988
- console.log("");
147989
- console.log(centerStr(dim("─".repeat(ruleW)), termWidth));
147990
- console.log("");
147974
+ onboardingBanner(termWidth);
147991
147975
  while (!anyProviderAvailable()) {
147992
147976
  const env3 = importableEnvCreds2();
147993
147977
  const cloud = importableCloudCreds2();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gearbox-code",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "description": "A beautiful multi-provider coding harness for the terminal. (Intelligent model routing lands on top of this soon.)",
5
5
  "type": "module",
6
6
  "license": "MIT",