gearbox-code 0.1.20 → 0.1.22

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 +23 -12
  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.20";
147870
+ var VERSION16 = "0.1.22";
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` : "";
@@ -147907,7 +147907,7 @@ function ghostLines(cells, pad3 = " ") {
147907
147907
  });
147908
147908
  }
147909
147909
  function onboardingBoo(termWidth) {
147910
- const cells = renderGhost({ palette: "default", face: "happy", scale: 1 });
147910
+ const cells = renderGhost({ palette: "default", face: "joy", scale: 1 });
147911
147911
  const ghostW = cells[0]?.length ?? 20;
147912
147912
  const leftPad = Math.max(2, Math.floor((termWidth - ghostW) / 2));
147913
147913
  return ghostLines(cells, " ".repeat(leftPad)).join(`
@@ -147979,12 +147979,14 @@ async function runCliOnboarding() {
147979
147979
  };
147980
147980
  try {
147981
147981
  const termWidth = Math.min(process.stdout.columns || 80, 100);
147982
+ const ruleW = Math.min(32, termWidth - 8);
147982
147983
  console.log("");
147983
147984
  console.log(onboardingBoo(termWidth));
147984
147985
  console.log("");
147985
- console.log(centerStr(bold("gearbox"), termWidth));
147986
- console.log(centerStr("set up one account Gearbox routes from there", termWidth));
147987
- console.log(centerStr(dim("keys stay local, never sent anywhere"), termWidth));
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));
147988
147990
  console.log("");
147989
147991
  while (!anyProviderAvailable()) {
147990
147992
  const env3 = importableEnvCreds2();
@@ -148090,8 +148092,10 @@ async function runCliOnboarding() {
148090
148092
  console.log(warn("Choose one of the listed options."));
148091
148093
  }
148092
148094
  console.log("");
148093
- console.log(ok("Gearbox is ready."));
148094
- console.log(`Next: ${accent("cd ~/your-project")} and run ${accent("gearbox")}.`);
148095
+ console.log(centerStr(ok("✓ you're all set"), termWidth));
148096
+ console.log("");
148097
+ console.log(centerStr(dim(`cd ~/your-project → ${accent("gearbox")}`), termWidth));
148098
+ console.log("");
148095
148099
  return true;
148096
148100
  } finally {
148097
148101
  rl?.close();
@@ -148139,8 +148143,8 @@ Options:
148139
148143
  --model <name> e.g. sonnet-4.6, haiku, gemini-flash, deepseek
148140
148144
  -c, --continue resume the most recent session here (/resume to pick one)
148141
148145
  --yolo auto-approve writes/edits/shell (no permission prompts)
148142
- --fullscreen fullscreen app frame with fixed footer (alt-screen)
148143
- --inline terminal scrollback mode (default)
148146
+ --inline use terminal scrollback instead of the fullscreen frame
148147
+ --fullscreen fullscreen app frame (default)
148144
148148
  -v, --version print version
148145
148149
  -h, --help this help
148146
148150
 
@@ -148292,19 +148296,26 @@ if (process.stdout.isTTY && imageMode === "kitty")
148292
148296
  var uiPrefs = loadPrefs();
148293
148297
  var explicitInline = args.includes("--inline") || process.env.GEARBOX_INLINE === "1" || process.env.GEARBOX_FULLSCREEN === "0";
148294
148298
  var explicitFullscreen = args.includes("--fullscreen") || process.env.GEARBOX_FULLSCREEN === "1";
148295
- var wantsInline = !explicitFullscreen && (explicitInline || uiPrefs.fullscreen !== true);
148299
+ var wantsInline = explicitInline || !explicitFullscreen && uiPrefs.fullscreen === false;
148296
148300
  var wantsFullscreen = !wantsInline;
148297
148301
  var fullscreen = Boolean(process.stdout.isTTY) && wantsFullscreen;
148298
148302
  var mouse = Boolean(process.stdout.isTTY) && process.env.GEARBOX_MOUSE !== "0";
148303
+ var restored = false;
148299
148304
  var restore = () => {
148300
- if (!process.stdout.isTTY)
148305
+ if (restored || !process.stdout.isTTY)
148301
148306
  return;
148307
+ restored = true;
148302
148308
  process.stdout.write("\x1B[?2004l\x1B[?25h");
148303
148309
  if (mouse)
148304
148310
  process.stdout.write("\x1B[?1006l\x1B[?1002l\x1B[?1000l");
148305
148311
  if (fullscreen)
148306
- process.stdout.write("\x1B[?1049l");
148312
+ process.stdout.write("\x1B[?1049l\x1B[2J\x1B[H");
148307
148313
  };
148314
+ process.once("exit", restore);
148315
+ process.once("SIGTERM", () => {
148316
+ restore();
148317
+ process.exit(0);
148318
+ });
148308
148319
  if (process.stdout.isTTY)
148309
148320
  process.stdout.write("\x1B[?2004l\x1B[?25l");
148310
148321
  if (fullscreen)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gearbox-code",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
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",