ccstatusline 2.2.4 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  ## 🆕 Recent Updates
48
48
 
49
- ### v2.2.0 - v2.2.4 - Token Speed + Skills widget updates
49
+ ### v2.2.0 - v2.2.5 - Token Speed + Skills widget updates
50
50
 
51
51
  - **🚀 New Token Speed widgets** - Added three widgets: **Input Speed**, **Output Speed**, and **Total Speed**.
52
52
  - Each speed widget supports a configurable window of `0-120` seconds in the widget editor (`w` key).
@@ -55,6 +55,8 @@
55
55
  - **🧩 New Skills widget controls (v2.2.1)** - Added configurable Skills modes (last/count/list), optional hide-when-empty behavior, and list-size limiting with most-recent-first ordering.
56
56
  - **🌐 Usage API proxy support (v2.2.2)** - Usage widgets honor the uppercase `HTTPS_PROXY` environment variable for their direct API call to Anthropic.
57
57
  - **🧠 New Thinking Effort widget (v2.2.4)** - Added a widget that shows the current Claude Code thinking effort level.
58
+ - **🍎 Better macOS usage lookup reliability (v2.2.5)** - Improved reliability when loading usage API tokens on macOS.
59
+ - **⌨️ New Vim Mode widget (v2.2.5)** - Added a widget that shows the current vim mode, with ASCII and optional Nerd Font icon display.
58
60
  - **🤝 Better subagent-aware speed reporting** - Token speed calculations continue to include referenced subagent activity so displayed speeds better reflect actual concurrent work.
59
61
 
60
62
  ### v2.1.0 - v2.1.10 - Usage widgets, links, new git insertions / deletions widgets, and reliability fixes
@@ -13487,89 +13487,6 @@ var init_strip_ansi2 = __esm(() => {
13487
13487
  regex2 = ansiRegex2();
13488
13488
  });
13489
13489
 
13490
- // node_modules/wrap-ansi/node_modules/string-width/node_modules/get-east-asian-width/lookup.js
13491
- function isAmbiguous2(x) {
13492
- return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
13493
- }
13494
- function isFullWidth2(x) {
13495
- return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
13496
- }
13497
- function isWide2(x) {
13498
- return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
13499
- }
13500
- var init_lookup2 = () => {};
13501
-
13502
- // node_modules/wrap-ansi/node_modules/string-width/node_modules/get-east-asian-width/index.js
13503
- function validate2(codePoint) {
13504
- if (!Number.isSafeInteger(codePoint)) {
13505
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
13506
- }
13507
- }
13508
- function eastAsianWidth2(codePoint, { ambiguousAsWide = false } = {}) {
13509
- validate2(codePoint);
13510
- if (isFullWidth2(codePoint) || isWide2(codePoint) || ambiguousAsWide && isAmbiguous2(codePoint)) {
13511
- return 2;
13512
- }
13513
- return 1;
13514
- }
13515
- var init_get_east_asian_width2 = __esm(() => {
13516
- init_lookup2();
13517
- });
13518
-
13519
- // node_modules/wrap-ansi/node_modules/string-width/index.js
13520
- function stringWidth2(string, options = {}) {
13521
- if (typeof string !== "string" || string.length === 0) {
13522
- return 0;
13523
- }
13524
- const {
13525
- ambiguousIsNarrow = true,
13526
- countAnsiEscapeCodes = false
13527
- } = options;
13528
- if (!countAnsiEscapeCodes) {
13529
- string = stripAnsi2(string);
13530
- }
13531
- if (string.length === 0) {
13532
- return 0;
13533
- }
13534
- let width = 0;
13535
- const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
13536
- for (const { segment: character } of segmenter2.segment(string)) {
13537
- const codePoint = character.codePointAt(0);
13538
- if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
13539
- continue;
13540
- }
13541
- if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
13542
- continue;
13543
- }
13544
- if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
13545
- continue;
13546
- }
13547
- if (codePoint >= 55296 && codePoint <= 57343) {
13548
- continue;
13549
- }
13550
- if (codePoint >= 65024 && codePoint <= 65039) {
13551
- continue;
13552
- }
13553
- if (defaultIgnorableCodePointRegex2.test(character)) {
13554
- continue;
13555
- }
13556
- if (import_emoji_regex2.default().test(character)) {
13557
- width += 2;
13558
- continue;
13559
- }
13560
- width += eastAsianWidth2(codePoint, eastAsianWidthOptions);
13561
- }
13562
- return width;
13563
- }
13564
- var import_emoji_regex2, segmenter2, defaultIgnorableCodePointRegex2;
13565
- var init_string_width2 = __esm(() => {
13566
- init_strip_ansi2();
13567
- init_get_east_asian_width2();
13568
- import_emoji_regex2 = __toESM(require_emoji_regex(), 1);
13569
- segmenter2 = new Intl.Segmenter;
13570
- defaultIgnorableCodePointRegex2 = /^\p{Default_Ignorable_Code_Point}$/u;
13571
- });
13572
-
13573
13490
  // node_modules/wrap-ansi/node_modules/ansi-styles/index.js
13574
13491
  function assembleStyles2() {
13575
13492
  const codes = new Map;
@@ -13754,13 +13671,13 @@ function wrapAnsi(string, columns, options) {
13754
13671
  `).map((line) => exec(line, columns, options)).join(`
13755
13672
  `);
13756
13673
  }
13757
- 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) => {
13674
+ 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) => {
13758
13675
  const characters = [...word];
13759
13676
  let isInsideEscape = false;
13760
13677
  let isInsideLinkEscape = false;
13761
- let visible = stringWidth2(stripAnsi2(rows.at(-1)));
13678
+ let visible = stringWidth(stripAnsi2(rows.at(-1)));
13762
13679
  for (const [index, character] of characters.entries()) {
13763
- const characterLength = stringWidth2(character);
13680
+ const characterLength = stringWidth(character);
13764
13681
  if (visible + characterLength <= columns) {
13765
13682
  rows[rows.length - 1] += character;
13766
13683
  } else {
@@ -13796,7 +13713,7 @@ var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC
13796
13713
  const words2 = string.split(" ");
13797
13714
  let last2 = words2.length;
13798
13715
  while (last2 > 0) {
13799
- if (stringWidth2(words2[last2 - 1]) > 0) {
13716
+ if (stringWidth(words2[last2 - 1]) > 0) {
13800
13717
  break;
13801
13718
  }
13802
13719
  last2--;
@@ -13818,7 +13735,7 @@ var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC
13818
13735
  if (options.trim !== false) {
13819
13736
  rows[rows.length - 1] = rows.at(-1).trimStart();
13820
13737
  }
13821
- let rowLength = stringWidth2(rows.at(-1));
13738
+ let rowLength = stringWidth(rows.at(-1));
13822
13739
  if (index !== 0) {
13823
13740
  if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
13824
13741
  rows.push("");
@@ -13893,7 +13810,7 @@ var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC
13893
13810
  return returnValue;
13894
13811
  };
13895
13812
  var init_wrap_ansi = __esm(() => {
13896
- init_string_width2();
13813
+ init_string_width();
13897
13814
  init_strip_ansi2();
13898
13815
  init_ansi_styles2();
13899
13816
  ESCAPES = new Set([
@@ -20491,7 +20408,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
20491
20408
  }
20492
20409
  return 0;
20493
20410
  };
20494
- var validate3 = function validate4(version) {
20411
+ var validate2 = function validate3(version) {
20495
20412
  return typeof version === "string" && /^[v\d]/.test(version) && semver.test(version);
20496
20413
  };
20497
20414
  var compare = function compare2(v1, v2, operator) {
@@ -35007,12 +34924,12 @@ function findWideFastPathRange(ranges) {
35007
34924
  }
35008
34925
  return [fastPathStart, fastPathEnd];
35009
34926
  }
35010
- var minimumAmbiguousCodePoint, maximumAmbiguousCodePoint, minimumFullWidthCodePoint, maximumFullWidthCodePoint, minimumHalfWidthCodePoint, maximumHalfWidthCodePoint, minimumNarrowCodePoint, maximumNarrowCodePoint, minimumWideCodePoint, maximumWideCodePoint, commonCjkCodePoint = 19968, wideFastPathStart, wideFastPathEnd, isFullWidth3 = (codePoint) => {
34927
+ var minimumAmbiguousCodePoint, maximumAmbiguousCodePoint, minimumFullWidthCodePoint, maximumFullWidthCodePoint, minimumHalfWidthCodePoint, maximumHalfWidthCodePoint, minimumNarrowCodePoint, maximumNarrowCodePoint, minimumWideCodePoint, maximumWideCodePoint, commonCjkCodePoint = 19968, wideFastPathStart, wideFastPathEnd, isFullWidth2 = (codePoint) => {
35011
34928
  if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
35012
34929
  return false;
35013
34930
  }
35014
34931
  return isInRange(fullwidthRanges, codePoint);
35015
- }, isWide3 = (codePoint) => {
34932
+ }, isWide2 = (codePoint) => {
35016
34933
  if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
35017
34934
  return true;
35018
34935
  }
@@ -35021,7 +34938,7 @@ var minimumAmbiguousCodePoint, maximumAmbiguousCodePoint, minimumFullWidthCodePo
35021
34938
  }
35022
34939
  return isInRange(wideRanges, codePoint);
35023
34940
  };
35024
- var init_lookup3 = __esm(() => {
34941
+ var init_lookup2 = __esm(() => {
35025
34942
  init_lookup_data();
35026
34943
  minimumAmbiguousCodePoint = ambiguousRanges[0];
35027
34944
  maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
@@ -35037,8 +34954,8 @@ var init_lookup3 = __esm(() => {
35037
34954
  });
35038
34955
 
35039
34956
  // node_modules/slice-ansi/node_modules/is-fullwidth-code-point/node_modules/get-east-asian-width/index.js
35040
- var init_get_east_asian_width3 = __esm(() => {
35041
- init_lookup3();
34957
+ var init_get_east_asian_width2 = __esm(() => {
34958
+ init_lookup2();
35042
34959
  });
35043
34960
 
35044
34961
  // node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js
@@ -35046,10 +34963,10 @@ function isFullwidthCodePoint2(codePoint) {
35046
34963
  if (!Number.isInteger(codePoint)) {
35047
34964
  return false;
35048
34965
  }
35049
- return isFullWidth3(codePoint) || isWide3(codePoint);
34966
+ return isFullWidth2(codePoint) || isWide2(codePoint);
35050
34967
  }
35051
34968
  var init_is_fullwidth_code_point = __esm(() => {
35052
- init_get_east_asian_width3();
34969
+ init_get_east_asian_width2();
35053
34970
  });
35054
34971
 
35055
34972
  // node_modules/slice-ansi/index.js
@@ -35108,15 +35025,15 @@ function tokenize(string, endCharacter = Number.POSITIVE_INFINITY) {
35108
35025
  continue;
35109
35026
  }
35110
35027
  }
35111
- const isFullWidth4 = isFullwidthCodePoint2(codePoint);
35028
+ const isFullWidth3 = isFullwidthCodePoint2(codePoint);
35112
35029
  const character = String.fromCodePoint(codePoint);
35113
35030
  returnValue.push({
35114
35031
  type: "character",
35115
35032
  value: character,
35116
- isFullWidth: isFullWidth4
35033
+ isFullWidth: isFullWidth3
35117
35034
  });
35118
35035
  index += character.length;
35119
- visibleCount += isFullWidth4 ? 2 : character.length;
35036
+ visibleCount += isFullWidth3 ? 2 : character.length;
35120
35037
  if (visibleCount >= endCharacter) {
35121
35038
  break;
35122
35039
  }
@@ -37479,7 +37396,7 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37479
37396
  this.stack = "";
37480
37397
  }
37481
37398
  PropTypeError.prototype = Error.prototype;
37482
- function createChainableTypeChecker(validate3) {
37399
+ function createChainableTypeChecker(validate2) {
37483
37400
  if (true) {
37484
37401
  var manualPropTypeCallCache = {};
37485
37402
  var manualPropTypeWarningCount = 0;
@@ -37510,7 +37427,7 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37510
37427
  }
37511
37428
  return null;
37512
37429
  } else {
37513
- return validate3(props, propName, componentName, location, propFullName);
37430
+ return validate2(props, propName, componentName, location, propFullName);
37514
37431
  }
37515
37432
  }
37516
37433
  var chainedCheckType = checkType.bind(null, false);
@@ -37518,7 +37435,7 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37518
37435
  return chainedCheckType;
37519
37436
  }
37520
37437
  function createPrimitiveTypeChecker(expectedType) {
37521
- function validate3(props, propName, componentName, location, propFullName, secret) {
37438
+ function validate2(props, propName, componentName, location, propFullName, secret) {
37522
37439
  var propValue = props[propName];
37523
37440
  var propType = getPropType(propValue);
37524
37441
  if (propType !== expectedType) {
@@ -37527,13 +37444,13 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37527
37444
  }
37528
37445
  return null;
37529
37446
  }
37530
- return createChainableTypeChecker(validate3);
37447
+ return createChainableTypeChecker(validate2);
37531
37448
  }
37532
37449
  function createAnyTypeChecker() {
37533
37450
  return createChainableTypeChecker(emptyFunctionThatReturnsNull);
37534
37451
  }
37535
37452
  function createArrayOfTypeChecker(typeChecker) {
37536
- function validate3(props, propName, componentName, location, propFullName) {
37453
+ function validate2(props, propName, componentName, location, propFullName) {
37537
37454
  if (typeof typeChecker !== "function") {
37538
37455
  return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
37539
37456
  }
@@ -37550,10 +37467,10 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37550
37467
  }
37551
37468
  return null;
37552
37469
  }
37553
- return createChainableTypeChecker(validate3);
37470
+ return createChainableTypeChecker(validate2);
37554
37471
  }
37555
37472
  function createElementTypeChecker() {
37556
- function validate3(props, propName, componentName, location, propFullName) {
37473
+ function validate2(props, propName, componentName, location, propFullName) {
37557
37474
  var propValue = props[propName];
37558
37475
  if (!isValidElement(propValue)) {
37559
37476
  var propType = getPropType(propValue);
@@ -37561,10 +37478,10 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37561
37478
  }
37562
37479
  return null;
37563
37480
  }
37564
- return createChainableTypeChecker(validate3);
37481
+ return createChainableTypeChecker(validate2);
37565
37482
  }
37566
37483
  function createElementTypeTypeChecker() {
37567
- function validate3(props, propName, componentName, location, propFullName) {
37484
+ function validate2(props, propName, componentName, location, propFullName) {
37568
37485
  var propValue = props[propName];
37569
37486
  if (!ReactIs.isValidElementType(propValue)) {
37570
37487
  var propType = getPropType(propValue);
@@ -37572,10 +37489,10 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37572
37489
  }
37573
37490
  return null;
37574
37491
  }
37575
- return createChainableTypeChecker(validate3);
37492
+ return createChainableTypeChecker(validate2);
37576
37493
  }
37577
37494
  function createInstanceTypeChecker(expectedClass) {
37578
- function validate3(props, propName, componentName, location, propFullName) {
37495
+ function validate2(props, propName, componentName, location, propFullName) {
37579
37496
  if (!(props[propName] instanceof expectedClass)) {
37580
37497
  var expectedClassName = expectedClass.name || ANONYMOUS;
37581
37498
  var actualClassName = getClassName(props[propName]);
@@ -37583,7 +37500,7 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37583
37500
  }
37584
37501
  return null;
37585
37502
  }
37586
- return createChainableTypeChecker(validate3);
37503
+ return createChainableTypeChecker(validate2);
37587
37504
  }
37588
37505
  function createEnumTypeChecker(expectedValues) {
37589
37506
  if (!Array.isArray(expectedValues)) {
@@ -37596,7 +37513,7 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37596
37513
  }
37597
37514
  return emptyFunctionThatReturnsNull;
37598
37515
  }
37599
- function validate3(props, propName, componentName, location, propFullName) {
37516
+ function validate2(props, propName, componentName, location, propFullName) {
37600
37517
  var propValue = props[propName];
37601
37518
  for (var i = 0;i < expectedValues.length; i++) {
37602
37519
  if (is(propValue, expectedValues[i])) {
@@ -37612,10 +37529,10 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37612
37529
  });
37613
37530
  return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
37614
37531
  }
37615
- return createChainableTypeChecker(validate3);
37532
+ return createChainableTypeChecker(validate2);
37616
37533
  }
37617
37534
  function createObjectOfTypeChecker(typeChecker) {
37618
- function validate3(props, propName, componentName, location, propFullName) {
37535
+ function validate2(props, propName, componentName, location, propFullName) {
37619
37536
  if (typeof typeChecker !== "function") {
37620
37537
  return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
37621
37538
  }
@@ -37634,7 +37551,7 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37634
37551
  }
37635
37552
  return null;
37636
37553
  }
37637
- return createChainableTypeChecker(validate3);
37554
+ return createChainableTypeChecker(validate2);
37638
37555
  }
37639
37556
  function createUnionTypeChecker(arrayOfTypeCheckers) {
37640
37557
  if (!Array.isArray(arrayOfTypeCheckers)) {
@@ -37648,7 +37565,7 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37648
37565
  return emptyFunctionThatReturnsNull;
37649
37566
  }
37650
37567
  }
37651
- function validate3(props, propName, componentName, location, propFullName) {
37568
+ function validate2(props, propName, componentName, location, propFullName) {
37652
37569
  var expectedTypes = [];
37653
37570
  for (var i2 = 0;i2 < arrayOfTypeCheckers.length; i2++) {
37654
37571
  var checker2 = arrayOfTypeCheckers[i2];
@@ -37663,22 +37580,22 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37663
37580
  var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
37664
37581
  return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
37665
37582
  }
37666
- return createChainableTypeChecker(validate3);
37583
+ return createChainableTypeChecker(validate2);
37667
37584
  }
37668
37585
  function createNodeChecker() {
37669
- function validate3(props, propName, componentName, location, propFullName) {
37586
+ function validate2(props, propName, componentName, location, propFullName) {
37670
37587
  if (!isNode2(props[propName])) {
37671
37588
  return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
37672
37589
  }
37673
37590
  return null;
37674
37591
  }
37675
- return createChainableTypeChecker(validate3);
37592
+ return createChainableTypeChecker(validate2);
37676
37593
  }
37677
37594
  function invalidValidatorError(componentName, location, propFullName, key, type) {
37678
37595
  return new PropTypeError((componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; " + "it must be a function, usually from the `prop-types` package, but received `" + type + "`.");
37679
37596
  }
37680
37597
  function createShapeTypeChecker(shapeTypes) {
37681
- function validate3(props, propName, componentName, location, propFullName) {
37598
+ function validate2(props, propName, componentName, location, propFullName) {
37682
37599
  var propValue = props[propName];
37683
37600
  var propType = getPropType(propValue);
37684
37601
  if (propType !== "object") {
@@ -37696,10 +37613,10 @@ var require_factoryWithTypeCheckers = __commonJS((exports, module) => {
37696
37613
  }
37697
37614
  return null;
37698
37615
  }
37699
- return createChainableTypeChecker(validate3);
37616
+ return createChainableTypeChecker(validate2);
37700
37617
  }
37701
37618
  function createStrictShapeTypeChecker(shapeTypes) {
37702
- function validate3(props, propName, componentName, location, propFullName) {
37619
+ function validate2(props, propName, componentName, location, propFullName) {
37703
37620
  var propValue = props[propName];
37704
37621
  var propType = getPropType(propValue);
37705
37622
  if (propType !== "object") {
@@ -37723,7 +37640,7 @@ Valid keys: ` + JSON.stringify(Object.keys(shapeTypes), null, " "));
37723
37640
  }
37724
37641
  return null;
37725
37642
  }
37726
- return createChainableTypeChecker(validate3);
37643
+ return createChainableTypeChecker(validate2);
37727
37644
  }
37728
37645
  function isNode2(propValue) {
37729
37646
  switch (typeof propValue) {
@@ -54965,6 +54882,13 @@ function toggleMetadataFlag(item, key) {
54965
54882
  }
54966
54883
  };
54967
54884
  }
54885
+ function removeMetadataKeys(item, keys2) {
54886
+ const nextMetadata = Object.fromEntries(Object.entries(item.metadata ?? {}).filter(([key]) => !keys2.includes(key)));
54887
+ return {
54888
+ ...item,
54889
+ metadata: Object.keys(nextMetadata).length > 0 ? nextMetadata : undefined
54890
+ };
54891
+ }
54968
54892
 
54969
54893
  // src/widgets/shared/git-no-git.ts
54970
54894
  function isHideNoGitEnabled(item) {
@@ -56103,7 +56027,7 @@ function getTerminalWidth() {
56103
56027
  function canDetectTerminalWidth() {
56104
56028
  return probeTerminalWidth() !== null;
56105
56029
  }
56106
- var __dirname = "/Users/sirmalloc/Projects/Personal/ccstatusline/src/utils", PACKAGE_VERSION = "2.2.4";
56030
+ var __dirname = "/Users/sirmalloc/Projects/Personal/ccstatusline/src/utils", PACKAGE_VERSION = "2.2.5";
56107
56031
  var init_terminal = () => {};
56108
56032
 
56109
56033
  // src/utils/renderer.ts
@@ -56190,9 +56114,9 @@ function renderPowerlineStatusLine(widgets, settings, context, lineIndex = 0, gl
56190
56114
  }
56191
56115
  const actualPreRenderedIndex = preRenderedIndices[i];
56192
56116
  const preRendered = actualPreRenderedIndex !== undefined ? preRenderedWidgets[actualPreRenderedIndex] : undefined;
56117
+ const widgetImpl = getWidget(widget.type);
56193
56118
  if (preRendered?.content) {
56194
56119
  widgetText = preRendered.content;
56195
- const widgetImpl = getWidget(widget.type);
56196
56120
  if (widgetImpl) {
56197
56121
  defaultColor = widgetImpl.getDefaultColor();
56198
56122
  }
@@ -56314,7 +56238,7 @@ function renderPowerlineStatusLine(widgets, settings, context, lineIndex = 0, gl
56314
56238
  const separatorIndex = Math.min(globalIndex, separators.length - 1);
56315
56239
  const separator = separators[separatorIndex] ?? "";
56316
56240
  const shouldInvert = invertBgs[separatorIndex] ?? false;
56317
- let separatorOutput = "";
56241
+ let separatorOutput;
56318
56242
  const sameBackground = widget.bgColor && nextWidget.bgColor && widget.bgColor === nextWidget.bgColor;
56319
56243
  if (shouldInvert) {
56320
56244
  if (widget.bgColor && nextWidget.bgColor) {
@@ -56628,7 +56552,7 @@ function renderStatusLine(widgets, settings, context, preRenderedWidgets, preCal
56628
56552
  }
56629
56553
  }
56630
56554
  });
56631
- let statusLine = "";
56555
+ let statusLine;
56632
56556
  if (hasFlexSeparator && terminalWidth) {
56633
56557
  const parts = [[]];
56634
56558
  let currentPart = 0;
@@ -57465,8 +57389,8 @@ var import_react27, jsx_dev_runtime, CustomTextEditor = ({ widget, onComplete, o
57465
57389
  const [cursorPos, setCursorPos] = import_react27.useState(text.length);
57466
57390
  const getGraphemes = (str) => {
57467
57391
  if ("Segmenter" in Intl) {
57468
- const segmenter3 = new Intl.Segmenter(undefined, { granularity: "grapheme" });
57469
- return Array.from(segmenter3.segment(str), (seg) => seg.segment);
57392
+ const segmenter2 = new Intl.Segmenter(undefined, { granularity: "grapheme" });
57393
+ return Array.from(segmenter2.segment(str), (seg) => seg.segment);
57470
57394
  }
57471
57395
  return Array.from(str);
57472
57396
  };
@@ -58943,7 +58867,7 @@ var init_usage_types = __esm(() => {
58943
58867
  });
58944
58868
 
58945
58869
  // src/utils/usage-fetch.ts
58946
- import { execSync as execSync4 } from "child_process";
58870
+ import { execFileSync } from "child_process";
58947
58871
  import * as fs3 from "fs";
58948
58872
  import * as https from "https";
58949
58873
  import * as os3 from "os";
@@ -59019,33 +58943,121 @@ function getStaleUsageOrError(error48, now2, errorCacheMaxAge = LOCK_MAX_AGE) {
59019
58943
  }
59020
58944
  return setCachedUsageError(error48, now2, errorCacheMaxAge);
59021
58945
  }
59022
- function getUsageToken() {
59023
- const now2 = Math.floor(Date.now() / 1000);
59024
- if (cachedUsageToken && now2 - usageTokenCacheTime < TOKEN_CACHE_MAX_AGE) {
59025
- return cachedUsageToken;
58946
+ function normalizeSecurityTimedateValue(rawValue) {
58947
+ const cleaned = rawValue.replace(/\\000/g, "").replace(/\0/g, "").trim();
58948
+ return /^\d{14}Z$/.test(cleaned) ? cleaned : null;
58949
+ }
58950
+ function decodeHexAscii(rawHex) {
58951
+ if (rawHex.length === 0 || rawHex.length % 2 !== 0) {
58952
+ return null;
59026
58953
  }
59027
- try {
59028
- const isMac = process.platform === "darwin";
59029
- if (isMac) {
59030
- const result2 = execSync4('security find-generic-password -s "Claude Code-credentials" -w 2>/dev/null', { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
59031
- const token2 = parseUsageAccessToken(result2);
59032
- if (token2) {
59033
- cachedUsageToken = token2;
59034
- usageTokenCacheTime = now2;
59035
- }
59036
- return token2;
58954
+ let decoded = "";
58955
+ for (let i = 0;i < rawHex.length; i += 2) {
58956
+ const byte = Number.parseInt(rawHex.slice(i, i + 2), 16);
58957
+ if (Number.isNaN(byte)) {
58958
+ return null;
59037
58959
  }
59038
- const credFile = path2.join(getClaudeConfigDir(), ".credentials.json");
59039
- const token = parseUsageAccessToken(fs3.readFileSync(credFile, "utf8"));
58960
+ decoded += String.fromCharCode(byte);
58961
+ }
58962
+ return decoded;
58963
+ }
58964
+ function parseModifiedTimeFromKeychainBlock(block) {
58965
+ const quotedMatch = /"mdat"<timedate>=(?:0x[0-9A-Fa-f]+\s+)?"([^"]+)"/.exec(block);
58966
+ if (quotedMatch?.[1]) {
58967
+ const parsed = normalizeSecurityTimedateValue(quotedMatch[1]);
58968
+ if (parsed !== null) {
58969
+ return parsed;
58970
+ }
58971
+ }
58972
+ const hexMatch = /"mdat"<timedate>=0x([0-9A-Fa-f]+)/.exec(block);
58973
+ if (!hexMatch?.[1]) {
58974
+ return null;
58975
+ }
58976
+ const decoded = decodeHexAscii(hexMatch[1]);
58977
+ return decoded ? normalizeSecurityTimedateValue(decoded) : null;
58978
+ }
58979
+ function sortMacKeychainCredentialCandidates(a, b) {
58980
+ if (a.modifiedAt !== null && b.modifiedAt !== null && a.modifiedAt !== b.modifiedAt) {
58981
+ return b.modifiedAt.localeCompare(a.modifiedAt);
58982
+ }
58983
+ if (a.modifiedAt !== null && b.modifiedAt === null) {
58984
+ return -1;
58985
+ }
58986
+ if (a.modifiedAt === null && b.modifiedAt !== null) {
58987
+ return 1;
58988
+ }
58989
+ return a.order - b.order;
58990
+ }
58991
+ function parseMacKeychainCredentialCandidates(rawDump, servicePrefix = MACOS_USAGE_CREDENTIALS_SERVICE) {
58992
+ const blocks = rawDump.split(/(?=^keychain:\s)/m).filter((block) => block.trim().length > 0);
58993
+ const dedupedCandidates = new Map;
58994
+ let order = 0;
58995
+ for (const block of blocks) {
58996
+ const serviceMatch = /"svce"<blob>="([^"]+)"/.exec(block);
58997
+ const service = serviceMatch?.[1];
58998
+ if (!service || !service.startsWith(servicePrefix) || service === MACOS_USAGE_CREDENTIALS_SERVICE) {
58999
+ continue;
59000
+ }
59001
+ const candidate = {
59002
+ modifiedAt: parseModifiedTimeFromKeychainBlock(block),
59003
+ order,
59004
+ service
59005
+ };
59006
+ order += 1;
59007
+ const existing = dedupedCandidates.get(service);
59008
+ if (!existing || sortMacKeychainCredentialCandidates(candidate, existing) < 0) {
59009
+ dedupedCandidates.set(service, candidate);
59010
+ }
59011
+ }
59012
+ return [...dedupedCandidates.values()].sort(sortMacKeychainCredentialCandidates).map((candidate) => candidate.service);
59013
+ }
59014
+ function readMacKeychainSecret(service) {
59015
+ try {
59016
+ return execFileSync("security", ["find-generic-password", "-s", service, "-w"], { encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] }).trim();
59017
+ } catch {
59018
+ return null;
59019
+ }
59020
+ }
59021
+ function readUsageTokenFromMacKeychainService(service) {
59022
+ const secret = readMacKeychainSecret(service);
59023
+ return secret ? parseUsageAccessToken(secret) : null;
59024
+ }
59025
+ function listMacKeychainCredentialCandidates() {
59026
+ try {
59027
+ const rawDump = execFileSync("security", ["dump-keychain"], {
59028
+ encoding: "utf8",
59029
+ maxBuffer: MACOS_SECURITY_DUMP_MAX_BUFFER,
59030
+ stdio: ["pipe", "pipe", "ignore"]
59031
+ });
59032
+ return parseMacKeychainCredentialCandidates(rawDump);
59033
+ } catch {
59034
+ return [];
59035
+ }
59036
+ }
59037
+ function readUsageTokenFromMacKeychainCandidates() {
59038
+ const candidates = listMacKeychainCredentialCandidates();
59039
+ for (const service of candidates) {
59040
+ const token = readUsageTokenFromMacKeychainService(service);
59040
59041
  if (token) {
59041
- cachedUsageToken = token;
59042
- usageTokenCacheTime = now2;
59042
+ return token;
59043
59043
  }
59044
- return token;
59044
+ }
59045
+ return null;
59046
+ }
59047
+ function readUsageTokenFromCredentialsFile() {
59048
+ try {
59049
+ const credFile = path2.join(getClaudeConfigDir(), ".credentials.json");
59050
+ return parseUsageAccessToken(fs3.readFileSync(credFile, "utf8"));
59045
59051
  } catch {
59046
59052
  return null;
59047
59053
  }
59048
59054
  }
59055
+ function getUsageToken() {
59056
+ if (process.platform !== "darwin") {
59057
+ return readUsageTokenFromCredentialsFile();
59058
+ }
59059
+ return readUsageTokenFromMacKeychainService(MACOS_USAGE_CREDENTIALS_SERVICE) ?? readUsageTokenFromMacKeychainCandidates() ?? readUsageTokenFromCredentialsFile();
59060
+ }
59049
59061
  function readStaleUsageCache() {
59050
59062
  try {
59051
59063
  return parseCachedUsageData(fs3.readFileSync(CACHE_FILE, "utf8"));
@@ -59233,7 +59245,7 @@ async function fetchUsageData() {
59233
59245
  return getStaleUsageOrError("parse-error", now2);
59234
59246
  }
59235
59247
  }
59236
- var import_https_proxy_agent, CACHE_DIR, CACHE_FILE, LOCK_FILE, CACHE_MAX_AGE = 180, LOCK_MAX_AGE = 30, DEFAULT_RATE_LIMIT_BACKOFF = 300, TOKEN_CACHE_MAX_AGE = 3600, UsageCredentialsSchema, UsageLockErrorSchema, UsageLockSchema, CachedUsageDataSchema, UsageApiResponseSchema, cachedUsageData = null, usageCacheTime = 0, cachedUsageToken = null, usageTokenCacheTime = 0, usageErrorCacheMaxAge, USAGE_API_HOST = "api.anthropic.com", USAGE_API_PATH = "/api/oauth/usage", USAGE_API_TIMEOUT_MS = 5000;
59248
+ 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;
59237
59249
  var init_usage_fetch = __esm(() => {
59238
59250
  init_zod();
59239
59251
  init_claude_settings();
@@ -59242,6 +59254,7 @@ var init_usage_fetch = __esm(() => {
59242
59254
  CACHE_DIR = path2.join(os3.homedir(), ".cache", "ccstatusline");
59243
59255
  CACHE_FILE = path2.join(CACHE_DIR, "usage.json");
59244
59256
  LOCK_FILE = path2.join(CACHE_DIR, "usage.lock");
59257
+ MACOS_SECURITY_DUMP_MAX_BUFFER = 8 * 1024 * 1024;
59245
59258
  UsageCredentialsSchema = exports_external.object({ claudeAiOauth: exports_external.object({ accessToken: exports_external.string().nullable().optional() }).optional() });
59246
59259
  UsageLockErrorSchema = exports_external.enum(["timeout", "rate-limited"]);
59247
59260
  UsageLockSchema = exports_external.object({
@@ -62289,17 +62302,16 @@ function getWeeklyUsageWindowFromResetAt(weeklyResetAt, nowMs = Date.now()) {
62289
62302
  function resolveWeeklyUsageWindow(usageData, nowMs = Date.now()) {
62290
62303
  return getWeeklyUsageWindowFromResetAt(usageData.weeklyResetAt, nowMs);
62291
62304
  }
62292
- function formatUsageDuration(durationMs, compact2 = false) {
62305
+ function formatUsageDuration(durationMs, compact2 = false, useDays = true) {
62293
62306
  const clampedMs = Math.max(0, durationMs);
62294
- const elapsedHours = Math.floor(clampedMs / (1000 * 60 * 60));
62295
- const elapsedMinutes = Math.floor(clampedMs % (1000 * 60 * 60) / (1000 * 60));
62296
- if (compact2) {
62297
- return elapsedMinutes === 0 ? `${elapsedHours}h` : `${elapsedHours}h${elapsedMinutes}m`;
62298
- }
62299
- if (elapsedMinutes === 0) {
62300
- return `${elapsedHours}hr`;
62301
- }
62302
- return `${elapsedHours}hr ${elapsedMinutes}m`;
62307
+ const totalHours = Math.floor(clampedMs / (1000 * 60 * 60));
62308
+ const m = Math.floor(clampedMs % (1000 * 60 * 60) / (1000 * 60));
62309
+ const hLabel = compact2 ? "h" : "hr";
62310
+ const sep2 = compact2 ? "" : " ";
62311
+ const d = useDays ? Math.floor(totalHours / 24) : 0;
62312
+ const h = useDays ? totalHours % 24 : totalHours;
62313
+ const parts = [d > 0 && `${d}d`, h > 0 && `${h}${hLabel}`, m > 0 && `${m}m`].filter(Boolean);
62314
+ return parts.length > 0 ? parts.join(sep2) : "0m";
62303
62315
  }
62304
62316
  function getUsageErrorMessage(error48) {
62305
62317
  switch (error48) {
@@ -62366,30 +62378,49 @@ function getUsageDisplayModifierText(item, options = {}) {
62366
62378
  if (isUsageInverted(item)) {
62367
62379
  modifiers.push("inverted");
62368
62380
  }
62369
- if (options.includeCompact && isUsageCompact(item)) {
62381
+ if (options.includeCompact && !isUsageProgressMode(mode) && isUsageCompact(item)) {
62370
62382
  modifiers.push("compact");
62371
62383
  }
62372
62384
  return makeModifierText(modifiers);
62373
62385
  }
62374
- function cycleUsageDisplayMode(item) {
62386
+ function cycleUsageDisplayMode(item, disabledInProgressKeys = []) {
62375
62387
  const currentMode = getUsageDisplayMode(item);
62376
62388
  const nextMode = currentMode === "time" ? "progress" : currentMode === "progress" ? "progress-short" : "time";
62389
+ const nextItem = removeMetadataKeys(item, nextMode === "time" ? ["invert"] : disabledInProgressKeys);
62377
62390
  const nextMetadata = {
62378
- ...item.metadata ?? {},
62391
+ ...nextItem.metadata ?? {},
62379
62392
  display: nextMode
62380
62393
  };
62381
- if (nextMode === "time") {
62382
- delete nextMetadata.invert;
62383
- }
62384
62394
  return {
62385
- ...item,
62395
+ ...nextItem,
62386
62396
  metadata: nextMetadata
62387
62397
  };
62388
62398
  }
62389
62399
  function toggleUsageInverted(item) {
62390
62400
  return toggleMetadataFlag(item, "invert");
62391
62401
  }
62392
- var init_usage_display = () => {};
62402
+ function getUsagePercentCustomKeybinds(item) {
62403
+ const keybinds = [PROGRESS_TOGGLE_KEYBIND];
62404
+ if (item && isUsageProgressMode(getUsageDisplayMode(item))) {
62405
+ keybinds.push(INVERT_TOGGLE_KEYBIND);
62406
+ }
62407
+ return keybinds;
62408
+ }
62409
+ function getUsageTimerCustomKeybinds(item) {
62410
+ const keybinds = [PROGRESS_TOGGLE_KEYBIND];
62411
+ if (item && isUsageProgressMode(getUsageDisplayMode(item))) {
62412
+ keybinds.push(INVERT_TOGGLE_KEYBIND);
62413
+ } else {
62414
+ keybinds.push(COMPACT_TOGGLE_KEYBIND);
62415
+ }
62416
+ return keybinds;
62417
+ }
62418
+ var PROGRESS_TOGGLE_KEYBIND, INVERT_TOGGLE_KEYBIND, COMPACT_TOGGLE_KEYBIND;
62419
+ var init_usage_display = __esm(() => {
62420
+ PROGRESS_TOGGLE_KEYBIND = { key: "p", label: "(p)rogress toggle", action: "toggle-progress" };
62421
+ INVERT_TOGGLE_KEYBIND = { key: "v", label: "in(v)ert fill", action: "toggle-invert" };
62422
+ COMPACT_TOGGLE_KEYBIND = { key: "s", label: "(s)hort time", action: "toggle-compact" };
62423
+ });
62393
62424
 
62394
62425
  // src/widgets/BlockTimer.ts
62395
62426
  function makeTimerProgressBar(percent, width) {
@@ -62420,7 +62451,7 @@ class BlockTimerWidget {
62420
62451
  }
62421
62452
  handleEditorAction(action, item) {
62422
62453
  if (action === "toggle-progress") {
62423
- return cycleUsageDisplayMode(item);
62454
+ return cycleUsageDisplayMode(item, ["compact"]);
62424
62455
  }
62425
62456
  if (action === "toggle-invert") {
62426
62457
  return toggleUsageInverted(item);
@@ -62463,12 +62494,8 @@ class BlockTimerWidget {
62463
62494
  const elapsedTime = formatUsageDuration(window2.elapsedMs, compact2);
62464
62495
  return formatRawOrLabeledValue(item, "Block: ", elapsedTime);
62465
62496
  }
62466
- getCustomKeybinds() {
62467
- return [
62468
- { key: "p", label: "(p)rogress toggle", action: "toggle-progress" },
62469
- { key: "v", label: "in(v)ert fill", action: "toggle-invert" },
62470
- { key: "s", label: "(s)hort time", action: "toggle-compact" }
62471
- ];
62497
+ getCustomKeybinds(item) {
62498
+ return getUsageTimerCustomKeybinds(item);
62472
62499
  }
62473
62500
  supportsRawValue() {
62474
62501
  return true;
@@ -63103,7 +63130,7 @@ var init_TotalSpeed = __esm(async () => {
63103
63130
  });
63104
63131
 
63105
63132
  // src/widgets/FreeMemory.ts
63106
- import { execSync as execSync5 } from "child_process";
63133
+ import { execSync as execSync4 } from "child_process";
63107
63134
  import os6 from "os";
63108
63135
  function formatBytes(bytes) {
63109
63136
  const GB = 1024 ** 3;
@@ -63119,7 +63146,7 @@ function formatBytes(bytes) {
63119
63146
  }
63120
63147
  function getUsedMemoryMacOS() {
63121
63148
  try {
63122
- const output = execSync5("vm_stat", { encoding: "utf8" });
63149
+ const output = execSync4("vm_stat", { encoding: "utf8" });
63123
63150
  const lines = output.split(`
63124
63151
  `);
63125
63152
  const firstLine = lines[0];
@@ -63297,11 +63324,8 @@ class SessionUsageWidget {
63297
63324
  }
63298
63325
  return formatRawOrLabeledValue(item, "Session: ", `${percent.toFixed(1)}%`);
63299
63326
  }
63300
- getCustomKeybinds() {
63301
- return [
63302
- { key: "p", label: "(p)rogress toggle", action: "toggle-progress" },
63303
- { key: "v", label: "in(v)ert fill", action: "toggle-invert" }
63304
- ];
63327
+ getCustomKeybinds(item) {
63328
+ return getUsagePercentCustomKeybinds(item);
63305
63329
  }
63306
63330
  supportsRawValue() {
63307
63331
  return true;
@@ -63371,11 +63395,8 @@ class WeeklyUsageWidget {
63371
63395
  }
63372
63396
  return formatRawOrLabeledValue(item, "Weekly: ", `${percent.toFixed(1)}%`);
63373
63397
  }
63374
- getCustomKeybinds() {
63375
- return [
63376
- { key: "p", label: "(p)rogress toggle", action: "toggle-progress" },
63377
- { key: "v", label: "in(v)ert fill", action: "toggle-invert" }
63378
- ];
63398
+ getCustomKeybinds(item) {
63399
+ return getUsagePercentCustomKeybinds(item);
63379
63400
  }
63380
63401
  supportsRawValue() {
63381
63402
  return true;
@@ -63418,7 +63439,7 @@ class BlockResetTimerWidget {
63418
63439
  }
63419
63440
  handleEditorAction(action, item) {
63420
63441
  if (action === "toggle-progress") {
63421
- return cycleUsageDisplayMode(item);
63442
+ return cycleUsageDisplayMode(item, ["compact"]);
63422
63443
  }
63423
63444
  if (action === "toggle-invert") {
63424
63445
  return toggleUsageInverted(item);
@@ -63459,12 +63480,8 @@ class BlockResetTimerWidget {
63459
63480
  const remainingTime = formatUsageDuration(window2.remainingMs, compact2);
63460
63481
  return formatRawOrLabeledValue(item, "Reset: ", remainingTime);
63461
63482
  }
63462
- getCustomKeybinds() {
63463
- return [
63464
- { key: "p", label: "(p)rogress toggle", action: "toggle-progress" },
63465
- { key: "v", label: "in(v)ert fill", action: "toggle-invert" },
63466
- { key: "s", label: "(s)hort time", action: "toggle-compact" }
63467
- ];
63483
+ getCustomKeybinds(item) {
63484
+ return getUsageTimerCustomKeybinds(item);
63468
63485
  }
63469
63486
  supportsRawValue() {
63470
63487
  return true;
@@ -63485,6 +63502,33 @@ function makeTimerProgressBar3(percent, width) {
63485
63502
  const emptyWidth = width - filledWidth;
63486
63503
  return "█".repeat(filledWidth) + "░".repeat(emptyWidth);
63487
63504
  }
63505
+ function isWeeklyResetHoursOnly(item) {
63506
+ return isMetadataFlagEnabled(item, "hours");
63507
+ }
63508
+ function toggleWeeklyResetHoursOnly(item) {
63509
+ return toggleMetadataFlag(item, "hours");
63510
+ }
63511
+ function getWeeklyResetModifierText(item) {
63512
+ const displayMode = getUsageDisplayMode(item);
63513
+ const modifiers = [];
63514
+ if (displayMode === "progress") {
63515
+ modifiers.push("progress bar");
63516
+ } else if (displayMode === "progress-short") {
63517
+ modifiers.push("short bar");
63518
+ }
63519
+ if (isUsageInverted(item)) {
63520
+ modifiers.push("inverted");
63521
+ }
63522
+ if (!isUsageProgressMode(displayMode)) {
63523
+ if (isUsageCompact(item)) {
63524
+ modifiers.push("compact");
63525
+ }
63526
+ if (isWeeklyResetHoursOnly(item)) {
63527
+ modifiers.push("hours only");
63528
+ }
63529
+ }
63530
+ return makeModifierText(modifiers);
63531
+ }
63488
63532
 
63489
63533
  class WeeklyResetTimerWidget {
63490
63534
  getDefaultColor() {
@@ -63502,12 +63546,12 @@ class WeeklyResetTimerWidget {
63502
63546
  getEditorDisplay(item) {
63503
63547
  return {
63504
63548
  displayText: this.getDisplayName(),
63505
- modifierText: getUsageDisplayModifierText(item, { includeCompact: true })
63549
+ modifierText: getWeeklyResetModifierText(item)
63506
63550
  };
63507
63551
  }
63508
63552
  handleEditorAction(action, item) {
63509
63553
  if (action === "toggle-progress") {
63510
- return cycleUsageDisplayMode(item);
63554
+ return cycleUsageDisplayMode(item, ["compact", "hours"]);
63511
63555
  }
63512
63556
  if (action === "toggle-invert") {
63513
63557
  return toggleUsageInverted(item);
@@ -63515,12 +63559,16 @@ class WeeklyResetTimerWidget {
63515
63559
  if (action === "toggle-compact") {
63516
63560
  return toggleUsageCompact(item);
63517
63561
  }
63562
+ if (action === "toggle-hours") {
63563
+ return toggleWeeklyResetHoursOnly(item);
63564
+ }
63518
63565
  return null;
63519
63566
  }
63520
63567
  render(item, context, settings) {
63521
63568
  const displayMode = getUsageDisplayMode(item);
63522
63569
  const inverted = isUsageInverted(item);
63523
63570
  const compact2 = isUsageCompact(item);
63571
+ const useDays = !isWeeklyResetHoursOnly(item);
63524
63572
  if (context.isPreview) {
63525
63573
  const previewPercent = inverted ? 90 : 10;
63526
63574
  if (isUsageProgressMode(displayMode)) {
@@ -63528,7 +63576,7 @@ class WeeklyResetTimerWidget {
63528
63576
  const progressBar = makeTimerProgressBar3(previewPercent, barWidth);
63529
63577
  return formatRawOrLabeledValue(item, "Weekly Reset ", `[${progressBar}] ${previewPercent.toFixed(1)}%`);
63530
63578
  }
63531
- return formatRawOrLabeledValue(item, "Weekly Reset: ", compact2 ? "36h30m" : "36hr 30m");
63579
+ return formatRawOrLabeledValue(item, "Weekly Reset: ", formatUsageDuration(WEEKLY_PREVIEW_DURATION_MS, compact2, useDays));
63532
63580
  }
63533
63581
  const usageData = context.usageData ?? {};
63534
63582
  const window2 = resolveWeeklyUsageWindow(usageData);
@@ -63545,15 +63593,15 @@ class WeeklyResetTimerWidget {
63545
63593
  const percentage = percent.toFixed(1);
63546
63594
  return formatRawOrLabeledValue(item, "Weekly Reset ", `[${progressBar}] ${percentage}%`);
63547
63595
  }
63548
- const remainingTime = formatUsageDuration(window2.remainingMs, compact2);
63596
+ const remainingTime = formatUsageDuration(window2.remainingMs, compact2, useDays);
63549
63597
  return formatRawOrLabeledValue(item, "Weekly Reset: ", remainingTime);
63550
63598
  }
63551
- getCustomKeybinds() {
63552
- return [
63553
- { key: "p", label: "(p)rogress toggle", action: "toggle-progress" },
63554
- { key: "v", label: "in(v)ert fill", action: "toggle-invert" },
63555
- { key: "s", label: "(s)hort time", action: "toggle-compact" }
63556
- ];
63599
+ getCustomKeybinds(item) {
63600
+ const keybinds = getUsageTimerCustomKeybinds(item);
63601
+ if (!item || !isUsageProgressMode(getUsageDisplayMode(item))) {
63602
+ keybinds.push({ key: "h", label: "(h)ours only", action: "toggle-hours" });
63603
+ }
63604
+ return keybinds;
63557
63605
  }
63558
63606
  supportsRawValue() {
63559
63607
  return true;
@@ -63562,9 +63610,11 @@ class WeeklyResetTimerWidget {
63562
63610
  return true;
63563
63611
  }
63564
63612
  }
63613
+ var WEEKLY_PREVIEW_DURATION_MS;
63565
63614
  var init_WeeklyResetTimer = __esm(() => {
63566
63615
  init_usage();
63567
63616
  init_usage_display();
63617
+ WEEKLY_PREVIEW_DURATION_MS = 36.5 * 60 * 60 * 1000;
63568
63618
  });
63569
63619
 
63570
63620
  // src/widgets/ContextBar.ts
@@ -63902,12 +63952,15 @@ class SkillsWidget {
63902
63952
  { event: "UserPromptSubmit" }
63903
63953
  ];
63904
63954
  }
63905
- getCustomKeybinds() {
63906
- return [
63955
+ getCustomKeybinds(item) {
63956
+ const keybinds = [
63907
63957
  { key: "v", label: "(v)iew: last/count/list", action: "cycle-mode" },
63908
- { key: "h", label: "(h)ide when empty", action: TOGGLE_HIDE_EMPTY_ACTION },
63909
- { key: "l", label: "(l)imit", action: EDIT_LIST_LIMIT_ACTION }
63958
+ { key: "h", label: "(h)ide when empty", action: TOGGLE_HIDE_EMPTY_ACTION }
63910
63959
  ];
63960
+ if (item && this.getMode(item) === "list") {
63961
+ keybinds.push({ key: "l", label: "(l)imit", action: EDIT_LIST_LIMIT_ACTION });
63962
+ }
63963
+ return keybinds;
63911
63964
  }
63912
63965
  getEditorDisplay(item) {
63913
63966
  const modifiers = [MODE_LABELS[this.getMode(item)]];
@@ -63925,7 +63978,8 @@ class SkillsWidget {
63925
63978
  handleEditorAction(action, item) {
63926
63979
  if (action === "cycle-mode") {
63927
63980
  const next = MODES[(MODES.indexOf(this.getMode(item)) + 1) % MODES.length] ?? "current";
63928
- return { ...item, metadata: { ...item.metadata, mode: next } };
63981
+ const nextItem = next === "list" ? item : removeMetadataKeys(item, [LIST_LIMIT_KEY]);
63982
+ return { ...nextItem, metadata: { ...nextItem.metadata, mode: next } };
63929
63983
  }
63930
63984
  if (action === TOGGLE_HIDE_EMPTY_ACTION) {
63931
63985
  return toggleMetadataFlag(item, HIDE_WHEN_EMPTY_KEY);
@@ -64102,6 +64156,124 @@ var init_ThinkingEffort = __esm(() => {
64102
64156
  init_jsonl();
64103
64157
  });
64104
64158
 
64159
+ // src/widgets/VimMode.ts
64160
+ function getFormat(item) {
64161
+ const f = item.metadata?.format;
64162
+ return FORMATS.includes(f ?? "") ? f : DEFAULT_FORMAT;
64163
+ }
64164
+ function setFormat(item, format) {
64165
+ if (format === DEFAULT_FORMAT) {
64166
+ const { format: removedFormat, ...restMetadata } = item.metadata ?? {};
64167
+ return {
64168
+ ...item,
64169
+ metadata: Object.keys(restMetadata).length > 0 ? restMetadata : undefined
64170
+ };
64171
+ }
64172
+ return {
64173
+ ...item,
64174
+ metadata: {
64175
+ ...item.metadata ?? {},
64176
+ format
64177
+ }
64178
+ };
64179
+ }
64180
+ function isNerdFontEnabled(item) {
64181
+ return item.metadata?.[NERD_FONT_METADATA_KEY] === "true";
64182
+ }
64183
+ function toggleNerdFont(item) {
64184
+ if (!isNerdFontEnabled(item)) {
64185
+ return {
64186
+ ...item,
64187
+ metadata: {
64188
+ ...item.metadata ?? {},
64189
+ [NERD_FONT_METADATA_KEY]: "true"
64190
+ }
64191
+ };
64192
+ }
64193
+ const { [NERD_FONT_METADATA_KEY]: removedNerdFont, ...restMetadata } = item.metadata ?? {};
64194
+ return {
64195
+ ...item,
64196
+ metadata: Object.keys(restMetadata).length > 0 ? restMetadata : undefined
64197
+ };
64198
+ }
64199
+ function formatMode(mode, format, icon) {
64200
+ const letter = mode === "NORMAL" ? "N" : mode === "INSERT" ? "I" : mode[0] ?? mode;
64201
+ switch (format) {
64202
+ case "icon-dash-letter":
64203
+ return `${icon}-${letter}`;
64204
+ case "icon-letter":
64205
+ return `${icon} ${letter}`;
64206
+ case "icon":
64207
+ return icon;
64208
+ case "letter":
64209
+ return letter;
64210
+ case "word":
64211
+ return mode;
64212
+ }
64213
+ }
64214
+
64215
+ class VimModeWidget {
64216
+ getDefaultColor() {
64217
+ return "green";
64218
+ }
64219
+ getDescription() {
64220
+ return "Displays current vim editor mode";
64221
+ }
64222
+ getDisplayName() {
64223
+ return "Vim Mode";
64224
+ }
64225
+ getCategory() {
64226
+ return "Core";
64227
+ }
64228
+ getEditorDisplay(item) {
64229
+ const modifiers = [getFormat(item)];
64230
+ if (isNerdFontEnabled(item)) {
64231
+ modifiers.push("nerd font");
64232
+ }
64233
+ return {
64234
+ displayText: this.getDisplayName(),
64235
+ modifierText: `(${modifiers.join(", ")})`
64236
+ };
64237
+ }
64238
+ handleEditorAction(action, item) {
64239
+ if (action === CYCLE_FORMAT_ACTION) {
64240
+ const currentFormat = getFormat(item);
64241
+ const nextFormat = FORMATS[(FORMATS.indexOf(currentFormat) + 1) % FORMATS.length] ?? DEFAULT_FORMAT;
64242
+ return setFormat(item, nextFormat);
64243
+ }
64244
+ if (action === TOGGLE_NERD_FONT_ACTION) {
64245
+ return toggleNerdFont(item);
64246
+ }
64247
+ return null;
64248
+ }
64249
+ render(item, context, _settings) {
64250
+ const format = getFormat(item);
64251
+ const icon = isNerdFontEnabled(item) ? VIM_NERD_FONT_ICON : VIM_ICON;
64252
+ if (context.isPreview)
64253
+ return formatMode("NORMAL", format, icon);
64254
+ const mode = context.data?.vim?.mode;
64255
+ if (mode === undefined)
64256
+ return null;
64257
+ return formatMode(mode, format, icon);
64258
+ }
64259
+ getCustomKeybinds() {
64260
+ return [
64261
+ { key: "f", label: "(f)ormat", action: CYCLE_FORMAT_ACTION },
64262
+ { key: "n", label: "(n)erd font", action: TOGGLE_NERD_FONT_ACTION }
64263
+ ];
64264
+ }
64265
+ supportsRawValue() {
64266
+ return false;
64267
+ }
64268
+ supportsColors(_item) {
64269
+ return true;
64270
+ }
64271
+ }
64272
+ var VIM_ICON = "v", VIM_NERD_FONT_ICON = "", FORMATS, DEFAULT_FORMAT = "icon-dash-letter", CYCLE_FORMAT_ACTION = "cycle-format", TOGGLE_NERD_FONT_ACTION = "toggle-nerd-font", NERD_FONT_METADATA_KEY = "nerdFont";
64273
+ var init_VimMode = __esm(() => {
64274
+ FORMATS = ["icon-dash-letter", "icon-letter", "icon", "letter", "word"];
64275
+ });
64276
+
64105
64277
  // src/widgets/index.ts
64106
64278
  var init_widgets = __esm(async () => {
64107
64279
  init_GitBranch();
@@ -64122,6 +64294,7 @@ var init_widgets = __esm(async () => {
64122
64294
  init_WeeklyResetTimer();
64123
64295
  init_ContextBar();
64124
64296
  init_ThinkingEffort();
64297
+ init_VimMode();
64125
64298
  await __promiseAll([
64126
64299
  init_TokensInput(),
64127
64300
  init_TokensOutput(),
@@ -64180,7 +64353,8 @@ var init_widget_manifest = __esm(async () => {
64180
64353
  { type: "weekly-reset-timer", create: () => new WeeklyResetTimerWidget },
64181
64354
  { type: "context-bar", create: () => new ContextBarWidget },
64182
64355
  { type: "skills", create: () => new SkillsWidget },
64183
- { type: "thinking-effort", create: () => new ThinkingEffortWidget }
64356
+ { type: "thinking-effort", create: () => new ThinkingEffortWidget },
64357
+ { type: "vim-mode", create: () => new VimModeWidget }
64184
64358
  ];
64185
64359
  LAYOUT_WIDGET_MANIFEST = [
64186
64360
  {
@@ -64489,7 +64663,7 @@ var init_config = __esm(() => {
64489
64663
  });
64490
64664
 
64491
64665
  // src/utils/claude-settings.ts
64492
- import { execSync as execSync6 } from "child_process";
64666
+ import { execSync as execSync5 } from "child_process";
64493
64667
  import * as fs10 from "fs";
64494
64668
  import * as os8 from "os";
64495
64669
  import * as path8 from "path";
@@ -64598,7 +64772,7 @@ async function isInstalled() {
64598
64772
  function isBunxAvailable() {
64599
64773
  try {
64600
64774
  const command = process.platform === "win32" ? "where bunx" : "which bunx";
64601
- execSync6(command, { stdio: "ignore" });
64775
+ execSync5(command, { stdio: "ignore" });
64602
64776
  return true;
64603
64777
  } catch {
64604
64778
  return false;
@@ -65195,7 +65369,7 @@ function openExternalUrl(url2) {
65195
65369
  }
65196
65370
 
65197
65371
  // src/utils/powerline.ts
65198
- import { execSync as execSync7 } from "child_process";
65372
+ import { execSync as execSync6 } from "child_process";
65199
65373
  import * as fs11 from "fs";
65200
65374
  import * as os10 from "os";
65201
65375
  import * as path9 from "path";
@@ -65329,7 +65503,7 @@ async function installPowerlineFonts() {
65329
65503
  if (fs11.existsSync(tempDir)) {
65330
65504
  fs11.rmSync(tempDir, { recursive: true, force: true });
65331
65505
  }
65332
- execSync7(`git clone --depth=1 https://github.com/powerline/fonts.git "${tempDir}"`, {
65506
+ execSync6(`git clone --depth=1 https://github.com/powerline/fonts.git "${tempDir}"`, {
65333
65507
  stdio: "pipe",
65334
65508
  encoding: "utf8"
65335
65509
  });
@@ -65337,14 +65511,14 @@ async function installPowerlineFonts() {
65337
65511
  const installScript = path9.join(tempDir, "install.sh");
65338
65512
  if (fs11.existsSync(installScript)) {
65339
65513
  fs11.chmodSync(installScript, 493);
65340
- execSync7(`cd "${tempDir}" && ./install.sh`, {
65514
+ execSync6(`cd "${tempDir}" && ./install.sh`, {
65341
65515
  stdio: "pipe",
65342
65516
  encoding: "utf8",
65343
65517
  shell: "/bin/bash"
65344
65518
  });
65345
65519
  if (platform4 === "linux") {
65346
65520
  try {
65347
- execSync7("fc-cache -f -v", {
65521
+ execSync6("fc-cache -f -v", {
65348
65522
  stdio: "pipe",
65349
65523
  encoding: "utf8"
65350
65524
  });
@@ -67322,7 +67496,7 @@ function handleNormalInputMode({
67322
67496
  setMoveMode,
67323
67497
  setShowClearConfirm,
67324
67498
  openWidgetPicker,
67325
- getVisibleCustomKeybinds,
67499
+ getCustomKeybindsForWidget,
67326
67500
  setCustomEditorWidget
67327
67501
  }) {
67328
67502
  if (key.upArrow && widgets.length > 0) {
@@ -67399,7 +67573,7 @@ function handleNormalInputMode({
67399
67573
  if (!widgetImpl?.getCustomKeybinds) {
67400
67574
  return;
67401
67575
  }
67402
- const customKeybinds = getVisibleCustomKeybinds(widgetImpl, currentWidget);
67576
+ const customKeybinds = getCustomKeybindsForWidget(widgetImpl, currentWidget);
67403
67577
  const matchedKeybind = customKeybinds.find((kb) => kb.key === input);
67404
67578
  if (matchedKeybind && !key.ctrl) {
67405
67579
  if (widgetImpl.handleEditorAction) {
@@ -67419,24 +67593,6 @@ function handleNormalInputMode({
67419
67593
  }
67420
67594
  }
67421
67595
 
67422
- // src/tui/components/items-editor/keybind-visibility.ts
67423
- function isProgressMode(widget) {
67424
- const mode = widget.metadata?.display;
67425
- return mode === "progress" || mode === "progress-short";
67426
- }
67427
- function shouldShowCustomKeybind(widget, keybind) {
67428
- if (keybind.action === "edit-list-limit") {
67429
- return widget.type === "skills" && widget.metadata?.mode === "list";
67430
- }
67431
- if (keybind.action === "toggle-invert") {
67432
- return isProgressMode(widget);
67433
- }
67434
- if (keybind.action === "toggle-compact") {
67435
- return !isProgressMode(widget);
67436
- }
67437
- return true;
67438
- }
67439
-
67440
67596
  // src/tui/components/ItemsEditor.tsx
67441
67597
  var jsx_dev_runtime12 = __toESM(require_jsx_dev_runtime(), 1);
67442
67598
  var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
@@ -67473,11 +67629,11 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
67473
67629
  const handleEditorCancel = () => {
67474
67630
  setCustomEditorWidget(null);
67475
67631
  };
67476
- const getVisibleCustomKeybinds = (widgetImpl, widget) => {
67632
+ const getCustomKeybindsForWidget = (widgetImpl, widget) => {
67477
67633
  if (!widgetImpl.getCustomKeybinds) {
67478
67634
  return [];
67479
67635
  }
67480
- return widgetImpl.getCustomKeybinds().filter((keybind) => shouldShowCustomKeybind(widget, keybind));
67636
+ return widgetImpl.getCustomKeybinds(widget);
67481
67637
  };
67482
67638
  const openWidgetPicker = (action) => {
67483
67639
  if (widgetCatalog.length === 0) {
@@ -67562,7 +67718,7 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
67562
67718
  setMoveMode,
67563
67719
  setShowClearConfirm,
67564
67720
  openWidgetPicker,
67565
- getVisibleCustomKeybinds,
67721
+ getCustomKeybindsForWidget,
67566
67722
  setCustomEditorWidget
67567
67723
  });
67568
67724
  });
@@ -67599,7 +67755,7 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
67599
67755
  const widgetImpl = getWidget(currentWidget.type);
67600
67756
  if (widgetImpl) {
67601
67757
  canToggleRaw = widgetImpl.supportsRawValue();
67602
- customKeybinds = getVisibleCustomKeybinds(widgetImpl, currentWidget);
67758
+ customKeybinds = getCustomKeybindsForWidget(widgetImpl, currentWidget);
67603
67759
  } else {
67604
67760
  canToggleRaw = false;
67605
67761
  }
@@ -70307,7 +70463,8 @@ var StatusJSONSchema = exports_external.looseObject({
70307
70463
  ]).nullable().optional(),
70308
70464
  used_percentage: CoercedNumberSchema.nullable().optional(),
70309
70465
  remaining_percentage: CoercedNumberSchema.nullable().optional()
70310
- }).nullable().optional()
70466
+ }).nullable().optional(),
70467
+ vim: exports_external.object({ mode: exports_external.string().optional() }).nullable().optional()
70311
70468
  });
70312
70469
 
70313
70470
  // src/ccstatusline.ts
@@ -70414,8 +70571,8 @@ async function ensureWindowsUtf8CodePage() {
70414
70571
  return;
70415
70572
  }
70416
70573
  try {
70417
- const { execFileSync } = await import("child_process");
70418
- execFileSync("chcp.com", ["65001"], { stdio: "ignore" });
70574
+ const { execFileSync: execFileSync2 } = await import("child_process");
70575
+ execFileSync2("chcp.com", ["65001"], { stdio: "ignore" });
70419
70576
  } catch {}
70420
70577
  }
70421
70578
  async function renderMultipleLines(data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccstatusline",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "A customizable status line formatter for Claude Code CLI",
5
5
  "module": "src/ccstatusline.ts",
6
6
  "type": "module",
@@ -22,21 +22,22 @@
22
22
  "docs:clean": "rm -rf docs"
23
23
  },
24
24
  "devDependencies": {
25
- "@eslint/js": "^9.33.0",
25
+ "@eslint/js": "^10.0.1",
26
26
  "@stylistic/eslint-plugin": "^5.2.3",
27
27
  "@types/bun": "latest",
28
28
  "@types/pluralize": "^0.0.33",
29
29
  "@types/react": "^19.1.10",
30
30
  "chalk": "^5.5.0",
31
- "eslint": "^9.33.0",
31
+ "eslint": "^10.0.0",
32
32
  "eslint-import-resolver-typescript": "^4.4.4",
33
33
  "eslint-plugin-import": "^2.32.0",
34
- "eslint-plugin-import-newlines": "^1.4.0",
34
+ "eslint-plugin-import-newlines": "^2.0.0",
35
35
  "eslint-plugin-react": "^7.37.5",
36
36
  "eslint-plugin-react-hooks": "^7.0.1",
37
+ "globals": "^14.0.0",
37
38
  "https-proxy-agent": "^7.0.0",
38
39
  "ink": "6.2.0",
39
- "ink-gradient": "^3.0.0",
40
+ "ink-gradient": "^4.0.0",
40
41
  "ink-select-input": "^6.2.0",
41
42
  "pluralize": "^8.0.0",
42
43
  "react": "^19.1.1",