@builder.io/buildercode 0.3.8 → 0.3.9

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 +259 -255
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -244266,7 +244266,7 @@ const LIB_CACHE = /* @__PURE__ */ new Map();
244266
244266
  const PENDING_LIB_CACHE = /* @__PURE__ */ new Map();
244267
244267
  const NODE_MODULE_CACHE = /* @__PURE__ */ new Map();
244268
244268
  const TSCONFIG_CACHE = /* @__PURE__ */ new Map();
244269
- const pkgVersion = process.env.OVERRIDE_VERSION ?? "0.3.8";
244269
+ const pkgVersion = process.env.OVERRIDE_VERSION ?? "0.3.9";
244270
244270
  //#endregion
244271
244271
  //#region ../dev-tools/core/detect-frameworks.ts
244272
244272
  async function detectFrameworks$1(sys) {
@@ -290208,7 +290208,7 @@ function wc$1({ parent: e }) {
290208
290208
  default: return !1;
290209
290209
  }
290210
290210
  }
290211
- function _c$17({ parent: e, grandparent: t }) {
290211
+ function _c$18({ parent: e, grandparent: t }) {
290212
290212
  return t?.type === "JSXAttribute" && e.type === "JSXExpressionContainer" && t.name.type === "JSXIdentifier" && t.name.name === "css";
290213
290213
  }
290214
290214
  async function co(e, t, r) {
@@ -295224,7 +295224,7 @@ var init_estree = __esmMin((() => {
295224
295224
  (e, t) => e.type === "CallExpression" && e.callee.type === "Identifier" && e.callee.name === "Component" && t === "arguments",
295225
295225
  (e, t) => e.type === "Decorator" && t === "expression"
295226
295226
  ];
295227
- po$1 = (e) => Oc$1(e) || wc$1(e) || _c$17(e) || oo$2(e);
295227
+ po$1 = (e) => Oc$1(e) || wc$1(e) || _c$18(e) || oo$2(e);
295228
295228
  Es$6 = 0;
295229
295229
  fo = mo.bind(void 0, "html"), yo = mo.bind(void 0, "angular");
295230
295230
  jc = [
@@ -399401,7 +399401,7 @@ function xc(t, e, s = {}) {
399401
399401
  let r = It(t, s.backwards ? e - 1 : e, s);
399402
399402
  return r !== Gt(t, r, s);
399403
399403
  }
399404
- function _c$16(t, e) {
399404
+ function _c$17(t, e) {
399405
399405
  if (e === !1) return !1;
399406
399406
  if (t.charAt(e) === "/" && t.charAt(e + 1) === "*") {
399407
399407
  for (let s = e + 2; s < t.length; ++s) if (t.charAt(s) === "*" && t.charAt(s + 1) === "/") return s + 2;
@@ -405226,7 +405226,7 @@ https://evilmartians.com/chronicles/postcss-8-plugin-migration`));
405226
405226
  ` || t === "\r" || t === "\u2028" || t === "\u2029";
405227
405227
  Gt = vc;
405228
405228
  Yt = xc;
405229
- xi$1 = _c$16;
405229
+ xi$1 = _c$17;
405230
405230
  _i = bc;
405231
405231
  Vt$1 = Ec;
405232
405232
  De = Oc;
@@ -518362,6 +518362,7 @@ var CodeGenSession = class CodeGenSession {
518362
518362
  this.#privacyMode = options.privacyMode ?? options.fusionConfig?.privacyMode;
518363
518363
  this.#devServerOrchestrator = options.devServerOrchestrator;
518364
518364
  this.#git = options.git ?? false;
518365
+ this.#softContextWindow = options.softContextWindow;
518365
518366
  if (this.#git) process.env.GIT_CEILING_DIRECTORIES = this.#workingDirectory;
518366
518367
  this.#gitAutoInit = options.gitAutoInit ?? false;
518367
518368
  this.#fusionConfig = options.fusionConfig;
@@ -518472,6 +518473,10 @@ var CodeGenSession = class CodeGenSession {
518472
518473
  branchName: this.#branchName,
518473
518474
  hasPlanToApply: this.#hasPlanToApply,
518474
518475
  sessionMode: this.getSessionMode()
518476
+ },
518477
+ extraAttributes: {
518478
+ projectId: this.#projectId,
518479
+ branchName: this.#branchName
518475
518480
  }
518476
518481
  });
518477
518482
  });
@@ -518765,6 +518770,7 @@ var CodeGenSession = class CodeGenSession {
518765
518770
  this.#position = resolved.options.position;
518766
518771
  this.#queueMode = resolved.options.queueMode ?? "next-turn";
518767
518772
  this.#asyncSubAgents = resolved.options.asyncSubAgents ?? false;
518773
+ this.#softContextWindow = resolved.options.softContextWindow;
518768
518774
  this.#builtInMCPServerConfig = {
518769
518775
  ...this.#builtInMCPServerConfig,
518770
518776
  ...resolved.options.builtInMCPServerConfig
@@ -519116,7 +519122,7 @@ Tips:
519116
519122
  }
519117
519123
  }
519118
519124
  }
519119
- async #setRemoteUrl(config, cwd) {
519125
+ async #setRemoteUrl(config, cwd, folderName) {
519120
519126
  let currentOriginUrl;
519121
519127
  try {
519122
519128
  currentOriginUrl = (await this.git([
@@ -519152,7 +519158,11 @@ Tips:
519152
519158
  "origin",
519153
519159
  url
519154
519160
  ], cwd);
519155
- if ((provider === "github" || provider === "selfHostedGithub") && token) process.env["GH_TOKEN"] = token;
519161
+ if ((provider === "github" || provider === "selfHostedGithub") && token) {
519162
+ if (!folderName || folderName === this.gitEnabledFolders[0]?.name) process.env["GH_TOKEN"] = token;
519163
+ const isMultiRepo = this.gitEnabledFolders.length > 1;
519164
+ if (folderName && isMultiRepo) process.env[toGhTokenEnvKey(folderName)] = token;
519165
+ }
519156
519166
  }
519157
519167
  async pushRepoV2(repoInfo) {
519158
519168
  return await this.#addToPendingPromises(this.#pushChanges({
@@ -519214,7 +519224,7 @@ Tips:
519214
519224
  const config = gitConfigs?.[repo.repoName];
519215
519225
  if (config?.url) {
519216
519226
  const resolvedPath = this.#sys.resolve(this.#workingDirectory, repo.path);
519217
- await this.#setRemoteUrl(config, resolvedPath);
519227
+ await this.#setRemoteUrl(config, resolvedPath, repo.name);
519218
519228
  }
519219
519229
  }
519220
519230
  return {
@@ -521398,10 +521408,11 @@ Tips:
521398
521408
  const agents = sessionContext.customAgents;
521399
521409
  const agent = agentName ? agents.find((a) => a.name.toLowerCase() === agentName.toLowerCase()) : void 0;
521400
521410
  const subagentType = agent?.name ?? "explorer";
521401
- const { mcpServers = false, model, mode = "quality-v4-agent", systemPrompt, subagent_type, includeMemories, needDevServer, needValidation, queueMode, asyncSubAgents, resetAfterRun = false, reasoning } = {
521411
+ const { mcpServers = false, model, mode = "quality-v4-agent", systemPrompt, subagent_type, includeMemories, needDevServer, needValidation, queueMode, asyncSubAgents, resetAfterRun = false, reasoning, softContextWindow } = {
521402
521412
  mcpServers: agent?.mcpServers,
521403
521413
  subagent_type: subagentType,
521404
521414
  systemPrompt: agent?.systemPrompt,
521415
+ softContextWindow: agent?.softContextWindow,
521405
521416
  model: (() => {
521406
521417
  if (agent?.roundRobinModels?.length) {
521407
521418
  const key = agent.name;
@@ -521528,6 +521539,7 @@ Make the necessary changes and try again.`
521528
521539
  credentials: this.#credentials,
521529
521540
  position: agent?.position ?? `${basePosition}-${subagentType}`,
521530
521541
  mode,
521542
+ softContextWindow,
521531
521543
  includeMemories,
521532
521544
  modelOverride: agent?.inheritSessionModel && (this.#lastModelOverride ?? this.#modelOverride) ? this.#lastModelOverride ?? this.#modelOverride : resolveModelShortcut(resolvedModel) ?? this.#lastModelOverride ?? this.#modelOverride,
521533
521545
  sessionOrCompletionId: sessionId,
@@ -523388,7 +523400,8 @@ failed with code ${result.code}`,
523388
523400
  redactUserMessages: this.#privacyMode?.redactUserMessages,
523389
523401
  redactLLMMessages: this.#privacyMode?.redactLLMMessages,
523390
523402
  modelOverride: userInput.modelOverride ?? this.#modelOverride,
523391
- reasoning: this.#reasoning
523403
+ reasoning: this.#reasoning,
523404
+ interruptActiveTask: userInput.userMessage?.queue === false || void 0
523392
523405
  };
523393
523406
  if (this.#debug) this.#logger.debug(`(generateCompletion-${currentId}): request partial body. ${JSON.stringify({
523394
523407
  url: body.url,
@@ -527115,6 +527128,7 @@ async function executeShellCommand(toolContext, command, timeout, toolId, shellT
527115
527128
  ...devServerOrchestrator?.envVars
527116
527129
  };
527117
527130
  if (process.env.GH_TOKEN) env.GH_TOKEN = process.env.GH_TOKEN;
527131
+ for (const key of Object.keys(process.env)) if (key.startsWith("GH_TOKEN_") && process.env[key]) env[key] = process.env[key];
527118
527132
  const shouldLogin = !devServerOrchestrator?.hasSetupEnvVars;
527119
527133
  const proc = safeSpawn(shell, command, {
527120
527134
  stdio: [
@@ -527266,6 +527280,11 @@ function dispatchAgent(toolContext, { prompt, subagent_type, resume, origin_chan
527266
527280
  resume,
527267
527281
  attachmentUrls
527268
527282
  });
527283
+ if (toolContext.signal.aborted) return {
527284
+ isError: true,
527285
+ toolResult: `Agent task was aborted by the user, or by the system due to a new message being processesed.`,
527286
+ title: "Agent Task Aborted"
527287
+ };
527269
527288
  if (!result.success) return {
527270
527289
  isError: true,
527271
527290
  toolResult: result.response,
@@ -528890,6 +528909,13 @@ const getEnvironmentVariablesPrompt = (envs) => {
528890
528909
  prompt += `</environment_variables>\n`;
528891
528910
  return prompt;
528892
528911
  };
528912
+ /**
528913
+ * Converts a folder name to a per-repo GitHub token env var key.
528914
+ * e.g. "code" → "GH_TOKEN_CODE", "ai-services" → "GH_TOKEN_AI_SERVICES"
528915
+ */
528916
+ function toGhTokenEnvKey(folderName) {
528917
+ return `GH_TOKEN_${folderName.toUpperCase().replace(/[^A-Z0-9]/g, "_")}`;
528918
+ }
528893
528919
  function inferGitProvider(repoUrl) {
528894
528920
  if (!repoUrl) return "unknown";
528895
528921
  const url = repoUrl.toLowerCase();
@@ -528940,8 +528966,14 @@ function generateGitStatusReminder(gitStatus, gitEnabledFolders, context) {
528940
528966
  break;
528941
528967
  }
528942
528968
  if (repoName) lines.push(` - Repository: ${repoName}`);
528943
- if (provider !== "unknown") if ((provider === "github" || provider === "selfHostedGithub") && process.env["GH_TOKEN"]) lines.push(` - Provider: GitHub ( gh cli is available using the Bash tool )`);
528944
- else lines.push(` - Provider: ${provider}`);
528969
+ if (provider !== "unknown") if ((provider === "github" || provider === "selfHostedGithub") && process.env["GH_TOKEN"]) {
528970
+ lines.push(` - Provider: GitHub ( gh cli is available using the Bash tool )`);
528971
+ const repoTokenKeys = Object.keys(process.env).filter((k) => k.startsWith("GH_TOKEN_")).sort();
528972
+ if (repoTokenKeys.length > 0) {
528973
+ lines.push(` - GitHub token env vars: GH_TOKEN (primary repo default), ${repoTokenKeys.join(", ")}`);
528974
+ lines.push(` - Use the repo-specific GH_TOKEN_<REPO> when targeting a specific linked repo; fall back to GH_TOKEN for the primary repo`);
528975
+ }
528976
+ } else lines.push(` - Provider: ${provider}`);
528945
528977
  lines.push(` - Current branch: ${gitStatus.currentBranch}`);
528946
528978
  lines.push(` - Remote branch exists: ${gitStatus.remoteBranchExists ? "yes" : "no"}`);
528947
528979
  if (gitStatus.currentCommit) lines.push(` - Current commit: ${gitStatus.currentCommit.slice(0, 7)}`);
@@ -531983,24 +532015,61 @@ function getNextLineIndex(text, cursor) {
531983
532015
  for (let i = 0; i <= lineIdx; i++) newIdx += lines[i].length + 1;
531984
532016
  return newIdx + Math.min(col, targetLine.length);
531985
532017
  }
532018
+ const inputHistory = {
532019
+ history: [],
532020
+ historyIndex: -1,
532021
+ historyDraft: "",
532022
+ listeners: /* @__PURE__ */ new Set()
532023
+ };
532024
+ function notifyHistoryListeners() {
532025
+ inputHistory.listeners.forEach((l) => l());
532026
+ }
532027
+ function useInputHistory() {
532028
+ const $ = (0, import_compiler_runtime.c)(3);
532029
+ const [, forceUpdate] = (0, import_react.useState)(0);
532030
+ let t0;
532031
+ if ($[0] !== forceUpdate) {
532032
+ t0 = () => {
532033
+ const listener = () => forceUpdate(_temp$7);
532034
+ inputHistory.listeners.add(listener);
532035
+ return () => {
532036
+ inputHistory.listeners.delete(listener);
532037
+ };
532038
+ };
532039
+ $[0] = forceUpdate;
532040
+ $[1] = t0;
532041
+ } else t0 = $[1];
532042
+ let t1;
532043
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
532044
+ t1 = [];
532045
+ $[2] = t1;
532046
+ } else t1 = $[2];
532047
+ (0, import_react.useEffect)(t0, t1);
532048
+ return inputHistory;
532049
+ }
532050
+ function _temp$7(n) {
532051
+ return n + 1;
532052
+ }
531986
532053
  function useTextInput(options = {}) {
531987
532054
  const { onSubmit, onChange, onScrollUp, onScrollDown, onTab, isActive = true, getIsMenuActive, submitDisabled = false, disableHistory = false } = options;
531988
532055
  const [value, setValueState] = (0, import_react.useState)("");
531989
532056
  const [cursorIndex, setCursorIndex] = (0, import_react.useState)(0);
531990
532057
  const [pasteLength, setPasteLength] = (0, import_react.useState)(0);
531991
- const [history, setHistory] = (0, import_react.useState)([]);
531992
- const [historyIndex, setHistoryIndex] = (0, import_react.useState)(-1);
531993
- const [historyDraft, setHistoryDraft] = (0, import_react.useState)("");
532058
+ useInputHistory();
532059
+ const fnDeleteRef = (0, import_react.useRef)(false);
532060
+ (0, import_react.useEffect)(() => {
532061
+ const onData = (data) => {
532062
+ if (data.includes("\x1B[3~")) fnDeleteRef.current = true;
532063
+ };
532064
+ process.stdin.on("data", onData);
532065
+ return () => {
532066
+ process.stdin.off("data", onData);
532067
+ };
532068
+ }, []);
531994
532069
  const valueRef = (0, import_react.useRef)(value);
531995
532070
  const cursorRef = (0, import_react.useRef)(cursorIndex);
531996
- const historyRef = (0, import_react.useRef)(history);
531997
- const historyIndexRef = (0, import_react.useRef)(historyIndex);
531998
- const historyDraftRef = (0, import_react.useRef)(historyDraft);
531999
532071
  valueRef.current = value;
532000
532072
  cursorRef.current = cursorIndex;
532001
- historyRef.current = history;
532002
- historyIndexRef.current = historyIndex;
532003
- historyDraftRef.current = historyDraft;
532004
532073
  const applyValue = (0, import_react.useCallback)((val, cursor) => {
532005
532074
  const nextCursor = cursor ?? val.length;
532006
532075
  setValueState(val);
@@ -532014,8 +532083,9 @@ function useTextInput(options = {}) {
532014
532083
  setValueState("");
532015
532084
  setCursorIndex(0);
532016
532085
  setPasteLength(0);
532017
- setHistoryIndex(-1);
532018
- setHistoryDraft("");
532086
+ inputHistory.historyIndex = -1;
532087
+ inputHistory.historyDraft = "";
532088
+ notifyHistoryListeners();
532019
532089
  onChange?.("");
532020
532090
  }, [onChange]);
532021
532091
  useInput((input, key) => {
@@ -532038,9 +532108,10 @@ function useTextInput(options = {}) {
532038
532108
  if (isMenuActive && (key.upArrow || key.downArrow || key.return || key.escape)) return;
532039
532109
  if (key.return && !key.ctrl && !key.shift && !key.meta && !isMenuActive) {
532040
532110
  if (submitDisabled) return;
532041
- if (val_1.trim()) setHistory((h) => [...h, val_1]);
532042
- setHistoryIndex(-1);
532043
- setHistoryDraft("");
532111
+ if (val_1.trim()) inputHistory.history = [...inputHistory.history, val_1];
532112
+ inputHistory.historyIndex = -1;
532113
+ inputHistory.historyDraft = "";
532114
+ notifyHistoryListeners();
532044
532115
  onSubmit?.(val_1);
532045
532116
  setValueState("");
532046
532117
  setCursorIndex(0);
@@ -532109,13 +532180,13 @@ function useTextInput(options = {}) {
532109
532180
  if (key.upArrow) {
532110
532181
  const isMultiLine = val_1.includes("\n");
532111
532182
  if (!disableHistory && isOnFirstLine(val_1, cursor_0) && !isMultiLine) {
532112
- const h_0 = historyRef.current;
532113
- const hi = historyIndexRef.current;
532183
+ const { history: h, historyIndex: hi } = inputHistory;
532114
532184
  const nextIndex = hi + 1;
532115
- if (nextIndex < h_0.length) {
532116
- if (hi === -1) setHistoryDraft(val_1);
532117
- const historyValue = h_0[h_0.length - 1 - nextIndex];
532118
- setHistoryIndex(nextIndex);
532185
+ if (nextIndex < h.length) {
532186
+ if (hi === -1) inputHistory.historyDraft = val_1;
532187
+ const historyValue = h[h.length - 1 - nextIndex];
532188
+ inputHistory.historyIndex = nextIndex;
532189
+ notifyHistoryListeners();
532119
532190
  setValueState(historyValue);
532120
532191
  setCursorIndex(historyValue.length);
532121
532192
  onChange?.(historyValue);
@@ -532127,18 +532198,18 @@ function useTextInput(options = {}) {
532127
532198
  if (key.downArrow) {
532128
532199
  const isMultiLine_0 = val_1.includes("\n");
532129
532200
  if (!disableHistory && isOnLastLine(val_1, cursor_0) && !isMultiLine_0) {
532130
- const h_1 = historyRef.current;
532131
- const hi_0 = historyIndexRef.current;
532132
- const hd = historyDraftRef.current;
532201
+ const { history: h_0, historyIndex: hi_0, historyDraft: hd } = inputHistory;
532133
532202
  if (hi_0 > 0) {
532134
532203
  const nextIndex_0 = hi_0 - 1;
532135
- const historyValue_0 = h_1[h_1.length - 1 - nextIndex_0];
532136
- setHistoryIndex(nextIndex_0);
532204
+ const historyValue_0 = h_0[h_0.length - 1 - nextIndex_0];
532205
+ inputHistory.historyIndex = nextIndex_0;
532206
+ notifyHistoryListeners();
532137
532207
  setValueState(historyValue_0);
532138
532208
  setCursorIndex(historyValue_0.length);
532139
532209
  onChange?.(historyValue_0);
532140
532210
  } else if (hi_0 === 0) {
532141
- setHistoryIndex(-1);
532211
+ inputHistory.historyIndex = -1;
532212
+ notifyHistoryListeners();
532142
532213
  setValueState(hd);
532143
532214
  setCursorIndex(hd.length);
532144
532215
  onChange?.(hd);
@@ -532157,26 +532228,36 @@ function useTextInput(options = {}) {
532157
532228
  setPasteLength(0);
532158
532229
  return;
532159
532230
  }
532160
- if (key.backspace || key.delete) {
532161
- if (cursor_0 > 0) {
532162
- const next_3 = val_1.slice(0, cursor_0 - 1) + val_1.slice(cursor_0);
532163
- setValueState(next_3);
532231
+ if (key.delete || key.backspace) {
532232
+ const isFnDelete = fnDeleteRef.current;
532233
+ fnDeleteRef.current = false;
532234
+ if (isFnDelete) {
532235
+ if (cursor_0 < val_1.length) {
532236
+ const next_3 = val_1.slice(0, cursor_0) + val_1.slice(cursor_0 + 1);
532237
+ setValueState(next_3);
532238
+ setPasteLength(0);
532239
+ onChange?.(next_3);
532240
+ }
532241
+ } else if (cursor_0 > 0) {
532242
+ const next_4 = val_1.slice(0, cursor_0 - 1) + val_1.slice(cursor_0);
532243
+ setValueState(next_4);
532164
532244
  setCursorIndex(cursor_0 - 1);
532165
532245
  setPasteLength(0);
532166
- onChange?.(next_3);
532246
+ onChange?.(next_4);
532167
532247
  }
532168
532248
  return;
532169
532249
  }
532170
532250
  if (input) {
532171
- if (historyIndexRef.current !== -1) {
532172
- setHistoryIndex(-1);
532173
- setHistoryDraft("");
532251
+ if (inputHistory.historyIndex !== -1) {
532252
+ inputHistory.historyIndex = -1;
532253
+ inputHistory.historyDraft = "";
532254
+ notifyHistoryListeners();
532174
532255
  }
532175
- const next_4 = val_1.slice(0, cursor_0) + input + val_1.slice(cursor_0);
532176
- setValueState(next_4);
532256
+ const next_5 = val_1.slice(0, cursor_0) + input + val_1.slice(cursor_0);
532257
+ setValueState(next_5);
532177
532258
  setCursorIndex(cursor_0 + input.length);
532178
532259
  setPasteLength(input.length > 1 ? input.length : 0);
532179
- onChange?.(next_4);
532260
+ onChange?.(next_5);
532180
532261
  }
532181
532262
  }, { isActive });
532182
532263
  return {
@@ -532234,161 +532315,78 @@ function computeCursorPos(value, cursorIndex, tabSize) {
532234
532315
  isNewline
532235
532316
  };
532236
532317
  }
532237
- const ControlledTextInput = (0, import_react.memo)(function ControlledTextInput(t0) {
532238
- const $ = (0, import_compiler_runtime.c)(44);
532239
- const { value, cursorIndex: t1, placeholder: t2, showCursor: t3, focus: t4, rows, maxRows: t5, tabSize: t6 } = t0;
532240
- const cursorIndex = t1 === void 0 ? 0 : t1;
532241
- const placeholder = t2 === void 0 ? "" : t2;
532242
- const showCursor = t3 === void 0 ? true : t3;
532243
- const focus = t4 === void 0 ? true : t4;
532244
- const maxRows = t5 === void 0 ? 10 : t5;
532245
- const tabSize = t6 === void 0 ? 4 : t6;
532318
+ const ControlledTextInput = (0, import_react.memo)(function ControlledTextInput({ value, cursorIndex = 0, placeholder = "", showCursor = true, focus = true, rows, maxRows = 10, tabSize = 4 }) {
532246
532319
  const minRows = rows ?? 1;
532247
- let t7;
532248
- if ($[0] !== cursorIndex || $[1] !== tabSize || $[2] !== value) {
532249
- t7 = value ? computeCursorPos(value, cursorIndex, tabSize) : null;
532250
- $[0] = cursorIndex;
532251
- $[1] = tabSize;
532252
- $[2] = value;
532253
- $[3] = t7;
532254
- } else t7 = $[3];
532255
- const cursorInfo = t7;
532256
- let t8;
532257
- if ($[4] !== tabSize || $[5] !== value) {
532258
- t8 = value ? fmt(value, tabSize).split("\n") : [];
532259
- $[4] = tabSize;
532260
- $[5] = value;
532261
- $[6] = t8;
532262
- } else t8 = $[6];
532263
- const allLines = t8;
532320
+ const cursorInfo = (0, import_react.useMemo)(() => value ? computeCursorPos(value, cursorIndex, tabSize) : null, [
532321
+ value,
532322
+ cursorIndex,
532323
+ tabSize
532324
+ ]);
532325
+ const allLines = (0, import_react.useMemo)(() => value ? fmt(value, tabSize).split("\n") : [], [value, tabSize]);
532264
532326
  const lineCount = allLines.length;
532265
532327
  const cursorLineIdx = cursorInfo?.lineIdx ?? 0;
532266
532328
  const cursorColIdx = cursorInfo?.colIdx ?? 0;
532267
532329
  const cursorDisplayChar = cursorInfo?.char ?? " ";
532268
532330
  const charIsNewline = cursorInfo?.isNewline ?? false;
532269
532331
  const visibleRows = value ? Math.max(minRows, Math.min(maxRows, lineCount)) : minRows;
532270
- const scrollStart = value ? Math.max(0, Math.min(lineCount - visibleRows, cursorLineIdx - visibleRows + 1)) : 0;
532271
- let t9;
532272
- if ($[7] !== allLines || $[8] !== scrollStart || $[9] !== value || $[10] !== visibleRows) {
532273
- t9 = value ? allLines.slice(scrollStart, scrollStart + visibleRows) : [];
532274
- $[7] = allLines;
532275
- $[8] = scrollStart;
532276
- $[9] = value;
532277
- $[10] = visibleRows;
532278
- $[11] = t9;
532279
- } else t9 = $[11];
532280
- const visibleLines = t9;
532332
+ const scrollStartRef = (0, import_react.useRef)(0);
532333
+ let scrollStart;
532281
532334
  if (!value) {
532282
- let t10;
532283
- if ($[12] !== focus || $[13] !== showCursor) {
532284
- t10 = showCursor && focus && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
532285
- inverse: true,
532286
- children: " "
532287
- });
532288
- $[12] = focus;
532289
- $[13] = showCursor;
532290
- $[14] = t10;
532291
- } else t10 = $[14];
532292
- let t11;
532293
- if ($[15] !== placeholder) {
532294
- t11 = placeholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
532295
- dimColor: true,
532296
- children: placeholder
532297
- }) : null;
532298
- $[15] = placeholder;
532299
- $[16] = t11;
532300
- } else t11 = $[16];
532301
- let t12;
532302
- if ($[17] !== t10 || $[18] !== t11) {
532303
- t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [t10, t11] });
532304
- $[17] = t10;
532305
- $[18] = t11;
532306
- $[19] = t12;
532307
- } else t12 = $[19];
532308
- let t13;
532309
- if ($[20] !== minRows || $[21] !== t12) {
532310
- t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
532311
- height: minRows,
532312
- overflow: "hidden",
532313
- flexDirection: "column",
532314
- flexShrink: 0,
532315
- flexGrow: 0,
532316
- children: t12
532317
- });
532318
- $[20] = minRows;
532319
- $[21] = t12;
532320
- $[22] = t13;
532321
- } else t13 = $[22];
532322
- return t13;
532323
- }
532324
- if (!focus) {
532325
- let t10;
532326
- if ($[23] !== visibleLines) {
532327
- t10 = visibleLines.map(_temp$7);
532328
- $[23] = visibleLines;
532329
- $[24] = t10;
532330
- } else t10 = $[24];
532331
- let t11;
532332
- if ($[25] !== t10) {
532333
- t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
532334
- flexDirection: "column",
532335
- flexShrink: 0,
532336
- flexGrow: 0,
532337
- children: t10
532338
- });
532339
- $[25] = t10;
532340
- $[26] = t11;
532341
- } else t11 = $[26];
532342
- return t11;
532343
- }
532344
- let t10;
532345
- if ($[27] !== charIsNewline || $[28] !== cursorColIdx || $[29] !== cursorDisplayChar || $[30] !== cursorLineIdx || $[31] !== scrollStart || $[32] !== showCursor || $[33] !== visibleLines) {
532346
- let t11;
532347
- if ($[35] !== charIsNewline || $[36] !== cursorColIdx || $[37] !== cursorDisplayChar || $[38] !== cursorLineIdx || $[39] !== scrollStart || $[40] !== showCursor) {
532348
- t11 = (line_0, i_0) => {
532349
- const absLine = i_0 + scrollStart;
532350
- if (absLine !== cursorLineIdx) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: line_0 || " " }, absLine);
532351
- const beforeCursor = line_0.slice(0, cursorColIdx);
532352
- const afterCursor = charIsNewline ? "" : line_0.slice(cursorColIdx + cursorDisplayChar.length);
532353
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
532354
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: beforeCursor }),
532355
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
532356
- inverse: showCursor,
532357
- children: cursorDisplayChar
532358
- }),
532359
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: afterCursor })
532360
- ] }, absLine);
532361
- };
532362
- $[35] = charIsNewline;
532363
- $[36] = cursorColIdx;
532364
- $[37] = cursorDisplayChar;
532365
- $[38] = cursorLineIdx;
532366
- $[39] = scrollStart;
532367
- $[40] = showCursor;
532368
- $[41] = t11;
532369
- } else t11 = $[41];
532370
- t10 = visibleLines.map(t11);
532371
- $[27] = charIsNewline;
532372
- $[28] = cursorColIdx;
532373
- $[29] = cursorDisplayChar;
532374
- $[30] = cursorLineIdx;
532375
- $[31] = scrollStart;
532376
- $[32] = showCursor;
532377
- $[33] = visibleLines;
532378
- $[34] = t10;
532379
- } else t10 = $[34];
532380
- let t11;
532381
- if ($[42] !== t10) {
532382
- t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
532383
- flexDirection: "column",
532384
- flexShrink: 0,
532385
- flexGrow: 0,
532386
- children: t10
532387
- });
532388
- $[42] = t10;
532389
- $[43] = t11;
532390
- } else t11 = $[43];
532391
- return t11;
532335
+ scrollStart = 0;
532336
+ scrollStartRef.current = 0;
532337
+ } else {
532338
+ let s = scrollStartRef.current;
532339
+ if (cursorLineIdx < s) s = cursorLineIdx;
532340
+ else if (cursorLineIdx >= s + visibleRows) s = cursorLineIdx - visibleRows + 1;
532341
+ s = Math.max(0, Math.min(lineCount - visibleRows, s));
532342
+ scrollStartRef.current = s;
532343
+ scrollStart = s;
532344
+ }
532345
+ const visibleLines = (0, import_react.useMemo)(() => value ? allLines.slice(scrollStart, scrollStart + visibleRows) : [], [
532346
+ value,
532347
+ allLines,
532348
+ scrollStart,
532349
+ visibleRows
532350
+ ]);
532351
+ if (!value) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
532352
+ height: minRows,
532353
+ overflow: "hidden",
532354
+ flexDirection: "column",
532355
+ flexShrink: 0,
532356
+ flexGrow: 0,
532357
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [showCursor && focus && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
532358
+ inverse: true,
532359
+ children: " "
532360
+ }), placeholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
532361
+ dimColor: true,
532362
+ children: placeholder
532363
+ }) : null] })
532364
+ });
532365
+ if (!focus) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
532366
+ flexDirection: "column",
532367
+ flexShrink: 0,
532368
+ flexGrow: 0,
532369
+ children: visibleLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: line || " " }, i))
532370
+ });
532371
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
532372
+ flexDirection: "column",
532373
+ flexShrink: 0,
532374
+ flexGrow: 0,
532375
+ children: visibleLines.map((line_0, i_0) => {
532376
+ const absLine = i_0 + scrollStart;
532377
+ if (absLine !== cursorLineIdx) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: line_0 || " " }, absLine);
532378
+ const beforeCursor = line_0.slice(0, cursorColIdx);
532379
+ const afterCursor = charIsNewline ? "" : line_0.slice(cursorColIdx + cursorDisplayChar.length);
532380
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
532381
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: beforeCursor }),
532382
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
532383
+ inverse: showCursor,
532384
+ children: cursorDisplayChar
532385
+ }),
532386
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: afterCursor })
532387
+ ] }, absLine);
532388
+ })
532389
+ });
532392
532390
  });
532393
532391
  /**
532394
532392
  * `TextInput` manages its own value state (via `useTextInput`) and delegates
@@ -532444,9 +532442,6 @@ function TextInput(t0) {
532444
532442
  } else t2 = $[16];
532445
532443
  return t2;
532446
532444
  }
532447
- function _temp$7(line, i) {
532448
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: line || " " }, i);
532449
- }
532450
532445
  //#endregion
532451
532446
  //#region ../../node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js
532452
532447
  var JSONRepairError = class extends Error {
@@ -533720,6 +533715,10 @@ function useCodeGenStateHandler() {
533720
533715
  state.metadata = step;
533721
533716
  break;
533722
533717
  case "start":
533718
+ if (step.name !== "thinking") {
533719
+ const prevThinking = state.messages.findLast((m_0) => m_0.type === "thinking");
533720
+ if (prevThinking) prevThinking.streaming = false;
533721
+ }
533723
533722
  if (step.name === "text") state.messages.push({
533724
533723
  id: step.name,
533725
533724
  type: "text",
@@ -533742,10 +533741,6 @@ function useCodeGenStateHandler() {
533742
533741
  content: step.content ?? "",
533743
533742
  streaming: true
533744
533743
  });
533745
- else {
533746
- const prevThinking = state.messages.findLast((m_0) => m_0.type === "thinking");
533747
- if (prevThinking) prevThinking.streaming = false;
533748
- }
533749
533744
  break;
533750
533745
  case "delta": {
533751
533746
  const stepName = step.name;
@@ -534174,7 +534169,7 @@ function SlashCommandMenu(t0) {
534174
534169
  borderBottom: false,
534175
534170
  borderTop: false,
534176
534171
  paddingX: 2,
534177
- paddingTop: 1,
534172
+ paddingY: 1,
534178
534173
  backgroundColor: theme.background,
534179
534174
  children: t7
534180
534175
  });
@@ -534243,7 +534238,7 @@ function SlashCommandMenu(t0) {
534243
534238
  borderTop: false,
534244
534239
  borderBottom: false,
534245
534240
  paddingX: 0,
534246
- paddingTop: 1,
534241
+ paddingY: 1,
534247
534242
  backgroundColor: theme.background,
534248
534243
  children: t8
534249
534244
  });
@@ -534538,7 +534533,7 @@ const InputPrompt = (0, import_react.memo)(({ onSubmit, onChange, onSlashCommand
534538
534533
  ]);
534539
534534
  slashMenuActiveRef.current = slashMenuActive;
534540
534535
  atMenuActiveRef.current = atMenuActive;
534541
- const planIsActive = hasPlan && !value;
534536
+ const planIsActive = hasPlan && !value && state.state !== "generating";
534542
534537
  (0, import_react.useEffect)(() => {
534543
534538
  onSlashMenuActiveChange?.(slashMenuActive);
534544
534539
  return () => {
@@ -536746,12 +536741,16 @@ const WelcomeScreen = (0, import_react.memo)((t0) => {
536746
536741
  const { stdout } = useStdout();
536747
536742
  const theme = useTheme();
536748
536743
  const [cols, setCols] = (0, import_react.useState)(stdout?.columns ?? 80);
536744
+ const [rows, setRows] = (0, import_react.useState)(stdout?.rows ?? 24);
536749
536745
  let t2;
536750
536746
  let t3;
536751
536747
  if ($[0] !== stdout) {
536752
536748
  t2 = () => {
536753
536749
  if (!stdout) return;
536754
- const onResize = () => setCols(stdout.columns ?? 80);
536750
+ const onResize = () => {
536751
+ setCols(stdout.columns ?? 80);
536752
+ setRows(stdout.rows ?? 24);
536753
+ };
536755
536754
  stdout.on("resize", onResize);
536756
536755
  return () => {
536757
536756
  stdout.off("resize", onResize);
@@ -536774,7 +536773,7 @@ const WelcomeScreen = (0, import_react.memo)((t0) => {
536774
536773
  } else t4 = $[4];
536775
536774
  const displayCwd = t4;
536776
536775
  const inputWidth = Math.min(Math.max(cols, 20), 90);
536777
- const t5 = cols >= 70 ? LOGO : cols >= 28 ? LOGO_SMALL : "BUILDER";
536776
+ const t5 = cols >= 70 && rows >= 20 ? LOGO : cols >= 28 && rows >= 14 ? LOGO_SMALL : "BUILDER";
536778
536777
  let t6;
536779
536778
  if ($[5] !== t5 || $[6] !== theme.background) {
536780
536779
  t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
@@ -538139,7 +538138,7 @@ const FooterSection = (0, import_react.memo)(() => {
538139
538138
  children: [
538140
538139
  "•",
538141
538140
  " Fusion ",
538142
- "0.3.8"
538141
+ "0.3.9"
538143
538142
  ]
538144
538143
  });
538145
538144
  $[10] = t7;
@@ -599054,18 +599053,19 @@ function CompletedTextBlock(t0) {
599054
599053
  }
599055
599054
  const THINKING_MAX_CHARS = 400;
599056
599055
  function ThinkingBlock(t0) {
599057
- const $ = (0, import_compiler_runtime.c)(12);
599056
+ const $ = (0, import_compiler_runtime.c)(13);
599058
599057
  const { text, streaming: t1 } = t0;
599059
599058
  const streaming = t1 === void 0 ? false : t1;
599060
599059
  let t2;
599061
- if ($[0] !== text) {
599062
- t2 = text.length > THINKING_MAX_CHARS ? text.slice(0, THINKING_MAX_CHARS).trimEnd() + "…" : text.trim();
599063
- $[0] = text;
599064
- $[1] = t2;
599065
- } else t2 = $[1];
599060
+ if ($[0] !== streaming || $[1] !== text) {
599061
+ t2 = text.length > THINKING_MAX_CHARS ? streaming ? "…" + text.slice(-THINKING_MAX_CHARS).trimStart() : text.slice(0, THINKING_MAX_CHARS).trimEnd() + "…" : text.trim();
599062
+ $[0] = streaming;
599063
+ $[1] = text;
599064
+ $[2] = t2;
599065
+ } else t2 = $[2];
599066
599066
  const preview = t2;
599067
599067
  let t3;
599068
- if ($[2] !== streaming) {
599068
+ if ($[3] !== streaming) {
599069
599069
  t3 = streaming ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
599070
599070
  bold: true,
599071
599071
  color: "cyan",
@@ -599074,29 +599074,29 @@ function ThinkingBlock(t0) {
599074
599074
  dimColor: true,
599075
599075
  children: "◆"
599076
599076
  });
599077
- $[2] = streaming;
599078
- $[3] = t3;
599079
- } else t3 = $[3];
599077
+ $[3] = streaming;
599078
+ $[4] = t3;
599079
+ } else t3 = $[4];
599080
599080
  let t4;
599081
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
599081
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
599082
599082
  t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
599083
599083
  bold: true,
599084
599084
  dimColor: true,
599085
599085
  children: "Thinking"
599086
599086
  });
599087
- $[4] = t4;
599088
- } else t4 = $[4];
599087
+ $[5] = t4;
599088
+ } else t4 = $[5];
599089
599089
  let t5;
599090
- if ($[5] !== t3) {
599090
+ if ($[6] !== t3) {
599091
599091
  t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
599092
599092
  gap: 1,
599093
599093
  children: [t3, t4]
599094
599094
  });
599095
- $[5] = t3;
599096
- $[6] = t5;
599097
- } else t5 = $[6];
599095
+ $[6] = t3;
599096
+ $[7] = t5;
599097
+ } else t5 = $[7];
599098
599098
  let t6;
599099
- if ($[7] !== preview) {
599099
+ if ($[8] !== preview) {
599100
599100
  t6 = preview.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
599101
599101
  paddingLeft: 2,
599102
599102
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
@@ -599105,21 +599105,21 @@ function ThinkingBlock(t0) {
599105
599105
  children: preview
599106
599106
  })
599107
599107
  });
599108
- $[7] = preview;
599109
- $[8] = t6;
599110
- } else t6 = $[8];
599108
+ $[8] = preview;
599109
+ $[9] = t6;
599110
+ } else t6 = $[9];
599111
599111
  let t7;
599112
- if ($[9] !== t5 || $[10] !== t6) {
599112
+ if ($[10] !== t5 || $[11] !== t6) {
599113
599113
  t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
599114
599114
  flexDirection: "column",
599115
599115
  paddingX: 1,
599116
599116
  marginY: 1,
599117
599117
  children: [t5, t6]
599118
599118
  });
599119
- $[9] = t5;
599120
- $[10] = t6;
599121
- $[11] = t7;
599122
- } else t7 = $[11];
599119
+ $[10] = t5;
599120
+ $[11] = t6;
599121
+ $[12] = t7;
599122
+ } else t7 = $[12];
599123
599123
  return t7;
599124
599124
  }
599125
599125
  function formatDuration(ms) {
@@ -599613,6 +599613,8 @@ const CodeSession = (0, import_react.memo)(({ onExit, isTabActive = true }) => {
599613
599613
  const idx = startIndex + i;
599614
599614
  const msgProxy = proxy.messages[idx];
599615
599615
  const msgId = msgProxy.id;
599616
+ const isLastMessage = idx === messageCount - 1;
599617
+ const isStreaming = state.state === "generating";
599616
599618
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorBoundary, {
599617
599619
  fallback: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
599618
599620
  paddingX: 2,
@@ -599622,21 +599624,12 @@ const CodeSession = (0, import_react.memo)(({ onExit, isTabActive = true }) => {
599622
599624
  children: "[failed to render message]"
599623
599625
  })
599624
599626
  }),
599625
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MessageBlockView, { message: msgProxy }, `msg-${msgId}-${idx}`)
599627
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
599628
+ minHeight: isLastMessage && isStreaming ? Math.floor(rows * .4) : void 0,
599629
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MessageBlockView, { message: msgProxy })
599630
+ })
599626
599631
  }, `err-${msgId}-${idx}`);
599627
- }),
599628
- state.state === "generating" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
599629
- gap: 1,
599630
- marginTop: 2,
599631
- marginBottom: 1,
599632
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressBar, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
599633
- dimColor: true,
599634
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
599635
- bold: true,
599636
- children: "esc"
599637
- }), " interrupt"]
599638
- })]
599639
- }, "generating-progress-bar")
599632
+ })
599640
599633
  ]
599641
599634
  })
599642
599635
  })
@@ -599658,13 +599651,24 @@ const CodeSession = (0, import_react.memo)(({ onExit, isTabActive = true }) => {
599658
599651
  children: state.lastError.message
599659
599652
  })
599660
599653
  }),
599661
- showInput && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorBoundary, {
599654
+ showInput && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ErrorBoundary, {
599662
599655
  fallback: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
599663
599656
  color: "red",
599664
599657
  dimColor: true,
599665
599658
  children: "Input unavailable · Ctrl+C to exit"
599666
599659
  }),
599667
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputPrompt, {
599660
+ children: [state.state === "generating" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
599661
+ gap: 1,
599662
+ marginTop: 2,
599663
+ marginBottom: 1,
599664
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressBar, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
599665
+ dimColor: true,
599666
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
599667
+ bold: true,
599668
+ children: "esc"
599669
+ }), " interrupt"]
599670
+ })]
599671
+ }, "generating-progress-bar"), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputPrompt, {
599668
599672
  onSubmit: handlePromptSubmit,
599669
599673
  onScrollUp: handleMouseScrollUp,
599670
599674
  onScrollDown: handleMouseScrollDown,
@@ -599673,7 +599677,7 @@ const CodeSession = (0, import_react.memo)(({ onExit, isTabActive = true }) => {
599673
599677
  onSlashMenuActiveChange: setSlashMenuActive,
599674
599678
  onImplementPlan: handleImplementPlan,
599675
599679
  isTabActive
599676
- })
599680
+ })]
599677
599681
  }),
599678
599682
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusBar, { ctrlCPending })
599679
599683
  ]
@@ -600780,7 +600784,7 @@ function initSentry() {
600780
600784
  init({
600781
600785
  dsn: "https://1c5033d697e0271ebe53773bff826de0@o117565.ingest.us.sentry.io/4511107776905216",
600782
600786
  tracesSampleRate: 0,
600783
- release: "0.3.8",
600787
+ release: "0.3.9",
600784
600788
  environment: process.env.NODE_ENV ?? "development",
600785
600789
  enabled: false,
600786
600790
  registerEsmLoaderHooks: false,
@@ -600804,7 +600808,7 @@ function isStandaloneBinary() {
600804
600808
  return !path$6.basename(process.execPath, ".exe").startsWith("node");
600805
600809
  }
600806
600810
  function getCurrentVersion() {
600807
- return "0.3.8";
600811
+ return "0.3.9";
600808
600812
  }
600809
600813
  async function fetchLatestVersion() {
600810
600814
  return new Promise((resolve, reject) => {
@@ -601013,7 +601017,7 @@ async function downloadFile(url, dest, onRequest) {
601013
601017
  }
601014
601018
  //#endregion
601015
601019
  //#region src/cli.tsx
601016
- const VERSION = "0.3.8";
601020
+ const VERSION = "0.3.9";
601017
601021
  async function startInk(command, options) {
601018
601022
  await render(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {
601019
601023
  command,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/buildercode",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Builder.io CLI - AI-powered code generation",
5
5
  "license": "MIT",
6
6
  "bin": {