ccstatusline-zh 2.2.31 → 2.2.32

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.
@@ -22,6 +22,12 @@ import {
22
22
  getPackageVersion,
23
23
  canDetectTerminalWidth,
24
24
  getMatchSegments,
25
+ EDIT_LABEL_ACTION,
26
+ getLabel,
27
+ clearLabel,
28
+ setLabel,
29
+ getLabelKeybind,
30
+ getLabelModifierText,
25
31
  EDIT_HIDE_STATES_ACTION,
26
32
  MERGE_TARGET_HIDDEN_HIDEABLE_STATE,
27
33
  getEnabledHideStates,
@@ -37,6 +43,7 @@ import {
37
43
  use_app_default,
38
44
  shouldInsertInput,
39
45
  require_jsx_runtime,
46
+ useTextCursor,
40
47
  CYCLE_NUMBER_STYLE_ACTION,
41
48
  NUMBER_STYLE_LABELS,
42
49
  getNumberFormatKeybind,
@@ -74,7 +81,7 @@ import {
74
81
  validateImportFile,
75
82
  applyImport,
76
83
  saveInstallationMetadata
77
- } from "./ccstatusline-dry98q5v.js";
84
+ } from "./ccstatusline-xsgtxzjt.js";
78
85
  import {
79
86
  advanceGlobalPowerlineThemeIndex,
80
87
  advanceGlobalSeparatorIndex
@@ -1323,333 +1330,6 @@ var require_tinygradient = __commonJS(function(exports, module) {
1323
1330
  };
1324
1331
  });
1325
1332
 
1326
- // node_modules/pluralize/pluralize.js
1327
- var require_pluralize = __commonJS(function(exports, module) {
1328
- (function(root, pluralize) {
1329
- if (typeof exports === "object" && typeof module === "object") {
1330
- module.exports = pluralize();
1331
- } else if (typeof define === "function" && define.amd) {
1332
- define(function() {
1333
- return pluralize();
1334
- });
1335
- } else {
1336
- root.pluralize = pluralize();
1337
- }
1338
- })(exports, function() {
1339
- var pluralRules = [];
1340
- var singularRules = [];
1341
- var uncountables = {};
1342
- var irregularPlurals = {};
1343
- var irregularSingles = {};
1344
- function sanitizeRule(rule) {
1345
- if (typeof rule === "string") {
1346
- return new RegExp("^" + rule + "$", "i");
1347
- }
1348
- return rule;
1349
- }
1350
- function restoreCase(word, token) {
1351
- if (word === token)
1352
- return token;
1353
- if (word === word.toLowerCase())
1354
- return token.toLowerCase();
1355
- if (word === word.toUpperCase())
1356
- return token.toUpperCase();
1357
- if (word[0] === word[0].toUpperCase()) {
1358
- return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
1359
- }
1360
- return token.toLowerCase();
1361
- }
1362
- function interpolate(str, args) {
1363
- return str.replace(/\$(\d{1,2})/g, function(match, index) {
1364
- return args[index] || "";
1365
- });
1366
- }
1367
- function replace(word, rule) {
1368
- return word.replace(rule[0], function(match, index) {
1369
- var result = interpolate(rule[1], arguments);
1370
- if (match === "") {
1371
- return restoreCase(word[index - 1], result);
1372
- }
1373
- return restoreCase(match, result);
1374
- });
1375
- }
1376
- function sanitizeWord(token, word, rules) {
1377
- if (!token.length || uncountables.hasOwnProperty(token)) {
1378
- return word;
1379
- }
1380
- var len = rules.length;
1381
- while (len--) {
1382
- var rule = rules[len];
1383
- if (rule[0].test(word))
1384
- return replace(word, rule);
1385
- }
1386
- return word;
1387
- }
1388
- function replaceWord(replaceMap, keepMap, rules) {
1389
- return function(word) {
1390
- var token = word.toLowerCase();
1391
- if (keepMap.hasOwnProperty(token)) {
1392
- return restoreCase(word, token);
1393
- }
1394
- if (replaceMap.hasOwnProperty(token)) {
1395
- return restoreCase(word, replaceMap[token]);
1396
- }
1397
- return sanitizeWord(token, word, rules);
1398
- };
1399
- }
1400
- function checkWord(replaceMap, keepMap, rules, bool) {
1401
- return function(word) {
1402
- var token = word.toLowerCase();
1403
- if (keepMap.hasOwnProperty(token))
1404
- return true;
1405
- if (replaceMap.hasOwnProperty(token))
1406
- return false;
1407
- return sanitizeWord(token, token, rules) === token;
1408
- };
1409
- }
1410
- function pluralize(word, count, inclusive) {
1411
- var pluralized = count === 1 ? pluralize.singular(word) : pluralize.plural(word);
1412
- return (inclusive ? count + " " : "") + pluralized;
1413
- }
1414
- pluralize.plural = replaceWord(irregularSingles, irregularPlurals, pluralRules);
1415
- pluralize.isPlural = checkWord(irregularSingles, irregularPlurals, pluralRules);
1416
- pluralize.singular = replaceWord(irregularPlurals, irregularSingles, singularRules);
1417
- pluralize.isSingular = checkWord(irregularPlurals, irregularSingles, singularRules);
1418
- pluralize.addPluralRule = function(rule, replacement) {
1419
- pluralRules.push([sanitizeRule(rule), replacement]);
1420
- };
1421
- pluralize.addSingularRule = function(rule, replacement) {
1422
- singularRules.push([sanitizeRule(rule), replacement]);
1423
- };
1424
- pluralize.addUncountableRule = function(word) {
1425
- if (typeof word === "string") {
1426
- uncountables[word.toLowerCase()] = true;
1427
- return;
1428
- }
1429
- pluralize.addPluralRule(word, "$0");
1430
- pluralize.addSingularRule(word, "$0");
1431
- };
1432
- pluralize.addIrregularRule = function(single, plural) {
1433
- plural = plural.toLowerCase();
1434
- single = single.toLowerCase();
1435
- irregularSingles[single] = plural;
1436
- irregularPlurals[plural] = single;
1437
- };
1438
- [
1439
- ["I", "we"],
1440
- ["me", "us"],
1441
- ["he", "they"],
1442
- ["she", "they"],
1443
- ["them", "them"],
1444
- ["myself", "ourselves"],
1445
- ["yourself", "yourselves"],
1446
- ["itself", "themselves"],
1447
- ["herself", "themselves"],
1448
- ["himself", "themselves"],
1449
- ["themself", "themselves"],
1450
- ["is", "are"],
1451
- ["was", "were"],
1452
- ["has", "have"],
1453
- ["this", "these"],
1454
- ["that", "those"],
1455
- ["echo", "echoes"],
1456
- ["dingo", "dingoes"],
1457
- ["volcano", "volcanoes"],
1458
- ["tornado", "tornadoes"],
1459
- ["torpedo", "torpedoes"],
1460
- ["genus", "genera"],
1461
- ["viscus", "viscera"],
1462
- ["stigma", "stigmata"],
1463
- ["stoma", "stomata"],
1464
- ["dogma", "dogmata"],
1465
- ["lemma", "lemmata"],
1466
- ["schema", "schemata"],
1467
- ["anathema", "anathemata"],
1468
- ["ox", "oxen"],
1469
- ["axe", "axes"],
1470
- ["die", "dice"],
1471
- ["yes", "yeses"],
1472
- ["foot", "feet"],
1473
- ["eave", "eaves"],
1474
- ["goose", "geese"],
1475
- ["tooth", "teeth"],
1476
- ["quiz", "quizzes"],
1477
- ["human", "humans"],
1478
- ["proof", "proofs"],
1479
- ["carve", "carves"],
1480
- ["valve", "valves"],
1481
- ["looey", "looies"],
1482
- ["thief", "thieves"],
1483
- ["groove", "grooves"],
1484
- ["pickaxe", "pickaxes"],
1485
- ["passerby", "passersby"]
1486
- ].forEach(function(rule) {
1487
- return pluralize.addIrregularRule(rule[0], rule[1]);
1488
- });
1489
- [
1490
- [/s?$/i, "s"],
1491
- [/[^\u0000-\u007F]$/i, "$0"],
1492
- [/([^aeiou]ese)$/i, "$1"],
1493
- [/(ax|test)is$/i, "$1es"],
1494
- [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
1495
- [/(e[mn]u)s?$/i, "$1s"],
1496
- [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
1497
- [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
1498
- [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
1499
- [/(seraph|cherub)(?:im)?$/i, "$1im"],
1500
- [/(her|at|gr)o$/i, "$1oes"],
1501
- [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
1502
- [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
1503
- [/sis$/i, "ses"],
1504
- [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
1505
- [/([^aeiouy]|qu)y$/i, "$1ies"],
1506
- [/([^ch][ieo][ln])ey$/i, "$1ies"],
1507
- [/(x|ch|ss|sh|zz)$/i, "$1es"],
1508
- [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
1509
- [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
1510
- [/(pe)(?:rson|ople)$/i, "$1ople"],
1511
- [/(child)(?:ren)?$/i, "$1ren"],
1512
- [/eaux$/i, "$0"],
1513
- [/m[ae]n$/i, "men"],
1514
- ["thou", "you"]
1515
- ].forEach(function(rule) {
1516
- return pluralize.addPluralRule(rule[0], rule[1]);
1517
- });
1518
- [
1519
- [/s$/i, ""],
1520
- [/(ss)$/i, "$1"],
1521
- [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
1522
- [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
1523
- [/ies$/i, "y"],
1524
- [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
1525
- [/\b(mon|smil)ies$/i, "$1ey"],
1526
- [/\b((?:tit)?m|l)ice$/i, "$1ouse"],
1527
- [/(seraph|cherub)im$/i, "$1"],
1528
- [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
1529
- [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
1530
- [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
1531
- [/(test)(?:is|es)$/i, "$1is"],
1532
- [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
1533
- [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
1534
- [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
1535
- [/(alumn|alg|vertebr)ae$/i, "$1a"],
1536
- [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
1537
- [/(matr|append)ices$/i, "$1ix"],
1538
- [/(pe)(rson|ople)$/i, "$1rson"],
1539
- [/(child)ren$/i, "$1"],
1540
- [/(eau)x?$/i, "$1"],
1541
- [/men$/i, "man"]
1542
- ].forEach(function(rule) {
1543
- return pluralize.addSingularRule(rule[0], rule[1]);
1544
- });
1545
- [
1546
- "adulthood",
1547
- "advice",
1548
- "agenda",
1549
- "aid",
1550
- "aircraft",
1551
- "alcohol",
1552
- "ammo",
1553
- "analytics",
1554
- "anime",
1555
- "athletics",
1556
- "audio",
1557
- "bison",
1558
- "blood",
1559
- "bream",
1560
- "buffalo",
1561
- "butter",
1562
- "carp",
1563
- "cash",
1564
- "chassis",
1565
- "chess",
1566
- "clothing",
1567
- "cod",
1568
- "commerce",
1569
- "cooperation",
1570
- "corps",
1571
- "debris",
1572
- "diabetes",
1573
- "digestion",
1574
- "elk",
1575
- "energy",
1576
- "equipment",
1577
- "excretion",
1578
- "expertise",
1579
- "firmware",
1580
- "flounder",
1581
- "fun",
1582
- "gallows",
1583
- "garbage",
1584
- "graffiti",
1585
- "hardware",
1586
- "headquarters",
1587
- "health",
1588
- "herpes",
1589
- "highjinks",
1590
- "homework",
1591
- "housework",
1592
- "information",
1593
- "jeans",
1594
- "justice",
1595
- "kudos",
1596
- "labour",
1597
- "literature",
1598
- "machinery",
1599
- "mackerel",
1600
- "mail",
1601
- "media",
1602
- "mews",
1603
- "moose",
1604
- "music",
1605
- "mud",
1606
- "manga",
1607
- "news",
1608
- "only",
1609
- "personnel",
1610
- "pike",
1611
- "plankton",
1612
- "pliers",
1613
- "police",
1614
- "pollution",
1615
- "premises",
1616
- "rain",
1617
- "research",
1618
- "rice",
1619
- "salmon",
1620
- "scissors",
1621
- "series",
1622
- "sewage",
1623
- "shambles",
1624
- "shrimp",
1625
- "software",
1626
- "species",
1627
- "staff",
1628
- "swine",
1629
- "tennis",
1630
- "traffic",
1631
- "transportation",
1632
- "trout",
1633
- "tuna",
1634
- "wealth",
1635
- "welfare",
1636
- "whiting",
1637
- "wildebeest",
1638
- "wildlife",
1639
- "you",
1640
- /pok[eé]mon$/i,
1641
- /[^aeiou]ese$/i,
1642
- /deer$/i,
1643
- /fish$/i,
1644
- /measles$/i,
1645
- /o[iu]s$/i,
1646
- /pox$/i,
1647
- /sheep$/i
1648
- ].forEach(pluralize.addUncountableRule);
1649
- return pluralize;
1650
- });
1651
- });
1652
-
1653
1333
  // node_modules/ink-gradient/dist/index.js
1654
1334
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1655
1335
  var import_react = __toESM(require_react(), 1);
@@ -2383,8 +2063,8 @@ function cloneSettings(settings) {
2383
2063
  }
2384
2064
 
2385
2065
  // src/utils/global-command-resolution.ts
2386
- import { execFileSync } from "child_process";
2387
- import * as path from "path";
2066
+ import { execFileSync } from "node:child_process";
2067
+ import * as path from "node:path";
2388
2068
 
2389
2069
  // src/utils/package-manager-executable.ts
2390
2070
  function getPackageManagerShellOptions(executable, platform = process.platform) {
@@ -2551,8 +2231,8 @@ function inspectGlobalCommandResolution(packageManager, options = {}) {
2551
2231
  import {
2552
2232
  execFile,
2553
2233
  execFileSync as execFileSync2
2554
- } from "child_process";
2555
- import * as fs from "fs";
2234
+ } from "node:child_process";
2235
+ import * as fs from "node:fs";
2556
2236
  var GLOBAL_PACKAGE_TIMEOUT_MS = 120000;
2557
2237
  var VERSION_LOOKUP_TIMEOUT_MS = 5000;
2558
2238
  var WINDOWS_SHIM_EXTENSIONS = [
@@ -2775,8 +2455,8 @@ function runGlobalPackageUninstall(packageManager, { platform = process.platform
2775
2455
  }
2776
2456
 
2777
2457
  // src/utils/open-url.ts
2778
- import { spawnSync } from "child_process";
2779
- import * as os2 from "os";
2458
+ import { spawnSync } from "node:child_process";
2459
+ import * as os2 from "node:os";
2780
2460
  function runOpenCommand(command, args) {
2781
2461
  const result = spawnSync(command, args, {
2782
2462
  stdio: "ignore",
@@ -2862,10 +2542,10 @@ function openExternalUrl(url) {
2862
2542
  }
2863
2543
 
2864
2544
  // src/utils/powerline.ts
2865
- import { execSync } from "child_process";
2866
- import * as fs2 from "fs";
2867
- import * as os3 from "os";
2868
- import * as path2 from "path";
2545
+ import { execSync } from "node:child_process";
2546
+ import * as fs2 from "node:fs";
2547
+ import * as os3 from "node:os";
2548
+ import * as path2 from "node:path";
2869
2549
  var fontsInstalledThisSession = false;
2870
2550
  function checkPowerlineFonts() {
2871
2551
  if (process.env.DEBUG_FONT_INSTALL === "1" && !fontsInstalledThisSession) {
@@ -2954,8 +2634,8 @@ async function checkPowerlineFontsAsync() {
2954
2634
  const platform = os3.platform();
2955
2635
  if (platform === "linux" || platform === "darwin") {
2956
2636
  try {
2957
- const { exec } = await import("child_process");
2958
- const { promisify } = await import("util");
2637
+ const { exec } = await import("node:child_process");
2638
+ const { promisify } = await import("node:util");
2959
2639
  const execAsync = promisify(exec);
2960
2640
  const { stdout } = await execAsync("fc-list 2>/dev/null | grep -i powerline", {
2961
2641
  encoding: "utf8",
@@ -3095,14 +2775,14 @@ async function installPowerlineFonts() {
3095
2775
  }
3096
2776
 
3097
2777
  // src/utils/update-checker.ts
3098
- import { execFile as execFile2 } from "child_process";
3099
- import * as https from "https";
2778
+ import { execFile as execFile2 } from "node:child_process";
2779
+ import * as https from "node:https";
3100
2780
  var NPM_REGISTRY_LATEST_URL = "https://registry.npmjs.org/ccstatusline-zh/latest";
3101
2781
  var DEFAULT_REGISTRY_TIMEOUT_MS = 5000;
3102
2782
  var GLOBAL_UPDATE_TIMEOUT_MS = 120000;
3103
2783
  function parseVersion(version) {
3104
2784
  return version.split(/[.-]/).map((part) => {
3105
- const parsed = parseInt(part, 10);
2785
+ const parsed = Number.parseInt(part, 10);
3106
2786
  return Number.isFinite(parsed) ? parsed : 0;
3107
2787
  });
3108
2788
  }
@@ -4090,8 +3770,8 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4090
3770
  setAnsi256InputMode(false);
4091
3771
  setAnsi256Input("");
4092
3772
  } else if (key.return) {
4093
- const code = parseInt(ansi256Input, 10);
4094
- if (!isNaN(code) && code >= 0 && code <= 255) {
3773
+ const code = Number.parseInt(ansi256Input, 10);
3774
+ if (!Number.isNaN(code) && code >= 0 && code <= 255) {
4095
3775
  const ansiColor = `ansi256:${code}`;
4096
3776
  const selectedWidget = colorableWidgets.find((widget) => widget.id === highlightedItemId);
4097
3777
  if (selectedWidget) {
@@ -4106,7 +3786,7 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4106
3786
  } else if (shouldInsertInput(input, key) && ansi256Input.length < 3) {
4107
3787
  if (/^[0-9]$/.test(input)) {
4108
3788
  const newInput = ansi256Input + input;
4109
- const code = parseInt(newInput, 10);
3789
+ const code = Number.parseInt(newInput, 10);
4110
3790
  if (code <= 255) {
4111
3791
  setAnsi256Input(newInput);
4112
3792
  }
@@ -4310,7 +3990,7 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4310
3990
  value: widget.id
4311
3991
  };
4312
3992
  });
4313
- menuItems.push({ label: "← Back", value: "back" });
3993
+ menuItems.push({ label: "← 返回", value: "back" });
4314
3994
  const handleSelect = (selected) => {
4315
3995
  if (selected.value === "back") {
4316
3996
  onBack();
@@ -4349,7 +4029,7 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4349
4029
  }
4350
4030
  } else {
4351
4031
  if (!currentColor || currentColor === "") {
4352
- colorDisplay = source_default.gray("(default)");
4032
+ colorDisplay = source_default.gray("(默认)");
4353
4033
  } else {
4354
4034
  let displayName;
4355
4035
  if (currentColor.startsWith("ansi256:")) {
@@ -4386,7 +4066,7 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4386
4066
  /* @__PURE__ */ jsx_runtime3.jsxs(Text, {
4387
4067
  bold: true,
4388
4068
  children: [
4389
- "Custom Gradient",
4069
+ "自定义渐变",
4390
4070
  widgetName ? ` - ${widgetName}` : ""
4391
4071
  ]
4392
4072
  }),
@@ -4395,12 +4075,12 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4395
4075
  flexDirection: "column",
4396
4076
  children: [
4397
4077
  /* @__PURE__ */ jsx_runtime3.jsx(Text, {
4398
- children: gradientCustomStep === "start" ? "Enter START hex color (without #):" : "Enter END hex color (without #):"
4078
+ children: gradientCustomStep === "start" ? "输入起始颜色的十六进制值(不含 #):" : "输入结束颜色的十六进制值(不含 #):"
4399
4079
  }),
4400
4080
  gradientCustomStep === "end" && /* @__PURE__ */ jsx_runtime3.jsxs(Text, {
4401
4081
  dimColor: true,
4402
4082
  children: [
4403
- "Start: #",
4083
+ "起始颜色:#",
4404
4084
  gradientStartHex
4405
4085
  ]
4406
4086
  }),
@@ -4419,7 +4099,7 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4419
4099
  }),
4420
4100
  /* @__PURE__ */ jsx_runtime3.jsx(Text, {
4421
4101
  dimColor: true,
4422
- children: "Press Enter when done, ESC to go back"
4102
+ children: "按 Enter 确认,ESC 返回"
4423
4103
  })
4424
4104
  ]
4425
4105
  })
@@ -4432,7 +4112,7 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4432
4112
  /* @__PURE__ */ jsx_runtime3.jsxs(Text, {
4433
4113
  bold: true,
4434
4114
  children: [
4435
- "Select Gradient",
4115
+ "选择渐变",
4436
4116
  widgetName ? ` - ${widgetName}` : ""
4437
4117
  ]
4438
4118
  }),
@@ -4440,7 +4120,7 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4440
4120
  marginTop: 1,
4441
4121
  children: /* @__PURE__ */ jsx_runtime3.jsx(Text, {
4442
4122
  dimColor: true,
4443
- children: "↑↓ to select, Enter to apply, ESC to cancel"
4123
+ children: "↑↓ 选择,Enter 应用,ESC 取消"
4444
4124
  })
4445
4125
  }),
4446
4126
  /* @__PURE__ */ jsx_runtime3.jsxs(Box_default, {
@@ -4456,7 +4136,7 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4456
4136
  /* @__PURE__ */ jsx_runtime3.jsxs(Text, {
4457
4137
  children: [
4458
4138
  gradientIndex === GRADIENT_PRESET_NAMES.length ? "▶ " : " ",
4459
- "Custom (enter two hex stops)"
4139
+ "自定义(输入起止颜色的十六进制值)"
4460
4140
  ]
4461
4141
  }, "custom")
4462
4142
  ]
@@ -4511,7 +4191,7 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4511
4191
  }
4512
4192
  const hasGlobalFgOverride = !!settings.overrideForegroundColor;
4513
4193
  const hasGlobalBgOverride = !!settings.overrideBackgroundColor && !powerlineEnabled;
4514
- const globalOverrideMessage = hasGlobalFgOverride && hasGlobalBgOverride ? "⚠ Global override for FG and BG active" : hasGlobalFgOverride ? "⚠ Global override for FG active" : hasGlobalBgOverride ? "⚠ Global override for BG active" : null;
4194
+ const globalOverrideMessage = hasGlobalFgOverride && hasGlobalBgOverride ? "⚠ Global override for FG and BG active" : hasGlobalFgOverride ? "⚠ 前景色全局覆盖已激活" : hasGlobalBgOverride ? "⚠ Global override for BG active" : null;
4515
4195
  return /* @__PURE__ */ jsx_runtime3.jsxs(Box_default, {
4516
4196
  flexDirection: "column",
4517
4197
  children: [
@@ -4673,8 +4353,8 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
4673
4353
  };
4674
4354
  // src/tui/components/ExportConfigDialog.tsx
4675
4355
  var import_react6 = __toESM(require_react(), 1);
4676
- import * as os4 from "os";
4677
- import * as path3 from "path";
4356
+ import * as os4 from "node:os";
4357
+ import * as path3 from "node:path";
4678
4358
  var jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
4679
4359
  var DEFAULT_EXPORT_PATH = path3.join(os4.homedir(), "ccstatusline-zh-config.json");
4680
4360
  function ExportConfigDialog({ onExport, onCancel }) {
@@ -5298,19 +4978,19 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
5298
4978
  children: [
5299
4979
  /* @__PURE__ */ jsx_runtime7.jsx(Text, {
5300
4980
  bold: true,
5301
- children: "Custom Gradient - Override FG Color"
4981
+ children: "自定义渐变 - 覆盖前景色"
5302
4982
  }),
5303
4983
  /* @__PURE__ */ jsx_runtime7.jsxs(Box_default, {
5304
4984
  marginTop: 1,
5305
4985
  flexDirection: "column",
5306
4986
  children: [
5307
4987
  /* @__PURE__ */ jsx_runtime7.jsx(Text, {
5308
- children: gradientCustomStep === "start" ? "Enter START hex color (without #):" : "Enter END hex color (without #):"
4988
+ children: gradientCustomStep === "start" ? "输入起始颜色的十六进制值(不含 #):" : "输入结束颜色的十六进制值(不含 #):"
5309
4989
  }),
5310
4990
  gradientCustomStep === "end" && /* @__PURE__ */ jsx_runtime7.jsxs(Text, {
5311
4991
  dimColor: true,
5312
4992
  children: [
5313
- "Start: #",
4993
+ "起始颜色:#",
5314
4994
  gradientStartHex
5315
4995
  ]
5316
4996
  }),
@@ -5329,7 +5009,7 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
5329
5009
  }),
5330
5010
  /* @__PURE__ */ jsx_runtime7.jsx(Text, {
5331
5011
  dimColor: true,
5332
- children: "Press Enter when done, ESC to go back"
5012
+ children: "按 Enter 确认,ESC 返回"
5333
5013
  })
5334
5014
  ]
5335
5015
  })
@@ -5341,13 +5021,13 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
5341
5021
  children: [
5342
5022
  /* @__PURE__ */ jsx_runtime7.jsx(Text, {
5343
5023
  bold: true,
5344
- children: "Select Gradient - Override FG Color"
5024
+ children: "选择渐变 - 覆盖前景色"
5345
5025
  }),
5346
5026
  /* @__PURE__ */ jsx_runtime7.jsx(Box_default, {
5347
5027
  marginTop: 1,
5348
5028
  children: /* @__PURE__ */ jsx_runtime7.jsx(Text, {
5349
5029
  dimColor: true,
5350
- children: "↑↓ to select, Enter to apply, ESC to cancel"
5030
+ children: "↑↓ 选择,Enter 应用,ESC 取消"
5351
5031
  })
5352
5032
  }),
5353
5033
  /* @__PURE__ */ jsx_runtime7.jsxs(Box_default, {
@@ -5363,7 +5043,7 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
5363
5043
  /* @__PURE__ */ jsx_runtime7.jsxs(Text, {
5364
5044
  children: [
5365
5045
  gradientIndex === GRADIENT_PRESET_NAMES.length ? "▶ " : " ",
5366
- "Custom (enter two hex stops)"
5046
+ "自定义(输入起止颜色的十六进制值)"
5367
5047
  ]
5368
5048
  }, "custom")
5369
5049
  ]
@@ -5967,6 +5647,48 @@ var InstallMenu = ({
5967
5647
  // src/tui/components/ItemsEditor.tsx
5968
5648
  var import_react12 = __toESM(require_react(), 1);
5969
5649
 
5650
+ // src/tui/components/LabelEditor.tsx
5651
+ var jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
5652
+ var LabelEditor = ({ widget, defaultLabel, onComplete, onCancel }) => {
5653
+ const { getText, display, handleInput } = useTextCursor(getLabel(widget, defaultLabel));
5654
+ use_input_default((input, key) => {
5655
+ if (key.return) {
5656
+ onComplete(setLabel(widget, getText()));
5657
+ } else if (key.escape) {
5658
+ onCancel();
5659
+ } else if (key.tab) {
5660
+ onComplete(clearLabel(widget));
5661
+ } else {
5662
+ handleInput(input, key);
5663
+ }
5664
+ });
5665
+ return /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
5666
+ flexDirection: "column",
5667
+ children: [
5668
+ /* @__PURE__ */ jsx_runtime10.jsx(Text, {
5669
+ bold: true,
5670
+ children: "文字前缀"
5671
+ }),
5672
+ /* @__PURE__ */ jsx_runtime10.jsx(Text, {
5673
+ dimColor: true,
5674
+ children: "←→ 移动光标,Ctrl+←→ 跳到开头/末尾,Tab 恢复默认,Enter 保存,ESC 取消"
5675
+ }),
5676
+ /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
5677
+ marginTop: 1,
5678
+ children: /* @__PURE__ */ jsx_runtime10.jsxs(Text, {
5679
+ children: [
5680
+ `"${display}"`,
5681
+ /* @__PURE__ */ jsx_runtime10.jsx(Text, {
5682
+ dimColor: true,
5683
+ children: ` (默认: ${JSON.stringify(defaultLabel)})`
5684
+ })
5685
+ ]
5686
+ })
5687
+ })
5688
+ ]
5689
+ });
5690
+ };
5691
+
5970
5692
  // src/tui/components/items-editor/input-handlers.ts
5971
5693
  function setPickerState(setWidgetPicker, normalizeState, updater) {
5972
5694
  setWidgetPicker((prev) => {
@@ -6299,7 +6021,7 @@ function handleNormalInputMode({
6299
6021
  const customKeybinds = getCustomKeybindsForWidget(widgetImpl, currentWidget);
6300
6022
  const matchedKeybind = customKeybinds.find((kb) => kb.key === input);
6301
6023
  if (matchedKeybind && !key.ctrl) {
6302
- if (matchedKeybind.action === EDIT_HIDE_STATES_ACTION) {
6024
+ if (matchedKeybind.action === EDIT_HIDE_STATES_ACTION || matchedKeybind.action === EDIT_LABEL_ACTION) {
6303
6025
  setCustomEditorWidget({ widget: currentWidget, impl: widgetImpl, action: matchedKeybind.action });
6304
6026
  return;
6305
6027
  }
@@ -6325,7 +6047,7 @@ function handleNormalInputMode({
6325
6047
  }
6326
6048
 
6327
6049
  // src/tui/components/ItemsEditor.tsx
6328
- var jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
6050
+ var jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
6329
6051
  function isMergedIntoPreviousWidget(widgets, index) {
6330
6052
  if (index <= 0) {
6331
6053
  return false;
@@ -6374,6 +6096,9 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6374
6096
  if ((widgetImpl.getHideableStates?.().length ?? 0) > 0) {
6375
6097
  keybinds.push(getHideKeybind());
6376
6098
  }
6099
+ if (widgetImpl.getLabelPrefix && !widget.rawValue) {
6100
+ keybinds.push(getLabelKeybind());
6101
+ }
6377
6102
  return keybinds;
6378
6103
  };
6379
6104
  const openWidgetPicker = (action) => {
@@ -6399,7 +6124,7 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6399
6124
  const currentWidget = widgets[selectedIndex];
6400
6125
  if (currentWidget) {
6401
6126
  const newWidgets = [...widgets];
6402
- newWidgets[selectedIndex] = { ...currentWidget, type: selectedType };
6127
+ newWidgets[selectedIndex] = currentWidget.type === selectedType ? currentWidget : { ...clearLabel(currentWidget), type: selectedType };
6403
6128
  onUpdate(newWidgets);
6404
6129
  }
6405
6130
  } else {
@@ -6526,13 +6251,21 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6526
6251
  const customKeybindsText = customKeybinds.map((kb) => kb.label).join(", ");
6527
6252
  const pickerActionLabel = widgetPicker?.action === "add" ? "添加组件" : widgetPicker?.action === "insert" ? "插入组件" : "更改组件类型";
6528
6253
  if (customEditorWidget?.action === EDIT_HIDE_STATES_ACTION) {
6529
- return /* @__PURE__ */ jsx_runtime10.jsx(HideStatesEditor, {
6254
+ return /* @__PURE__ */ jsx_runtime11.jsx(HideStatesEditor, {
6530
6255
  widget: customEditorWidget.widget,
6531
6256
  states: customEditorWidget.impl.getHideableStates?.() ?? [],
6532
6257
  onComplete: handleEditorComplete,
6533
6258
  onCancel: handleEditorCancel
6534
6259
  });
6535
6260
  }
6261
+ if (customEditorWidget?.action === EDIT_LABEL_ACTION && customEditorWidget.impl.getLabelPrefix) {
6262
+ return /* @__PURE__ */ jsx_runtime11.jsx(LabelEditor, {
6263
+ widget: customEditorWidget.widget,
6264
+ defaultLabel: customEditorWidget.impl.getLabelPrefix(customEditorWidget.widget),
6265
+ onComplete: handleEditorComplete,
6266
+ onCancel: handleEditorCancel
6267
+ });
6268
+ }
6536
6269
  if (customEditorWidget?.impl.renderEditor) {
6537
6270
  return customEditorWidget.impl.renderEditor({
6538
6271
  widget: customEditorWidget.widget,
@@ -6542,19 +6275,19 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6542
6275
  });
6543
6276
  }
6544
6277
  if (showClearConfirm) {
6545
- return /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6278
+ return /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6546
6279
  flexDirection: "column",
6547
6280
  children: [
6548
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6281
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6549
6282
  bold: true,
6550
6283
  color: "yellow",
6551
6284
  children: "⚠ 确认清空行"
6552
6285
  }),
6553
- /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6286
+ /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6554
6287
  marginTop: 1,
6555
6288
  flexDirection: "column",
6556
6289
  children: [
6557
- /* @__PURE__ */ jsx_runtime10.jsxs(Text, {
6290
+ /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6558
6291
  children: [
6559
6292
  "这将移除第",
6560
6293
  " ",
@@ -6563,21 +6296,21 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6563
6296
  "行的所有组件。"
6564
6297
  ]
6565
6298
  }),
6566
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6299
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6567
6300
  color: "red",
6568
6301
  children: "此操作不可撤销!"
6569
6302
  })
6570
6303
  ]
6571
6304
  }),
6572
- /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6305
+ /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6573
6306
  marginTop: 2,
6574
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6307
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6575
6308
  children: "继续?"
6576
6309
  })
6577
6310
  }),
6578
- /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6311
+ /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6579
6312
  marginTop: 1,
6580
- children: /* @__PURE__ */ jsx_runtime10.jsx(ConfirmDialog, {
6313
+ children: /* @__PURE__ */ jsx_runtime11.jsx(ConfirmDialog, {
6581
6314
  inline: true,
6582
6315
  onConfirm: () => {
6583
6316
  onUpdate([]);
@@ -6592,12 +6325,12 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6592
6325
  ]
6593
6326
  });
6594
6327
  }
6595
- return /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6328
+ return /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6596
6329
  flexDirection: "column",
6597
6330
  children: [
6598
- /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6331
+ /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6599
6332
  children: [
6600
- /* @__PURE__ */ jsx_runtime10.jsxs(Text, {
6333
+ /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6601
6334
  bold: true,
6602
6335
  children: [
6603
6336
  "编辑行",
@@ -6606,17 +6339,17 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6606
6339
  " "
6607
6340
  ]
6608
6341
  }),
6609
- moveMode && /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6342
+ moveMode && /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6610
6343
  color: "blue",
6611
6344
  children: "[移动模式]"
6612
6345
  }),
6613
- widgetPicker && /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6346
+ widgetPicker && /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6614
6347
  color: "cyan",
6615
6348
  children: `[${pickerActionLabel}]`
6616
6349
  }),
6617
- (settings.powerline.enabled || Boolean(settings.defaultSeparator)) && /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6350
+ (settings.powerline.enabled || Boolean(settings.defaultSeparator)) && /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6618
6351
  marginLeft: 2,
6619
- children: /* @__PURE__ */ jsx_runtime10.jsxs(Text, {
6352
+ children: /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6620
6353
  color: "yellow",
6621
6354
  children: [
6622
6355
  "⚠",
@@ -6627,46 +6360,46 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6627
6360
  })
6628
6361
  ]
6629
6362
  }),
6630
- moveMode ? /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6363
+ moveMode ? /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6631
6364
  flexDirection: "column",
6632
6365
  marginBottom: 1,
6633
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6366
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6634
6367
  dimColor: true,
6635
6368
  children: "↑↓ 移动组件,ESC 或 Enter 退出移动模式"
6636
6369
  })
6637
- }) : widgetPicker ? /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6370
+ }) : widgetPicker ? /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6638
6371
  flexDirection: "column",
6639
- children: widgetPicker.level === "category" ? /* @__PURE__ */ jsx_runtime10.jsxs(jsx_runtime10.Fragment, {
6372
+ children: widgetPicker.level === "category" ? /* @__PURE__ */ jsx_runtime11.jsxs(jsx_runtime11.Fragment, {
6640
6373
  children: [
6641
- widgetPicker.categoryQuery.trim().length > 0 ? /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6374
+ widgetPicker.categoryQuery.trim().length > 0 ? /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6642
6375
  dimColor: true,
6643
6376
  children: "↑↓ 选择匹配组件,Enter 确认,ESC 清除/取消"
6644
- }) : /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6377
+ }) : /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6645
6378
  dimColor: true,
6646
6379
  children: "↑↓ 选择分类,输入搜索所有组件,Enter 继续,ESC 取消"
6647
6380
  }),
6648
- /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6381
+ /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6649
6382
  children: [
6650
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6383
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6651
6384
  dimColor: true,
6652
6385
  children: "搜索: "
6653
6386
  }),
6654
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6387
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6655
6388
  color: "cyan",
6656
6389
  children: widgetPicker.categoryQuery || "(无)"
6657
6390
  })
6658
6391
  ]
6659
6392
  })
6660
6393
  ]
6661
- }) : /* @__PURE__ */ jsx_runtime10.jsxs(jsx_runtime10.Fragment, {
6394
+ }) : /* @__PURE__ */ jsx_runtime11.jsxs(jsx_runtime11.Fragment, {
6662
6395
  children: [
6663
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6396
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6664
6397
  dimColor: true,
6665
6398
  children: "↑↓ 选择组件,输入搜索,Enter 确认,ESC 返回"
6666
6399
  }),
6667
- /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6400
+ /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6668
6401
  children: [
6669
- /* @__PURE__ */ jsx_runtime10.jsxs(Text, {
6402
+ /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6670
6403
  dimColor: true,
6671
6404
  children: [
6672
6405
  "分类:",
@@ -6677,7 +6410,7 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6677
6410
  " "
6678
6411
  ]
6679
6412
  }),
6680
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6413
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6681
6414
  color: "cyan",
6682
6415
  children: widgetPicker.widgetQuery || "(无)"
6683
6416
  })
@@ -6685,59 +6418,59 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6685
6418
  })
6686
6419
  ]
6687
6420
  })
6688
- }) : /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6421
+ }) : /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6689
6422
  flexDirection: "column",
6690
6423
  children: [
6691
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6424
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6692
6425
  dimColor: true,
6693
6426
  children: helpText
6694
6427
  }),
6695
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6428
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6696
6429
  dimColor: true,
6697
6430
  children: customKeybindsText || " "
6698
6431
  })
6699
6432
  ]
6700
6433
  }),
6701
- hasFlexSeparator && !widthDetectionAvailable && /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6434
+ hasFlexSeparator && !widthDetectionAvailable && /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6702
6435
  marginTop: 1,
6703
6436
  children: [
6704
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6437
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6705
6438
  color: "yellow",
6706
6439
  children: "⚠ 注意:当前环境无法检测终端宽度。"
6707
6440
  }),
6708
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6441
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6709
6442
  dimColor: true,
6710
6443
  children: " 在宽度检测可用前,弹性分隔符将作为普通分隔符使用。"
6711
6444
  })
6712
6445
  ]
6713
6446
  }),
6714
- widgetPicker && /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6447
+ widgetPicker && /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6715
6448
  marginTop: 1,
6716
6449
  flexDirection: "column",
6717
- children: widgetPicker.level === "category" ? widgetPicker.categoryQuery.trim().length > 0 ? topLevelSearchEntries.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6450
+ children: widgetPicker.level === "category" ? widgetPicker.categoryQuery.trim().length > 0 ? topLevelSearchEntries.length === 0 ? /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6718
6451
  dimColor: true,
6719
6452
  children: "没有匹配的组件。"
6720
- }) : /* @__PURE__ */ jsx_runtime10.jsxs(jsx_runtime10.Fragment, {
6453
+ }) : /* @__PURE__ */ jsx_runtime11.jsxs(jsx_runtime11.Fragment, {
6721
6454
  children: [
6722
6455
  topLevelSearchEntries.map((entry, index) => {
6723
6456
  const isSelected = entry.type === selectedTopLevelSearchEntry?.type;
6724
6457
  const segments = getMatchSegments(entry.displayName, widgetPicker.categoryQuery);
6725
- return /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6458
+ return /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6726
6459
  flexDirection: "row",
6727
6460
  flexWrap: "nowrap",
6728
6461
  children: [
6729
- /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6462
+ /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6730
6463
  width: 3,
6731
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6464
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6732
6465
  color: isSelected ? "green" : undefined,
6733
6466
  children: isSelected ? "▶ " : " "
6734
6467
  })
6735
6468
  }),
6736
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6469
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6737
6470
  color: isSelected ? "green" : undefined,
6738
6471
  children: `${index + 1}. `
6739
6472
  }),
6740
- segments.map((seg, i) => /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6473
+ segments.map((seg, i) => /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6741
6474
  color: isSelected ? "green" : seg.matched ? "yellowBright" : undefined,
6742
6475
  bold: isSelected ? true : seg.matched,
6743
6476
  children: seg.text
@@ -6745,73 +6478,73 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6745
6478
  ]
6746
6479
  }, entry.type);
6747
6480
  }),
6748
- selectedTopLevelSearchEntry && /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6481
+ selectedTopLevelSearchEntry && /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6749
6482
  marginTop: 1,
6750
6483
  paddingLeft: 2,
6751
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6484
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6752
6485
  dimColor: true,
6753
6486
  children: selectedTopLevelSearchEntry.description
6754
6487
  })
6755
6488
  })
6756
6489
  ]
6757
- }) : pickerCategories.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6490
+ }) : pickerCategories.length === 0 ? /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6758
6491
  dimColor: true,
6759
6492
  children: "没有可用的分类。"
6760
- }) : /* @__PURE__ */ jsx_runtime10.jsxs(jsx_runtime10.Fragment, {
6493
+ }) : /* @__PURE__ */ jsx_runtime11.jsxs(jsx_runtime11.Fragment, {
6761
6494
  children: [
6762
6495
  pickerCategories.map((category, index) => {
6763
6496
  const isSelected = category === selectedPickerCategory;
6764
- return /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6497
+ return /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6765
6498
  flexDirection: "row",
6766
6499
  flexWrap: "nowrap",
6767
6500
  children: [
6768
- /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6501
+ /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6769
6502
  width: 3,
6770
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6503
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6771
6504
  color: isSelected ? "green" : undefined,
6772
6505
  children: isSelected ? "▶ " : " "
6773
6506
  })
6774
6507
  }),
6775
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6508
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6776
6509
  color: isSelected ? "green" : undefined,
6777
6510
  children: `${index + 1}. ${category}`
6778
6511
  })
6779
6512
  ]
6780
6513
  }, category);
6781
6514
  }),
6782
- selectedPickerCategory === "全部" && /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6515
+ selectedPickerCategory === "全部" && /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6783
6516
  marginTop: 1,
6784
6517
  paddingLeft: 2,
6785
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6518
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6786
6519
  dimColor: true,
6787
6520
  children: "搜索所有组件分类。"
6788
6521
  })
6789
6522
  })
6790
6523
  ]
6791
- }) : pickerEntries.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6524
+ }) : pickerEntries.length === 0 ? /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6792
6525
  dimColor: true,
6793
6526
  children: "没有匹配当前分类/搜索的组件。"
6794
- }) : /* @__PURE__ */ jsx_runtime10.jsxs(jsx_runtime10.Fragment, {
6527
+ }) : /* @__PURE__ */ jsx_runtime11.jsxs(jsx_runtime11.Fragment, {
6795
6528
  children: [
6796
6529
  pickerEntries.map((entry, index) => {
6797
6530
  const isSelected = entry.type === selectedPickerEntry?.type;
6798
6531
  const segments = getMatchSegments(entry.displayName, widgetPicker.widgetQuery);
6799
- return /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6532
+ return /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6800
6533
  flexDirection: "row",
6801
6534
  flexWrap: "nowrap",
6802
6535
  children: [
6803
- /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6536
+ /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6804
6537
  width: 3,
6805
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6538
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6806
6539
  color: isSelected ? "green" : undefined,
6807
6540
  children: isSelected ? "▶ " : " "
6808
6541
  })
6809
6542
  }),
6810
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6543
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6811
6544
  color: isSelected ? "green" : undefined,
6812
6545
  children: `${index + 1}. `
6813
6546
  }),
6814
- segments.map((seg, i) => /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6547
+ segments.map((seg, i) => /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6815
6548
  color: isSelected ? "green" : seg.matched ? "yellowBright" : undefined,
6816
6549
  bold: seg.matched,
6817
6550
  children: seg.text
@@ -6819,10 +6552,10 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6819
6552
  ]
6820
6553
  }, entry.type);
6821
6554
  }),
6822
- selectedPickerEntry && /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6555
+ selectedPickerEntry && /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6823
6556
  marginTop: 1,
6824
6557
  paddingLeft: 2,
6825
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6558
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6826
6559
  dimColor: true,
6827
6560
  children: selectedPickerEntry.description
6828
6561
  })
@@ -6830,13 +6563,13 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6830
6563
  ]
6831
6564
  })
6832
6565
  }),
6833
- !widgetPicker && /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6566
+ !widgetPicker && /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6834
6567
  marginTop: 1,
6835
6568
  flexDirection: "column",
6836
- children: widgets.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6569
+ children: widgets.length === 0 ? /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6837
6570
  dimColor: true,
6838
6571
  children: "暂无组件。按 'a' 添加。"
6839
- }) : /* @__PURE__ */ jsx_runtime10.jsxs(jsx_runtime10.Fragment, {
6572
+ }) : /* @__PURE__ */ jsx_runtime11.jsxs(jsx_runtime11.Fragment, {
6840
6573
  children: [
6841
6574
  widgets.map((widget, index) => {
6842
6575
  const isSelected = index === selectedIndex;
@@ -6845,65 +6578,73 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6845
6578
  const supportsRawValue = widgetImpl?.supportsRawValue() ?? false;
6846
6579
  const numberFormatModifierText = widgetImpl?.supportsNumberFormat?.() ? getNumberFormatModifierText(widget) : undefined;
6847
6580
  const hideModifierText = widgetImpl ? getHideModifierText(widget, widgetImpl.getHideableStates?.() ?? []) : undefined;
6848
- return /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
6581
+ const labelModifierText = widgetImpl?.getLabelPrefix && !widget.rawValue ? getLabelModifierText(widget) : undefined;
6582
+ return /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6849
6583
  flexDirection: "row",
6850
6584
  flexWrap: "nowrap",
6851
6585
  children: [
6852
- /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6586
+ /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6853
6587
  width: 3,
6854
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6588
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6855
6589
  color: isSelected ? moveMode ? "blue" : "green" : undefined,
6856
6590
  children: isSelected ? moveMode ? "◆ " : "▶ " : " "
6857
6591
  })
6858
6592
  }),
6859
- /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6593
+ /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6860
6594
  color: isSelected ? moveMode ? "blue" : "green" : undefined,
6861
6595
  children: `${index + 1}. ${displayText || getWidgetDisplay(widget)}`
6862
6596
  }),
6863
- modifierText && /* @__PURE__ */ jsx_runtime10.jsxs(Text, {
6597
+ modifierText && /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6864
6598
  dimColor: true,
6865
6599
  children: [
6866
6600
  " ",
6867
6601
  modifierText
6868
6602
  ]
6869
6603
  }),
6870
- numberFormatModifierText && /* @__PURE__ */ jsx_runtime10.jsxs(Text, {
6604
+ numberFormatModifierText && /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6871
6605
  dimColor: true,
6872
6606
  children: [
6873
6607
  " ",
6874
6608
  numberFormatModifierText
6875
6609
  ]
6876
6610
  }),
6877
- hideModifierText && /* @__PURE__ */ jsx_runtime10.jsxs(Text, {
6611
+ hideModifierText && /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6878
6612
  dimColor: true,
6879
6613
  children: [
6880
6614
  " ",
6881
6615
  hideModifierText
6882
6616
  ]
6883
6617
  }),
6884
- supportsRawValue && widget.rawValue && /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6618
+ labelModifierText && /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6619
+ dimColor: true,
6620
+ children: [
6621
+ " ",
6622
+ labelModifierText
6623
+ ]
6624
+ }),
6625
+ supportsRawValue && widget.rawValue && /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6885
6626
  dimColor: true,
6886
6627
  children: " (纯值)"
6887
6628
  }),
6888
- widget.merge === true && /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6629
+ widget.merge === true && /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6889
6630
  dimColor: true,
6890
- children: " (已合并→)"
6631
+ children: " (merged→)"
6891
6632
  }),
6892
- widget.merge === "no-padding" && /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6633
+ widget.merge === "no-padding" && /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6893
6634
  dimColor: true,
6894
- children: " (合并无间距→)"
6635
+ children: " (merged-no-pad→)"
6895
6636
  }),
6896
- widget.excludeFromAutoAlign && settings.powerline.enabled && settings.powerline.autoAlign && !isMergedIntoPreviousWidget(widgets, index) && /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6637
+ widget.excludeFromAutoAlign && settings.powerline.enabled && settings.powerline.autoAlign && !isMergedIntoPreviousWidget(widgets, index) && /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6897
6638
  dimColor: true,
6898
- children: " (不参与对齐)"
6639
+ children: " (no-align)"
6899
6640
  })
6900
6641
  ]
6901
6642
  }, widget.id);
6902
6643
  }),
6903
- currentWidget && /* @__PURE__ */ jsx_runtime10.jsx(Box_default, {
6644
+ currentWidget && /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6904
6645
  marginTop: 1,
6905
6646
  paddingLeft: 2,
6906
- children: /* @__PURE__ */ jsx_runtime10.jsx(Text, {
6647
+ children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6907
6648
  dimColor: true,
6908
6649
  children: (() => {
6909
6650
  if (currentWidget.type === "separator") {
@@ -6924,9 +6665,8 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
6924
6665
  });
6925
6666
  };
6926
6667
  // src/tui/components/LineSelector.tsx
6927
- var import_pluralize = __toESM(require_pluralize(), 1);
6928
6668
  var import_react13 = __toESM(require_react(), 1);
6929
- var jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
6669
+ var jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
6930
6670
  var LineSelector = ({
6931
6671
  lines,
6932
6672
  onSelect,
@@ -7025,16 +6765,16 @@ var LineSelector = ({
7025
6765
  }
7026
6766
  });
7027
6767
  if (isThemeManaged) {
7028
- return /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6768
+ return /* @__PURE__ */ jsx_runtime12.jsxs(Box_default, {
7029
6769
  flexDirection: "column",
7030
6770
  children: [
7031
- /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6771
+ /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7032
6772
  bold: true,
7033
6773
  children: title ?? "选择行"
7034
6774
  }),
7035
- /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6775
+ /* @__PURE__ */ jsx_runtime12.jsx(Box_default, {
7036
6776
  marginTop: 1,
7037
- children: /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6777
+ children: /* @__PURE__ */ jsx_runtime12.jsxs(Text, {
7038
6778
  color: "yellow",
7039
6779
  children: [
7040
6780
  "⚠ 颜色当前由 Powerline 主题管理:",
@@ -7042,30 +6782,30 @@ var LineSelector = ({
7042
6782
  ]
7043
6783
  })
7044
6784
  }),
7045
- /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6785
+ /* @__PURE__ */ jsx_runtime12.jsx(Box_default, {
7046
6786
  marginTop: 1,
7047
- children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6787
+ children: /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7048
6788
  dimColor: true,
7049
6789
  children: "要自定义颜色,可以:"
7050
6790
  })
7051
6791
  }),
7052
- /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6792
+ /* @__PURE__ */ jsx_runtime12.jsx(Box_default, {
7053
6793
  marginLeft: 2,
7054
- children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6794
+ children: /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7055
6795
  dimColor: true,
7056
6796
  children: '• 在 Powerline 配置 → 主题中切换到"自定义"主题'
7057
6797
  })
7058
6798
  }),
7059
- /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6799
+ /* @__PURE__ */ jsx_runtime12.jsx(Box_default, {
7060
6800
  marginLeft: 2,
7061
- children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6801
+ children: /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7062
6802
  dimColor: true,
7063
6803
  children: "• 在 Powerline 配置中禁用 Powerline 模式"
7064
6804
  })
7065
6805
  }),
7066
- /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6806
+ /* @__PURE__ */ jsx_runtime12.jsx(Box_default, {
7067
6807
  marginTop: 2,
7068
- children: /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6808
+ children: /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7069
6809
  children: "按任意键返回..."
7070
6810
  })
7071
6811
  })
@@ -7074,25 +6814,22 @@ var LineSelector = ({
7074
6814
  }
7075
6815
  if (showDeleteDialog && selectedLine) {
7076
6816
  const suffix = selectedLine.length > 0 ? `${selectedLine.length} 个组件` : "空";
7077
- return /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6817
+ return /* @__PURE__ */ jsx_runtime12.jsxs(Box_default, {
7078
6818
  flexDirection: "column",
7079
6819
  children: [
7080
- /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6820
+ /* @__PURE__ */ jsx_runtime12.jsxs(Box_default, {
7081
6821
  flexDirection: "column",
7082
6822
  gap: 1,
7083
6823
  children: [
7084
- /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6824
+ /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7085
6825
  bold: true,
7086
- children: /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6826
+ children: /* @__PURE__ */ jsx_runtime12.jsxs(Text, {
7087
6827
  children: [
7088
- /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
7089
- children: [
7090
- "☰ 第",
7091
- selectedIndex + 1
7092
- ]
6828
+ /* @__PURE__ */ jsx_runtime12.jsx(Text, {
6829
+ children: `☰ 第 ${selectedIndex + 1} 行`
7093
6830
  }),
7094
6831
  " ",
7095
- /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6832
+ /* @__PURE__ */ jsx_runtime12.jsxs(Text, {
7096
6833
  dimColor: true,
7097
6834
  children: [
7098
6835
  "(",
@@ -7103,15 +6840,15 @@ var LineSelector = ({
7103
6840
  ]
7104
6841
  })
7105
6842
  }),
7106
- /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6843
+ /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7107
6844
  bold: true,
7108
6845
  children: "确定要删除此行吗?"
7109
6846
  })
7110
6847
  ]
7111
6848
  }),
7112
- /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6849
+ /* @__PURE__ */ jsx_runtime12.jsx(Box_default, {
7113
6850
  marginTop: 1,
7114
- children: /* @__PURE__ */ jsx_runtime11.jsx(ConfirmDialog, {
6851
+ children: /* @__PURE__ */ jsx_runtime12.jsx(ConfirmDialog, {
7115
6852
  inline: true,
7116
6853
  onConfirm: () => {
7117
6854
  deleteLine(selectedIndex);
@@ -7131,60 +6868,56 @@ var LineSelector = ({
7131
6868
  sublabel: `(${line.length > 0 ? `${line.length} 个组件` : "空"})`,
7132
6869
  value: index
7133
6870
  }));
7134
- return /* @__PURE__ */ jsx_runtime11.jsx(jsx_runtime11.Fragment, {
7135
- children: /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6871
+ return /* @__PURE__ */ jsx_runtime12.jsx(jsx_runtime12.Fragment, {
6872
+ children: /* @__PURE__ */ jsx_runtime12.jsxs(Box_default, {
7136
6873
  flexDirection: "column",
7137
6874
  children: [
7138
- /* @__PURE__ */ jsx_runtime11.jsxs(Box_default, {
6875
+ /* @__PURE__ */ jsx_runtime12.jsxs(Box_default, {
7139
6876
  children: [
7140
- /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6877
+ /* @__PURE__ */ jsx_runtime12.jsxs(Text, {
7141
6878
  bold: true,
7142
6879
  children: [
7143
6880
  title ?? "选择要编辑的行",
7144
6881
  " "
7145
6882
  ]
7146
6883
  }),
7147
- moveMode && /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6884
+ moveMode && /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7148
6885
  color: "blue",
7149
6886
  children: "[移动模式]"
7150
6887
  })
7151
6888
  ]
7152
6889
  }),
7153
- /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6890
+ /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7154
6891
  dimColor: true,
7155
6892
  children: "选择要配置的状态栏行"
7156
6893
  }),
7157
- moveMode ? /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6894
+ moveMode ? /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7158
6895
  dimColor: true,
7159
6896
  children: "↑↓ 移动行,ESC 或 Enter 退出移动模式"
7160
- }) : /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6897
+ }) : /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7161
6898
  dimColor: true,
7162
6899
  children: allowEditing ? localLines.length > 1 ? "(a) 添加新行,(d) 删除行,(m) 移动行,ESC 返回" : "(a) 添加新行,ESC 返回" : "ESC 返回"
7163
6900
  }),
7164
- moveMode ? /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
6901
+ moveMode ? /* @__PURE__ */ jsx_runtime12.jsx(Box_default, {
7165
6902
  marginTop: 1,
7166
6903
  flexDirection: "column",
7167
6904
  children: localLines.map((line, index) => {
7168
6905
  const isSelected = selectedIndex === index;
7169
- const suffix = line.length ? import_pluralize.default("widget", line.length, true) : "empty";
7170
- return /* @__PURE__ */ jsx_runtime11.jsx(Box_default, {
7171
- children: /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6906
+ const suffix = line.length ? `${line.length} 个组件` : "空";
6907
+ return /* @__PURE__ */ jsx_runtime12.jsx(Box_default, {
6908
+ children: /* @__PURE__ */ jsx_runtime12.jsxs(Text, {
7172
6909
  color: isSelected ? "blue" : undefined,
7173
6910
  children: [
7174
- /* @__PURE__ */ jsx_runtime11.jsx(Text, {
6911
+ /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7175
6912
  children: isSelected ? "◆ " : " "
7176
6913
  }),
7177
- /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6914
+ /* @__PURE__ */ jsx_runtime12.jsxs(Text, {
7178
6915
  children: [
7179
- /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
7180
- children: [
7181
- "☰ 第",
7182
- " ",
7183
- index + 1
7184
- ]
6916
+ /* @__PURE__ */ jsx_runtime12.jsx(Text, {
6917
+ children: `☰ 第 ${index + 1} 行`
7185
6918
  }),
7186
6919
  " ",
7187
- /* @__PURE__ */ jsx_runtime11.jsxs(Text, {
6920
+ /* @__PURE__ */ jsx_runtime12.jsxs(Text, {
7188
6921
  dimColor: !isSelected,
7189
6922
  children: [
7190
6923
  "(",
@@ -7198,7 +6931,7 @@ var LineSelector = ({
7198
6931
  })
7199
6932
  }, index);
7200
6933
  })
7201
- }) : /* @__PURE__ */ jsx_runtime11.jsx(List, {
6934
+ }) : /* @__PURE__ */ jsx_runtime12.jsx(List, {
7202
6935
  marginTop: 1,
7203
6936
  items: lineItems,
7204
6937
  onSelect: (line) => {
@@ -7219,7 +6952,7 @@ var LineSelector = ({
7219
6952
  });
7220
6953
  };
7221
6954
  // src/tui/components/MainMenu.tsx
7222
- var jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
6955
+ var jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
7223
6956
  function usesManageInstallation(installation) {
7224
6957
  return installation?.method === "pinned" || installation?.method === "self-managed";
7225
6958
  }
@@ -7351,21 +7084,21 @@ var MainMenu = ({
7351
7084
  }) => {
7352
7085
  const menuItems = buildMainMenuItems(isClaudeInstalled, hasChanges, installation);
7353
7086
  const showTruncationWarning = previewIsTruncated && settings?.flexMode === "full-minus-40";
7354
- return /* @__PURE__ */ jsx_runtime12.jsxs(Box_default, {
7087
+ return /* @__PURE__ */ jsx_runtime13.jsxs(Box_default, {
7355
7088
  flexDirection: "column",
7356
7089
  children: [
7357
- showTruncationWarning && /* @__PURE__ */ jsx_runtime12.jsx(Box_default, {
7090
+ showTruncationWarning && /* @__PURE__ */ jsx_runtime13.jsx(Box_default, {
7358
7091
  marginBottom: 1,
7359
- children: /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7092
+ children: /* @__PURE__ */ jsx_runtime13.jsx(Text, {
7360
7093
  color: "yellow",
7361
7094
  children: "⚠ 部分行被截断,请查看 终端选项 → 终端宽度 了解详情"
7362
7095
  })
7363
7096
  }),
7364
- /* @__PURE__ */ jsx_runtime12.jsx(Text, {
7097
+ /* @__PURE__ */ jsx_runtime13.jsx(Text, {
7365
7098
  bold: true,
7366
7099
  children: "主菜单"
7367
7100
  }),
7368
- /* @__PURE__ */ jsx_runtime12.jsx(List, {
7101
+ /* @__PURE__ */ jsx_runtime13.jsx(List, {
7369
7102
  items: menuItems,
7370
7103
  marginTop: 1,
7371
7104
  onSelect: (value, index) => {
@@ -7380,7 +7113,7 @@ var MainMenu = ({
7380
7113
  });
7381
7114
  };
7382
7115
  // src/tui/components/ManageInstallationMenu.tsx
7383
- var jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
7116
+ var jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
7384
7117
  function getInstallationLabel(installation) {
7385
7118
  if (installation.method === "pinned") {
7386
7119
  const version = installation.installedVersion ? ` ${installation.installedVersion}` : "";
@@ -7459,16 +7192,16 @@ var ManageInstallationMenu = ({
7459
7192
  onBack();
7460
7193
  }
7461
7194
  });
7462
- return /* @__PURE__ */ jsx_runtime13.jsxs(Box_default, {
7195
+ return /* @__PURE__ */ jsx_runtime14.jsxs(Box_default, {
7463
7196
  flexDirection: "column",
7464
7197
  children: [
7465
- /* @__PURE__ */ jsx_runtime13.jsx(Text, {
7198
+ /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7466
7199
  bold: true,
7467
- children: "Manage Installation"
7200
+ children: "管理安装"
7468
7201
  }),
7469
- /* @__PURE__ */ jsx_runtime13.jsx(Box_default, {
7202
+ /* @__PURE__ */ jsx_runtime14.jsx(Box_default, {
7470
7203
  marginTop: 1,
7471
- children: /* @__PURE__ */ jsx_runtime13.jsxs(Text, {
7204
+ children: /* @__PURE__ */ jsx_runtime14.jsxs(Text, {
7472
7205
  children: [
7473
7206
  "当前:",
7474
7207
  " ",
@@ -7476,21 +7209,21 @@ var ManageInstallationMenu = ({
7476
7209
  ]
7477
7210
  })
7478
7211
  }),
7479
- activeCommandLabel && /* @__PURE__ */ jsx_runtime13.jsx(Box_default, {
7480
- children: /* @__PURE__ */ jsx_runtime13.jsx(Text, {
7212
+ activeCommandLabel && /* @__PURE__ */ jsx_runtime14.jsx(Box_default, {
7213
+ children: /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7481
7214
  dimColor: true,
7482
7215
  children: activeCommandLabel
7483
7216
  })
7484
7217
  }),
7485
- activeCommand?.warning && /* @__PURE__ */ jsx_runtime13.jsx(Box_default, {
7218
+ activeCommand?.warning && /* @__PURE__ */ jsx_runtime14.jsx(Box_default, {
7486
7219
  marginTop: 1,
7487
- children: /* @__PURE__ */ jsx_runtime13.jsx(Text, {
7220
+ children: /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7488
7221
  color: "yellow",
7489
7222
  wrap: "wrap",
7490
7223
  children: activeCommand.warning
7491
7224
  })
7492
7225
  }),
7493
- /* @__PURE__ */ jsx_runtime13.jsx(List, {
7226
+ /* @__PURE__ */ jsx_runtime14.jsx(List, {
7494
7227
  marginTop: 1,
7495
7228
  items: buildManageInstallationItems(),
7496
7229
  onSelect: (value) => {
@@ -7517,28 +7250,28 @@ var UninstallMenu = ({
7517
7250
  onBack();
7518
7251
  }
7519
7252
  });
7520
- return /* @__PURE__ */ jsx_runtime13.jsxs(Box_default, {
7253
+ return /* @__PURE__ */ jsx_runtime14.jsxs(Box_default, {
7521
7254
  flexDirection: "column",
7522
7255
  children: [
7523
- /* @__PURE__ */ jsx_runtime13.jsx(Text, {
7256
+ /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7524
7257
  bold: true,
7525
7258
  children: "卸载 ccstatusline-zh"
7526
7259
  }),
7527
- /* @__PURE__ */ jsx_runtime13.jsx(Box_default, {
7260
+ /* @__PURE__ */ jsx_runtime14.jsx(Box_default, {
7528
7261
  marginTop: 1,
7529
- children: /* @__PURE__ */ jsx_runtime13.jsx(Text, {
7262
+ children: /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7530
7263
  dimColor: true,
7531
7264
  children: "请选择要从本机移除的内容。"
7532
7265
  })
7533
7266
  }),
7534
- detectedManagers.length === 0 && /* @__PURE__ */ jsx_runtime13.jsx(Box_default, {
7267
+ detectedManagers.length === 0 && /* @__PURE__ */ jsx_runtime14.jsx(Box_default, {
7535
7268
  marginTop: 1,
7536
- children: /* @__PURE__ */ jsx_runtime13.jsx(Text, {
7269
+ children: /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7537
7270
  dimColor: true,
7538
7271
  children: "未检测到全局 npm 或 bun ccstatusline-zh 包。"
7539
7272
  })
7540
7273
  }),
7541
- /* @__PURE__ */ jsx_runtime13.jsx(List, {
7274
+ /* @__PURE__ */ jsx_runtime14.jsx(List, {
7542
7275
  marginTop: 1,
7543
7276
  items,
7544
7277
  onSelect: (value) => {
@@ -7555,7 +7288,7 @@ var UninstallMenu = ({
7555
7288
  };
7556
7289
  // src/tui/components/PowerlineSetup.tsx
7557
7290
  var import_react16 = __toESM(require_react(), 1);
7558
- import * as os5 from "os";
7291
+ import * as os5 from "node:os";
7559
7292
 
7560
7293
  // src/utils/powerline-settings.ts
7561
7294
  function resolveEnabledPowerlineTheme(theme) {
@@ -7583,7 +7316,7 @@ function buildEnabledPowerlineSettings(settings, removeManualSeparators) {
7583
7316
 
7584
7317
  // src/tui/components/PowerlineSeparatorEditor.tsx
7585
7318
  var import_react14 = __toESM(require_react(), 1);
7586
- var jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
7319
+ var jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
7587
7320
  var PowerlineSeparatorEditor = ({
7588
7321
  settings,
7589
7322
  mode,
@@ -7641,7 +7374,7 @@ var PowerlineSeparatorEditor = ({
7641
7374
  }
7642
7375
  const codePoint = char.codePointAt(0) ?? 0;
7643
7376
  const hexCode = codePoint.toString(16).toUpperCase().padStart(4, "0");
7644
- return `${char} - Custom (U+${hexCode})${invertBg ? " [反转]" : ""}`;
7377
+ return `${char} - 自定义 (U+${hexCode})${invertBg ? " [反转]" : ""}`;
7645
7378
  };
7646
7379
  const updateSeparators = (newSeparators, newInvertBgs) => {
7647
7380
  const updatedPowerline = { ...powerlineConfig };
@@ -7670,7 +7403,7 @@ var PowerlineSeparatorEditor = ({
7670
7403
  setCursorPos(0);
7671
7404
  } else if (key.return) {
7672
7405
  if (hexInput.length >= 4 && hexInput.length <= 6) {
7673
- const codePoint = parseInt(hexInput, 16);
7406
+ const codePoint = Number.parseInt(hexInput, 16);
7674
7407
  if (codePoint >= 0 && codePoint <= 1114111) {
7675
7408
  const char = String.fromCodePoint(codePoint);
7676
7409
  const newSeparators = [...separators];
@@ -7798,18 +7531,18 @@ var PowerlineSeparatorEditor = ({
7798
7531
  }
7799
7532
  };
7800
7533
  const canDelete = mode !== "separator" || separators.length > 1;
7801
- return /* @__PURE__ */ jsx_runtime14.jsxs(Box_default, {
7534
+ return /* @__PURE__ */ jsx_runtime15.jsxs(Box_default, {
7802
7535
  flexDirection: "column",
7803
7536
  children: [
7804
- /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7537
+ /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7805
7538
  bold: true,
7806
7539
  children: getTitle()
7807
7540
  }),
7808
- hexInputMode ? /* @__PURE__ */ jsx_runtime14.jsxs(Box_default, {
7541
+ hexInputMode ? /* @__PURE__ */ jsx_runtime15.jsxs(Box_default, {
7809
7542
  marginTop: 2,
7810
7543
  flexDirection: "column",
7811
7544
  children: [
7812
- /* @__PURE__ */ jsx_runtime14.jsxs(Text, {
7545
+ /* @__PURE__ */ jsx_runtime15.jsxs(Text, {
7813
7546
  children: [
7814
7547
  "输入十六进制代码(4-6 位)用于",
7815
7548
  " ",
@@ -7818,51 +7551,51 @@ var PowerlineSeparatorEditor = ({
7818
7551
  ":"
7819
7552
  ]
7820
7553
  }),
7821
- /* @__PURE__ */ jsx_runtime14.jsxs(Text, {
7554
+ /* @__PURE__ */ jsx_runtime15.jsxs(Text, {
7822
7555
  children: [
7823
7556
  "U+",
7824
7557
  hexInput.slice(0, cursorPos),
7825
- /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7558
+ /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7826
7559
  backgroundColor: "gray",
7827
7560
  color: "black",
7828
7561
  children: hexInput[cursorPos] ?? "_"
7829
7562
  }),
7830
7563
  hexInput.slice(cursorPos + 1),
7831
- hexInput.length < 6 && hexInput.length === cursorPos && /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7564
+ hexInput.length < 6 && hexInput.length === cursorPos && /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7832
7565
  dimColor: true,
7833
7566
  children: "_".repeat(6 - hexInput.length - 1)
7834
7567
  })
7835
7568
  ]
7836
7569
  }),
7837
- /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7570
+ /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7838
7571
  dimColor: true,
7839
7572
  children: "输入 4-6 位十六进制数字(0-9, A-F)表示 Unicode 码点,然后按 Enter 确认。ESC 取消。"
7840
7573
  }),
7841
- /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7574
+ /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7842
7575
  dimColor: true,
7843
7576
  children: "示例:E0B0(Powerline)、1F984(\uD83E\uDD84)、2764(❤)"
7844
7577
  })
7845
7578
  ]
7846
- }) : /* @__PURE__ */ jsx_runtime14.jsxs(jsx_runtime14.Fragment, {
7579
+ }) : /* @__PURE__ */ jsx_runtime15.jsxs(jsx_runtime15.Fragment, {
7847
7580
  children: [
7848
- /* @__PURE__ */ jsx_runtime14.jsx(Box_default, {
7849
- children: /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7581
+ /* @__PURE__ */ jsx_runtime15.jsx(Box_default, {
7582
+ children: /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7850
7583
  dimColor: true,
7851
7584
  children: `↑↓ 选择,← → 切换,(a)添加,(i)插入${canDelete ? ",(d)删除" : ""},(c)清除,(h)十六进制${mode === "separator" ? ",(t)反转切换" : ""},ESC 返回`
7852
7585
  })
7853
7586
  }),
7854
- /* @__PURE__ */ jsx_runtime14.jsx(Box_default, {
7587
+ /* @__PURE__ */ jsx_runtime15.jsx(Box_default, {
7855
7588
  marginTop: 2,
7856
7589
  flexDirection: "column",
7857
- children: separators.length > 0 ? separators.map((sep, index) => /* @__PURE__ */ jsx_runtime14.jsx(Box_default, {
7858
- children: /* @__PURE__ */ jsx_runtime14.jsxs(Text, {
7590
+ children: separators.length > 0 ? separators.map((sep, index) => /* @__PURE__ */ jsx_runtime15.jsx(Box_default, {
7591
+ children: /* @__PURE__ */ jsx_runtime15.jsxs(Text, {
7859
7592
  color: index === selectedIndex ? "green" : undefined,
7860
7593
  children: [
7861
7594
  index === selectedIndex ? "▶ " : " ",
7862
7595
  `${index + 1}: ${getSeparatorDisplay(sep, index)}`
7863
7596
  ]
7864
7597
  })
7865
- }, index)) : /* @__PURE__ */ jsx_runtime14.jsx(Text, {
7598
+ }, index)) : /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7866
7599
  dimColor: true,
7867
7600
  children: "(未配置 - 按 'a' 添加)"
7868
7601
  })
@@ -7875,7 +7608,7 @@ var PowerlineSeparatorEditor = ({
7875
7608
 
7876
7609
  // src/tui/components/PowerlineThemeSelector.tsx
7877
7610
  var import_react15 = __toESM(require_react(), 1);
7878
- var jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
7611
+ var jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
7879
7612
  function buildPowerlineThemeItems(themes, originalTheme) {
7880
7613
  return themes.map((themeName) => {
7881
7614
  const theme = getPowerlineTheme(themeName);
@@ -7975,39 +7708,39 @@ var PowerlineThemeSelector = ({
7975
7708
  const selectedThemeName = themes[selectedIndex];
7976
7709
  const themeItems = import_react15.useMemo(() => buildPowerlineThemeItems(themes, originalThemeRef.current), [themes]);
7977
7710
  if (showCustomizeConfirm) {
7978
- return /* @__PURE__ */ jsx_runtime15.jsxs(Box_default, {
7711
+ return /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
7979
7712
  flexDirection: "column",
7980
7713
  children: [
7981
- /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7714
+ /* @__PURE__ */ jsx_runtime16.jsx(Text, {
7982
7715
  bold: true,
7983
7716
  color: "yellow",
7984
7717
  children: "⚠ 确认自定义"
7985
7718
  }),
7986
- /* @__PURE__ */ jsx_runtime15.jsxs(Box_default, {
7719
+ /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
7987
7720
  marginTop: 1,
7988
7721
  flexDirection: "column",
7989
7722
  children: [
7990
- /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7723
+ /* @__PURE__ */ jsx_runtime16.jsx(Text, {
7991
7724
  children: "这将把当前主题颜色复制到你的组件中"
7992
7725
  }),
7993
- /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7726
+ /* @__PURE__ */ jsx_runtime16.jsx(Text, {
7994
7727
  children: "并切换到自定义主题模式。"
7995
7728
  }),
7996
- /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7729
+ /* @__PURE__ */ jsx_runtime16.jsx(Text, {
7997
7730
  color: "red",
7998
7731
  children: "这将覆盖所有现有的自定义颜色!"
7999
7732
  })
8000
7733
  ]
8001
7734
  }),
8002
- /* @__PURE__ */ jsx_runtime15.jsx(Box_default, {
7735
+ /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8003
7736
  marginTop: 2,
8004
- children: /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7737
+ children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8005
7738
  children: "是否继续?"
8006
7739
  })
8007
7740
  }),
8008
- /* @__PURE__ */ jsx_runtime15.jsx(Box_default, {
7741
+ /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8009
7742
  marginTop: 1,
8010
- children: /* @__PURE__ */ jsx_runtime15.jsx(ConfirmDialog, {
7743
+ children: /* @__PURE__ */ jsx_runtime16.jsx(ConfirmDialog, {
8011
7744
  inline: true,
8012
7745
  onConfirm: () => {
8013
7746
  if (selectedThemeName) {
@@ -8027,26 +7760,26 @@ var PowerlineThemeSelector = ({
8027
7760
  ]
8028
7761
  });
8029
7762
  }
8030
- return /* @__PURE__ */ jsx_runtime15.jsxs(Box_default, {
7763
+ return /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8031
7764
  flexDirection: "column",
8032
7765
  children: [
8033
- /* @__PURE__ */ jsx_runtime15.jsxs(Text, {
7766
+ /* @__PURE__ */ jsx_runtime16.jsxs(Text, {
8034
7767
  bold: true,
8035
7768
  children: [
8036
7769
  `Powerline 主题选择 | `,
8037
- /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7770
+ /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8038
7771
  dimColor: true,
8039
7772
  children: `原始: ${originalThemeRef.current}`
8040
7773
  })
8041
7774
  ]
8042
7775
  }),
8043
- /* @__PURE__ */ jsx_runtime15.jsx(Box_default, {
8044
- children: /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7776
+ /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
7777
+ children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8045
7778
  dimColor: true,
8046
7779
  children: `↑↓ 选择,Enter 应用${selectedThemeName && selectedThemeName !== "custom" ? ",(c)自定义主题" : ""},ESC 取消`
8047
7780
  })
8048
7781
  }),
8049
- /* @__PURE__ */ jsx_runtime15.jsx(List, {
7782
+ /* @__PURE__ */ jsx_runtime16.jsx(List, {
8050
7783
  marginTop: 1,
8051
7784
  items: themeItems,
8052
7785
  onSelect: () => {
@@ -8060,16 +7793,16 @@ var PowerlineThemeSelector = ({
8060
7793
  },
8061
7794
  initialSelection: selectedIndex
8062
7795
  }),
8063
- selectedThemeName && selectedThemeName !== "custom" && /* @__PURE__ */ jsx_runtime15.jsx(Box_default, {
7796
+ selectedThemeName && selectedThemeName !== "custom" && /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8064
7797
  marginTop: 1,
8065
- children: /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7798
+ children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8066
7799
  dimColor: true,
8067
7800
  children: "按 (c) 自定义此主题 - 将颜色复制到组件"
8068
7801
  })
8069
7802
  }),
8070
- settings.colorLevel === 1 && /* @__PURE__ */ jsx_runtime15.jsx(Box_default, {
7803
+ settings.colorLevel === 1 && /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8071
7804
  marginTop: 1,
8072
- children: /* @__PURE__ */ jsx_runtime15.jsx(Text, {
7805
+ children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8073
7806
  color: "yellow",
8074
7807
  children: "⚠ 16 色模式的主题调色板非常有限,建议在终端选项中切换颜色级别"
8075
7808
  })
@@ -8079,7 +7812,7 @@ var PowerlineThemeSelector = ({
8079
7812
  };
8080
7813
 
8081
7814
  // src/tui/components/PowerlineSetup.tsx
8082
- var jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
7815
+ var jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
8083
7816
  function formatPowerlineMenuLabel(label) {
8084
7817
  const segmenter = new Intl.Segmenter;
8085
7818
  const displayWidth = Array.from(segmenter.segment(label)).reduce((w, { segment: ch }) => w + ((ch.codePointAt(0) ?? 0) > 127 ? 2 : 1), 0);
@@ -8243,7 +7976,7 @@ var PowerlineSetup = ({
8243
7976
  }
8244
7977
  });
8245
7978
  if (screen === "separator") {
8246
- return /* @__PURE__ */ jsx_runtime16.jsx(PowerlineSeparatorEditor, {
7979
+ return /* @__PURE__ */ jsx_runtime17.jsx(PowerlineSeparatorEditor, {
8247
7980
  settings,
8248
7981
  mode: "separator",
8249
7982
  onUpdate,
@@ -8253,7 +7986,7 @@ var PowerlineSetup = ({
8253
7986
  });
8254
7987
  }
8255
7988
  if (screen === "startCap") {
8256
- return /* @__PURE__ */ jsx_runtime16.jsx(PowerlineSeparatorEditor, {
7989
+ return /* @__PURE__ */ jsx_runtime17.jsx(PowerlineSeparatorEditor, {
8257
7990
  settings,
8258
7991
  mode: "startCap",
8259
7992
  onUpdate,
@@ -8263,7 +7996,7 @@ var PowerlineSetup = ({
8263
7996
  });
8264
7997
  }
8265
7998
  if (screen === "endCap") {
8266
- return /* @__PURE__ */ jsx_runtime16.jsx(PowerlineSeparatorEditor, {
7999
+ return /* @__PURE__ */ jsx_runtime17.jsx(PowerlineSeparatorEditor, {
8267
8000
  settings,
8268
8001
  mode: "endCap",
8269
8002
  onUpdate,
@@ -8273,7 +8006,7 @@ var PowerlineSetup = ({
8273
8006
  });
8274
8007
  }
8275
8008
  if (screen === "themes") {
8276
- return /* @__PURE__ */ jsx_runtime16.jsx(PowerlineThemeSelector, {
8009
+ return /* @__PURE__ */ jsx_runtime17.jsx(PowerlineThemeSelector, {
8277
8010
  settings,
8278
8011
  onUpdate,
8279
8012
  onBack: () => {
@@ -8281,16 +8014,16 @@ var PowerlineSetup = ({
8281
8014
  }
8282
8015
  });
8283
8016
  }
8284
- return /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8017
+ return /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8285
8018
  flexDirection: "column",
8286
8019
  children: [
8287
- !confirmingFontInstall && !installingFonts && !fontInstallMessage && /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8020
+ !confirmingFontInstall && !installingFonts && !fontInstallMessage && /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8288
8021
  children: [
8289
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8022
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8290
8023
  bold: true,
8291
8024
  children: "Powerline 设置"
8292
8025
  }),
8293
- globalOverrideMessage && /* @__PURE__ */ jsx_runtime16.jsxs(Text, {
8026
+ globalOverrideMessage && /* @__PURE__ */ jsx_runtime17.jsxs(Text, {
8294
8027
  color: "yellow",
8295
8028
  dimColor: true,
8296
8029
  children: [
@@ -8300,133 +8033,133 @@ var PowerlineSetup = ({
8300
8033
  })
8301
8034
  ]
8302
8035
  }),
8303
- confirmingFontInstall ? /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8036
+ confirmingFontInstall ? /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8304
8037
  flexDirection: "column",
8305
8038
  children: [
8306
- /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8039
+ /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8307
8040
  marginBottom: 1,
8308
- children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8041
+ children: /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8309
8042
  color: "cyan",
8310
8043
  bold: true,
8311
8044
  children: "字体安装"
8312
8045
  })
8313
8046
  }),
8314
- /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8047
+ /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8315
8048
  marginBottom: 1,
8316
8049
  flexDirection: "column",
8317
8050
  children: [
8318
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8051
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8319
8052
  bold: true,
8320
8053
  children: "将会执行:"
8321
8054
  }),
8322
- /* @__PURE__ */ jsx_runtime16.jsxs(Text, {
8055
+ /* @__PURE__ */ jsx_runtime17.jsxs(Text, {
8323
8056
  children: [
8324
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8057
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8325
8058
  dimColor: true,
8326
8059
  children: "• 从以下地址克隆字体 "
8327
8060
  }),
8328
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8061
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8329
8062
  color: "blue",
8330
8063
  children: "https://github.com/powerline/fonts"
8331
8064
  })
8332
8065
  ]
8333
8066
  }),
8334
- os5.platform() === "darwin" && /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
8067
+ os5.platform() === "darwin" && /* @__PURE__ */ jsx_runtime17.jsxs(jsx_runtime17.Fragment, {
8335
8068
  children: [
8336
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8069
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8337
8070
  dimColor: true,
8338
8071
  children: "• 运行 install.sh 脚本:"
8339
8072
  }),
8340
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8073
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8341
8074
  dimColor: true,
8342
8075
  children: " - 复制所有 .ttf/.otf 文件到 ~/Library/Fonts"
8343
8076
  }),
8344
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8077
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8345
8078
  dimColor: true,
8346
8079
  children: " - 在 macOS 中注册字体"
8347
8080
  })
8348
8081
  ]
8349
8082
  }),
8350
- os5.platform() === "linux" && /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
8083
+ os5.platform() === "linux" && /* @__PURE__ */ jsx_runtime17.jsxs(jsx_runtime17.Fragment, {
8351
8084
  children: [
8352
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8085
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8353
8086
  dimColor: true,
8354
8087
  children: "• 运行 install.sh 脚本:"
8355
8088
  }),
8356
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8089
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8357
8090
  dimColor: true,
8358
8091
  children: " - 复制所有 .ttf/.otf 文件到 ~/.local/share/fonts"
8359
8092
  }),
8360
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8093
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8361
8094
  dimColor: true,
8362
8095
  children: " - 运行 fc-cache 更新字体缓存"
8363
8096
  })
8364
8097
  ]
8365
8098
  }),
8366
- os5.platform() === "win32" && /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
8099
+ os5.platform() === "win32" && /* @__PURE__ */ jsx_runtime17.jsxs(jsx_runtime17.Fragment, {
8367
8100
  children: [
8368
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8101
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8369
8102
  dimColor: true,
8370
8103
  children: "• 复制 Powerline .ttf/.otf 文件到:"
8371
8104
  }),
8372
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8105
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8373
8106
  dimColor: true,
8374
8107
  children: " AppData\\Local\\Microsoft\\Windows\\Fonts"
8375
8108
  })
8376
8109
  ]
8377
8110
  }),
8378
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8111
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8379
8112
  dimColor: true,
8380
8113
  children: "• 清理临时文件"
8381
8114
  })
8382
8115
  ]
8383
8116
  }),
8384
- /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8117
+ /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8385
8118
  marginBottom: 1,
8386
8119
  children: [
8387
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8120
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8388
8121
  color: "yellow",
8389
8122
  bold: true,
8390
8123
  children: "前提条件:"
8391
8124
  }),
8392
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8125
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8393
8126
  dimColor: true,
8394
8127
  children: "已安装 Git、网络连接、写入权限"
8395
8128
  })
8396
8129
  ]
8397
8130
  }),
8398
- /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8131
+ /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8399
8132
  marginBottom: 1,
8400
8133
  flexDirection: "column",
8401
8134
  children: [
8402
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8135
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8403
8136
  color: "green",
8404
8137
  bold: true,
8405
8138
  children: "安装后:"
8406
8139
  }),
8407
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8140
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8408
8141
  dimColor: true,
8409
8142
  children: "• 重启终端"
8410
8143
  }),
8411
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8144
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8412
8145
  dimColor: true,
8413
8146
  children: "• 选择一个 Powerline 字体"
8414
8147
  }),
8415
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8148
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8416
8149
  dimColor: true,
8417
8150
  children: ' (例如 "Meslo LG S for Powerline")'
8418
8151
  })
8419
8152
  ]
8420
8153
  }),
8421
- /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8154
+ /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8422
8155
  marginTop: 1,
8423
- children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8156
+ children: /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8424
8157
  children: "是否继续?"
8425
8158
  })
8426
8159
  }),
8427
- /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8160
+ /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8428
8161
  marginTop: 1,
8429
- children: /* @__PURE__ */ jsx_runtime16.jsx(ConfirmDialog, {
8162
+ children: /* @__PURE__ */ jsx_runtime17.jsx(ConfirmDialog, {
8430
8163
  inline: true,
8431
8164
  onConfirm: () => {
8432
8165
  setConfirmingFontInstall(false);
@@ -8438,36 +8171,36 @@ var PowerlineSetup = ({
8438
8171
  })
8439
8172
  })
8440
8173
  ]
8441
- }) : confirmingEnable ? /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8174
+ }) : confirmingEnable ? /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8442
8175
  flexDirection: "column",
8443
8176
  marginTop: 1,
8444
8177
  children: [
8445
- hasManualSeparatorItems && /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
8178
+ hasManualSeparatorItems && /* @__PURE__ */ jsx_runtime17.jsxs(jsx_runtime17.Fragment, {
8446
8179
  children: [
8447
- /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8448
- children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8180
+ /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8181
+ children: /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8449
8182
  color: "yellow",
8450
8183
  children: "⚠ 警告:启用 Powerline 模式将移除状态栏中所有现有的分隔符和弹性分隔符。"
8451
8184
  })
8452
8185
  }),
8453
- /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8186
+ /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8454
8187
  marginBottom: 1,
8455
- children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8188
+ children: /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8456
8189
  dimColor: true,
8457
8190
  children: "Powerline 模式使用自己的分隔符系统,与手动分隔符不兼容。"
8458
8191
  })
8459
8192
  })
8460
8193
  ]
8461
8194
  }),
8462
- /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8195
+ /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8463
8196
  marginTop: hasManualSeparatorItems ? 1 : 0,
8464
- children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8197
+ children: /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8465
8198
  children: "是否要继续?"
8466
8199
  })
8467
8200
  }),
8468
- /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8201
+ /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8469
8202
  marginTop: 1,
8470
- children: /* @__PURE__ */ jsx_runtime16.jsx(ConfirmDialog, {
8203
+ children: /* @__PURE__ */ jsx_runtime17.jsx(ConfirmDialog, {
8471
8204
  inline: true,
8472
8205
  onConfirm: () => {
8473
8206
  onUpdate(buildEnabledPowerlineSettings(settings, true));
@@ -8479,51 +8212,51 @@ var PowerlineSetup = ({
8479
8212
  })
8480
8213
  })
8481
8214
  ]
8482
- }) : installingFonts ? /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8483
- children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8215
+ }) : installingFonts ? /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8216
+ children: /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8484
8217
  color: "yellow",
8485
8218
  children: "正在安装 Powerline 字体... 这可能需要一些时间。"
8486
8219
  })
8487
- }) : fontInstallMessage ? /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8220
+ }) : fontInstallMessage ? /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8488
8221
  flexDirection: "column",
8489
8222
  children: [
8490
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8223
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8491
8224
  color: fontInstallMessage.includes("success") ? "green" : "red",
8492
8225
  children: fontInstallMessage
8493
8226
  }),
8494
- /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8227
+ /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8495
8228
  marginTop: 1,
8496
- children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8229
+ children: /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8497
8230
  dimColor: true,
8498
8231
  children: "按任意键继续..."
8499
8232
  })
8500
8233
  })
8501
8234
  ]
8502
- }) : /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
8235
+ }) : /* @__PURE__ */ jsx_runtime17.jsxs(jsx_runtime17.Fragment, {
8503
8236
  children: [
8504
- /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8237
+ /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8505
8238
  flexDirection: "column",
8506
- children: /* @__PURE__ */ jsx_runtime16.jsxs(Text, {
8239
+ children: /* @__PURE__ */ jsx_runtime17.jsxs(Text, {
8507
8240
  children: [
8508
8241
  " 字体状态: ",
8509
- powerlineFontStatus.installed ? /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
8242
+ powerlineFontStatus.installed ? /* @__PURE__ */ jsx_runtime17.jsxs(jsx_runtime17.Fragment, {
8510
8243
  children: [
8511
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8244
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8512
8245
  color: "green",
8513
8246
  children: "✓ 已安装"
8514
8247
  }),
8515
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8248
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8516
8249
  dimColor: true,
8517
8250
  children: " - 请确保终端中已激活字体"
8518
8251
  })
8519
8252
  ]
8520
- }) : /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
8253
+ }) : /* @__PURE__ */ jsx_runtime17.jsxs(jsx_runtime17.Fragment, {
8521
8254
  children: [
8522
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8255
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8523
8256
  color: "yellow",
8524
8257
  children: "✗ 未安装"
8525
8258
  }),
8526
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8259
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8527
8260
  dimColor: true,
8528
8261
  children: " - 按 (i) 安装 Powerline 字体"
8529
8262
  })
@@ -8532,62 +8265,62 @@ var PowerlineSetup = ({
8532
8265
  ]
8533
8266
  })
8534
8267
  }),
8535
- /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8268
+ /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8536
8269
  children: [
8537
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8270
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8538
8271
  children: " Powerline 模式:"
8539
8272
  }),
8540
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8273
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8541
8274
  color: powerlineConfig.enabled ? "green" : "red",
8542
8275
  children: powerlineConfig.enabled ? "✓ 已启用 " : "✗ 已禁用 "
8543
8276
  }),
8544
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8277
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8545
8278
  dimColor: true,
8546
8279
  children: " - 按 (t) 切换"
8547
8280
  })
8548
8281
  ]
8549
8282
  }),
8550
- powerlineConfig.enabled && /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
8283
+ powerlineConfig.enabled && /* @__PURE__ */ jsx_runtime17.jsxs(jsx_runtime17.Fragment, {
8551
8284
  children: [
8552
- /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8285
+ /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8553
8286
  children: [
8554
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8287
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8555
8288
  children: " 对齐组件: "
8556
8289
  }),
8557
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8290
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8558
8291
  color: powerlineConfig.autoAlign ? "green" : "red",
8559
8292
  children: powerlineConfig.autoAlign ? "✓ 已启用 " : "✗ 已禁用 "
8560
8293
  }),
8561
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8294
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8562
8295
  dimColor: true,
8563
8296
  children: " - 按 (a) 切换"
8564
8297
  })
8565
8298
  ]
8566
8299
  }),
8567
- /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8300
+ /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8568
8301
  children: [
8569
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8302
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8570
8303
  children: " 主题色延续: "
8571
8304
  }),
8572
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8305
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8573
8306
  color: powerlineConfig.continueThemeAcrossLines ? "green" : "red",
8574
8307
  children: powerlineConfig.continueThemeAcrossLines ? "✓ 已启用 " : "✗ 已禁用 "
8575
8308
  }),
8576
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8309
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8577
8310
  dimColor: true,
8578
8311
  children: " - 按 (c) 切换"
8579
8312
  })
8580
8313
  ]
8581
8314
  }),
8582
- /* @__PURE__ */ jsx_runtime16.jsxs(Box_default, {
8315
+ /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8583
8316
  flexDirection: "column",
8584
8317
  marginTop: 1,
8585
8318
  children: [
8586
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8319
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8587
8320
  dimColor: true,
8588
8321
  children: "Powerline 模式使用独立的分隔符系统"
8589
8322
  }),
8590
- /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8323
+ /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8591
8324
  dimColor: true,
8592
8325
  children: "主题色延续:Powerline 颜色序列跨多行状态栏连续延续"
8593
8326
  })
@@ -8595,14 +8328,14 @@ var PowerlineSetup = ({
8595
8328
  })
8596
8329
  ]
8597
8330
  }),
8598
- !powerlineConfig.enabled && /* @__PURE__ */ jsx_runtime16.jsx(Box_default, {
8331
+ !powerlineConfig.enabled && /* @__PURE__ */ jsx_runtime17.jsx(Box_default, {
8599
8332
  marginTop: 1,
8600
- children: /* @__PURE__ */ jsx_runtime16.jsx(Text, {
8333
+ children: /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8601
8334
  dimColor: true,
8602
8335
  children: "启用 Powerline 模式以配置分隔符、端帽和主题。"
8603
8336
  })
8604
8337
  }),
8605
- /* @__PURE__ */ jsx_runtime16.jsx(List, {
8338
+ /* @__PURE__ */ jsx_runtime17.jsx(List, {
8606
8339
  marginTop: 1,
8607
8340
  items: buildPowerlineSetupMenuItems(powerlineConfig),
8608
8341
  onSelect: (value) => {
@@ -8625,7 +8358,7 @@ var PowerlineSetup = ({
8625
8358
  };
8626
8359
  // src/tui/components/RefreshIntervalMenu.tsx
8627
8360
  var import_react17 = __toESM(require_react(), 1);
8628
- var jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
8361
+ var jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
8629
8362
  function getRefreshInputValue(interval) {
8630
8363
  return interval === null ? "" : String(interval);
8631
8364
  }
@@ -8680,8 +8413,8 @@ function validateRefreshIntervalInput(value) {
8680
8413
  if (value === "") {
8681
8414
  return null;
8682
8415
  }
8683
- const parsed = parseInt(value, 10);
8684
- if (isNaN(parsed)) {
8416
+ const parsed = Number.parseInt(value, 10);
8417
+ if (Number.isNaN(parsed)) {
8685
8418
  return "请输入有效数字";
8686
8419
  }
8687
8420
  if (parsed < 1) {
@@ -8693,8 +8426,8 @@ function validateRefreshIntervalInput(value) {
8693
8426
  return null;
8694
8427
  }
8695
8428
  function validateTtlInput(value, label, maximum = 60) {
8696
- const parsed = parseInt(value, 10);
8697
- if (value === "" || isNaN(parsed)) {
8429
+ const parsed = Number.parseInt(value, 10);
8430
+ if (value === "" || Number.isNaN(parsed)) {
8698
8431
  return "请输入有效数字";
8699
8432
  }
8700
8433
  if (parsed < 0) {
@@ -8773,7 +8506,7 @@ var RefreshIntervalMenu = ({
8773
8506
  if (error) {
8774
8507
  setValidationError(error);
8775
8508
  } else {
8776
- const value = parseInt(refreshInput, 10);
8509
+ const value = Number.parseInt(refreshInput, 10);
8777
8510
  onUpdate(value);
8778
8511
  setEditingRefreshInterval(false);
8779
8512
  setValidationError(null);
@@ -8801,7 +8534,7 @@ var RefreshIntervalMenu = ({
8801
8534
  if (error) {
8802
8535
  setValidationError(error);
8803
8536
  } else {
8804
- const value = parseInt(ttlInput, 10);
8537
+ const value = Number.parseInt(ttlInput, 10);
8805
8538
  field.onSave(value);
8806
8539
  setEditingTtlField(null);
8807
8540
  setValidationError(null);
@@ -8826,22 +8559,22 @@ var RefreshIntervalMenu = ({
8826
8559
  onBack();
8827
8560
  }
8828
8561
  });
8829
- return /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8562
+ return /* @__PURE__ */ jsx_runtime18.jsxs(Box_default, {
8830
8563
  flexDirection: "column",
8831
8564
  children: [
8832
- /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8565
+ /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8833
8566
  bold: true,
8834
8567
  children: "配置状态行"
8835
8568
  }),
8836
- /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8569
+ /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8837
8570
  color: "white",
8838
8571
  children: "配置 Claude Code 状态行设置"
8839
8572
  }),
8840
- editingRefreshInterval ? /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8573
+ editingRefreshInterval ? /* @__PURE__ */ jsx_runtime18.jsxs(Box_default, {
8841
8574
  marginTop: 1,
8842
8575
  flexDirection: "column",
8843
8576
  children: [
8844
- /* @__PURE__ */ jsx_runtime17.jsxs(Text, {
8577
+ /* @__PURE__ */ jsx_runtime18.jsxs(Text, {
8845
8578
  children: [
8846
8579
  "输入刷新间隔(秒,1-60):",
8847
8580
  " ",
@@ -8849,19 +8582,19 @@ var RefreshIntervalMenu = ({
8849
8582
  refreshInput.length > 0 ? " 秒" : ""
8850
8583
  ]
8851
8584
  }),
8852
- validationError ? /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8585
+ validationError ? /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8853
8586
  color: "red",
8854
8587
  children: validationError
8855
- }) : /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8588
+ }) : /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8856
8589
  dimColor: true,
8857
8590
  children: "按 Enter 确认,ESC 取消。留空即移除。"
8858
8591
  })
8859
8592
  ]
8860
- }) : editingTtlField ? /* @__PURE__ */ jsx_runtime17.jsxs(Box_default, {
8593
+ }) : editingTtlField ? /* @__PURE__ */ jsx_runtime18.jsxs(Box_default, {
8861
8594
  marginTop: 1,
8862
8595
  flexDirection: "column",
8863
8596
  children: [
8864
- /* @__PURE__ */ jsx_runtime17.jsxs(Text, {
8597
+ /* @__PURE__ */ jsx_runtime18.jsxs(Text, {
8865
8598
  children: [
8866
8599
  ttlFields[editingTtlField].prompt,
8867
8600
  " ",
@@ -8869,27 +8602,27 @@ var RefreshIntervalMenu = ({
8869
8602
  ttlInput.length > 0 ? " 秒" : ""
8870
8603
  ]
8871
8604
  }),
8872
- /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8605
+ /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8873
8606
  children: " "
8874
8607
  }),
8875
- /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8608
+ /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8876
8609
  dimColor: true,
8877
8610
  wrap: "wrap",
8878
8611
  children: ttlFields[editingTtlField].helperText
8879
8612
  }),
8880
- validationError ? /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8613
+ validationError ? /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8881
8614
  color: "red",
8882
8615
  children: validationError
8883
- }) : /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8616
+ }) : /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8884
8617
  dimColor: true,
8885
8618
  children: ttlFields[editingTtlField].hint
8886
8619
  }),
8887
- /* @__PURE__ */ jsx_runtime17.jsx(Text, {
8620
+ /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8888
8621
  dimColor: true,
8889
8622
  children: "按 Enter 确认,ESC 取消。"
8890
8623
  })
8891
8624
  ]
8892
- }) : /* @__PURE__ */ jsx_runtime17.jsx(List, {
8625
+ }) : /* @__PURE__ */ jsx_runtime18.jsx(List, {
8893
8626
  marginTop: 1,
8894
8627
  items: buildConfigureStatusLineItems(currentInterval, supportsRefreshInterval, gitCacheTtlSeconds, customCommandCacheTtlSeconds, terminalWidthCacheTtlSeconds),
8895
8628
  onSelect: (value) => {
@@ -8912,7 +8645,7 @@ var RefreshIntervalMenu = ({
8912
8645
  };
8913
8646
  // src/tui/components/StatusLinePreview.tsx
8914
8647
  var import_react18 = __toESM(require_react(), 1);
8915
- var jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
8648
+ var jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
8916
8649
  var renderSingleLine = (widgets, terminalWidth, settings, lineIndex, globalSeparatorIndex, globalPowerlineThemeIndex, globalPowerlineStartCapIndex, preRenderedWidgets, preCalculatedMaxWidths) => {
8917
8650
  const context = {
8918
8651
  terminalWidth,
@@ -8973,26 +8706,26 @@ var StatusLinePreview = ({ lines, terminalWidth, settings, onTruncationChange })
8973
8706
  import_react18.default.useEffect(() => {
8974
8707
  onTruncationChange?.(anyTruncated);
8975
8708
  }, [anyTruncated, onTruncationChange]);
8976
- return /* @__PURE__ */ jsx_runtime18.jsxs(Box_default, {
8709
+ return /* @__PURE__ */ jsx_runtime19.jsxs(Box_default, {
8977
8710
  flexDirection: "column",
8978
8711
  children: [
8979
- /* @__PURE__ */ jsx_runtime18.jsx(Box_default, {
8712
+ /* @__PURE__ */ jsx_runtime19.jsx(Box_default, {
8980
8713
  borderStyle: "round",
8981
8714
  borderColor: "gray",
8982
8715
  borderDimColor: true,
8983
8716
  width: "100%",
8984
8717
  paddingLeft: 1,
8985
- children: /* @__PURE__ */ jsx_runtime18.jsxs(Text, {
8718
+ children: /* @__PURE__ */ jsx_runtime19.jsxs(Text, {
8986
8719
  children: [
8987
8720
  ">",
8988
- /* @__PURE__ */ jsx_runtime18.jsx(Text, {
8721
+ /* @__PURE__ */ jsx_runtime19.jsx(Text, {
8989
8722
  dimColor: true,
8990
8723
  children: " 预览 (随时按 ctrl+s 保存配置)"
8991
8724
  })
8992
8725
  ]
8993
8726
  })
8994
8727
  }),
8995
- renderedLines.map((line, index) => /* @__PURE__ */ jsx_runtime18.jsxs(Text, {
8728
+ renderedLines.map((line, index) => /* @__PURE__ */ jsx_runtime19.jsxs(Text, {
8996
8729
  wrap: "truncate",
8997
8730
  children: [
8998
8731
  PREVIEW_LINE_INDENT,
@@ -9058,7 +8791,7 @@ function sanitizeLinesForColorLevel(lines, nextLevel) {
9058
8791
  }
9059
8792
 
9060
8793
  // src/tui/components/TerminalOptionsMenu.tsx
9061
- var jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
8794
+ var jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
9062
8795
  function getNextColorLevel(level) {
9063
8796
  return (level + 1) % 4;
9064
8797
  }
@@ -9141,27 +8874,27 @@ var TerminalOptionsMenu = ({
9141
8874
  onBack();
9142
8875
  }
9143
8876
  });
9144
- return /* @__PURE__ */ jsx_runtime19.jsxs(Box_default, {
8877
+ return /* @__PURE__ */ jsx_runtime20.jsxs(Box_default, {
9145
8878
  flexDirection: "column",
9146
8879
  children: [
9147
- /* @__PURE__ */ jsx_runtime19.jsx(Text, {
8880
+ /* @__PURE__ */ jsx_runtime20.jsx(Text, {
9148
8881
  bold: true,
9149
8882
  children: "终端选项"
9150
8883
  }),
9151
- showColorWarning ? /* @__PURE__ */ jsx_runtime19.jsxs(Box_default, {
8884
+ showColorWarning ? /* @__PURE__ */ jsx_runtime20.jsxs(Box_default, {
9152
8885
  flexDirection: "column",
9153
8886
  marginTop: 1,
9154
8887
  children: [
9155
- /* @__PURE__ */ jsx_runtime19.jsx(Text, {
8888
+ /* @__PURE__ */ jsx_runtime20.jsx(Text, {
9156
8889
  color: "yellow",
9157
8890
  children: "⚠ 警告:检测到自定义颜色!"
9158
8891
  }),
9159
- /* @__PURE__ */ jsx_runtime19.jsx(Text, {
8892
+ /* @__PURE__ */ jsx_runtime20.jsx(Text, {
9160
8893
  children: "切换颜色模式将会把自定义的 ansi256 或十六进制颜色重置为默认值。"
9161
8894
  }),
9162
- /* @__PURE__ */ jsx_runtime19.jsx(Box_default, {
8895
+ /* @__PURE__ */ jsx_runtime20.jsx(Box_default, {
9163
8896
  marginTop: 1,
9164
- children: /* @__PURE__ */ jsx_runtime19.jsx(ConfirmDialog, {
8897
+ children: /* @__PURE__ */ jsx_runtime20.jsx(ConfirmDialog, {
9165
8898
  message: "继续?",
9166
8899
  onConfirm: handleColorConfirm,
9167
8900
  onCancel: handleColorCancel,
@@ -9169,13 +8902,13 @@ var TerminalOptionsMenu = ({
9169
8902
  })
9170
8903
  })
9171
8904
  ]
9172
- }) : /* @__PURE__ */ jsx_runtime19.jsxs(jsx_runtime19.Fragment, {
8905
+ }) : /* @__PURE__ */ jsx_runtime20.jsxs(jsx_runtime20.Fragment, {
9173
8906
  children: [
9174
- /* @__PURE__ */ jsx_runtime19.jsx(Text, {
8907
+ /* @__PURE__ */ jsx_runtime20.jsx(Text, {
9175
8908
  color: "white",
9176
8909
  children: "配置终端特定设置以获得最佳显示效果"
9177
8910
  }),
9178
- /* @__PURE__ */ jsx_runtime19.jsx(List, {
8911
+ /* @__PURE__ */ jsx_runtime20.jsx(List, {
9179
8912
  marginTop: 1,
9180
8913
  items: buildTerminalOptionsItems(settings.colorLevel),
9181
8914
  onSelect: handleSelect,
@@ -9203,16 +8936,16 @@ var getColorLevelLabel = (level) => {
9203
8936
  };
9204
8937
  // src/tui/components/TerminalWidthMenu.tsx
9205
8938
  var import_react20 = __toESM(require_react(), 1);
9206
- var jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
8939
+ var jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9207
8940
  var TERMINAL_WIDTH_OPTIONS = ["full", "full-minus-40", "full-until-compact"];
9208
8941
  function getTerminalWidthSelectionIndex(selectedOption) {
9209
8942
  const selectedIndex = TERMINAL_WIDTH_OPTIONS.indexOf(selectedOption);
9210
8943
  return selectedIndex >= 0 ? selectedIndex : 0;
9211
8944
  }
9212
8945
  function validateCompactThresholdInput(value) {
9213
- const parsedValue = parseInt(value, 10);
9214
- if (isNaN(parsedValue)) {
9215
- return "Please enter a valid number";
8946
+ const parsedValue = Number.parseInt(value, 10);
8947
+ if (Number.isNaN(parsedValue)) {
8948
+ return "请输入有效数字";
9216
8949
  }
9217
8950
  if (parsedValue < 1 || parsedValue > 99) {
9218
8951
  return `Value must be between 1 and 99 (you entered ${parsedValue})`;
@@ -9262,7 +8995,7 @@ var TerminalWidthMenu = ({
9262
8995
  if (error) {
9263
8996
  setValidationError(error);
9264
8997
  } else {
9265
- const value = parseInt(thresholdInput, 10);
8998
+ const value = Number.parseInt(thresholdInput, 10);
9266
8999
  setCompactThreshold(value);
9267
9000
  const updatedSettings = {
9268
9001
  ...settings,
@@ -9293,27 +9026,27 @@ var TerminalWidthMenu = ({
9293
9026
  onBack();
9294
9027
  }
9295
9028
  });
9296
- return /* @__PURE__ */ jsx_runtime20.jsxs(Box_default, {
9029
+ return /* @__PURE__ */ jsx_runtime21.jsxs(Box_default, {
9297
9030
  flexDirection: "column",
9298
9031
  children: [
9299
- /* @__PURE__ */ jsx_runtime20.jsx(Text, {
9032
+ /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9300
9033
  bold: true,
9301
9034
  children: "终端宽度"
9302
9035
  }),
9303
- /* @__PURE__ */ jsx_runtime20.jsx(Text, {
9036
+ /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9304
9037
  color: "white",
9305
9038
  children: "这些设置影响长行的截断位置,以及使用弹性分隔符时的右对齐位置"
9306
9039
  }),
9307
- /* @__PURE__ */ jsx_runtime20.jsx(Text, {
9040
+ /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9308
9041
  dimColor: true,
9309
9042
  wrap: "wrap",
9310
9043
  children: "Claude Code 目前未提供状态栏可用宽度变量,IDE 集成、自动压缩通知等功能都可能导致状态栏换行(如果不进行截断)"
9311
9044
  }),
9312
- editingThreshold ? /* @__PURE__ */ jsx_runtime20.jsxs(Box_default, {
9045
+ editingThreshold ? /* @__PURE__ */ jsx_runtime21.jsxs(Box_default, {
9313
9046
  marginTop: 1,
9314
9047
  flexDirection: "column",
9315
9048
  children: [
9316
- /* @__PURE__ */ jsx_runtime20.jsxs(Text, {
9049
+ /* @__PURE__ */ jsx_runtime21.jsxs(Text, {
9317
9050
  children: [
9318
9051
  "输入压缩阈值(1-99):",
9319
9052
  " ",
@@ -9321,15 +9054,15 @@ var TerminalWidthMenu = ({
9321
9054
  "%"
9322
9055
  ]
9323
9056
  }),
9324
- validationError ? /* @__PURE__ */ jsx_runtime20.jsx(Text, {
9057
+ validationError ? /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9325
9058
  color: "red",
9326
9059
  children: validationError
9327
- }) : /* @__PURE__ */ jsx_runtime20.jsx(Text, {
9060
+ }) : /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9328
9061
  dimColor: true,
9329
9062
  children: "按 Enter 确认,ESC 取消"
9330
9063
  })
9331
9064
  ]
9332
- }) : /* @__PURE__ */ jsx_runtime20.jsx(List, {
9065
+ }) : /* @__PURE__ */ jsx_runtime21.jsx(List, {
9333
9066
  marginTop: 1,
9334
9067
  items: buildTerminalWidthItems(selectedOption, compactThreshold),
9335
9068
  initialSelection: getTerminalWidthSelectionIndex(selectedOption),
@@ -9355,7 +9088,7 @@ var TerminalWidthMenu = ({
9355
9088
  });
9356
9089
  };
9357
9090
  // src/tui/components/UpdateCheckerMenu.tsx
9358
- var jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9091
+ var jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9359
9092
  function getInstallationLabel2(result) {
9360
9093
  const { installation } = result;
9361
9094
  if (installation.method === "auto-update") {
@@ -9406,16 +9139,16 @@ var UpdateCheckerMenu = ({
9406
9139
  }
9407
9140
  });
9408
9141
  if (state.status === "checking") {
9409
- return /* @__PURE__ */ jsx_runtime21.jsxs(Box_default, {
9142
+ return /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
9410
9143
  flexDirection: "column",
9411
9144
  children: [
9412
- /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9145
+ /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9413
9146
  bold: true,
9414
9147
  children: "检查更新"
9415
9148
  }),
9416
- /* @__PURE__ */ jsx_runtime21.jsx(Box_default, {
9149
+ /* @__PURE__ */ jsx_runtime22.jsx(Box_default, {
9417
9150
  marginTop: 1,
9418
- children: /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9151
+ children: /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9419
9152
  dimColor: true,
9420
9153
  children: "正在查询 npm 仓库..."
9421
9154
  })
@@ -9423,32 +9156,32 @@ var UpdateCheckerMenu = ({
9423
9156
  ]
9424
9157
  });
9425
9158
  }
9426
- return /* @__PURE__ */ jsx_runtime21.jsxs(Box_default, {
9159
+ return /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
9427
9160
  flexDirection: "column",
9428
9161
  children: [
9429
- /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9162
+ /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9430
9163
  bold: true,
9431
9164
  children: "检查更新"
9432
9165
  }),
9433
- /* @__PURE__ */ jsx_runtime21.jsxs(Box_default, {
9166
+ /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
9434
9167
  marginTop: 1,
9435
9168
  flexDirection: "column",
9436
9169
  children: [
9437
- /* @__PURE__ */ jsx_runtime21.jsxs(Text, {
9170
+ /* @__PURE__ */ jsx_runtime22.jsxs(Text, {
9438
9171
  children: [
9439
9172
  "当前版本:",
9440
9173
  " ",
9441
9174
  state.currentVersion
9442
9175
  ]
9443
9176
  }),
9444
- state.status !== "registry-failure" && /* @__PURE__ */ jsx_runtime21.jsxs(Text, {
9177
+ state.status !== "registry-failure" && /* @__PURE__ */ jsx_runtime22.jsxs(Text, {
9445
9178
  children: [
9446
9179
  "最新版本:",
9447
9180
  " ",
9448
9181
  state.latestVersion
9449
9182
  ]
9450
9183
  }),
9451
- /* @__PURE__ */ jsx_runtime21.jsxs(Text, {
9184
+ /* @__PURE__ */ jsx_runtime22.jsxs(Text, {
9452
9185
  children: [
9453
9186
  "安装方式:",
9454
9187
  " ",
@@ -9457,11 +9190,11 @@ var UpdateCheckerMenu = ({
9457
9190
  })
9458
9191
  ]
9459
9192
  }),
9460
- state.status === "registry-failure" && /* @__PURE__ */ jsx_runtime21.jsxs(jsx_runtime21.Fragment, {
9193
+ state.status === "registry-failure" && /* @__PURE__ */ jsx_runtime22.jsxs(jsx_runtime22.Fragment, {
9461
9194
  children: [
9462
- /* @__PURE__ */ jsx_runtime21.jsx(Box_default, {
9195
+ /* @__PURE__ */ jsx_runtime22.jsx(Box_default, {
9463
9196
  marginTop: 1,
9464
- children: /* @__PURE__ */ jsx_runtime21.jsxs(Text, {
9197
+ children: /* @__PURE__ */ jsx_runtime22.jsxs(Text, {
9465
9198
  color: "red",
9466
9199
  children: [
9467
9200
  "查询仓库失败:",
@@ -9470,7 +9203,7 @@ var UpdateCheckerMenu = ({
9470
9203
  ]
9471
9204
  })
9472
9205
  }),
9473
- /* @__PURE__ */ jsx_runtime21.jsx(List, {
9206
+ /* @__PURE__ */ jsx_runtime22.jsx(List, {
9474
9207
  marginTop: 1,
9475
9208
  items: [{ label: "重新检查", value: "refresh" }],
9476
9209
  onSelect: (value) => {
@@ -9484,16 +9217,16 @@ var UpdateCheckerMenu = ({
9484
9217
  })
9485
9218
  ]
9486
9219
  }),
9487
- state.status === "up-to-date" && /* @__PURE__ */ jsx_runtime21.jsxs(jsx_runtime21.Fragment, {
9220
+ state.status === "up-to-date" && /* @__PURE__ */ jsx_runtime22.jsxs(jsx_runtime22.Fragment, {
9488
9221
  children: [
9489
- /* @__PURE__ */ jsx_runtime21.jsx(Box_default, {
9222
+ /* @__PURE__ */ jsx_runtime22.jsx(Box_default, {
9490
9223
  marginTop: 1,
9491
- children: /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9224
+ children: /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9492
9225
  color: "green",
9493
9226
  children: "ccstatusline-zh 已是最新版本。"
9494
9227
  })
9495
9228
  }),
9496
- /* @__PURE__ */ jsx_runtime21.jsx(List, {
9229
+ /* @__PURE__ */ jsx_runtime22.jsx(List, {
9497
9230
  marginTop: 1,
9498
9231
  items: [{ label: "重新检查", value: "refresh" }],
9499
9232
  onSelect: (value) => {
@@ -9507,26 +9240,26 @@ var UpdateCheckerMenu = ({
9507
9240
  })
9508
9241
  ]
9509
9242
  }),
9510
- state.status === "update-available" && /* @__PURE__ */ jsx_runtime21.jsxs(jsx_runtime21.Fragment, {
9243
+ state.status === "update-available" && /* @__PURE__ */ jsx_runtime22.jsxs(jsx_runtime22.Fragment, {
9511
9244
  children: [
9512
- /* @__PURE__ */ jsx_runtime21.jsx(Box_default, {
9245
+ /* @__PURE__ */ jsx_runtime22.jsx(Box_default, {
9513
9246
  marginTop: 1,
9514
- children: /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9247
+ children: /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9515
9248
  color: "yellow",
9516
9249
  children: "检测到可用更新。"
9517
9250
  })
9518
9251
  }),
9519
- state.installation.method === "auto-update" && /* @__PURE__ */ jsx_runtime21.jsxs(Box_default, {
9252
+ state.installation.method === "auto-update" && /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
9520
9253
  marginTop: 1,
9521
9254
  flexDirection: "column",
9522
9255
  children: [
9523
- /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9256
+ /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9524
9257
  children: "无需手动修改 Claude 配置,因为已使用 @latest 自动跟随。"
9525
9258
  }),
9526
- /* @__PURE__ */ jsx_runtime21.jsx(Text, {
9259
+ /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9527
9260
  children: "下次调用 @latest 时会自动解析到最新版本。"
9528
9261
  }),
9529
- /* @__PURE__ */ jsx_runtime21.jsxs(Text, {
9262
+ /* @__PURE__ */ jsx_runtime22.jsxs(Text, {
9530
9263
  children: [
9531
9264
  "启动新 TUI 的命令:",
9532
9265
  " ",
@@ -9535,7 +9268,7 @@ var UpdateCheckerMenu = ({
9535
9268
  })
9536
9269
  ]
9537
9270
  }),
9538
- state.actions.length > 0 && /* @__PURE__ */ jsx_runtime21.jsx(List, {
9271
+ state.actions.length > 0 && /* @__PURE__ */ jsx_runtime22.jsx(List, {
9539
9272
  marginTop: 1,
9540
9273
  items: getActionItems(state.actions),
9541
9274
  onSelect: (value) => {
@@ -9551,7 +9284,7 @@ var UpdateCheckerMenu = ({
9551
9284
  },
9552
9285
  showBackButton: true
9553
9286
  }),
9554
- state.actions.length === 0 && /* @__PURE__ */ jsx_runtime21.jsx(List, {
9287
+ state.actions.length === 0 && /* @__PURE__ */ jsx_runtime22.jsx(List, {
9555
9288
  marginTop: 1,
9556
9289
  items: [{ label: "重新检查", value: "refresh" }],
9557
9290
  onSelect: (value) => {
@@ -9569,7 +9302,7 @@ var UpdateCheckerMenu = ({
9569
9302
  });
9570
9303
  };
9571
9304
  // src/tui/App.tsx
9572
- var jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9305
+ var jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
9573
9306
  var GITHUB_REPO_URL = "https://github.com/huangguang1999/ccstatusline-zh";
9574
9307
  var NOTICE_ITEMS = [
9575
9308
  {
@@ -9588,22 +9321,22 @@ var FlowNotice = ({
9588
9321
  onContinue();
9589
9322
  }
9590
9323
  });
9591
- return /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
9324
+ return /* @__PURE__ */ jsx_runtime23.jsxs(Box_default, {
9592
9325
  flexDirection: "column",
9593
9326
  children: [
9594
- /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9327
+ /* @__PURE__ */ jsx_runtime23.jsx(Text, {
9595
9328
  bold: true,
9596
9329
  children: title
9597
9330
  }),
9598
- /* @__PURE__ */ jsx_runtime22.jsx(Box_default, {
9331
+ /* @__PURE__ */ jsx_runtime23.jsx(Box_default, {
9599
9332
  marginTop: 1,
9600
- children: /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9333
+ children: /* @__PURE__ */ jsx_runtime23.jsx(Text, {
9601
9334
  color,
9602
9335
  wrap: "wrap",
9603
9336
  children: message
9604
9337
  })
9605
9338
  }),
9606
- /* @__PURE__ */ jsx_runtime22.jsx(List, {
9339
+ /* @__PURE__ */ jsx_runtime23.jsx(List, {
9607
9340
  marginTop: 1,
9608
9341
  items: NOTICE_ITEMS,
9609
9342
  onSelect: () => {
@@ -9643,46 +9376,46 @@ var PinnedVersionMismatchScreen = ({
9643
9376
  onExit();
9644
9377
  }
9645
9378
  });
9646
- return /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
9379
+ return /* @__PURE__ */ jsx_runtime23.jsxs(Box_default, {
9647
9380
  flexDirection: "column",
9648
9381
  children: [
9649
- /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9382
+ /* @__PURE__ */ jsx_runtime23.jsx(Text, {
9650
9383
  bold: true,
9651
- children: "Pinned Install Version Mismatch"
9384
+ children: "固定安装版本不一致"
9652
9385
  }),
9653
- /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
9386
+ /* @__PURE__ */ jsx_runtime23.jsxs(Box_default, {
9654
9387
  marginTop: 1,
9655
9388
  flexDirection: "column",
9656
9389
  children: [
9657
- /* @__PURE__ */ jsx_runtime22.jsxs(Text, {
9390
+ /* @__PURE__ */ jsx_runtime23.jsxs(Text, {
9658
9391
  color: "yellow",
9659
9392
  children: [
9660
- "Claude Code is pinned to ccstatusline-zh v",
9393
+ "Claude Code 固定使用 ccstatusline-zh v",
9661
9394
  mismatch.installedVersion,
9662
- ", but this TUI is v",
9395
+ ",当前配置界面版本为 v",
9663
9396
  mismatch.runningVersion,
9664
- "."
9397
+ "。"
9665
9398
  ]
9666
9399
  }),
9667
- /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9400
+ /* @__PURE__ */ jsx_runtime23.jsx(Text, {
9668
9401
  dimColor: true,
9669
9402
  wrap: "wrap",
9670
- children: "To avoid writing config that the pinned runtime may not support, update the pinned global install or exit and relaunch the pinned version."
9403
+ children: "为避免写入固定版本不支持的配置,请更新全局安装,或退出后重新启动固定版本。"
9671
9404
  })
9672
9405
  ]
9673
9406
  }),
9674
- /* @__PURE__ */ jsx_runtime22.jsx(Box_default, {
9407
+ /* @__PURE__ */ jsx_runtime23.jsx(Box_default, {
9675
9408
  marginTop: 1,
9676
9409
  flexDirection: "column",
9677
- children: /* @__PURE__ */ jsx_runtime22.jsxs(Text, {
9410
+ children: /* @__PURE__ */ jsx_runtime23.jsxs(Text, {
9678
9411
  children: [
9679
- "Current pinned version:",
9412
+ "当前固定版本:",
9680
9413
  " ",
9681
9414
  mismatch.relaunchCommand
9682
9415
  ]
9683
9416
  })
9684
9417
  }),
9685
- /* @__PURE__ */ jsx_runtime22.jsx(List, {
9418
+ /* @__PURE__ */ jsx_runtime23.jsx(List, {
9686
9419
  marginTop: 1,
9687
9420
  items: getPinnedMismatchItems(mismatch, canRunPackageManager),
9688
9421
  onSelect: (value) => {
@@ -10134,7 +9867,7 @@ ${resolutionWarning}`,
10134
9867
  setScreen("main");
10135
9868
  }, [importValidation, settings]);
10136
9869
  if (!settings || !hasLoadedClaudeStatus || !hasLoadedInstalledState) {
10137
- return /* @__PURE__ */ jsx_runtime22.jsx(Text, {
9870
+ return /* @__PURE__ */ jsx_runtime23.jsx(Text, {
10138
9871
  children: "正在加载设置..."
10139
9872
  });
10140
9873
  }
@@ -10348,31 +10081,31 @@ ${GITHUB_REPO_URL}`,
10348
10081
  }
10349
10082
  };
10350
10083
  if (pinnedVersionMismatch) {
10351
- return /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
10084
+ return /* @__PURE__ */ jsx_runtime23.jsxs(Box_default, {
10352
10085
  flexDirection: "column",
10353
10086
  children: [
10354
- /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
10087
+ /* @__PURE__ */ jsx_runtime23.jsxs(Box_default, {
10355
10088
  marginBottom: 1,
10356
10089
  children: [
10357
- /* @__PURE__ */ jsx_runtime22.jsx(Text, {
10090
+ /* @__PURE__ */ jsx_runtime23.jsx(Text, {
10358
10091
  bold: true,
10359
- children: /* @__PURE__ */ jsx_runtime22.jsx(dist_default2, {
10092
+ children: /* @__PURE__ */ jsx_runtime23.jsx(dist_default2, {
10360
10093
  name: "retro",
10361
10094
  children: "CCStatusline Configuration"
10362
10095
  })
10363
10096
  }),
10364
- /* @__PURE__ */ jsx_runtime22.jsx(Text, {
10097
+ /* @__PURE__ */ jsx_runtime23.jsx(Text, {
10365
10098
  bold: true,
10366
10099
  children: ` | ${runningVersion && `v${runningVersion}`}`
10367
10100
  }),
10368
- flashMessage && /* @__PURE__ */ jsx_runtime22.jsx(Text, {
10101
+ flashMessage && /* @__PURE__ */ jsx_runtime23.jsx(Text, {
10369
10102
  color: flashMessage.color,
10370
10103
  bold: true,
10371
10104
  children: ` ${flashMessage.text}`
10372
10105
  })
10373
10106
  ]
10374
10107
  }),
10375
- /* @__PURE__ */ jsx_runtime22.jsx(PinnedVersionMismatchScreen, {
10108
+ /* @__PURE__ */ jsx_runtime23.jsx(PinnedVersionMismatchScreen, {
10376
10109
  mismatch: pinnedVersionMismatch,
10377
10110
  canRunPackageManager: commandAvailability[pinnedVersionMismatch.packageManager],
10378
10111
  onUpdate: () => {
@@ -10396,49 +10129,49 @@ ${GITHUB_REPO_URL}`,
10396
10129
  setScreen("items");
10397
10130
  };
10398
10131
  const configWarning = buildConfigLoadWarning(configLoadError);
10399
- return /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
10132
+ return /* @__PURE__ */ jsx_runtime23.jsxs(Box_default, {
10400
10133
  flexDirection: "column",
10401
10134
  children: [
10402
- /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
10135
+ /* @__PURE__ */ jsx_runtime23.jsxs(Box_default, {
10403
10136
  marginBottom: 1,
10404
10137
  children: [
10405
- /* @__PURE__ */ jsx_runtime22.jsx(Text, {
10138
+ /* @__PURE__ */ jsx_runtime23.jsx(Text, {
10406
10139
  bold: true,
10407
- children: /* @__PURE__ */ jsx_runtime22.jsx(dist_default2, {
10140
+ children: /* @__PURE__ */ jsx_runtime23.jsx(dist_default2, {
10408
10141
  name: "retro",
10409
10142
  children: "CCStatusline 配置"
10410
10143
  })
10411
10144
  }),
10412
- /* @__PURE__ */ jsx_runtime22.jsx(Text, {
10145
+ /* @__PURE__ */ jsx_runtime23.jsx(Text, {
10413
10146
  bold: true,
10414
10147
  children: ` | ${runningVersion && `v${runningVersion}`}`
10415
10148
  }),
10416
- flashMessage && /* @__PURE__ */ jsx_runtime22.jsx(Text, {
10149
+ flashMessage && /* @__PURE__ */ jsx_runtime23.jsx(Text, {
10417
10150
  color: flashMessage.color,
10418
10151
  bold: true,
10419
10152
  children: ` ${flashMessage.text}`
10420
10153
  })
10421
10154
  ]
10422
10155
  }),
10423
- configWarning && /* @__PURE__ */ jsx_runtime22.jsx(Text, {
10156
+ configWarning && /* @__PURE__ */ jsx_runtime23.jsx(Text, {
10424
10157
  color: "red",
10425
10158
  wrap: "wrap",
10426
10159
  children: configWarning
10427
10160
  }),
10428
- isCustomConfigPath() && /* @__PURE__ */ jsx_runtime22.jsx(Text, {
10161
+ isCustomConfigPath() && /* @__PURE__ */ jsx_runtime23.jsx(Text, {
10429
10162
  dimColor: true,
10430
10163
  children: `配置文件:${getConfigPath()}`
10431
10164
  }),
10432
- /* @__PURE__ */ jsx_runtime22.jsx(StatusLinePreview, {
10165
+ /* @__PURE__ */ jsx_runtime23.jsx(StatusLinePreview, {
10433
10166
  lines: settings.lines,
10434
10167
  terminalWidth,
10435
10168
  settings,
10436
10169
  onTruncationChange: setPreviewIsTruncated
10437
10170
  }),
10438
- /* @__PURE__ */ jsx_runtime22.jsxs(Box_default, {
10171
+ /* @__PURE__ */ jsx_runtime23.jsxs(Box_default, {
10439
10172
  marginTop: 1,
10440
10173
  children: [
10441
- screen === "main" && /* @__PURE__ */ jsx_runtime22.jsx(MainMenu, {
10174
+ screen === "main" && /* @__PURE__ */ jsx_runtime23.jsx(MainMenu, {
10442
10175
  onSelect: (value, index) => {
10443
10176
  if (value !== "save" && value !== "exit") {
10444
10177
  setMenuSelections((prev) => ({ ...prev, main: index }));
@@ -10453,7 +10186,7 @@ ${GITHUB_REPO_URL}`,
10453
10186
  installation: effectiveInstallation,
10454
10187
  previewIsTruncated
10455
10188
  }),
10456
- screen === "lines" && /* @__PURE__ */ jsx_runtime22.jsx(LineSelector, {
10189
+ screen === "lines" && /* @__PURE__ */ jsx_runtime23.jsx(LineSelector, {
10457
10190
  lines: settings.lines,
10458
10191
  onSelect: (line) => {
10459
10192
  setMenuSelections((prev) => ({ ...prev, lines: line }));
@@ -10468,7 +10201,7 @@ ${GITHUB_REPO_URL}`,
10468
10201
  title: "选择要编辑组件的行",
10469
10202
  allowEditing: true
10470
10203
  }),
10471
- screen === "items" && /* @__PURE__ */ jsx_runtime22.jsx(ItemsEditor, {
10204
+ screen === "items" && /* @__PURE__ */ jsx_runtime23.jsx(ItemsEditor, {
10472
10205
  widgets: settings.lines[selectedLine] ?? [],
10473
10206
  onUpdate: (widgets) => {
10474
10207
  updateLine(selectedLine, widgets);
@@ -10480,7 +10213,7 @@ ${GITHUB_REPO_URL}`,
10480
10213
  lineNumber: selectedLine + 1,
10481
10214
  settings
10482
10215
  }),
10483
- screen === "colorLines" && /* @__PURE__ */ jsx_runtime22.jsx(LineSelector, {
10216
+ screen === "colorLines" && /* @__PURE__ */ jsx_runtime23.jsx(LineSelector, {
10484
10217
  lines: settings.lines,
10485
10218
  onLinesUpdate: updateLines,
10486
10219
  onSelect: (line) => {
@@ -10498,7 +10231,7 @@ ${GITHUB_REPO_URL}`,
10498
10231
  settings,
10499
10232
  allowEditing: false
10500
10233
  }),
10501
- screen === "colors" && /* @__PURE__ */ jsx_runtime22.jsx(ColorMenu, {
10234
+ screen === "colors" && /* @__PURE__ */ jsx_runtime23.jsx(ColorMenu, {
10502
10235
  widgets: settings.lines[selectedLine] ?? [],
10503
10236
  lineIndex: selectedLine,
10504
10237
  settings,
@@ -10511,7 +10244,7 @@ ${GITHUB_REPO_URL}`,
10511
10244
  setScreen("colorLines");
10512
10245
  }
10513
10246
  }),
10514
- screen === "terminalConfig" && /* @__PURE__ */ jsx_runtime22.jsx(TerminalOptionsMenu, {
10247
+ screen === "terminalConfig" && /* @__PURE__ */ jsx_runtime23.jsx(TerminalOptionsMenu, {
10515
10248
  settings,
10516
10249
  onUpdate: (updatedSettings) => {
10517
10250
  setSettings(updatedSettings);
@@ -10525,7 +10258,7 @@ ${GITHUB_REPO_URL}`,
10525
10258
  }
10526
10259
  }
10527
10260
  }),
10528
- screen === "terminalWidth" && /* @__PURE__ */ jsx_runtime22.jsx(TerminalWidthMenu, {
10261
+ screen === "terminalWidth" && /* @__PURE__ */ jsx_runtime23.jsx(TerminalWidthMenu, {
10529
10262
  settings,
10530
10263
  onUpdate: (updatedSettings) => {
10531
10264
  setSettings(updatedSettings);
@@ -10534,7 +10267,7 @@ ${GITHUB_REPO_URL}`,
10534
10267
  setScreen("terminalConfig");
10535
10268
  }
10536
10269
  }),
10537
- screen === "globalOverrides" && /* @__PURE__ */ jsx_runtime22.jsx(GlobalOverridesMenu, {
10270
+ screen === "globalOverrides" && /* @__PURE__ */ jsx_runtime23.jsx(GlobalOverridesMenu, {
10538
10271
  settings,
10539
10272
  onUpdate: (updatedSettings) => {
10540
10273
  setSettings(updatedSettings);
@@ -10544,7 +10277,7 @@ ${GITHUB_REPO_URL}`,
10544
10277
  setScreen("main");
10545
10278
  }
10546
10279
  }),
10547
- screen === "confirm" && confirmDialog && /* @__PURE__ */ jsx_runtime22.jsx(ConfirmDialog, {
10280
+ screen === "confirm" && confirmDialog && /* @__PURE__ */ jsx_runtime23.jsx(ConfirmDialog, {
10548
10281
  message: confirmDialog.message,
10549
10282
  onConfirm: () => void confirmDialog.action(),
10550
10283
  onCancel: () => {
@@ -10552,14 +10285,14 @@ ${GITHUB_REPO_URL}`,
10552
10285
  setConfirmDialog(null);
10553
10286
  }
10554
10287
  }),
10555
- screen === "flowNotice" && flowNotice && /* @__PURE__ */ jsx_runtime22.jsx(FlowNotice, {
10288
+ screen === "flowNotice" && flowNotice && /* @__PURE__ */ jsx_runtime23.jsx(FlowNotice, {
10556
10289
  ...flowNotice,
10557
10290
  onContinue: () => {
10558
10291
  setScreen(flowNotice.continueScreen);
10559
10292
  setFlowNotice(null);
10560
10293
  }
10561
10294
  }),
10562
- screen === "install" && /* @__PURE__ */ jsx_runtime22.jsx(InstallMenu, {
10295
+ screen === "install" && /* @__PURE__ */ jsx_runtime23.jsx(InstallMenu, {
10563
10296
  commandAvailability,
10564
10297
  currentVersion: getPackageVersion(),
10565
10298
  existingStatusLine,
@@ -10573,7 +10306,7 @@ ${GITHUB_REPO_URL}`,
10573
10306
  onCancel: handleInstallMenuCancel,
10574
10307
  initialPackageSelection: menuSelections.installPackage
10575
10308
  }),
10576
- screen === "manageInstallation" && /* @__PURE__ */ jsx_runtime22.jsx(ManageInstallationMenu, {
10309
+ screen === "manageInstallation" && /* @__PURE__ */ jsx_runtime23.jsx(ManageInstallationMenu, {
10577
10310
  installation: effectiveInstallation,
10578
10311
  activeCommand: activeGlobalCommand,
10579
10312
  onSelect: handleManageInstallationSelect,
@@ -10585,7 +10318,7 @@ ${GITHUB_REPO_URL}`,
10585
10318
  setScreen("main");
10586
10319
  }
10587
10320
  }),
10588
- screen === "uninstallOptions" && /* @__PURE__ */ jsx_runtime22.jsx(UninstallMenu, {
10321
+ screen === "uninstallOptions" && /* @__PURE__ */ jsx_runtime23.jsx(UninstallMenu, {
10589
10322
  installations: globalPackageInstallations,
10590
10323
  onSelect: (selection) => {
10591
10324
  handleUninstallSelection(selection, "uninstallOptions");
@@ -10594,7 +10327,7 @@ ${GITHUB_REPO_URL}`,
10594
10327
  setScreen("manageInstallation");
10595
10328
  }
10596
10329
  }),
10597
- screen === "updates" && /* @__PURE__ */ jsx_runtime22.jsx(UpdateCheckerMenu, {
10330
+ screen === "updates" && /* @__PURE__ */ jsx_runtime23.jsx(UpdateCheckerMenu, {
10598
10331
  state: updateCheckerState,
10599
10332
  onBack: () => {
10600
10333
  setScreen(updatesReturnScreen);
@@ -10602,7 +10335,7 @@ ${GITHUB_REPO_URL}`,
10602
10335
  onRefresh: handleUpdateCheck,
10603
10336
  onRunAction: handleRunUpdateAction
10604
10337
  }),
10605
- screen === "refreshInterval" && /* @__PURE__ */ jsx_runtime22.jsx(RefreshIntervalMenu, {
10338
+ screen === "refreshInterval" && /* @__PURE__ */ jsx_runtime23.jsx(RefreshIntervalMenu, {
10606
10339
  currentInterval: currentRefreshInterval,
10607
10340
  supportsRefreshInterval,
10608
10341
  gitCacheTtlSeconds: settings.gitCacheTtlSeconds,
@@ -10662,7 +10395,7 @@ ${GITHUB_REPO_URL}`,
10662
10395
  setScreen("main");
10663
10396
  }
10664
10397
  }),
10665
- screen === "powerline" && /* @__PURE__ */ jsx_runtime22.jsx(PowerlineSetup, {
10398
+ screen === "powerline" && /* @__PURE__ */ jsx_runtime23.jsx(PowerlineSetup, {
10666
10399
  settings,
10667
10400
  powerlineFontStatus,
10668
10401
  onUpdate: (updatedSettings) => {
@@ -10689,7 +10422,7 @@ ${GITHUB_REPO_URL}`,
10689
10422
  setFontInstallMessage(null);
10690
10423
  }
10691
10424
  }),
10692
- screen === "exportConfig" && /* @__PURE__ */ jsx_runtime22.jsx(ExportConfigDialog, {
10425
+ screen === "exportConfig" && /* @__PURE__ */ jsx_runtime23.jsx(ExportConfigDialog, {
10693
10426
  onExport: (filePath) => {
10694
10427
  handleExportConfig(filePath);
10695
10428
  },
@@ -10697,7 +10430,7 @@ ${GITHUB_REPO_URL}`,
10697
10430
  setScreen("main");
10698
10431
  }
10699
10432
  }),
10700
- screen === "importConfig" && /* @__PURE__ */ jsx_runtime22.jsx(ImportConfigDialog, {
10433
+ screen === "importConfig" && /* @__PURE__ */ jsx_runtime23.jsx(ImportConfigDialog, {
10701
10434
  onFileChosen: (filePath) => {
10702
10435
  handleImportFileChosen(filePath);
10703
10436
  },
@@ -10705,7 +10438,7 @@ ${GITHUB_REPO_URL}`,
10705
10438
  setScreen("main");
10706
10439
  }
10707
10440
  }),
10708
- screen === "importPreview" && importValidation?.status === "valid" && /* @__PURE__ */ jsx_runtime22.jsx(ImportPreviewDialog, {
10441
+ screen === "importPreview" && importValidation?.status === "valid" && /* @__PURE__ */ jsx_runtime23.jsx(ImportPreviewDialog, {
10709
10442
  validation: importValidation,
10710
10443
  currentSettings: settings,
10711
10444
  onApply: (mode) => {
@@ -10723,7 +10456,7 @@ ${GITHUB_REPO_URL}`,
10723
10456
  };
10724
10457
  function runTUI() {
10725
10458
  process.stdout.write("\x1B[2J\x1B[H");
10726
- render_default(/* @__PURE__ */ jsx_runtime22.jsx(App, {}));
10459
+ render_default(/* @__PURE__ */ jsx_runtime23.jsx(App, {}));
10727
10460
  }
10728
10461
  export {
10729
10462
  runTUI