ccstatusline-usage 2.3.15 → 2.3.17

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.
@@ -1355,7 +1355,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
1355
1355
  exports.useTransition = function() {
1356
1356
  return resolveDispatcher().useTransition();
1357
1357
  };
1358
- exports.version = "19.2.4";
1358
+ exports.version = "19.2.5";
1359
1359
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1360
1360
  })();
1361
1361
  });
@@ -13433,6 +13433,7 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
13433
13433
  }
13434
13434
  var init_get_east_asian_width = __esm(() => {
13435
13435
  init_lookup();
13436
+ init_lookup();
13436
13437
  });
13437
13438
 
13438
13439
  // node_modules/emoji-regex/index.js
@@ -13442,7 +13443,7 @@ var require_emoji_regex = __commonJS((exports, module) => {
13442
13443
  };
13443
13444
  });
13444
13445
 
13445
- // node_modules/widest-line/node_modules/string-width/index.js
13446
+ // node_modules/string-width/index.js
13446
13447
  function stringWidth(string, options = {}) {
13447
13448
  if (typeof string !== "string" || string.length === 0) {
13448
13449
  return 0;
@@ -13534,82 +13535,6 @@ var init_measure_text = __esm(() => {
13534
13535
  measure_text_default = measureText;
13535
13536
  });
13536
13537
 
13537
- // node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
13538
- function ansiRegex2({ onlyFirst = false } = {}) {
13539
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
13540
- const pattern = [
13541
- `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
13542
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
13543
- ].join("|");
13544
- return new RegExp(pattern, onlyFirst ? undefined : "g");
13545
- }
13546
-
13547
- // node_modules/string-width/node_modules/strip-ansi/index.js
13548
- function stripAnsi2(string) {
13549
- if (typeof string !== "string") {
13550
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
13551
- }
13552
- return string.replace(regex2, "");
13553
- }
13554
- var regex2;
13555
- var init_strip_ansi2 = __esm(() => {
13556
- regex2 = ansiRegex2();
13557
- });
13558
-
13559
- // node_modules/string-width/index.js
13560
- function stringWidth2(string, options = {}) {
13561
- if (typeof string !== "string" || string.length === 0) {
13562
- return 0;
13563
- }
13564
- const {
13565
- ambiguousIsNarrow = true,
13566
- countAnsiEscapeCodes = false
13567
- } = options;
13568
- if (!countAnsiEscapeCodes) {
13569
- string = stripAnsi2(string);
13570
- }
13571
- if (string.length === 0) {
13572
- return 0;
13573
- }
13574
- let width = 0;
13575
- const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
13576
- for (const { segment: character } of segmenter2.segment(string)) {
13577
- const codePoint = character.codePointAt(0);
13578
- if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
13579
- continue;
13580
- }
13581
- if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
13582
- continue;
13583
- }
13584
- if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
13585
- continue;
13586
- }
13587
- if (codePoint >= 55296 && codePoint <= 57343) {
13588
- continue;
13589
- }
13590
- if (codePoint >= 65024 && codePoint <= 65039) {
13591
- continue;
13592
- }
13593
- if (defaultIgnorableCodePointRegex2.test(character)) {
13594
- continue;
13595
- }
13596
- if (import_emoji_regex2.default().test(character)) {
13597
- width += 2;
13598
- continue;
13599
- }
13600
- width += eastAsianWidth(codePoint, eastAsianWidthOptions);
13601
- }
13602
- return width;
13603
- }
13604
- var import_emoji_regex2, segmenter2, defaultIgnorableCodePointRegex2;
13605
- var init_string_width2 = __esm(() => {
13606
- init_strip_ansi2();
13607
- init_get_east_asian_width();
13608
- import_emoji_regex2 = __toESM(require_emoji_regex(), 1);
13609
- segmenter2 = new Intl.Segmenter;
13610
- defaultIgnorableCodePointRegex2 = /^\p{Default_Ignorable_Code_Point}$/u;
13611
- });
13612
-
13613
13538
  // node_modules/ansi-styles/index.js
13614
13539
  function assembleStyles2() {
13615
13540
  const codes = new Map;
@@ -13794,13 +13719,13 @@ function wrapAnsi(string, columns, options) {
13794
13719
  `).map((line) => exec(line, columns, options)).join(`
13795
13720
  `);
13796
13721
  }
13797
- var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC = "]", ANSI_SGR_TERMINATOR = "m", ANSI_ESCAPE_LINK, wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, wordLengths = (string) => string.split(" ").map((character) => stringWidth2(character)), wrapWord = (rows, word, columns) => {
13722
+ var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC = "]", ANSI_SGR_TERMINATOR = "m", ANSI_ESCAPE_LINK, wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, wordLengths = (string) => string.split(" ").map((character) => stringWidth(character)), wrapWord = (rows, word, columns) => {
13798
13723
  const characters = [...word];
13799
13724
  let isInsideEscape = false;
13800
13725
  let isInsideLinkEscape = false;
13801
- let visible = stringWidth2(stripAnsi(rows.at(-1)));
13726
+ let visible = stringWidth(stripAnsi(rows.at(-1)));
13802
13727
  for (const [index, character] of characters.entries()) {
13803
- const characterLength = stringWidth2(character);
13728
+ const characterLength = stringWidth(character);
13804
13729
  if (visible + characterLength <= columns) {
13805
13730
  rows[rows.length - 1] += character;
13806
13731
  } else {
@@ -13836,7 +13761,7 @@ var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC
13836
13761
  const words2 = string.split(" ");
13837
13762
  let last2 = words2.length;
13838
13763
  while (last2 > 0) {
13839
- if (stringWidth2(words2[last2 - 1]) > 0) {
13764
+ if (stringWidth(words2[last2 - 1]) > 0) {
13840
13765
  break;
13841
13766
  }
13842
13767
  last2--;
@@ -13858,7 +13783,7 @@ var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC
13858
13783
  if (options.trim !== false) {
13859
13784
  rows[rows.length - 1] = rows.at(-1).trimStart();
13860
13785
  }
13861
- let rowLength = stringWidth2(rows.at(-1));
13786
+ let rowLength = stringWidth(rows.at(-1));
13862
13787
  if (index !== 0) {
13863
13788
  if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
13864
13789
  rows.push("");
@@ -13933,7 +13858,7 @@ var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC
13933
13858
  return returnValue;
13934
13859
  };
13935
13860
  var init_wrap_ansi = __esm(() => {
13936
- init_string_width2();
13861
+ init_string_width();
13937
13862
  init_strip_ansi();
13938
13863
  init_ansi_styles2();
13939
13864
  ESCAPES = new Set([
@@ -14069,7 +13994,7 @@ function cliTruncate(text, columns, options = {}) {
14069
13994
  if (columns === 1) {
14070
13995
  return truncationCharacter;
14071
13996
  }
14072
- const length = stringWidth2(text);
13997
+ const length = stringWidth(text);
14073
13998
  if (length <= columns) {
14074
13999
  return text;
14075
14000
  }
@@ -14081,7 +14006,7 @@ function cliTruncate(text, columns, options = {}) {
14081
14006
  if (space === true) {
14082
14007
  truncationCharacter += " ";
14083
14008
  }
14084
- return truncationCharacter + sliceAnsi(text, length - columns + stringWidth2(truncationCharacter), length);
14009
+ return truncationCharacter + sliceAnsi(text, length - columns + stringWidth(truncationCharacter), length);
14085
14010
  }
14086
14011
  if (position === "middle") {
14087
14012
  if (space === true) {
@@ -14093,7 +14018,7 @@ function cliTruncate(text, columns, options = {}) {
14093
14018
  const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);
14094
14019
  return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim();
14095
14020
  }
14096
- return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) + stringWidth2(truncationCharacter), length);
14021
+ return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) + stringWidth(truncationCharacter), length);
14097
14022
  }
14098
14023
  if (position === "end") {
14099
14024
  if (preferTruncationOnSpace) {
@@ -14103,13 +14028,13 @@ function cliTruncate(text, columns, options = {}) {
14103
14028
  if (space === true) {
14104
14029
  truncationCharacter = ` ${truncationCharacter}`;
14105
14030
  }
14106
- return sliceAnsi(text, 0, columns - stringWidth2(truncationCharacter)) + truncationCharacter;
14031
+ return sliceAnsi(text, 0, columns - stringWidth(truncationCharacter)) + truncationCharacter;
14107
14032
  }
14108
14033
  throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
14109
14034
  }
14110
14035
  var init_cli_truncate = __esm(() => {
14111
14036
  init_slice_ansi();
14112
- init_string_width2();
14037
+ init_string_width();
14113
14038
  });
14114
14039
 
14115
14040
  // node_modules/ink/build/wrap-text.js
@@ -34475,8 +34400,8 @@ function indentString(string, count = 1, options = {}) {
34475
34400
  if (count === 0) {
34476
34401
  return string;
34477
34402
  }
34478
- const regex3 = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
34479
- return string.replace(regex3, indent.repeat(count));
34403
+ const regex2 = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
34404
+ return string.replace(regex2, indent.repeat(count));
34480
34405
  }
34481
34406
 
34482
34407
  // node_modules/ink/build/get-max-width.js
@@ -34582,7 +34507,7 @@ var require_cli_boxes = __commonJS((exports, module) => {
34582
34507
  });
34583
34508
 
34584
34509
  // node_modules/ink/build/colorize.js
34585
- var rgbRegex, ansiRegex3, isNamedColor = (color) => {
34510
+ var rgbRegex, ansiRegex2, isNamedColor = (color) => {
34586
34511
  return color in source_default;
34587
34512
  }, colorize = (str, color, type) => {
34588
34513
  if (!color) {
@@ -34599,7 +34524,7 @@ var rgbRegex, ansiRegex3, isNamedColor = (color) => {
34599
34524
  return type === "foreground" ? source_default.hex(color)(str) : source_default.bgHex(color)(str);
34600
34525
  }
34601
34526
  if (color.startsWith("ansi256")) {
34602
- const matches2 = ansiRegex3.exec(color);
34527
+ const matches2 = ansiRegex2.exec(color);
34603
34528
  if (!matches2) {
34604
34529
  return str;
34605
34530
  }
@@ -34621,7 +34546,7 @@ var rgbRegex, ansiRegex3, isNamedColor = (color) => {
34621
34546
  var init_colorize = __esm(() => {
34622
34547
  init_source();
34623
34548
  rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
34624
- ansiRegex3 = /^ansi256\(\s?(\d+)\s?\)$/;
34549
+ ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/;
34625
34550
  colorize_default = colorize;
34626
34551
  });
34627
34552
 
@@ -34831,94 +34756,15 @@ var init_render_node_to_output = __esm(async () => {
34831
34756
  render_node_to_output_default = renderNodeToOutput;
34832
34757
  });
34833
34758
 
34834
- // node_modules/slice-ansi/node_modules/is-fullwidth-code-point/node_modules/get-east-asian-width/lookup-data.js
34835
- var ambiguousRanges2, fullwidthRanges2, halfwidthRanges2, narrowRanges2, wideRanges2;
34836
- var init_lookup_data2 = __esm(() => {
34837
- ambiguousRanges2 = [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];
34838
- fullwidthRanges2 = [12288, 12288, 65281, 65376, 65504, 65510];
34839
- halfwidthRanges2 = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
34840
- narrowRanges2 = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
34841
- wideRanges2 = [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];
34842
- });
34843
-
34844
- // node_modules/slice-ansi/node_modules/is-fullwidth-code-point/node_modules/get-east-asian-width/utilities.js
34845
- var isInRange2 = (ranges, codePoint) => {
34846
- let low = 0;
34847
- let high = Math.floor(ranges.length / 2) - 1;
34848
- while (low <= high) {
34849
- const mid = Math.floor((low + high) / 2);
34850
- const i = mid * 2;
34851
- if (codePoint < ranges[i]) {
34852
- high = mid - 1;
34853
- } else if (codePoint > ranges[i + 1]) {
34854
- low = mid + 1;
34855
- } else {
34856
- return true;
34857
- }
34858
- }
34859
- return false;
34860
- };
34861
-
34862
- // node_modules/slice-ansi/node_modules/is-fullwidth-code-point/node_modules/get-east-asian-width/lookup.js
34863
- function findWideFastPathRange2(ranges) {
34864
- let fastPathStart = ranges[0];
34865
- let fastPathEnd = ranges[1];
34866
- for (let index = 0;index < ranges.length; index += 2) {
34867
- const start = ranges[index];
34868
- const end = ranges[index + 1];
34869
- if (commonCjkCodePoint2 >= start && commonCjkCodePoint2 <= end) {
34870
- return [start, end];
34871
- }
34872
- if (end - start > fastPathEnd - fastPathStart) {
34873
- fastPathStart = start;
34874
- fastPathEnd = end;
34875
- }
34876
- }
34877
- return [fastPathStart, fastPathEnd];
34878
- }
34879
- var minimumAmbiguousCodePoint2, maximumAmbiguousCodePoint2, minimumFullWidthCodePoint2, maximumFullWidthCodePoint2, minimumHalfWidthCodePoint2, maximumHalfWidthCodePoint2, minimumNarrowCodePoint2, maximumNarrowCodePoint2, minimumWideCodePoint2, maximumWideCodePoint2, commonCjkCodePoint2 = 19968, wideFastPathStart2, wideFastPathEnd2, isFullWidth2 = (codePoint) => {
34880
- if (codePoint < minimumFullWidthCodePoint2 || codePoint > maximumFullWidthCodePoint2) {
34881
- return false;
34882
- }
34883
- return isInRange2(fullwidthRanges2, codePoint);
34884
- }, isWide2 = (codePoint) => {
34885
- if (codePoint >= wideFastPathStart2 && codePoint <= wideFastPathEnd2) {
34886
- return true;
34887
- }
34888
- if (codePoint < minimumWideCodePoint2 || codePoint > maximumWideCodePoint2) {
34889
- return false;
34890
- }
34891
- return isInRange2(wideRanges2, codePoint);
34892
- };
34893
- var init_lookup2 = __esm(() => {
34894
- init_lookup_data2();
34895
- minimumAmbiguousCodePoint2 = ambiguousRanges2[0];
34896
- maximumAmbiguousCodePoint2 = ambiguousRanges2.at(-1);
34897
- minimumFullWidthCodePoint2 = fullwidthRanges2[0];
34898
- maximumFullWidthCodePoint2 = fullwidthRanges2.at(-1);
34899
- minimumHalfWidthCodePoint2 = halfwidthRanges2[0];
34900
- maximumHalfWidthCodePoint2 = halfwidthRanges2.at(-1);
34901
- minimumNarrowCodePoint2 = narrowRanges2[0];
34902
- maximumNarrowCodePoint2 = narrowRanges2.at(-1);
34903
- minimumWideCodePoint2 = wideRanges2[0];
34904
- maximumWideCodePoint2 = wideRanges2.at(-1);
34905
- [wideFastPathStart2, wideFastPathEnd2] = findWideFastPathRange2(wideRanges2);
34906
- });
34907
-
34908
- // node_modules/slice-ansi/node_modules/is-fullwidth-code-point/node_modules/get-east-asian-width/index.js
34909
- var init_get_east_asian_width2 = __esm(() => {
34910
- init_lookup2();
34911
- });
34912
-
34913
34759
  // node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js
34914
34760
  function isFullwidthCodePoint2(codePoint) {
34915
34761
  if (!Number.isInteger(codePoint)) {
34916
34762
  return false;
34917
34763
  }
34918
- return isFullWidth2(codePoint) || isWide2(codePoint);
34764
+ return isFullWidth(codePoint) || isWide(codePoint);
34919
34765
  }
34920
34766
  var init_is_fullwidth_code_point = __esm(() => {
34921
- init_get_east_asian_width2();
34767
+ init_get_east_asian_width();
34922
34768
  });
34923
34769
 
34924
34770
  // node_modules/slice-ansi/index.js
@@ -34977,15 +34823,15 @@ function tokenize(string, endCharacter = Number.POSITIVE_INFINITY) {
34977
34823
  continue;
34978
34824
  }
34979
34825
  }
34980
- const isFullWidth3 = isFullwidthCodePoint2(codePoint);
34826
+ const isFullWidth2 = isFullwidthCodePoint2(codePoint);
34981
34827
  const character = String.fromCodePoint(codePoint);
34982
34828
  returnValue.push({
34983
34829
  type: "character",
34984
34830
  value: character,
34985
- isFullWidth: isFullWidth3
34831
+ isFullWidth: isFullWidth2
34986
34832
  });
34987
34833
  index += character.length;
34988
- visibleCount += isFullWidth3 ? 2 : character.length;
34834
+ visibleCount += isFullWidth2 ? 2 : character.length;
34989
34835
  if (visibleCount >= endCharacter) {
34990
34836
  break;
34991
34837
  }
@@ -35338,7 +35184,7 @@ class Output {
35338
35184
  if (clipHorizontally) {
35339
35185
  lines = lines.map((line) => {
35340
35186
  const from = x < clip.x1 ? clip.x1 - x : 0;
35341
- const width = stringWidth2(line);
35187
+ const width = stringWidth(line);
35342
35188
  const to = x + width > clip.x2 ? clip.x2 - x : width;
35343
35189
  return sliceAnsi2(line, from, to);
35344
35190
  });
@@ -35397,7 +35243,7 @@ class Output {
35397
35243
  }
35398
35244
  var init_output = __esm(() => {
35399
35245
  init_slice_ansi2();
35400
- init_string_width2();
35246
+ init_string_width();
35401
35247
  init_widest_line();
35402
35248
  init_build();
35403
35249
  });
@@ -39501,8 +39347,8 @@ function emoji() {
39501
39347
  }
39502
39348
  function timeSource(args) {
39503
39349
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
39504
- const regex3 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
39505
- return regex3;
39350
+ const regex2 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
39351
+ return regex2;
39506
39352
  }
39507
39353
  function time(args) {
39508
39354
  return new RegExp(`^${timeSource(args)}$`);
@@ -39531,8 +39377,8 @@ var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uui
39531
39377
  const escapedDelim = escapeRegex(delimiter ?? ":");
39532
39378
  return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
39533
39379
  }, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`, date, string = (params) => {
39534
- const regex3 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
39535
- return new RegExp(`^${regex3}$`);
39380
+ const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
39381
+ return new RegExp(`^${regex2}$`);
39536
39382
  }, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
39537
39383
  var init_regexes = __esm(() => {
39538
39384
  init_util();
@@ -49321,9 +49167,9 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
49321
49167
  json.pattern = regexes[0].source;
49322
49168
  else if (regexes.length > 1) {
49323
49169
  json.allOf = [
49324
- ...regexes.map((regex3) => ({
49170
+ ...regexes.map((regex2) => ({
49325
49171
  ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
49326
- pattern: regex3.source
49172
+ pattern: regex2.source
49327
49173
  }))
49328
49174
  ];
49329
49175
  }
@@ -50538,10 +50384,10 @@ function hex2(_params) {
50538
50384
  function hash(alg, params) {
50539
50385
  const enc = params?.enc ?? "hex";
50540
50386
  const format = `${alg}_${enc}`;
50541
- const regex3 = exports_regexes[format];
50542
- if (!regex3)
50387
+ const regex2 = exports_regexes[format];
50388
+ if (!regex2)
50543
50389
  throw new Error(`Unrecognized hash format: ${format}`);
50544
- return _stringFormat(ZodCustomStringFormat, format, regex3, params);
50390
+ return _stringFormat(ZodCustomStringFormat, format, regex2, params);
50545
50391
  }
50546
50392
  function number2(params) {
50547
50393
  return _number(ZodNumber, params);
@@ -54717,8 +54563,8 @@ function createUnicodePropertyRegex(pattern) {
54717
54563
  return null;
54718
54564
  }
54719
54565
  }
54720
- function matchesUnicodeProperty(character, regex3) {
54721
- return regex3?.test(character) ?? false;
54566
+ function matchesUnicodeProperty(character, regex2) {
54567
+ return regex2?.test(character) ?? false;
54722
54568
  }
54723
54569
  function isVariationSelector(codePoint) {
54724
54570
  return codePoint >= VARIATION_SELECTOR_START && codePoint <= VARIATION_SELECTOR_END || codePoint >= VARIATION_SELECTOR_SUPPLEMENT_START && codePoint <= VARIATION_SELECTOR_SUPPLEMENT_END;
@@ -54787,7 +54633,7 @@ function isZeroWidthStandaloneCluster(cluster) {
54787
54633
  });
54788
54634
  }
54789
54635
  function shouldTreatClusterAsNarrowTextPictograph(cluster) {
54790
- if (stringWidth2(cluster) <= 1) {
54636
+ if (stringWidth(cluster) <= 1) {
54791
54637
  return false;
54792
54638
  }
54793
54639
  const characters = Array.from(cluster);
@@ -54812,7 +54658,7 @@ function getClusterWidth(cluster) {
54812
54658
  if (shouldTreatClusterAsNarrowTextPictograph(cluster)) {
54813
54659
  return 1;
54814
54660
  }
54815
- return stringWidth2(cluster);
54661
+ return stringWidth(cluster);
54816
54662
  }
54817
54663
  function getTextDisplayWidth(text) {
54818
54664
  let width = 0;
@@ -54975,7 +54821,7 @@ function truncateStyledText(text, maxWidth, options = {}) {
54975
54821
  }
54976
54822
  const addEllipsis = options.ellipsis ?? true;
54977
54823
  const ellipsis = addEllipsis ? "..." : "";
54978
- const ellipsisWidth = addEllipsis ? stringWidth2(ellipsis) : 0;
54824
+ const ellipsisWidth = addEllipsis ? stringWidth(ellipsis) : 0;
54979
54825
  if (addEllipsis && maxWidth <= ellipsisWidth) {
54980
54826
  return ".".repeat(maxWidth);
54981
54827
  }
@@ -55029,7 +54875,7 @@ function truncateStyledText(text, maxWidth, options = {}) {
55029
54875
  }
55030
54876
  var ESC2 = "\x1B", BEL2 = "\x07", C1_CSI = "›", C1_OSC = "", ST = "œ", ZERO_WIDTH_JOINER = 8205, COMBINING_ENCLOSING_KEYCAP = 8419, VARIATION_SELECTOR_START = 65024, VARIATION_SELECTOR_END = 65039, VARIATION_SELECTOR_SUPPLEMENT_START = 917760, VARIATION_SELECTOR_SUPPLEMENT_END = 917999, REGIONAL_INDICATOR_START = 127462, REGIONAL_INDICATOR_END = 127487, SGR_REGEX, EXTENDED_PICTOGRAPHIC_REGEX, EMOJI_PRESENTATION_REGEX, EMOJI_MODIFIER_REGEX, COMBINING_MARK_REGEX;
55031
54877
  var init_ansi = __esm(() => {
55032
- init_string_width2();
54878
+ init_string_width();
55033
54879
  SGR_REGEX = /\x1b\[[0-9;]*m/g;
55034
54880
  EXTENDED_PICTOGRAPHIC_REGEX = createUnicodePropertyRegex("\\p{Extended_Pictographic}");
55035
54881
  EMOJI_PRESENTATION_REGEX = createUnicodePropertyRegex("\\p{Emoji_Presentation}");
@@ -55186,8 +55032,8 @@ function getColorAnsiCode(colorName, colorLevel = "ansi16", isBackground = false
55186
55032
  }
55187
55033
  const colored = chalkFn("TEST");
55188
55034
  const escapeChar = "\x1B";
55189
- const ansiRegex4 = new RegExp(`^(${escapeChar.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\[[^m]+m)`);
55190
- const match = ansiRegex4.exec(colored);
55035
+ const ansiRegex3 = new RegExp(`^(${escapeChar.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\[[^m]+m)`);
55036
+ const match = ansiRegex3.exec(colored);
55191
55037
  return match?.[1] ?? "";
55192
55038
  }
55193
55039
  function getColorDisplayName(colorName) {
@@ -55592,7 +55438,7 @@ function getTerminalWidth() {
55592
55438
  function canDetectTerminalWidth() {
55593
55439
  return probeTerminalWidth() !== null;
55594
55440
  }
55595
- var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils", PACKAGE_VERSION = "2.3.15";
55441
+ var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils", PACKAGE_VERSION = "2.3.17";
55596
55442
  var init_terminal = () => {};
55597
55443
 
55598
55444
  // src/utils/renderer.ts
@@ -56970,8 +56816,8 @@ var import_react27, jsx_dev_runtime, CustomTextEditor = ({ widget, onComplete, o
56970
56816
  const [cursorPos, setCursorPos] = import_react27.useState(text.length);
56971
56817
  const getGraphemes = (str) => {
56972
56818
  if ("Segmenter" in Intl) {
56973
- const segmenter3 = new Intl.Segmenter(undefined, { granularity: "grapheme" });
56974
- return Array.from(segmenter3.segment(str), (seg) => seg.segment);
56819
+ const segmenter2 = new Intl.Segmenter(undefined, { granularity: "grapheme" });
56820
+ return Array.from(segmenter2.segment(str), (seg) => seg.segment);
56975
56821
  }
56976
56822
  return Array.from(str);
56977
56823
  };
@@ -57130,8 +56976,8 @@ var import_react28, jsx_dev_runtime2, CustomSymbolEditor = ({ widget, onComplete
57130
56976
  return "";
57131
56977
  }
57132
56978
  if ("Segmenter" in Intl) {
57133
- const segmenter3 = new Intl.Segmenter(undefined, { granularity: "grapheme" });
57134
- const segments = Array.from(segmenter3.segment(str));
56979
+ const segmenter2 = new Intl.Segmenter(undefined, { granularity: "grapheme" });
56980
+ const segments = Array.from(segmenter2.segment(str));
57135
56981
  return segments[0]?.segment ?? "";
57136
56982
  }
57137
56983
  return Array.from(str)[0] ?? "";
@@ -57552,7 +57398,7 @@ var require_ms = __commonJS((exports, module) => {
57552
57398
  }
57553
57399
  });
57554
57400
 
57555
- // node_modules/https-proxy-agent/node_modules/debug/src/common.js
57401
+ // node_modules/debug/src/common.js
57556
57402
  var require_common = __commonJS((exports, module) => {
57557
57403
  function setup(env3) {
57558
57404
  createDebug.debug = createDebug;
@@ -57727,7 +57573,7 @@ var require_common = __commonJS((exports, module) => {
57727
57573
  module.exports = setup;
57728
57574
  });
57729
57575
 
57730
- // node_modules/https-proxy-agent/node_modules/debug/src/browser.js
57576
+ // node_modules/debug/src/browser.js
57731
57577
  var require_browser = __commonJS((exports, module) => {
57732
57578
  exports.formatArgs = formatArgs;
57733
57579
  exports.save = save;
@@ -57887,116 +57733,7 @@ var require_browser = __commonJS((exports, module) => {
57887
57733
  };
57888
57734
  });
57889
57735
 
57890
- // node_modules/has-flag/index.js
57891
- var require_has_flag = __commonJS((exports, module) => {
57892
- module.exports = (flag, argv = process.argv) => {
57893
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
57894
- const position = argv.indexOf(prefix + flag);
57895
- const terminatorPosition = argv.indexOf("--");
57896
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
57897
- };
57898
- });
57899
-
57900
- // node_modules/supports-color/index.js
57901
- var require_supports_color = __commonJS((exports, module) => {
57902
- var os4 = __require("os");
57903
- var tty2 = __require("tty");
57904
- var hasFlag2 = require_has_flag();
57905
- var { env: env3 } = process;
57906
- var forceColor;
57907
- if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
57908
- forceColor = 0;
57909
- } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
57910
- forceColor = 1;
57911
- }
57912
- if ("FORCE_COLOR" in env3) {
57913
- if (env3.FORCE_COLOR === "true") {
57914
- forceColor = 1;
57915
- } else if (env3.FORCE_COLOR === "false") {
57916
- forceColor = 0;
57917
- } else {
57918
- forceColor = env3.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env3.FORCE_COLOR, 10), 3);
57919
- }
57920
- }
57921
- function translateLevel2(level) {
57922
- if (level === 0) {
57923
- return false;
57924
- }
57925
- return {
57926
- level,
57927
- hasBasic: true,
57928
- has256: level >= 2,
57929
- has16m: level >= 3
57930
- };
57931
- }
57932
- function supportsColor2(haveStream, streamIsTTY) {
57933
- if (forceColor === 0) {
57934
- return 0;
57935
- }
57936
- if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
57937
- return 3;
57938
- }
57939
- if (hasFlag2("color=256")) {
57940
- return 2;
57941
- }
57942
- if (haveStream && !streamIsTTY && forceColor === undefined) {
57943
- return 0;
57944
- }
57945
- const min2 = forceColor || 0;
57946
- if (env3.TERM === "dumb") {
57947
- return min2;
57948
- }
57949
- if (process.platform === "win32") {
57950
- const osRelease = os4.release().split(".");
57951
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
57952
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
57953
- }
57954
- return 1;
57955
- }
57956
- if ("CI" in env3) {
57957
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => (sign in env3)) || env3.CI_NAME === "codeship") {
57958
- return 1;
57959
- }
57960
- return min2;
57961
- }
57962
- if ("TEAMCITY_VERSION" in env3) {
57963
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env3.TEAMCITY_VERSION) ? 1 : 0;
57964
- }
57965
- if (env3.COLORTERM === "truecolor") {
57966
- return 3;
57967
- }
57968
- if ("TERM_PROGRAM" in env3) {
57969
- const version2 = parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
57970
- switch (env3.TERM_PROGRAM) {
57971
- case "iTerm.app":
57972
- return version2 >= 3 ? 3 : 2;
57973
- case "Apple_Terminal":
57974
- return 2;
57975
- }
57976
- }
57977
- if (/-256(color)?$/i.test(env3.TERM)) {
57978
- return 2;
57979
- }
57980
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM)) {
57981
- return 1;
57982
- }
57983
- if ("COLORTERM" in env3) {
57984
- return 1;
57985
- }
57986
- return min2;
57987
- }
57988
- function getSupportLevel(stream) {
57989
- const level = supportsColor2(stream, stream && stream.isTTY);
57990
- return translateLevel2(level);
57991
- }
57992
- module.exports = {
57993
- supportsColor: getSupportLevel,
57994
- stdout: translateLevel2(supportsColor2(true, tty2.isatty(1))),
57995
- stderr: translateLevel2(supportsColor2(true, tty2.isatty(2)))
57996
- };
57997
- });
57998
-
57999
- // node_modules/https-proxy-agent/node_modules/debug/src/node.js
57736
+ // node_modules/debug/src/node.js
58000
57737
  var require_node = __commonJS((exports, module) => {
58001
57738
  var tty2 = __require("tty");
58002
57739
  var util = __require("util");
@@ -58009,7 +57746,7 @@ var require_node = __commonJS((exports, module) => {
58009
57746
  exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
58010
57747
  exports.colors = [6, 2, 3, 4, 5, 1];
58011
57748
  try {
58012
- const supportsColor2 = require_supports_color();
57749
+ const supportsColor2 = (()=>{throw new Error("Cannot require module "+"supports-color");})();
58013
57750
  if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
58014
57751
  exports.colors = [
58015
57752
  20,
@@ -58167,7 +57904,7 @@ var require_node = __commonJS((exports, module) => {
58167
57904
  };
58168
57905
  });
58169
57906
 
58170
- // node_modules/https-proxy-agent/node_modules/debug/src/index.js
57907
+ // node_modules/debug/src/index.js
58171
57908
  var require_src = __commonJS((exports, module) => {
58172
57909
  if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
58173
57910
  module.exports = require_browser();
@@ -58177,125 +57914,17 @@ var require_src = __commonJS((exports, module) => {
58177
57914
  });
58178
57915
 
58179
57916
  // node_modules/agent-base/dist/helpers.js
58180
- var require_helpers = __commonJS((exports) => {
58181
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
58182
- if (k2 === undefined)
58183
- k2 = k;
58184
- var desc = Object.getOwnPropertyDescriptor(m, k);
58185
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
58186
- desc = { enumerable: true, get: function() {
58187
- return m[k];
58188
- } };
58189
- }
58190
- Object.defineProperty(o, k2, desc);
58191
- } : function(o, m, k, k2) {
58192
- if (k2 === undefined)
58193
- k2 = k;
58194
- o[k2] = m[k];
58195
- });
58196
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
58197
- Object.defineProperty(o, "default", { enumerable: true, value: v });
58198
- } : function(o, v) {
58199
- o["default"] = v;
58200
- });
58201
- var __importStar = exports && exports.__importStar || function(mod) {
58202
- if (mod && mod.__esModule)
58203
- return mod;
58204
- var result2 = {};
58205
- if (mod != null) {
58206
- for (var k in mod)
58207
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
58208
- __createBinding(result2, mod, k);
58209
- }
58210
- __setModuleDefault(result2, mod);
58211
- return result2;
58212
- };
58213
- Object.defineProperty(exports, "__esModule", { value: true });
58214
- exports.req = exports.json = exports.toBuffer = undefined;
58215
- var http = __importStar(__require("http"));
58216
- var https = __importStar(__require("https"));
58217
- async function toBuffer(stream) {
58218
- let length = 0;
58219
- const chunks = [];
58220
- for await (const chunk2 of stream) {
58221
- length += chunk2.length;
58222
- chunks.push(chunk2);
58223
- }
58224
- return Buffer.concat(chunks, length);
58225
- }
58226
- exports.toBuffer = toBuffer;
58227
- async function json2(stream) {
58228
- const buf = await toBuffer(stream);
58229
- const str = buf.toString("utf8");
58230
- try {
58231
- return JSON.parse(str);
58232
- } catch (_err) {
58233
- const err = _err;
58234
- err.message += ` (input: ${str})`;
58235
- throw err;
58236
- }
58237
- }
58238
- exports.json = json2;
58239
- function req(url2, opts = {}) {
58240
- const href = typeof url2 === "string" ? url2 : url2.href;
58241
- const req2 = (href.startsWith("https:") ? https : http).request(url2, opts);
58242
- const promise2 = new Promise((resolve, reject2) => {
58243
- req2.once("response", resolve).once("error", reject2).end();
58244
- });
58245
- req2.then = promise2.then.bind(promise2);
58246
- return req2;
58247
- }
58248
- exports.req = req;
58249
- });
57917
+ var init_helpers = () => {};
58250
57918
 
58251
57919
  // node_modules/agent-base/dist/index.js
58252
- var require_dist = __commonJS((exports) => {
58253
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
58254
- if (k2 === undefined)
58255
- k2 = k;
58256
- var desc = Object.getOwnPropertyDescriptor(m, k);
58257
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
58258
- desc = { enumerable: true, get: function() {
58259
- return m[k];
58260
- } };
58261
- }
58262
- Object.defineProperty(o, k2, desc);
58263
- } : function(o, m, k, k2) {
58264
- if (k2 === undefined)
58265
- k2 = k;
58266
- o[k2] = m[k];
58267
- });
58268
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
58269
- Object.defineProperty(o, "default", { enumerable: true, value: v });
58270
- } : function(o, v) {
58271
- o["default"] = v;
58272
- });
58273
- var __importStar = exports && exports.__importStar || function(mod) {
58274
- if (mod && mod.__esModule)
58275
- return mod;
58276
- var result2 = {};
58277
- if (mod != null) {
58278
- for (var k in mod)
58279
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
58280
- __createBinding(result2, mod, k);
58281
- }
58282
- __setModuleDefault(result2, mod);
58283
- return result2;
58284
- };
58285
- var __exportStar = exports && exports.__exportStar || function(m, exports2) {
58286
- for (var p in m)
58287
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
58288
- __createBinding(exports2, m, p);
58289
- };
58290
- Object.defineProperty(exports, "__esModule", { value: true });
58291
- exports.Agent = undefined;
58292
- var net = __importStar(__require("net"));
58293
- var http = __importStar(__require("http"));
58294
- var https_1 = __require("https");
58295
- __exportStar(require_helpers(), exports);
58296
- var INTERNAL = Symbol("AgentBaseInternalState");
58297
-
58298
- class Agent extends http.Agent {
57920
+ import * as net from "net";
57921
+ import * as http from "http";
57922
+ import { Agent as HttpsAgent } from "https";
57923
+ var INTERNAL, Agent2;
57924
+ var init_dist4 = __esm(() => {
57925
+ init_helpers();
57926
+ INTERNAL = Symbol("AgentBaseInternalState");
57927
+ Agent2 = class Agent2 extends http.Agent {
58299
57928
  constructor(opts) {
58300
57929
  super(opts);
58301
57930
  this[INTERNAL] = {};
@@ -58344,7 +57973,7 @@ var require_dist = __commonJS((exports) => {
58344
57973
  getName(options) {
58345
57974
  const secureEndpoint = this.isSecureEndpoint(options);
58346
57975
  if (secureEndpoint) {
58347
- return https_1.Agent.prototype.getName.call(this, options);
57976
+ return HttpsAgent.prototype.getName.call(this, options);
58348
57977
  }
58349
57978
  return super.getName(options);
58350
57979
  }
@@ -58395,170 +58024,139 @@ var require_dist = __commonJS((exports) => {
58395
58024
  this[INTERNAL].protocol = v;
58396
58025
  }
58397
58026
  }
58398
- }
58399
- exports.Agent = Agent;
58027
+ };
58400
58028
  });
58401
58029
 
58402
58030
  // node_modules/https-proxy-agent/dist/parse-proxy-response.js
58403
- var require_parse_proxy_response = __commonJS((exports) => {
58404
- var __importDefault = exports && exports.__importDefault || function(mod) {
58405
- return mod && mod.__esModule ? mod : { default: mod };
58406
- };
58407
- Object.defineProperty(exports, "__esModule", { value: true });
58408
- exports.parseProxyResponse = undefined;
58409
- var debug_1 = __importDefault(require_src());
58410
- var debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
58411
- function parseProxyResponse(socket) {
58412
- return new Promise((resolve, reject2) => {
58413
- let buffersLength = 0;
58414
- const buffers = [];
58415
- function read() {
58416
- const b = socket.read();
58417
- if (b)
58418
- ondata(b);
58419
- else
58420
- socket.once("readable", read);
58421
- }
58422
- function cleanup() {
58423
- socket.removeListener("end", onend);
58424
- socket.removeListener("error", onerror);
58425
- socket.removeListener("readable", read);
58426
- }
58427
- function onend() {
58428
- cleanup();
58429
- debug("onend");
58430
- reject2(new Error("Proxy connection ended before receiving CONNECT response"));
58431
- }
58432
- function onerror(err) {
58433
- cleanup();
58434
- debug("onerror %o", err);
58435
- reject2(err);
58436
- }
58437
- function ondata(b) {
58438
- buffers.push(b);
58439
- buffersLength += b.length;
58440
- const buffered = Buffer.concat(buffers, buffersLength);
58441
- const endOfHeaders = buffered.indexOf(`\r
58031
+ function parseProxyResponse(socket) {
58032
+ return new Promise((resolve, reject2) => {
58033
+ let buffersLength = 0;
58034
+ const buffers = [];
58035
+ function read() {
58036
+ const b = socket.read();
58037
+ if (b)
58038
+ ondata(b);
58039
+ else
58040
+ socket.once("readable", read);
58041
+ }
58042
+ function cleanup() {
58043
+ socket.removeListener("end", onend);
58044
+ socket.removeListener("error", onerror);
58045
+ socket.removeListener("readable", read);
58046
+ }
58047
+ function onend() {
58048
+ cleanup();
58049
+ debug("onend");
58050
+ reject2(new Error("Proxy connection ended before receiving CONNECT response"));
58051
+ }
58052
+ function onerror(err) {
58053
+ cleanup();
58054
+ debug("onerror %o", err);
58055
+ reject2(err);
58056
+ }
58057
+ function ondata(b) {
58058
+ buffers.push(b);
58059
+ buffersLength += b.length;
58060
+ const buffered = Buffer.concat(buffers, buffersLength);
58061
+ const endOfHeaders = buffered.indexOf(`\r
58442
58062
  \r
58443
58063
  `);
58444
- if (endOfHeaders === -1) {
58445
- debug("have not received end of HTTP headers yet...");
58446
- read();
58447
- return;
58448
- }
58449
- const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split(`\r
58064
+ if (endOfHeaders === -1) {
58065
+ debug("have not received end of HTTP headers yet...");
58066
+ read();
58067
+ return;
58068
+ }
58069
+ const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split(`\r
58450
58070
  `);
58451
- const firstLine = headerParts.shift();
58452
- if (!firstLine) {
58071
+ const firstLine = headerParts.shift();
58072
+ if (!firstLine) {
58073
+ socket.destroy();
58074
+ return reject2(new Error("No header received from proxy CONNECT response"));
58075
+ }
58076
+ const firstLineParts = firstLine.split(" ");
58077
+ const statusCode = +firstLineParts[1];
58078
+ const statusText = firstLineParts.slice(2).join(" ");
58079
+ const headers = {};
58080
+ for (const header of headerParts) {
58081
+ if (!header)
58082
+ continue;
58083
+ const firstColon = header.indexOf(":");
58084
+ if (firstColon === -1) {
58453
58085
  socket.destroy();
58454
- return reject2(new Error("No header received from proxy CONNECT response"));
58455
- }
58456
- const firstLineParts = firstLine.split(" ");
58457
- const statusCode = +firstLineParts[1];
58458
- const statusText = firstLineParts.slice(2).join(" ");
58459
- const headers = {};
58460
- for (const header of headerParts) {
58461
- if (!header)
58462
- continue;
58463
- const firstColon = header.indexOf(":");
58464
- if (firstColon === -1) {
58465
- socket.destroy();
58466
- return reject2(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
58467
- }
58468
- const key = header.slice(0, firstColon).toLowerCase();
58469
- const value = header.slice(firstColon + 1).trimStart();
58470
- const current = headers[key];
58471
- if (typeof current === "string") {
58472
- headers[key] = [current, value];
58473
- } else if (Array.isArray(current)) {
58474
- current.push(value);
58475
- } else {
58476
- headers[key] = value;
58477
- }
58086
+ return reject2(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
58087
+ }
58088
+ const key = header.slice(0, firstColon).toLowerCase();
58089
+ const value = header.slice(firstColon + 1).trimStart();
58090
+ const current = headers[key];
58091
+ if (typeof current === "string") {
58092
+ headers[key] = [current, value];
58093
+ } else if (Array.isArray(current)) {
58094
+ current.push(value);
58095
+ } else {
58096
+ headers[key] = value;
58478
58097
  }
58479
- debug("got proxy server response: %o %o", firstLine, headers);
58480
- cleanup();
58481
- resolve({
58482
- connect: {
58483
- statusCode,
58484
- statusText,
58485
- headers
58486
- },
58487
- buffered
58488
- });
58489
58098
  }
58490
- socket.on("error", onerror);
58491
- socket.on("end", onend);
58492
- read();
58493
- });
58494
- }
58495
- exports.parseProxyResponse = parseProxyResponse;
58099
+ debug("got proxy server response: %o %o", firstLine, headers);
58100
+ cleanup();
58101
+ resolve({
58102
+ connect: {
58103
+ statusCode,
58104
+ statusText,
58105
+ headers
58106
+ },
58107
+ buffered
58108
+ });
58109
+ }
58110
+ socket.on("error", onerror);
58111
+ socket.on("end", onend);
58112
+ read();
58113
+ });
58114
+ }
58115
+ var import_debug, debug;
58116
+ var init_parse_proxy_response = __esm(() => {
58117
+ import_debug = __toESM(require_src(), 1);
58118
+ debug = import_debug.default("https-proxy-agent:parse-proxy-response");
58496
58119
  });
58497
58120
 
58498
58121
  // node_modules/https-proxy-agent/dist/index.js
58499
- var require_dist2 = __commonJS((exports) => {
58500
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
58501
- if (k2 === undefined)
58502
- k2 = k;
58503
- var desc = Object.getOwnPropertyDescriptor(m, k);
58504
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
58505
- desc = { enumerable: true, get: function() {
58506
- return m[k];
58507
- } };
58508
- }
58509
- Object.defineProperty(o, k2, desc);
58510
- } : function(o, m, k, k2) {
58511
- if (k2 === undefined)
58512
- k2 = k;
58513
- o[k2] = m[k];
58514
- });
58515
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
58516
- Object.defineProperty(o, "default", { enumerable: true, value: v });
58517
- } : function(o, v) {
58518
- o["default"] = v;
58519
- });
58520
- var __importStar = exports && exports.__importStar || function(mod) {
58521
- if (mod && mod.__esModule)
58522
- return mod;
58523
- var result2 = {};
58524
- if (mod != null) {
58525
- for (var k in mod)
58526
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
58527
- __createBinding(result2, mod, k);
58528
- }
58529
- __setModuleDefault(result2, mod);
58530
- return result2;
58531
- };
58532
- var __importDefault = exports && exports.__importDefault || function(mod) {
58533
- return mod && mod.__esModule ? mod : { default: mod };
58534
- };
58535
- Object.defineProperty(exports, "__esModule", { value: true });
58536
- exports.HttpsProxyAgent = undefined;
58537
- var net = __importStar(__require("net"));
58538
- var tls = __importStar(__require("tls"));
58539
- var assert_1 = __importDefault(__require("assert"));
58540
- var debug_1 = __importDefault(require_src());
58541
- var agent_base_1 = require_dist();
58542
- var url_1 = __require("url");
58543
- var parse_proxy_response_1 = require_parse_proxy_response();
58544
- var debug = (0, debug_1.default)("https-proxy-agent");
58545
- var setServernameFromNonIpHost = (options) => {
58546
- if (options.servername === undefined && options.host && !net.isIP(options.host)) {
58547
- return {
58548
- ...options,
58549
- servername: options.host
58550
- };
58122
+ import * as net2 from "net";
58123
+ import * as tls from "tls";
58124
+ import assert2 from "assert";
58125
+ import { URL as URL2 } from "url";
58126
+ function resume(socket) {
58127
+ socket.resume();
58128
+ }
58129
+ function omit3(obj, ...keys2) {
58130
+ const ret = {};
58131
+ let key;
58132
+ for (key in obj) {
58133
+ if (!keys2.includes(key)) {
58134
+ ret[key] = obj[key];
58551
58135
  }
58552
- return options;
58553
- };
58554
-
58555
- class HttpsProxyAgent extends agent_base_1.Agent {
58136
+ }
58137
+ return ret;
58138
+ }
58139
+ var import_debug2, debug2, setServernameFromNonIpHost = (options) => {
58140
+ if (options.servername === undefined && options.host && !net2.isIP(options.host)) {
58141
+ return {
58142
+ ...options,
58143
+ servername: options.host
58144
+ };
58145
+ }
58146
+ return options;
58147
+ }, HttpsProxyAgent;
58148
+ var init_dist5 = __esm(() => {
58149
+ init_dist4();
58150
+ init_parse_proxy_response();
58151
+ import_debug2 = __toESM(require_src(), 1);
58152
+ debug2 = import_debug2.default("https-proxy-agent");
58153
+ HttpsProxyAgent = class HttpsProxyAgent extends Agent2 {
58556
58154
  constructor(proxy, opts) {
58557
58155
  super(opts);
58558
58156
  this.options = { path: undefined };
58559
- this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy;
58157
+ this.proxy = typeof proxy === "string" ? new URL2(proxy) : proxy;
58560
58158
  this.proxyHeaders = opts?.headers ?? {};
58561
- debug("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
58159
+ debug2("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
58562
58160
  const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
58563
58161
  const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
58564
58162
  this.connectOpts = {
@@ -58575,14 +58173,14 @@ var require_dist2 = __commonJS((exports) => {
58575
58173
  }
58576
58174
  let socket;
58577
58175
  if (proxy.protocol === "https:") {
58578
- debug("Creating `tls.Socket`: %o", this.connectOpts);
58176
+ debug2("Creating `tls.Socket`: %o", this.connectOpts);
58579
58177
  socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));
58580
58178
  } else {
58581
- debug("Creating `net.Socket`: %o", this.connectOpts);
58582
- socket = net.connect(this.connectOpts);
58179
+ debug2("Creating `net.Socket`: %o", this.connectOpts);
58180
+ socket = net2.connect(this.connectOpts);
58583
58181
  }
58584
58182
  const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
58585
- const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
58183
+ const host = net2.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
58586
58184
  let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r
58587
58185
  `;
58588
58186
  if (proxy.username || proxy.password) {
@@ -58597,16 +58195,16 @@ var require_dist2 = __commonJS((exports) => {
58597
58195
  payload += `${name}: ${headers[name]}\r
58598
58196
  `;
58599
58197
  }
58600
- const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
58198
+ const proxyResponsePromise = parseProxyResponse(socket);
58601
58199
  socket.write(`${payload}\r
58602
58200
  `);
58603
- const { connect, buffered } = await proxyResponsePromise;
58604
- req.emit("proxyConnect", connect);
58605
- this.emit("proxyConnect", connect, req);
58606
- if (connect.statusCode === 200) {
58201
+ const { connect: connect3, buffered } = await proxyResponsePromise;
58202
+ req.emit("proxyConnect", connect3);
58203
+ this.emit("proxyConnect", connect3, req);
58204
+ if (connect3.statusCode === 200) {
58607
58205
  req.once("socket", resume);
58608
58206
  if (opts.secureEndpoint) {
58609
- debug("Upgrading socket connection to TLS");
58207
+ debug2("Upgrading socket connection to TLS");
58610
58208
  return tls.connect({
58611
58209
  ...omit3(setServernameFromNonIpHost(opts), "host", "path", "port"),
58612
58210
  socket
@@ -58615,32 +58213,18 @@ var require_dist2 = __commonJS((exports) => {
58615
58213
  return socket;
58616
58214
  }
58617
58215
  socket.destroy();
58618
- const fakeSocket = new net.Socket({ writable: false });
58216
+ const fakeSocket = new net2.Socket({ writable: false });
58619
58217
  fakeSocket.readable = true;
58620
58218
  req.once("socket", (s) => {
58621
- debug("Replaying proxy buffer for failed request");
58622
- (0, assert_1.default)(s.listenerCount("data") > 0);
58219
+ debug2("Replaying proxy buffer for failed request");
58220
+ assert2(s.listenerCount("data") > 0);
58623
58221
  s.push(buffered);
58624
58222
  s.push(null);
58625
58223
  });
58626
58224
  return fakeSocket;
58627
58225
  }
58628
- }
58226
+ };
58629
58227
  HttpsProxyAgent.protocols = ["http", "https"];
58630
- exports.HttpsProxyAgent = HttpsProxyAgent;
58631
- function resume(socket) {
58632
- socket.resume();
58633
- }
58634
- function omit3(obj, ...keys2) {
58635
- const ret = {};
58636
- let key;
58637
- for (key in obj) {
58638
- if (!keys2.includes(key)) {
58639
- ret[key] = obj[key];
58640
- }
58641
- }
58642
- return ret;
58643
- }
58644
58228
  });
58645
58229
 
58646
58230
  // src/utils/usage-types.ts
@@ -58924,7 +58508,7 @@ function getUsageApiRequestOptions(token) {
58924
58508
  "anthropic-beta": "oauth-2025-04-20"
58925
58509
  },
58926
58510
  timeout: USAGE_API_TIMEOUT_MS,
58927
- ...proxyUrl ? { agent: new import_https_proxy_agent.HttpsProxyAgent(proxyUrl) } : {}
58511
+ ...proxyUrl ? { agent: new HttpsProxyAgent(proxyUrl) } : {}
58928
58512
  };
58929
58513
  } catch {
58930
58514
  return null;
@@ -59031,12 +58615,12 @@ async function fetchUsageData() {
59031
58615
  return getStaleUsageOrError("parse-error", now2);
59032
58616
  }
59033
58617
  }
59034
- var import_https_proxy_agent, CACHE_DIR, CACHE_FILE, LOCK_FILE, CACHE_MAX_AGE = 180, LOCK_MAX_AGE = 30, DEFAULT_RATE_LIMIT_BACKOFF = 300, MACOS_USAGE_CREDENTIALS_SERVICE = "Claude Code-credentials", MACOS_SECURITY_DUMP_MAX_BUFFER, UsageCredentialsSchema, UsageLockErrorSchema, UsageLockSchema, CachedUsageDataSchema, UsageApiResponseSchema, cachedUsageData = null, usageCacheTime = 0, usageErrorCacheMaxAge, USAGE_API_HOST = "api.anthropic.com", USAGE_API_PATH = "/api/oauth/usage", USAGE_API_TIMEOUT_MS = 5000;
58618
+ var CACHE_DIR, CACHE_FILE, LOCK_FILE, CACHE_MAX_AGE = 180, LOCK_MAX_AGE = 30, DEFAULT_RATE_LIMIT_BACKOFF = 300, MACOS_USAGE_CREDENTIALS_SERVICE = "Claude Code-credentials", MACOS_SECURITY_DUMP_MAX_BUFFER, UsageCredentialsSchema, UsageLockErrorSchema, UsageLockSchema, CachedUsageDataSchema, UsageApiResponseSchema, cachedUsageData = null, usageCacheTime = 0, usageErrorCacheMaxAge, USAGE_API_HOST = "api.anthropic.com", USAGE_API_PATH = "/api/oauth/usage", USAGE_API_TIMEOUT_MS = 5000;
59035
58619
  var init_usage_fetch = __esm(() => {
58620
+ init_dist5();
59036
58621
  init_zod();
59037
58622
  init_claude_settings();
59038
58623
  init_usage_types();
59039
- import_https_proxy_agent = __toESM(require_dist2(), 1);
59040
58624
  CACHE_DIR = path3.join(os4.homedir(), ".cache", "ccstatusline");
59041
58625
  CACHE_FILE = path3.join(CACHE_DIR, "usage.json");
59042
58626
  LOCK_FILE = path3.join(CACHE_DIR, "usage.lock");
@@ -59571,7 +59155,7 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
59571
59155
  return this;
59572
59156
  }
59573
59157
  };
59574
- var init_dist4 = __esm(() => {
59158
+ var init_dist6 = __esm(() => {
59575
59159
  __require2 = /* @__PURE__ */ createRequire2(import.meta.url);
59576
59160
  SLASHES_REGEX = /[\\/]/g;
59577
59161
  WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
@@ -59582,10 +59166,11 @@ var init_dist4 = __esm(() => {
59582
59166
  } catch {}
59583
59167
  });
59584
59168
 
59585
- // node_modules/picomatch/lib/constants.js
59169
+ // node_modules/tinyglobby/node_modules/picomatch/lib/constants.js
59586
59170
  var require_constants3 = __commonJS((exports, module) => {
59587
59171
  var WIN_SLASH = "\\\\/";
59588
59172
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
59173
+ var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
59589
59174
  var DOT_LITERAL = "\\.";
59590
59175
  var PLUS_LITERAL = "\\+";
59591
59176
  var QMARK_LITERAL = "\\?";
@@ -59636,6 +59221,7 @@ var require_constants3 = __commonJS((exports, module) => {
59636
59221
  SEP: "\\"
59637
59222
  };
59638
59223
  var POSIX_REGEX_SOURCE = {
59224
+ __proto__: null,
59639
59225
  alnum: "a-zA-Z0-9",
59640
59226
  alpha: "a-zA-Z",
59641
59227
  ascii: "\\x00-\\x7F",
@@ -59652,6 +59238,7 @@ var require_constants3 = __commonJS((exports, module) => {
59652
59238
  xdigit: "A-Fa-f0-9"
59653
59239
  };
59654
59240
  module.exports = {
59241
+ DEFAULT_MAX_EXTGLOB_RECURSION,
59655
59242
  MAX_LENGTH: 1024 * 64,
59656
59243
  POSIX_REGEX_SOURCE,
59657
59244
  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
@@ -59724,7 +59311,7 @@ var require_constants3 = __commonJS((exports, module) => {
59724
59311
  };
59725
59312
  });
59726
59313
 
59727
- // node_modules/picomatch/lib/utils.js
59314
+ // node_modules/tinyglobby/node_modules/picomatch/lib/utils.js
59728
59315
  var require_utils = __commonJS((exports) => {
59729
59316
  var {
59730
59317
  REGEX_BACKSLASH,
@@ -59787,7 +59374,7 @@ var require_utils = __commonJS((exports) => {
59787
59374
  };
59788
59375
  });
59789
59376
 
59790
- // node_modules/picomatch/lib/scan.js
59377
+ // node_modules/tinyglobby/node_modules/picomatch/lib/scan.js
59791
59378
  var require_scan = __commonJS((exports, module) => {
59792
59379
  var utils = require_utils();
59793
59380
  var {
@@ -60102,7 +59689,7 @@ var require_scan = __commonJS((exports, module) => {
60102
59689
  module.exports = scan;
60103
59690
  });
60104
59691
 
60105
- // node_modules/picomatch/lib/parse.js
59692
+ // node_modules/tinyglobby/node_modules/picomatch/lib/parse.js
60106
59693
  var require_parse = __commonJS((exports, module) => {
60107
59694
  var constants2 = require_constants3();
60108
59695
  var utils = require_utils();
@@ -60129,6 +59716,213 @@ var require_parse = __commonJS((exports, module) => {
60129
59716
  var syntaxError = (type, char) => {
60130
59717
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
60131
59718
  };
59719
+ var splitTopLevel = (input) => {
59720
+ const parts = [];
59721
+ let bracket = 0;
59722
+ let paren = 0;
59723
+ let quote = 0;
59724
+ let value = "";
59725
+ let escaped = false;
59726
+ for (const ch of input) {
59727
+ if (escaped === true) {
59728
+ value += ch;
59729
+ escaped = false;
59730
+ continue;
59731
+ }
59732
+ if (ch === "\\") {
59733
+ value += ch;
59734
+ escaped = true;
59735
+ continue;
59736
+ }
59737
+ if (ch === '"') {
59738
+ quote = quote === 1 ? 0 : 1;
59739
+ value += ch;
59740
+ continue;
59741
+ }
59742
+ if (quote === 0) {
59743
+ if (ch === "[") {
59744
+ bracket++;
59745
+ } else if (ch === "]" && bracket > 0) {
59746
+ bracket--;
59747
+ } else if (bracket === 0) {
59748
+ if (ch === "(") {
59749
+ paren++;
59750
+ } else if (ch === ")" && paren > 0) {
59751
+ paren--;
59752
+ } else if (ch === "|" && paren === 0) {
59753
+ parts.push(value);
59754
+ value = "";
59755
+ continue;
59756
+ }
59757
+ }
59758
+ }
59759
+ value += ch;
59760
+ }
59761
+ parts.push(value);
59762
+ return parts;
59763
+ };
59764
+ var isPlainBranch = (branch) => {
59765
+ let escaped = false;
59766
+ for (const ch of branch) {
59767
+ if (escaped === true) {
59768
+ escaped = false;
59769
+ continue;
59770
+ }
59771
+ if (ch === "\\") {
59772
+ escaped = true;
59773
+ continue;
59774
+ }
59775
+ if (/[?*+@!()[\]{}]/.test(ch)) {
59776
+ return false;
59777
+ }
59778
+ }
59779
+ return true;
59780
+ };
59781
+ var normalizeSimpleBranch = (branch) => {
59782
+ let value = branch.trim();
59783
+ let changed = true;
59784
+ while (changed === true) {
59785
+ changed = false;
59786
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
59787
+ value = value.slice(2, -1);
59788
+ changed = true;
59789
+ }
59790
+ }
59791
+ if (!isPlainBranch(value)) {
59792
+ return;
59793
+ }
59794
+ return value.replace(/\\(.)/g, "$1");
59795
+ };
59796
+ var hasRepeatedCharPrefixOverlap = (branches) => {
59797
+ const values2 = branches.map(normalizeSimpleBranch).filter(Boolean);
59798
+ for (let i = 0;i < values2.length; i++) {
59799
+ for (let j = i + 1;j < values2.length; j++) {
59800
+ const a = values2[i];
59801
+ const b = values2[j];
59802
+ const char = a[0];
59803
+ if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
59804
+ continue;
59805
+ }
59806
+ if (a === b || a.startsWith(b) || b.startsWith(a)) {
59807
+ return true;
59808
+ }
59809
+ }
59810
+ }
59811
+ return false;
59812
+ };
59813
+ var parseRepeatedExtglob = (pattern, requireEnd = true) => {
59814
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
59815
+ return;
59816
+ }
59817
+ let bracket = 0;
59818
+ let paren = 0;
59819
+ let quote = 0;
59820
+ let escaped = false;
59821
+ for (let i = 1;i < pattern.length; i++) {
59822
+ const ch = pattern[i];
59823
+ if (escaped === true) {
59824
+ escaped = false;
59825
+ continue;
59826
+ }
59827
+ if (ch === "\\") {
59828
+ escaped = true;
59829
+ continue;
59830
+ }
59831
+ if (ch === '"') {
59832
+ quote = quote === 1 ? 0 : 1;
59833
+ continue;
59834
+ }
59835
+ if (quote === 1) {
59836
+ continue;
59837
+ }
59838
+ if (ch === "[") {
59839
+ bracket++;
59840
+ continue;
59841
+ }
59842
+ if (ch === "]" && bracket > 0) {
59843
+ bracket--;
59844
+ continue;
59845
+ }
59846
+ if (bracket > 0) {
59847
+ continue;
59848
+ }
59849
+ if (ch === "(") {
59850
+ paren++;
59851
+ continue;
59852
+ }
59853
+ if (ch === ")") {
59854
+ paren--;
59855
+ if (paren === 0) {
59856
+ if (requireEnd === true && i !== pattern.length - 1) {
59857
+ return;
59858
+ }
59859
+ return {
59860
+ type: pattern[0],
59861
+ body: pattern.slice(2, i),
59862
+ end: i
59863
+ };
59864
+ }
59865
+ }
59866
+ }
59867
+ };
59868
+ var getStarExtglobSequenceOutput = (pattern) => {
59869
+ let index = 0;
59870
+ const chars = [];
59871
+ while (index < pattern.length) {
59872
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
59873
+ if (!match || match.type !== "*") {
59874
+ return;
59875
+ }
59876
+ const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
59877
+ if (branches.length !== 1) {
59878
+ return;
59879
+ }
59880
+ const branch = normalizeSimpleBranch(branches[0]);
59881
+ if (!branch || branch.length !== 1) {
59882
+ return;
59883
+ }
59884
+ chars.push(branch);
59885
+ index += match.end + 1;
59886
+ }
59887
+ if (chars.length < 1) {
59888
+ return;
59889
+ }
59890
+ const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
59891
+ return `${source}*`;
59892
+ };
59893
+ var repeatedExtglobRecursion = (pattern) => {
59894
+ let depth = 0;
59895
+ let value = pattern.trim();
59896
+ let match = parseRepeatedExtglob(value);
59897
+ while (match) {
59898
+ depth++;
59899
+ value = match.body.trim();
59900
+ match = parseRepeatedExtglob(value);
59901
+ }
59902
+ return depth;
59903
+ };
59904
+ var analyzeRepeatedExtglob = (body, options) => {
59905
+ if (options.maxExtglobRecursion === false) {
59906
+ return { risky: false };
59907
+ }
59908
+ const max2 = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants2.DEFAULT_MAX_EXTGLOB_RECURSION;
59909
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
59910
+ if (branches.length > 1) {
59911
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
59912
+ return { risky: true };
59913
+ }
59914
+ }
59915
+ for (const branch of branches) {
59916
+ const safeOutput = getStarExtglobSequenceOutput(branch);
59917
+ if (safeOutput) {
59918
+ return { risky: true, safeOutput };
59919
+ }
59920
+ if (repeatedExtglobRecursion(branch) > max2) {
59921
+ return { risky: true };
59922
+ }
59923
+ }
59924
+ return { risky: false };
59925
+ };
60132
59926
  var parse5 = (input, options) => {
60133
59927
  if (typeof input !== "string") {
60134
59928
  throw new TypeError("Expected a string");
@@ -60260,6 +60054,8 @@ var require_parse = __commonJS((exports, module) => {
60260
60054
  token.prev = prev;
60261
60055
  token.parens = state.parens;
60262
60056
  token.output = state.output;
60057
+ token.startIndex = state.index;
60058
+ token.tokensIndex = tokens.length;
60263
60059
  const output = (opts.capture ? "(" : "") + token.open;
60264
60060
  increment("parens");
60265
60061
  push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
@@ -60267,6 +60063,26 @@ var require_parse = __commonJS((exports, module) => {
60267
60063
  extglobs.push(token);
60268
60064
  };
60269
60065
  const extglobClose = (token) => {
60066
+ const literal2 = input.slice(token.startIndex, state.index + 1);
60067
+ const body = input.slice(token.startIndex + 2, state.index);
60068
+ const analysis = analyzeRepeatedExtglob(body, opts);
60069
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
60070
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : undefined;
60071
+ const open = tokens[token.tokensIndex];
60072
+ open.type = "text";
60073
+ open.value = literal2;
60074
+ open.output = safeOutput || utils.escapeRegex(literal2);
60075
+ for (let i = token.tokensIndex + 1;i < tokens.length; i++) {
60076
+ tokens[i].value = "";
60077
+ tokens[i].output = "";
60078
+ delete tokens[i].suffix;
60079
+ }
60080
+ state.output = token.output + open.output;
60081
+ state.backtrack = true;
60082
+ push({ type: "paren", extglob: true, value, output: "" });
60083
+ decrement("parens");
60084
+ return;
60085
+ }
60270
60086
  let output = token.close + (opts.capture ? ")" : "");
60271
60087
  let rest2;
60272
60088
  if (token.type === "negate") {
@@ -60875,7 +60691,7 @@ var require_parse = __commonJS((exports, module) => {
60875
60691
  module.exports = parse5;
60876
60692
  });
60877
60693
 
60878
- // node_modules/picomatch/lib/picomatch.js
60694
+ // node_modules/tinyglobby/node_modules/picomatch/lib/picomatch.js
60879
60695
  var require_picomatch = __commonJS((exports, module) => {
60880
60696
  var scan = require_scan();
60881
60697
  var parse5 = require_parse();
@@ -60901,17 +60717,17 @@ var require_picomatch = __commonJS((exports, module) => {
60901
60717
  }
60902
60718
  const opts = options || {};
60903
60719
  const posix = opts.windows;
60904
- const regex3 = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
60905
- const state = regex3.state;
60906
- delete regex3.state;
60720
+ const regex2 = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
60721
+ const state = regex2.state;
60722
+ delete regex2.state;
60907
60723
  let isIgnored = () => false;
60908
60724
  if (opts.ignore) {
60909
60725
  const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
60910
60726
  isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
60911
60727
  }
60912
60728
  const matcher = (input, returnObject = false) => {
60913
- const { isMatch: isMatch2, match, output } = picomatch.test(input, regex3, options, { glob, posix });
60914
- const result2 = { glob, state, regex: regex3, posix, input, output, match, isMatch: isMatch2 };
60729
+ const { isMatch: isMatch2, match, output } = picomatch.test(input, regex2, options, { glob, posix });
60730
+ const result2 = { glob, state, regex: regex2, posix, input, output, match, isMatch: isMatch2 };
60915
60731
  if (typeof opts.onResult === "function") {
60916
60732
  opts.onResult(result2);
60917
60733
  }
@@ -60936,7 +60752,7 @@ var require_picomatch = __commonJS((exports, module) => {
60936
60752
  }
60937
60753
  return matcher;
60938
60754
  };
60939
- picomatch.test = (input, regex3, options, { glob, posix } = {}) => {
60755
+ picomatch.test = (input, regex2, options, { glob, posix } = {}) => {
60940
60756
  if (typeof input !== "string") {
60941
60757
  throw new TypeError("Expected input to be a string");
60942
60758
  }
@@ -60953,16 +60769,16 @@ var require_picomatch = __commonJS((exports, module) => {
60953
60769
  }
60954
60770
  if (match === false || opts.capture === true) {
60955
60771
  if (opts.matchBase === true || opts.basename === true) {
60956
- match = picomatch.matchBase(input, regex3, options, posix);
60772
+ match = picomatch.matchBase(input, regex2, options, posix);
60957
60773
  } else {
60958
- match = regex3.exec(output);
60774
+ match = regex2.exec(output);
60959
60775
  }
60960
60776
  }
60961
60777
  return { isMatch: Boolean(match), match, output };
60962
60778
  };
60963
60779
  picomatch.matchBase = (input, glob, options) => {
60964
- const regex3 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
60965
- return regex3.test(utils.basename(input));
60780
+ const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
60781
+ return regex2.test(utils.basename(input));
60966
60782
  };
60967
60783
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
60968
60784
  picomatch.parse = (pattern, options) => {
@@ -60982,11 +60798,11 @@ var require_picomatch = __commonJS((exports, module) => {
60982
60798
  if (state && state.negated === true) {
60983
60799
  source = `^(?!${source}).*$`;
60984
60800
  }
60985
- const regex3 = picomatch.toRegex(source, options);
60801
+ const regex2 = picomatch.toRegex(source, options);
60986
60802
  if (returnState === true) {
60987
- regex3.state = state;
60803
+ regex2.state = state;
60988
60804
  }
60989
- return regex3;
60805
+ return regex2;
60990
60806
  };
60991
60807
  picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
60992
60808
  if (!input || typeof input !== "string") {
@@ -61015,7 +60831,7 @@ var require_picomatch = __commonJS((exports, module) => {
61015
60831
  module.exports = picomatch;
61016
60832
  });
61017
60833
 
61018
- // node_modules/picomatch/index.js
60834
+ // node_modules/tinyglobby/node_modules/picomatch/index.js
61019
60835
  var require_picomatch2 = __commonJS((exports, module) => {
61020
60836
  var pico = require_picomatch();
61021
60837
  var utils = require_utils();
@@ -61030,20 +60846,20 @@ var require_picomatch2 = __commonJS((exports, module) => {
61030
60846
  });
61031
60847
 
61032
60848
  // node_modules/tinyglobby/dist/index.mjs
61033
- import nativeFs2 from "fs";
61034
- import path4, { posix } from "path";
60849
+ import { readdir, readdirSync, realpath, realpathSync, stat, statSync as statSync3 } from "fs";
60850
+ import { isAbsolute, posix, resolve as resolve2 } from "path";
61035
60851
  import { fileURLToPath } from "url";
61036
60852
  function getPartialMatcher(patterns, options = {}) {
61037
60853
  const patternsCount = patterns.length;
61038
60854
  const patternsParts = Array(patternsCount);
61039
60855
  const matchers = Array(patternsCount);
61040
- const globstarEnabled = !options.noglobstar;
61041
- for (let i = 0;i < patternsCount; i++) {
60856
+ let i, j;
60857
+ for (i = 0;i < patternsCount; i++) {
61042
60858
  const parts = splitPattern(patterns[i]);
61043
60859
  patternsParts[i] = parts;
61044
60860
  const partsCount = parts.length;
61045
60861
  const partMatchers = Array(partsCount);
61046
- for (let j = 0;j < partsCount; j++)
60862
+ for (j = 0;j < partsCount; j++)
61047
60863
  partMatchers[j] = import_picomatch.default(parts[j], options);
61048
60864
  matchers[i] = partMatchers;
61049
60865
  }
@@ -61051,20 +60867,19 @@ function getPartialMatcher(patterns, options = {}) {
61051
60867
  const inputParts = input.split("/");
61052
60868
  if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input))
61053
60869
  return true;
61054
- for (let i = 0;i < patterns.length; i++) {
60870
+ for (i = 0;i < patternsCount; i++) {
61055
60871
  const patternParts = patternsParts[i];
61056
60872
  const matcher = matchers[i];
61057
60873
  const inputPatternCount = inputParts.length;
61058
60874
  const minParts = Math.min(inputPatternCount, patternParts.length);
61059
- let j = 0;
60875
+ j = 0;
61060
60876
  while (j < minParts) {
61061
60877
  const part = patternParts[j];
61062
60878
  if (part.includes("/"))
61063
60879
  return true;
61064
- const match = matcher[j](inputParts[j]);
61065
- if (!match)
60880
+ if (!matcher[j](inputParts[j]))
61066
60881
  break;
61067
- if (globstarEnabled && part === "**")
60882
+ if (!options.noglobstar && part === "**")
61068
60883
  return true;
61069
60884
  j++;
61070
60885
  }
@@ -61077,7 +60892,7 @@ function getPartialMatcher(patterns, options = {}) {
61077
60892
  function buildFormat(cwd2, root, absolute) {
61078
60893
  if (cwd2 === root || root.startsWith(`${cwd2}/`)) {
61079
60894
  if (absolute) {
61080
- const start = isRoot(cwd2) ? cwd2.length : cwd2.length + 1;
60895
+ const start = cwd2.length + +!isRoot(cwd2);
61081
60896
  return (p, isDir) => p.slice(start, isDir ? -1 : undefined) || ".";
61082
60897
  }
61083
60898
  const prefix = root.slice(cwd2.length + 1);
@@ -61101,15 +60916,13 @@ function buildRelative(cwd2, root) {
61101
60916
  }
61102
60917
  return (p) => {
61103
60918
  const result2 = posix.relative(cwd2, `${root}/${p}`);
61104
- if (p.endsWith("/") && result2 !== "")
61105
- return `${result2}/`;
61106
- return result2 || ".";
60919
+ return p[p.length - 1] === "/" && result2 !== "" ? `${result2}/` : result2 || ".";
61107
60920
  };
61108
60921
  }
61109
- function splitPattern(path$1) {
60922
+ function splitPattern(path4) {
61110
60923
  var _result$parts;
61111
- const result2 = import_picomatch.default.scan(path$1, splitPatternOptions);
61112
- return ((_result$parts = result2.parts) === null || _result$parts === undefined ? undefined : _result$parts.length) ? result2.parts : [path$1];
60924
+ const result2 = import_picomatch.default.scan(path4, splitPatternOptions);
60925
+ return ((_result$parts = result2.parts) === null || _result$parts === undefined ? undefined : _result$parts.length) ? result2.parts : [path4];
61113
60926
  }
61114
60927
  function isDynamicPattern(pattern, options) {
61115
60928
  if ((options === null || options === undefined ? undefined : options.caseSensitiveMatch) === false)
@@ -61120,29 +60933,31 @@ function isDynamicPattern(pattern, options) {
61120
60933
  function log(...tasks) {
61121
60934
  console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
61122
60935
  }
61123
- function normalizePattern(pattern, expandDirectories, cwd2, props, isIgnore) {
60936
+ function ensureStringArray(value) {
60937
+ return typeof value === "string" ? [value] : value !== null && value !== undefined ? value : [];
60938
+ }
60939
+ function normalizePattern(pattern, opts, props, isIgnore) {
60940
+ var _PARENT_DIRECTORY$exe;
60941
+ const cwd2 = opts.cwd;
61124
60942
  let result2 = pattern;
61125
- if (pattern.endsWith("/"))
60943
+ if (pattern[pattern.length - 1] === "/")
61126
60944
  result2 = pattern.slice(0, -1);
61127
- if (!result2.endsWith("*") && expandDirectories)
60945
+ if (result2[result2.length - 1] !== "*" && opts.expandDirectories)
61128
60946
  result2 += "/**";
61129
60947
  const escapedCwd = escapePath(cwd2);
61130
- if (path4.isAbsolute(result2.replace(ESCAPING_BACKSLASHES, "")))
61131
- result2 = posix.relative(escapedCwd, result2);
61132
- else
61133
- result2 = posix.normalize(result2);
61134
- const parentDirectoryMatch = PARENT_DIRECTORY.exec(result2);
60948
+ result2 = isAbsolute(result2.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result2) : posix.normalize(result2);
60949
+ const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result2)) === null || _PARENT_DIRECTORY$exe === undefined ? undefined : _PARENT_DIRECTORY$exe[0];
61135
60950
  const parts = splitPattern(result2);
61136
- if (parentDirectoryMatch === null || parentDirectoryMatch === undefined ? undefined : parentDirectoryMatch[0]) {
61137
- const n = (parentDirectoryMatch[0].length + 1) / 3;
60951
+ if (parentDir) {
60952
+ const n = (parentDir.length + 1) / 3;
61138
60953
  let i = 0;
61139
60954
  const cwdParts = escapedCwd.split("/");
61140
60955
  while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
61141
60956
  result2 = result2.slice(0, (n - i - 1) * 3) + result2.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
61142
60957
  i++;
61143
60958
  }
61144
- const potentialRoot = posix.join(cwd2, parentDirectoryMatch[0].slice(i * 3));
61145
- if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) {
60959
+ const potentialRoot = posix.join(cwd2, parentDir.slice(i * 3));
60960
+ if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
61146
60961
  props.root = potentialRoot;
61147
60962
  props.depthOffset = -n + i;
61148
60963
  }
@@ -61158,7 +60973,7 @@ function normalizePattern(pattern, expandDirectories, cwd2, props, isIgnore) {
61158
60973
  newCommonPath.pop();
61159
60974
  break;
61160
60975
  }
61161
- if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1)
60976
+ if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part))
61162
60977
  break;
61163
60978
  newCommonPath.push(part);
61164
60979
  }
@@ -61168,162 +60983,138 @@ function normalizePattern(pattern, expandDirectories, cwd2, props, isIgnore) {
61168
60983
  }
61169
60984
  return result2;
61170
60985
  }
61171
- function processPatterns({ patterns = ["**/*"], ignore = [], expandDirectories = true }, cwd2, props) {
61172
- if (typeof patterns === "string")
61173
- patterns = [patterns];
61174
- if (typeof ignore === "string")
61175
- ignore = [ignore];
60986
+ function processPatterns(options, patterns, props) {
61176
60987
  const matchPatterns = [];
61177
60988
  const ignorePatterns = [];
61178
- for (const pattern of ignore) {
60989
+ for (const pattern of options.ignore) {
61179
60990
  if (!pattern)
61180
60991
  continue;
61181
60992
  if (pattern[0] !== "!" || pattern[1] === "(")
61182
- ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd2, props, true));
60993
+ ignorePatterns.push(normalizePattern(pattern, options, props, true));
61183
60994
  }
61184
60995
  for (const pattern of patterns) {
61185
60996
  if (!pattern)
61186
60997
  continue;
61187
60998
  if (pattern[0] !== "!" || pattern[1] === "(")
61188
- matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd2, props, false));
60999
+ matchPatterns.push(normalizePattern(pattern, options, props, false));
61189
61000
  else if (pattern[1] !== "!" || pattern[2] === "(")
61190
- ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd2, props, true));
61001
+ ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
61191
61002
  }
61192
61003
  return {
61193
61004
  match: matchPatterns,
61194
61005
  ignore: ignorePatterns
61195
61006
  };
61196
61007
  }
61197
- function formatPaths(paths, relative2) {
61198
- for (let i = paths.length - 1;i >= 0; i--) {
61199
- const path$1 = paths[i];
61200
- paths[i] = relative2(path$1);
61201
- }
61202
- return paths;
61203
- }
61204
- function normalizeCwd(cwd2) {
61205
- if (!cwd2)
61206
- return process.cwd().replace(BACKSLASHES, "/");
61207
- if (cwd2 instanceof URL)
61208
- return fileURLToPath(cwd2).replace(BACKSLASHES, "/");
61209
- return path4.resolve(cwd2).replace(BACKSLASHES, "/");
61210
- }
61211
- function getCrawler(patterns, inputOptions = {}) {
61212
- const options = process.env.TINYGLOBBY_DEBUG ? {
61213
- ...inputOptions,
61214
- debug: true
61215
- } : inputOptions;
61216
- const cwd2 = normalizeCwd(options.cwd);
61217
- if (options.debug)
61218
- log("globbing with:", {
61219
- patterns,
61220
- options,
61221
- cwd: cwd2
61222
- });
61223
- if (Array.isArray(patterns) && patterns.length === 0)
61224
- return [{
61225
- sync: () => [],
61226
- withPromise: async () => []
61227
- }, false];
61008
+ function buildCrawler(options, patterns) {
61009
+ const cwd2 = options.cwd;
61228
61010
  const props = {
61229
61011
  root: cwd2,
61230
- commonPath: null,
61231
61012
  depthOffset: 0
61232
61013
  };
61233
- const processed = processPatterns({
61234
- ...options,
61235
- patterns
61236
- }, cwd2, props);
61014
+ const processed = processPatterns(options, patterns, props);
61237
61015
  if (options.debug)
61238
61016
  log("internal processing patterns:", processed);
61017
+ const { absolute, caseSensitiveMatch, debug: debug3, dot, followSymbolicLinks, onlyDirectories } = options;
61018
+ const root = props.root.replace(BACKSLASHES, "");
61239
61019
  const matchOptions = {
61240
- dot: options.dot,
61020
+ dot,
61241
61021
  nobrace: options.braceExpansion === false,
61242
- nocase: options.caseSensitiveMatch === false,
61022
+ nocase: !caseSensitiveMatch,
61243
61023
  noextglob: options.extglob === false,
61244
61024
  noglobstar: options.globstar === false,
61245
61025
  posix: true
61246
61026
  };
61247
- const matcher = import_picomatch.default(processed.match, {
61248
- ...matchOptions,
61249
- ignore: processed.ignore
61250
- });
61027
+ const matcher = import_picomatch.default(processed.match, matchOptions);
61251
61028
  const ignore = import_picomatch.default(processed.ignore, matchOptions);
61252
61029
  const partialMatcher = getPartialMatcher(processed.match, matchOptions);
61253
- const format = buildFormat(cwd2, props.root, options.absolute);
61254
- const formatExclude = options.absolute ? format : buildFormat(cwd2, props.root, true);
61255
- const fdirOptions = {
61256
- filters: [options.debug ? (p, isDirectory) => {
61257
- const path$1 = format(p, isDirectory);
61258
- const matches2 = matcher(path$1);
61030
+ const format = buildFormat(cwd2, root, absolute);
61031
+ const excludeFormatter = absolute ? format : buildFormat(cwd2, root, true);
61032
+ const excludePredicate = (_, p) => {
61033
+ const relativePath = excludeFormatter(p, true);
61034
+ return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
61035
+ };
61036
+ let maxDepth;
61037
+ if (options.deep !== undefined)
61038
+ maxDepth = Math.round(options.deep - props.depthOffset);
61039
+ const crawler = new Builder({
61040
+ filters: [debug3 ? (p, isDirectory) => {
61041
+ const path4 = format(p, isDirectory);
61042
+ const matches2 = matcher(path4) && !ignore(path4);
61259
61043
  if (matches2)
61260
- log(`matched ${path$1}`);
61044
+ log(`matched ${path4}`);
61261
61045
  return matches2;
61262
- } : (p, isDirectory) => matcher(format(p, isDirectory))],
61263
- exclude: options.debug ? (_, p) => {
61264
- const relativePath = formatExclude(p, true);
61265
- const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
61266
- if (skipped)
61267
- log(`skipped ${p}`);
61268
- else
61269
- log(`crawling ${p}`);
61046
+ } : (p, isDirectory) => {
61047
+ const path4 = format(p, isDirectory);
61048
+ return matcher(path4) && !ignore(path4);
61049
+ }],
61050
+ exclude: debug3 ? (_, p) => {
61051
+ const skipped = excludePredicate(_, p);
61052
+ log(`${skipped ? "skipped" : "crawling"} ${p}`);
61270
61053
  return skipped;
61271
- } : (_, p) => {
61272
- const relativePath = formatExclude(p, true);
61273
- return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
61274
- },
61275
- fs: options.fs ? {
61276
- readdir: options.fs.readdir || nativeFs2.readdir,
61277
- readdirSync: options.fs.readdirSync || nativeFs2.readdirSync,
61278
- realpath: options.fs.realpath || nativeFs2.realpath,
61279
- realpathSync: options.fs.realpathSync || nativeFs2.realpathSync,
61280
- stat: options.fs.stat || nativeFs2.stat,
61281
- statSync: options.fs.statSync || nativeFs2.statSync
61282
- } : undefined,
61054
+ } : excludePredicate,
61055
+ fs: options.fs,
61283
61056
  pathSeparator: "/",
61284
- relativePaths: true,
61285
- resolveSymlinks: true,
61057
+ relativePaths: !absolute,
61058
+ resolvePaths: absolute,
61059
+ includeBasePath: absolute,
61060
+ resolveSymlinks: followSymbolicLinks,
61061
+ excludeSymlinks: !followSymbolicLinks,
61062
+ excludeFiles: onlyDirectories,
61063
+ includeDirs: onlyDirectories || !options.onlyFiles,
61064
+ maxDepth,
61286
61065
  signal: options.signal
61287
- };
61288
- if (options.deep !== undefined)
61289
- fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset);
61290
- if (options.absolute) {
61291
- fdirOptions.relativePaths = false;
61292
- fdirOptions.resolvePaths = true;
61293
- fdirOptions.includeBasePath = true;
61294
- }
61295
- if (options.followSymbolicLinks === false) {
61296
- fdirOptions.resolveSymlinks = false;
61297
- fdirOptions.excludeSymlinks = true;
61298
- }
61299
- if (options.onlyDirectories) {
61300
- fdirOptions.excludeFiles = true;
61301
- fdirOptions.includeDirs = true;
61302
- } else if (options.onlyFiles === false)
61303
- fdirOptions.includeDirs = true;
61304
- props.root = props.root.replace(BACKSLASHES, "");
61305
- const root = props.root;
61066
+ }).crawl(root);
61306
61067
  if (options.debug)
61307
- log("internal properties:", props);
61308
- const relative2 = cwd2 !== root && !options.absolute && buildRelative(cwd2, props.root);
61309
- return [new Builder(fdirOptions).crawl(root), relative2];
61068
+ log("internal properties:", {
61069
+ ...props,
61070
+ root
61071
+ });
61072
+ return [crawler, cwd2 !== root && !absolute && buildRelative(cwd2, root)];
61073
+ }
61074
+ function formatPaths(paths, mapper) {
61075
+ if (mapper)
61076
+ for (let i = paths.length - 1;i >= 0; i--)
61077
+ paths[i] = mapper(paths[i]);
61078
+ return paths;
61079
+ }
61080
+ function getOptions2(options) {
61081
+ const opts = {
61082
+ ...defaultOptions,
61083
+ ...options
61084
+ };
61085
+ opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve2(opts.cwd)).replace(BACKSLASHES, "/");
61086
+ opts.ignore = ensureStringArray(opts.ignore);
61087
+ opts.fs && (opts.fs = {
61088
+ readdir: opts.fs.readdir || readdir,
61089
+ readdirSync: opts.fs.readdirSync || readdirSync,
61090
+ realpath: opts.fs.realpath || realpath,
61091
+ realpathSync: opts.fs.realpathSync || realpathSync,
61092
+ stat: opts.fs.stat || stat,
61093
+ statSync: opts.fs.statSync || statSync3
61094
+ });
61095
+ if (opts.debug)
61096
+ log("globbing with options:", opts);
61097
+ return opts;
61310
61098
  }
61311
- function globSync(patternsOrOptions, options) {
61312
- if (patternsOrOptions && (options === null || options === undefined ? undefined : options.patterns))
61099
+ function getCrawler(globInput, inputOptions = {}) {
61100
+ var _ref;
61101
+ if (globInput && (inputOptions === null || inputOptions === undefined ? undefined : inputOptions.patterns))
61313
61102
  throw new Error("Cannot pass patterns as both an argument and an option");
61314
- const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
61315
- const opts = isModern ? options : patternsOrOptions;
61316
- const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns;
61317
- const [crawler, relative2] = getCrawler(patterns, opts);
61318
- if (!relative2)
61319
- return crawler.sync();
61320
- return formatPaths(crawler.sync(), relative2);
61321
- }
61322
- var import_picomatch, isReadonlyArray, isWin, ONLY_PARENT_DIRECTORIES, WIN32_ROOT_DIR, isRoot, splitPatternOptions, POSIX_UNESCAPED_GLOB_SYMBOLS, WIN32_UNESCAPED_GLOB_SYMBOLS, escapePosixPath = (path$1) => path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&"), escapeWin32Path = (path$1) => path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&"), escapePath, PARENT_DIRECTORY, ESCAPING_BACKSLASHES, BACKSLASHES;
61323
- var init_dist5 = __esm(() => {
61324
- init_dist4();
61103
+ const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
61104
+ const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== undefined ? _ref : "**/*");
61105
+ const options = getOptions2(isModern ? inputOptions : globInput);
61106
+ return patterns.length > 0 ? buildCrawler(options, patterns) : [];
61107
+ }
61108
+ function globSync(globInput, options) {
61109
+ const [crawler, relative2] = getCrawler(globInput, options);
61110
+ return crawler ? formatPaths(crawler.sync(), relative2) : [];
61111
+ }
61112
+ var import_picomatch, isReadonlyArray, BACKSLASHES, isWin, ONLY_PARENT_DIRECTORIES, WIN32_ROOT_DIR, isRoot, splitPatternOptions, POSIX_UNESCAPED_GLOB_SYMBOLS, WIN32_UNESCAPED_GLOB_SYMBOLS, escapePosixPath = (path4) => path4.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&"), escapeWin32Path = (path4) => path4.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&"), escapePath, PARENT_DIRECTORY, ESCAPING_BACKSLASHES, defaultOptions;
61113
+ var init_dist7 = __esm(() => {
61114
+ init_dist6();
61325
61115
  import_picomatch = __toESM(require_picomatch2(), 1);
61326
61116
  isReadonlyArray = Array.isArray;
61117
+ BACKSLASHES = /\\/g;
61327
61118
  isWin = process.platform === "win32";
61328
61119
  ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
61329
61120
  WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
@@ -61334,7 +61125,14 @@ var init_dist5 = __esm(() => {
61334
61125
  escapePath = isWin ? escapeWin32Path : escapePosixPath;
61335
61126
  PARENT_DIRECTORY = /^(\/?\.\.)+/;
61336
61127
  ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
61337
- BACKSLASHES = /\\/g;
61128
+ defaultOptions = {
61129
+ caseSensitiveMatch: true,
61130
+ cwd: process.cwd(),
61131
+ debug: !!process.env.TINYGLOBBY_DEBUG,
61132
+ expandDirectories: true,
61133
+ followSymbolicLinks: true,
61134
+ onlyFiles: true
61135
+ };
61338
61136
  });
61339
61137
 
61340
61138
  // src/utils/jsonl-lines.ts
@@ -61367,7 +61165,7 @@ var init_jsonl_lines = __esm(() => {
61367
61165
 
61368
61166
  // src/utils/jsonl-blocks.ts
61369
61167
  import * as fs5 from "fs";
61370
- import path5 from "node:path";
61168
+ import path4 from "node:path";
61371
61169
  function getBlockMetrics() {
61372
61170
  const claudeDir = getClaudeConfigDir();
61373
61171
  if (!claudeDir)
@@ -61381,7 +61179,7 @@ function getBlockMetrics() {
61381
61179
  function findMostRecentBlockStartTime(rootDir, sessionDurationHours = 5) {
61382
61180
  const sessionDurationMs = sessionDurationHours * 60 * 60 * 1000;
61383
61181
  const now2 = new Date;
61384
- const pattern = path5.posix.join(rootDir.replace(/\\/g, "/"), "projects", "**", "*.jsonl");
61182
+ const pattern = path4.posix.join(rootDir.replace(/\\/g, "/"), "projects", "**", "*.jsonl");
61385
61183
  const files = globSync([pattern], {
61386
61184
  absolute: true,
61387
61185
  cwd: rootDir
@@ -61389,7 +61187,7 @@ function findMostRecentBlockStartTime(rootDir, sessionDurationHours = 5) {
61389
61187
  if (files.length === 0)
61390
61188
  return null;
61391
61189
  const filesWithStats = files.map((file2) => {
61392
- const stats = statSync4(file2);
61190
+ const stats = statSync5(file2);
61393
61191
  return { file: file2, mtime: stats.mtime };
61394
61192
  });
61395
61193
  filesWithStats.sort((a, b) => b.mtime.getTime() - a.mtime.getTime());
@@ -61507,26 +61305,26 @@ function floorToHour(timestamp) {
61507
61305
  floored.setUTCMinutes(0, 0, 0);
61508
61306
  return floored;
61509
61307
  }
61510
- var statSync4;
61308
+ var statSync5;
61511
61309
  var init_jsonl_blocks = __esm(() => {
61512
- init_dist5();
61310
+ init_dist7();
61513
61311
  init_claude_settings();
61514
61312
  init_jsonl_lines();
61515
- statSync4 = fs5.statSync;
61313
+ statSync5 = fs5.statSync;
61516
61314
  });
61517
61315
 
61518
61316
  // src/utils/jsonl-cache.ts
61519
61317
  import * as fs6 from "fs";
61520
61318
  import { createHash as createHash2 } from "node:crypto";
61521
61319
  import os5 from "node:os";
61522
- import path6 from "node:path";
61320
+ import path5 from "node:path";
61523
61321
  function normalizeConfigDir(configDir) {
61524
- return path6.resolve(configDir);
61322
+ return path5.resolve(configDir);
61525
61323
  }
61526
61324
  function getBlockCachePath(configDir = getClaudeConfigDir()) {
61527
61325
  const normalizedConfigDir = normalizeConfigDir(configDir);
61528
61326
  const configHash = createHash2("sha256").update(normalizedConfigDir).digest("hex").slice(0, 16);
61529
- return path6.join(os5.homedir(), ".cache", "ccstatusline", `block-cache-${configHash}.json`);
61327
+ return path5.join(os5.homedir(), ".cache", "ccstatusline", `block-cache-${configHash}.json`);
61530
61328
  }
61531
61329
  function readBlockCache(expectedConfigDir) {
61532
61330
  try {
@@ -61561,7 +61359,7 @@ function writeBlockCache(startTime, configDir = getClaudeConfigDir()) {
61561
61359
  try {
61562
61360
  const normalizedConfigDir = normalizeConfigDir(configDir);
61563
61361
  const cachePath = getBlockCachePath(normalizedConfigDir);
61564
- const cacheDir = path6.dirname(cachePath);
61362
+ const cacheDir = path5.dirname(cachePath);
61565
61363
  if (!existsSync6(cacheDir)) {
61566
61364
  mkdirSync4(cacheDir, { recursive: true });
61567
61365
  }
@@ -61604,7 +61402,7 @@ var init_jsonl_cache = __esm(() => {
61604
61402
 
61605
61403
  // src/utils/jsonl-metrics.ts
61606
61404
  import * as fs7 from "fs";
61607
- import path7 from "node:path";
61405
+ import path6 from "node:path";
61608
61406
  function collectAgentIds(value, agentIds) {
61609
61407
  if (!value || typeof value !== "object") {
61610
61408
  return;
@@ -61900,11 +61698,11 @@ function getSubagentTranscriptPaths(transcriptPath, referencedAgentIds) {
61900
61698
  if (referencedAgentIds.size === 0) {
61901
61699
  return [];
61902
61700
  }
61903
- const transcriptDir = path7.dirname(transcriptPath);
61904
- const transcriptStem = path7.parse(transcriptPath).name;
61701
+ const transcriptDir = path6.dirname(transcriptPath);
61702
+ const transcriptStem = path6.parse(transcriptPath).name;
61905
61703
  const candidateDirs = [
61906
- path7.join(transcriptDir, "subagents"),
61907
- path7.join(transcriptDir, transcriptStem, "subagents")
61704
+ path6.join(transcriptDir, "subagents"),
61705
+ path6.join(transcriptDir, transcriptStem, "subagents")
61908
61706
  ];
61909
61707
  const seenPaths = new Set;
61910
61708
  const matchedPaths = [];
@@ -61925,7 +61723,7 @@ function getSubagentTranscriptPaths(transcriptPath, referencedAgentIds) {
61925
61723
  if (!referencedAgentIds.has(match[1])) {
61926
61724
  continue;
61927
61725
  }
61928
- const fullPath = path7.join(subagentsDir, entry.name);
61726
+ const fullPath = path6.join(subagentsDir, entry.name);
61929
61727
  if (seenPaths.has(fullPath)) {
61930
61728
  continue;
61931
61729
  }
@@ -61996,8 +61794,11 @@ function normalizeThinkingEffort(value) {
61996
61794
  return;
61997
61795
  }
61998
61796
  const normalized = value.toLowerCase();
61999
- if (normalized === "low" || normalized === "medium" || normalized === "high" || normalized === "max") {
62000
- return normalized;
61797
+ if (KNOWN_THINKING_EFFORTS_SET.has(normalized)) {
61798
+ return { value: normalized, known: true };
61799
+ }
61800
+ if (UNKNOWN_EFFORT_PATTERN.test(normalized)) {
61801
+ return { value: normalized, known: false };
62001
61802
  }
62002
61803
  return;
62003
61804
  }
@@ -62028,11 +61829,14 @@ function getTranscriptThinkingEffort(transcriptPath) {
62028
61829
  }
62029
61830
  return;
62030
61831
  }
62031
- var MODEL_STDOUT_PREFIX = "<local-command-stdout>Set model to ", MODEL_STDOUT_EFFORT_REGEX;
61832
+ var KNOWN_THINKING_EFFORTS, KNOWN_THINKING_EFFORTS_SET, MODEL_STDOUT_PREFIX = "<local-command-stdout>Set model to ", MODEL_STDOUT_EFFORT_REGEX, UNKNOWN_EFFORT_PATTERN;
62032
61833
  var init_jsonl_metadata = __esm(() => {
62033
61834
  init_ansi();
62034
61835
  init_jsonl_lines();
62035
- MODEL_STDOUT_EFFORT_REGEX = /^<local-command-stdout>Set model to[\s\S]*? with (low|medium|high|max) effort<\/local-command-stdout>$/i;
61836
+ KNOWN_THINKING_EFFORTS = ["low", "medium", "high", "xhigh", "max"];
61837
+ KNOWN_THINKING_EFFORTS_SET = new Set(KNOWN_THINKING_EFFORTS);
61838
+ MODEL_STDOUT_EFFORT_REGEX = /^<local-command-stdout>Set model to[\s\S]*? with ([a-zA-Z0-9-]+) effort<\/local-command-stdout>$/i;
61839
+ UNKNOWN_EFFORT_PATTERN = /^(?=.*[a-z0-9])[a-z0-9-]{2,20}$/;
62036
61840
  });
62037
61841
 
62038
61842
  // src/utils/jsonl.ts
@@ -62461,27 +62265,27 @@ class CurrentWorkingDirWidget {
62461
62265
  supportsColors(item) {
62462
62266
  return true;
62463
62267
  }
62464
- abbreviateHomeDir(path8) {
62268
+ abbreviateHomeDir(path7) {
62465
62269
  const homeDir = os6.homedir();
62466
- if (path8 === homeDir) {
62270
+ if (path7 === homeDir) {
62467
62271
  return "~";
62468
62272
  }
62469
- if (path8.startsWith(homeDir)) {
62470
- const boundaryChar = path8[homeDir.length];
62273
+ if (path7.startsWith(homeDir)) {
62274
+ const boundaryChar = path7[homeDir.length];
62471
62275
  if (boundaryChar !== "/" && boundaryChar !== "\\") {
62472
- return path8;
62276
+ return path7;
62473
62277
  }
62474
- return "~" + path8.slice(homeDir.length);
62278
+ return "~" + path7.slice(homeDir.length);
62475
62279
  }
62476
- return path8;
62280
+ return path7;
62477
62281
  }
62478
- abbreviatePath(path8) {
62282
+ abbreviatePath(path7) {
62479
62283
  const homeDir = os6.homedir();
62480
- const useBackslash = path8.includes("\\") && !path8.includes("/");
62284
+ const useBackslash = path7.includes("\\") && !path7.includes("/");
62481
62285
  const sep2 = useBackslash ? "\\" : "/";
62482
- let normalizedPath = path8;
62483
- if (path8.startsWith(homeDir)) {
62484
- normalizedPath = "~" + path8.slice(homeDir.length);
62286
+ let normalizedPath = path7;
62287
+ if (path7.startsWith(homeDir)) {
62288
+ normalizedPath = "~" + path7.slice(homeDir.length);
62485
62289
  }
62486
62290
  const parts = normalizedPath.split(/[\\/]+/).filter((part) => part !== "");
62487
62291
  const abbreviated = parts.map((part, index) => {
@@ -62610,7 +62414,7 @@ class ClaudeSessionIdWidget {
62610
62414
 
62611
62415
  // src/widgets/ClaudeAccountEmail.ts
62612
62416
  import * as fs8 from "fs";
62613
- import * as path8 from "path";
62417
+ import * as path7 from "path";
62614
62418
 
62615
62419
  class ClaudeAccountEmailWidget {
62616
62420
  getDefaultColor() {
@@ -62634,8 +62438,8 @@ class ClaudeAccountEmailWidget {
62634
62438
  }
62635
62439
  try {
62636
62440
  const configDir = getClaudeConfigDir();
62637
- const claudeJsonPath = path8.join(configDir, "..", ".claude.json");
62638
- const resolved = path8.resolve(claudeJsonPath);
62441
+ const claudeJsonPath = path7.join(configDir, "..", ".claude.json");
62442
+ const resolved = path7.resolve(claudeJsonPath);
62639
62443
  if (!fs8.existsSync(resolved)) {
62640
62444
  return null;
62641
62445
  }
@@ -63183,6 +62987,21 @@ function formatCents(cents) {
63183
62987
  const symbol2 = getCurrencySymbol();
63184
62988
  return `${symbol2}${(cents / 100).toFixed(2)}`;
63185
62989
  }
62990
+ function getModelId(context) {
62991
+ const model = context.data?.model;
62992
+ return (typeof model === "string" ? model : model?.id) ?? "";
62993
+ }
62994
+ function isLocalModel(context) {
62995
+ const modelId = getModelId(context);
62996
+ if (modelId === "")
62997
+ return false;
62998
+ return !(modelId.includes("opus") || modelId.includes("sonnet") || modelId.includes("haiku"));
62999
+ }
63000
+ function renderLocalUsageFallback(label, shortLabel, size2) {
63001
+ if (size2 === "mobile")
63002
+ return `${shortLabel}: [░░░░] -.0%`;
63003
+ return `${label}: [░░░░░░░░░░░░░░░] -.0%`;
63004
+ }
63186
63005
 
63187
63006
  class SessionUsageWidget {
63188
63007
  getDefaultColor() {
@@ -63209,6 +63028,8 @@ class SessionUsageWidget {
63209
63028
  if (data.sessionUsage === undefined)
63210
63029
  return null;
63211
63030
  const size2 = getDisplaySize(context);
63031
+ if (isLocalModel(context))
63032
+ return renderLocalUsageFallback("Session", "S", size2);
63212
63033
  const extraUsed = data.extraUsageUsed;
63213
63034
  const extraLimit = data.extraUsageLimit;
63214
63035
  if (size2 !== "mobile" && data.extraUsageEnabled === true && extraUsed !== undefined && extraLimit !== undefined && data.sessionUsage >= 100 && (data.weeklyUsage === undefined || data.weeklyUsage < 100)) {
@@ -63250,6 +63071,8 @@ class WeeklyUsageWidget {
63250
63071
  if (data.weeklyUsage === undefined)
63251
63072
  return null;
63252
63073
  const size2 = getDisplaySize(context);
63074
+ if (isLocalModel(context))
63075
+ return renderLocalUsageFallback("Weekly", "W", size2);
63253
63076
  const extraUsed = data.extraUsageUsed;
63254
63077
  const extraLimit = data.extraUsageLimit;
63255
63078
  if (data.extraUsageEnabled === true && extraUsed !== undefined && extraLimit !== undefined && data.weeklyUsage >= 100) {
@@ -63288,12 +63111,13 @@ class ResetTimerWidget {
63288
63111
  const data = context.usageData ?? {};
63289
63112
  if (data.error)
63290
63113
  return getUsageErrorMessage(data.error);
63291
- const model = context.data?.model;
63292
- const modelId = (typeof model === "string" ? model : model?.id) ?? "";
63114
+ if (isLocalModel(context))
63115
+ return "-:00 hr";
63116
+ const modelId = getModelId(context);
63293
63117
  const is1mModel = modelId.includes("[1m]");
63294
63118
  const isOpus = modelId.includes("opus");
63295
63119
  const isChargedModel = is1mModel && !isOpus;
63296
- const extraActive = data.extraUsageEnabled && data.extraUsageUsed !== undefined && data.extraUsageLimit !== undefined && (data.weeklyUsage !== undefined && data.weeklyUsage >= 100 || data.sessionUsage !== undefined && data.sessionUsage >= 100 || isChargedModel);
63120
+ const extraActive = data.extraUsageEnabled && data.extraUsageUsed !== undefined && data.extraUsageLimit !== undefined && (data.weeklyUsage !== undefined && data.weeklyUsage >= 100 || isChargedModel);
63297
63121
  if (extraActive) {
63298
63122
  const weeklyWindow = resolveWeeklyUsageWindow(data);
63299
63123
  if (weeklyWindow) {
@@ -63347,6 +63171,8 @@ class ContextBarWidget {
63347
63171
  const cw = context.data?.context_window;
63348
63172
  if (!cw)
63349
63173
  return null;
63174
+ if (isLocalModel(context) && !getModelId(context).includes("qwen"))
63175
+ return renderLocalUsageFallback("Context", "C", getDisplaySize(context));
63350
63176
  const total = Number(cw.context_window_size) || 200000;
63351
63177
  let used = 0;
63352
63178
  if (typeof cw.current_usage === "number") {
@@ -63894,25 +63720,21 @@ var init_Skills = __esm(async () => {
63894
63720
  });
63895
63721
 
63896
63722
  // src/widgets/ThinkingEffort.ts
63897
- function normalizeThinkingEffort2(value) {
63898
- if (!value) {
63899
- return;
63900
- }
63901
- const normalized = value.toLowerCase();
63902
- if (normalized === "low" || normalized === "medium" || normalized === "high" || normalized === "max") {
63903
- return normalized;
63904
- }
63905
- return;
63906
- }
63907
63723
  function resolveThinkingEffortFromSettings() {
63908
63724
  try {
63909
63725
  const settings = loadClaudeSettingsSync({ logErrors: false });
63910
- return normalizeThinkingEffort2(settings.effortLevel);
63726
+ return normalizeThinkingEffort(settings.effortLevel);
63911
63727
  } catch {}
63912
63728
  return;
63913
63729
  }
63914
63730
  function resolveThinkingEffort(context) {
63915
- return getTranscriptThinkingEffort(context.data?.transcript_path) ?? resolveThinkingEffortFromSettings() ?? "medium";
63731
+ return getTranscriptThinkingEffort(context.data?.transcript_path) ?? resolveThinkingEffortFromSettings() ?? null;
63732
+ }
63733
+ function formatEffort(resolved) {
63734
+ if (!resolved) {
63735
+ return "default";
63736
+ }
63737
+ return resolved.known ? resolved.value : `${resolved.value}?`;
63916
63738
  }
63917
63739
 
63918
63740
  class ThinkingEffortWidget {
@@ -63920,7 +63742,8 @@ class ThinkingEffortWidget {
63920
63742
  return "magenta";
63921
63743
  }
63922
63744
  getDescription() {
63923
- return `Displays the current thinking effort level (low, medium, high, max).
63745
+ return `Displays the current thinking effort level (low, medium, high, xhigh, max).
63746
+ Unknown levels are shown with a trailing "?" (e.g. "super-max?").
63924
63747
  May be incorrect when multiple Claude Code sessions are running due to current Claude Code limitations.`;
63925
63748
  }
63926
63749
  getDisplayName() {
@@ -63936,7 +63759,7 @@ May be incorrect when multiple Claude Code sessions are running due to current C
63936
63759
  if (context.isPreview) {
63937
63760
  return item.rawValue ? "high" : "Thinking: high";
63938
63761
  }
63939
- const effort = resolveThinkingEffort(context);
63762
+ const effort = formatEffort(resolveThinkingEffort(context));
63940
63763
  return item.rawValue ? effort : `Thinking: ${effort}`;
63941
63764
  }
63942
63765
  supportsRawValue() {
@@ -64959,9 +64782,9 @@ var init_hooks = __esm(async () => {
64959
64782
  // src/utils/config.ts
64960
64783
  import * as fs10 from "fs";
64961
64784
  import * as os8 from "os";
64962
- import * as path9 from "path";
64785
+ import * as path8 from "path";
64963
64786
  function initConfigPath(filePath) {
64964
- settingsPath = filePath ? path9.resolve(filePath) : DEFAULT_SETTINGS_PATH;
64787
+ settingsPath = filePath ? path8.resolve(filePath) : DEFAULT_SETTINGS_PATH;
64965
64788
  }
64966
64789
  function getConfigPath() {
64967
64790
  return settingsPath;
@@ -64970,13 +64793,13 @@ function isCustomConfigPath() {
64970
64793
  return settingsPath !== DEFAULT_SETTINGS_PATH;
64971
64794
  }
64972
64795
  function getSettingsPaths() {
64973
- const configDir = path9.dirname(settingsPath);
64974
- const parsedPath = path9.parse(settingsPath);
64796
+ const configDir = path8.dirname(settingsPath);
64797
+ const parsedPath = path8.parse(settingsPath);
64975
64798
  const backupBaseName = parsedPath.ext ? `${parsedPath.name}.bak` : `${parsedPath.base}.bak`;
64976
64799
  return {
64977
64800
  configDir,
64978
64801
  settingsPath,
64979
- settingsBackupPath: path9.join(configDir, backupBaseName)
64802
+ settingsBackupPath: path8.join(configDir, backupBaseName)
64980
64803
  };
64981
64804
  }
64982
64805
  async function ensureDir(dir) {
@@ -65076,7 +64899,7 @@ var init_config = __esm(() => {
65076
64899
  readFile3 = fs10.promises.readFile;
65077
64900
  writeFile = fs10.promises.writeFile;
65078
64901
  mkdir = fs10.promises.mkdir;
65079
- DEFAULT_SETTINGS_PATH = path9.join(os8.homedir(), ".config", "ccstatusline", "settings.json");
64902
+ DEFAULT_SETTINGS_PATH = path8.join(os8.homedir(), ".config", "ccstatusline", "settings.json");
65080
64903
  settingsPath = DEFAULT_SETTINGS_PATH;
65081
64904
  });
65082
64905
 
@@ -65084,10 +64907,10 @@ var init_config = __esm(() => {
65084
64907
  import { execSync as execSync6 } from "child_process";
65085
64908
  import * as fs11 from "fs";
65086
64909
  import * as os9 from "os";
65087
- import * as path10 from "path";
64910
+ import * as path9 from "path";
65088
64911
  function isKnownCommand(command) {
65089
64912
  const prefixes = [CCSTATUSLINE_COMMANDS.NPM, CCSTATUSLINE_COMMANDS.BUNX, CCSTATUSLINE_COMMANDS.SELF_MANAGED];
65090
- return prefixes.some((prefix) => command === prefix || command.startsWith(`${prefix} --config `));
64913
+ return prefixes.some((prefix) => command === prefix || command.startsWith(`${prefix} --config `)) || /(?:^|[\s"'\\/])ccstatusline\.ts(?=$|[\s"'])/.test(command);
65091
64914
  }
65092
64915
  function needsQuoting(filePath) {
65093
64916
  if (process.platform === "win32") {
@@ -65108,7 +64931,7 @@ function getClaudeConfigDir() {
65108
64931
  const envConfigDir = process.env.CLAUDE_CONFIG_DIR;
65109
64932
  if (envConfigDir) {
65110
64933
  try {
65111
- const resolvedPath = path10.resolve(envConfigDir);
64934
+ const resolvedPath = path9.resolve(envConfigDir);
65112
64935
  if (fs11.existsSync(resolvedPath)) {
65113
64936
  const stats = fs11.statSync(resolvedPath);
65114
64937
  if (stats.isDirectory()) {
@@ -65119,10 +64942,10 @@ function getClaudeConfigDir() {
65119
64942
  }
65120
64943
  } catch {}
65121
64944
  }
65122
- return path10.join(os9.homedir(), ".claude");
64945
+ return path9.join(os9.homedir(), ".claude");
65123
64946
  }
65124
64947
  function getClaudeSettingsPath() {
65125
- return path10.join(getClaudeConfigDir(), "settings.json");
64948
+ return path9.join(getClaudeConfigDir(), "settings.json");
65126
64949
  }
65127
64950
  async function backupClaudeSettings(suffix = ".bak") {
65128
64951
  const settingsPath2 = getClaudeSettingsPath();
@@ -65172,7 +64995,7 @@ async function loadClaudeSettings(options = {}) {
65172
64995
  }
65173
64996
  async function saveClaudeSettings(settings) {
65174
64997
  const settingsPath2 = getClaudeSettingsPath();
65175
- const dir = path10.dirname(settingsPath2);
64998
+ const dir = path9.dirname(settingsPath2);
65176
64999
  await backupClaudeSettings();
65177
65000
  await ensureDir(dir);
65178
65001
  await writeFile2(settingsPath2, JSON.stringify(settings, null, 2), "utf-8");
@@ -65196,6 +65019,34 @@ function isBunxAvailable() {
65196
65019
  return false;
65197
65020
  }
65198
65021
  }
65022
+ function getClaudeCodeVersion() {
65023
+ try {
65024
+ const output = execSync6("claude --version", { encoding: "utf-8", stdio: ["pipe", "pipe", "ignore"], timeout: 5000 }).trim();
65025
+ const match = /^(\d+\.\d+\.\d+)/.exec(output);
65026
+ return match?.[1] ?? null;
65027
+ } catch {
65028
+ return null;
65029
+ }
65030
+ }
65031
+ function isClaudeCodeVersionAtLeast(minVersion) {
65032
+ const version2 = getClaudeCodeVersion();
65033
+ if (!version2) {
65034
+ return false;
65035
+ }
65036
+ const current = version2.split(".").map(Number);
65037
+ const minimum = minVersion.split(".").map(Number);
65038
+ for (let i = 0;i < 3; i++) {
65039
+ const c = current[i] ?? 0;
65040
+ const m = minimum[i] ?? 0;
65041
+ if (c > m) {
65042
+ return true;
65043
+ }
65044
+ if (c < m) {
65045
+ return false;
65046
+ }
65047
+ }
65048
+ return true;
65049
+ }
65199
65050
  function buildCommand(baseCommand) {
65200
65051
  if (isCustomConfigPath()) {
65201
65052
  return `${baseCommand} --config ${quotePathIfNeeded(getConfigPath())}`;
@@ -65219,7 +65070,7 @@ async function loadSavedSettingsForHookSync() {
65219
65070
  return null;
65220
65071
  }
65221
65072
  }
65222
- async function installStatusLine(useBunx = false) {
65073
+ async function installStatusLine(useBunx = false, supportsRefreshInterval = false) {
65223
65074
  let settings;
65224
65075
  const backupPath = await backupClaudeSettings(".orig");
65225
65076
  try {
@@ -65230,11 +65081,15 @@ async function installStatusLine(useBunx = false) {
65230
65081
  settings = {};
65231
65082
  }
65232
65083
  const baseCommand = useBunx ? CCSTATUSLINE_COMMANDS.BUNX : CCSTATUSLINE_COMMANDS.NPM;
65084
+ const existingRefreshInterval = settings.statusLine?.refreshInterval;
65233
65085
  settings.statusLine = {
65234
65086
  type: "command",
65235
65087
  command: buildCommand(baseCommand),
65236
65088
  padding: 0
65237
65089
  };
65090
+ if (supportsRefreshInterval) {
65091
+ settings.statusLine.refreshInterval = existingRefreshInterval ?? 10;
65092
+ }
65238
65093
  await saveClaudeSettings(settings);
65239
65094
  const savedSettings = await loadSavedSettingsForHookSync();
65240
65095
  if (savedSettings) {
@@ -65267,6 +65122,31 @@ async function getExistingStatusLine() {
65267
65122
  return null;
65268
65123
  }
65269
65124
  }
65125
+ async function getRefreshInterval() {
65126
+ try {
65127
+ const settings = await loadClaudeSettings({ logErrors: false });
65128
+ return settings.statusLine?.refreshInterval ?? null;
65129
+ } catch {
65130
+ return null;
65131
+ }
65132
+ }
65133
+ async function setRefreshInterval(interval) {
65134
+ let settings;
65135
+ try {
65136
+ settings = await loadClaudeSettings({ logErrors: false });
65137
+ } catch {
65138
+ return;
65139
+ }
65140
+ if (!settings.statusLine) {
65141
+ return;
65142
+ }
65143
+ if (interval === null) {
65144
+ delete settings.statusLine.refreshInterval;
65145
+ } else {
65146
+ settings.statusLine.refreshInterval = interval;
65147
+ }
65148
+ await saveClaudeSettings(settings);
65149
+ }
65270
65150
  var readFile4, writeFile2, CCSTATUSLINE_COMMANDS;
65271
65151
  var init_claude_settings = __esm(() => {
65272
65152
  init_Settings();
@@ -65850,7 +65730,7 @@ var dist_default5 = Gradient;
65850
65730
 
65851
65731
  // src/tui/App.tsx
65852
65732
  init_claude_settings();
65853
- var import_react47 = __toESM(require_react(), 1);
65733
+ var import_react48 = __toESM(require_react(), 1);
65854
65734
 
65855
65735
  // src/utils/clone-settings.ts
65856
65736
  function cloneSettings(settings) {
@@ -65955,7 +65835,7 @@ function openExternalUrl(url2) {
65955
65835
  import { execSync as execSync7 } from "child_process";
65956
65836
  import * as fs12 from "fs";
65957
65837
  import * as os11 from "os";
65958
- import * as path11 from "path";
65838
+ import * as path10 from "path";
65959
65839
  var fontsInstalledThisSession = false;
65960
65840
  function checkPowerlineFonts() {
65961
65841
  if (process.env.DEBUG_FONT_INSTALL === "1" && !fontsInstalledThisSession) {
@@ -65975,20 +65855,20 @@ function checkPowerlineFonts() {
65975
65855
  let fontPaths = [];
65976
65856
  if (platform4 === "darwin") {
65977
65857
  fontPaths = [
65978
- path11.join(os11.homedir(), "Library", "Fonts"),
65858
+ path10.join(os11.homedir(), "Library", "Fonts"),
65979
65859
  "/Library/Fonts",
65980
65860
  "/System/Library/Fonts"
65981
65861
  ];
65982
65862
  } else if (platform4 === "linux") {
65983
65863
  fontPaths = [
65984
- path11.join(os11.homedir(), ".local", "share", "fonts"),
65985
- path11.join(os11.homedir(), ".fonts"),
65864
+ path10.join(os11.homedir(), ".local", "share", "fonts"),
65865
+ path10.join(os11.homedir(), ".fonts"),
65986
65866
  "/usr/share/fonts",
65987
65867
  "/usr/local/share/fonts"
65988
65868
  ];
65989
65869
  } else if (platform4 === "win32") {
65990
65870
  fontPaths = [
65991
- path11.join(os11.homedir(), "AppData", "Local", "Microsoft", "Windows", "Fonts"),
65871
+ path10.join(os11.homedir(), "AppData", "Local", "Microsoft", "Windows", "Fonts"),
65992
65872
  "C:\\Windows\\Fonts"
65993
65873
  ];
65994
65874
  }
@@ -66067,11 +65947,11 @@ async function installPowerlineFonts() {
66067
65947
  const platform4 = os11.platform();
66068
65948
  let fontDir;
66069
65949
  if (platform4 === "darwin") {
66070
- fontDir = path11.join(os11.homedir(), "Library", "Fonts");
65950
+ fontDir = path10.join(os11.homedir(), "Library", "Fonts");
66071
65951
  } else if (platform4 === "linux") {
66072
- fontDir = path11.join(os11.homedir(), ".local", "share", "fonts");
65952
+ fontDir = path10.join(os11.homedir(), ".local", "share", "fonts");
66073
65953
  } else if (platform4 === "win32") {
66074
- fontDir = path11.join(os11.homedir(), "AppData", "Local", "Microsoft", "Windows", "Fonts");
65954
+ fontDir = path10.join(os11.homedir(), "AppData", "Local", "Microsoft", "Windows", "Fonts");
66075
65955
  } else {
66076
65956
  return {
66077
65957
  success: false,
@@ -66081,7 +65961,7 @@ async function installPowerlineFonts() {
66081
65961
  if (!fs12.existsSync(fontDir)) {
66082
65962
  fs12.mkdirSync(fontDir, { recursive: true });
66083
65963
  }
66084
- const tempDir = path11.join(os11.tmpdir(), `ccstatusline-powerline-fonts-${Date.now()}`);
65964
+ const tempDir = path10.join(os11.tmpdir(), `ccstatusline-powerline-fonts-${Date.now()}`);
66085
65965
  try {
66086
65966
  if (fs12.existsSync(tempDir)) {
66087
65967
  fs12.rmSync(tempDir, { recursive: true, force: true });
@@ -66091,7 +65971,7 @@ async function installPowerlineFonts() {
66091
65971
  encoding: "utf8"
66092
65972
  });
66093
65973
  if (platform4 === "darwin" || platform4 === "linux") {
66094
- const installScript = path11.join(tempDir, "install.sh");
65974
+ const installScript = path10.join(tempDir, "install.sh");
66095
65975
  if (fs12.existsSync(installScript)) {
66096
65976
  fs12.chmodSync(installScript, 493);
66097
65977
  execSync7(`cd "${tempDir}" && ./install.sh`, {
@@ -66121,9 +66001,9 @@ async function installPowerlineFonts() {
66121
66001
  let findFontFiles = function(dir) {
66122
66002
  const files = fs12.readdirSync(dir);
66123
66003
  for (const file2 of files) {
66124
- const filePath = path11.join(dir, file2);
66125
- const stat = fs12.statSync(filePath);
66126
- if (stat.isDirectory() && !file2.startsWith(".")) {
66004
+ const filePath = path10.join(dir, file2);
66005
+ const stat2 = fs12.statSync(filePath);
66006
+ if (stat2.isDirectory() && !file2.startsWith(".")) {
66127
66007
  findFontFiles(filePath);
66128
66008
  } else if (file2.endsWith(".ttf") || file2.endsWith(".otf")) {
66129
66009
  if (filePath.toLowerCase().includes("powerline")) {
@@ -66136,8 +66016,8 @@ async function installPowerlineFonts() {
66136
66016
  findFontFiles(tempDir);
66137
66017
  let installedCount = 0;
66138
66018
  for (const fontFile of fontFiles) {
66139
- const fileName = path11.basename(fontFile);
66140
- const destPath = path11.join(fontDir, fileName);
66019
+ const fileName = path10.basename(fontFile);
66020
+ const destPath = path10.join(fontDir, fileName);
66141
66021
  try {
66142
66022
  fs12.copyFileSync(fontFile, destPath);
66143
66023
  installedCount++;
@@ -66181,6 +66061,22 @@ async function installPowerlineFonts() {
66181
66061
  // src/tui/App.tsx
66182
66062
  init_terminal();
66183
66063
 
66064
+ // src/tui/claude-status.ts
66065
+ init_claude_settings();
66066
+ async function loadClaudeStatusLineState() {
66067
+ const [
66068
+ existingStatusLine,
66069
+ refreshInterval
66070
+ ] = await Promise.all([
66071
+ getExistingStatusLine(),
66072
+ getRefreshInterval()
66073
+ ]);
66074
+ return {
66075
+ existingStatusLine,
66076
+ refreshInterval
66077
+ };
66078
+ }
66079
+
66184
66080
  // src/tui/components/ColorMenu.tsx
66185
66081
  init_source();
66186
66082
  await init_build2();
@@ -69097,11 +68993,24 @@ var MainMenu = ({
69097
68993
  description: "Set global padding, separators, and color overrides that apply to all widgets"
69098
68994
  },
69099
68995
  "-",
69100
- {
69101
- label: isClaudeInstalled ? "\uD83D\uDD0C Uninstall from Claude Code" : "\uD83D\uDCE6 Install to Claude Code",
69102
- value: "install",
69103
- description: isClaudeInstalled ? "Remove ccstatusline from your Claude Code settings" : "Add ccstatusline to your Claude Code settings for automatic status line rendering"
69104
- }
68996
+ ...isClaudeInstalled ? [
68997
+ {
68998
+ label: "\uD83D\uDD27 Configure Status Line",
68999
+ value: "configureStatusLine",
69000
+ description: "Configure Claude Code status line settings like refresh interval"
69001
+ },
69002
+ {
69003
+ label: "\uD83D\uDD0C Uninstall from Claude Code",
69004
+ value: "install",
69005
+ description: "Remove ccstatusline from your Claude Code settings"
69006
+ }
69007
+ ] : [
69008
+ {
69009
+ label: "\uD83D\uDCE6 Install to Claude Code",
69010
+ value: "install",
69011
+ description: "Add ccstatusline to your Claude Code settings for automatic status line rendering"
69012
+ }
69013
+ ]
69105
69014
  ];
69106
69015
  if (hasChanges) {
69107
69016
  menuItems.push({
@@ -70218,10 +70127,148 @@ var PowerlineSetup = ({
70218
70127
  ]
70219
70128
  }, undefined, true, undefined, this);
70220
70129
  };
70130
+ // src/tui/components/RefreshIntervalMenu.tsx
70131
+ init_input_guards();
70132
+ await init_build2();
70133
+ var import_react44 = __toESM(require_react(), 1);
70134
+ var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
70135
+ function getRefreshInputValue(interval) {
70136
+ return interval === null ? "" : String(interval);
70137
+ }
70138
+ function getRefreshIntervalSublabel(interval, supported) {
70139
+ if (!supported) {
70140
+ return "(requires Claude Code >=2.1.97)";
70141
+ }
70142
+ if (interval === null) {
70143
+ return "(not set)";
70144
+ }
70145
+ return `(${interval}s)`;
70146
+ }
70147
+ function buildConfigureStatusLineItems(refreshInterval, supportsRefreshInterval) {
70148
+ return [
70149
+ {
70150
+ label: "\uD83D\uDD04 Refresh Interval",
70151
+ sublabel: getRefreshIntervalSublabel(refreshInterval, supportsRefreshInterval),
70152
+ value: "refreshInterval",
70153
+ disabled: !supportsRefreshInterval,
70154
+ description: supportsRefreshInterval ? "How often Claude Code refreshes the status line by re-running the command. Enter value in seconds (1-60), or leave empty to remove." : "This setting requires Claude Code version 2.1.97 or later. Please update Claude Code to use this feature."
70155
+ }
70156
+ ];
70157
+ }
70158
+ function validateRefreshIntervalInput(value) {
70159
+ if (value === "") {
70160
+ return null;
70161
+ }
70162
+ const parsed = parseInt(value, 10);
70163
+ if (isNaN(parsed)) {
70164
+ return "Please enter a valid number";
70165
+ }
70166
+ if (parsed < 1) {
70167
+ return `Minimum interval is 1s (you entered ${parsed}s)`;
70168
+ }
70169
+ if (parsed > 60) {
70170
+ return `Maximum interval is 60s (you entered ${parsed}s)`;
70171
+ }
70172
+ return null;
70173
+ }
70174
+ var RefreshIntervalMenu = ({
70175
+ currentInterval,
70176
+ supportsRefreshInterval,
70177
+ onUpdate,
70178
+ onBack
70179
+ }) => {
70180
+ const [editingRefreshInterval, setEditingRefreshInterval] = import_react44.useState(false);
70181
+ const [refreshInput, setRefreshInput] = import_react44.useState(() => getRefreshInputValue(currentInterval));
70182
+ const [validationError, setValidationError] = import_react44.useState(null);
70183
+ use_input_default((input, key) => {
70184
+ if (editingRefreshInterval) {
70185
+ if (key.return) {
70186
+ if (refreshInput === "") {
70187
+ onUpdate(null);
70188
+ setEditingRefreshInterval(false);
70189
+ setValidationError(null);
70190
+ return;
70191
+ }
70192
+ const error48 = validateRefreshIntervalInput(refreshInput);
70193
+ if (error48) {
70194
+ setValidationError(error48);
70195
+ } else {
70196
+ const value = parseInt(refreshInput, 10);
70197
+ onUpdate(value);
70198
+ setEditingRefreshInterval(false);
70199
+ setValidationError(null);
70200
+ }
70201
+ } else if (key.escape) {
70202
+ setRefreshInput(getRefreshInputValue(currentInterval));
70203
+ setEditingRefreshInterval(false);
70204
+ setValidationError(null);
70205
+ } else if (key.backspace) {
70206
+ setRefreshInput(refreshInput.slice(0, -1));
70207
+ setValidationError(null);
70208
+ } else if (key.delete) {} else if (shouldInsertInput(input, key) && /\d/.test(input)) {
70209
+ const newValue = refreshInput + input;
70210
+ if (newValue.length <= 2) {
70211
+ setRefreshInput(newValue);
70212
+ setValidationError(null);
70213
+ }
70214
+ }
70215
+ return;
70216
+ }
70217
+ if (key.escape) {
70218
+ onBack();
70219
+ }
70220
+ });
70221
+ return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
70222
+ flexDirection: "column",
70223
+ children: [
70224
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
70225
+ bold: true,
70226
+ children: "Configure Status Line"
70227
+ }, undefined, false, undefined, this),
70228
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
70229
+ color: "white",
70230
+ children: "Configure Claude Code status line settings"
70231
+ }, undefined, false, undefined, this),
70232
+ editingRefreshInterval ? /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
70233
+ marginTop: 1,
70234
+ flexDirection: "column",
70235
+ children: [
70236
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
70237
+ children: [
70238
+ "Enter refresh interval in seconds (1-60):",
70239
+ " ",
70240
+ refreshInput,
70241
+ refreshInput.length > 0 ? "s" : ""
70242
+ ]
70243
+ }, undefined, true, undefined, this),
70244
+ validationError ? /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
70245
+ color: "red",
70246
+ children: validationError
70247
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
70248
+ dimColor: true,
70249
+ children: "Press Enter to confirm, ESC to cancel. Leave empty to remove."
70250
+ }, undefined, false, undefined, this)
70251
+ ]
70252
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(List, {
70253
+ marginTop: 1,
70254
+ items: buildConfigureStatusLineItems(currentInterval, supportsRefreshInterval),
70255
+ onSelect: (value) => {
70256
+ if (value === "back") {
70257
+ onBack();
70258
+ return;
70259
+ }
70260
+ setRefreshInput(getRefreshInputValue(currentInterval));
70261
+ setEditingRefreshInterval(true);
70262
+ },
70263
+ showBackButton: true
70264
+ }, undefined, false, undefined, this)
70265
+ ]
70266
+ }, undefined, true, undefined, this);
70267
+ };
70221
70268
  // src/tui/components/StatusLinePreview.tsx
70222
70269
  init_source();
70223
70270
  await init_build2();
70224
- var import_react44 = __toESM(require_react(), 1);
70271
+ var import_react45 = __toESM(require_react(), 1);
70225
70272
 
70226
70273
  // src/utils/powerline-theme-index.ts
70227
70274
  function countPowerlineThemeSlots(entries) {
@@ -70255,7 +70302,7 @@ function advanceGlobalSeparatorIndex(currentIndex, widgets) {
70255
70302
  }
70256
70303
 
70257
70304
  // src/tui/components/StatusLinePreview.tsx
70258
- var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
70305
+ var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
70259
70306
  var renderSingleLine = (widgets, terminalWidth, settings, lineIndex, globalSeparatorIndex, globalPowerlineThemeIndex, preRenderedWidgets, preCalculatedMaxWidths) => {
70260
70307
  const context = {
70261
70308
  terminalWidth,
@@ -70268,7 +70315,7 @@ var renderSingleLine = (widgets, terminalWidth, settings, lineIndex, globalSepar
70268
70315
  return renderStatusLineWithInfo(widgets, settings, context, preRenderedWidgets, preCalculatedMaxWidths);
70269
70316
  };
70270
70317
  var StatusLinePreview = ({ lines, terminalWidth, settings, onTruncationChange }) => {
70271
- const { renderedLines, anyTruncated } = import_react44.default.useMemo(() => {
70318
+ const { renderedLines, anyTruncated } = import_react45.default.useMemo(() => {
70272
70319
  if (!settings)
70273
70320
  return { renderedLines: [], anyTruncated: false };
70274
70321
  const preRenderedLines = preRenderAllWidgets(lines, settings, { terminalWidth, isPreview: true, minimalist: settings.minimalistMode });
@@ -70294,29 +70341,29 @@ var StatusLinePreview = ({ lines, terminalWidth, settings, onTruncationChange })
70294
70341
  }
70295
70342
  return { renderedLines: result2, anyTruncated: truncated };
70296
70343
  }, [lines, terminalWidth, settings]);
70297
- import_react44.default.useEffect(() => {
70344
+ import_react45.default.useEffect(() => {
70298
70345
  onTruncationChange?.(anyTruncated);
70299
70346
  }, [anyTruncated, onTruncationChange]);
70300
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
70347
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
70301
70348
  flexDirection: "column",
70302
70349
  children: [
70303
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
70350
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
70304
70351
  borderStyle: "round",
70305
70352
  borderColor: "gray",
70306
70353
  borderDimColor: true,
70307
70354
  width: "100%",
70308
70355
  paddingLeft: 1,
70309
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
70356
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70310
70357
  children: [
70311
70358
  ">",
70312
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
70359
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70313
70360
  dimColor: true,
70314
70361
  children: " Preview (ctrl+s to save configuration at any time)"
70315
70362
  }, undefined, false, undefined, this)
70316
70363
  ]
70317
70364
  }, undefined, true, undefined, this)
70318
70365
  }, undefined, false, undefined, this),
70319
- renderedLines.map((line, index) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
70366
+ renderedLines.map((line, index) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70320
70367
  children: [
70321
70368
  " ",
70322
70369
  line,
@@ -70329,7 +70376,7 @@ var StatusLinePreview = ({ lines, terminalWidth, settings, onTruncationChange })
70329
70376
  // src/tui/components/TerminalOptionsMenu.tsx
70330
70377
  init_source();
70331
70378
  await init_build2();
70332
- var import_react45 = __toESM(require_react(), 1);
70379
+ var import_react46 = __toESM(require_react(), 1);
70333
70380
 
70334
70381
  // src/utils/color-sanitize.ts
70335
70382
  await init_widgets2();
@@ -70384,7 +70431,7 @@ function sanitizeLinesForColorLevel(lines, nextLevel) {
70384
70431
  }
70385
70432
 
70386
70433
  // src/tui/components/TerminalOptionsMenu.tsx
70387
- var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
70434
+ var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
70388
70435
  function getNextColorLevel(level) {
70389
70436
  return (level + 1) % 4;
70390
70437
  }
@@ -70418,8 +70465,8 @@ var TerminalOptionsMenu = ({
70418
70465
  onUpdate,
70419
70466
  onBack
70420
70467
  }) => {
70421
- const [showColorWarning, setShowColorWarning] = import_react45.useState(false);
70422
- const [pendingColorLevel, setPendingColorLevel] = import_react45.useState(null);
70468
+ const [showColorWarning, setShowColorWarning] = import_react46.useState(false);
70469
+ const [pendingColorLevel, setPendingColorLevel] = import_react46.useState(null);
70423
70470
  const handleSelect = (value) => {
70424
70471
  if (value === "back") {
70425
70472
  onBack();
@@ -70467,27 +70514,27 @@ var TerminalOptionsMenu = ({
70467
70514
  onBack();
70468
70515
  }
70469
70516
  });
70470
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
70517
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70471
70518
  flexDirection: "column",
70472
70519
  children: [
70473
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70520
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70474
70521
  bold: true,
70475
70522
  children: "Terminal Options"
70476
70523
  }, undefined, false, undefined, this),
70477
- showColorWarning ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
70524
+ showColorWarning ? /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70478
70525
  flexDirection: "column",
70479
70526
  marginTop: 1,
70480
70527
  children: [
70481
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70528
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70482
70529
  color: "yellow",
70483
70530
  children: "⚠ Warning: Custom colors detected!"
70484
70531
  }, undefined, false, undefined, this),
70485
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70532
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70486
70533
  children: "Switching color modes will reset custom ansi256 or hex colors to defaults."
70487
70534
  }, undefined, false, undefined, this),
70488
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
70535
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70489
70536
  marginTop: 1,
70490
- children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ConfirmDialog, {
70537
+ children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ConfirmDialog, {
70491
70538
  message: "Continue?",
70492
70539
  onConfirm: handleColorConfirm,
70493
70540
  onCancel: handleColorCancel,
@@ -70495,13 +70542,13 @@ var TerminalOptionsMenu = ({
70495
70542
  }, undefined, false, undefined, this)
70496
70543
  }, undefined, false, undefined, this)
70497
70544
  ]
70498
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
70545
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(jsx_dev_runtime21.Fragment, {
70499
70546
  children: [
70500
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70547
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70501
70548
  color: "white",
70502
70549
  children: "Configure terminal-specific settings for optimal display"
70503
70550
  }, undefined, false, undefined, this),
70504
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(List, {
70551
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(List, {
70505
70552
  marginTop: 1,
70506
70553
  items: buildTerminalOptionsItems(settings.colorLevel),
70507
70554
  onSelect: handleSelect,
@@ -70530,8 +70577,8 @@ var getColorLevelLabel = (level) => {
70530
70577
  // src/tui/components/TerminalWidthMenu.tsx
70531
70578
  init_input_guards();
70532
70579
  await init_build2();
70533
- var import_react46 = __toESM(require_react(), 1);
70534
- var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
70580
+ var import_react47 = __toESM(require_react(), 1);
70581
+ var jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
70535
70582
  var TERMINAL_WIDTH_OPTIONS = ["full", "full-minus-40", "full-until-compact"];
70536
70583
  function getTerminalWidthSelectionIndex(selectedOption) {
70537
70584
  const selectedIndex = TERMINAL_WIDTH_OPTIONS.indexOf(selectedOption);
@@ -70578,11 +70625,11 @@ var TerminalWidthMenu = ({
70578
70625
  onUpdate,
70579
70626
  onBack
70580
70627
  }) => {
70581
- const [selectedOption, setSelectedOption] = import_react46.useState(settings.flexMode);
70582
- const [compactThreshold, setCompactThreshold] = import_react46.useState(settings.compactThreshold);
70583
- const [editingThreshold, setEditingThreshold] = import_react46.useState(false);
70584
- const [thresholdInput, setThresholdInput] = import_react46.useState(String(settings.compactThreshold));
70585
- const [validationError, setValidationError] = import_react46.useState(null);
70628
+ const [selectedOption, setSelectedOption] = import_react47.useState(settings.flexMode);
70629
+ const [compactThreshold, setCompactThreshold] = import_react47.useState(settings.compactThreshold);
70630
+ const [editingThreshold, setEditingThreshold] = import_react47.useState(false);
70631
+ const [thresholdInput, setThresholdInput] = import_react47.useState(String(settings.compactThreshold));
70632
+ const [validationError, setValidationError] = import_react47.useState(null);
70586
70633
  use_input_default((input, key) => {
70587
70634
  if (editingThreshold) {
70588
70635
  if (key.return) {
@@ -70621,27 +70668,27 @@ var TerminalWidthMenu = ({
70621
70668
  onBack();
70622
70669
  }
70623
70670
  });
70624
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70671
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70625
70672
  flexDirection: "column",
70626
70673
  children: [
70627
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70674
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70628
70675
  bold: true,
70629
70676
  children: "Terminal Width"
70630
70677
  }, undefined, false, undefined, this),
70631
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70678
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70632
70679
  color: "white",
70633
70680
  children: "These settings affect where long lines are truncated, and where right-alignment occurs when using flex separators"
70634
70681
  }, undefined, false, undefined, this),
70635
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70682
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70636
70683
  dimColor: true,
70637
70684
  wrap: "wrap",
70638
70685
  children: "Claude code does not currently provide an available width variable for the statusline and features like IDE integration, auto-compaction notices, etc all cause the statusline to wrap if we do not truncate it"
70639
70686
  }, undefined, false, undefined, this),
70640
- editingThreshold ? /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70687
+ editingThreshold ? /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70641
70688
  marginTop: 1,
70642
70689
  flexDirection: "column",
70643
70690
  children: [
70644
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70691
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70645
70692
  children: [
70646
70693
  "Enter compact threshold (1-99):",
70647
70694
  " ",
@@ -70649,15 +70696,15 @@ var TerminalWidthMenu = ({
70649
70696
  "%"
70650
70697
  ]
70651
70698
  }, undefined, true, undefined, this),
70652
- validationError ? /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70699
+ validationError ? /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70653
70700
  color: "red",
70654
70701
  children: validationError
70655
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70702
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70656
70703
  dimColor: true,
70657
70704
  children: "Press Enter to confirm, ESC to cancel"
70658
70705
  }, undefined, false, undefined, this)
70659
70706
  ]
70660
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(List, {
70707
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(List, {
70661
70708
  marginTop: 1,
70662
70709
  items: buildTerminalWidthItems(selectedOption, compactThreshold),
70663
70710
  initialSelection: getTerminalWidthSelectionIndex(selectedOption),
@@ -70683,7 +70730,7 @@ var TerminalWidthMenu = ({
70683
70730
  }, undefined, true, undefined, this);
70684
70731
  };
70685
70732
  // src/tui/App.tsx
70686
- var jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
70733
+ var jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
70687
70734
  var GITHUB_REPO_URL = "https://github.com/sirmalloc/ccstatusline";
70688
70735
  function getConfirmCancelScreen(confirmDialog) {
70689
70736
  return confirmDialog?.cancelScreen ?? "main";
@@ -70698,23 +70745,28 @@ function clearInstallMenuSelection(menuSelections) {
70698
70745
  }
70699
70746
  var App2 = () => {
70700
70747
  const { exit } = use_app_default();
70701
- const [settings, setSettings] = import_react47.useState(null);
70702
- const [originalSettings, setOriginalSettings] = import_react47.useState(null);
70703
- const [hasChanges, setHasChanges] = import_react47.useState(false);
70704
- const [screen, setScreen] = import_react47.useState("main");
70705
- const [selectedLine, setSelectedLine] = import_react47.useState(0);
70706
- const [menuSelections, setMenuSelections] = import_react47.useState({});
70707
- const [confirmDialog, setConfirmDialog] = import_react47.useState(null);
70708
- const [isClaudeInstalled, setIsClaudeInstalled] = import_react47.useState(false);
70709
- const [terminalWidth, setTerminalWidth] = import_react47.useState(process.stdout.columns || 80);
70710
- const [powerlineFontStatus, setPowerlineFontStatus] = import_react47.useState({ installed: false });
70711
- const [installingFonts, setInstallingFonts] = import_react47.useState(false);
70712
- const [fontInstallMessage, setFontInstallMessage] = import_react47.useState(null);
70713
- const [existingStatusLine, setExistingStatusLine] = import_react47.useState(null);
70714
- const [flashMessage, setFlashMessage] = import_react47.useState(null);
70715
- const [previewIsTruncated, setPreviewIsTruncated] = import_react47.useState(false);
70716
- import_react47.useEffect(() => {
70717
- getExistingStatusLine().then(setExistingStatusLine);
70748
+ const [settings, setSettings] = import_react48.useState(null);
70749
+ const [originalSettings, setOriginalSettings] = import_react48.useState(null);
70750
+ const [hasChanges, setHasChanges] = import_react48.useState(false);
70751
+ const [screen, setScreen] = import_react48.useState("main");
70752
+ const [selectedLine, setSelectedLine] = import_react48.useState(0);
70753
+ const [menuSelections, setMenuSelections] = import_react48.useState({});
70754
+ const [confirmDialog, setConfirmDialog] = import_react48.useState(null);
70755
+ const [isClaudeInstalled, setIsClaudeInstalled] = import_react48.useState(false);
70756
+ const [terminalWidth, setTerminalWidth] = import_react48.useState(process.stdout.columns || 80);
70757
+ const [powerlineFontStatus, setPowerlineFontStatus] = import_react48.useState({ installed: false });
70758
+ const [installingFonts, setInstallingFonts] = import_react48.useState(false);
70759
+ const [fontInstallMessage, setFontInstallMessage] = import_react48.useState(null);
70760
+ const [existingStatusLine, setExistingStatusLine] = import_react48.useState(null);
70761
+ const [flashMessage, setFlashMessage] = import_react48.useState(null);
70762
+ const [previewIsTruncated, setPreviewIsTruncated] = import_react48.useState(false);
70763
+ const [currentRefreshInterval, setCurrentRefreshInterval] = import_react48.useState(null);
70764
+ const [supportsRefreshInterval] = import_react48.useState(() => isClaudeCodeVersionAtLeast("2.1.97"));
70765
+ import_react48.useEffect(() => {
70766
+ loadClaudeStatusLineState().then((statusLineState) => {
70767
+ setExistingStatusLine(statusLineState.existingStatusLine);
70768
+ setCurrentRefreshInterval(statusLineState.refreshInterval);
70769
+ });
70718
70770
  loadSettings().then((loadedSettings) => {
70719
70771
  source_default.level = loadedSettings.colorLevel;
70720
70772
  setSettings(loadedSettings);
@@ -70734,13 +70786,13 @@ var App2 = () => {
70734
70786
  process.stdout.off("resize", handleResize);
70735
70787
  };
70736
70788
  }, []);
70737
- import_react47.useEffect(() => {
70789
+ import_react48.useEffect(() => {
70738
70790
  if (originalSettings) {
70739
70791
  const hasAnyChanges = JSON.stringify(settings) !== JSON.stringify(originalSettings);
70740
70792
  setHasChanges(hasAnyChanges);
70741
70793
  }
70742
70794
  }, [settings, originalSettings]);
70743
- import_react47.useEffect(() => {
70795
+ import_react48.useEffect(() => {
70744
70796
  if (flashMessage) {
70745
70797
  const timer = setTimeout(() => {
70746
70798
  setFlashMessage(null);
@@ -70766,7 +70818,7 @@ var App2 = () => {
70766
70818
  })();
70767
70819
  }
70768
70820
  });
70769
- const handleInstallSelection = import_react47.useCallback((command, displayName, useBunx) => {
70821
+ const handleInstallSelection = import_react48.useCallback((command, displayName, useBunx) => {
70770
70822
  getExistingStatusLine().then((existing) => {
70771
70823
  const isAlreadyInstalled = isKnownCommand(existing ?? "");
70772
70824
  let message;
@@ -70786,30 +70838,32 @@ Continue?`;
70786
70838
  message,
70787
70839
  cancelScreen: "install",
70788
70840
  action: async () => {
70789
- await installStatusLine(useBunx);
70841
+ await installStatusLine(useBunx, supportsRefreshInterval);
70842
+ const installedStatusLineState = await loadClaudeStatusLineState();
70790
70843
  setIsClaudeInstalled(true);
70791
- setExistingStatusLine(command);
70844
+ setExistingStatusLine(installedStatusLineState.existingStatusLine ?? command);
70845
+ setCurrentRefreshInterval(installedStatusLineState.refreshInterval);
70792
70846
  setScreen("main");
70793
70847
  setConfirmDialog(null);
70794
70848
  }
70795
70849
  });
70796
70850
  setScreen("confirm");
70797
70851
  });
70798
- }, []);
70799
- const handleNpxInstall = import_react47.useCallback(() => {
70852
+ }, [supportsRefreshInterval]);
70853
+ const handleNpxInstall = import_react48.useCallback(() => {
70800
70854
  setMenuSelections((prev) => ({ ...prev, install: 0 }));
70801
70855
  handleInstallSelection(CCSTATUSLINE_COMMANDS.NPM, "npx", false);
70802
70856
  }, [handleInstallSelection]);
70803
- const handleBunxInstall = import_react47.useCallback(() => {
70857
+ const handleBunxInstall = import_react48.useCallback(() => {
70804
70858
  setMenuSelections((prev) => ({ ...prev, install: 1 }));
70805
70859
  handleInstallSelection(CCSTATUSLINE_COMMANDS.BUNX, "bunx", true);
70806
70860
  }, [handleInstallSelection]);
70807
- const handleInstallMenuCancel = import_react47.useCallback(() => {
70861
+ const handleInstallMenuCancel = import_react48.useCallback(() => {
70808
70862
  setMenuSelections(clearInstallMenuSelection);
70809
70863
  setScreen("main");
70810
70864
  }, []);
70811
70865
  if (!settings) {
70812
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70866
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70813
70867
  children: "Loading settings..."
70814
70868
  }, undefined, false, undefined, this);
70815
70869
  }
@@ -70821,6 +70875,7 @@ Continue?`;
70821
70875
  await uninstallStatusLine();
70822
70876
  setIsClaudeInstalled(false);
70823
70877
  setExistingStatusLine(null);
70878
+ setCurrentRefreshInterval(null);
70824
70879
  setScreen("main");
70825
70880
  setConfirmDialog(null);
70826
70881
  }
@@ -70850,6 +70905,9 @@ Continue?`;
70850
70905
  case "install":
70851
70906
  handleInstallUninstall();
70852
70907
  break;
70908
+ case "configureStatusLine":
70909
+ setScreen("refreshInterval");
70910
+ break;
70853
70911
  case "starGithub":
70854
70912
  setConfirmDialog({
70855
70913
  message: `Open the ccstatusline GitHub repository in your browser?
@@ -70898,44 +70956,44 @@ ${GITHUB_REPO_URL}`,
70898
70956
  setSelectedLine(lineIndex);
70899
70957
  setScreen("items");
70900
70958
  };
70901
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70959
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70902
70960
  flexDirection: "column",
70903
70961
  children: [
70904
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70962
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70905
70963
  marginBottom: 1,
70906
70964
  children: [
70907
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70965
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70908
70966
  bold: true,
70909
- children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(dist_default5, {
70967
+ children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(dist_default5, {
70910
70968
  name: "retro",
70911
70969
  children: "CCStatusline Configuration"
70912
70970
  }, undefined, false, undefined, this)
70913
70971
  }, undefined, false, undefined, this),
70914
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70972
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70915
70973
  bold: true,
70916
70974
  children: ` | ${getPackageVersion() && `v${getPackageVersion()}`}`
70917
70975
  }, undefined, false, undefined, this),
70918
- flashMessage && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70976
+ flashMessage && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70919
70977
  color: flashMessage.color,
70920
70978
  bold: true,
70921
70979
  children: ` ${flashMessage.text}`
70922
70980
  }, undefined, false, undefined, this)
70923
70981
  ]
70924
70982
  }, undefined, true, undefined, this),
70925
- isCustomConfigPath() && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70983
+ isCustomConfigPath() && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70926
70984
  dimColor: true,
70927
70985
  children: `Config: ${getConfigPath()}`
70928
70986
  }, undefined, false, undefined, this),
70929
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusLinePreview, {
70987
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusLinePreview, {
70930
70988
  lines: settings.lines,
70931
70989
  terminalWidth,
70932
70990
  settings,
70933
70991
  onTruncationChange: setPreviewIsTruncated
70934
70992
  }, undefined, false, undefined, this),
70935
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70993
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70936
70994
  marginTop: 1,
70937
70995
  children: [
70938
- screen === "main" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(MainMenu, {
70996
+ screen === "main" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(MainMenu, {
70939
70997
  onSelect: (value, index) => {
70940
70998
  if (value !== "save" && value !== "exit") {
70941
70999
  setMenuSelections((prev) => ({ ...prev, main: index }));
@@ -70949,7 +71007,7 @@ ${GITHUB_REPO_URL}`,
70949
71007
  settings,
70950
71008
  previewIsTruncated
70951
71009
  }, undefined, false, undefined, this),
70952
- screen === "lines" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(LineSelector, {
71010
+ screen === "lines" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(LineSelector, {
70953
71011
  lines: settings.lines,
70954
71012
  onSelect: (line) => {
70955
71013
  setMenuSelections((prev) => ({ ...prev, lines: line }));
@@ -70964,7 +71022,7 @@ ${GITHUB_REPO_URL}`,
70964
71022
  title: "Select Line to Edit Items",
70965
71023
  allowEditing: true
70966
71024
  }, undefined, false, undefined, this),
70967
- screen === "items" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ItemsEditor, {
71025
+ screen === "items" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(ItemsEditor, {
70968
71026
  widgets: settings.lines[selectedLine] ?? [],
70969
71027
  onUpdate: (widgets) => {
70970
71028
  updateLine(selectedLine, widgets);
@@ -70976,7 +71034,7 @@ ${GITHUB_REPO_URL}`,
70976
71034
  lineNumber: selectedLine + 1,
70977
71035
  settings
70978
71036
  }, undefined, false, undefined, this),
70979
- screen === "colorLines" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(LineSelector, {
71037
+ screen === "colorLines" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(LineSelector, {
70980
71038
  lines: settings.lines,
70981
71039
  onLinesUpdate: updateLines,
70982
71040
  onSelect: (line) => {
@@ -70994,7 +71052,7 @@ ${GITHUB_REPO_URL}`,
70994
71052
  settings,
70995
71053
  allowEditing: false
70996
71054
  }, undefined, false, undefined, this),
70997
- screen === "colors" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ColorMenu, {
71055
+ screen === "colors" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(ColorMenu, {
70998
71056
  widgets: settings.lines[selectedLine] ?? [],
70999
71057
  lineIndex: selectedLine,
71000
71058
  settings,
@@ -71007,7 +71065,7 @@ ${GITHUB_REPO_URL}`,
71007
71065
  setScreen("colorLines");
71008
71066
  }
71009
71067
  }, undefined, false, undefined, this),
71010
- screen === "terminalConfig" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(TerminalOptionsMenu, {
71068
+ screen === "terminalConfig" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(TerminalOptionsMenu, {
71011
71069
  settings,
71012
71070
  onUpdate: (updatedSettings) => {
71013
71071
  setSettings(updatedSettings);
@@ -71021,7 +71079,7 @@ ${GITHUB_REPO_URL}`,
71021
71079
  }
71022
71080
  }
71023
71081
  }, undefined, false, undefined, this),
71024
- screen === "terminalWidth" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(TerminalWidthMenu, {
71082
+ screen === "terminalWidth" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(TerminalWidthMenu, {
71025
71083
  settings,
71026
71084
  onUpdate: (updatedSettings) => {
71027
71085
  setSettings(updatedSettings);
@@ -71030,7 +71088,7 @@ ${GITHUB_REPO_URL}`,
71030
71088
  setScreen("terminalConfig");
71031
71089
  }
71032
71090
  }, undefined, false, undefined, this),
71033
- screen === "globalOverrides" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(GlobalOverridesMenu, {
71091
+ screen === "globalOverrides" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(GlobalOverridesMenu, {
71034
71092
  settings,
71035
71093
  onUpdate: (updatedSettings) => {
71036
71094
  setSettings(updatedSettings);
@@ -71040,7 +71098,7 @@ ${GITHUB_REPO_URL}`,
71040
71098
  setScreen("main");
71041
71099
  }
71042
71100
  }, undefined, false, undefined, this),
71043
- screen === "confirm" && confirmDialog && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ConfirmDialog, {
71101
+ screen === "confirm" && confirmDialog && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(ConfirmDialog, {
71044
71102
  message: confirmDialog.message,
71045
71103
  onConfirm: () => void confirmDialog.action(),
71046
71104
  onCancel: () => {
@@ -71048,7 +71106,7 @@ ${GITHUB_REPO_URL}`,
71048
71106
  setConfirmDialog(null);
71049
71107
  }
71050
71108
  }, undefined, false, undefined, this),
71051
- screen === "install" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(InstallMenu, {
71109
+ screen === "install" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(InstallMenu, {
71052
71110
  bunxAvailable: isBunxAvailable(),
71053
71111
  existingStatusLine,
71054
71112
  onSelectNpx: handleNpxInstall,
@@ -71056,7 +71114,31 @@ ${GITHUB_REPO_URL}`,
71056
71114
  onCancel: handleInstallMenuCancel,
71057
71115
  initialSelection: menuSelections.install
71058
71116
  }, undefined, false, undefined, this),
71059
- screen === "powerline" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(PowerlineSetup, {
71117
+ screen === "refreshInterval" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RefreshIntervalMenu, {
71118
+ currentInterval: currentRefreshInterval,
71119
+ supportsRefreshInterval,
71120
+ onUpdate: (interval) => {
71121
+ const previous = currentRefreshInterval;
71122
+ setCurrentRefreshInterval(interval);
71123
+ setRefreshInterval(interval).then(() => {
71124
+ setFlashMessage({
71125
+ text: "✓ Refresh interval updated",
71126
+ color: "green"
71127
+ });
71128
+ }).catch(() => {
71129
+ setCurrentRefreshInterval(previous);
71130
+ setFlashMessage({
71131
+ text: "✗ Failed to save refresh interval",
71132
+ color: "red"
71133
+ });
71134
+ });
71135
+ setScreen("main");
71136
+ },
71137
+ onBack: () => {
71138
+ setScreen("main");
71139
+ }
71140
+ }, undefined, false, undefined, this),
71141
+ screen === "powerline" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(PowerlineSetup, {
71060
71142
  settings,
71061
71143
  powerlineFontStatus,
71062
71144
  onUpdate: (updatedSettings) => {
@@ -71090,7 +71172,7 @@ ${GITHUB_REPO_URL}`,
71090
71172
  };
71091
71173
  function runTUI() {
71092
71174
  process.stdout.write("\x1B[2J\x1B[H");
71093
- render_default(/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(App2, {}, undefined, false, undefined, this));
71175
+ render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(App2, {}, undefined, false, undefined, this));
71094
71176
  }
71095
71177
  // src/types/StatusJSON.ts
71096
71178
  init_zod();
@@ -71175,13 +71257,13 @@ await init_renderer2();
71175
71257
  // src/utils/skills.ts
71176
71258
  import * as fs13 from "fs";
71177
71259
  import * as os13 from "os";
71178
- import * as path12 from "path";
71260
+ import * as path11 from "path";
71179
71261
  var EMPTY = { totalInvocations: 0, uniqueSkills: [], lastSkill: null };
71180
71262
  function getSkillsDir() {
71181
- return path12.join(os13.homedir(), ".cache", "ccstatusline", "skills");
71263
+ return path11.join(os13.homedir(), ".cache", "ccstatusline", "skills");
71182
71264
  }
71183
71265
  function getSkillsFilePath(sessionId) {
71184
- return path12.join(getSkillsDir(), `skills-${sessionId}.jsonl`);
71266
+ return path11.join(getSkillsDir(), `skills-${sessionId}.jsonl`);
71185
71267
  }
71186
71268
  function getSkillsMetrics(sessionId) {
71187
71269
  const filePath = getSkillsFilePath(sessionId);
@@ -71525,8 +71607,8 @@ async function handleHook() {
71525
71607
  }
71526
71608
  const filePath = getSkillsFilePath(sessionId);
71527
71609
  const fs14 = await import("fs");
71528
- const path13 = await import("path");
71529
- fs14.mkdirSync(path13.dirname(filePath), { recursive: true });
71610
+ const path12 = await import("path");
71611
+ fs14.mkdirSync(path12.dirname(filePath), { recursive: true });
71530
71612
  const entry = JSON.stringify({
71531
71613
  timestamp: new Date().toISOString(),
71532
71614
  session_id: sessionId,