@kenkaiiii/gg-boss 4.8.2 → 4.8.4

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.
@@ -6835,12 +6835,12 @@ var require_dist = __commonJS({
6835
6835
  throw new Error(`Unknown format "${name}"`);
6836
6836
  return f;
6837
6837
  };
6838
- function addFormats(ajv, list, fs36, exportName) {
6838
+ function addFormats(ajv, list, fs37, exportName) {
6839
6839
  var _a6;
6840
6840
  var _b;
6841
6841
  (_a6 = (_b = ajv.opts.code).formats) !== null && _a6 !== void 0 ? _a6 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
6842
6842
  for (const f of list)
6843
- ajv.addFormat(f, fs36[f]);
6843
+ ajv.addFormat(f, fs37[f]);
6844
6844
  }
6845
6845
  module.exports = exports = formatsPlugin;
6846
6846
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -6855,7 +6855,7 @@ var require_windows = __commonJS({
6855
6855
  init_esm_shims();
6856
6856
  module.exports = isexe;
6857
6857
  isexe.sync = sync;
6858
- var fs36 = __require("fs");
6858
+ var fs37 = __require("fs");
6859
6859
  function checkPathExt(path43, options) {
6860
6860
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
6861
6861
  if (!pathext) {
@@ -6880,12 +6880,12 @@ var require_windows = __commonJS({
6880
6880
  return checkPathExt(path43, options);
6881
6881
  }
6882
6882
  function isexe(path43, options, cb) {
6883
- fs36.stat(path43, function(er, stat) {
6883
+ fs37.stat(path43, function(er, stat) {
6884
6884
  cb(er, er ? false : checkStat(stat, path43, options));
6885
6885
  });
6886
6886
  }
6887
6887
  function sync(path43, options) {
6888
- return checkStat(fs36.statSync(path43), path43, options);
6888
+ return checkStat(fs37.statSync(path43), path43, options);
6889
6889
  }
6890
6890
  }
6891
6891
  });
@@ -6897,14 +6897,14 @@ var require_mode = __commonJS({
6897
6897
  init_esm_shims();
6898
6898
  module.exports = isexe;
6899
6899
  isexe.sync = sync;
6900
- var fs36 = __require("fs");
6900
+ var fs37 = __require("fs");
6901
6901
  function isexe(path43, options, cb) {
6902
- fs36.stat(path43, function(er, stat) {
6902
+ fs37.stat(path43, function(er, stat) {
6903
6903
  cb(er, er ? false : checkStat(stat, options));
6904
6904
  });
6905
6905
  }
6906
6906
  function sync(path43, options) {
6907
- return checkStat(fs36.statSync(path43), options);
6907
+ return checkStat(fs37.statSync(path43), options);
6908
6908
  }
6909
6909
  function checkStat(stat, options) {
6910
6910
  return stat.isFile() && checkMode(stat, options);
@@ -6930,7 +6930,7 @@ var require_isexe = __commonJS({
6930
6930
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
6931
6931
  "use strict";
6932
6932
  init_esm_shims();
6933
- var fs36 = __require("fs");
6933
+ var fs37 = __require("fs");
6934
6934
  var core;
6935
6935
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
6936
6936
  core = require_windows();
@@ -7202,16 +7202,16 @@ var require_readShebang = __commonJS({
7202
7202
  "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
7203
7203
  "use strict";
7204
7204
  init_esm_shims();
7205
- var fs36 = __require("fs");
7205
+ var fs37 = __require("fs");
7206
7206
  var shebangCommand = require_shebang_command();
7207
7207
  function readShebang(command) {
7208
7208
  const size = 150;
7209
7209
  const buffer = Buffer.alloc(size);
7210
7210
  let fd2;
7211
7211
  try {
7212
- fd2 = fs36.openSync(command, "r");
7213
- fs36.readSync(fd2, buffer, 0, size, 0);
7214
- fs36.closeSync(fd2);
7212
+ fd2 = fs37.openSync(command, "r");
7213
+ fs37.readSync(fd2, buffer, 0, size, 0);
7214
+ fs37.closeSync(fd2);
7215
7215
  } catch (e) {
7216
7216
  }
7217
7217
  return shebangCommand(buffer.toString());
@@ -34336,12 +34336,12 @@ function redactSensitive(body) {
34336
34336
  async function checkCredentialsFileSafety(path43, onWarn = (m) => console.warn(`anthropic-sdk: ${m}`)) {
34337
34337
  if (typeof process === "undefined" || process.platform === "win32")
34338
34338
  return;
34339
- const fs36 = await import("fs");
34339
+ const fs37 = await import("fs");
34340
34340
  let resolved = path43;
34341
34341
  let st;
34342
34342
  try {
34343
- resolved = await fs36.promises.realpath(path43);
34344
- st = await fs36.promises.stat(resolved);
34343
+ resolved = await fs37.promises.realpath(path43);
34344
+ st = await fs37.promises.stat(resolved);
34345
34345
  } catch {
34346
34346
  return;
34347
34347
  }
@@ -34357,27 +34357,27 @@ async function checkCredentialsFileSafety(path43, onWarn = (m) => console.warn(`
34357
34357
  }
34358
34358
  }
34359
34359
  async function writeCredentialsFileAtomic(targetPath, data) {
34360
- const fs36 = await import("fs");
34360
+ const fs37 = await import("fs");
34361
34361
  const path43 = await import("path");
34362
34362
  const dir = path43.dirname(targetPath);
34363
- await fs36.promises.mkdir(dir, { recursive: true, mode: 448 });
34363
+ await fs37.promises.mkdir(dir, { recursive: true, mode: 448 });
34364
34364
  const tmpPath = `${targetPath}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
34365
34365
  try {
34366
- const fh = await fs36.promises.open(tmpPath, "w", 384);
34366
+ const fh = await fs37.promises.open(tmpPath, "w", 384);
34367
34367
  try {
34368
34368
  await fh.writeFile(JSON.stringify(data, null, 2));
34369
34369
  await fh.sync();
34370
34370
  } finally {
34371
34371
  await fh.close();
34372
34372
  }
34373
- await fs36.promises.rename(tmpPath, targetPath);
34373
+ await fs37.promises.rename(tmpPath, targetPath);
34374
34374
  } catch (err) {
34375
- await fs36.promises.unlink(tmpPath).catch(() => {
34375
+ await fs37.promises.unlink(tmpPath).catch(() => {
34376
34376
  });
34377
34377
  throw err;
34378
34378
  }
34379
34379
  try {
34380
- const dirFh = await fs36.promises.open(dir, "r");
34380
+ const dirFh = await fs37.promises.open(dir, "r");
34381
34381
  try {
34382
34382
  await dirFh.sync();
34383
34383
  } finally {
@@ -34679,12 +34679,12 @@ var loadConfigWithSource = async (profile) => {
34679
34679
  return null;
34680
34680
  }
34681
34681
  validateProfileName(profileName);
34682
- const fs36 = await import("fs");
34682
+ const fs37 = await import("fs");
34683
34683
  const path43 = await import("path");
34684
34684
  const configPath = path43.join(rootConfigPath, "configs", `${profileName}.json`);
34685
34685
  let configRaw;
34686
34686
  try {
34687
- configRaw = await fs36.promises.readFile(configPath, "utf-8");
34687
+ configRaw = await fs37.promises.readFile(configPath, "utf-8");
34688
34688
  } catch (err) {
34689
34689
  if (err?.code !== "ENOENT") {
34690
34690
  throw new Error(`failed to read config file ${configPath}: ${err}`);
@@ -34812,11 +34812,11 @@ var getActiveProfileName = async () => {
34812
34812
  if (profileName) {
34813
34813
  return profileName;
34814
34814
  }
34815
- const fs36 = await import("fs");
34815
+ const fs37 = await import("fs");
34816
34816
  const path43 = await import("path");
34817
34817
  const filePath = path43.join(rootConfigPath, "active_config");
34818
34818
  try {
34819
- return (await fs36.promises.readFile(filePath, "utf-8")).trim() || "default";
34819
+ return (await fs37.promises.readFile(filePath, "utf-8")).trim() || "default";
34820
34820
  } catch (err) {
34821
34821
  if (err?.code !== "ENOENT") {
34822
34822
  throw new Error(`failed to read ${filePath}: ${err}`);
@@ -34832,10 +34832,10 @@ function identityTokenFromFile(path43) {
34832
34832
  throw new AnthropicError("Identity token file path is empty");
34833
34833
  }
34834
34834
  return async () => {
34835
- const fs36 = await import("fs");
34835
+ const fs37 = await import("fs");
34836
34836
  let content;
34837
34837
  try {
34838
- content = await fs36.promises.readFile(path43, "utf-8");
34838
+ content = await fs37.promises.readFile(path43, "utf-8");
34839
34839
  } catch (err) {
34840
34840
  throw new AnthropicError(`Failed to read identity token file at ${path43}: ${err}`);
34841
34841
  }
@@ -34916,11 +34916,11 @@ function oidcFederationProvider(config2) {
34916
34916
  init_esm_shims();
34917
34917
  function userOAuthProvider(config2) {
34918
34918
  return async (opts) => {
34919
- const fs36 = await import("fs");
34919
+ const fs37 = await import("fs");
34920
34920
  await checkCredentialsFileSafety(config2.credentialsPath, config2.onSafetyWarning);
34921
34921
  let raw;
34922
34922
  try {
34923
- raw = await fs36.promises.readFile(config2.credentialsPath, "utf-8");
34923
+ raw = await fs37.promises.readFile(config2.credentialsPath, "utf-8");
34924
34924
  } catch (err) {
34925
34925
  throw new WorkloadIdentityError(`Credentials file not found at ${config2.credentialsPath}: ${err}`);
34926
34926
  }
@@ -35084,11 +35084,11 @@ function resolveIdentityTokenProvider(auth2) {
35084
35084
  }
35085
35085
  function cachedExchangeProvider(exchange, credentialsPath, onCacheWriteError, onSafetyWarning) {
35086
35086
  return async (opts) => {
35087
- const fs36 = await import("fs");
35087
+ const fs37 = await import("fs");
35088
35088
  await checkCredentialsFileSafety(credentialsPath, onSafetyWarning);
35089
35089
  let existing;
35090
35090
  try {
35091
- const raw = await fs36.promises.readFile(credentialsPath, "utf-8");
35091
+ const raw = await fs37.promises.readFile(credentialsPath, "utf-8");
35092
35092
  existing = JSON.parse(raw);
35093
35093
  const token = existing?.["access_token"];
35094
35094
  if (token && !opts?.forceRefresh) {
@@ -64703,11 +64703,11 @@ async function* runStream2(options) {
64703
64703
  }
64704
64704
  }
64705
64705
  if (getEnvironment()?.GGAI_DUMP_REQUEST) {
64706
- const fs36 = await import("fs");
64706
+ const fs37 = await import("fs");
64707
64707
  const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
64708
64708
  const dumpPath = `/tmp/ggai-request-${ts}.json`;
64709
- fs36.writeFileSync(dumpPath, JSON.stringify(params, null, 2));
64710
- fs36.appendFileSync(
64709
+ fs37.writeFileSync(dumpPath, JSON.stringify(params, null, 2));
64710
+ fs37.appendFileSync(
64711
64711
  "/tmp/ggai-requests.log",
64712
64712
  `[${ts}] ${dumpPath} messages=${params.messages.length}
64713
64713
  `
@@ -75699,7 +75699,7 @@ End your reply with this exact notice so the user doesn't miss it:
75699
75699
  name: "setup-commit",
75700
75700
  aliases: [],
75701
75701
  description: "Generate a /commit command",
75702
- prompt: `Detect the project type and generate a /commit command that enforces quality checks before committing.
75702
+ prompt: `Detect the project type and generate a /commit command that enforces quality checks and an agent code review before committing.
75703
75703
 
75704
75704
  ## Step 1: Detect Project and Extract Commands
75705
75705
 
@@ -75718,7 +75718,7 @@ Create the directory \`.gg/commands/\` if it doesn't exist, then write \`.gg/com
75718
75718
  \`\`\`markdown
75719
75719
  ---
75720
75720
  name: commit
75721
- description: Run checks, commit with AI message, and push
75721
+ description: Run checks, agent code review, commit with AI message, and push
75722
75722
  ---
75723
75723
 
75724
75724
  1. Run quality checks:
@@ -75727,24 +75727,37 @@ description: Run checks, commit with AI message, and push
75727
75727
 
75728
75728
  2. Review changes: run git status and git diff --staged and git diff
75729
75729
 
75730
- 3. Stage relevant files with git add (specific files, not -A)
75730
+ 3. Fast review gate: spawn ONE subagent with the full diff. Instructions: review ONLY
75731
+ the diff for real bugs, regressions, leftover debug code, and unintended changes.
75732
+ Score each issue 0-100 confidence (pre-existing issues and stylistic nitpicks = false
75733
+ positives, score low). Report ONLY issues with confidence >= 80, with file:line and a
75734
+ one-line fix. If none, reply "CLEAR". This is a last check, not a deep audit - be fast.
75731
75735
 
75732
- 4. Generate a commit message:
75736
+ 4. If CLEAR: proceed straight to step 5 and push WITHOUT asking the user anything.
75737
+ If issues >= 80 were reported: STOP, show the issues, and ask exactly:
75738
+ "Want me to fix this first, or commit and push anyway?
75739
+ A) Fix it first, then commit & push
75740
+ B) Commit & push anyway"
75741
+ On A: fix, re-run step 1, then continue (no re-review). On B: continue as-is.
75742
+
75743
+ 5. Stage relevant files with git add (specific files, not -A)
75744
+
75745
+ 6. Generate a commit message:
75733
75746
  - Start with verb (Add/Update/Fix/Remove/Refactor)
75734
75747
  - Be specific and concise, one line preferred
75735
75748
 
75736
- 5. Commit and push:
75749
+ 7. Commit AND push in one go - never pause for confirmation here:
75737
75750
  git commit -m "your generated message"
75738
75751
  git push
75739
75752
  \`\`\`
75740
75753
 
75741
75754
  Replace [PROJECT-SPECIFIC LINT/TYPECHECK COMMANDS] with the actual commands.
75742
75755
 
75743
- Keep the command file under 20 lines.
75756
+ Keep the command file under 30 lines.
75744
75757
 
75745
75758
  ## Step 3: Confirm
75746
75759
 
75747
- Report that /commit is now available with quality checks and AI-generated commit messages, and mention which local scripts/docs verified the commands.`
75760
+ Report that /commit is now available with quality checks, an agent code review gate, and AI-generated commit messages, and mention which local scripts/docs verified the commands.`
75748
75761
  },
75749
75762
  {
75750
75763
  name: "compare",
@@ -83250,18 +83263,752 @@ import readline2 from "readline";
83250
83263
  init_esm_shims();
83251
83264
  var import_react96 = __toESM(require_react(), 1);
83252
83265
 
83253
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/index.js
83266
+ // ../../node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.js
83267
+ init_esm_shims();
83268
+
83269
+ // ../../node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.js
83270
+ init_esm_shims();
83271
+
83272
+ // ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
83254
83273
  init_esm_shims();
83255
83274
 
83256
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render.js
83275
+ // ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
83276
+ init_esm_shims();
83277
+ function ansiRegex({ onlyFirst = false } = {}) {
83278
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
83279
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
83280
+ const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
83281
+ const pattern = `${osc}|${csi}`;
83282
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
83283
+ }
83284
+
83285
+ // ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
83286
+ var regex = ansiRegex();
83287
+ function stripAnsi(string4) {
83288
+ if (typeof string4 !== "string") {
83289
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
83290
+ }
83291
+ if (!string4.includes("\x1B") && !string4.includes("\x9B")) {
83292
+ return string4;
83293
+ }
83294
+ return string4.replace(regex, "");
83295
+ }
83296
+
83297
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
83298
+ init_esm_shims();
83299
+
83300
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
83301
+ init_esm_shims();
83302
+
83303
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
83304
+ init_esm_shims();
83305
+ var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
83306
+ var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
83307
+ var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
83308
+ var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
83309
+ var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
83310
+
83311
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
83312
+ init_esm_shims();
83313
+ var isInRange = (ranges, codePoint) => {
83314
+ let low = 0;
83315
+ let high = Math.floor(ranges.length / 2) - 1;
83316
+ while (low <= high) {
83317
+ const mid = Math.floor((low + high) / 2);
83318
+ const i = mid * 2;
83319
+ if (codePoint < ranges[i]) {
83320
+ high = mid - 1;
83321
+ } else if (codePoint > ranges[i + 1]) {
83322
+ low = mid + 1;
83323
+ } else {
83324
+ return true;
83325
+ }
83326
+ }
83327
+ return false;
83328
+ };
83329
+
83330
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
83331
+ var minimumAmbiguousCodePoint = ambiguousRanges[0];
83332
+ var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
83333
+ var minimumFullWidthCodePoint = fullwidthRanges[0];
83334
+ var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
83335
+ var minimumHalfWidthCodePoint = halfwidthRanges[0];
83336
+ var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
83337
+ var minimumNarrowCodePoint = narrowRanges[0];
83338
+ var maximumNarrowCodePoint = narrowRanges.at(-1);
83339
+ var minimumWideCodePoint = wideRanges[0];
83340
+ var maximumWideCodePoint = wideRanges.at(-1);
83341
+ var commonCjkCodePoint = 19968;
83342
+ var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
83343
+ function findWideFastPathRange(ranges) {
83344
+ let fastPathStart = ranges[0];
83345
+ let fastPathEnd = ranges[1];
83346
+ for (let index = 0; index < ranges.length; index += 2) {
83347
+ const start = ranges[index];
83348
+ const end = ranges[index + 1];
83349
+ if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
83350
+ return [start, end];
83351
+ }
83352
+ if (end - start > fastPathEnd - fastPathStart) {
83353
+ fastPathStart = start;
83354
+ fastPathEnd = end;
83355
+ }
83356
+ }
83357
+ return [fastPathStart, fastPathEnd];
83358
+ }
83359
+ var isAmbiguous = (codePoint) => {
83360
+ if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
83361
+ return false;
83362
+ }
83363
+ return isInRange(ambiguousRanges, codePoint);
83364
+ };
83365
+ var isFullWidth = (codePoint) => {
83366
+ if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
83367
+ return false;
83368
+ }
83369
+ return isInRange(fullwidthRanges, codePoint);
83370
+ };
83371
+ var isWide = (codePoint) => {
83372
+ if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
83373
+ return true;
83374
+ }
83375
+ if (codePoint < minimumWideCodePoint || codePoint > maximumWideCodePoint) {
83376
+ return false;
83377
+ }
83378
+ return isInRange(wideRanges, codePoint);
83379
+ };
83380
+
83381
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
83382
+ function validate(codePoint) {
83383
+ if (!Number.isSafeInteger(codePoint)) {
83384
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
83385
+ }
83386
+ }
83387
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
83388
+ validate(codePoint);
83389
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
83390
+ return 2;
83391
+ }
83392
+ return 1;
83393
+ }
83394
+
83395
+ // ../../node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.js
83396
+ var segmenter = new Intl.Segmenter();
83397
+ var zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$", "v");
83398
+ var leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
83399
+ var rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
83400
+ var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
83401
+ var extendedPictographicRegex = new RegExp("\\p{Extended_Pictographic}", "gu");
83402
+ function isDoubleWidthNonRgiEmojiSequence(segment) {
83403
+ if (segment.length > 50) {
83404
+ return false;
83405
+ }
83406
+ if (unqualifiedKeycapRegex.test(segment)) {
83407
+ return true;
83408
+ }
83409
+ if (segment.includes("\u200D")) {
83410
+ const pictographics = segment.match(extendedPictographicRegex);
83411
+ return pictographics !== null && pictographics.length >= 2;
83412
+ }
83413
+ return false;
83414
+ }
83415
+ function baseVisible(segment) {
83416
+ return segment.replace(leadingNonPrintingRegex, "");
83417
+ }
83418
+ function isZeroWidthCluster(segment) {
83419
+ return zeroWidthClusterRegex.test(segment);
83420
+ }
83421
+ function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
83422
+ let extra = 0;
83423
+ if (segment.length > 1) {
83424
+ for (const char of segment.slice(1)) {
83425
+ if (char >= "\uFF00" && char <= "\uFFEF") {
83426
+ extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
83427
+ }
83428
+ }
83429
+ }
83430
+ return extra;
83431
+ }
83432
+ function stringWidth(input, options = {}) {
83433
+ if (typeof input !== "string" || input.length === 0) {
83434
+ return 0;
83435
+ }
83436
+ const {
83437
+ ambiguousIsNarrow = true,
83438
+ countAnsiEscapeCodes = false
83439
+ } = options;
83440
+ let string4 = input;
83441
+ if (!countAnsiEscapeCodes && (string4.includes("\x1B") || string4.includes("\x9B"))) {
83442
+ string4 = stripAnsi(string4);
83443
+ }
83444
+ if (string4.length === 0) {
83445
+ return 0;
83446
+ }
83447
+ if (/^[\u0020-\u007E]*$/.test(string4)) {
83448
+ return string4.length;
83449
+ }
83450
+ let width = 0;
83451
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
83452
+ for (const { segment } of segmenter.segment(string4)) {
83453
+ if (isZeroWidthCluster(segment)) {
83454
+ continue;
83455
+ }
83456
+ if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
83457
+ width += 2;
83458
+ continue;
83459
+ }
83460
+ const codePoint = baseVisible(segment).codePointAt(0);
83461
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
83462
+ width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
83463
+ }
83464
+ return width;
83465
+ }
83466
+
83467
+ // ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
83468
+ init_esm_shims();
83469
+ var ANSI_BACKGROUND_OFFSET = 10;
83470
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
83471
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
83472
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
83473
+ var styles = {
83474
+ modifier: {
83475
+ reset: [0, 0],
83476
+ // 21 isn't widely supported and 22 does the same thing
83477
+ bold: [1, 22],
83478
+ dim: [2, 22],
83479
+ italic: [3, 23],
83480
+ underline: [4, 24],
83481
+ overline: [53, 55],
83482
+ inverse: [7, 27],
83483
+ hidden: [8, 28],
83484
+ strikethrough: [9, 29]
83485
+ },
83486
+ color: {
83487
+ black: [30, 39],
83488
+ red: [31, 39],
83489
+ green: [32, 39],
83490
+ yellow: [33, 39],
83491
+ blue: [34, 39],
83492
+ magenta: [35, 39],
83493
+ cyan: [36, 39],
83494
+ white: [37, 39],
83495
+ // Bright color
83496
+ blackBright: [90, 39],
83497
+ gray: [90, 39],
83498
+ // Alias of `blackBright`
83499
+ grey: [90, 39],
83500
+ // Alias of `blackBright`
83501
+ redBright: [91, 39],
83502
+ greenBright: [92, 39],
83503
+ yellowBright: [93, 39],
83504
+ blueBright: [94, 39],
83505
+ magentaBright: [95, 39],
83506
+ cyanBright: [96, 39],
83507
+ whiteBright: [97, 39]
83508
+ },
83509
+ bgColor: {
83510
+ bgBlack: [40, 49],
83511
+ bgRed: [41, 49],
83512
+ bgGreen: [42, 49],
83513
+ bgYellow: [43, 49],
83514
+ bgBlue: [44, 49],
83515
+ bgMagenta: [45, 49],
83516
+ bgCyan: [46, 49],
83517
+ bgWhite: [47, 49],
83518
+ // Bright color
83519
+ bgBlackBright: [100, 49],
83520
+ bgGray: [100, 49],
83521
+ // Alias of `bgBlackBright`
83522
+ bgGrey: [100, 49],
83523
+ // Alias of `bgBlackBright`
83524
+ bgRedBright: [101, 49],
83525
+ bgGreenBright: [102, 49],
83526
+ bgYellowBright: [103, 49],
83527
+ bgBlueBright: [104, 49],
83528
+ bgMagentaBright: [105, 49],
83529
+ bgCyanBright: [106, 49],
83530
+ bgWhiteBright: [107, 49]
83531
+ }
83532
+ };
83533
+ var modifierNames = Object.keys(styles.modifier);
83534
+ var foregroundColorNames = Object.keys(styles.color);
83535
+ var backgroundColorNames = Object.keys(styles.bgColor);
83536
+ var colorNames = [...foregroundColorNames, ...backgroundColorNames];
83537
+ function assembleStyles() {
83538
+ const codes = /* @__PURE__ */ new Map();
83539
+ for (const [groupName, group] of Object.entries(styles)) {
83540
+ for (const [styleName, style] of Object.entries(group)) {
83541
+ styles[styleName] = {
83542
+ open: `\x1B[${style[0]}m`,
83543
+ close: `\x1B[${style[1]}m`
83544
+ };
83545
+ group[styleName] = styles[styleName];
83546
+ codes.set(style[0], style[1]);
83547
+ }
83548
+ Object.defineProperty(styles, groupName, {
83549
+ value: group,
83550
+ enumerable: false
83551
+ });
83552
+ }
83553
+ Object.defineProperty(styles, "codes", {
83554
+ value: codes,
83555
+ enumerable: false
83556
+ });
83557
+ styles.color.close = "\x1B[39m";
83558
+ styles.bgColor.close = "\x1B[49m";
83559
+ styles.color.ansi = wrapAnsi16();
83560
+ styles.color.ansi256 = wrapAnsi256();
83561
+ styles.color.ansi16m = wrapAnsi16m();
83562
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
83563
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
83564
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
83565
+ Object.defineProperties(styles, {
83566
+ rgbToAnsi256: {
83567
+ value(red, green, blue) {
83568
+ if (red === green && green === blue) {
83569
+ if (red < 8) {
83570
+ return 16;
83571
+ }
83572
+ if (red > 248) {
83573
+ return 231;
83574
+ }
83575
+ return Math.round((red - 8) / 247 * 24) + 232;
83576
+ }
83577
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
83578
+ },
83579
+ enumerable: false
83580
+ },
83581
+ hexToRgb: {
83582
+ value(hex3) {
83583
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex3.toString(16));
83584
+ if (!matches) {
83585
+ return [0, 0, 0];
83586
+ }
83587
+ let [colorString] = matches;
83588
+ if (colorString.length === 3) {
83589
+ colorString = [...colorString].map((character) => character + character).join("");
83590
+ }
83591
+ const integer2 = Number.parseInt(colorString, 16);
83592
+ return [
83593
+ /* eslint-disable no-bitwise */
83594
+ integer2 >> 16 & 255,
83595
+ integer2 >> 8 & 255,
83596
+ integer2 & 255
83597
+ /* eslint-enable no-bitwise */
83598
+ ];
83599
+ },
83600
+ enumerable: false
83601
+ },
83602
+ hexToAnsi256: {
83603
+ value: (hex3) => styles.rgbToAnsi256(...styles.hexToRgb(hex3)),
83604
+ enumerable: false
83605
+ },
83606
+ ansi256ToAnsi: {
83607
+ value(code) {
83608
+ if (code < 8) {
83609
+ return 30 + code;
83610
+ }
83611
+ if (code < 16) {
83612
+ return 90 + (code - 8);
83613
+ }
83614
+ let red;
83615
+ let green;
83616
+ let blue;
83617
+ if (code >= 232) {
83618
+ red = ((code - 232) * 10 + 8) / 255;
83619
+ green = red;
83620
+ blue = red;
83621
+ } else {
83622
+ code -= 16;
83623
+ const remainder = code % 36;
83624
+ red = Math.floor(code / 36) / 5;
83625
+ green = Math.floor(remainder / 6) / 5;
83626
+ blue = remainder % 6 / 5;
83627
+ }
83628
+ const value = Math.max(red, green, blue) * 2;
83629
+ if (value === 0) {
83630
+ return 30;
83631
+ }
83632
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
83633
+ if (value === 2) {
83634
+ result += 60;
83635
+ }
83636
+ return result;
83637
+ },
83638
+ enumerable: false
83639
+ },
83640
+ rgbToAnsi: {
83641
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
83642
+ enumerable: false
83643
+ },
83644
+ hexToAnsi: {
83645
+ value: (hex3) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex3)),
83646
+ enumerable: false
83647
+ }
83648
+ });
83649
+ return styles;
83650
+ }
83651
+ var ansiStyles = assembleStyles();
83652
+ var ansi_styles_default = ansiStyles;
83653
+
83654
+ // ../../node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.js
83655
+ var ANSI_ESCAPE = "\x1B";
83656
+ var ANSI_ESCAPE_CSI = "\x9B";
83657
+ var ESCAPES = /* @__PURE__ */ new Set([
83658
+ ANSI_ESCAPE,
83659
+ ANSI_ESCAPE_CSI
83660
+ ]);
83661
+ var ANSI_ESCAPE_BELL = "\x07";
83662
+ var ANSI_CSI = "[";
83663
+ var ANSI_OSC = "]";
83664
+ var ANSI_SGR_TERMINATOR = "m";
83665
+ var ANSI_SGR_RESET = 0;
83666
+ var ANSI_SGR_RESET_FOREGROUND = 39;
83667
+ var ANSI_SGR_RESET_BACKGROUND = 49;
83668
+ var ANSI_SGR_RESET_UNDERLINE_COLOR = 59;
83669
+ var ANSI_SGR_FOREGROUND_EXTENDED = 38;
83670
+ var ANSI_SGR_BACKGROUND_EXTENDED = 48;
83671
+ var ANSI_SGR_UNDERLINE_COLOR_EXTENDED = 58;
83672
+ var ANSI_SGR_COLOR_MODE_256 = 5;
83673
+ var ANSI_SGR_COLOR_MODE_RGB = 2;
83674
+ var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
83675
+ var ANSI_ESCAPE_REGEX = new RegExp(`^\\u001B(?:\\${ANSI_CSI}(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}|${ANSI_ESCAPE_LINK}(?<uri>[^\\u0007\\u001B]*)(?:\\u0007|\\u001B\\\\))`);
83676
+ var ANSI_ESCAPE_CSI_REGEX = new RegExp(`^\\u009B(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}`);
83677
+ var ANSI_SGR_MODIFIER_CLOSE_CODES = new Set(ansi_styles_default.codes.values());
83678
+ ANSI_SGR_MODIFIER_CLOSE_CODES.delete(ANSI_SGR_RESET);
83679
+ var segmenter2 = new Intl.Segmenter();
83680
+ var getGraphemes = (string4) => Array.from(segmenter2.segment(string4), ({ segment }) => segment);
83681
+ var TAB_SIZE = 8;
83682
+ var wrapAnsiCode = (code) => `${ANSI_ESCAPE}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
83683
+ var wrapAnsiHyperlink = (url2) => `${ANSI_ESCAPE}${ANSI_ESCAPE_LINK}${url2}${ANSI_ESCAPE_BELL}`;
83684
+ var getSgrTokens = (sgrParameters) => {
83685
+ const codes = sgrParameters.split(";").map((sgrParameter) => sgrParameter === "" ? ANSI_SGR_RESET : Number.parseInt(sgrParameter, 10));
83686
+ const sgrTokens = [];
83687
+ for (let index = 0; index < codes.length; index++) {
83688
+ const code = codes[index];
83689
+ if (!Number.isFinite(code)) {
83690
+ continue;
83691
+ }
83692
+ if (code === ANSI_SGR_FOREGROUND_EXTENDED || code === ANSI_SGR_BACKGROUND_EXTENDED || code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED) {
83693
+ if (index + 1 >= codes.length) {
83694
+ break;
83695
+ }
83696
+ const mode = codes[index + 1];
83697
+ if (mode === ANSI_SGR_COLOR_MODE_256 && Number.isFinite(codes[index + 2])) {
83698
+ sgrTokens.push([code, mode, codes[index + 2]]);
83699
+ index += 2;
83700
+ continue;
83701
+ }
83702
+ const red = codes[index + 2];
83703
+ const green = codes[index + 3];
83704
+ const blue = codes[index + 4];
83705
+ if (mode === ANSI_SGR_COLOR_MODE_RGB && Number.isFinite(red) && Number.isFinite(green) && Number.isFinite(blue)) {
83706
+ sgrTokens.push([code, mode, red, green, blue]);
83707
+ index += 4;
83708
+ continue;
83709
+ }
83710
+ break;
83711
+ }
83712
+ sgrTokens.push([code]);
83713
+ }
83714
+ return sgrTokens;
83715
+ };
83716
+ var removeActiveStyle = (activeStyles, family) => {
83717
+ const activeStyleIndex = activeStyles.findIndex((activeStyle) => activeStyle.family === family);
83718
+ if (activeStyleIndex !== -1) {
83719
+ activeStyles.splice(activeStyleIndex, 1);
83720
+ }
83721
+ };
83722
+ var upsertActiveStyle = (activeStyles, nextActiveStyle) => {
83723
+ removeActiveStyle(activeStyles, nextActiveStyle.family);
83724
+ activeStyles.push(nextActiveStyle);
83725
+ };
83726
+ var removeModifierStylesByClose = (activeStyles, closeCode) => {
83727
+ for (let index = activeStyles.length - 1; index >= 0; index--) {
83728
+ const activeStyle = activeStyles[index];
83729
+ if (activeStyle.family.startsWith("modifier-") && activeStyle.close === closeCode) {
83730
+ activeStyles.splice(index, 1);
83731
+ }
83732
+ }
83733
+ };
83734
+ var getColorStyle = (code, sgrToken) => {
83735
+ if (code >= 30 && code <= 37 || code >= 90 && code <= 97 || code === ANSI_SGR_FOREGROUND_EXTENDED && sgrToken.length > 1) {
83736
+ return {
83737
+ family: "foreground",
83738
+ open: sgrToken.join(";"),
83739
+ close: ANSI_SGR_RESET_FOREGROUND
83740
+ };
83741
+ }
83742
+ if (code >= 40 && code <= 47 || code >= 100 && code <= 107 || code === ANSI_SGR_BACKGROUND_EXTENDED && sgrToken.length > 1) {
83743
+ return {
83744
+ family: "background",
83745
+ open: sgrToken.join(";"),
83746
+ close: ANSI_SGR_RESET_BACKGROUND
83747
+ };
83748
+ }
83749
+ if (code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED && sgrToken.length > 1) {
83750
+ return {
83751
+ family: "underlineColor",
83752
+ open: sgrToken.join(";"),
83753
+ close: ANSI_SGR_RESET_UNDERLINE_COLOR
83754
+ };
83755
+ }
83756
+ };
83757
+ var applySgrResetCode = (code, activeStyles) => {
83758
+ if (code === ANSI_SGR_RESET) {
83759
+ activeStyles.length = 0;
83760
+ return true;
83761
+ }
83762
+ if (code === ANSI_SGR_RESET_FOREGROUND) {
83763
+ removeActiveStyle(activeStyles, "foreground");
83764
+ return true;
83765
+ }
83766
+ if (code === ANSI_SGR_RESET_BACKGROUND) {
83767
+ removeActiveStyle(activeStyles, "background");
83768
+ return true;
83769
+ }
83770
+ if (code === ANSI_SGR_RESET_UNDERLINE_COLOR) {
83771
+ removeActiveStyle(activeStyles, "underlineColor");
83772
+ return true;
83773
+ }
83774
+ if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(code)) {
83775
+ removeModifierStylesByClose(activeStyles, code);
83776
+ return true;
83777
+ }
83778
+ return false;
83779
+ };
83780
+ var applySgrToken = (sgrToken, activeStyles) => {
83781
+ const [code] = sgrToken;
83782
+ if (applySgrResetCode(code, activeStyles)) {
83783
+ return;
83784
+ }
83785
+ const colorStyle = getColorStyle(code, sgrToken);
83786
+ if (colorStyle) {
83787
+ upsertActiveStyle(activeStyles, colorStyle);
83788
+ return;
83789
+ }
83790
+ const close = ansi_styles_default.codes.get(code);
83791
+ if (close !== void 0 && close !== ANSI_SGR_RESET) {
83792
+ upsertActiveStyle(activeStyles, {
83793
+ family: `modifier-${code}`,
83794
+ open: sgrToken.join(";"),
83795
+ close
83796
+ });
83797
+ }
83798
+ };
83799
+ var applySgrParameters = (sgrParameters, activeStyles) => {
83800
+ for (const sgrToken of getSgrTokens(sgrParameters)) {
83801
+ applySgrToken(sgrToken, activeStyles);
83802
+ }
83803
+ };
83804
+ var applySgrResets = (sgrParameters, activeStyles) => {
83805
+ for (const sgrToken of getSgrTokens(sgrParameters)) {
83806
+ const [code] = sgrToken;
83807
+ applySgrResetCode(code, activeStyles);
83808
+ }
83809
+ };
83810
+ var applyLeadingSgrResets = (string4, activeStyles) => {
83811
+ let remainder = string4;
83812
+ while (remainder.length > 0) {
83813
+ if (remainder.startsWith(ANSI_ESCAPE) && remainder[1] !== "\\") {
83814
+ const match = ANSI_ESCAPE_REGEX.exec(remainder);
83815
+ if (!match) {
83816
+ break;
83817
+ }
83818
+ if (match.groups.sgr !== void 0) {
83819
+ applySgrResets(match.groups.sgr, activeStyles);
83820
+ }
83821
+ remainder = remainder.slice(match[0].length);
83822
+ continue;
83823
+ }
83824
+ if (remainder.startsWith(ANSI_ESCAPE_CSI)) {
83825
+ const match = ANSI_ESCAPE_CSI_REGEX.exec(remainder);
83826
+ if (!match || match.groups.sgr === void 0) {
83827
+ break;
83828
+ }
83829
+ applySgrResets(match.groups.sgr, activeStyles);
83830
+ remainder = remainder.slice(match[0].length);
83831
+ continue;
83832
+ }
83833
+ break;
83834
+ }
83835
+ };
83836
+ var getClosingSgrSequence = (activeStyles) => [...activeStyles].reverse().map((activeStyle) => wrapAnsiCode(activeStyle.close)).join("");
83837
+ var getOpeningSgrSequence = (activeStyles) => activeStyles.map((activeStyle) => wrapAnsiCode(activeStyle.open)).join("");
83838
+ var wordLengths = (string4) => string4.split(" ").map((word) => stringWidth(word));
83839
+ var wrapWord = (rows, word, columns) => {
83840
+ const characters = getGraphemes(word);
83841
+ let isInsideEscape = false;
83842
+ let isInsideLinkEscape = false;
83843
+ let visible = stringWidth(stripAnsi(rows.at(-1)));
83844
+ for (const [index, character] of characters.entries()) {
83845
+ const characterLength = stringWidth(character);
83846
+ if (visible + characterLength <= columns) {
83847
+ rows[rows.length - 1] += character;
83848
+ } else {
83849
+ rows.push(character);
83850
+ visible = 0;
83851
+ }
83852
+ if (ESCAPES.has(character) && !(isInsideLinkEscape && character === ANSI_ESCAPE && characters[index + 1] === "\\")) {
83853
+ isInsideEscape = true;
83854
+ const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
83855
+ isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
83856
+ }
83857
+ if (isInsideEscape) {
83858
+ if (isInsideLinkEscape) {
83859
+ if (character === ANSI_ESCAPE_BELL || character === "\\" && index > 0 && characters[index - 1] === ANSI_ESCAPE) {
83860
+ isInsideEscape = false;
83861
+ isInsideLinkEscape = false;
83862
+ }
83863
+ } else if (character === ANSI_SGR_TERMINATOR) {
83864
+ isInsideEscape = false;
83865
+ }
83866
+ continue;
83867
+ }
83868
+ visible += characterLength;
83869
+ if (visible === columns && index < characters.length - 1) {
83870
+ rows.push("");
83871
+ visible = 0;
83872
+ }
83873
+ }
83874
+ if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
83875
+ rows[rows.length - 2] += rows.pop();
83876
+ }
83877
+ };
83878
+ var stringVisibleTrimSpacesRight = (string4) => {
83879
+ const words = string4.split(" ");
83880
+ let last = words.length;
83881
+ while (last > 0) {
83882
+ if (stringWidth(words[last - 1]) > 0) {
83883
+ break;
83884
+ }
83885
+ last--;
83886
+ }
83887
+ if (last === words.length) {
83888
+ return string4;
83889
+ }
83890
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
83891
+ };
83892
+ var expandTabs = (line) => {
83893
+ if (!line.includes(" ")) {
83894
+ return line;
83895
+ }
83896
+ const segments = line.split(" ");
83897
+ let visible = 0;
83898
+ let expandedLine = "";
83899
+ for (const [index, segment] of segments.entries()) {
83900
+ expandedLine += segment;
83901
+ visible += stringWidth(segment);
83902
+ if (index < segments.length - 1) {
83903
+ const spaces = TAB_SIZE - visible % TAB_SIZE;
83904
+ expandedLine += " ".repeat(spaces);
83905
+ visible += spaces;
83906
+ }
83907
+ }
83908
+ return expandedLine;
83909
+ };
83910
+ var exec = (string4, columns, options = {}) => {
83911
+ if (options.trim !== false && string4.trim() === "") {
83912
+ return "";
83913
+ }
83914
+ let returnValue = "";
83915
+ let escapeUrl;
83916
+ const activeStyles = [];
83917
+ const lengths = wordLengths(string4);
83918
+ let rows = [""];
83919
+ for (const [index, word] of string4.split(" ").entries()) {
83920
+ if (options.trim !== false) {
83921
+ rows[rows.length - 1] = rows.at(-1).trimStart();
83922
+ }
83923
+ let rowLength = stringWidth(rows.at(-1));
83924
+ if (index !== 0) {
83925
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
83926
+ rows.push("");
83927
+ rowLength = 0;
83928
+ }
83929
+ if (rowLength > 0 || options.trim === false) {
83930
+ rows[rows.length - 1] += " ";
83931
+ rowLength++;
83932
+ }
83933
+ }
83934
+ if (options.hard && options.wordWrap !== false && lengths[index] > columns) {
83935
+ const remainingColumns = columns - rowLength;
83936
+ const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
83937
+ const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
83938
+ if (breaksStartingNextLine < breaksStartingThisLine) {
83939
+ rows.push("");
83940
+ }
83941
+ wrapWord(rows, word, columns);
83942
+ continue;
83943
+ }
83944
+ if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
83945
+ if (options.wordWrap === false && rowLength < columns) {
83946
+ wrapWord(rows, word, columns);
83947
+ continue;
83948
+ }
83949
+ rows.push("");
83950
+ }
83951
+ if (rowLength + lengths[index] > columns && options.wordWrap === false) {
83952
+ wrapWord(rows, word, columns);
83953
+ continue;
83954
+ }
83955
+ rows[rows.length - 1] += word;
83956
+ }
83957
+ if (options.trim !== false) {
83958
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
83959
+ }
83960
+ const preString = rows.join("\n");
83961
+ const pre = getGraphemes(preString);
83962
+ let preStringIndex = 0;
83963
+ for (const [index, character] of pre.entries()) {
83964
+ returnValue += character;
83965
+ if (character === ANSI_ESCAPE && pre[index + 1] !== "\\") {
83966
+ const { groups } = ANSI_ESCAPE_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
83967
+ if (groups.sgr !== void 0) {
83968
+ applySgrParameters(groups.sgr, activeStyles);
83969
+ } else if (groups.uri !== void 0) {
83970
+ escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
83971
+ }
83972
+ } else if (character === ANSI_ESCAPE_CSI) {
83973
+ const { groups } = ANSI_ESCAPE_CSI_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
83974
+ if (groups.sgr !== void 0) {
83975
+ applySgrParameters(groups.sgr, activeStyles);
83976
+ }
83977
+ }
83978
+ if (pre[index + 1] === "\n") {
83979
+ if (escapeUrl) {
83980
+ returnValue += wrapAnsiHyperlink("");
83981
+ }
83982
+ returnValue += getClosingSgrSequence(activeStyles);
83983
+ } else if (character === "\n") {
83984
+ const openingStyles = [...activeStyles];
83985
+ applyLeadingSgrResets(preString.slice(preStringIndex + 1), openingStyles);
83986
+ returnValue += getOpeningSgrSequence(openingStyles);
83987
+ if (escapeUrl) {
83988
+ returnValue += wrapAnsiHyperlink(escapeUrl);
83989
+ }
83990
+ }
83991
+ preStringIndex += character.length;
83992
+ }
83993
+ return returnValue;
83994
+ };
83995
+ function wrapAnsi(string4, columns, options) {
83996
+ return String(string4).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(expandTabs(line), columns, options)).join("\n");
83997
+ }
83998
+
83999
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/index.js
84000
+ init_esm_shims();
84001
+
84002
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render.js
83257
84003
  init_esm_shims();
83258
84004
  import { Stream as Stream3 } from "stream";
83259
84005
  import process14 from "process";
83260
84006
 
83261
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
84007
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
83262
84008
  init_esm_shims();
83263
84009
  var import_react15 = __toESM(require_react(), 1);
83264
84010
  import process13 from "process";
84011
+ import fs31 from "fs";
83265
84012
 
83266
84013
  // ../../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/index.mjs
83267
84014
  init_esm_shims();
@@ -83635,7 +84382,7 @@ function autoBind(self, { include, exclude } = {}) {
83635
84382
  return self;
83636
84383
  }
83637
84384
 
83638
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
84385
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
83639
84386
  var import_signal_exit2 = __toESM(require_signal_exit(), 1);
83640
84387
 
83641
84388
  // ../../node_modules/.pnpm/patch-console@2.0.0/node_modules/patch-console/dist/index.js
@@ -83685,7 +84432,7 @@ var patchConsole = (callback) => {
83685
84432
  };
83686
84433
  var dist_default = patchConsole;
83687
84434
 
83688
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
84435
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
83689
84436
  var import_constants4 = __toESM(require_constants(), 1);
83690
84437
 
83691
84438
  // ../../node_modules/.pnpm/yoga-layout@3.2.1/node_modules/yoga-layout/dist/src/index.js
@@ -85241,129 +85988,6 @@ init_esm_shims();
85241
85988
  // ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
85242
85989
  init_esm_shims();
85243
85990
 
85244
- // ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
85245
- init_esm_shims();
85246
-
85247
- // ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
85248
- init_esm_shims();
85249
- function ansiRegex({ onlyFirst = false } = {}) {
85250
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
85251
- const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
85252
- const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
85253
- const pattern = `${osc}|${csi}`;
85254
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
85255
- }
85256
-
85257
- // ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
85258
- var regex = ansiRegex();
85259
- function stripAnsi(string4) {
85260
- if (typeof string4 !== "string") {
85261
- throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
85262
- }
85263
- if (!string4.includes("\x1B") && !string4.includes("\x9B")) {
85264
- return string4;
85265
- }
85266
- return string4.replace(regex, "");
85267
- }
85268
-
85269
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
85270
- init_esm_shims();
85271
-
85272
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
85273
- init_esm_shims();
85274
-
85275
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
85276
- init_esm_shims();
85277
- var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
85278
- var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
85279
- var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
85280
- var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
85281
- var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
85282
-
85283
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
85284
- init_esm_shims();
85285
- var isInRange = (ranges, codePoint) => {
85286
- let low = 0;
85287
- let high = Math.floor(ranges.length / 2) - 1;
85288
- while (low <= high) {
85289
- const mid = Math.floor((low + high) / 2);
85290
- const i = mid * 2;
85291
- if (codePoint < ranges[i]) {
85292
- high = mid - 1;
85293
- } else if (codePoint > ranges[i + 1]) {
85294
- low = mid + 1;
85295
- } else {
85296
- return true;
85297
- }
85298
- }
85299
- return false;
85300
- };
85301
-
85302
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
85303
- var minimumAmbiguousCodePoint = ambiguousRanges[0];
85304
- var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
85305
- var minimumFullWidthCodePoint = fullwidthRanges[0];
85306
- var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
85307
- var minimumHalfWidthCodePoint = halfwidthRanges[0];
85308
- var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
85309
- var minimumNarrowCodePoint = narrowRanges[0];
85310
- var maximumNarrowCodePoint = narrowRanges.at(-1);
85311
- var minimumWideCodePoint = wideRanges[0];
85312
- var maximumWideCodePoint = wideRanges.at(-1);
85313
- var commonCjkCodePoint = 19968;
85314
- var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
85315
- function findWideFastPathRange(ranges) {
85316
- let fastPathStart = ranges[0];
85317
- let fastPathEnd = ranges[1];
85318
- for (let index = 0; index < ranges.length; index += 2) {
85319
- const start = ranges[index];
85320
- const end = ranges[index + 1];
85321
- if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
85322
- return [start, end];
85323
- }
85324
- if (end - start > fastPathEnd - fastPathStart) {
85325
- fastPathStart = start;
85326
- fastPathEnd = end;
85327
- }
85328
- }
85329
- return [fastPathStart, fastPathEnd];
85330
- }
85331
- var isAmbiguous = (codePoint) => {
85332
- if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
85333
- return false;
85334
- }
85335
- return isInRange(ambiguousRanges, codePoint);
85336
- };
85337
- var isFullWidth = (codePoint) => {
85338
- if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
85339
- return false;
85340
- }
85341
- return isInRange(fullwidthRanges, codePoint);
85342
- };
85343
- var isWide = (codePoint) => {
85344
- if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
85345
- return true;
85346
- }
85347
- if (codePoint < minimumWideCodePoint || codePoint > maximumWideCodePoint) {
85348
- return false;
85349
- }
85350
- return isInRange(wideRanges, codePoint);
85351
- };
85352
-
85353
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
85354
- function validate(codePoint) {
85355
- if (!Number.isSafeInteger(codePoint)) {
85356
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
85357
- }
85358
- }
85359
- function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
85360
- validate(codePoint);
85361
- if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
85362
- return 2;
85363
- }
85364
- return 1;
85365
- }
85366
-
85367
85991
  // ../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
85368
85992
  init_esm_shims();
85369
85993
  var emoji_regex_default = () => {
@@ -85371,9 +85995,9 @@ var emoji_regex_default = () => {
85371
85995
  };
85372
85996
 
85373
85997
  // ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
85374
- var segmenter = new Intl.Segmenter();
85998
+ var segmenter3 = new Intl.Segmenter();
85375
85999
  var defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
85376
- function stringWidth(string4, options = {}) {
86000
+ function stringWidth2(string4, options = {}) {
85377
86001
  if (typeof string4 !== "string" || string4.length === 0) {
85378
86002
  return 0;
85379
86003
  }
@@ -85389,7 +86013,7 @@ function stringWidth(string4, options = {}) {
85389
86013
  }
85390
86014
  let width = 0;
85391
86015
  const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
85392
- for (const { segment: character } of segmenter.segment(string4)) {
86016
+ for (const { segment: character } of segmenter3.segment(string4)) {
85393
86017
  const codePoint = character.codePointAt(0);
85394
86018
  if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
85395
86019
  continue;
@@ -85418,232 +86042,45 @@ function stringWidth(string4, options = {}) {
85418
86042
  return width;
85419
86043
  }
85420
86044
 
85421
- // ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
85422
- init_esm_shims();
85423
- var ANSI_BACKGROUND_OFFSET = 10;
85424
- var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
85425
- var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
85426
- var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
85427
- var styles = {
85428
- modifier: {
85429
- reset: [0, 0],
85430
- // 21 isn't widely supported and 22 does the same thing
85431
- bold: [1, 22],
85432
- dim: [2, 22],
85433
- italic: [3, 23],
85434
- underline: [4, 24],
85435
- overline: [53, 55],
85436
- inverse: [7, 27],
85437
- hidden: [8, 28],
85438
- strikethrough: [9, 29]
85439
- },
85440
- color: {
85441
- black: [30, 39],
85442
- red: [31, 39],
85443
- green: [32, 39],
85444
- yellow: [33, 39],
85445
- blue: [34, 39],
85446
- magenta: [35, 39],
85447
- cyan: [36, 39],
85448
- white: [37, 39],
85449
- // Bright color
85450
- blackBright: [90, 39],
85451
- gray: [90, 39],
85452
- // Alias of `blackBright`
85453
- grey: [90, 39],
85454
- // Alias of `blackBright`
85455
- redBright: [91, 39],
85456
- greenBright: [92, 39],
85457
- yellowBright: [93, 39],
85458
- blueBright: [94, 39],
85459
- magentaBright: [95, 39],
85460
- cyanBright: [96, 39],
85461
- whiteBright: [97, 39]
85462
- },
85463
- bgColor: {
85464
- bgBlack: [40, 49],
85465
- bgRed: [41, 49],
85466
- bgGreen: [42, 49],
85467
- bgYellow: [43, 49],
85468
- bgBlue: [44, 49],
85469
- bgMagenta: [45, 49],
85470
- bgCyan: [46, 49],
85471
- bgWhite: [47, 49],
85472
- // Bright color
85473
- bgBlackBright: [100, 49],
85474
- bgGray: [100, 49],
85475
- // Alias of `bgBlackBright`
85476
- bgGrey: [100, 49],
85477
- // Alias of `bgBlackBright`
85478
- bgRedBright: [101, 49],
85479
- bgGreenBright: [102, 49],
85480
- bgYellowBright: [103, 49],
85481
- bgBlueBright: [104, 49],
85482
- bgMagentaBright: [105, 49],
85483
- bgCyanBright: [106, 49],
85484
- bgWhiteBright: [107, 49]
85485
- }
85486
- };
85487
- var modifierNames = Object.keys(styles.modifier);
85488
- var foregroundColorNames = Object.keys(styles.color);
85489
- var backgroundColorNames = Object.keys(styles.bgColor);
85490
- var colorNames = [...foregroundColorNames, ...backgroundColorNames];
85491
- function assembleStyles() {
85492
- const codes = /* @__PURE__ */ new Map();
85493
- for (const [groupName, group] of Object.entries(styles)) {
85494
- for (const [styleName, style] of Object.entries(group)) {
85495
- styles[styleName] = {
85496
- open: `\x1B[${style[0]}m`,
85497
- close: `\x1B[${style[1]}m`
85498
- };
85499
- group[styleName] = styles[styleName];
85500
- codes.set(style[0], style[1]);
85501
- }
85502
- Object.defineProperty(styles, groupName, {
85503
- value: group,
85504
- enumerable: false
85505
- });
85506
- }
85507
- Object.defineProperty(styles, "codes", {
85508
- value: codes,
85509
- enumerable: false
85510
- });
85511
- styles.color.close = "\x1B[39m";
85512
- styles.bgColor.close = "\x1B[49m";
85513
- styles.color.ansi = wrapAnsi16();
85514
- styles.color.ansi256 = wrapAnsi256();
85515
- styles.color.ansi16m = wrapAnsi16m();
85516
- styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
85517
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
85518
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
85519
- Object.defineProperties(styles, {
85520
- rgbToAnsi256: {
85521
- value(red, green, blue) {
85522
- if (red === green && green === blue) {
85523
- if (red < 8) {
85524
- return 16;
85525
- }
85526
- if (red > 248) {
85527
- return 231;
85528
- }
85529
- return Math.round((red - 8) / 247 * 24) + 232;
85530
- }
85531
- return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
85532
- },
85533
- enumerable: false
85534
- },
85535
- hexToRgb: {
85536
- value(hex3) {
85537
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex3.toString(16));
85538
- if (!matches) {
85539
- return [0, 0, 0];
85540
- }
85541
- let [colorString] = matches;
85542
- if (colorString.length === 3) {
85543
- colorString = [...colorString].map((character) => character + character).join("");
85544
- }
85545
- const integer2 = Number.parseInt(colorString, 16);
85546
- return [
85547
- /* eslint-disable no-bitwise */
85548
- integer2 >> 16 & 255,
85549
- integer2 >> 8 & 255,
85550
- integer2 & 255
85551
- /* eslint-enable no-bitwise */
85552
- ];
85553
- },
85554
- enumerable: false
85555
- },
85556
- hexToAnsi256: {
85557
- value: (hex3) => styles.rgbToAnsi256(...styles.hexToRgb(hex3)),
85558
- enumerable: false
85559
- },
85560
- ansi256ToAnsi: {
85561
- value(code) {
85562
- if (code < 8) {
85563
- return 30 + code;
85564
- }
85565
- if (code < 16) {
85566
- return 90 + (code - 8);
85567
- }
85568
- let red;
85569
- let green;
85570
- let blue;
85571
- if (code >= 232) {
85572
- red = ((code - 232) * 10 + 8) / 255;
85573
- green = red;
85574
- blue = red;
85575
- } else {
85576
- code -= 16;
85577
- const remainder = code % 36;
85578
- red = Math.floor(code / 36) / 5;
85579
- green = Math.floor(remainder / 6) / 5;
85580
- blue = remainder % 6 / 5;
85581
- }
85582
- const value = Math.max(red, green, blue) * 2;
85583
- if (value === 0) {
85584
- return 30;
85585
- }
85586
- let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
85587
- if (value === 2) {
85588
- result += 60;
85589
- }
85590
- return result;
85591
- },
85592
- enumerable: false
85593
- },
85594
- rgbToAnsi: {
85595
- value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
85596
- enumerable: false
85597
- },
85598
- hexToAnsi: {
85599
- value: (hex3) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex3)),
85600
- enumerable: false
85601
- }
85602
- });
85603
- return styles;
85604
- }
85605
- var ansiStyles = assembleStyles();
85606
- var ansi_styles_default = ansiStyles;
85607
-
85608
86045
  // ../../node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
85609
- var ESCAPES = /* @__PURE__ */ new Set([
86046
+ var ESCAPES2 = /* @__PURE__ */ new Set([
85610
86047
  "\x1B",
85611
86048
  "\x9B"
85612
86049
  ]);
85613
86050
  var END_CODE = 39;
85614
- var ANSI_ESCAPE_BELL = "\x07";
85615
- var ANSI_CSI = "[";
85616
- var ANSI_OSC = "]";
85617
- var ANSI_SGR_TERMINATOR = "m";
85618
- var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
85619
- var wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
85620
- var wrapAnsiHyperlink = (url2) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url2}${ANSI_ESCAPE_BELL}`;
85621
- var wordLengths = (string4) => string4.split(" ").map((character) => stringWidth(character));
85622
- var wrapWord = (rows, word, columns) => {
86051
+ var ANSI_ESCAPE_BELL2 = "\x07";
86052
+ var ANSI_CSI2 = "[";
86053
+ var ANSI_OSC2 = "]";
86054
+ var ANSI_SGR_TERMINATOR2 = "m";
86055
+ var ANSI_ESCAPE_LINK2 = `${ANSI_OSC2}8;;`;
86056
+ var wrapAnsiCode2 = (code) => `${ESCAPES2.values().next().value}${ANSI_CSI2}${code}${ANSI_SGR_TERMINATOR2}`;
86057
+ var wrapAnsiHyperlink2 = (url2) => `${ESCAPES2.values().next().value}${ANSI_ESCAPE_LINK2}${url2}${ANSI_ESCAPE_BELL2}`;
86058
+ var wordLengths2 = (string4) => string4.split(" ").map((character) => stringWidth2(character));
86059
+ var wrapWord2 = (rows, word, columns) => {
85623
86060
  const characters = [...word];
85624
86061
  let isInsideEscape = false;
85625
86062
  let isInsideLinkEscape = false;
85626
- let visible = stringWidth(stripAnsi(rows.at(-1)));
86063
+ let visible = stringWidth2(stripAnsi(rows.at(-1)));
85627
86064
  for (const [index, character] of characters.entries()) {
85628
- const characterLength = stringWidth(character);
86065
+ const characterLength = stringWidth2(character);
85629
86066
  if (visible + characterLength <= columns) {
85630
86067
  rows[rows.length - 1] += character;
85631
86068
  } else {
85632
86069
  rows.push(character);
85633
86070
  visible = 0;
85634
86071
  }
85635
- if (ESCAPES.has(character)) {
86072
+ if (ESCAPES2.has(character)) {
85636
86073
  isInsideEscape = true;
85637
- const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
85638
- isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
86074
+ const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK2.length).join("");
86075
+ isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK2;
85639
86076
  }
85640
86077
  if (isInsideEscape) {
85641
86078
  if (isInsideLinkEscape) {
85642
- if (character === ANSI_ESCAPE_BELL) {
86079
+ if (character === ANSI_ESCAPE_BELL2) {
85643
86080
  isInsideEscape = false;
85644
86081
  isInsideLinkEscape = false;
85645
86082
  }
85646
- } else if (character === ANSI_SGR_TERMINATOR) {
86083
+ } else if (character === ANSI_SGR_TERMINATOR2) {
85647
86084
  isInsideEscape = false;
85648
86085
  }
85649
86086
  continue;
@@ -85658,11 +86095,11 @@ var wrapWord = (rows, word, columns) => {
85658
86095
  rows[rows.length - 2] += rows.pop();
85659
86096
  }
85660
86097
  };
85661
- var stringVisibleTrimSpacesRight = (string4) => {
86098
+ var stringVisibleTrimSpacesRight2 = (string4) => {
85662
86099
  const words = string4.split(" ");
85663
86100
  let last = words.length;
85664
86101
  while (last > 0) {
85665
- if (stringWidth(words[last - 1]) > 0) {
86102
+ if (stringWidth2(words[last - 1]) > 0) {
85666
86103
  break;
85667
86104
  }
85668
86105
  last--;
@@ -85672,20 +86109,20 @@ var stringVisibleTrimSpacesRight = (string4) => {
85672
86109
  }
85673
86110
  return words.slice(0, last).join(" ") + words.slice(last).join("");
85674
86111
  };
85675
- var exec = (string4, columns, options = {}) => {
86112
+ var exec2 = (string4, columns, options = {}) => {
85676
86113
  if (options.trim !== false && string4.trim() === "") {
85677
86114
  return "";
85678
86115
  }
85679
86116
  let returnValue = "";
85680
86117
  let escapeCode;
85681
86118
  let escapeUrl;
85682
- const lengths = wordLengths(string4);
86119
+ const lengths = wordLengths2(string4);
85683
86120
  let rows = [""];
85684
86121
  for (const [index, word] of string4.split(" ").entries()) {
85685
86122
  if (options.trim !== false) {
85686
86123
  rows[rows.length - 1] = rows.at(-1).trimStart();
85687
86124
  }
85688
- let rowLength = stringWidth(rows.at(-1));
86125
+ let rowLength = stringWidth2(rows.at(-1));
85689
86126
  if (index !== 0) {
85690
86127
  if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
85691
86128
  rows.push("");
@@ -85703,32 +86140,32 @@ var exec = (string4, columns, options = {}) => {
85703
86140
  if (breaksStartingNextLine < breaksStartingThisLine) {
85704
86141
  rows.push("");
85705
86142
  }
85706
- wrapWord(rows, word, columns);
86143
+ wrapWord2(rows, word, columns);
85707
86144
  continue;
85708
86145
  }
85709
86146
  if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
85710
86147
  if (options.wordWrap === false && rowLength < columns) {
85711
- wrapWord(rows, word, columns);
86148
+ wrapWord2(rows, word, columns);
85712
86149
  continue;
85713
86150
  }
85714
86151
  rows.push("");
85715
86152
  }
85716
86153
  if (rowLength + lengths[index] > columns && options.wordWrap === false) {
85717
- wrapWord(rows, word, columns);
86154
+ wrapWord2(rows, word, columns);
85718
86155
  continue;
85719
86156
  }
85720
86157
  rows[rows.length - 1] += word;
85721
86158
  }
85722
86159
  if (options.trim !== false) {
85723
- rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
86160
+ rows = rows.map((row) => stringVisibleTrimSpacesRight2(row));
85724
86161
  }
85725
86162
  const preString = rows.join("\n");
85726
86163
  const pre = [...preString];
85727
86164
  let preStringIndex = 0;
85728
86165
  for (const [index, character] of pre.entries()) {
85729
86166
  returnValue += character;
85730
- if (ESCAPES.has(character)) {
85731
- const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
86167
+ if (ESCAPES2.has(character)) {
86168
+ const { groups } = new RegExp(`(?:\\${ANSI_CSI2}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK2}(?<uri>.*)${ANSI_ESCAPE_BELL2})`).exec(preString.slice(preStringIndex)) || { groups: {} };
85732
86169
  if (groups.code !== void 0) {
85733
86170
  const code2 = Number.parseFloat(groups.code);
85734
86171
  escapeCode = code2 === END_CODE ? void 0 : code2;
@@ -85739,25 +86176,25 @@ var exec = (string4, columns, options = {}) => {
85739
86176
  const code = ansi_styles_default.codes.get(Number(escapeCode));
85740
86177
  if (pre[index + 1] === "\n") {
85741
86178
  if (escapeUrl) {
85742
- returnValue += wrapAnsiHyperlink("");
86179
+ returnValue += wrapAnsiHyperlink2("");
85743
86180
  }
85744
86181
  if (escapeCode && code) {
85745
- returnValue += wrapAnsiCode(code);
86182
+ returnValue += wrapAnsiCode2(code);
85746
86183
  }
85747
86184
  } else if (character === "\n") {
85748
86185
  if (escapeCode && code) {
85749
- returnValue += wrapAnsiCode(escapeCode);
86186
+ returnValue += wrapAnsiCode2(escapeCode);
85750
86187
  }
85751
86188
  if (escapeUrl) {
85752
- returnValue += wrapAnsiHyperlink(escapeUrl);
86189
+ returnValue += wrapAnsiHyperlink2(escapeUrl);
85753
86190
  }
85754
86191
  }
85755
86192
  preStringIndex += character.length;
85756
86193
  }
85757
86194
  return returnValue;
85758
86195
  };
85759
- function wrapAnsi(string4, columns, options) {
85760
- return String(string4).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
86196
+ function wrapAnsi2(string4, columns, options) {
86197
+ return String(string4).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec2(line, columns, options)).join("\n");
85761
86198
  }
85762
86199
 
85763
86200
  // ../../node_modules/.pnpm/terminal-size@4.0.1/node_modules/terminal-size/index.js
@@ -85768,7 +86205,7 @@ import fs29 from "fs";
85768
86205
  import tty from "tty";
85769
86206
  var defaultColumns = 80;
85770
86207
  var defaultRows = 24;
85771
- var exec2 = (command, arguments_, { shell: shell2, env: env2 } = {}) => execFileSync2(command, arguments_, {
86208
+ var exec3 = (command, arguments_, { shell: shell2, env: env2 } = {}) => execFileSync2(command, arguments_, {
85772
86209
  encoding: "utf8",
85773
86210
  stdio: ["ignore", "pipe", "ignore"],
85774
86211
  timeout: 500,
@@ -85846,8 +86283,8 @@ var devTty = () => {
85846
86283
  };
85847
86284
  var tput = () => {
85848
86285
  try {
85849
- const columns = exec2("tput", ["cols"], { env: { TERM: "dumb", ...process5.env } });
85850
- const rows = exec2("tput", ["lines"], { env: { TERM: "dumb", ...process5.env } });
86286
+ const columns = exec3("tput", ["cols"], { env: { TERM: "dumb", ...process5.env } });
86287
+ const rows = exec3("tput", ["lines"], { env: { TERM: "dumb", ...process5.env } });
85851
86288
  if (columns && rows) {
85852
86289
  return createIfNotDefault(columns, rows);
85853
86290
  }
@@ -85859,7 +86296,7 @@ var resize = () => {
85859
86296
  if (!isForegroundProcess()) {
85860
86297
  return;
85861
86298
  }
85862
- const size = exec2("resize", ["-u"]).match(/\d+/g);
86299
+ const size = exec3("resize", ["-u"]).match(/\d+/g);
85863
86300
  if (size.length === 2) {
85864
86301
  return createIfNotDefault(size[0], size[1]);
85865
86302
  }
@@ -85867,22 +86304,22 @@ var resize = () => {
85867
86304
  }
85868
86305
  };
85869
86306
 
85870
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/utils.js
86307
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/utils.js
85871
86308
  init_esm_shims();
85872
86309
  import process6 from "process";
85873
86310
  var isDev = () => process6.env["DEV"] === "true";
85874
86311
 
85875
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/reconciler.js
86312
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/reconciler.js
85876
86313
  init_esm_shims();
85877
86314
  var import_react_reconciler = __toESM(require_react_reconciler(), 1);
85878
86315
  var import_constants3 = __toESM(require_constants(), 1);
85879
86316
  var Scheduler = __toESM(require_scheduler(), 1);
85880
86317
  var import_react = __toESM(require_react(), 1);
85881
86318
 
85882
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/dom.js
86319
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/dom.js
85883
86320
  init_esm_shims();
85884
86321
 
85885
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/measure-text.js
86322
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/measure-text.js
85886
86323
  init_esm_shims();
85887
86324
 
85888
86325
  // ../../node_modules/.pnpm/widest-line@6.0.0/node_modules/widest-line/index.js
@@ -85890,30 +86327,30 @@ init_esm_shims();
85890
86327
 
85891
86328
  // ../../node_modules/.pnpm/string-width@8.2.1/node_modules/string-width/index.js
85892
86329
  init_esm_shims();
85893
- var segmenter2 = new Intl.Segmenter();
85894
- var zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$", "v");
85895
- var leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
85896
- var rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
85897
- var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
85898
- var extendedPictographicRegex = new RegExp("\\p{Extended_Pictographic}", "gu");
85899
- function isDoubleWidthNonRgiEmojiSequence(segment) {
86330
+ var segmenter4 = new Intl.Segmenter();
86331
+ var zeroWidthClusterRegex2 = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$", "v");
86332
+ var leadingNonPrintingRegex2 = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
86333
+ var rgiEmojiRegex2 = new RegExp("^\\p{RGI_Emoji}$", "v");
86334
+ var unqualifiedKeycapRegex2 = /^[\d#*]\u20E3$/;
86335
+ var extendedPictographicRegex2 = new RegExp("\\p{Extended_Pictographic}", "gu");
86336
+ function isDoubleWidthNonRgiEmojiSequence2(segment) {
85900
86337
  if (segment.length > 50) {
85901
86338
  return false;
85902
86339
  }
85903
- if (unqualifiedKeycapRegex.test(segment)) {
86340
+ if (unqualifiedKeycapRegex2.test(segment)) {
85904
86341
  return true;
85905
86342
  }
85906
86343
  if (segment.includes("\u200D")) {
85907
- const pictographics = segment.match(extendedPictographicRegex);
86344
+ const pictographics = segment.match(extendedPictographicRegex2);
85908
86345
  return pictographics !== null && pictographics.length >= 2;
85909
86346
  }
85910
86347
  return false;
85911
86348
  }
85912
- function baseVisible(segment) {
85913
- return segment.replace(leadingNonPrintingRegex, "");
86349
+ function baseVisible2(segment) {
86350
+ return segment.replace(leadingNonPrintingRegex2, "");
85914
86351
  }
85915
- function isZeroWidthCluster(segment) {
85916
- return zeroWidthClusterRegex.test(segment);
86352
+ function isZeroWidthCluster2(segment) {
86353
+ return zeroWidthClusterRegex2.test(segment);
85917
86354
  }
85918
86355
  function isHangulLeadingJamo(codePoint) {
85919
86356
  return codePoint >= 4352 && codePoint <= 4447 || codePoint >= 43360 && codePoint <= 43388;
@@ -85930,7 +86367,7 @@ function isHangulJamo(codePoint) {
85930
86367
  function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
85931
86368
  const codePoints = [];
85932
86369
  for (const character of visibleSegment) {
85933
- if (zeroWidthClusterRegex.test(character)) {
86370
+ if (zeroWidthClusterRegex2.test(character)) {
85934
86371
  continue;
85935
86372
  }
85936
86373
  codePoints.push(character.codePointAt(0));
@@ -85959,7 +86396,7 @@ function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
85959
86396
  }
85960
86397
  return width;
85961
86398
  }
85962
- function trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions) {
86399
+ function trailingHalfwidthWidth2(visibleSegment, eastAsianWidthOptions) {
85963
86400
  let extra = 0;
85964
86401
  let first = true;
85965
86402
  for (const character of visibleSegment) {
@@ -85973,7 +86410,7 @@ function trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions) {
85973
86410
  }
85974
86411
  return extra;
85975
86412
  }
85976
- function stringWidth2(input, options = {}) {
86413
+ function stringWidth3(input, options = {}) {
85977
86414
  if (typeof input !== "string" || input.length === 0) {
85978
86415
  return 0;
85979
86416
  }
@@ -85993,15 +86430,15 @@ function stringWidth2(input, options = {}) {
85993
86430
  }
85994
86431
  let width = 0;
85995
86432
  const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
85996
- for (const { segment } of segmenter2.segment(string4)) {
85997
- if (isZeroWidthCluster(segment)) {
86433
+ for (const { segment } of segmenter4.segment(string4)) {
86434
+ if (isZeroWidthCluster2(segment)) {
85998
86435
  continue;
85999
86436
  }
86000
- if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
86437
+ if (rgiEmojiRegex2.test(segment) || isDoubleWidthNonRgiEmojiSequence2(segment)) {
86001
86438
  width += 2;
86002
86439
  continue;
86003
86440
  }
86004
- const visibleSegment = baseVisible(segment);
86441
+ const visibleSegment = baseVisible2(segment);
86005
86442
  const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
86006
86443
  if (hangulWidth !== void 0) {
86007
86444
  width += hangulWidth;
@@ -86009,7 +86446,7 @@ function stringWidth2(input, options = {}) {
86009
86446
  }
86010
86447
  const codePoint = visibleSegment.codePointAt(0);
86011
86448
  width += eastAsianWidth(codePoint, eastAsianWidthOptions);
86012
- width += trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions);
86449
+ width += trailingHalfwidthWidth2(visibleSegment, eastAsianWidthOptions);
86013
86450
  }
86014
86451
  return width;
86015
86452
  }
@@ -86018,12 +86455,12 @@ function stringWidth2(input, options = {}) {
86018
86455
  function widestLine(string4) {
86019
86456
  let lineWidth = 0;
86020
86457
  for (const line of string4.split("\n")) {
86021
- lineWidth = Math.max(lineWidth, stringWidth2(line));
86458
+ lineWidth = Math.max(lineWidth, stringWidth3(line));
86022
86459
  }
86023
86460
  return lineWidth;
86024
86461
  }
86025
86462
 
86026
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/measure-text.js
86463
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/measure-text.js
86027
86464
  var cache = /* @__PURE__ */ new Map();
86028
86465
  var measureText = (text) => {
86029
86466
  if (text.length === 0) {
@@ -86044,7 +86481,7 @@ var measureText = (text) => {
86044
86481
  };
86045
86482
  var measure_text_default = measureText;
86046
86483
 
86047
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/wrap-text.js
86484
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/wrap-text.js
86048
86485
  init_esm_shims();
86049
86486
 
86050
86487
  // ../../node_modules/.pnpm/cli-truncate@5.2.0/node_modules/cli-truncate/index.js
@@ -86074,7 +86511,7 @@ var C1_ST_CODE_POINT = 156;
86074
86511
  var C1_OSC_CODE_POINT = 157;
86075
86512
  var C1_PM_CODE_POINT = 158;
86076
86513
  var C1_APC_CODE_POINT = 159;
86077
- var ESCAPES2 = /* @__PURE__ */ new Set([
86514
+ var ESCAPES3 = /* @__PURE__ */ new Set([
86078
86515
  ESCAPE_CODE_POINT,
86079
86516
  C1_DCS_CODE_POINT,
86080
86517
  C1_SOS_CODE_POINT,
@@ -86086,18 +86523,18 @@ var ESCAPES2 = /* @__PURE__ */ new Set([
86086
86523
  ]);
86087
86524
  var ESCAPE = "\x1B";
86088
86525
  var ANSI_BELL = "\x07";
86089
- var ANSI_CSI2 = "[";
86090
- var ANSI_OSC2 = "]";
86526
+ var ANSI_CSI3 = "[";
86527
+ var ANSI_OSC3 = "]";
86091
86528
  var ANSI_DCS = "P";
86092
86529
  var ANSI_SOS = "X";
86093
86530
  var ANSI_PM = "^";
86094
86531
  var ANSI_APC = "_";
86095
- var ANSI_SGR_TERMINATOR2 = "m";
86532
+ var ANSI_SGR_TERMINATOR3 = "m";
86096
86533
  var ANSI_OSC_TERMINATOR = "\\";
86097
86534
  var ANSI_STRING_TERMINATOR = `${ESCAPE}${ANSI_OSC_TERMINATOR}`;
86098
86535
  var C1_OSC = "\x9D";
86099
86536
  var C1_STRING_TERMINATOR = "\x9C";
86100
- var ANSI_HYPERLINK_ESC_PREFIX = `${ESCAPE}${ANSI_OSC2}8;`;
86537
+ var ANSI_HYPERLINK_ESC_PREFIX = `${ESCAPE}${ANSI_OSC3}8;`;
86101
86538
  var ANSI_HYPERLINK_C1_PREFIX = `${C1_OSC}8;`;
86102
86539
  var ANSI_HYPERLINK_ESC_CLOSE = `${ANSI_HYPERLINK_ESC_PREFIX};`;
86103
86540
  var ANSI_HYPERLINK_C1_CLOSE = `${ANSI_HYPERLINK_C1_PREFIX};`;
@@ -86191,16 +86628,16 @@ function getSgrPrefix(code) {
86191
86628
  if (code.startsWith("\x9B")) {
86192
86629
  return "\x9B";
86193
86630
  }
86194
- return `${ESCAPE}${ANSI_CSI2}`;
86631
+ return `${ESCAPE}${ANSI_CSI3}`;
86195
86632
  }
86196
86633
  function createSgrCode(prefix, values) {
86197
- return `${prefix}${values.join(";")}${ANSI_SGR_TERMINATOR2}`;
86634
+ return `${prefix}${values.join(";")}${ANSI_SGR_TERMINATOR3}`;
86198
86635
  }
86199
86636
  function getSgrFragments(code) {
86200
86637
  const fragments = [];
86201
86638
  const sgrPrefix = getSgrPrefix(code);
86202
86639
  let parameterString;
86203
- if (code.startsWith(`${ESCAPE}${ANSI_CSI2}`)) {
86640
+ if (code.startsWith(`${ESCAPE}${ANSI_CSI3}`)) {
86204
86641
  parameterString = code.slice(2, -1);
86205
86642
  } else if (code.startsWith("\x9B")) {
86206
86643
  parameterString = code.slice(1, -1);
@@ -86287,7 +86724,7 @@ function parseCsiCode(string4, index) {
86287
86724
  const escapeCodePoint = string4.codePointAt(index);
86288
86725
  let sequenceStartIndex;
86289
86726
  if (escapeCodePoint === ESCAPE_CODE_POINT) {
86290
- if (string4[index + 1] !== ANSI_CSI2) {
86727
+ if (string4[index + 1] !== ANSI_CSI3) {
86291
86728
  return;
86292
86729
  }
86293
86730
  sequenceStartIndex = index + 2;
@@ -86301,7 +86738,7 @@ function parseCsiCode(string4, index) {
86301
86738
  const codePoint = string4.codePointAt(sequenceIndex);
86302
86739
  if (isCsiFinalCharacter(codePoint)) {
86303
86740
  const code = string4.slice(index, sequenceIndex + 1);
86304
- if (string4[sequenceIndex] !== ANSI_SGR_TERMINATOR2 || !hasCanonicalSgrParameters) {
86741
+ if (string4[sequenceIndex] !== ANSI_SGR_TERMINATOR3 || !hasCanonicalSgrParameters) {
86305
86742
  return createControlParseResult(code, sequenceIndex + 1);
86306
86743
  }
86307
86744
  return {
@@ -86400,7 +86837,7 @@ function parseControlStringCode(string4, index) {
86400
86837
  case ESCAPE_CODE_POINT: {
86401
86838
  const command = string4[index + 1];
86402
86839
  switch (command) {
86403
- case ANSI_OSC2: {
86840
+ case ANSI_OSC3: {
86404
86841
  sequenceStartIndex = index + 2;
86405
86842
  supportsBellTerminator = true;
86406
86843
  break;
@@ -86470,7 +86907,7 @@ function parseAnsiCode(string4, index) {
86470
86907
  function appendTrailingAnsiTokens(string4, index, tokens2) {
86471
86908
  while (index < string4.length) {
86472
86909
  const nextCodePoint = string4.codePointAt(index);
86473
- if (!ESCAPES2.has(nextCodePoint)) {
86910
+ if (!ESCAPES3.has(nextCodePoint)) {
86474
86911
  break;
86475
86912
  }
86476
86913
  const escapeCode = parseAnsiCode(string4, index);
@@ -86503,7 +86940,7 @@ function collectVisibleCharacters(string4) {
86503
86940
  let index = 0;
86504
86941
  while (index < string4.length) {
86505
86942
  const codePoint = string4.codePointAt(index);
86506
- if (ESCAPES2.has(codePoint)) {
86943
+ if (ESCAPES3.has(codePoint)) {
86507
86944
  const code = parseAnsiCode(string4, index);
86508
86945
  if (code) {
86509
86946
  index = code.endIndex;
@@ -86556,7 +86993,7 @@ function tokenizeAnsiWithVisibleSegmentation(string4, { endCharacter = Number.PO
86556
86993
  let visibleCount = 0;
86557
86994
  while (index < string4.length) {
86558
86995
  const codePoint = string4.codePointAt(index);
86559
- if (ESCAPES2.has(codePoint)) {
86996
+ if (ESCAPES3.has(codePoint)) {
86560
86997
  const code = parseAnsiCode(string4, index);
86561
86998
  if (code) {
86562
86999
  tokens2.push(code.token);
@@ -86611,7 +87048,7 @@ function hasAnsiSplitContinuationAhead(string4, startIndex, previousVisibleValue
86611
87048
  let hasAnsiCode = false;
86612
87049
  while (index < string4.length) {
86613
87050
  const codePoint = string4.codePointAt(index);
86614
- if (ESCAPES2.has(codePoint)) {
87051
+ if (ESCAPES3.has(codePoint)) {
86615
87052
  const code = parseAnsiCode(string4, index);
86616
87053
  if (code) {
86617
87054
  hasAnsiCode = true;
@@ -86639,7 +87076,7 @@ function tokenizeAnsi(string4, { endCharacter = Number.POSITIVE_INFINITY } = {})
86639
87076
  let hasAnsiSinceLastVisible = false;
86640
87077
  while (index < string4.length) {
86641
87078
  const codePoint = string4.codePointAt(index);
86642
- if (ESCAPES2.has(codePoint)) {
87079
+ if (ESCAPES3.has(codePoint)) {
86643
87080
  const code = parseAnsiCode(string4, index);
86644
87081
  if (code) {
86645
87082
  tokens2.push(code.token);
@@ -86719,7 +87156,7 @@ function shouldIncludeSgrAfterEnd(token, activeStyles) {
86719
87156
  }
86720
87157
  return hasClosingEffect && !hasStartFragment;
86721
87158
  }
86722
- function applySgrToken({ token, isPastEnd, activeStyles, returnValue, include, activeHyperlink, position }) {
87159
+ function applySgrToken2({ token, isPastEnd, activeStyles, returnValue, include, activeHyperlink, position }) {
86723
87160
  if (isPastEnd && !shouldIncludeSgrAfterEnd(token, activeStyles)) {
86724
87161
  return {
86725
87162
  activeStyles,
@@ -86800,7 +87237,7 @@ function applyCharacterToken({ token, start, activeStyles, activeHyperlink, posi
86800
87237
  };
86801
87238
  }
86802
87239
  var tokenHandlers = {
86803
- sgr: applySgrToken,
87240
+ sgr: applySgrToken2,
86804
87241
  hyperlink: applyHyperlinkToken,
86805
87242
  control: applyControlToken,
86806
87243
  character: applyCharacterToken
@@ -86904,7 +87341,7 @@ function cliTruncate(text, columns, options = {}) {
86904
87341
  if (columns < 1) {
86905
87342
  return "";
86906
87343
  }
86907
- const length = stringWidth2(text);
87344
+ const length = stringWidth3(text);
86908
87345
  if (length <= columns) {
86909
87346
  return text;
86910
87347
  }
@@ -86970,7 +87407,7 @@ function cliTruncate(text, columns, options = {}) {
86970
87407
  if (space) {
86971
87408
  truncationCharacter += " ";
86972
87409
  }
86973
- const right = sliceAnsi(text, length - columns + stringWidth2(truncationCharacter), length);
87410
+ const right = sliceAnsi(text, length - columns + stringWidth3(truncationCharacter), length);
86974
87411
  return prependWithInheritedStyleFromStart(truncationCharacter, right);
86975
87412
  }
86976
87413
  if (position === "middle") {
@@ -86983,7 +87420,7 @@ function cliTruncate(text, columns, options = {}) {
86983
87420
  const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);
86984
87421
  return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim();
86985
87422
  }
86986
- return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) + stringWidth2(truncationCharacter), length);
87423
+ return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) + stringWidth3(truncationCharacter), length);
86987
87424
  }
86988
87425
  if (position === "end") {
86989
87426
  if (preferTruncationOnSpace) {
@@ -86994,13 +87431,13 @@ function cliTruncate(text, columns, options = {}) {
86994
87431
  if (space) {
86995
87432
  truncationCharacter = ` ${truncationCharacter}`;
86996
87433
  }
86997
- const left = sliceAnsi(text, 0, columns - stringWidth2(truncationCharacter));
87434
+ const left = sliceAnsi(text, 0, columns - stringWidth3(truncationCharacter));
86998
87435
  return appendWithInheritedStyleFromEnd(left, truncationCharacter);
86999
87436
  }
87000
87437
  throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
87001
87438
  }
87002
87439
 
87003
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/wrap-text.js
87440
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/wrap-text.js
87004
87441
  var cache2 = {};
87005
87442
  var wrapText = (text, maxWidth, wrapType) => {
87006
87443
  const cacheKey = text + String(maxWidth) + String(wrapType);
@@ -87010,7 +87447,7 @@ var wrapText = (text, maxWidth, wrapType) => {
87010
87447
  }
87011
87448
  let wrappedText = text;
87012
87449
  if (wrapType === "wrap") {
87013
- wrappedText = wrapAnsi(text, maxWidth, {
87450
+ wrappedText = wrapAnsi2(text, maxWidth, {
87014
87451
  trim: false,
87015
87452
  hard: true
87016
87453
  });
@@ -87030,13 +87467,13 @@ var wrapText = (text, maxWidth, wrapType) => {
87030
87467
  };
87031
87468
  var wrap_text_default = wrapText;
87032
87469
 
87033
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/squash-text-nodes.js
87470
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/squash-text-nodes.js
87034
87471
  init_esm_shims();
87035
87472
 
87036
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/sanitize-ansi.js
87473
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/sanitize-ansi.js
87037
87474
  init_esm_shims();
87038
87475
 
87039
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ansi-tokenizer.js
87476
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ansi-tokenizer.js
87040
87477
  init_esm_shims();
87041
87478
  var bellCharacter = "\x07";
87042
87479
  var escapeCharacter = "\x1B";
@@ -87344,7 +87781,7 @@ var tokenizeAnsi2 = (text) => {
87344
87781
  return tokens2;
87345
87782
  };
87346
87783
 
87347
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/sanitize-ansi.js
87784
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/sanitize-ansi.js
87348
87785
  var sgrParametersRegex = /^[\d:;]*$/;
87349
87786
  var sanitizeAnsi = (text) => {
87350
87787
  if (!hasAnsiControlCharacters(text)) {
@@ -87364,7 +87801,7 @@ var sanitizeAnsi = (text) => {
87364
87801
  };
87365
87802
  var sanitize_ansi_default = sanitizeAnsi;
87366
87803
 
87367
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/squash-text-nodes.js
87804
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/squash-text-nodes.js
87368
87805
  var squashTextNodes = (node) => {
87369
87806
  let text = "";
87370
87807
  for (let index = 0; index < node.childNodes.length; index++) {
@@ -87389,7 +87826,7 @@ var squashTextNodes = (node) => {
87389
87826
  };
87390
87827
  var squash_text_nodes_default = squashTextNodes;
87391
87828
 
87392
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/dom.js
87829
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/dom.js
87393
87830
  var createNode = (nodeName) => {
87394
87831
  const node = {
87395
87832
  nodeName,
@@ -87505,7 +87942,7 @@ var setTextNodeValue = (node, text) => {
87505
87942
  markNodeAsDirty(node);
87506
87943
  };
87507
87944
 
87508
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/styles.js
87945
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/styles.js
87509
87946
  init_esm_shims();
87510
87947
  var applyPositionStyles = (node, style) => {
87511
87948
  if ("position" in style) {
@@ -87727,10 +88164,10 @@ var styles2 = (node, style = {}) => {
87727
88164
  };
87728
88165
  var styles_default = styles2;
87729
88166
 
87730
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/reconciler.js
88167
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/reconciler.js
87731
88168
  if (isDev()) {
87732
88169
  try {
87733
- await import("./devtools-XF5S3NSL.js");
88170
+ await import("./devtools-I2VAXNW4.js");
87734
88171
  } catch (error51) {
87735
88172
  if (error51.code === "ERR_MODULE_NOT_FOUND") {
87736
88173
  console.warn(`
@@ -87779,8 +88216,8 @@ var cleanupYogaNode = (node) => {
87779
88216
  var currentUpdatePriority = import_constants3.NoEventPriority;
87780
88217
  var currentRootNode;
87781
88218
  async function loadPackageJson() {
87782
- const fs36 = await import("fs");
87783
- const content = fs36.readFileSync(new URL("../package.json", import.meta.url), "utf8");
88219
+ const fs37 = await import("fs");
88220
+ const content = fs37.readFileSync(new URL("../package.json", import.meta.url), "utf8");
87784
88221
  return JSON.parse(content);
87785
88222
  }
87786
88223
  var packageJson = isDev() ? await loadPackageJson() : { name: void 0, version: void 0 };
@@ -87988,10 +88425,10 @@ var reconciler_default = (0, import_react_reconciler.default)({
87988
88425
  rendererVersion: packageJson.version
87989
88426
  });
87990
88427
 
87991
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/renderer.js
88428
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/renderer.js
87992
88429
  init_esm_shims();
87993
88430
 
87994
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-node-to-output.js
88431
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-node-to-output.js
87995
88432
  init_esm_shims();
87996
88433
 
87997
88434
  // ../../node_modules/.pnpm/indent-string@5.0.0/node_modules/indent-string/index.js
@@ -88028,18 +88465,18 @@ function indentString(string4, count = 1, options = {}) {
88028
88465
  return string4.replace(regex2, indent2.repeat(count));
88029
88466
  }
88030
88467
 
88031
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/get-max-width.js
88468
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/get-max-width.js
88032
88469
  init_esm_shims();
88033
88470
  var getMaxWidth = (yogaNode) => {
88034
88471
  return yogaNode.getComputedWidth() - yogaNode.getComputedPadding(src_default.EDGE_LEFT) - yogaNode.getComputedPadding(src_default.EDGE_RIGHT) - yogaNode.getComputedBorder(src_default.EDGE_LEFT) - yogaNode.getComputedBorder(src_default.EDGE_RIGHT);
88035
88472
  };
88036
88473
  var get_max_width_default = getMaxWidth;
88037
88474
 
88038
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-border.js
88475
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-border.js
88039
88476
  init_esm_shims();
88040
88477
  var import_cli_boxes = __toESM(require_cli_boxes(), 1);
88041
88478
 
88042
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/colorize.js
88479
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/colorize.js
88043
88480
  init_esm_shims();
88044
88481
  var rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
88045
88482
  var ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/;
@@ -88082,7 +88519,7 @@ var colorize = (str2, color2, type2) => {
88082
88519
  };
88083
88520
  var colorize_default = colorize;
88084
88521
 
88085
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-border.js
88522
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-border.js
88086
88523
  var renderBorder = (x, y, node, output) => {
88087
88524
  if (node.style.borderStyle) {
88088
88525
  const width = node.yogaNode.getComputedWidth();
@@ -88143,7 +88580,7 @@ var renderBorder = (x, y, node, output) => {
88143
88580
  };
88144
88581
  var render_border_default = renderBorder;
88145
88582
 
88146
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-background.js
88583
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-background.js
88147
88584
  init_esm_shims();
88148
88585
  var renderBackground = (x, y, node, output) => {
88149
88586
  if (!node.style.backgroundColor) {
@@ -88167,7 +88604,7 @@ var renderBackground = (x, y, node, output) => {
88167
88604
  };
88168
88605
  var render_background_default = renderBackground;
88169
88606
 
88170
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-node-to-output.js
88607
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-node-to-output.js
88171
88608
  var applyPaddingToText = (node, text) => {
88172
88609
  const yogaNode = node.childNodes[0]?.yogaNode;
88173
88610
  if (yogaNode) {
@@ -88275,7 +88712,7 @@ var renderNodeToOutput = (node, output, options) => {
88275
88712
  };
88276
88713
  var render_node_to_output_default = renderNodeToOutput;
88277
88714
 
88278
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/output.js
88715
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/output.js
88279
88716
  init_esm_shims();
88280
88717
 
88281
88718
  // ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.2.5/node_modules/@alcalzone/ansi-tokenize/build/index.js
@@ -88283,7 +88720,7 @@ init_esm_shims();
88283
88720
 
88284
88721
  // ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.2.5/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js
88285
88722
  init_esm_shims();
88286
- var ESCAPES3 = /* @__PURE__ */ new Set([27, 155]);
88723
+ var ESCAPES4 = /* @__PURE__ */ new Set([27, 155]);
88287
88724
  var CSI = "[".codePointAt(0);
88288
88725
  var OSC2 = "]".codePointAt(0);
88289
88726
  var endCodesSet = /* @__PURE__ */ new Set();
@@ -88420,7 +88857,7 @@ function styledCharsToString(chars2) {
88420
88857
 
88421
88858
  // ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.2.5/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js
88422
88859
  init_esm_shims();
88423
- var segmenter3 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
88860
+ var segmenter5 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
88424
88861
  function isFullwidthGrapheme(grapheme, baseCodePoint) {
88425
88862
  if (isFullwidthCodePoint(baseCodePoint))
88426
88863
  return true;
@@ -88496,11 +88933,11 @@ function tokenize4(str2, endChar = Number.POSITIVE_INFINITY) {
88496
88933
  const ret = [];
88497
88934
  let visible = 0;
88498
88935
  let codeEndIndex = 0;
88499
- for (const { segment, index } of segmenter3.segment(str2)) {
88936
+ for (const { segment, index } of segmenter5.segment(str2)) {
88500
88937
  if (index < codeEndIndex)
88501
88938
  continue;
88502
88939
  const codePoint = segment.codePointAt(0);
88503
- if (ESCAPES3.has(codePoint)) {
88940
+ if (ESCAPES4.has(codePoint)) {
88504
88941
  let code;
88505
88942
  const nextCodePoint = str2.codePointAt(index + 1);
88506
88943
  if (nextCodePoint === OSC2) {
@@ -88544,7 +88981,7 @@ function tokenize4(str2, endChar = Number.POSITIVE_INFINITY) {
88544
88981
  return ret;
88545
88982
  }
88546
88983
 
88547
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/output.js
88984
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/output.js
88548
88985
  var OutputCaches = class {
88549
88986
  widths = /* @__PURE__ */ new Map();
88550
88987
  blockWidths = /* @__PURE__ */ new Map();
@@ -88560,7 +88997,7 @@ var OutputCaches = class {
88560
88997
  getStringWidth(text) {
88561
88998
  let cached4 = this.widths.get(text);
88562
88999
  if (cached4 === void 0) {
88563
- cached4 = stringWidth2(text);
89000
+ cached4 = stringWidth3(text);
88564
89001
  this.widths.set(text, cached4);
88565
89002
  }
88566
89003
  return cached4;
@@ -88716,7 +89153,7 @@ var Output = class {
88716
89153
  }
88717
89154
  };
88718
89155
 
88719
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/renderer.js
89156
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/renderer.js
88720
89157
  var renderer = (node, isScreenReaderEnabled) => {
88721
89158
  if (node.yogaNode) {
88722
89159
  if (isScreenReaderEnabled) {
@@ -88772,7 +89209,7 @@ var renderer = (node, isScreenReaderEnabled) => {
88772
89209
  };
88773
89210
  var renderer_default = renderer;
88774
89211
 
88775
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/log-update.js
89212
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/log-update.js
88776
89213
  init_esm_shims();
88777
89214
 
88778
89215
  // ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
@@ -88821,7 +89258,7 @@ cliCursor.toggle = (force, writableStream) => {
88821
89258
  };
88822
89259
  var cli_cursor_default = cliCursor;
88823
89260
 
88824
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/cursor-helpers.js
89261
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/cursor-helpers.js
88825
89262
  init_esm_shims();
88826
89263
  var showCursorEscape = "\x1B[?25h";
88827
89264
  var hideCursorEscape = "\x1B[?25l";
@@ -88853,7 +89290,7 @@ var buildReturnToBottomPrefix = (cursorWasShown, previousLineCount, previousCurs
88853
89290
  return hideCursorEscape + buildReturnToBottom(previousLineCount, previousCursorPosition);
88854
89291
  };
88855
89292
 
88856
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/log-update.js
89293
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/log-update.js
88857
89294
  var visibleLineCount = (lines, str2) => str2.endsWith("\n") ? lines.length - 1 : lines.length;
88858
89295
  var createStandard = (stream2, { showCursor = false } = {}) => {
88859
89296
  let previousLineCount = 0;
@@ -89071,7 +89508,7 @@ var create2 = (stream2, { showCursor = false, incremental = false } = {}) => {
89071
89508
  var logUpdate = { create: create2 };
89072
89509
  var log_update_default = logUpdate;
89073
89510
 
89074
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/write-synchronized.js
89511
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/write-synchronized.js
89075
89512
  init_esm_shims();
89076
89513
  var bsu = "\x1B[?2026h";
89077
89514
  var esu = "\x1B[?2026l";
@@ -89079,18 +89516,18 @@ function shouldSynchronize(stream2) {
89079
89516
  return "isTTY" in stream2 && stream2.isTTY === true && !is_in_ci_default;
89080
89517
  }
89081
89518
 
89082
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/instances.js
89519
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/instances.js
89083
89520
  init_esm_shims();
89084
89521
  var instances = /* @__PURE__ */ new WeakMap();
89085
89522
  var instances_default = instances;
89086
89523
 
89087
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/App.js
89524
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/App.js
89088
89525
  init_esm_shims();
89089
89526
  var import_react14 = __toESM(require_react(), 1);
89090
89527
  import { EventEmitter as EventEmitter2 } from "events";
89091
89528
  import process12 from "process";
89092
89529
 
89093
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/input-parser.js
89530
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/input-parser.js
89094
89531
  init_esm_shims();
89095
89532
  var escape2 = "\x1B";
89096
89533
  var isCsiParameterByte = (byte) => {
@@ -89245,7 +89682,7 @@ var createInputParser = () => {
89245
89682
  };
89246
89683
  };
89247
89684
 
89248
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/AppContext.js
89685
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/AppContext.js
89249
89686
  init_esm_shims();
89250
89687
  var import_react2 = __toESM(require_react(), 1);
89251
89688
  var AppContext = (0, import_react2.createContext)({
@@ -89255,7 +89692,7 @@ var AppContext = (0, import_react2.createContext)({
89255
89692
  AppContext.displayName = "InternalAppContext";
89256
89693
  var AppContext_default = AppContext;
89257
89694
 
89258
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/StdinContext.js
89695
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/StdinContext.js
89259
89696
  init_esm_shims();
89260
89697
  var import_react3 = __toESM(require_react(), 1);
89261
89698
  import { EventEmitter } from "events";
@@ -89273,7 +89710,7 @@ var StdinContext = (0, import_react3.createContext)({
89273
89710
  StdinContext.displayName = "InternalStdinContext";
89274
89711
  var StdinContext_default = StdinContext;
89275
89712
 
89276
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/StdoutContext.js
89713
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/StdoutContext.js
89277
89714
  init_esm_shims();
89278
89715
  var import_react4 = __toESM(require_react(), 1);
89279
89716
  import process10 from "process";
@@ -89285,7 +89722,7 @@ var StdoutContext = (0, import_react4.createContext)({
89285
89722
  StdoutContext.displayName = "InternalStdoutContext";
89286
89723
  var StdoutContext_default = StdoutContext;
89287
89724
 
89288
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/StderrContext.js
89725
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/StderrContext.js
89289
89726
  init_esm_shims();
89290
89727
  var import_react5 = __toESM(require_react(), 1);
89291
89728
  import process11 from "process";
@@ -89297,7 +89734,7 @@ var StderrContext = (0, import_react5.createContext)({
89297
89734
  StderrContext.displayName = "InternalStderrContext";
89298
89735
  var StderrContext_default = StderrContext;
89299
89736
 
89300
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/FocusContext.js
89737
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/FocusContext.js
89301
89738
  init_esm_shims();
89302
89739
  var import_react6 = __toESM(require_react(), 1);
89303
89740
  var FocusContext = (0, import_react6.createContext)({
@@ -89324,7 +89761,7 @@ var FocusContext = (0, import_react6.createContext)({
89324
89761
  FocusContext.displayName = "InternalFocusContext";
89325
89762
  var FocusContext_default = FocusContext;
89326
89763
 
89327
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/CursorContext.js
89764
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/CursorContext.js
89328
89765
  init_esm_shims();
89329
89766
  var import_react7 = __toESM(require_react(), 1);
89330
89767
  var CursorContext = (0, import_react7.createContext)({
@@ -89334,11 +89771,11 @@ var CursorContext = (0, import_react7.createContext)({
89334
89771
  CursorContext.displayName = "InternalCursorContext";
89335
89772
  var CursorContext_default = CursorContext;
89336
89773
 
89337
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorBoundary.js
89774
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorBoundary.js
89338
89775
  init_esm_shims();
89339
89776
  var import_react13 = __toESM(require_react(), 1);
89340
89777
 
89341
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorOverview.js
89778
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorOverview.js
89342
89779
  init_esm_shims();
89343
89780
  var import_react12 = __toESM(require_react(), 1);
89344
89781
  var import_stack_utils = __toESM(require_stack_utils(), 1);
@@ -89381,23 +89818,23 @@ var codeExcerpt = (source2, line, options = {}) => {
89381
89818
  };
89382
89819
  var dist_default3 = codeExcerpt;
89383
89820
 
89384
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Box.js
89821
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Box.js
89385
89822
  init_esm_shims();
89386
89823
  var import_react10 = __toESM(require_react(), 1);
89387
89824
 
89388
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/AccessibilityContext.js
89825
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/AccessibilityContext.js
89389
89826
  init_esm_shims();
89390
89827
  var import_react8 = __toESM(require_react(), 1);
89391
89828
  var accessibilityContext = (0, import_react8.createContext)({
89392
89829
  isScreenReaderEnabled: false
89393
89830
  });
89394
89831
 
89395
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/BackgroundContext.js
89832
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/BackgroundContext.js
89396
89833
  init_esm_shims();
89397
89834
  var import_react9 = __toESM(require_react(), 1);
89398
89835
  var backgroundContext = (0, import_react9.createContext)(void 0);
89399
89836
 
89400
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Box.js
89837
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Box.js
89401
89838
  var Box = (0, import_react10.forwardRef)(({ children, backgroundColor, "aria-label": ariaLabel, "aria-hidden": ariaHidden, "aria-role": role, "aria-state": ariaState, ...style }, ref) => {
89402
89839
  const { isScreenReaderEnabled } = (0, import_react10.useContext)(accessibilityContext);
89403
89840
  const label = ariaLabel ? import_react10.default.createElement("ink-text", null, ariaLabel) : void 0;
@@ -89425,7 +89862,7 @@ var Box = (0, import_react10.forwardRef)(({ children, backgroundColor, "aria-lab
89425
89862
  Box.displayName = "Box";
89426
89863
  var Box_default = Box;
89427
89864
 
89428
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Text.js
89865
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Text.js
89429
89866
  init_esm_shims();
89430
89867
  var import_react11 = __toESM(require_react(), 1);
89431
89868
  function Text({ color: color2, backgroundColor, dimColor = false, bold = false, italic = false, underline = false, strikethrough = false, inverse = false, wrap = "wrap", children, "aria-label": ariaLabel, "aria-hidden": ariaHidden = false }) {
@@ -89469,7 +89906,7 @@ function Text({ color: color2, backgroundColor, dimColor = false, bold = false,
89469
89906
  return import_react11.default.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row", textWrap: wrap }, internal_transform: transform2 }, isScreenReaderEnabled && ariaLabel ? ariaLabel : children);
89470
89907
  }
89471
89908
 
89472
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorOverview.js
89909
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorOverview.js
89473
89910
  var cleanupPath = (path43) => {
89474
89911
  return path43?.replace(`file://${cwd()}/`, "");
89475
89912
  };
@@ -89578,7 +90015,7 @@ function ErrorOverview({ error: error51 }) {
89578
90015
  );
89579
90016
  }
89580
90017
 
89581
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorBoundary.js
90018
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorBoundary.js
89582
90019
  var ErrorBoundary = class extends import_react13.PureComponent {
89583
90020
  static displayName = "InternalErrorBoundary";
89584
90021
  static getDerivedStateFromError(error51) {
@@ -89598,7 +90035,7 @@ var ErrorBoundary = class extends import_react13.PureComponent {
89598
90035
  }
89599
90036
  };
89600
90037
 
89601
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/App.js
90038
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/App.js
89602
90039
  var tab = " ";
89603
90040
  var shiftTab = "\x1B[Z";
89604
90041
  var escape3 = "\x1B";
@@ -89932,7 +90369,7 @@ function App({ children, stdin, stdout, stderr, writeToStdout, writeToStderr, ex
89932
90369
  App.displayName = "InternalApp";
89933
90370
  var App_default = App;
89934
90371
 
89935
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/kitty-keyboard.js
90372
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/kitty-keyboard.js
89936
90373
  init_esm_shims();
89937
90374
  var kittyFlags = {
89938
90375
  disambiguateEscapeCodes: 1,
@@ -89959,7 +90396,7 @@ var kittyModifiers = {
89959
90396
  numLock: 128
89960
90397
  };
89961
90398
 
89962
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
90399
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
89963
90400
  var noop4 = () => {
89964
90401
  };
89965
90402
  var kittyQueryEscapeByte = 27;
@@ -90040,6 +90477,27 @@ var Ink = class {
90040
90477
  // This variable is used only in debug mode to store full static output
90041
90478
  // so that it's rerendered every time, not just new static parts, like in non-debug mode
90042
90479
  fullStaticOutput;
90480
+ // [gg patch] Raw bytes queued via insertBeforeFrame(), folded atomically into the
90481
+ // next frame write. Invariant: every write that shrinks the live frame must carry
90482
+ // compensating scrollback bytes, otherwise the frame bottom (footer) jumps up.
90483
+ pendingFrameInsert;
90484
+ // [gg patch] Blank pad rows currently sitting directly above the frame
90485
+ // (written by anchorFrameToBottom on net shrink). Consumed by the next
90486
+ // net-growth write, which overwrites them instead of scrolling.
90487
+ framePadDebt = 0;
90488
+ // [gg patch] Runtime gate for pad CREATION (consumption always runs).
90489
+ // The app toggles this via setFrameAnchorActive(): on while the agent
90490
+ // runs (footer must not jump), off at idle so symmetric UI shrink
90491
+ // (slash menu close, etc.) lets the footer return up naturally.
90492
+ frameAnchorActive = true;
90493
+ // [gg patch] Content rows currently visible ABOVE the live frame on the
90494
+ // screen (excludes scrollback). Lets idle shrink know whether the frame
90495
+ // bottom is pinned at the screen bottom (shrink would strand dead rows).
90496
+ linesAboveFrame = 0;
90497
+ // [gg patch] App-provided callback: given a row count, return that many
90498
+ // hard-wrapped transcript-tail rows (newline-joined) to backfill vacated
90499
+ // rows on a bottom-pinned idle shrink. Undefined → footer rises (default).
90500
+ frameShrinkBackfill = void 0;
90043
90501
  exitPromise;
90044
90502
  exitResult;
90045
90503
  beforeExitHandler;
@@ -90099,6 +90557,7 @@ var Ink = class {
90099
90557
  this.lastOutputHeight = 0;
90100
90558
  this.lastTerminalWidth = this.getTerminalWidth();
90101
90559
  this.fullStaticOutput = "";
90560
+ this.pendingFrameInsert = "";
90102
90561
  const rootTag = options.concurrent ? import_constants4.ConcurrentRoot : import_constants4.LegacyRoot;
90103
90562
  this.container = reconciler_default.createContainer(this.rootNode, rootTag, null, false, null, "id", () => {
90104
90563
  }, () => {
@@ -90174,17 +90633,30 @@ var Ink = class {
90174
90633
  return;
90175
90634
  }
90176
90635
  const startTime = performance.now();
90177
- const { output, outputHeight, staticOutput } = renderer_default(this.rootNode, this.isScreenReaderEnabled);
90636
+ let { output, outputHeight, staticOutput } = renderer_default(this.rootNode, this.isScreenReaderEnabled);
90178
90637
  this.options.onRender?.({ renderTime: performance.now() - startTime });
90638
+ if (this.options.clipFrameToTerminalHeight && this.options.stdout.isTTY && !this.isScreenReaderEnabled && !this.options.debug && !is_in_ci_default) {
90639
+ const maxRows = Math.max(1, this.options.stdout.rows - 2);
90640
+ if (outputHeight > maxRows) {
90641
+ output = output.split("\n").slice(-maxRows).join("\n");
90642
+ outputHeight = maxRows;
90643
+ }
90644
+ }
90179
90645
  const hasStaticOutput = staticOutput && staticOutput !== "\n";
90646
+ const frameInsert = this.pendingFrameInsert;
90647
+ this.pendingFrameInsert = "";
90648
+ const hasFrameInsert = frameInsert !== "";
90180
90649
  if (this.options.debug) {
90181
90650
  if (hasStaticOutput) {
90182
90651
  this.fullStaticOutput += staticOutput;
90183
90652
  }
90184
- this.options.stdout.write(this.fullStaticOutput + output);
90653
+ this.options.stdout.write(frameInsert + this.fullStaticOutput + output);
90185
90654
  return;
90186
90655
  }
90187
90656
  if (is_in_ci_default) {
90657
+ if (hasFrameInsert) {
90658
+ this.options.stdout.write(frameInsert);
90659
+ }
90188
90660
  if (hasStaticOutput) {
90189
90661
  this.options.stdout.write(staticOutput);
90190
90662
  }
@@ -90198,23 +90670,23 @@ var Ink = class {
90198
90670
  if (sync) {
90199
90671
  this.options.stdout.write(bsu);
90200
90672
  }
90201
- if (hasStaticOutput) {
90673
+ if (hasStaticOutput || hasFrameInsert) {
90202
90674
  const erase = this.lastOutputHeight > 0 ? base_exports.eraseLines(this.lastOutputHeight) : "";
90203
- this.options.stdout.write(erase + staticOutput);
90675
+ this.options.stdout.write(erase + frameInsert + (hasStaticOutput ? staticOutput : ""));
90204
90676
  this.lastOutputHeight = 0;
90205
90677
  }
90206
- if (output === this.lastOutput && !hasStaticOutput) {
90678
+ if (output === this.lastOutput && !hasStaticOutput && !hasFrameInsert) {
90207
90679
  if (sync) {
90208
90680
  this.options.stdout.write(esu);
90209
90681
  }
90210
90682
  return;
90211
90683
  }
90212
90684
  const terminalWidth = this.getTerminalWidth();
90213
- const wrappedOutput = wrapAnsi(output, terminalWidth, {
90685
+ const wrappedOutput = wrapAnsi2(output, terminalWidth, {
90214
90686
  trim: false,
90215
90687
  hard: true
90216
90688
  });
90217
- if (hasStaticOutput) {
90689
+ if (hasStaticOutput || hasFrameInsert) {
90218
90690
  this.options.stdout.write(wrappedOutput);
90219
90691
  } else {
90220
90692
  const erase = this.lastOutputHeight > 0 ? base_exports.eraseLines(this.lastOutputHeight) : "";
@@ -90233,12 +90705,83 @@ var Ink = class {
90233
90705
  }
90234
90706
  const isFullscreen = this.options.stdout.isTTY && outputHeight >= this.options.stdout.rows;
90235
90707
  const outputToRender = isFullscreen ? output : output + "\n";
90708
+ let framePad = "";
90709
+ let padConsumeRows = 0;
90710
+ let backfillText = "";
90711
+ let backfillRows = 0;
90712
+ let doBackfillRepaint = false;
90713
+ if (this.options.anchorFrameToBottom && this.options.stdout.isTTY && !isFullscreen && this.lastOutputHeight > 0) {
90714
+ const insertLineCount = hasFrameInsert ? (frameInsert.match(/\n/g) ?? []).length : 0;
90715
+ const staticLineCount = hasStaticOutput ? (staticOutput.match(/\n/g) ?? []).length : 0;
90716
+ const delta = insertLineCount + staticLineCount + outputHeight - this.lastOutputHeight;
90717
+ const prevDebt = Math.min(this.framePadDebt, Math.max(0, this.options.stdout.rows - 2));
90718
+ const bottomPinned = this.linesAboveFrame + Math.max(this.lastOutputHeight, outputHeight) + 1 >= this.options.stdout.rows;
90719
+ if (!this.frameAnchorActive && delta !== 0 && bottomPinned && typeof this.frameShrinkBackfill === "function") {
90720
+ const needRows = Math.max(0, this.options.stdout.rows - outputHeight - 1);
90721
+ let fill;
90722
+ try {
90723
+ fill = needRows > 0 ? this.frameShrinkBackfill(needRows) : "";
90724
+ } catch {
90725
+ fill = void 0;
90726
+ }
90727
+ if (typeof fill === "string") {
90728
+ backfillText = fill === "" || fill.endsWith("\n") ? fill : fill + "\n";
90729
+ backfillRows = (backfillText.match(/\n/g) ?? []).length;
90730
+ doBackfillRepaint = true;
90731
+ padConsumeRows = 0;
90732
+ this.framePadDebt = 0;
90733
+ }
90734
+ }
90735
+ if (!doBackfillRepaint && (delta !== 0 && (this.frameAnchorActive || prevDebt > 0) || (hasFrameInsert || hasStaticOutput) && prevDebt > 0)) {
90736
+ const newDebt = this.frameAnchorActive ? Math.max(0, prevDebt - delta) : Math.min(prevDebt, Math.max(0, prevDebt - delta));
90737
+ padConsumeRows = prevDebt;
90738
+ framePad = newDebt > 0 ? "\n".repeat(newDebt) : "";
90739
+ this.framePadDebt = newDebt;
90740
+ }
90741
+ if (process13.env["GG_INK_DEBUG"] === "1" && (delta !== 0 || this.framePadDebt > 0)) {
90742
+ try {
90743
+ fs31.appendFileSync("/tmp/gg-ink-debug.log", JSON.stringify({
90744
+ t: Date.now() % 1e5,
90745
+ delta,
90746
+ ins: insertLineCount,
90747
+ out: outputHeight,
90748
+ last: this.lastOutputHeight,
90749
+ pad: framePad.length,
90750
+ consume: padConsumeRows,
90751
+ debt: this.framePadDebt,
90752
+ insHead: hasFrameInsert ? JSON.stringify(frameInsert.slice(0, 60)) : ""
90753
+ }) + "\n");
90754
+ } catch {
90755
+ }
90756
+ }
90757
+ }
90758
+ const hasFramePad = framePad !== "";
90759
+ const hasBackfill = doBackfillRepaint;
90760
+ const hasPadConsume = padConsumeRows > 0;
90761
+ if (hasBackfill) {
90762
+ const sync = shouldSynchronize(this.options.stdout);
90763
+ if (sync) {
90764
+ this.options.stdout.write(bsu);
90765
+ }
90766
+ this.options.stdout.write(frameInsert + base_exports.cursorTo(0, 0) + base_exports.eraseDown + backfillText + outputToRender);
90767
+ this.lastOutput = output;
90768
+ this.lastOutputToRender = outputToRender;
90769
+ this.lastOutputHeight = outputHeight;
90770
+ this.log.sync(outputToRender);
90771
+ if (sync) {
90772
+ this.options.stdout.write(esu);
90773
+ }
90774
+ this.linesAboveFrame = backfillRows;
90775
+ return;
90776
+ }
90777
+ const rowsAddedAboveFrame = (hasFrameInsert ? (frameInsert.match(/\n/g) ?? []).length : 0) + (hasStaticOutput ? (staticOutput.match(/\n/g) ?? []).length : 0) + (hasFramePad ? framePad.length : 0) - padConsumeRows;
90236
90778
  if (isFullscreen && this.lastOutputHeight >= this.options.stdout.rows) {
90237
90779
  const sync = shouldSynchronize(this.options.stdout);
90238
90780
  if (sync) {
90239
90781
  this.options.stdout.write(bsu);
90240
90782
  }
90241
- this.options.stdout.write(base_exports.eraseScreen + base_exports.cursorTo(0, 0) + this.fullStaticOutput + output);
90783
+ this.framePadDebt = 0;
90784
+ this.options.stdout.write(frameInsert + base_exports.cursorTo(0, 0) + base_exports.eraseDown + this.fullStaticOutput + output);
90242
90785
  this.lastOutput = output;
90243
90786
  this.lastOutputToRender = outputToRender;
90244
90787
  this.lastOutputHeight = outputHeight;
@@ -90248,13 +90791,16 @@ var Ink = class {
90248
90791
  }
90249
90792
  return;
90250
90793
  }
90251
- if (hasStaticOutput) {
90794
+ if (hasStaticOutput || hasFrameInsert || hasFramePad || hasPadConsume) {
90252
90795
  const sync = shouldSynchronize(this.options.stdout);
90253
90796
  if (sync) {
90254
90797
  this.options.stdout.write(bsu);
90255
90798
  }
90256
90799
  this.log.clear();
90257
- this.options.stdout.write(staticOutput);
90800
+ if (hasPadConsume) {
90801
+ this.options.stdout.write(base_exports.cursorUp(padConsumeRows));
90802
+ }
90803
+ this.options.stdout.write(frameInsert + (hasStaticOutput ? staticOutput : "") + framePad);
90258
90804
  this.log(outputToRender);
90259
90805
  if (sync) {
90260
90806
  this.options.stdout.write(esu);
@@ -90262,6 +90808,11 @@ var Ink = class {
90262
90808
  } else if (output !== this.lastOutput || this.log.isCursorDirty()) {
90263
90809
  this.throttledLog(outputToRender);
90264
90810
  }
90811
+ this.linesAboveFrame = Math.max(0, this.linesAboveFrame + rowsAddedAboveFrame);
90812
+ const maxAbove = Math.max(0, this.options.stdout.rows - outputHeight);
90813
+ if (this.linesAboveFrame + outputHeight > this.options.stdout.rows) {
90814
+ this.linesAboveFrame = maxAbove;
90815
+ }
90265
90816
  this.lastOutput = output;
90266
90817
  this.lastOutputToRender = outputToRender;
90267
90818
  this.lastOutputHeight = outputHeight;
@@ -90279,6 +90830,32 @@ var Ink = class {
90279
90830
  reconciler_default.flushSyncWork();
90280
90831
  }
90281
90832
  }
90833
+ // [gg patch] Toggle pad creation at runtime. See frameAnchorActive.
90834
+ setFrameAnchorActive(active) {
90835
+ this.frameAnchorActive = active;
90836
+ }
90837
+ // [gg patch] Install the transcript-tail provider. See frameShrinkBackfill.
90838
+ setFrameShrinkBackfill(fn) {
90839
+ this.frameShrinkBackfill = fn;
90840
+ }
90841
+ // [gg patch] Queue raw bytes to be written into scrollback atomically with the
90842
+ // next frame paint (mirrors Ink's <Static> output handling). Used by the app's
90843
+ // transcript flush so the frame shrink and the scrollback insert land in one write.
90844
+ insertBeforeFrame(data) {
90845
+ if (this.isUnmounted) {
90846
+ return;
90847
+ }
90848
+ if (this.options.debug || is_in_ci_default || !this.options.stdout.isTTY) {
90849
+ this.options.stdout.write(data);
90850
+ return;
90851
+ }
90852
+ this.pendingFrameInsert += data;
90853
+ setTimeout(() => {
90854
+ if (this.pendingFrameInsert && !this.isUnmounted) {
90855
+ this.onRender();
90856
+ }
90857
+ }, 100);
90858
+ }
90282
90859
  writeToStdout(data) {
90283
90860
  if (this.isUnmounted) {
90284
90861
  return;
@@ -90301,6 +90878,10 @@ var Ink = class {
90301
90878
  if (sync) {
90302
90879
  this.options.stdout.write(esu);
90303
90880
  }
90881
+ if (data.includes("\n")) {
90882
+ this.framePadDebt = 0;
90883
+ this.linesAboveFrame = Math.min(this.linesAboveFrame + (data.match(/\n/g) ?? []).length, Math.max(0, this.options.stdout.rows - this.lastOutputHeight));
90884
+ }
90304
90885
  }
90305
90886
  writeToStderr(data) {
90306
90887
  if (this.isUnmounted) {
@@ -90325,6 +90906,10 @@ var Ink = class {
90325
90906
  if (sync) {
90326
90907
  this.options.stdout.write(esu);
90327
90908
  }
90909
+ if (data.includes("\n")) {
90910
+ this.framePadDebt = 0;
90911
+ this.linesAboveFrame = Math.min(this.linesAboveFrame + (data.match(/\n/g) ?? []).length, Math.max(0, this.options.stdout.rows - this.lastOutputHeight));
90912
+ }
90328
90913
  }
90329
90914
  // eslint-disable-next-line @typescript-eslint/ban-types
90330
90915
  unmount(error51) {
@@ -90356,6 +90941,13 @@ var Ink = class {
90356
90941
  this.onRender();
90357
90942
  }
90358
90943
  }
90944
+ if (this.pendingFrameInsert) {
90945
+ const pendingInsert = this.pendingFrameInsert;
90946
+ this.pendingFrameInsert = "";
90947
+ if (canWriteToStdout) {
90948
+ this.options.stdout.write(pendingInsert);
90949
+ }
90950
+ }
90359
90951
  this.isUnmounted = true;
90360
90952
  this.unsubscribeExit();
90361
90953
  if (typeof this.restoreConsole === "function") {
@@ -90425,6 +91017,7 @@ var Ink = class {
90425
91017
  if (!is_in_ci_default && !this.options.debug) {
90426
91018
  this.log.clear();
90427
91019
  this.log.sync(this.lastOutputToRender || this.lastOutput + "\n");
91020
+ this.framePadDebt = 0;
90428
91021
  }
90429
91022
  }
90430
91023
  patchConsole() {
@@ -90500,7 +91093,7 @@ var Ink = class {
90500
91093
  }
90501
91094
  };
90502
91095
 
90503
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render.js
91096
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render.js
90504
91097
  var render = (node, options) => {
90505
91098
  const inkOptions = {
90506
91099
  stdout: process14.stdout,
@@ -90523,7 +91116,15 @@ var render = (node, options) => {
90523
91116
  },
90524
91117
  waitUntilExit: instance.waitUntilExit,
90525
91118
  cleanup: () => instances_default.delete(inkOptions.stdout),
90526
- clear: instance.clear
91119
+ clear: instance.clear,
91120
+ // [gg patch] Queue raw bytes to be written into scrollback atomically with
91121
+ // the next frame paint. See Ink#insertBeforeFrame in build/ink.js.
91122
+ insertBeforeFrame: instance.insertBeforeFrame,
91123
+ // [gg patch] Toggle bottom-anchor pad creation (on while agent runs).
91124
+ setFrameAnchorActive: instance.setFrameAnchorActive,
91125
+ // [gg patch] Install the transcript-tail backfill provider for
91126
+ // bottom-pinned idle shrink (slash menu close).
91127
+ setFrameShrinkBackfill: instance.setFrameShrinkBackfill
90527
91128
  };
90528
91129
  };
90529
91130
  var render_default = render;
@@ -90547,31 +91148,31 @@ var getInstance = (stdout, createInstance, concurrent) => {
90547
91148
  return instance;
90548
91149
  };
90549
91150
 
90550
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-to-string.js
91151
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-to-string.js
90551
91152
  init_esm_shims();
90552
91153
  var import_constants5 = __toESM(require_constants(), 1);
90553
91154
 
90554
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Static.js
91155
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Static.js
90555
91156
  init_esm_shims();
90556
91157
  var import_react16 = __toESM(require_react(), 1);
90557
91158
 
90558
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Transform.js
91159
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Transform.js
90559
91160
  init_esm_shims();
90560
91161
  var import_react17 = __toESM(require_react(), 1);
90561
91162
 
90562
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Newline.js
91163
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Newline.js
90563
91164
  init_esm_shims();
90564
91165
  var import_react18 = __toESM(require_react(), 1);
90565
91166
 
90566
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Spacer.js
91167
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Spacer.js
90567
91168
  init_esm_shims();
90568
91169
  var import_react19 = __toESM(require_react(), 1);
90569
91170
 
90570
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-input.js
91171
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-input.js
90571
91172
  init_esm_shims();
90572
91173
  var import_react21 = __toESM(require_react(), 1);
90573
91174
 
90574
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/parse-keypress.js
91175
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/parse-keypress.js
90575
91176
  init_esm_shims();
90576
91177
  import { Buffer as Buffer2 } from "buffer";
90577
91178
  var metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/;
@@ -91001,13 +91602,13 @@ var parseKeypress = (s = "") => {
91001
91602
  };
91002
91603
  var parse_keypress_default = parseKeypress;
91003
91604
 
91004
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-stdin.js
91605
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-stdin.js
91005
91606
  init_esm_shims();
91006
91607
  var import_react20 = __toESM(require_react(), 1);
91007
91608
  var useStdin = () => (0, import_react20.useContext)(StdinContext_default);
91008
91609
  var use_stdin_default = useStdin;
91009
91610
 
91010
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-input.js
91611
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-input.js
91011
91612
  var useInput = (inputHandler, options = {}) => {
91012
91613
  const { stdin, setRawMode, internal_exitOnCtrlC, internal_eventEmitter } = use_stdin_default();
91013
91614
  (0, import_react21.useEffect)(() => {
@@ -91090,31 +91691,31 @@ var useInput = (inputHandler, options = {}) => {
91090
91691
  };
91091
91692
  var use_input_default = useInput;
91092
91693
 
91093
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-app.js
91694
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-app.js
91094
91695
  init_esm_shims();
91095
91696
  var import_react22 = __toESM(require_react(), 1);
91096
91697
  var useApp = () => (0, import_react22.useContext)(AppContext_default);
91097
91698
  var use_app_default = useApp;
91098
91699
 
91099
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-stdout.js
91700
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-stdout.js
91100
91701
  init_esm_shims();
91101
91702
  var import_react23 = __toESM(require_react(), 1);
91102
91703
  var useStdout = () => (0, import_react23.useContext)(StdoutContext_default);
91103
91704
  var use_stdout_default = useStdout;
91104
91705
 
91105
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-stderr.js
91706
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-stderr.js
91106
91707
  init_esm_shims();
91107
91708
  var import_react24 = __toESM(require_react(), 1);
91108
91709
 
91109
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-focus.js
91710
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-focus.js
91110
91711
  init_esm_shims();
91111
91712
  var import_react25 = __toESM(require_react(), 1);
91112
91713
 
91113
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-focus-manager.js
91714
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-focus-manager.js
91114
91715
  init_esm_shims();
91115
91716
  var import_react26 = __toESM(require_react(), 1);
91116
91717
 
91117
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js
91718
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js
91118
91719
  init_esm_shims();
91119
91720
  var import_react27 = __toESM(require_react(), 1);
91120
91721
  var useIsScreenReaderEnabled = () => {
@@ -91123,11 +91724,11 @@ var useIsScreenReaderEnabled = () => {
91123
91724
  };
91124
91725
  var use_is_screen_reader_enabled_default = useIsScreenReaderEnabled;
91125
91726
 
91126
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-cursor.js
91727
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-cursor.js
91127
91728
  init_esm_shims();
91128
91729
  var import_react28 = __toESM(require_react(), 1);
91129
91730
 
91130
- // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/measure-element.js
91731
+ // ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/measure-element.js
91131
91732
  init_esm_shims();
91132
91733
  var measureElement = (node) => ({
91133
91734
  width: node.yogaNode?.getComputedWidth() ?? 0,
@@ -92298,427 +92899,6 @@ function toolAccentColor(theme, name) {
92298
92899
 
92299
92900
  // ../ggcoder/dist/ui/terminal-history-format.js
92300
92901
  init_esm_shims();
92301
-
92302
- // ../../node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.js
92303
- init_esm_shims();
92304
- var segmenter4 = new Intl.Segmenter();
92305
- var zeroWidthClusterRegex2 = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$", "v");
92306
- var leadingNonPrintingRegex2 = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
92307
- var rgiEmojiRegex2 = new RegExp("^\\p{RGI_Emoji}$", "v");
92308
- var unqualifiedKeycapRegex2 = /^[\d#*]\u20E3$/;
92309
- var extendedPictographicRegex2 = new RegExp("\\p{Extended_Pictographic}", "gu");
92310
- function isDoubleWidthNonRgiEmojiSequence2(segment) {
92311
- if (segment.length > 50) {
92312
- return false;
92313
- }
92314
- if (unqualifiedKeycapRegex2.test(segment)) {
92315
- return true;
92316
- }
92317
- if (segment.includes("\u200D")) {
92318
- const pictographics = segment.match(extendedPictographicRegex2);
92319
- return pictographics !== null && pictographics.length >= 2;
92320
- }
92321
- return false;
92322
- }
92323
- function baseVisible2(segment) {
92324
- return segment.replace(leadingNonPrintingRegex2, "");
92325
- }
92326
- function isZeroWidthCluster2(segment) {
92327
- return zeroWidthClusterRegex2.test(segment);
92328
- }
92329
- function trailingHalfwidthWidth2(segment, eastAsianWidthOptions) {
92330
- let extra = 0;
92331
- if (segment.length > 1) {
92332
- for (const char of segment.slice(1)) {
92333
- if (char >= "\uFF00" && char <= "\uFFEF") {
92334
- extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
92335
- }
92336
- }
92337
- }
92338
- return extra;
92339
- }
92340
- function stringWidth3(input, options = {}) {
92341
- if (typeof input !== "string" || input.length === 0) {
92342
- return 0;
92343
- }
92344
- const {
92345
- ambiguousIsNarrow = true,
92346
- countAnsiEscapeCodes = false
92347
- } = options;
92348
- let string4 = input;
92349
- if (!countAnsiEscapeCodes && (string4.includes("\x1B") || string4.includes("\x9B"))) {
92350
- string4 = stripAnsi(string4);
92351
- }
92352
- if (string4.length === 0) {
92353
- return 0;
92354
- }
92355
- if (/^[\u0020-\u007E]*$/.test(string4)) {
92356
- return string4.length;
92357
- }
92358
- let width = 0;
92359
- const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
92360
- for (const { segment } of segmenter4.segment(string4)) {
92361
- if (isZeroWidthCluster2(segment)) {
92362
- continue;
92363
- }
92364
- if (rgiEmojiRegex2.test(segment) || isDoubleWidthNonRgiEmojiSequence2(segment)) {
92365
- width += 2;
92366
- continue;
92367
- }
92368
- const codePoint = baseVisible2(segment).codePointAt(0);
92369
- width += eastAsianWidth(codePoint, eastAsianWidthOptions);
92370
- width += trailingHalfwidthWidth2(segment, eastAsianWidthOptions);
92371
- }
92372
- return width;
92373
- }
92374
-
92375
- // ../../node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.js
92376
- init_esm_shims();
92377
- var ANSI_ESCAPE = "\x1B";
92378
- var ANSI_ESCAPE_CSI = "\x9B";
92379
- var ESCAPES4 = /* @__PURE__ */ new Set([
92380
- ANSI_ESCAPE,
92381
- ANSI_ESCAPE_CSI
92382
- ]);
92383
- var ANSI_ESCAPE_BELL2 = "\x07";
92384
- var ANSI_CSI3 = "[";
92385
- var ANSI_OSC3 = "]";
92386
- var ANSI_SGR_TERMINATOR3 = "m";
92387
- var ANSI_SGR_RESET = 0;
92388
- var ANSI_SGR_RESET_FOREGROUND = 39;
92389
- var ANSI_SGR_RESET_BACKGROUND = 49;
92390
- var ANSI_SGR_RESET_UNDERLINE_COLOR = 59;
92391
- var ANSI_SGR_FOREGROUND_EXTENDED = 38;
92392
- var ANSI_SGR_BACKGROUND_EXTENDED = 48;
92393
- var ANSI_SGR_UNDERLINE_COLOR_EXTENDED = 58;
92394
- var ANSI_SGR_COLOR_MODE_256 = 5;
92395
- var ANSI_SGR_COLOR_MODE_RGB = 2;
92396
- var ANSI_ESCAPE_LINK2 = `${ANSI_OSC3}8;;`;
92397
- var ANSI_ESCAPE_REGEX = new RegExp(`^\\u001B(?:\\${ANSI_CSI3}(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR3}|${ANSI_ESCAPE_LINK2}(?<uri>[^\\u0007\\u001B]*)(?:\\u0007|\\u001B\\\\))`);
92398
- var ANSI_ESCAPE_CSI_REGEX = new RegExp(`^\\u009B(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR3}`);
92399
- var ANSI_SGR_MODIFIER_CLOSE_CODES = new Set(ansi_styles_default.codes.values());
92400
- ANSI_SGR_MODIFIER_CLOSE_CODES.delete(ANSI_SGR_RESET);
92401
- var segmenter5 = new Intl.Segmenter();
92402
- var getGraphemes = (string4) => Array.from(segmenter5.segment(string4), ({ segment }) => segment);
92403
- var TAB_SIZE = 8;
92404
- var wrapAnsiCode2 = (code) => `${ANSI_ESCAPE}${ANSI_CSI3}${code}${ANSI_SGR_TERMINATOR3}`;
92405
- var wrapAnsiHyperlink2 = (url2) => `${ANSI_ESCAPE}${ANSI_ESCAPE_LINK2}${url2}${ANSI_ESCAPE_BELL2}`;
92406
- var getSgrTokens = (sgrParameters) => {
92407
- const codes = sgrParameters.split(";").map((sgrParameter) => sgrParameter === "" ? ANSI_SGR_RESET : Number.parseInt(sgrParameter, 10));
92408
- const sgrTokens = [];
92409
- for (let index = 0; index < codes.length; index++) {
92410
- const code = codes[index];
92411
- if (!Number.isFinite(code)) {
92412
- continue;
92413
- }
92414
- if (code === ANSI_SGR_FOREGROUND_EXTENDED || code === ANSI_SGR_BACKGROUND_EXTENDED || code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED) {
92415
- if (index + 1 >= codes.length) {
92416
- break;
92417
- }
92418
- const mode = codes[index + 1];
92419
- if (mode === ANSI_SGR_COLOR_MODE_256 && Number.isFinite(codes[index + 2])) {
92420
- sgrTokens.push([code, mode, codes[index + 2]]);
92421
- index += 2;
92422
- continue;
92423
- }
92424
- const red = codes[index + 2];
92425
- const green = codes[index + 3];
92426
- const blue = codes[index + 4];
92427
- if (mode === ANSI_SGR_COLOR_MODE_RGB && Number.isFinite(red) && Number.isFinite(green) && Number.isFinite(blue)) {
92428
- sgrTokens.push([code, mode, red, green, blue]);
92429
- index += 4;
92430
- continue;
92431
- }
92432
- break;
92433
- }
92434
- sgrTokens.push([code]);
92435
- }
92436
- return sgrTokens;
92437
- };
92438
- var removeActiveStyle = (activeStyles, family) => {
92439
- const activeStyleIndex = activeStyles.findIndex((activeStyle) => activeStyle.family === family);
92440
- if (activeStyleIndex !== -1) {
92441
- activeStyles.splice(activeStyleIndex, 1);
92442
- }
92443
- };
92444
- var upsertActiveStyle = (activeStyles, nextActiveStyle) => {
92445
- removeActiveStyle(activeStyles, nextActiveStyle.family);
92446
- activeStyles.push(nextActiveStyle);
92447
- };
92448
- var removeModifierStylesByClose = (activeStyles, closeCode) => {
92449
- for (let index = activeStyles.length - 1; index >= 0; index--) {
92450
- const activeStyle = activeStyles[index];
92451
- if (activeStyle.family.startsWith("modifier-") && activeStyle.close === closeCode) {
92452
- activeStyles.splice(index, 1);
92453
- }
92454
- }
92455
- };
92456
- var getColorStyle = (code, sgrToken) => {
92457
- if (code >= 30 && code <= 37 || code >= 90 && code <= 97 || code === ANSI_SGR_FOREGROUND_EXTENDED && sgrToken.length > 1) {
92458
- return {
92459
- family: "foreground",
92460
- open: sgrToken.join(";"),
92461
- close: ANSI_SGR_RESET_FOREGROUND
92462
- };
92463
- }
92464
- if (code >= 40 && code <= 47 || code >= 100 && code <= 107 || code === ANSI_SGR_BACKGROUND_EXTENDED && sgrToken.length > 1) {
92465
- return {
92466
- family: "background",
92467
- open: sgrToken.join(";"),
92468
- close: ANSI_SGR_RESET_BACKGROUND
92469
- };
92470
- }
92471
- if (code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED && sgrToken.length > 1) {
92472
- return {
92473
- family: "underlineColor",
92474
- open: sgrToken.join(";"),
92475
- close: ANSI_SGR_RESET_UNDERLINE_COLOR
92476
- };
92477
- }
92478
- };
92479
- var applySgrResetCode = (code, activeStyles) => {
92480
- if (code === ANSI_SGR_RESET) {
92481
- activeStyles.length = 0;
92482
- return true;
92483
- }
92484
- if (code === ANSI_SGR_RESET_FOREGROUND) {
92485
- removeActiveStyle(activeStyles, "foreground");
92486
- return true;
92487
- }
92488
- if (code === ANSI_SGR_RESET_BACKGROUND) {
92489
- removeActiveStyle(activeStyles, "background");
92490
- return true;
92491
- }
92492
- if (code === ANSI_SGR_RESET_UNDERLINE_COLOR) {
92493
- removeActiveStyle(activeStyles, "underlineColor");
92494
- return true;
92495
- }
92496
- if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(code)) {
92497
- removeModifierStylesByClose(activeStyles, code);
92498
- return true;
92499
- }
92500
- return false;
92501
- };
92502
- var applySgrToken2 = (sgrToken, activeStyles) => {
92503
- const [code] = sgrToken;
92504
- if (applySgrResetCode(code, activeStyles)) {
92505
- return;
92506
- }
92507
- const colorStyle = getColorStyle(code, sgrToken);
92508
- if (colorStyle) {
92509
- upsertActiveStyle(activeStyles, colorStyle);
92510
- return;
92511
- }
92512
- const close = ansi_styles_default.codes.get(code);
92513
- if (close !== void 0 && close !== ANSI_SGR_RESET) {
92514
- upsertActiveStyle(activeStyles, {
92515
- family: `modifier-${code}`,
92516
- open: sgrToken.join(";"),
92517
- close
92518
- });
92519
- }
92520
- };
92521
- var applySgrParameters = (sgrParameters, activeStyles) => {
92522
- for (const sgrToken of getSgrTokens(sgrParameters)) {
92523
- applySgrToken2(sgrToken, activeStyles);
92524
- }
92525
- };
92526
- var applySgrResets = (sgrParameters, activeStyles) => {
92527
- for (const sgrToken of getSgrTokens(sgrParameters)) {
92528
- const [code] = sgrToken;
92529
- applySgrResetCode(code, activeStyles);
92530
- }
92531
- };
92532
- var applyLeadingSgrResets = (string4, activeStyles) => {
92533
- let remainder = string4;
92534
- while (remainder.length > 0) {
92535
- if (remainder.startsWith(ANSI_ESCAPE) && remainder[1] !== "\\") {
92536
- const match = ANSI_ESCAPE_REGEX.exec(remainder);
92537
- if (!match) {
92538
- break;
92539
- }
92540
- if (match.groups.sgr !== void 0) {
92541
- applySgrResets(match.groups.sgr, activeStyles);
92542
- }
92543
- remainder = remainder.slice(match[0].length);
92544
- continue;
92545
- }
92546
- if (remainder.startsWith(ANSI_ESCAPE_CSI)) {
92547
- const match = ANSI_ESCAPE_CSI_REGEX.exec(remainder);
92548
- if (!match || match.groups.sgr === void 0) {
92549
- break;
92550
- }
92551
- applySgrResets(match.groups.sgr, activeStyles);
92552
- remainder = remainder.slice(match[0].length);
92553
- continue;
92554
- }
92555
- break;
92556
- }
92557
- };
92558
- var getClosingSgrSequence = (activeStyles) => [...activeStyles].reverse().map((activeStyle) => wrapAnsiCode2(activeStyle.close)).join("");
92559
- var getOpeningSgrSequence = (activeStyles) => activeStyles.map((activeStyle) => wrapAnsiCode2(activeStyle.open)).join("");
92560
- var wordLengths2 = (string4) => string4.split(" ").map((word) => stringWidth3(word));
92561
- var wrapWord2 = (rows, word, columns) => {
92562
- const characters = getGraphemes(word);
92563
- let isInsideEscape = false;
92564
- let isInsideLinkEscape = false;
92565
- let visible = stringWidth3(stripAnsi(rows.at(-1)));
92566
- for (const [index, character] of characters.entries()) {
92567
- const characterLength = stringWidth3(character);
92568
- if (visible + characterLength <= columns) {
92569
- rows[rows.length - 1] += character;
92570
- } else {
92571
- rows.push(character);
92572
- visible = 0;
92573
- }
92574
- if (ESCAPES4.has(character) && !(isInsideLinkEscape && character === ANSI_ESCAPE && characters[index + 1] === "\\")) {
92575
- isInsideEscape = true;
92576
- const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK2.length).join("");
92577
- isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK2;
92578
- }
92579
- if (isInsideEscape) {
92580
- if (isInsideLinkEscape) {
92581
- if (character === ANSI_ESCAPE_BELL2 || character === "\\" && index > 0 && characters[index - 1] === ANSI_ESCAPE) {
92582
- isInsideEscape = false;
92583
- isInsideLinkEscape = false;
92584
- }
92585
- } else if (character === ANSI_SGR_TERMINATOR3) {
92586
- isInsideEscape = false;
92587
- }
92588
- continue;
92589
- }
92590
- visible += characterLength;
92591
- if (visible === columns && index < characters.length - 1) {
92592
- rows.push("");
92593
- visible = 0;
92594
- }
92595
- }
92596
- if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
92597
- rows[rows.length - 2] += rows.pop();
92598
- }
92599
- };
92600
- var stringVisibleTrimSpacesRight2 = (string4) => {
92601
- const words = string4.split(" ");
92602
- let last = words.length;
92603
- while (last > 0) {
92604
- if (stringWidth3(words[last - 1]) > 0) {
92605
- break;
92606
- }
92607
- last--;
92608
- }
92609
- if (last === words.length) {
92610
- return string4;
92611
- }
92612
- return words.slice(0, last).join(" ") + words.slice(last).join("");
92613
- };
92614
- var expandTabs = (line) => {
92615
- if (!line.includes(" ")) {
92616
- return line;
92617
- }
92618
- const segments = line.split(" ");
92619
- let visible = 0;
92620
- let expandedLine = "";
92621
- for (const [index, segment] of segments.entries()) {
92622
- expandedLine += segment;
92623
- visible += stringWidth3(segment);
92624
- if (index < segments.length - 1) {
92625
- const spaces = TAB_SIZE - visible % TAB_SIZE;
92626
- expandedLine += " ".repeat(spaces);
92627
- visible += spaces;
92628
- }
92629
- }
92630
- return expandedLine;
92631
- };
92632
- var exec3 = (string4, columns, options = {}) => {
92633
- if (options.trim !== false && string4.trim() === "") {
92634
- return "";
92635
- }
92636
- let returnValue = "";
92637
- let escapeUrl;
92638
- const activeStyles = [];
92639
- const lengths = wordLengths2(string4);
92640
- let rows = [""];
92641
- for (const [index, word] of string4.split(" ").entries()) {
92642
- if (options.trim !== false) {
92643
- rows[rows.length - 1] = rows.at(-1).trimStart();
92644
- }
92645
- let rowLength = stringWidth3(rows.at(-1));
92646
- if (index !== 0) {
92647
- if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
92648
- rows.push("");
92649
- rowLength = 0;
92650
- }
92651
- if (rowLength > 0 || options.trim === false) {
92652
- rows[rows.length - 1] += " ";
92653
- rowLength++;
92654
- }
92655
- }
92656
- if (options.hard && options.wordWrap !== false && lengths[index] > columns) {
92657
- const remainingColumns = columns - rowLength;
92658
- const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
92659
- const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
92660
- if (breaksStartingNextLine < breaksStartingThisLine) {
92661
- rows.push("");
92662
- }
92663
- wrapWord2(rows, word, columns);
92664
- continue;
92665
- }
92666
- if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
92667
- if (options.wordWrap === false && rowLength < columns) {
92668
- wrapWord2(rows, word, columns);
92669
- continue;
92670
- }
92671
- rows.push("");
92672
- }
92673
- if (rowLength + lengths[index] > columns && options.wordWrap === false) {
92674
- wrapWord2(rows, word, columns);
92675
- continue;
92676
- }
92677
- rows[rows.length - 1] += word;
92678
- }
92679
- if (options.trim !== false) {
92680
- rows = rows.map((row) => stringVisibleTrimSpacesRight2(row));
92681
- }
92682
- const preString = rows.join("\n");
92683
- const pre = getGraphemes(preString);
92684
- let preStringIndex = 0;
92685
- for (const [index, character] of pre.entries()) {
92686
- returnValue += character;
92687
- if (character === ANSI_ESCAPE && pre[index + 1] !== "\\") {
92688
- const { groups } = ANSI_ESCAPE_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
92689
- if (groups.sgr !== void 0) {
92690
- applySgrParameters(groups.sgr, activeStyles);
92691
- } else if (groups.uri !== void 0) {
92692
- escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
92693
- }
92694
- } else if (character === ANSI_ESCAPE_CSI) {
92695
- const { groups } = ANSI_ESCAPE_CSI_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
92696
- if (groups.sgr !== void 0) {
92697
- applySgrParameters(groups.sgr, activeStyles);
92698
- }
92699
- }
92700
- if (pre[index + 1] === "\n") {
92701
- if (escapeUrl) {
92702
- returnValue += wrapAnsiHyperlink2("");
92703
- }
92704
- returnValue += getClosingSgrSequence(activeStyles);
92705
- } else if (character === "\n") {
92706
- const openingStyles = [...activeStyles];
92707
- applyLeadingSgrResets(preString.slice(preStringIndex + 1), openingStyles);
92708
- returnValue += getOpeningSgrSequence(openingStyles);
92709
- if (escapeUrl) {
92710
- returnValue += wrapAnsiHyperlink2(escapeUrl);
92711
- }
92712
- }
92713
- preStringIndex += character.length;
92714
- }
92715
- return returnValue;
92716
- };
92717
- function wrapAnsi2(string4, columns, options) {
92718
- return String(string4).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec3(expandTabs(line), columns, options)).join("\n");
92719
- }
92720
-
92721
- // ../ggcoder/dist/ui/terminal-history-format.js
92722
92902
  var RESPONSE_LEFT_PADDING = " ";
92723
92903
  var MAX_OUTPUT_LINES = 4;
92724
92904
  var USER_MESSAGE_BACKGROUND = "#374151";
@@ -92747,8 +92927,8 @@ function formatHistoryWrite(output, options) {
92747
92927
  return `${leading}${trimmed}${trailing}`;
92748
92928
  }
92749
92929
  function renderRoundBorderBox(lines, context, borderColor) {
92750
- const longestLineWidth = Math.max(0, ...lines.map((lineText) => stringWidth3(stripAnsi2(lineText))));
92751
- const maxFrameWidth = Math.max(4, context.columns - stringWidth3(RESPONSE_LEFT_PADDING));
92930
+ const longestLineWidth = Math.max(0, ...lines.map((lineText) => stringWidth(stripAnsi2(lineText))));
92931
+ const maxFrameWidth = Math.max(4, context.columns - stringWidth(RESPONSE_LEFT_PADDING));
92752
92932
  const frameWidth = Math.max(4, Math.min(maxFrameWidth, longestLineWidth + 4));
92753
92933
  const contentWidth = Math.max(1, frameWidth - 4);
92754
92934
  const horizontal = color(borderColor, ROUND_BORDER.horizontal.repeat(frameWidth - 2));
@@ -92756,7 +92936,7 @@ function renderRoundBorderBox(lines, context, borderColor) {
92756
92936
  const bottom = `${color(borderColor, ROUND_BORDER.bottomLeft)}${horizontal}${color(borderColor, ROUND_BORDER.bottomRight)}`;
92757
92937
  const rows = lines.flatMap((lineText) => wrapBoxLine(lineText, contentWidth));
92758
92938
  const body = rows.map((lineText) => {
92759
- const fillWidth = Math.max(0, contentWidth - stringWidth3(stripAnsi2(lineText)));
92939
+ const fillWidth = Math.max(0, contentWidth - stringWidth(stripAnsi2(lineText)));
92760
92940
  return `${color(borderColor, ROUND_BORDER.vertical)} ${lineText}${" ".repeat(fillWidth)} ${color(borderColor, ROUND_BORDER.vertical)}`;
92761
92941
  });
92762
92942
  return indent([top, ...body, bottom].join("\n"), RESPONSE_LEFT_PADDING);
@@ -92772,23 +92952,23 @@ function block(lines) {
92772
92952
  return lines.filter((lineText) => lineText.length > 0).join("\n");
92773
92953
  }
92774
92954
  function wrapPlain(text, width) {
92775
- return wrapAnsi2(text, Math.max(10, width), { hard: true, wordWrap: true });
92955
+ return wrapAnsi(text, Math.max(10, width), { hard: true, wordWrap: true });
92776
92956
  }
92777
92957
  function wrapBoxLine(text, width) {
92778
92958
  if (text.length === 0)
92779
92959
  return [""];
92780
- return wrapAnsi2(text, Math.max(1, width), { hard: true, wordWrap: true, trim: false }).split("\n");
92960
+ return wrapAnsi(text, Math.max(1, width), { hard: true, wordWrap: true, trim: false }).split("\n");
92781
92961
  }
92782
92962
  function indent(text, prefix) {
92783
92963
  return text.split("\n").map((lineText) => `${prefix}${lineText}`).join("\n");
92784
92964
  }
92785
92965
  function truncatePlain(text, width) {
92786
92966
  const max = Math.max(1, width);
92787
- if (stringWidth3(text) <= max)
92967
+ if (stringWidth(text) <= max)
92788
92968
  return text;
92789
92969
  let result = "";
92790
92970
  for (const char of text) {
92791
- if (stringWidth3(`${result}${char}\u2026`) > max)
92971
+ if (stringWidth(`${result}${char}\u2026`) > max)
92792
92972
  break;
92793
92973
  result += char;
92794
92974
  }
@@ -93365,7 +93545,7 @@ function bodyWidth(columns) {
93365
93545
  }
93366
93546
  function estimateWrappedRows(text, columns) {
93367
93547
  const width = bodyWidth(columns);
93368
- return text.split("\n").reduce((rows, line) => rows + Math.max(1, Math.ceil(stringWidth3(line) / width)), 0);
93548
+ return text.split("\n").reduce((rows, line) => rows + Math.max(1, Math.ceil(stringWidth(line) / width)), 0);
93369
93549
  }
93370
93550
  var THINKING_HEADER_ROWS = 2;
93371
93551
  var BLOCK_OVERHEAD_ROWS = 1;
@@ -107403,10 +107583,10 @@ function colorize2(text, color2) {
107403
107583
  return color2 ? source_default.hex(color2)(text) : text;
107404
107584
  }
107405
107585
  function visualWidth(text) {
107406
- return stringWidth3(stripAnsi(text));
107586
+ return stringWidth(stripAnsi(text));
107407
107587
  }
107408
107588
  function wrapAnsiLines(text, width) {
107409
- return wrapAnsi2(text || " ", Math.max(1, width), { hard: true, wordWrap: true }).split("\n");
107589
+ return wrapAnsi(text || " ", Math.max(1, width), { hard: true, wordWrap: true }).split("\n");
107410
107590
  }
107411
107591
  function padRightAnsi(text, width) {
107412
107592
  return text + " ".repeat(Math.max(0, width - visualWidth(text)));
@@ -107420,7 +107600,7 @@ function renderAnsiTable({ headers, rows, terminalWidth, theme }) {
107420
107600
  const constraints = Array.from({ length: numColumns }, (_, colIndex) => {
107421
107601
  const values = Array.from({ length: allRows.length }, (_2, rowIndex) => normalizedCell(allRows, rowIndex, colIndex));
107422
107602
  const maxContentWidth = Math.max(...values.map(visualWidth), MIN_COLUMN_WIDTH);
107423
- const maxWordWidth = Math.max(...values.flatMap((value) => stripAnsi(value).split(/\s+/u).filter(Boolean).map((word) => stringWidth3(word))), MIN_COLUMN_WIDTH);
107603
+ const maxWordWidth = Math.max(...values.flatMap((value) => stripAnsi(value).split(/\s+/u).filter(Boolean).map((word) => stringWidth(word))), MIN_COLUMN_WIDTH);
107424
107604
  return { minWidth: maxWordWidth, maxWidth: Math.max(maxWordWidth, maxContentWidth) };
107425
107605
  });
107426
107606
  const fixedOverhead = numColumns + 1 + numColumns * COLUMN_PADDING;
@@ -107560,7 +107740,7 @@ function renderInlineMarkdownToAnsi(rawText, theme, defaultColor) {
107560
107740
  return result;
107561
107741
  }
107562
107742
  function wrapAnsiMarkdownLine(text, width) {
107563
- return wrapAnsi2(text || " ", Math.max(1, width), { hard: true, wordWrap: true }).split("\n");
107743
+ return wrapAnsi(text || " ", Math.max(1, width), { hard: true, wordWrap: true }).split("\n");
107564
107744
  }
107565
107745
  function renderHastToAnsi(node, theme, inheritedColor) {
107566
107746
  if (node.type === "text")
@@ -107826,7 +108006,10 @@ var Markdown = import_react55.default.memo(function Markdown2({ children, width:
107826
108006
  availableTerminalHeight,
107827
108007
  renderMarkdown
107828
108008
  }), [availableTerminalHeight, isPending, renderMarkdown, terminalWidth, text, theme]);
107829
- const visibleLines = availableTerminalHeight !== void 0 && renderedLines.length > availableTerminalHeight ? renderedLines.slice(-availableTerminalHeight) : renderedLines;
108009
+ let visibleLines = availableTerminalHeight !== void 0 && renderedLines.length > availableTerminalHeight ? renderedLines.slice(-availableTerminalHeight) : renderedLines;
108010
+ while (visibleLines.length > 0 && visibleLines[0] === "") {
108011
+ visibleLines = visibleLines.slice(1);
108012
+ }
107830
108013
  if (!text || visibleLines.length === 0)
107831
108014
  return null;
107832
108015
  return (0, import_jsx_runtime14.jsx)(Box_default, { flexDirection: "column", width: terminalWidth, flexShrink: 1, children: (0, import_jsx_runtime14.jsx)(RenderAnsiLines, { lines: visibleLines }) });
@@ -108308,7 +108491,7 @@ function renderBanner(context) {
108308
108491
  }
108309
108492
  const infoLines = [
108310
108493
  `${color(context.theme.primary, "GG Coder", true)}${dim(context, ` v${context.version} \xB7 By `)}${color(context.theme.text, "Ken Kai", true)}`,
108311
- `${color(context.theme.secondary, modelName)} ${dim(context, truncatePlain(displayPath, Math.max(10, context.columns - LOGO_WIDTH - GAP.length - stringWidth3(modelName) - 2)))}`,
108494
+ `${color(context.theme.secondary, modelName)} ${dim(context, truncatePlain(displayPath, Math.max(10, context.columns - LOGO_WIDTH - GAP.length - stringWidth(modelName) - 2)))}`,
108312
108495
  shortcuts
108313
108496
  ];
108314
108497
  const rows = logo.map((logoLine, i) => {
@@ -108330,7 +108513,7 @@ function renderUser(text, imageCount, videoCount, pasteInfo, context) {
108330
108513
  ].filter((part) => part.length > 0).join(separator);
108331
108514
  const messageWidth = Math.max(10, context.columns);
108332
108515
  const contentWidth = Math.max(1, messageWidth - USER_MESSAGE_HORIZONTAL_PADDING - USER_MESSAGE_PREFIX.length);
108333
- const wrapped = wrapAnsi2(content || userChipSegment("(empty)", userMessageText2), contentWidth, {
108516
+ const wrapped = wrapAnsi(content || userChipSegment("(empty)", userMessageText2), contentWidth, {
108334
108517
  hard: true,
108335
108518
  wordWrap: true
108336
108519
  });
@@ -108339,7 +108522,7 @@ function renderUser(text, imageCount, videoCount, pasteInfo, context) {
108339
108522
  const rows = wrapped.split("\n").map((lineText, index) => {
108340
108523
  const prefix = index === 0 ? userChipSegment(USER_MESSAGE_PREFIX, userMessageText2, true) : userChipSegment(" ".repeat(USER_MESSAGE_PREFIX.length), userMessageText2);
108341
108524
  const line = `${userChipSegment(" ", userMessageText2)}${prefix}${lineText}`;
108342
- const fillWidth = Math.max(0, messageWidth - stringWidth3(stripAnsi2(line)));
108525
+ const fillWidth = Math.max(0, messageWidth - stringWidth(stripAnsi2(line)));
108343
108526
  return `${line}${userChipSegment(" ".repeat(fillWidth), userMessageText2)}`;
108344
108527
  });
108345
108528
  return [top, ...rows, bottom].join("\n");
@@ -110261,7 +110444,7 @@ var import_react68 = __toESM(require_react(), 1);
110261
110444
  // ../ggcoder/dist/ui/utils/table-text.js
110262
110445
  init_esm_shims();
110263
110446
  function visualWidth2(str2) {
110264
- return stringWidth3(str2);
110447
+ return stringWidth(str2);
110265
110448
  }
110266
110449
 
110267
110450
  // ../ggcoder/dist/ui/components/PlanOverlay.js
@@ -110318,7 +110501,7 @@ init_esm_shims();
110318
110501
 
110319
110502
  // ../ggcoder/dist/core/setup-history.js
110320
110503
  init_esm_shims();
110321
- import fs31 from "fs";
110504
+ import fs32 from "fs";
110322
110505
  import path36 from "path";
110323
110506
  import os11 from "os";
110324
110507
  var HISTORY_PATH = path36.join(os11.homedir(), ".gg", "setup-history.json");
@@ -111404,6 +111587,22 @@ var oscResponsePattern = new RegExp(ESC3 + "\\]11;rgb:([0-9a-fA-F]+)/([0-9a-fA-F
111404
111587
 
111405
111588
  // ../ggcoder/dist/ui/render.js
111406
111589
  var INK_OPTIONS = {
111590
+ // [gg ink patch] Scrollback-mode safety net: clip frames to terminal height
111591
+ // (rows - 2) so a single mis-estimated live-area clamp can never produce a
111592
+ // frame that reaches the screen height. Once a frame hits `rows`, Ink's
111593
+ // eraseLines clamps at the screen top on the next shrink and rewrites the
111594
+ // frame top-anchored — stranding the footer mid-screen with blank rows
111595
+ // below. The clip drops the oldest (top) rows, mirroring the app's own
111596
+ // bottom-anchored clamp. The fullscreen alt-screen path must NOT set this —
111597
+ // it intentionally owns the whole screen.
111598
+ clipFrameToTerminalHeight: true,
111599
+ // [gg ink patch] Bottom anchoring: the frame bottom (footer) must never move
111600
+ // UP. Any rewrite that nets fewer rows than the previous frame (shrink not
111601
+ // fully compensated by enqueued scrollback bytes — tool panel hiding, status
111602
+ // row swaps, turn finalization after mid-stream flushes) is padded with
111603
+ // blank scrollback lines between the transcript and the frame, keeping the
111604
+ // footer row fixed. Exact line counts inside Ink — no estimates, no lag.
111605
+ anchorFrameToBottom: true,
111407
111606
  // Enable kitty keyboard protocol so terminals that support it can
111408
111607
  // distinguish Shift+Enter from Enter (needed for multiline input).
111409
111608
  // Terminals without support gracefully ignore this.
@@ -111417,7 +111616,14 @@ var INK_OPTIONS = {
111417
111616
  // exitOnCtrlC is true. Disable it so our InputArea handles Ctrl+C.
111418
111617
  exitOnCtrlC: false
111419
111618
  };
111420
- var FULLSCREEN_INK_OPTIONS = { ...INK_OPTIONS, maxFps: 120, incrementalRendering: true };
111619
+ var FULLSCREEN_INK_OPTIONS = {
111620
+ ...INK_OPTIONS,
111621
+ // Fullscreen frames legitimately fill the terminal — never clip or pad them.
111622
+ clipFrameToTerminalHeight: false,
111623
+ anchorFrameToBottom: false,
111624
+ maxFps: 120,
111625
+ incrementalRendering: true
111626
+ };
111421
111627
  var DISABLE_MODIFY_OTHER_KEYS = "\x1B[>4;0m";
111422
111628
  var SCREEN_CLEAR = DISABLE_MODIFY_OTHER_KEYS + "\x1B[2J\x1B[3J\x1B[H";
111423
111629
  var VIEWPORT_CLEAR = DISABLE_MODIFY_OTHER_KEYS + "\x1B[2J\x1B[H";
@@ -112686,17 +112892,17 @@ var EventQueue = class {
112686
112892
 
112687
112893
  // src/settings.ts
112688
112894
  init_esm_shims();
112689
- import fs32 from "fs/promises";
112895
+ import fs33 from "fs/promises";
112690
112896
  import path38 from "path";
112691
112897
  function settingsPath() {
112692
112898
  return path38.join(getAppPaths().agentDir, "boss", "settings.json");
112693
112899
  }
112694
112900
  async function ensureDir() {
112695
- await fs32.mkdir(path38.dirname(settingsPath()), { recursive: true, mode: 448 });
112901
+ await fs33.mkdir(path38.dirname(settingsPath()), { recursive: true, mode: 448 });
112696
112902
  }
112697
112903
  async function loadSettings() {
112698
112904
  try {
112699
- const content = await fs32.readFile(settingsPath(), "utf-8");
112905
+ const content = await fs33.readFile(settingsPath(), "utf-8");
112700
112906
  const parsed = JSON.parse(content);
112701
112907
  if (!parsed || typeof parsed !== "object") return {};
112702
112908
  return parsed;
@@ -112711,8 +112917,8 @@ async function saveSettings(patch) {
112711
112917
  const merged = { ...current, ...patch };
112712
112918
  await ensureDir();
112713
112919
  const tmp = `${settingsPath()}.${process.pid}.tmp`;
112714
- await fs32.writeFile(tmp, JSON.stringify(merged, null, 2) + "\n", "utf-8");
112715
- await fs32.rename(tmp, settingsPath());
112920
+ await fs33.writeFile(tmp, JSON.stringify(merged, null, 2) + "\n", "utf-8");
112921
+ await fs33.rename(tmp, settingsPath());
112716
112922
  });
112717
112923
  writeChain = next.catch(() => void 0);
112718
112924
  await next;
@@ -113104,18 +113310,18 @@ init_esm_shims();
113104
113310
  // src/tasks-store.ts
113105
113311
  init_esm_shims();
113106
113312
  var import_react98 = __toESM(require_react(), 1);
113107
- import fs33 from "fs/promises";
113313
+ import fs34 from "fs/promises";
113108
113314
  import path39 from "path";
113109
113315
  import crypto10 from "crypto";
113110
113316
  function getPlanPath() {
113111
113317
  return path39.join(getAppPaths().agentDir, "boss", "plan.json");
113112
113318
  }
113113
113319
  async function ensureDir2() {
113114
- await fs33.mkdir(path39.dirname(getPlanPath()), { recursive: true, mode: 448 });
113320
+ await fs34.mkdir(path39.dirname(getPlanPath()), { recursive: true, mode: 448 });
113115
113321
  }
113116
113322
  async function loadPlan() {
113117
113323
  try {
113118
- const content = await fs33.readFile(getPlanPath(), "utf-8");
113324
+ const content = await fs34.readFile(getPlanPath(), "utf-8");
113119
113325
  const parsed = JSON.parse(content);
113120
113326
  return Array.isArray(parsed.tasks) ? parsed.tasks : [];
113121
113327
  } catch {
@@ -113129,8 +113335,8 @@ async function persist(tasks) {
113129
113335
  await ensureDir2();
113130
113336
  const finalPath = getPlanPath();
113131
113337
  const tmpPath = `${finalPath}.${process.pid}.tmp`;
113132
- await fs33.writeFile(tmpPath, snapshot, "utf-8");
113133
- await fs33.rename(tmpPath, finalPath);
113338
+ await fs34.writeFile(tmpPath, snapshot, "utf-8");
113339
+ await fs34.rename(tmpPath, finalPath);
113134
113340
  });
113135
113341
  persistChain = next.catch(() => void 0);
113136
113342
  await next;
@@ -113401,10 +113607,10 @@ init_esm_shims();
113401
113607
  import { spawn as spawn7, execFileSync as execFileSync4 } from "child_process";
113402
113608
  import { fileURLToPath as fileURLToPath4 } from "url";
113403
113609
  import path40 from "path";
113404
- import fs34 from "fs";
113610
+ import fs35 from "fs";
113405
113611
  function readMp3DurationMs(file2) {
113406
113612
  try {
113407
- const buf = fs34.readFileSync(file2);
113613
+ const buf = fs35.readFileSync(file2);
113408
113614
  let i = 0;
113409
113615
  if (buf.length >= 10 && buf[0] === 73 && buf[1] === 68 && buf[2] === 51) {
113410
113616
  const tagSize = (buf[6] & 127) << 21 | (buf[7] & 127) << 14 | (buf[8] & 127) << 7 | buf[9] & 127;
@@ -113463,7 +113669,7 @@ function getSplashAudioDurationMs() {
113463
113669
  function assetPath(name) {
113464
113670
  const here = path40.dirname(fileURLToPath4(import.meta.url));
113465
113671
  const dist = path40.join(here, name);
113466
- if (fs34.existsSync(dist)) return dist;
113672
+ if (fs35.existsSync(dist)) return dist;
113467
113673
  return path40.join(here, "..", "assets", name);
113468
113674
  }
113469
113675
  function splashAssetPath() {
@@ -113504,7 +113710,7 @@ function trySpawn(cmd, args) {
113504
113710
  }
113505
113711
  function isWsl() {
113506
113712
  if (process.platform !== "linux") return false;
113507
- return !!process.env.WSL_DISTRO_NAME || fs34.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop");
113713
+ return !!process.env.WSL_DISTRO_NAME || fs35.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop");
113508
113714
  }
113509
113715
  async function tryPlayOnWindowsHost(file2) {
113510
113716
  try {
@@ -113576,7 +113782,7 @@ async function tryPlayOnWindowsHost(file2) {
113576
113782
  }
113577
113783
  }
113578
113784
  async function playFile(file2) {
113579
- if (!fs34.existsSync(file2)) return;
113785
+ if (!fs35.existsSync(file2)) return;
113580
113786
  const platform2 = process.platform;
113581
113787
  if (platform2 === "darwin") {
113582
113788
  await trySpawn("afplay", [file2]);
@@ -113674,7 +113880,7 @@ function truncateOversizedToolResults2(messages, opts = {}) {
113674
113880
 
113675
113881
  // src/sessions.ts
113676
113882
  init_esm_shims();
113677
- import fs35 from "fs/promises";
113883
+ import fs36 from "fs/promises";
113678
113884
  import path41 from "path";
113679
113885
  import crypto11 from "crypto";
113680
113886
  var BOSS_SUBDIR = "boss";
@@ -113687,24 +113893,24 @@ function getSessionsDir() {
113687
113893
  }
113688
113894
  async function ensureSessionsDir() {
113689
113895
  const dir = getSessionsDir();
113690
- await fs35.mkdir(dir, { recursive: true, mode: 448 });
113896
+ await fs36.mkdir(dir, { recursive: true, mode: 448 });
113691
113897
  return dir;
113692
113898
  }
113693
113899
  async function createSession2() {
113694
113900
  await ensureSessionsDir();
113695
113901
  const id2 = `${Date.now()}-${crypto11.randomBytes(4).toString("hex")}`;
113696
113902
  const filePath = path41.join(getSessionsDir(), `${id2}.jsonl`);
113697
- await fs35.writeFile(filePath, "", "utf-8");
113903
+ await fs36.writeFile(filePath, "", "utf-8");
113698
113904
  return { id: id2, filePath };
113699
113905
  }
113700
113906
  async function appendMessages(filePath, msgs) {
113701
113907
  if (msgs.length === 0) return;
113702
113908
  const lines = msgs.map((m) => JSON.stringify(m)).join("\n") + "\n";
113703
- await fs35.appendFile(filePath, lines, "utf-8");
113909
+ await fs36.appendFile(filePath, lines, "utf-8");
113704
113910
  }
113705
113911
  async function loadSession2(filePath) {
113706
113912
  try {
113707
- const content = await fs35.readFile(filePath, "utf-8");
113913
+ const content = await fs36.readFile(filePath, "utf-8");
113708
113914
  const lines = content.split("\n").filter((l) => l.length > 0);
113709
113915
  const messages = [];
113710
113916
  for (const line of lines) {
@@ -113720,8 +113926,8 @@ async function loadSession2(filePath) {
113720
113926
  }
113721
113927
  async function inspectSession(filePath, id2) {
113722
113928
  try {
113723
- const stat = await fs35.stat(filePath);
113724
- const content = await fs35.readFile(filePath, "utf-8");
113929
+ const stat = await fs36.stat(filePath);
113930
+ const content = await fs36.readFile(filePath, "utf-8");
113725
113931
  const lines = content.split("\n").filter((l) => l.length > 0);
113726
113932
  let firstUserMessage;
113727
113933
  for (const line of lines) {
@@ -113754,7 +113960,7 @@ async function listSessions2() {
113754
113960
  await ensureSessionsDir();
113755
113961
  let entries;
113756
113962
  try {
113757
- entries = await fs35.readdir(getSessionsDir());
113963
+ entries = await fs36.readdir(getSessionsDir());
113758
113964
  } catch {
113759
113965
  return [];
113760
113966
  }
@@ -114727,4 +114933,4 @@ react/cjs/react-jsx-runtime.development.js:
114727
114933
  * LICENSE file in the root directory of this source tree.
114728
114934
  *)
114729
114935
  */
114730
- //# sourceMappingURL=chunk-ROHVABKQ.js.map
114936
+ //# sourceMappingURL=chunk-XGMCVE2F.js.map