@base44-preview/cli 0.1.15-pr.630.66e368f → 0.1.15-pr.630.a6f9272

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/index.js CHANGED
@@ -269452,18 +269452,27 @@ function getAgentsCommand() {
269452
269452
 
269453
269453
  // src/core/model.ts
269454
269454
  var MODELS = [
269455
- { name: "default", id: null, note: "let Base44 choose" },
269455
+ {
269456
+ name: "Automatic",
269457
+ id: null,
269458
+ note: "matched with the best model",
269459
+ aliases: ["default", "auto"]
269460
+ },
269456
269461
  { name: "Opus 5", id: "claude_opus_5" },
269457
269462
  { name: "Sonnet 5", id: "claude-sonnet-5" },
269458
269463
  { name: "Fable 5", id: "claude_fable_5", note: "uses more credits" },
269459
269464
  { name: "GPT-5.6 Sol", id: "gpt_5_6_sol" },
269460
- { name: "Gemini 3.8 Flash", id: "gemini_3_8_flash", note: "fast" },
269465
+ {
269466
+ name: "Gemini 3.8 Flash",
269467
+ id: "gemini_3_8_flash",
269468
+ note: "fast responses for everyday tasks"
269469
+ },
269461
269470
  { name: "Base 1", id: "base1" }
269462
269471
  ];
269463
269472
  var fold = (s) => s.toLowerCase().replace(/[^a-z0-9]/g, "");
269464
269473
  function resolvePick(input) {
269465
269474
  const key = fold(input);
269466
- const byExact = MODELS.find((m) => fold(m.name) === key || m.id && fold(m.id) === key);
269475
+ const byExact = MODELS.find((m) => fold(m.name) === key || m.id && fold(m.id) === key || m.aliases?.some((a) => fold(a) === key));
269467
269476
  if (byExact)
269468
269477
  return byExact;
269469
269478
  const byContains = MODELS.filter((m) => fold(m.name).includes(key) || m.id && fold(m.id).includes(key));
@@ -269491,7 +269500,7 @@ async function saveBuilderModel(userId, modelId) {
269491
269500
  throw await ApiError.fromHttpError(error, "saving your model choice");
269492
269501
  }
269493
269502
  }
269494
- var displayName = (id) => MODELS.find((m) => m.id === id)?.name ?? id ?? "default";
269503
+ var displayName = (id) => MODELS.find((m) => m.id === id)?.name ?? id ?? "Automatic";
269495
269504
 
269496
269505
  // src/cli/commands/app/model.ts
269497
269506
  async function modelAction({ log, jsonMode }, input) {
@@ -270006,6 +270015,14 @@ async function createAndLinkApp(options) {
270006
270015
  targetDir
270007
270016
  };
270008
270017
  }
270018
+ function nextStepsLines(app) {
270019
+ return [
270020
+ "",
270021
+ `${source_default.bold("Your app lives in")} ./${app.dirName}`,
270022
+ source_default.dim(` cd ${app.dirName} && base44 code # keep building with the agent`),
270023
+ source_default.dim(` cd ${app.dirName} && base44 app send "…" # one non-interactive turn`)
270024
+ ];
270025
+ }
270009
270026
  async function githubReauthLines(error) {
270010
270027
  if (!isGithubUserTokenError(error))
270011
270028
  return null;
@@ -270279,6 +270296,8 @@ async function newAction({ log, runTask, jsonMode }, prompt, options) {
270279
270296
  repo_url: app.repoUrl ?? null,
270280
270297
  editor_url: app.editorUrl,
270281
270298
  preview_url: previewUrl ?? null,
270299
+ dir: app.dirName,
270300
+ path: app.targetDir,
270282
270301
  status: finalState ?? "created"
270283
270302
  })}
270284
270303
  `
@@ -270286,19 +270305,20 @@ async function newAction({ log, runTask, jsonMode }, prompt, options) {
270286
270305
  }
270287
270306
  if (previewUrl)
270288
270307
  log.message(`preview ${previewUrl}`);
270289
- const cd = ` Next: cd ${app.dirName}`;
270308
+ for (const line of nextStepsLines(app))
270309
+ log.message(line);
270290
270310
  if (finalState === "error") {
270291
270311
  return {
270292
- outroMessage: `The first build reported an error — open the editor for details.${cd}`
270312
+ outroMessage: `The first build reported an error — open the editor for details.`
270293
270313
  };
270294
270314
  }
270295
270315
  if (finalState === "processing") {
270296
270316
  return {
270297
- outroMessage: `Still building — follow it with \`base44 app status\`.${cd}`
270317
+ outroMessage: `Still building — follow it with \`base44 app status\`.`
270298
270318
  };
270299
270319
  }
270300
270320
  return {
270301
- outroMessage: prompt ? `First build finished · ${formatDuration2(Date.now() - startedAt)}.${cd}` : `App created.${cd}`
270321
+ outroMessage: prompt ? `First build finished · ${formatDuration2(Date.now() - startedAt)}.` : "App created."
270302
270322
  };
270303
270323
  }
270304
270324
  function getNewCommand() {
@@ -276578,7 +276598,7 @@ async function runGenesisSession(options) {
276578
276598
 
276579
276599
  // src/cli/commands/code/index.ts
276580
276600
  var BRAND_ORANGE2 = "#E86B3C";
276581
- async function bootstrapApp(prompt, footer, emit, importRepo) {
276601
+ async function bootstrapApp(prompt, footer, emit, onCreated, importRepo) {
276582
276602
  let app;
276583
276603
  try {
276584
276604
  app = await createAndLinkApp({ prompt, importRepo });
@@ -276587,6 +276607,8 @@ async function bootstrapApp(prompt, footer, emit, importRepo) {
276587
276607
  emit(line);
276588
276608
  throw error;
276589
276609
  }
276610
+ onCreated(app);
276611
+ footer.push(source_default.dim(`dir ./${app.dirName}`));
276590
276612
  if (app.repoUrl)
276591
276613
  footer.push(terminalLink("repo", app.repoUrl));
276592
276614
  footer.push(terminalLink("editor", app.editorUrl));
@@ -276614,7 +276636,7 @@ async function bootstrapApp(prompt, footer, emit, importRepo) {
276614
276636
  }
276615
276637
  };
276616
276638
  }
276617
- async function codeAction(_ctx, options) {
276639
+ async function codeAction({ log }, options) {
276618
276640
  if (process.stdout.isTTY !== true) {
276619
276641
  throw new InvalidInputError("base44 code is an interactive session and needs a terminal.");
276620
276642
  }
@@ -276636,8 +276658,12 @@ async function codeAction(_ctx, options) {
276636
276658
  primeFirstPoll: true,
276637
276659
  idleHint: "what should the agent do next?"
276638
276660
  });
276639
- return { outroMessage: "Done." };
276661
+ log.message(source_default.dim(`app dir ${getAppContext().projectRoot}`));
276662
+ return {
276663
+ outroMessage: "Session closed. Run `base44 code` here to resume."
276664
+ };
276640
276665
  }
276666
+ let created;
276641
276667
  const orange = source_default.hex(BRAND_ORANGE2);
276642
276668
  const footer = [
276643
276669
  source_default.dim(`${orange("●")} ${options.import ? "import" : "builder"}`)
@@ -276647,9 +276673,17 @@ async function codeAction(_ctx, options) {
276647
276673
  creatingLabel: options.import ? "importing the repository" : "creating your app",
276648
276674
  modeLabel: options.import ? `Import — ${options.import}` : "Builder — Base44 template + agent",
276649
276675
  footer,
276650
- createApp: (prompt, emit) => bootstrapApp(prompt, footer, emit, options.import)
276676
+ createApp: (prompt, emit) => bootstrapApp(prompt, footer, emit, (app) => {
276677
+ created = app;
276678
+ }, options.import)
276651
276679
  });
276652
- return { outroMessage: "Done." };
276680
+ if (!created) {
276681
+ return { outroMessage: "Session closed. No app was created." };
276682
+ }
276683
+ for (const line of nextStepsLines(created))
276684
+ log.message(line);
276685
+ log.message(source_default.dim(` editor ${created.editorUrl}`));
276686
+ return { outroMessage: "Session closed." };
276653
276687
  }
276654
276688
  function getCodeCommand() {
276655
276689
  const command = new Base44Command("code", { requireAppContext: false });
@@ -288300,4 +288334,4 @@ export {
288300
288334
  runCLI
288301
288335
  };
288302
288336
 
288303
- //# debugId=0D8DC4BF0CB9F93A64756E2164756E21
288337
+ //# debugId=72FC25F5FAAAB35A64756E2164756E21