@base44-preview/cli 0.2.6-pr.685.56bddb0 → 0.2.6-pr.685.636d588

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
@@ -265020,7 +265020,8 @@ var SessionImportResponseSchema = object({
265020
265020
  turn_count: number2(),
265021
265021
  branch_url: string2(),
265022
265022
  continued: boolean2(),
265023
- source_ref: string2()
265023
+ source_ref: string2(),
265024
+ reimported: boolean2().default(false)
265024
265025
  }).transform((data) => ({
265025
265026
  branchId: data.branch_id,
265026
265027
  branchName: data.branch_name,
@@ -265028,7 +265029,8 @@ var SessionImportResponseSchema = object({
265028
265029
  turnCount: data.turn_count,
265029
265030
  branchUrl: data.branch_url,
265030
265031
  continued: data.continued,
265031
- sourceRef: data.source_ref
265032
+ sourceRef: data.source_ref,
265033
+ reimported: data.reimported
265032
265034
  }));
265033
265035
  var ErrorEnvelopeSchema = object({
265034
265036
  error: object({
@@ -265041,6 +265043,12 @@ function messageFor(status, code, details, viaToken) {
265041
265043
  if (code === "branch_exists" && details?.branch_url) {
265042
265044
  return `Base Code already has ${details.branch_name ?? "a branch for this session"}. Open it: ${new URL(details.branch_url, getBase44ApiUrl())}`;
265043
265045
  }
265046
+ if (code === "session_changed" && details?.branch_url) {
265047
+ return `This session changed since it was imported into ${details.branch_name ?? "its branch"}, so its newer messages can't be added there. In Base Code, open Import session and choose Import into a new branch: ${new URL(details.branch_url, getBase44ApiUrl())}`;
265048
+ }
265049
+ if (code === "branch_busy") {
265050
+ return `${details?.branch_name ?? "The session's branch"} is still working in Base Code. Wait for it to finish, then import again.`;
265051
+ }
265044
265052
  if (code === "idempotency_key_in_use") {
265045
265053
  return "An import of this session is still running. Wait a moment and try again.";
265046
265054
  }
@@ -265540,7 +265548,7 @@ async function importAction(ctx, link, options, command) {
265540
265548
  const url = `${getBase44ApiUrl()}${imported.branchUrl}`;
265541
265549
  return {
265542
265550
  outroMessage: [
265543
- imported.continued ? `✓ Imported ${imported.turnCount} messages from ${TOOL_LABELS[imported.source]}. Continued on "${imported.branchName}".` : `✓ Imported ${imported.turnCount} messages from ${TOOL_LABELS[imported.source]} into branch "${imported.branchName}".`,
265551
+ outcome(imported),
265544
265552
  ...note ? [note] : [],
265545
265553
  `Open it: ${url}`
265546
265554
  ].join(`
@@ -265548,6 +265556,14 @@ async function importAction(ctx, link, options, command) {
265548
265556
  stdout: ctx.jsonMode ? toJsonStdout({ ...imported, url, ...note ? { note } : {} }) : undefined
265549
265557
  };
265550
265558
  }
265559
+ function outcome(imported) {
265560
+ const { turnCount, branchName } = imported;
265561
+ const tool = TOOL_LABELS[imported.source];
265562
+ if (imported.reimported) {
265563
+ return turnCount ? `✓ Added ${turnCount} new messages from ${tool} to "${branchName}".` : `✓ Nothing new to import. "${branchName}" already has every message.`;
265564
+ }
265565
+ return imported.continued ? `✓ Imported ${turnCount} messages from ${tool}. Continued on "${branchName}".` : `✓ Imported ${turnCount} messages from ${tool} into branch "${branchName}".`;
265566
+ }
265551
265567
  function getSessionsImportCommand() {
265552
265568
  return new Base44Command("import", { requireAuth: false }).description("Continue a Claude Code or Codex session in Base Code").argument("[session-link]", "A claude.ai session address (https://claude.ai/code/session_…)").option("--current", "Import the session this command runs inside").option("--file <path>", "Import this session file as is").option("--skip-push-check", "Import even though local changes aren't on GitHub (they won't be included)").option("--token <key>", "One-time import key from Base Code (no login needed)").action(importAction);
265553
265569
  }
@@ -274785,4 +274801,4 @@ export {
274785
274801
  runCLI
274786
274802
  };
274787
274803
 
274788
- //# debugId=354DCF351C3C362C64756E2164756E21
274804
+ //# debugId=A4D22590EC0FD45564756E2164756E21