snow-ai 0.5.11 → 0.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle/cli.mjs CHANGED
@@ -1263,7 +1263,7 @@ var require_react_development = __commonJS({
1263
1263
  throw payload._result;
1264
1264
  }
1265
1265
  }
1266
- function lazy3(ctor2) {
1266
+ function lazy4(ctor2) {
1267
1267
  var payload = {
1268
1268
  // We use these fields to store the result.
1269
1269
  _status: Uninitialized,
@@ -1421,7 +1421,7 @@ var require_react_development = __commonJS({
1421
1421
  }
1422
1422
  return dispatcher.useContext(Context);
1423
1423
  }
1424
- function useState55(initialState) {
1424
+ function useState56(initialState) {
1425
1425
  var dispatcher = resolveDispatcher();
1426
1426
  return dispatcher.useState(initialState);
1427
1427
  }
@@ -1433,7 +1433,7 @@ var require_react_development = __commonJS({
1433
1433
  var dispatcher = resolveDispatcher();
1434
1434
  return dispatcher.useRef(initialValue);
1435
1435
  }
1436
- function useEffect48(create3, deps) {
1436
+ function useEffect50(create3, deps) {
1437
1437
  var dispatcher = resolveDispatcher();
1438
1438
  return dispatcher.useEffect(create3, deps);
1439
1439
  }
@@ -1445,11 +1445,11 @@ var require_react_development = __commonJS({
1445
1445
  var dispatcher = resolveDispatcher();
1446
1446
  return dispatcher.useLayoutEffect(create3, deps);
1447
1447
  }
1448
- function useCallback39(callback, deps) {
1448
+ function useCallback40(callback, deps) {
1449
1449
  var dispatcher = resolveDispatcher();
1450
1450
  return dispatcher.useCallback(callback, deps);
1451
1451
  }
1452
- function useMemo27(create3, deps) {
1452
+ function useMemo28(create3, deps) {
1453
1453
  var dispatcher = resolveDispatcher();
1454
1454
  return dispatcher.useMemo(create3, deps);
1455
1455
  }
@@ -2208,23 +2208,23 @@ var require_react_development = __commonJS({
2208
2208
  exports2.createRef = createRef;
2209
2209
  exports2.forwardRef = forwardRef3;
2210
2210
  exports2.isValidElement = isValidElement2;
2211
- exports2.lazy = lazy3;
2211
+ exports2.lazy = lazy4;
2212
2212
  exports2.memo = memo6;
2213
2213
  exports2.startTransition = startTransition;
2214
2214
  exports2.unstable_act = act;
2215
- exports2.useCallback = useCallback39;
2215
+ exports2.useCallback = useCallback40;
2216
2216
  exports2.useContext = useContext13;
2217
2217
  exports2.useDebugValue = useDebugValue;
2218
2218
  exports2.useDeferredValue = useDeferredValue;
2219
- exports2.useEffect = useEffect48;
2219
+ exports2.useEffect = useEffect50;
2220
2220
  exports2.useId = useId;
2221
2221
  exports2.useImperativeHandle = useImperativeHandle2;
2222
2222
  exports2.useInsertionEffect = useInsertionEffect;
2223
2223
  exports2.useLayoutEffect = useLayoutEffect2;
2224
- exports2.useMemo = useMemo27;
2224
+ exports2.useMemo = useMemo28;
2225
2225
  exports2.useReducer = useReducer8;
2226
2226
  exports2.useRef = useRef13;
2227
- exports2.useState = useState55;
2227
+ exports2.useState = useState56;
2228
2228
  exports2.useSyncExternalStore = useSyncExternalStore;
2229
2229
  exports2.useTransition = useTransition;
2230
2230
  exports2.version = ReactVersion;
@@ -9928,9 +9928,9 @@ var require_react_reconciler_development = __commonJS({
9928
9928
  module2.exports = function $$$reconciler($$$hostConfig) {
9929
9929
  var exports3 = {};
9930
9930
  "use strict";
9931
- var React87 = require_react();
9931
+ var React88 = require_react();
9932
9932
  var Scheduler2 = require_scheduler();
9933
- var ReactSharedInternals = React87.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9933
+ var ReactSharedInternals = React88.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9934
9934
  var suppressWarning = false;
9935
9935
  function setSuppressWarning(newSuppressWarning) {
9936
9936
  {
@@ -45515,7 +45515,7 @@ var require_jsonfile = __commonJS({
45515
45515
  callback(null, obj2);
45516
45516
  });
45517
45517
  }
45518
- function readFileSync19(file, options3) {
45518
+ function readFileSync20(file, options3) {
45519
45519
  options3 = options3 || {};
45520
45520
  if (typeof options3 === "string") {
45521
45521
  options3 = { encoding: options3 };
@@ -45568,7 +45568,7 @@ var require_jsonfile = __commonJS({
45568
45568
  }
45569
45569
  fs40.writeFile(file, str2, options3, callback);
45570
45570
  }
45571
- function writeFileSync13(file, obj2, options3) {
45571
+ function writeFileSync14(file, obj2, options3) {
45572
45572
  options3 = options3 || {};
45573
45573
  var fs40 = options3.fs || _fs;
45574
45574
  var str2 = stringify2(obj2, options3);
@@ -45581,9 +45581,9 @@ var require_jsonfile = __commonJS({
45581
45581
  }
45582
45582
  var jsonfile = {
45583
45583
  readFile: readFile3,
45584
- readFileSync: readFileSync19,
45584
+ readFileSync: readFileSync20,
45585
45585
  writeFile: writeFile4,
45586
- writeFileSync: writeFileSync13
45586
+ writeFileSync: writeFileSync14
45587
45587
  };
45588
45588
  module2.exports = jsonfile;
45589
45589
  }
@@ -79585,10 +79585,21 @@ var init_en = __esm({
79585
79585
  todo: "Search and select TODO comments from project files",
79586
79586
  addDir: "Add working directory for multi-project context. Usage: /add-dir or /add-dir path",
79587
79587
  reindex: "Rebuild codebase index, detect changed, deleted, new and modified files",
79588
+ permissions: "Manage always-approved tools permissions",
79588
79589
  vulnerabilityHunting: "Toggle vulnerability hunting mode for security-focused code analysis",
79589
79590
  quit: "Exit the application"
79590
79591
  }
79591
79592
  },
79593
+ permissionsPanel: {
79594
+ title: "Permissions",
79595
+ clearAll: "Clear All",
79596
+ noTools: "No tools are always approved",
79597
+ hint: "\u2191\u2193 navigate \u2022 Enter remove \u2022 ESC close",
79598
+ confirmDelete: "Delete allowed tool?",
79599
+ confirmClearAll: "Clear all permissions?",
79600
+ yes: "Yes",
79601
+ no: "No"
79602
+ },
79592
79603
  profilePanel: {
79593
79604
  title: "Select Profile",
79594
79605
  scrollHint: "\u2191\u2193 to scroll",
@@ -80464,10 +80475,21 @@ var init_zh = __esm({
80464
80475
  todo: "\u4ECE\u9879\u76EE\u6587\u4EF6\u641C\u7D22\u5E76\u9009\u62E9 TODO \u6CE8\u91CA",
80465
80476
  addDir: "\u6DFB\u52A0\u5DE5\u4F5C\u76EE\u5F55\u4EE5\u652F\u6301\u591A\u9879\u76EE\u4E0A\u4E0B\u6587\u3002\u7528\u6CD5: /add-dir \u6216 /add-dir \u8DEF\u5F84",
80466
80477
  reindex: "\u91CD\u5EFA\u4EE3\u7801\u5E93\u7D22\u5F15\uFF0C\u68C0\u6D4B\u53D8\u66F4\u3001\u5220\u9664\u3001\u65B0\u589E\u548C\u4FEE\u6539\u7684\u6587\u4EF6",
80478
+ permissions: "\u7BA1\u7406\u59CB\u7EC8\u6279\u51C6\u7684\u5DE5\u5177\u6743\u9650",
80467
80479
  vulnerabilityHunting: "\u5207\u6362\u6F0F\u6D1E\u68C0\u67E5\u6A21\u5F0F\uFF0C\u8FDB\u884C\u5B89\u5168\u6027\u4EE3\u7801\u5206\u6790",
80468
80480
  quit: "\u9000\u51FA\u5E94\u7528\u7A0B\u5E8F"
80469
80481
  }
80470
80482
  },
80483
+ permissionsPanel: {
80484
+ title: "\u6743\u9650",
80485
+ clearAll: "\u5168\u90E8\u6E05\u9664",
80486
+ noTools: "\u6682\u65E0\u59CB\u7EC8\u6279\u51C6\u7684\u5DE5\u5177",
80487
+ hint: "\u2191\u2193 \u5BFC\u822A \u2022 Enter \u79FB\u9664 \u2022 ESC \u5173\u95ED",
80488
+ confirmDelete: "\u5220\u9664\u5DF2\u6279\u51C6\u7684\u5DE5\u5177\uFF1F",
80489
+ confirmClearAll: "\u6E05\u9664\u5168\u90E8\u6743\u9650\uFF1F",
80490
+ yes: "\u662F",
80491
+ no: "\u5426"
80492
+ },
80471
80493
  profilePanel: {
80472
80494
  title: "\u9009\u62E9\u914D\u7F6E",
80473
80495
  scrollHint: "\u2191\u2193 \u6EDA\u52A8",
@@ -81343,10 +81365,21 @@ var init_zh_TW = __esm({
81343
81365
  todo: "\u5F9E\u5C08\u6848\u6A94\u6848\u641C\u5C0B\u4E26\u9078\u64C7 TODO \u8A3B\u91CB",
81344
81366
  addDir: "\u65B0\u589E\u5DE5\u4F5C\u76EE\u9304\u4EE5\u652F\u63F4\u591A\u5C08\u6848\u4E0A\u4E0B\u6587\u3002\u7528\u6CD5: /add-dir \u6216 /add-dir \u8DEF\u5F91",
81345
81367
  reindex: "\u91CD\u5EFA\u4EE3\u78BC\u5EAB\u7D22\u5F15\uFF0C\u6AA2\u6E2C\u8B8A\u66F4\u3001\u522A\u9664\u3001\u65B0\u589E\u548C\u4FEE\u6539\u7684\u6A94\u6848",
81368
+ permissions: "\u7BA1\u7406\u6C38\u9060\u5141\u8A31\u7684\u5DE5\u5177\u6B0A\u9650",
81346
81369
  vulnerabilityHunting: "\u5207\u63DB\u6F0F\u6D1E\u6AA2\u67E5\u6A21\u5F0F\uFF0C\u9032\u884C\u5B89\u5168\u6027\u4EE3\u78BC\u5206\u6790",
81347
81370
  quit: "\u9000\u51FA\u61C9\u7528\u7A0B\u5F0F"
81348
81371
  }
81349
81372
  },
81373
+ permissionsPanel: {
81374
+ title: "\u6B0A\u9650",
81375
+ clearAll: "\u5168\u90E8\u6E05\u9664",
81376
+ noTools: "\u76EE\u524D\u6C92\u6709\u5DE5\u5177\u88AB\u6C38\u9060\u5141\u8A31",
81377
+ hint: "\u2191\u2193 \u5C0E\u822A \u2022 Enter \u79FB\u9664 \u2022 ESC \u95DC\u9589",
81378
+ confirmDelete: "\u522A\u9664\u5DF2\u6279\u51C6\u7684\u5DE5\u5177\uFF1F",
81379
+ confirmClearAll: "\u6E05\u9664\u5168\u90E8\u6B0A\u9650\uFF1F",
81380
+ yes: "\u662F",
81381
+ no: "\u5426"
81382
+ },
81350
81383
  profilePanel: {
81351
81384
  title: "\u9078\u64C7\u8A2D\u5B9A\u6A94",
81352
81385
  scrollHint: "\u2191\u2193 \u6372\u52D5",
@@ -82217,10 +82250,21 @@ var init_ja = __esm({
82217
82250
  todo: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30D5\u30A1\u30A4\u30EB\u304B\u3089TODO\u30B3\u30E1\u30F3\u30C8\u3092\u691C\u7D22\u3057\u3066\u9078\u629E",
82218
82251
  addDir: "\u30DE\u30EB\u30C1\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u305F\u3081\u306E\u4F5C\u696D\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u8FFD\u52A0\u3002\u4F7F\u7528\u65B9\u6CD5: /add-dir \u307E\u305F\u306F /add-dir \u30D1\u30B9",
82219
82252
  reindex: "\u30B3\u30FC\u30C9\u30D9\u30FC\u30B9\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3092\u518D\u69CB\u7BC9\u3001\u5909\u66F4\u3001\u524A\u9664\u3001\u65B0\u898F\u3001\u4FEE\u6B63\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u51FA",
82253
+ permissions: "\u5E38\u306B\u627F\u8A8D\u3055\u308C\u308B\u30C4\u30FC\u30EB\u306E\u6A29\u9650\u3092\u7BA1\u7406",
82220
82254
  vulnerabilityHunting: "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u91CD\u8996\u306E\u30B3\u30FC\u30C9\u5206\u6790\u306E\u305F\u3081\u306E\u8106\u5F31\u6027\u30CF\u30F3\u30C6\u30A3\u30F3\u30B0\u30E2\u30FC\u30C9\u3092\u5207\u308A\u66FF\u3048",
82221
82255
  quit: "\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u7D42\u4E86"
82222
82256
  }
82223
82257
  },
82258
+ permissionsPanel: {
82259
+ title: "\u6A29\u9650",
82260
+ clearAll: "\u3059\u3079\u3066\u30AF\u30EA\u30A2",
82261
+ noTools: "\u5E38\u306B\u627F\u8A8D\u3055\u308C\u3066\u3044\u308B\u30C4\u30FC\u30EB\u306F\u3042\u308A\u307E\u305B\u3093",
82262
+ hint: "\u2191\u2193\u3067\u79FB\u52D5 \u2022 Enter\u3067\u524A\u9664 \u2022 ESC\u3067\u9589\u3058\u308B",
82263
+ confirmDelete: "\u8A31\u53EF\u3055\u308C\u305F\u30C4\u30FC\u30EB\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
82264
+ confirmClearAll: "\u3059\u3079\u3066\u306E\u6A29\u9650\u3092\u30AF\u30EA\u30A2\u3057\u307E\u3059\u304B\uFF1F",
82265
+ yes: "\u306F\u3044",
82266
+ no: "\u3044\u3044\u3048"
82267
+ },
82224
82268
  profilePanel: {
82225
82269
  title: "\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u9078\u629E",
82226
82270
  scrollHint: "\u2191\u2193 \u3067\u30B9\u30AF\u30ED\u30FC\u30EB",
@@ -83091,10 +83135,21 @@ var init_ko = __esm({
83091
83135
  todo: "\uD504\uB85C\uC81D\uD2B8 \uD30C\uC77C\uC5D0\uC11C TODO \uC8FC\uC11D \uAC80\uC0C9 \uBC0F \uC120\uD0DD",
83092
83136
  addDir: "\uB2E4\uC911 \uD504\uB85C\uC81D\uD2B8 \uCEE8\uD14D\uC2A4\uD2B8\uB97C \uC704\uD55C \uC791\uC5C5 \uB514\uB809\uD130\uB9AC \uCD94\uAC00. \uC0AC\uC6A9\uBC95: /add-dir \uB610\uB294 /add-dir \uACBD\uB85C",
83093
83137
  reindex: "\uCF54\uB4DC\uBCA0\uC774\uC2A4 \uC778\uB371\uC2A4 \uC7AC\uAD6C\uCD95, \uBCC0\uACBD\xB7\uC0AD\uC81C\xB7\uC2E0\uADDC\xB7\uC218\uC815\uB41C \uD30C\uC77C \uAC10\uC9C0",
83138
+ permissions: "\uD56D\uC0C1 \uC2B9\uC778\uB418\uB294 \uB3C4\uAD6C \uAD8C\uD55C \uAD00\uB9AC",
83094
83139
  vulnerabilityHunting: "\uBCF4\uC548 \uC911\uC2EC \uCF54\uB4DC \uBD84\uC11D\uC744 \uC704\uD55C \uCDE8\uC57D\uC810 \uD5CC\uD305 \uBAA8\uB4DC \uC804\uD658",
83095
83140
  quit: "\uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC885\uB8CC"
83096
83141
  }
83097
83142
  },
83143
+ permissionsPanel: {
83144
+ title: "\uAD8C\uD55C",
83145
+ clearAll: "\uBAA8\uB450 \uC9C0\uC6B0\uAE30",
83146
+ noTools: "\uD56D\uC0C1 \uC2B9\uC778\uB41C \uB3C4\uAD6C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
83147
+ hint: "\u2191\u2193 \uC774\uB3D9 \u2022 Enter \uC81C\uAC70 \u2022 ESC \uB2EB\uAE30",
83148
+ confirmDelete: "\uD5C8\uC6A9\uB41C \uB3C4\uAD6C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",
83149
+ confirmClearAll: "\uBAA8\uB4E0 \uAD8C\uD55C\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",
83150
+ yes: "\uC608",
83151
+ no: "\uC544\uB2C8\uC624"
83152
+ },
83098
83153
  profilePanel: {
83099
83154
  title: "\uD504\uB85C\uD544 \uC120\uD0DD",
83100
83155
  scrollHint: "\u2191\u2193 \uC2A4\uD06C\uB864",
@@ -83965,10 +84020,21 @@ var init_es = __esm({
83965
84020
  todo: "Buscar y seleccionar comentarios TODO de archivos del proyecto",
83966
84021
  addDir: "Agregar directorio de trabajo para contexto multi-proyecto. Uso: /add-dir o /add-dir ruta",
83967
84022
  reindex: "Reconstruir \xEDndice de c\xF3digo, detectar archivos modificados, eliminados, nuevos y cambiados",
84023
+ permissions: "Administrar permisos de herramientas siempre aprobadas",
83968
84024
  vulnerabilityHunting: "Alternar modo de b\xFAsqueda de vulnerabilidades para an\xE1lisis de c\xF3digo enfocado en seguridad",
83969
84025
  quit: "Salir de la aplicaci\xF3n"
83970
84026
  }
83971
84027
  },
84028
+ permissionsPanel: {
84029
+ title: "Permisos",
84030
+ clearAll: "Borrar todo",
84031
+ noTools: "No hay herramientas siempre aprobadas",
84032
+ hint: "\u2191\u2193 navegar \u2022 Enter eliminar \u2022 ESC cerrar",
84033
+ confirmDelete: "\xBFEliminar herramienta permitida?",
84034
+ confirmClearAll: "\xBFBorrar todos los permisos?",
84035
+ yes: "S\xED",
84036
+ no: "No"
84037
+ },
83972
84038
  profilePanel: {
83973
84039
  title: "Seleccionar perfil",
83974
84040
  scrollHint: "\u2191\u2193 para desplazarse",
@@ -85129,7 +85195,7 @@ var require_react_is_development = __commonJS({
85129
85195
  var Portal = REACT_PORTAL_TYPE;
85130
85196
  var Profiler = REACT_PROFILER_TYPE;
85131
85197
  var StrictMode = REACT_STRICT_MODE_TYPE;
85132
- var Suspense6 = REACT_SUSPENSE_TYPE;
85198
+ var Suspense7 = REACT_SUSPENSE_TYPE;
85133
85199
  var hasWarnedAboutDeprecatedIsAsyncMode = false;
85134
85200
  function isAsyncMode(object2) {
85135
85201
  {
@@ -85188,7 +85254,7 @@ var require_react_is_development = __commonJS({
85188
85254
  exports2.Portal = Portal;
85189
85255
  exports2.Profiler = Profiler;
85190
85256
  exports2.StrictMode = StrictMode;
85191
- exports2.Suspense = Suspense6;
85257
+ exports2.Suspense = Suspense7;
85192
85258
  exports2.isAsyncMode = isAsyncMode;
85193
85259
  exports2.isConcurrentMode = isConcurrentMode;
85194
85260
  exports2.isContextConsumer = isContextConsumer;
@@ -106361,7 +106427,7 @@ var require_doc = __commonJS({
106361
106427
  type: "cursor",
106362
106428
  placeholder: Symbol("cursor")
106363
106429
  };
106364
- function join28(sep, arr) {
106430
+ function join29(sep, arr) {
106365
106431
  const res = [];
106366
106432
  for (let i = 0; i < arr.length; i++) {
106367
106433
  if (i !== 0) {
@@ -106391,7 +106457,7 @@ var require_doc = __commonJS({
106391
106457
  }
106392
106458
  module22.exports = {
106393
106459
  concat: concat2,
106394
- join: join28,
106460
+ join: join29,
106395
106461
  line,
106396
106462
  softline,
106397
106463
  hardline,
@@ -106583,7 +106649,7 @@ var require_doc = __commonJS({
106583
106649
  var getLast = require_get_last();
106584
106650
  var {
106585
106651
  literalline,
106586
- join: join28
106652
+ join: join29
106587
106653
  } = require_doc_builders();
106588
106654
  var isConcat = (doc) => Array.isArray(doc) || doc && doc.type === "concat";
106589
106655
  var getDocParts = (doc) => {
@@ -106896,7 +106962,7 @@ var require_doc = __commonJS({
106896
106962
  }
106897
106963
  function replaceTextEndOfLine(text2) {
106898
106964
  let replacement = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : literalline;
106899
- return join28(replacement, text2.split("\n")).parts;
106965
+ return join29(replacement, text2.split("\n")).parts;
106900
106966
  }
106901
106967
  function canBreakFn(doc) {
106902
106968
  if (doc.type === "line") {
@@ -115866,7 +115932,7 @@ ${error.message}`;
115866
115932
  value: true
115867
115933
  });
115868
115934
  exports22.readFile = readFile3;
115869
- exports22.readFileSync = readFileSync19;
115935
+ exports22.readFileSync = readFileSync20;
115870
115936
  var _fs = _interopRequireDefault(__require("fs"));
115871
115937
  function _interopRequireDefault(obj2) {
115872
115938
  return obj2 && obj2.__esModule ? obj2 : {
@@ -115896,7 +115962,7 @@ ${error.message}`;
115896
115962
  throw error;
115897
115963
  }
115898
115964
  }
115899
- function readFileSync19(filepath, options3 = {}) {
115965
+ function readFileSync20(filepath, options3 = {}) {
115900
115966
  const throwNotFound = options3.throwNotFound === true;
115901
115967
  try {
115902
115968
  const content = _fs.default.readFileSync(filepath, "utf8");
@@ -116283,7 +116349,7 @@ ${error.message}`;
116283
116349
  var path48 = __require("path");
116284
116350
  var fs40 = __require("fs");
116285
116351
  var exists = fs40.exists || path48.exists;
116286
- var existsSync24 = fs40.existsSync || path48.existsSync;
116352
+ var existsSync25 = fs40.existsSync || path48.existsSync;
116287
116353
  function splitPath(path210) {
116288
116354
  var parts = path210.split(/(\/|\\)/);
116289
116355
  if (!parts.length)
@@ -116308,7 +116374,7 @@ ${error.message}`;
116308
116374
  if (parts.length === 0)
116309
116375
  return null;
116310
116376
  var p = parts.join("");
116311
- var itdoes = existsSync24(path48.join(p, clue));
116377
+ var itdoes = existsSync25(path48.join(p, clue));
116312
116378
  return itdoes ? p : testDir(parts.slice(0, -1));
116313
116379
  }
116314
116380
  return testDir(splitPath(currentFullPath));
@@ -217221,7 +217287,7 @@ var require_prettier = __commonJS({
217221
217287
  tokenize: function tokenize5(value) {
217222
217288
  return value.split("");
217223
217289
  },
217224
- join: function join28(chars) {
217290
+ join: function join29(chars) {
217225
217291
  return chars.join("");
217226
217292
  }
217227
217293
  };
@@ -223140,7 +223206,7 @@ ${frame}`;
223140
223206
  breakParent,
223141
223207
  indent,
223142
223208
  lineSuffix,
223143
- join: join28,
223209
+ join: join29,
223144
223210
  cursor: cursor4
223145
223211
  }
223146
223212
  } = require_doc();
@@ -223522,9 +223588,9 @@ ${frame}`;
223522
223588
  return "";
223523
223589
  }
223524
223590
  if (sameIndent) {
223525
- return join28(hardline, parts);
223591
+ return join29(hardline, parts);
223526
223592
  }
223527
- return indent([hardline, join28(hardline, parts)]);
223593
+ return indent([hardline, join29(hardline, parts)]);
223528
223594
  }
223529
223595
  function printCommentsSeparately(path48, options3, ignored) {
223530
223596
  const value = path48.getValue();
@@ -231073,8 +231139,8 @@ ${error.message}`;
231073
231139
  }
231074
231140
  return x;
231075
231141
  };
231076
- var defaultReadPackageSync = function defaultReadPackageSync2(readFileSync19, pkgfile) {
231077
- var body = readFileSync19(pkgfile);
231142
+ var defaultReadPackageSync = function defaultReadPackageSync2(readFileSync20, pkgfile) {
231143
+ var body = readFileSync20(pkgfile);
231078
231144
  try {
231079
231145
  var pkg = JSON.parse(body);
231080
231146
  return pkg;
@@ -231094,7 +231160,7 @@ ${error.message}`;
231094
231160
  }
231095
231161
  var opts = normalizeOptions(x, options3);
231096
231162
  var isFile = opts.isFile || defaultIsFile;
231097
- var readFileSync19 = opts.readFileSync || fs40.readFileSync;
231163
+ var readFileSync20 = opts.readFileSync || fs40.readFileSync;
231098
231164
  var isDirectory = opts.isDirectory || defaultIsDir;
231099
231165
  var realpathSync = opts.realpathSync || defaultRealpathSync;
231100
231166
  var readPackageSync2 = opts.readPackageSync || defaultReadPackageSync;
@@ -231156,7 +231222,7 @@ ${error.message}`;
231156
231222
  if (!isFile(pkgfile)) {
231157
231223
  return loadpkg(path48.dirname(dir));
231158
231224
  }
231159
- var pkg = readPackageSync2(readFileSync19, pkgfile);
231225
+ var pkg = readPackageSync2(readFileSync20, pkgfile);
231160
231226
  if (pkg && opts.packageFilter) {
231161
231227
  pkg = opts.packageFilter(pkg, dir);
231162
231228
  }
@@ -231169,7 +231235,7 @@ ${error.message}`;
231169
231235
  var pkgfile = path48.join(maybeRealpathSync(realpathSync, x2, opts), "/package.json");
231170
231236
  if (isFile(pkgfile)) {
231171
231237
  try {
231172
- var pkg = readPackageSync2(readFileSync19, pkgfile);
231238
+ var pkg = readPackageSync2(readFileSync20, pkgfile);
231173
231239
  } catch (e) {
231174
231240
  }
231175
231241
  if (pkg && opts.packageFilter) {
@@ -237869,7 +237935,7 @@ ${fromBody}`;
237869
237935
  } = require_util15();
237870
237936
  var {
237871
237937
  builders: {
237872
- join: join28,
237938
+ join: join29,
237873
237939
  hardline,
237874
237940
  softline,
237875
237941
  group: group2,
@@ -237982,7 +238048,7 @@ ${fromBody}`;
237982
238048
  maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth(cell));
237983
238049
  }
237984
238050
  }
237985
- parts.push(lineSuffixBoundary, "`", indent([hardline, join28(hardline, table2.map((row) => join28(" | ", row.cells.map((cell, index) => row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth(cell))))))]), hardline, "`");
238051
+ parts.push(lineSuffixBoundary, "`", indent([hardline, join29(hardline, table2.map((row) => join29(" | ", row.cells.map((cell, index) => row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth(cell))))))]), hardline, "`");
237986
238052
  return parts;
237987
238053
  }
237988
238054
  }
@@ -238126,7 +238192,7 @@ ${fromBody}`;
238126
238192
  var {
238127
238193
  builders: {
238128
238194
  indent,
238129
- join: join28,
238195
+ join: join29,
238130
238196
  hardline
238131
238197
  }
238132
238198
  } = require_doc();
@@ -238182,7 +238248,7 @@ ${fromBody}`;
238182
238248
  parts.push(expressionDoc);
238183
238249
  }
238184
238250
  }
238185
- return ["`", indent([hardline, join28(hardline, parts)]), hardline, "`"];
238251
+ return ["`", indent([hardline, join29(hardline, parts)]), hardline, "`"];
238186
238252
  }
238187
238253
  function printGraphqlComments(lines) {
238188
238254
  const parts = [];
@@ -238199,7 +238265,7 @@ ${fromBody}`;
238199
238265
  }
238200
238266
  seenComment = true;
238201
238267
  }
238202
- return parts.length === 0 ? null : join28(hardline, parts);
238268
+ return parts.length === 0 ? null : join29(hardline, parts);
238203
238269
  }
238204
238270
  module22.exports = format4;
238205
238271
  }
@@ -239859,7 +239925,7 @@ ${fromBody}`;
239859
239925
  "use strict";
239860
239926
  var {
239861
239927
  builders: {
239862
- join: join28,
239928
+ join: join29,
239863
239929
  line,
239864
239930
  group: group2,
239865
239931
  softline,
@@ -239876,7 +239942,7 @@ ${fromBody}`;
239876
239942
  }
239877
239943
  if (options3.__isVueForBindingLeft) {
239878
239944
  return path48.call((functionDeclarationPath) => {
239879
- const printed = join28([",", line], functionDeclarationPath.map(print, "params"));
239945
+ const printed = join29([",", line], functionDeclarationPath.map(print, "params"));
239880
239946
  const {
239881
239947
  params
239882
239948
  } = functionDeclarationPath.getValue();
@@ -239887,7 +239953,7 @@ ${fromBody}`;
239887
239953
  }, "program", "body", 0);
239888
239954
  }
239889
239955
  if (options3.__isVueBindings) {
239890
- return path48.call((functionDeclarationPath) => join28([",", line], functionDeclarationPath.map(print, "params")), "program", "body", 0);
239956
+ return path48.call((functionDeclarationPath) => join29([",", line], functionDeclarationPath.map(print, "params")), "program", "body", 0);
239891
239957
  }
239892
239958
  }
239893
239959
  function isVueEventBindingExpression(node) {
@@ -239923,7 +239989,7 @@ ${fromBody}`;
239923
239989
  } = require_util15();
239924
239990
  var {
239925
239991
  builders: {
239926
- join: join28,
239992
+ join: join29,
239927
239993
  line,
239928
239994
  softline,
239929
239995
  group: group2,
@@ -240005,7 +240071,7 @@ ${fromBody}`;
240005
240071
  const shouldInline = shouldInlineLogicalExpression(node);
240006
240072
  const lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options3.parser === "__vue_expression") && !hasLeadingOwnLineComment(options3.originalText, node.right);
240007
240073
  const operator = node.type === "NGPipeExpression" ? "|" : node.operator;
240008
- const rightSuffix = node.type === "NGPipeExpression" && node.arguments.length > 0 ? group2(indent([line, ": ", join28([line, ": "], path48.map(print, "arguments").map((arg) => align(2, group2(arg))))])) : "";
240074
+ const rightSuffix = node.type === "NGPipeExpression" && node.arguments.length > 0 ? group2(indent([line, ": ", join29([line, ": "], path48.map(print, "arguments").map((arg) => align(2, group2(arg))))])) : "";
240009
240075
  let right;
240010
240076
  if (shouldInline) {
240011
240077
  right = [operator, " ", print("right"), rightSuffix];
@@ -240055,7 +240121,7 @@ ${fromBody}`;
240055
240121
  "use strict";
240056
240122
  var {
240057
240123
  builders: {
240058
- join: join28,
240124
+ join: join29,
240059
240125
  line,
240060
240126
  group: group2
240061
240127
  }
@@ -240079,7 +240145,7 @@ ${fromBody}`;
240079
240145
  case "NGPipeExpression":
240080
240146
  return printBinaryishExpression(path48, options3, print);
240081
240147
  case "NGChainedExpression":
240082
- return group2(join28([";", line], path48.map((childPath) => hasNgSideEffect(childPath) ? print() : ["(", print(), ")"], "expressions")));
240148
+ return group2(join29([";", line], path48.map((childPath) => hasNgSideEffect(childPath) ? print() : ["(", print(), ")"], "expressions")));
240083
240149
  case "NGEmptyExpression":
240084
240150
  return "";
240085
240151
  case "NGQuotedExpression":
@@ -240143,7 +240209,7 @@ ${fromBody}`;
240143
240209
  fill,
240144
240210
  ifBreak,
240145
240211
  lineSuffixBoundary,
240146
- join: join28
240212
+ join: join29
240147
240213
  },
240148
240214
  utils: {
240149
240215
  willBreak
@@ -240481,9 +240547,9 @@ ${fromBody}`;
240481
240547
  case "JSXIdentifier":
240482
240548
  return String(node.name);
240483
240549
  case "JSXNamespacedName":
240484
- return join28(":", [print("namespace"), print("name")]);
240550
+ return join29(":", [print("namespace"), print("name")]);
240485
240551
  case "JSXMemberExpression":
240486
- return join28(".", [print("object"), print("property")]);
240552
+ return join29(".", [print("object"), print("property")]);
240487
240553
  case "JSXSpreadAttribute":
240488
240554
  return printJsxSpreadAttribute(path48, options3, print);
240489
240555
  case "JSXSpreadChild": {
@@ -240690,7 +240756,7 @@ ${fromBody}`;
240690
240756
  type: "cursor",
240691
240757
  placeholder: Symbol("cursor")
240692
240758
  };
240693
- function join28(sep, arr) {
240759
+ function join29(sep, arr) {
240694
240760
  const res = [];
240695
240761
  for (let i = 0; i < arr.length; i++) {
240696
240762
  if (i !== 0) {
@@ -240720,7 +240786,7 @@ ${fromBody}`;
240720
240786
  }
240721
240787
  module22.exports = {
240722
240788
  concat: concat2,
240723
- join: join28,
240789
+ join: join29,
240724
240790
  line,
240725
240791
  softline,
240726
240792
  hardline,
@@ -240753,7 +240819,7 @@ ${fromBody}`;
240753
240819
  var getLast = require_get_last();
240754
240820
  var {
240755
240821
  literalline,
240756
- join: join28
240822
+ join: join29
240757
240823
  } = require_doc_builders();
240758
240824
  var isConcat = (doc2) => Array.isArray(doc2) || doc2 && doc2.type === "concat";
240759
240825
  var getDocParts = (doc2) => {
@@ -241065,7 +241131,7 @@ ${fromBody}`;
241065
241131
  return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" && currentDoc.includes("\n") ? replaceTextEndOfLine(currentDoc) : currentDoc);
241066
241132
  }
241067
241133
  function replaceTextEndOfLine(text2, replacement = literalline) {
241068
- return join28(replacement, text2.split("\n")).parts;
241134
+ return join29(replacement, text2.split("\n")).parts;
241069
241135
  }
241070
241136
  function canBreakFn(doc2) {
241071
241137
  if (doc2.type === "line") {
@@ -241103,7 +241169,7 @@ ${fromBody}`;
241103
241169
  var {
241104
241170
  builders: {
241105
241171
  indent,
241106
- join: join28,
241172
+ join: join29,
241107
241173
  line
241108
241174
  }
241109
241175
  } = require_doc();
@@ -241153,7 +241219,7 @@ ${fromBody}`;
241153
241219
  if (!isNonEmptyArray(node.modifiers)) {
241154
241220
  return "";
241155
241221
  }
241156
- return [join28(" ", path48.map(print, "modifiers")), " "];
241222
+ return [join29(" ", path48.map(print, "modifiers")), " "];
241157
241223
  }
241158
241224
  function adjustClause(node, clause, forceSpace) {
241159
241225
  if (node.type === "EmptyStatement") {
@@ -241536,7 +241602,7 @@ ${fromBody}`;
241536
241602
  } = require_loc();
241537
241603
  var {
241538
241604
  builders: {
241539
- join: join28,
241605
+ join: join29,
241540
241606
  hardline,
241541
241607
  group: group2,
241542
241608
  indent,
@@ -241680,7 +241746,7 @@ ${fromBody}`;
241680
241746
  if (groups2.length === 0) {
241681
241747
  return "";
241682
241748
  }
241683
- return indent(group2([hardline, join28(hardline, groups2.map(printGroup))]));
241749
+ return indent(group2([hardline, join29(hardline, groups2.map(printGroup))]));
241684
241750
  }
241685
241751
  const printedGroups = groups.map(printGroup);
241686
241752
  const oneLine = printedGroups;
@@ -241720,7 +241786,7 @@ ${fromBody}`;
241720
241786
  "use strict";
241721
241787
  var {
241722
241788
  builders: {
241723
- join: join28,
241789
+ join: join29,
241724
241790
  group: group2
241725
241791
  }
241726
241792
  } = require_doc();
@@ -241753,7 +241819,7 @@ ${fromBody}`;
241753
241819
  iterateCallArgumentsPath(path48, () => {
241754
241820
  printed.push(print());
241755
241821
  });
241756
- return [isNew ? "new " : "", print("callee"), optional, printFunctionTypeParameters(path48, options3, print), "(", join28(", ", printed), ")"];
241822
+ return [isNew ? "new " : "", print("callee"), optional, printFunctionTypeParameters(path48, options3, print), "(", join29(", ", printed), ")"];
241757
241823
  }
241758
241824
  const isIdentifierWithFlowAnnotation = (options3.parser === "babel" || options3.parser === "babel-flow") && node.callee && node.callee.type === "Identifier" && hasFlowAnnotationComment(node.callee.trailingComments);
241759
241825
  if (isIdentifierWithFlowAnnotation) {
@@ -242235,7 +242301,7 @@ ${fromBody}`;
242235
242301
  var {
242236
242302
  builders: {
242237
242303
  group: group2,
242238
- join: join28,
242304
+ join: join29,
242239
242305
  line,
242240
242306
  softline,
242241
242307
  indent,
@@ -242336,10 +242402,10 @@ ${fromBody}`;
242336
242402
  return printComments(typePath, printedType, options3);
242337
242403
  }, "types");
242338
242404
  if (shouldHug) {
242339
- return join28(" | ", printed);
242405
+ return join29(" | ", printed);
242340
242406
  }
242341
242407
  const shouldAddStartLine = shouldIndent && !hasLeadingOwnLineComment(options3.originalText, node);
242342
- const code2 = [ifBreak([shouldAddStartLine ? line : "", "| "]), join28([line, "| "], printed)];
242408
+ const code2 = [ifBreak([shouldAddStartLine ? line : "", "| "]), join29([line, "| "], printed)];
242343
242409
  if (pathNeedsParens(path48, options3)) {
242344
242410
  return group2([indent(code2), softline]);
242345
242411
  }
@@ -242414,7 +242480,7 @@ ${fromBody}`;
242414
242480
  } = require_comments();
242415
242481
  var {
242416
242482
  builders: {
242417
- join: join28,
242483
+ join: join29,
242418
242484
  line,
242419
242485
  hardline,
242420
242486
  softline,
@@ -242456,10 +242522,10 @@ ${fromBody}`;
242456
242522
  const isArrowFunctionVariable = path48.match((node2) => !(node2[paramsKey].length === 1 && isObjectType(node2[paramsKey][0])), void 0, (node2, name) => name === "typeAnnotation", (node2) => node2.type === "Identifier", isArrowFunctionVariableDeclarator);
242457
242523
  const shouldInline = node[paramsKey].length === 0 || !isArrowFunctionVariable && (isParameterInTestCall || node[paramsKey].length === 1 && (node[paramsKey][0].type === "NullableTypeAnnotation" || shouldHugType(node[paramsKey][0])));
242458
242524
  if (shouldInline) {
242459
- return ["<", join28(", ", path48.map(print, paramsKey)), printDanglingCommentsForInline(path48, options3), ">"];
242525
+ return ["<", join29(", ", path48.map(print, paramsKey)), printDanglingCommentsForInline(path48, options3), ">"];
242460
242526
  }
242461
242527
  const trailingComma = node.type === "TSTypeParameterInstantiation" ? "" : getFunctionParameters(node).length === 1 && isTSXFile(options3) && !node[paramsKey][0].constraint && path48.getParentNode().type === "ArrowFunctionExpression" ? "," : shouldPrintComma(options3, "all") ? ifBreak(",") : "";
242462
- return group2(["<", indent([softline, join28([",", line], path48.map(print, paramsKey))]), trailingComma, softline, ">"], {
242528
+ return group2(["<", indent([softline, join29([",", line], path48.map(print, paramsKey))]), trailingComma, softline, ">"], {
242463
242529
  id: getTypeParametersGroupId(node)
242464
242530
  });
242465
242531
  }
@@ -242597,7 +242663,7 @@ ${fromBody}`;
242597
242663
  indent,
242598
242664
  ifBreak,
242599
242665
  hardline,
242600
- join: join28,
242666
+ join: join29,
242601
242667
  indentIfBreak
242602
242668
  },
242603
242669
  utils: {
@@ -242753,7 +242819,7 @@ ${fromBody}`;
242753
242819
  if (tailNode.body.type === "SequenceExpression") {
242754
242820
  bodyDoc = group2(["(", indent([softline, bodyDoc]), softline, ")"]);
242755
242821
  }
242756
- return group2([group2(indent([isCallee || isAssignmentRhs ? softline : "", group2(join28([" =>", line], signatures), {
242822
+ return group2([group2(indent([isCallee || isAssignmentRhs ? softline : "", group2(join29([" =>", line], signatures), {
242757
242823
  shouldBreak
242758
242824
  })]), {
242759
242825
  id: groupId,
@@ -242905,7 +242971,7 @@ ${fromBody}`;
242905
242971
  builders: {
242906
242972
  line,
242907
242973
  hardline,
242908
- join: join28,
242974
+ join: join29,
242909
242975
  breakParent,
242910
242976
  group: group2
242911
242977
  }
@@ -242919,10 +242985,10 @@ ${fromBody}`;
242919
242985
  } = require_utils72();
242920
242986
  function printClassMemberDecorators(path48, options3, print) {
242921
242987
  const node = path48.getValue();
242922
- return group2([join28(line, path48.map(print, "decorators")), hasNewlineBetweenOrAfterDecorators(node, options3) ? hardline : line]);
242988
+ return group2([join29(line, path48.map(print, "decorators")), hasNewlineBetweenOrAfterDecorators(node, options3) ? hardline : line]);
242923
242989
  }
242924
242990
  function printDecoratorsBeforeExport(path48, options3, print) {
242925
- return [join28(hardline, path48.map(print, "declaration", "decorators")), hardline];
242991
+ return [join29(hardline, path48.map(print, "declaration", "decorators")), hardline];
242926
242992
  }
242927
242993
  function printDecorators(path48, options3, print) {
242928
242994
  const node = path48.getValue();
@@ -242933,7 +242999,7 @@ ${fromBody}`;
242933
242999
  return;
242934
243000
  }
242935
243001
  const shouldBreak = node.type === "ClassExpression" || node.type === "ClassDeclaration" || hasNewlineBetweenOrAfterDecorators(node, options3);
242936
- return [getParentExportDeclaration(path48) ? hardline : shouldBreak ? breakParent : "", join28(line, path48.map(print, "decorators")), line];
243002
+ return [getParentExportDeclaration(path48) ? hardline : shouldBreak ? breakParent : "", join29(line, path48.map(print, "decorators")), line];
242937
243003
  }
242938
243004
  function hasNewlineBetweenOrAfterDecorators(node, options3) {
242939
243005
  return node.decorators.some((decorator) => hasNewline(options3.originalText, locEnd(decorator)));
@@ -242966,7 +243032,7 @@ ${fromBody}`;
242966
243032
  } = require_comments();
242967
243033
  var {
242968
243034
  builders: {
242969
- join: join28,
243035
+ join: join29,
242970
243036
  line,
242971
243037
  hardline,
242972
243038
  softline,
@@ -243066,7 +243132,7 @@ ${fromBody}`;
243066
243132
  }) => marker === listName);
243067
243133
  return [shouldIndentOnlyHeritageClauses(node) ? ifBreak(" ", line, {
243068
243134
  groupId: getTypeParametersGroupId(node.typeParameters)
243069
- }) : line, printedLeadingComments, printedLeadingComments && hardline, listName, group2(indent([line, join28([",", line], path48.map(print, listName))]))];
243135
+ }) : line, printedLeadingComments, printedLeadingComments && hardline, listName, group2(indent([line, join29([",", line], path48.map(print, listName))]))];
243070
243136
  }
243071
243137
  function printSuperClass(path48, options3, print) {
243072
243138
  const printed = print("superClass");
@@ -243153,7 +243219,7 @@ ${fromBody}`;
243153
243219
  } = require_util15();
243154
243220
  var {
243155
243221
  builders: {
243156
- join: join28,
243222
+ join: join29,
243157
243223
  line,
243158
243224
  group: group2,
243159
243225
  indent,
@@ -243190,7 +243256,7 @@ ${fromBody}`;
243190
243256
  if (isNonEmptyArray(node.extends)) {
243191
243257
  extendsParts.push(shouldIndentOnlyHeritageClauses ? ifBreak(" ", line, {
243192
243258
  groupId: getTypeParametersGroupId(node.typeParameters)
243193
- }) : line, "extends ", (node.extends.length === 1 ? identity4 : indent)(join28([",", line], path48.map(print, "extends"))));
243259
+ }) : line, "extends ", (node.extends.length === 1 ? identity4 : indent)(join29([",", line], path48.map(print, "extends"))));
243194
243260
  }
243195
243261
  if (node.id && hasComment(node.id, CommentCheckFlags.Trailing) || isNonEmptyArray(node.extends)) {
243196
243262
  if (shouldIndentOnlyHeritageClauses) {
@@ -243220,7 +243286,7 @@ ${fromBody}`;
243220
243286
  softline,
243221
243287
  group: group2,
243222
243288
  indent,
243223
- join: join28,
243289
+ join: join29,
243224
243290
  line,
243225
243291
  ifBreak,
243226
243292
  hardline
@@ -243361,14 +243427,14 @@ ${fromBody}`;
243361
243427
  throw new Error(`Unknown specifier type ${JSON.stringify(specifierType)}`);
243362
243428
  }
243363
243429
  }, "specifiers");
243364
- parts.push(join28(", ", standaloneSpecifiers));
243430
+ parts.push(join29(", ", standaloneSpecifiers));
243365
243431
  if (groupedSpecifiers.length > 0) {
243366
243432
  if (standaloneSpecifiers.length > 0) {
243367
243433
  parts.push(", ");
243368
243434
  }
243369
243435
  const canBreak = groupedSpecifiers.length > 1 || standaloneSpecifiers.length > 0 || node.specifiers.some((node2) => hasComment(node2));
243370
243436
  if (canBreak) {
243371
- parts.push(group2(["{", indent([options3.bracketSpacing ? line : softline, join28([",", line], groupedSpecifiers)]), ifBreak(shouldPrintComma(options3) ? "," : ""), options3.bracketSpacing ? line : softline, "}"]));
243437
+ parts.push(group2(["{", indent([options3.bracketSpacing ? line : softline, join29([",", line], groupedSpecifiers)]), ifBreak(shouldPrintComma(options3) ? "," : ""), options3.bracketSpacing ? line : softline, "}"]));
243372
243438
  } else {
243373
243439
  parts.push(["{", options3.bracketSpacing ? " " : "", ...groupedSpecifiers, options3.bracketSpacing ? " " : "", "}"]);
243374
243440
  }
@@ -243393,7 +243459,7 @@ ${fromBody}`;
243393
243459
  function printImportAssertions(path48, options3, print) {
243394
243460
  const node = path48.getNode();
243395
243461
  if (isNonEmptyArray(node.assertions)) {
243396
- return [" assert {", options3.bracketSpacing ? " " : "", join28(", ", path48.map(print, "assertions")), options3.bracketSpacing ? " " : "", "}"];
243462
+ return [" assert {", options3.bracketSpacing ? " " : "", join29(", ", path48.map(print, "assertions")), options3.bracketSpacing ? " " : "", "}"];
243397
243463
  }
243398
243464
  return "";
243399
243465
  }
@@ -244304,7 +244370,7 @@ ${fromBody}`;
244304
244370
  } = require_util15();
244305
244371
  var {
244306
244372
  builders: {
244307
- join: join28,
244373
+ join: join29,
244308
244374
  line,
244309
244375
  hardline,
244310
244376
  softline,
@@ -244412,7 +244478,7 @@ ${fromBody}`;
244412
244478
  case "TSTypeAliasDeclaration":
244413
244479
  return printTypeAlias(path48, options3, print);
244414
244480
  case "TSQualifiedName":
244415
- return join28(".", [print("left"), print("right")]);
244481
+ return join29(".", [print("left"), print("right")]);
244416
244482
  case "TSAbstractMethodDefinition":
244417
244483
  case "TSDeclareMethod":
244418
244484
  return printClassMethod(path48, options3, print);
@@ -244491,7 +244557,7 @@ ${fromBody}`;
244491
244557
  case "TSIndexSignature": {
244492
244558
  const parent = path48.getParentNode();
244493
244559
  const trailingComma = node.parameters.length > 1 ? ifBreak(shouldPrintComma(options3) ? "," : "") : "";
244494
- const parametersGroup = group2([indent([softline, join28([", ", softline], path48.map(print, "parameters"))]), trailingComma, softline]);
244560
+ const parametersGroup = group2([indent([softline, join29([", ", softline], path48.map(print, "parameters"))]), trailingComma, softline]);
244495
244561
  return [node.export ? "export " : "", node.accessibility ? [node.accessibility, " "] : "", node.static ? "static " : "", node.readonly ? "readonly " : "", node.declare ? "declare " : "", "[", node.parameters ? parametersGroup : "", node.typeAnnotation ? "]: " : "]", node.typeAnnotation ? print("typeAnnotation") : "", parent.type === "ClassBody" ? semi : ""];
244496
244562
  }
244497
244563
  case "TSTypePredicate":
@@ -244663,7 +244729,7 @@ ${fromBody}`;
244663
244729
  } = require_util15();
244664
244730
  var {
244665
244731
  builders: {
244666
- join: join28,
244732
+ join: join29,
244667
244733
  hardline
244668
244734
  },
244669
244735
  utils: {
@@ -244705,7 +244771,7 @@ ${fromBody}`;
244705
244771
  }
244706
244772
  function printIndentableBlockComment(comment2) {
244707
244773
  const lines = comment2.value.split("\n");
244708
- return ["/*", join28(hardline, lines.map((line, index) => index === 0 ? line.trimEnd() : " " + (index < lines.length - 1 ? line.trim() : line.trimStart()))), "*/"];
244774
+ return ["/*", join29(hardline, lines.map((line, index) => index === 0 ? line.trimEnd() : " " + (index < lines.length - 1 ? line.trim() : line.trimStart()))), "*/"];
244709
244775
  }
244710
244776
  module22.exports = {
244711
244777
  printComment
@@ -244798,7 +244864,7 @@ ${fromBody}`;
244798
244864
  } = require_util15();
244799
244865
  var {
244800
244866
  builders: {
244801
- join: join28,
244867
+ join: join29,
244802
244868
  line,
244803
244869
  hardline,
244804
244870
  softline,
@@ -245145,7 +245211,7 @@ ${fromBody}`;
245145
245211
  }, "expressions");
245146
245212
  return group2(parts2);
245147
245213
  }
245148
- return group2(join28([",", line], path48.map(print, "expressions")));
245214
+ return group2(join29([",", line], path48.map(print, "expressions")));
245149
245215
  }
245150
245216
  case "ThisExpression":
245151
245217
  return "this";
@@ -245268,7 +245334,7 @@ ${fromBody}`;
245268
245334
  }
245269
245335
  return ["catch ", print("body")];
245270
245336
  case "SwitchStatement":
245271
- return [group2(["switch (", indent([softline, print("discriminant")]), softline, ")"]), " {", node.cases.length > 0 ? indent([hardline, join28(hardline, path48.map((casePath, index, cases) => {
245337
+ return [group2(["switch (", indent([softline, print("discriminant")]), softline, ")"]), " {", node.cases.length > 0 ? indent([hardline, join29(hardline, path48.map((casePath, index, cases) => {
245272
245338
  const caseNode = casePath.getValue();
245273
245339
  return [print(), index !== cases.length - 1 && isNextLineEmpty(caseNode, options3) ? hardline : ""];
245274
245340
  }, "cases"))]) : "", hardline, "}"];
@@ -245369,7 +245435,7 @@ ${fromBody}`;
245369
245435
  builders: {
245370
245436
  hardline,
245371
245437
  indent,
245372
- join: join28
245438
+ join: join29
245373
245439
  }
245374
245440
  } = require_doc();
245375
245441
  var preprocess = require_print_preprocess();
@@ -245383,10 +245449,10 @@ ${fromBody}`;
245383
245449
  return "[]";
245384
245450
  }
245385
245451
  const printed = path48.map(() => path48.getValue() === null ? "null" : print(), "elements");
245386
- return ["[", indent([hardline, join28([",", hardline], printed)]), hardline, "]"];
245452
+ return ["[", indent([hardline, join29([",", hardline], printed)]), hardline, "]"];
245387
245453
  }
245388
245454
  case "ObjectExpression":
245389
- return node.properties.length === 0 ? "{}" : ["{", indent([hardline, join28([",", hardline], path48.map(print, "properties"))]), hardline, "}"];
245455
+ return node.properties.length === 0 ? "{}" : ["{", indent([hardline, join29([",", hardline], path48.map(print, "properties"))]), hardline, "}"];
245390
245456
  case "ObjectProperty":
245391
245457
  return [print("key"), ": ", print("value")];
245392
245458
  case "UnaryExpression":
@@ -246672,7 +246738,7 @@ ${fromBody}`;
246672
246738
  } = require_util15();
246673
246739
  var {
246674
246740
  builders: {
246675
- join: join28,
246741
+ join: join29,
246676
246742
  line,
246677
246743
  hardline,
246678
246744
  softline,
@@ -246815,10 +246881,10 @@ ${fromBody}`;
246815
246881
  }
246816
246882
  parts.push(print());
246817
246883
  }, "nodes");
246818
- return group2(indent(join28(line, parts)));
246884
+ return group2(indent(join29(line, parts)));
246819
246885
  }
246820
246886
  case "media-query": {
246821
- return [join28(" ", path48.map(print, "nodes")), isLastNode(path48, node) ? "" : ","];
246887
+ return [join29(" ", path48.map(print, "nodes")), isLastNode(path48, node) ? "" : ","];
246822
246888
  }
246823
246889
  case "media-type": {
246824
246890
  return adjustNumbers(adjustStrings(node.value, options3));
@@ -246848,7 +246914,7 @@ ${fromBody}`;
246848
246914
  return node.value;
246849
246915
  }
246850
246916
  case "selector-root": {
246851
- return group2([insideAtRuleNode(path48, "custom-selector") ? [getAncestorNode(path48, "css-atrule").customSelector, line] : "", join28([",", insideAtRuleNode(path48, ["extend", "custom-selector", "nest"]) ? line : hardline], path48.map(print, "nodes"))]);
246917
+ return group2([insideAtRuleNode(path48, "custom-selector") ? [getAncestorNode(path48, "css-atrule").customSelector, line] : "", join29([",", insideAtRuleNode(path48, ["extend", "custom-selector", "nest"]) ? line : hardline], path48.map(print, "nodes"))]);
246852
246918
  }
246853
246919
  case "selector-selector": {
246854
246920
  return group2(indent(path48.map(print, "nodes")));
@@ -246889,7 +246955,7 @@ ${fromBody}`;
246889
246955
  return [node.namespace ? [node.namespace === true ? "" : node.namespace.trim(), "|"] : "", node.value];
246890
246956
  }
246891
246957
  case "selector-pseudo": {
246892
- return [maybeToLowerCase(node.value), isNonEmptyArray(node.nodes) ? group2(["(", indent([softline, join28([",", line], path48.map(print, "nodes"))]), softline, ")"]) : ""];
246958
+ return [maybeToLowerCase(node.value), isNonEmptyArray(node.nodes) ? group2(["(", indent([softline, join29([",", line], path48.map(print, "nodes"))]), softline, ")"]) : ""];
246893
246959
  }
246894
246960
  case "selector-nesting": {
246895
246961
  return node.value;
@@ -247085,7 +247151,7 @@ ${fromBody}`;
247085
247151
  case "value-paren_group": {
247086
247152
  const parentNode = path48.getParentNode();
247087
247153
  if (parentNode && isURLFunctionNode(parentNode) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) {
247088
- return [node.open ? print("open") : "", join28(",", path48.map(print, "groups")), node.close ? print("close") : ""];
247154
+ return [node.open ? print("open") : "", join29(",", path48.map(print, "groups")), node.close ? print("close") : ""];
247089
247155
  }
247090
247156
  if (!node.open) {
247091
247157
  const printed2 = path48.map(print, "groups");
@@ -247105,7 +247171,7 @@ ${fromBody}`;
247105
247171
  const isConfiguration = isConfigurationNode(node, parentNode);
247106
247172
  const shouldBreak = isConfiguration || isSCSSMapItem && !isKey;
247107
247173
  const shouldDedent = isConfiguration || isKey;
247108
- const printed = group2([node.open ? print("open") : "", indent([softline, join28([line], path48.map((childPath, index) => {
247174
+ const printed = group2([node.open ? print("open") : "", indent([softline, join29([line], path48.map((childPath, index) => {
247109
247175
  const child = childPath.getValue();
247110
247176
  const isLast = index === node.groups.length - 1;
247111
247177
  let printed2 = [print(), isLast ? "" : ","];
@@ -247477,7 +247543,7 @@ ${fromBody}`;
247477
247543
  hardline,
247478
247544
  ifBreak,
247479
247545
  indent,
247480
- join: join28,
247546
+ join: join29,
247481
247547
  line,
247482
247548
  softline
247483
247549
  },
@@ -247569,7 +247635,7 @@ ${fromBody}`;
247569
247635
  return path48.map(print2, "parts");
247570
247636
  }
247571
247637
  case "Hash": {
247572
- return join28(line, path48.map(print2, "pairs"));
247638
+ return join29(line, path48.map(print2, "pairs"));
247573
247639
  }
247574
247640
  case "HashPair": {
247575
247641
  return [node.key, "=", print2("value")];
@@ -247805,7 +247871,7 @@ ${fromBody}`;
247805
247871
  if (isNonEmptyArray(node.program.blockParams)) {
247806
247872
  parts.push(printBlockParams(node.program));
247807
247873
  }
247808
- return group2([printOpeningBlockOpeningMustache(node), printPath(path48, print2), parts.length > 0 ? indent([line, join28(line, parts)]) : "", softline, printOpeningBlockClosingMustache(node)]);
247874
+ return group2([printOpeningBlockOpeningMustache(node), printPath(path48, print2), parts.length > 0 ? indent([line, join29(line, parts)]) : "", softline, printOpeningBlockClosingMustache(node)]);
247809
247875
  }
247810
247876
  function printElseBlock(node, options3) {
247811
247877
  return [options3.htmlWhitespaceSensitivity === "ignore" ? hardline : "", printInverseBlockOpeningMustache(node), "else", printInverseBlockClosingMustache(node)];
@@ -247856,7 +247922,7 @@ ${fromBody}`;
247856
247922
  return "";
247857
247923
  }
247858
247924
  function getTextValueParts(value) {
247859
- return getDocParts(join28(line, splitByHtmlWhitespace(value)));
247925
+ return getDocParts(join29(line, splitByHtmlWhitespace(value)));
247860
247926
  }
247861
247927
  function splitByHtmlWhitespace(string) {
247862
247928
  return string.split(/[\t\n\f\r ]+/);
@@ -247940,7 +248006,7 @@ ${fromBody}`;
247940
248006
  if (parts.length === 0) {
247941
248007
  return "";
247942
248008
  }
247943
- return join28(line, parts);
248009
+ return join29(line, parts);
247944
248010
  }
247945
248011
  function printBlockParams(node) {
247946
248012
  return ["as |", node.blockParams.join(" "), "|"];
@@ -248037,7 +248103,7 @@ ${fromBody}`;
248037
248103
  "use strict";
248038
248104
  var {
248039
248105
  builders: {
248040
- join: join28,
248106
+ join: join29,
248041
248107
  hardline,
248042
248108
  line,
248043
248109
  softline,
@@ -248082,16 +248148,16 @@ ${fromBody}`;
248082
248148
  case "OperationDefinition": {
248083
248149
  const hasOperation = options3.originalText[locStart(node)] !== "{";
248084
248150
  const hasName2 = Boolean(node.name);
248085
- return [hasOperation ? node.operation : "", hasOperation && hasName2 ? [" ", print("name")] : "", hasOperation && !hasName2 && isNonEmptyArray(node.variableDefinitions) ? " " : "", isNonEmptyArray(node.variableDefinitions) ? group2(["(", indent([softline, join28([ifBreak("", ", "), softline], path48.map(print, "variableDefinitions"))]), softline, ")"]) : "", printDirectives(path48, print, node), node.selectionSet ? !hasOperation && !hasName2 ? "" : " " : "", print("selectionSet")];
248151
+ return [hasOperation ? node.operation : "", hasOperation && hasName2 ? [" ", print("name")] : "", hasOperation && !hasName2 && isNonEmptyArray(node.variableDefinitions) ? " " : "", isNonEmptyArray(node.variableDefinitions) ? group2(["(", indent([softline, join29([ifBreak("", ", "), softline], path48.map(print, "variableDefinitions"))]), softline, ")"]) : "", printDirectives(path48, print, node), node.selectionSet ? !hasOperation && !hasName2 ? "" : " " : "", print("selectionSet")];
248086
248152
  }
248087
248153
  case "FragmentDefinition": {
248088
- return ["fragment ", print("name"), isNonEmptyArray(node.variableDefinitions) ? group2(["(", indent([softline, join28([ifBreak("", ", "), softline], path48.map(print, "variableDefinitions"))]), softline, ")"]) : "", " on ", print("typeCondition"), printDirectives(path48, print, node), " ", print("selectionSet")];
248154
+ return ["fragment ", print("name"), isNonEmptyArray(node.variableDefinitions) ? group2(["(", indent([softline, join29([ifBreak("", ", "), softline], path48.map(print, "variableDefinitions"))]), softline, ")"]) : "", " on ", print("typeCondition"), printDirectives(path48, print, node), " ", print("selectionSet")];
248089
248155
  }
248090
248156
  case "SelectionSet": {
248091
- return ["{", indent([hardline, join28(hardline, printSequence(path48, options3, print, "selections"))]), hardline, "}"];
248157
+ return ["{", indent([hardline, join29(hardline, printSequence(path48, options3, print, "selections"))]), hardline, "}"];
248092
248158
  }
248093
248159
  case "Field": {
248094
- return group2([node.alias ? [print("alias"), ": "] : "", print("name"), node.arguments.length > 0 ? group2(["(", indent([softline, join28([ifBreak("", ", "), softline], printSequence(path48, options3, print, "arguments"))]), softline, ")"]) : "", printDirectives(path48, print, node), node.selectionSet ? " " : "", print("selectionSet")]);
248160
+ return group2([node.alias ? [print("alias"), ": "] : "", print("name"), node.arguments.length > 0 ? group2(["(", indent([softline, join29([ifBreak("", ", "), softline], printSequence(path48, options3, print, "arguments"))]), softline, ")"]) : "", printDirectives(path48, print, node), node.selectionSet ? " " : "", print("selectionSet")]);
248095
248161
  }
248096
248162
  case "Name": {
248097
248163
  return node.value;
@@ -248105,7 +248171,7 @@ ${fromBody}`;
248105
248171
  if (lines.every((line2) => line2 === "")) {
248106
248172
  lines.length = 0;
248107
248173
  }
248108
- return join28(hardline, ['"""', ...lines, '"""']);
248174
+ return join29(hardline, ['"""', ...lines, '"""']);
248109
248175
  }
248110
248176
  return ['"', node.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"'];
248111
248177
  }
@@ -248124,17 +248190,17 @@ ${fromBody}`;
248124
248190
  return ["$", print("name")];
248125
248191
  }
248126
248192
  case "ListValue": {
248127
- return group2(["[", indent([softline, join28([ifBreak("", ", "), softline], path48.map(print, "values"))]), softline, "]"]);
248193
+ return group2(["[", indent([softline, join29([ifBreak("", ", "), softline], path48.map(print, "values"))]), softline, "]"]);
248128
248194
  }
248129
248195
  case "ObjectValue": {
248130
- return group2(["{", options3.bracketSpacing && node.fields.length > 0 ? " " : "", indent([softline, join28([ifBreak("", ", "), softline], path48.map(print, "fields"))]), softline, ifBreak("", options3.bracketSpacing && node.fields.length > 0 ? " " : ""), "}"]);
248196
+ return group2(["{", options3.bracketSpacing && node.fields.length > 0 ? " " : "", indent([softline, join29([ifBreak("", ", "), softline], path48.map(print, "fields"))]), softline, ifBreak("", options3.bracketSpacing && node.fields.length > 0 ? " " : ""), "}"]);
248131
248197
  }
248132
248198
  case "ObjectField":
248133
248199
  case "Argument": {
248134
248200
  return [print("name"), ": ", print("value")];
248135
248201
  }
248136
248202
  case "Directive": {
248137
- return ["@", print("name"), node.arguments.length > 0 ? group2(["(", indent([softline, join28([ifBreak("", ", "), softline], printSequence(path48, options3, print, "arguments"))]), softline, ")"]) : ""];
248203
+ return ["@", print("name"), node.arguments.length > 0 ? group2(["(", indent([softline, join29([ifBreak("", ", "), softline], printSequence(path48, options3, print, "arguments"))]), softline, ")"]) : ""];
248138
248204
  }
248139
248205
  case "NamedType": {
248140
248206
  return print("name");
@@ -248144,17 +248210,17 @@ ${fromBody}`;
248144
248210
  }
248145
248211
  case "ObjectTypeExtension":
248146
248212
  case "ObjectTypeDefinition": {
248147
- return [print("description"), node.description ? hardline : "", node.kind === "ObjectTypeExtension" ? "extend " : "", "type ", print("name"), node.interfaces.length > 0 ? [" implements ", ...printInterfaces(path48, options3, print)] : "", printDirectives(path48, print, node), node.fields.length > 0 ? [" {", indent([hardline, join28(hardline, printSequence(path48, options3, print, "fields"))]), hardline, "}"] : ""];
248213
+ return [print("description"), node.description ? hardline : "", node.kind === "ObjectTypeExtension" ? "extend " : "", "type ", print("name"), node.interfaces.length > 0 ? [" implements ", ...printInterfaces(path48, options3, print)] : "", printDirectives(path48, print, node), node.fields.length > 0 ? [" {", indent([hardline, join29(hardline, printSequence(path48, options3, print, "fields"))]), hardline, "}"] : ""];
248148
248214
  }
248149
248215
  case "FieldDefinition": {
248150
- return [print("description"), node.description ? hardline : "", print("name"), node.arguments.length > 0 ? group2(["(", indent([softline, join28([ifBreak("", ", "), softline], printSequence(path48, options3, print, "arguments"))]), softline, ")"]) : "", ": ", print("type"), printDirectives(path48, print, node)];
248216
+ return [print("description"), node.description ? hardline : "", print("name"), node.arguments.length > 0 ? group2(["(", indent([softline, join29([ifBreak("", ", "), softline], printSequence(path48, options3, print, "arguments"))]), softline, ")"]) : "", ": ", print("type"), printDirectives(path48, print, node)];
248151
248217
  }
248152
248218
  case "DirectiveDefinition": {
248153
- return [print("description"), node.description ? hardline : "", "directive ", "@", print("name"), node.arguments.length > 0 ? group2(["(", indent([softline, join28([ifBreak("", ", "), softline], printSequence(path48, options3, print, "arguments"))]), softline, ")"]) : "", node.repeatable ? " repeatable" : "", " on ", join28(" | ", path48.map(print, "locations"))];
248219
+ return [print("description"), node.description ? hardline : "", "directive ", "@", print("name"), node.arguments.length > 0 ? group2(["(", indent([softline, join29([ifBreak("", ", "), softline], printSequence(path48, options3, print, "arguments"))]), softline, ")"]) : "", node.repeatable ? " repeatable" : "", " on ", join29(" | ", path48.map(print, "locations"))];
248154
248220
  }
248155
248221
  case "EnumTypeExtension":
248156
248222
  case "EnumTypeDefinition": {
248157
- return [print("description"), node.description ? hardline : "", node.kind === "EnumTypeExtension" ? "extend " : "", "enum ", print("name"), printDirectives(path48, print, node), node.values.length > 0 ? [" {", indent([hardline, join28(hardline, printSequence(path48, options3, print, "values"))]), hardline, "}"] : ""];
248223
+ return [print("description"), node.description ? hardline : "", node.kind === "EnumTypeExtension" ? "extend " : "", "enum ", print("name"), printDirectives(path48, print, node), node.values.length > 0 ? [" {", indent([hardline, join29(hardline, printSequence(path48, options3, print, "values"))]), hardline, "}"] : ""];
248158
248224
  }
248159
248225
  case "EnumValueDefinition": {
248160
248226
  return [print("description"), node.description ? hardline : "", print("name"), printDirectives(path48, print, node)];
@@ -248164,20 +248230,20 @@ ${fromBody}`;
248164
248230
  }
248165
248231
  case "InputObjectTypeExtension":
248166
248232
  case "InputObjectTypeDefinition": {
248167
- return [print("description"), node.description ? hardline : "", node.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", print("name"), printDirectives(path48, print, node), node.fields.length > 0 ? [" {", indent([hardline, join28(hardline, printSequence(path48, options3, print, "fields"))]), hardline, "}"] : ""];
248233
+ return [print("description"), node.description ? hardline : "", node.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", print("name"), printDirectives(path48, print, node), node.fields.length > 0 ? [" {", indent([hardline, join29(hardline, printSequence(path48, options3, print, "fields"))]), hardline, "}"] : ""];
248168
248234
  }
248169
248235
  case "SchemaExtension": {
248170
- return ["extend schema", printDirectives(path48, print, node), ...node.operationTypes.length > 0 ? [" {", indent([hardline, join28(hardline, printSequence(path48, options3, print, "operationTypes"))]), hardline, "}"] : []];
248236
+ return ["extend schema", printDirectives(path48, print, node), ...node.operationTypes.length > 0 ? [" {", indent([hardline, join29(hardline, printSequence(path48, options3, print, "operationTypes"))]), hardline, "}"] : []];
248171
248237
  }
248172
248238
  case "SchemaDefinition": {
248173
- return [print("description"), node.description ? hardline : "", "schema", printDirectives(path48, print, node), " {", node.operationTypes.length > 0 ? indent([hardline, join28(hardline, printSequence(path48, options3, print, "operationTypes"))]) : "", hardline, "}"];
248239
+ return [print("description"), node.description ? hardline : "", "schema", printDirectives(path48, print, node), " {", node.operationTypes.length > 0 ? indent([hardline, join29(hardline, printSequence(path48, options3, print, "operationTypes"))]) : "", hardline, "}"];
248174
248240
  }
248175
248241
  case "OperationTypeDefinition": {
248176
248242
  return [print("operation"), ": ", print("type")];
248177
248243
  }
248178
248244
  case "InterfaceTypeExtension":
248179
248245
  case "InterfaceTypeDefinition": {
248180
- return [print("description"), node.description ? hardline : "", node.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", print("name"), node.interfaces.length > 0 ? [" implements ", ...printInterfaces(path48, options3, print)] : "", printDirectives(path48, print, node), node.fields.length > 0 ? [" {", indent([hardline, join28(hardline, printSequence(path48, options3, print, "fields"))]), hardline, "}"] : ""];
248246
+ return [print("description"), node.description ? hardline : "", node.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", print("name"), node.interfaces.length > 0 ? [" implements ", ...printInterfaces(path48, options3, print)] : "", printDirectives(path48, print, node), node.fields.length > 0 ? [" {", indent([hardline, join29(hardline, printSequence(path48, options3, print, "fields"))]), hardline, "}"] : ""];
248181
248247
  }
248182
248248
  case "FragmentSpread": {
248183
248249
  return ["...", print("name"), printDirectives(path48, print, node)];
@@ -248187,7 +248253,7 @@ ${fromBody}`;
248187
248253
  }
248188
248254
  case "UnionTypeExtension":
248189
248255
  case "UnionTypeDefinition": {
248190
- return group2([print("description"), node.description ? hardline : "", group2([node.kind === "UnionTypeExtension" ? "extend " : "", "union ", print("name"), printDirectives(path48, print, node), node.types.length > 0 ? [" =", ifBreak("", " "), indent([ifBreak([line, " "]), join28([line, "| "], path48.map(print, "types"))])] : ""])]);
248256
+ return group2([print("description"), node.description ? hardline : "", group2([node.kind === "UnionTypeExtension" ? "extend " : "", "union ", print("name"), printDirectives(path48, print, node), node.types.length > 0 ? [" =", ifBreak("", " "), indent([ifBreak([line, " "]), join29([line, "| "], path48.map(print, "types"))])] : ""])]);
248191
248257
  }
248192
248258
  case "ScalarTypeExtension":
248193
248259
  case "ScalarTypeDefinition": {
@@ -248207,7 +248273,7 @@ ${fromBody}`;
248207
248273
  if (node.directives.length === 0) {
248208
248274
  return "";
248209
248275
  }
248210
- const printed = join28(line, path48.map(print, "directives"));
248276
+ const printed = join29(line, path48.map(print, "directives"));
248211
248277
  if (node.kind === "FragmentDefinition" || node.kind === "OperationDefinition") {
248212
248278
  return group2([line, printed]);
248213
248279
  }
@@ -248843,7 +248909,7 @@ ${extracted.content}`;
248843
248909
  var {
248844
248910
  builders: {
248845
248911
  breakParent,
248846
- join: join28,
248912
+ join: join29,
248847
248913
  line,
248848
248914
  literalline,
248849
248915
  markAsRoot,
@@ -249144,9 +249210,9 @@ ${extracted.content}`;
249144
249210
  function printTableContents(isCompact) {
249145
249211
  const parts = [printRow(contents[0], isCompact), printAlign(isCompact)];
249146
249212
  if (contents.length > 1) {
249147
- parts.push(join28(hardlineWithoutBreakParent, contents.slice(1).map((rowContents) => printRow(rowContents, isCompact))));
249213
+ parts.push(join29(hardlineWithoutBreakParent, contents.slice(1).map((rowContents) => printRow(rowContents, isCompact))));
249148
249214
  }
249149
- return join28(hardlineWithoutBreakParent, parts);
249215
+ return join29(hardlineWithoutBreakParent, parts);
249150
249216
  }
249151
249217
  function printAlign(isCompact) {
249152
249218
  const align2 = columnMaxWidths.map((width, index) => {
@@ -249597,7 +249663,7 @@ ${extracted.content}`;
249597
249663
  builders: {
249598
249664
  line,
249599
249665
  hardline,
249600
- join: join28
249666
+ join: join29
249601
249667
  },
249602
249668
  utils: {
249603
249669
  getDocParts,
@@ -249951,7 +250017,7 @@ ${extracted.content}`;
249951
250017
  return tagName === "script" && attributeName === "setup" || tagName === "style" && attributeName === "vars";
249952
250018
  }
249953
250019
  function getTextValueParts(node, value = node.value) {
249954
- return node.parent.isWhitespaceSensitive ? node.parent.isIndentationSensitive ? replaceTextEndOfLine(value) : replaceTextEndOfLine(dedentString(htmlTrimPreserveIndentation(value)), hardline) : getDocParts(join28(line, splitByHtmlWhitespace(value)));
250020
+ return node.parent.isWhitespaceSensitive ? node.parent.isIndentationSensitive ? replaceTextEndOfLine(value) : replaceTextEndOfLine(dedentString(htmlTrimPreserveIndentation(value)), hardline) : getDocParts(join29(line, splitByHtmlWhitespace(value)));
249955
250021
  }
249956
250022
  function isVueScriptTag(node, options3) {
249957
250023
  return isVueSfcBlock(node, options3) && node.name === "script";
@@ -251246,7 +251312,7 @@ ${extracted.content}`;
251246
251312
  var {
251247
251313
  builders: {
251248
251314
  indent,
251249
- join: join28,
251315
+ join: join29,
251250
251316
  line,
251251
251317
  softline,
251252
251318
  hardline
@@ -251360,7 +251426,7 @@ ${extracted.content}`;
251360
251426
  const forceNotToBreakAttrContent = node.type === "element" && node.fullName === "script" && node.attrs.length === 1 && node.attrs[0].fullName === "src" && node.children.length === 0;
251361
251427
  const shouldPrintAttributePerLine = options3.singleAttributePerLine && node.attrs.length > 1 && !isVueSfcBlock(node, options3);
251362
251428
  const attributeLine = shouldPrintAttributePerLine ? hardline : line;
251363
- const parts = [indent([forceNotToBreakAttrContent ? " " : line, join28(attributeLine, printedAttributes)])];
251429
+ const parts = [indent([forceNotToBreakAttrContent ? " " : line, join29(attributeLine, printedAttributes)])];
251364
251430
  if (node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) || node.isSelfClosing && needsToBorrowLastChildClosingTagEndMarker(node.parent) || forceNotToBreakAttrContent) {
251365
251431
  parts.push(node.isSelfClosing ? " " : "");
251366
251432
  } else {
@@ -251594,7 +251660,7 @@ ${extracted.content}`;
251594
251660
  var {
251595
251661
  builders: {
251596
251662
  ifBreak,
251597
- join: join28,
251663
+ join: join29,
251598
251664
  line
251599
251665
  }
251600
251666
  } = require_doc();
@@ -251629,7 +251695,7 @@ ${extracted.content}`;
251629
251695
  return index === -1 ? descriptor.length : index;
251630
251696
  });
251631
251697
  const maxDescriptorLeftLength = getMax(descriptorLeftLengths);
251632
- return join28([",", line], urls.map((url, index) => {
251698
+ return join29([",", line], urls.map((url, index) => {
251633
251699
  const parts = [url];
251634
251700
  const descriptor = descriptors[index];
251635
251701
  if (descriptor) {
@@ -252803,7 +252869,7 @@ ${text2}`;
252803
252869
  line,
252804
252870
  softline,
252805
252871
  hardline,
252806
- join: join28
252872
+ join: join29
252807
252873
  }
252808
252874
  } = require_doc();
252809
252875
  var {
@@ -252826,7 +252892,7 @@ ${text2}`;
252826
252892
  }
252827
252893
  const lastItem = getLast(node.children);
252828
252894
  const isLastItemEmptyMappingItem = lastItem && lastItem.type === "flowMappingItem" && isEmptyNode(lastItem.key) && isEmptyNode(lastItem.value);
252829
- return [openMarker, alignWithSpaces(options3.tabWidth, [bracketSpacing, printChildren(path48, print, options3), options3.trailingComma === "none" ? "" : ifBreak(","), hasEndComments(node) ? [hardline, join28(hardline, path48.map(print, "endComments"))] : ""]), isLastItemEmptyMappingItem ? "" : bracketSpacing, closeMarker];
252895
+ return [openMarker, alignWithSpaces(options3.tabWidth, [bracketSpacing, printChildren(path48, print, options3), options3.trailingComma === "none" ? "" : ifBreak(","), hasEndComments(node) ? [hardline, join29(hardline, path48.map(print, "endComments"))] : ""]), isLastItemEmptyMappingItem ? "" : bracketSpacing, closeMarker];
252830
252896
  }
252831
252897
  function printChildren(path48, print, options3) {
252832
252898
  const node = path48.getValue();
@@ -252848,7 +252914,7 @@ ${text2}`;
252848
252914
  group: group2,
252849
252915
  hardline,
252850
252916
  ifBreak,
252851
- join: join28,
252917
+ join: join29,
252852
252918
  line
252853
252919
  }
252854
252920
  } = require_doc();
@@ -252890,7 +252956,7 @@ ${text2}`;
252890
252956
  return [": ", alignWithSpaces(2, printedValue)];
252891
252957
  }
252892
252958
  if (hasLeadingComments(value) || !isInlineNode(key.content)) {
252893
- return ["? ", alignWithSpaces(2, printedKey), hardline, join28("", path48.map(print, "value", "leadingComments").map((comment2) => [comment2, hardline])), ": ", alignWithSpaces(2, printedValue)];
252959
+ return ["? ", alignWithSpaces(2, printedKey), hardline, join29("", path48.map(print, "value", "leadingComments").map((comment2) => [comment2, hardline])), ": ", alignWithSpaces(2, printedValue)];
252894
252960
  }
252895
252961
  if (isSingleLineNode(key.content) && !hasLeadingComments(key.content) && !hasMiddleComments(key.content) && !hasTrailingComment(key.content) && !hasEndComments(key) && !hasLeadingComments(value.content) && !hasMiddleComments(value.content) && !hasEndComments(value) && isAbsolutelyPrintedAsSingleLineNode(value.content, options3)) {
252896
252962
  return [printedKey, spaceBeforeColon, ": ", printedValue];
@@ -252974,7 +253040,7 @@ ${text2}`;
252974
253040
  dedentToRoot,
252975
253041
  fill,
252976
253042
  hardline,
252977
- join: join28,
253043
+ join: join29,
252978
253044
  line,
252979
253045
  literalline,
252980
253046
  markAsRoot
@@ -253017,7 +253083,7 @@ ${text2}`;
253017
253083
  if (index === 0) {
253018
253084
  contentsParts.push(hardline);
253019
253085
  }
253020
- contentsParts.push(fill(getDocParts(join28(line, lineWords))));
253086
+ contentsParts.push(fill(getDocParts(join29(line, lineWords))));
253021
253087
  if (index !== lineContents.length - 1) {
253022
253088
  contentsParts.push(lineWords.length === 0 ? hardline : markAsRoot(literalline));
253023
253089
  } else if (node.chomping === "keep" && isLastDescendant) {
@@ -253043,7 +253109,7 @@ ${text2}`;
253043
253109
  fill,
253044
253110
  group: group2,
253045
253111
  hardline,
253046
- join: join28,
253112
+ join: join29,
253047
253113
  line,
253048
253114
  lineSuffix,
253049
253115
  literalline
@@ -253092,7 +253158,7 @@ ${text2}`;
253092
253158
  const node = path48.getValue();
253093
253159
  const parts = [];
253094
253160
  if (node.type !== "mappingValue" && hasLeadingComments(node)) {
253095
- parts.push([join28(hardline, path48.map(print, "leadingComments")), hardline]);
253161
+ parts.push([join29(hardline, path48.map(print, "leadingComments")), hardline]);
253096
253162
  }
253097
253163
  const {
253098
253164
  tag: tag2,
@@ -253119,7 +253185,7 @@ ${text2}`;
253119
253185
  }
253120
253186
  }
253121
253187
  if (hasMiddleComments(node)) {
253122
- parts.push([node.middleComments.length === 1 ? "" : hardline, join28(hardline, path48.map(print, "middleComments")), hardline]);
253188
+ parts.push([node.middleComments.length === 1 ? "" : hardline, join29(hardline, path48.map(print, "middleComments")), hardline]);
253123
253189
  }
253124
253190
  const parentNode = path48.getParentNode();
253125
253191
  if (hasPrettierIgnore(path48)) {
@@ -253131,7 +253197,7 @@ ${text2}`;
253131
253197
  parts.push(lineSuffix([node.type === "mappingValue" && !node.content ? "" : " ", parentNode.type === "mappingKey" && path48.getParentNode(2).type === "mapping" && isInlineNode(node) ? "" : breakParent, print("trailingComment")]));
253132
253198
  }
253133
253199
  if (shouldPrintEndComments(node)) {
253134
- parts.push(alignWithSpaces(node.type === "sequenceItem" ? 2 : 0, [hardline, join28(hardline, path48.map((path210) => [isPreviousLineEmpty(options3.originalText, path210.getValue(), locStart) ? hardline : "", print()], "endComments"))]));
253200
+ parts.push(alignWithSpaces(node.type === "sequenceItem" ? 2 : 0, [hardline, join29(hardline, path48.map((path210) => [isPreviousLineEmpty(options3.originalText, path210.getValue(), locStart) ? hardline : "", print()], "endComments"))]));
253135
253201
  }
253136
253202
  parts.push(nextEmptyLine);
253137
253203
  return parts;
@@ -253181,10 +253247,10 @@ ${text2}`;
253181
253247
  if (shouldPrintDocumentBody(node)) {
253182
253248
  parts.push(print("body"));
253183
253249
  }
253184
- return join28(hardline, parts);
253250
+ return join29(hardline, parts);
253185
253251
  }
253186
253252
  case "documentHead":
253187
- return join28(hardline, [...path48.map(print, "children"), ...path48.map(print, "endComments")]);
253253
+ return join29(hardline, [...path48.map(print, "children"), ...path48.map(print, "endComments")]);
253188
253254
  case "documentBody": {
253189
253255
  const {
253190
253256
  children,
@@ -253201,10 +253267,10 @@ ${text2}`;
253201
253267
  separator = hardline;
253202
253268
  }
253203
253269
  }
253204
- return [join28(hardline, path48.map(print, "children")), separator, join28(hardline, path48.map(print, "endComments"))];
253270
+ return [join29(hardline, path48.map(print, "children")), separator, join29(hardline, path48.map(print, "endComments"))];
253205
253271
  }
253206
253272
  case "directive":
253207
- return ["%", join28(" ", [node.name, ...node.parameters])];
253273
+ return ["%", join29(" ", [node.name, ...node.parameters])];
253208
253274
  case "comment":
253209
253275
  return ["#", node.value];
253210
253276
  case "alias":
@@ -253239,7 +253305,7 @@ ${text2}`;
253239
253305
  }
253240
253306
  case "mapping":
253241
253307
  case "sequence":
253242
- return join28(hardline, path48.map(print, "children"));
253308
+ return join29(hardline, path48.map(print, "children"));
253243
253309
  case "sequenceItem":
253244
253310
  return ["- ", alignWithSpaces(2, node.content ? print("content") : "")];
253245
253311
  case "mappingKey":
@@ -253276,7 +253342,7 @@ ${text2}`;
253276
253342
  }
253277
253343
  function printFlowScalarContent(nodeType, content, options3) {
253278
253344
  const lineContents = getFlowScalarLineContents(nodeType, content, options3);
253279
- return join28(hardline, lineContents.map((lineContentWords) => fill(getDocParts(join28(line, lineContentWords)))));
253345
+ return join29(hardline, lineContents.map((lineContentWords) => fill(getDocParts(join29(line, lineContentWords)))));
253280
253346
  }
253281
253347
  function clean(node, newNode) {
253282
253348
  if (isNode5(newNode)) {
@@ -263409,7 +263475,7 @@ var require_BufferList = __commonJS({
263409
263475
  this.head = this.tail = null;
263410
263476
  this.length = 0;
263411
263477
  };
263412
- BufferList.prototype.join = function join28(s) {
263478
+ BufferList.prototype.join = function join29(s) {
263413
263479
  if (this.length === 0) return "";
263414
263480
  var p = this.head;
263415
263481
  var ret2 = "" + p.data;
@@ -317457,7 +317523,7 @@ var require_xlsx = __commonJS({
317457
317523
  if (DBF_SUPPORTED_VERSIONS.indexOf(n[0]) > -1 && n[2] <= 12 && n[3] <= 31) return DBF.to_workbook(d, o);
317458
317524
  return read_prn(data, d, o, str2);
317459
317525
  }
317460
- function readFileSync19(filename, opts) {
317526
+ function readFileSync20(filename, opts) {
317461
317527
  var o = opts || {};
317462
317528
  o.type = "file";
317463
317529
  return readSync(filename, o);
@@ -317692,7 +317758,7 @@ var require_xlsx = __commonJS({
317692
317758
  if (ext.match(/^\.[a-z]+$/)) o.bookType = ext.slice(1);
317693
317759
  o.bookType = _BT[o.bookType] || o.bookType;
317694
317760
  }
317695
- function writeFileSync13(wb, filename, opts) {
317761
+ function writeFileSync14(wb, filename, opts) {
317696
317762
  var o = opts || {};
317697
317763
  o.type = "file";
317698
317764
  o.file = filename;
@@ -318293,11 +318359,11 @@ var require_xlsx = __commonJS({
318293
318359
  if (typeof parse_xlscfb !== "undefined") XLSX3.parse_xlscfb = parse_xlscfb;
318294
318360
  XLSX3.parse_zip = parse_zip;
318295
318361
  XLSX3.read = readSync;
318296
- XLSX3.readFile = readFileSync19;
318297
- XLSX3.readFileSync = readFileSync19;
318362
+ XLSX3.readFile = readFileSync20;
318363
+ XLSX3.readFileSync = readFileSync20;
318298
318364
  XLSX3.write = writeSync;
318299
- XLSX3.writeFile = writeFileSync13;
318300
- XLSX3.writeFileSync = writeFileSync13;
318365
+ XLSX3.writeFile = writeFileSync14;
318366
+ XLSX3.writeFileSync = writeFileSync14;
318301
318367
  XLSX3.writeFileAsync = writeFileAsync;
318302
318368
  XLSX3.utils = utils2;
318303
318369
  XLSX3.writeXLSX = writeSyncXLSX;
@@ -320026,7 +320092,7 @@ var init_pdf = __esm({
320026
320092
  var defineProperty = Object.defineProperty;
320027
320093
  var stringSlice = uncurryThis("".slice);
320028
320094
  var replace2 = uncurryThis("".replace);
320029
- var join28 = uncurryThis([].join);
320095
+ var join29 = uncurryThis([].join);
320030
320096
  var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function() {
320031
320097
  return defineProperty(function() {
320032
320098
  }, "length", { value: 8 }).length !== 8;
@@ -320053,7 +320119,7 @@ var init_pdf = __esm({
320053
320119
  }
320054
320120
  var state = enforceInternalState(value);
320055
320121
  if (!hasOwn(state, "source")) {
320056
- state.source = join28(TEMPLATE, typeof name == "string" ? name : "");
320122
+ state.source = join29(TEMPLATE, typeof name == "string" ? name : "");
320057
320123
  }
320058
320124
  return value;
320059
320125
  };
@@ -405024,7 +405090,7 @@ var require_util12 = __commonJS({
405024
405090
  return path48;
405025
405091
  }
405026
405092
  exports2.normalize = normalize5;
405027
- function join28(aRoot, aPath) {
405093
+ function join29(aRoot, aPath) {
405028
405094
  if (aRoot === "") {
405029
405095
  aRoot = ".";
405030
405096
  }
@@ -405056,7 +405122,7 @@ var require_util12 = __commonJS({
405056
405122
  }
405057
405123
  return joined;
405058
405124
  }
405059
- exports2.join = join28;
405125
+ exports2.join = join29;
405060
405126
  exports2.isAbsolute = function(aPath) {
405061
405127
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
405062
405128
  };
@@ -405229,7 +405295,7 @@ var require_util12 = __commonJS({
405229
405295
  parsed.path = parsed.path.substring(0, index + 1);
405230
405296
  }
405231
405297
  }
405232
- sourceURL = join28(urlGenerate(parsed), sourceURL);
405298
+ sourceURL = join29(urlGenerate(parsed), sourceURL);
405233
405299
  }
405234
405300
  return normalize5(sourceURL);
405235
405301
  }
@@ -407031,7 +407097,7 @@ var require_escodegen = __commonJS({
407031
407097
  function noEmptySpace() {
407032
407098
  return space ? space : " ";
407033
407099
  }
407034
- function join28(left, right) {
407100
+ function join29(left, right) {
407035
407101
  var leftSource, rightSource, leftCharCode, rightCharCode;
407036
407102
  leftSource = toSourceNodeWhenNeeded(left).toString();
407037
407103
  if (leftSource.length === 0) {
@@ -407362,8 +407428,8 @@ var require_escodegen = __commonJS({
407362
407428
  } else {
407363
407429
  result2.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
407364
407430
  }
407365
- result2 = join28(result2, operator);
407366
- result2 = [join28(
407431
+ result2 = join29(result2, operator);
407432
+ result2 = [join29(
407367
407433
  result2,
407368
407434
  that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
407369
407435
  ), ")"];
@@ -407506,11 +407572,11 @@ var require_escodegen = __commonJS({
407506
407572
  var result2, fragment;
407507
407573
  result2 = ["class"];
407508
407574
  if (stmt.id) {
407509
- result2 = join28(result2, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
407575
+ result2 = join29(result2, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
407510
407576
  }
407511
407577
  if (stmt.superClass) {
407512
- fragment = join28("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
407513
- result2 = join28(result2, fragment);
407578
+ fragment = join29("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
407579
+ result2 = join29(result2, fragment);
407514
407580
  }
407515
407581
  result2.push(space);
407516
407582
  result2.push(this.generateStatement(stmt.body, S_TFFT));
@@ -407523,9 +407589,9 @@ var require_escodegen = __commonJS({
407523
407589
  return escapeDirective(stmt.directive) + this.semicolon(flags);
407524
407590
  },
407525
407591
  DoWhileStatement: function(stmt, flags) {
407526
- var result2 = join28("do", this.maybeBlock(stmt.body, S_TFFF));
407592
+ var result2 = join29("do", this.maybeBlock(stmt.body, S_TFFF));
407527
407593
  result2 = this.maybeBlockSuffix(stmt.body, result2);
407528
- return join28(result2, [
407594
+ return join29(result2, [
407529
407595
  "while" + space + "(",
407530
407596
  this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
407531
407597
  ")" + this.semicolon(flags)
@@ -407561,11 +407627,11 @@ var require_escodegen = __commonJS({
407561
407627
  ExportDefaultDeclaration: function(stmt, flags) {
407562
407628
  var result2 = ["export"], bodyFlags;
407563
407629
  bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
407564
- result2 = join28(result2, "default");
407630
+ result2 = join29(result2, "default");
407565
407631
  if (isStatement(stmt.declaration)) {
407566
- result2 = join28(result2, this.generateStatement(stmt.declaration, bodyFlags));
407632
+ result2 = join29(result2, this.generateStatement(stmt.declaration, bodyFlags));
407567
407633
  } else {
407568
- result2 = join28(result2, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
407634
+ result2 = join29(result2, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
407569
407635
  }
407570
407636
  return result2;
407571
407637
  },
@@ -407573,15 +407639,15 @@ var require_escodegen = __commonJS({
407573
407639
  var result2 = ["export"], bodyFlags, that = this;
407574
407640
  bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
407575
407641
  if (stmt.declaration) {
407576
- return join28(result2, this.generateStatement(stmt.declaration, bodyFlags));
407642
+ return join29(result2, this.generateStatement(stmt.declaration, bodyFlags));
407577
407643
  }
407578
407644
  if (stmt.specifiers) {
407579
407645
  if (stmt.specifiers.length === 0) {
407580
- result2 = join28(result2, "{" + space + "}");
407646
+ result2 = join29(result2, "{" + space + "}");
407581
407647
  } else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
407582
- result2 = join28(result2, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
407648
+ result2 = join29(result2, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
407583
407649
  } else {
407584
- result2 = join28(result2, "{");
407650
+ result2 = join29(result2, "{");
407585
407651
  withIndent(function(indent2) {
407586
407652
  var i, iz;
407587
407653
  result2.push(newline3);
@@ -407599,7 +407665,7 @@ var require_escodegen = __commonJS({
407599
407665
  result2.push(base + "}");
407600
407666
  }
407601
407667
  if (stmt.source) {
407602
- result2 = join28(result2, [
407668
+ result2 = join29(result2, [
407603
407669
  "from" + space,
407604
407670
  // ModuleSpecifier
407605
407671
  this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
@@ -407687,7 +407753,7 @@ var require_escodegen = __commonJS({
407687
407753
  ];
407688
407754
  cursor4 = 0;
407689
407755
  if (stmt.specifiers[cursor4].type === Syntax.ImportDefaultSpecifier) {
407690
- result2 = join28(result2, [
407756
+ result2 = join29(result2, [
407691
407757
  this.generateExpression(stmt.specifiers[cursor4], Precedence.Sequence, E_TTT)
407692
407758
  ]);
407693
407759
  ++cursor4;
@@ -407697,7 +407763,7 @@ var require_escodegen = __commonJS({
407697
407763
  result2.push(",");
407698
407764
  }
407699
407765
  if (stmt.specifiers[cursor4].type === Syntax.ImportNamespaceSpecifier) {
407700
- result2 = join28(result2, [
407766
+ result2 = join29(result2, [
407701
407767
  space,
407702
407768
  this.generateExpression(stmt.specifiers[cursor4], Precedence.Sequence, E_TTT)
407703
407769
  ]);
@@ -407726,7 +407792,7 @@ var require_escodegen = __commonJS({
407726
407792
  }
407727
407793
  }
407728
407794
  }
407729
- result2 = join28(result2, [
407795
+ result2 = join29(result2, [
407730
407796
  "from" + space,
407731
407797
  // ModuleSpecifier
407732
407798
  this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
@@ -407780,7 +407846,7 @@ var require_escodegen = __commonJS({
407780
407846
  return result2;
407781
407847
  },
407782
407848
  ThrowStatement: function(stmt, flags) {
407783
- return [join28(
407849
+ return [join29(
407784
407850
  "throw",
407785
407851
  this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
407786
407852
  ), this.semicolon(flags)];
@@ -407791,7 +407857,7 @@ var require_escodegen = __commonJS({
407791
407857
  result2 = this.maybeBlockSuffix(stmt.block, result2);
407792
407858
  if (stmt.handlers) {
407793
407859
  for (i = 0, iz = stmt.handlers.length; i < iz; ++i) {
407794
- result2 = join28(result2, this.generateStatement(stmt.handlers[i], S_TFFF));
407860
+ result2 = join29(result2, this.generateStatement(stmt.handlers[i], S_TFFF));
407795
407861
  if (stmt.finalizer || i + 1 !== iz) {
407796
407862
  result2 = this.maybeBlockSuffix(stmt.handlers[i].body, result2);
407797
407863
  }
@@ -407799,7 +407865,7 @@ var require_escodegen = __commonJS({
407799
407865
  } else {
407800
407866
  guardedHandlers = stmt.guardedHandlers || [];
407801
407867
  for (i = 0, iz = guardedHandlers.length; i < iz; ++i) {
407802
- result2 = join28(result2, this.generateStatement(guardedHandlers[i], S_TFFF));
407868
+ result2 = join29(result2, this.generateStatement(guardedHandlers[i], S_TFFF));
407803
407869
  if (stmt.finalizer || i + 1 !== iz) {
407804
407870
  result2 = this.maybeBlockSuffix(guardedHandlers[i].body, result2);
407805
407871
  }
@@ -407807,13 +407873,13 @@ var require_escodegen = __commonJS({
407807
407873
  if (stmt.handler) {
407808
407874
  if (Array.isArray(stmt.handler)) {
407809
407875
  for (i = 0, iz = stmt.handler.length; i < iz; ++i) {
407810
- result2 = join28(result2, this.generateStatement(stmt.handler[i], S_TFFF));
407876
+ result2 = join29(result2, this.generateStatement(stmt.handler[i], S_TFFF));
407811
407877
  if (stmt.finalizer || i + 1 !== iz) {
407812
407878
  result2 = this.maybeBlockSuffix(stmt.handler[i].body, result2);
407813
407879
  }
407814
407880
  }
407815
407881
  } else {
407816
- result2 = join28(result2, this.generateStatement(stmt.handler, S_TFFF));
407882
+ result2 = join29(result2, this.generateStatement(stmt.handler, S_TFFF));
407817
407883
  if (stmt.finalizer) {
407818
407884
  result2 = this.maybeBlockSuffix(stmt.handler.body, result2);
407819
407885
  }
@@ -407821,7 +407887,7 @@ var require_escodegen = __commonJS({
407821
407887
  }
407822
407888
  }
407823
407889
  if (stmt.finalizer) {
407824
- result2 = join28(result2, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
407890
+ result2 = join29(result2, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
407825
407891
  }
407826
407892
  return result2;
407827
407893
  },
@@ -407855,7 +407921,7 @@ var require_escodegen = __commonJS({
407855
407921
  withIndent(function() {
407856
407922
  if (stmt.test) {
407857
407923
  result2 = [
407858
- join28("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
407924
+ join29("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
407859
407925
  ":"
407860
407926
  ];
407861
407927
  } else {
@@ -407903,9 +407969,9 @@ var require_escodegen = __commonJS({
407903
407969
  result2.push(this.maybeBlock(stmt.consequent, S_TFFF));
407904
407970
  result2 = this.maybeBlockSuffix(stmt.consequent, result2);
407905
407971
  if (stmt.alternate.type === Syntax.IfStatement) {
407906
- result2 = join28(result2, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
407972
+ result2 = join29(result2, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
407907
407973
  } else {
407908
- result2 = join28(result2, join28("else", this.maybeBlock(stmt.alternate, bodyFlags)));
407974
+ result2 = join29(result2, join29("else", this.maybeBlock(stmt.alternate, bodyFlags)));
407909
407975
  }
407910
407976
  } else {
407911
407977
  result2.push(this.maybeBlock(stmt.consequent, bodyFlags));
@@ -408006,7 +408072,7 @@ var require_escodegen = __commonJS({
408006
408072
  },
408007
408073
  ReturnStatement: function(stmt, flags) {
408008
408074
  if (stmt.argument) {
408009
- return [join28(
408075
+ return [join29(
408010
408076
  "return",
408011
408077
  this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
408012
408078
  ), this.semicolon(flags)];
@@ -408095,14 +408161,14 @@ var require_escodegen = __commonJS({
408095
408161
  if (leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
408096
408162
  result2 = [fragment, noEmptySpace(), expr.operator];
408097
408163
  } else {
408098
- result2 = join28(fragment, expr.operator);
408164
+ result2 = join29(fragment, expr.operator);
408099
408165
  }
408100
408166
  fragment = this.generateExpression(expr.right, rightPrecedence, flags);
408101
408167
  if (expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--") {
408102
408168
  result2.push(noEmptySpace());
408103
408169
  result2.push(fragment);
408104
408170
  } else {
408105
- result2 = join28(result2, fragment);
408171
+ result2 = join29(result2, fragment);
408106
408172
  }
408107
408173
  if (expr.operator === "in" && !(flags & F_ALLOW_IN)) {
408108
408174
  return ["(", result2, ")"];
@@ -408142,7 +408208,7 @@ var require_escodegen = __commonJS({
408142
408208
  var result2, length, i, iz, itemFlags;
408143
408209
  length = expr["arguments"].length;
408144
408210
  itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF;
408145
- result2 = join28(
408211
+ result2 = join29(
408146
408212
  "new",
408147
408213
  this.generateExpression(expr.callee, Precedence.New, itemFlags)
408148
408214
  );
@@ -408192,11 +408258,11 @@ var require_escodegen = __commonJS({
408192
408258
  var result2, fragment, rightCharCode, leftSource, leftCharCode;
408193
408259
  fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
408194
408260
  if (space === "") {
408195
- result2 = join28(expr.operator, fragment);
408261
+ result2 = join29(expr.operator, fragment);
408196
408262
  } else {
408197
408263
  result2 = [expr.operator];
408198
408264
  if (expr.operator.length > 2) {
408199
- result2 = join28(result2, fragment);
408265
+ result2 = join29(result2, fragment);
408200
408266
  } else {
408201
408267
  leftSource = toSourceNodeWhenNeeded(result2).toString();
408202
408268
  leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
@@ -408219,7 +408285,7 @@ var require_escodegen = __commonJS({
408219
408285
  result2 = "yield";
408220
408286
  }
408221
408287
  if (expr.argument) {
408222
- result2 = join28(
408288
+ result2 = join29(
408223
408289
  result2,
408224
408290
  this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
408225
408291
  );
@@ -408227,7 +408293,7 @@ var require_escodegen = __commonJS({
408227
408293
  return parenthesize(result2, Precedence.Yield, precedence);
408228
408294
  },
408229
408295
  AwaitExpression: function(expr, precedence, flags) {
408230
- var result2 = join28(
408296
+ var result2 = join29(
408231
408297
  expr.all ? "await*" : "await",
408232
408298
  this.generateExpression(expr.argument, Precedence.Await, E_TTT)
408233
408299
  );
@@ -408310,11 +408376,11 @@ var require_escodegen = __commonJS({
408310
408376
  var result2, fragment;
408311
408377
  result2 = ["class"];
408312
408378
  if (expr.id) {
408313
- result2 = join28(result2, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
408379
+ result2 = join29(result2, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
408314
408380
  }
408315
408381
  if (expr.superClass) {
408316
- fragment = join28("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
408317
- result2 = join28(result2, fragment);
408382
+ fragment = join29("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
408383
+ result2 = join29(result2, fragment);
408318
408384
  }
408319
408385
  result2.push(space);
408320
408386
  result2.push(this.generateStatement(expr.body, S_TFFT));
@@ -408329,7 +408395,7 @@ var require_escodegen = __commonJS({
408329
408395
  }
408330
408396
  if (expr.kind === "get" || expr.kind === "set") {
408331
408397
  fragment = [
408332
- join28(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
408398
+ join29(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
408333
408399
  this.generateFunctionBody(expr.value)
408334
408400
  ];
408335
408401
  } else {
@@ -408339,7 +408405,7 @@ var require_escodegen = __commonJS({
408339
408405
  this.generateFunctionBody(expr.value)
408340
408406
  ];
408341
408407
  }
408342
- return join28(result2, fragment);
408408
+ return join29(result2, fragment);
408343
408409
  },
408344
408410
  Property: function(expr, precedence, flags) {
408345
408411
  if (expr.kind === "get" || expr.kind === "set") {
@@ -408534,7 +408600,7 @@ var require_escodegen = __commonJS({
408534
408600
  for (i = 0, iz = expr.blocks.length; i < iz; ++i) {
408535
408601
  fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT);
408536
408602
  if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
408537
- result2 = join28(result2, fragment);
408603
+ result2 = join29(result2, fragment);
408538
408604
  } else {
408539
408605
  result2.push(fragment);
408540
408606
  }
@@ -408542,13 +408608,13 @@ var require_escodegen = __commonJS({
408542
408608
  });
408543
408609
  }
408544
408610
  if (expr.filter) {
408545
- result2 = join28(result2, "if" + space);
408611
+ result2 = join29(result2, "if" + space);
408546
408612
  fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
408547
- result2 = join28(result2, ["(", fragment, ")"]);
408613
+ result2 = join29(result2, ["(", fragment, ")"]);
408548
408614
  }
408549
408615
  if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
408550
408616
  fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
408551
- result2 = join28(result2, fragment);
408617
+ result2 = join29(result2, fragment);
408552
408618
  }
408553
408619
  result2.push(expr.type === Syntax.GeneratorExpression ? ")" : "]");
408554
408620
  return result2;
@@ -408564,8 +408630,8 @@ var require_escodegen = __commonJS({
408564
408630
  } else {
408565
408631
  fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
408566
408632
  }
408567
- fragment = join28(fragment, expr.of ? "of" : "in");
408568
- fragment = join28(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
408633
+ fragment = join29(fragment, expr.of ? "of" : "in");
408634
+ fragment = join29(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
408569
408635
  return ["for" + space + "(", fragment, ")"];
408570
408636
  },
408571
408637
  SpreadElement: function(expr, precedence, flags) {
@@ -444771,6 +444837,10 @@ function useCommandPanel(buffer, isProcessing = false) {
444771
444837
  name: "reindex",
444772
444838
  description: t.commandPanel.commands.reindex
444773
444839
  },
444840
+ {
444841
+ name: "permissions",
444842
+ description: t.commandPanel.commands.permissions || "Manage tool permissions"
444843
+ },
444774
444844
  {
444775
444845
  name: "vulnerability-hunting",
444776
444846
  description: t.commandPanel.commands.vulnerabilityHunting || "Toggle vulnerability hunting mode"
@@ -446159,7 +446229,9 @@ function useKeyboardInput(options3) {
446159
446229
  executeCommand(selectedCommand.name).then((result2) => {
446160
446230
  commandUsageManager.recordUsage(selectedCommand.name);
446161
446231
  if (onCommand) {
446162
- onCommand(selectedCommand.name, result2);
446232
+ Promise.resolve(onCommand(selectedCommand.name, result2)).catch((error) => {
446233
+ console.error("Command execution error:", error);
446234
+ });
446163
446235
  }
446164
446236
  });
446165
446237
  buffer.setText("");
@@ -446211,7 +446283,9 @@ function useKeyboardInput(options3) {
446211
446283
  executeCommand(commandName, commandArgs).then((result2) => {
446212
446284
  commandUsageManager.recordUsage(commandName);
446213
446285
  if (onCommand) {
446214
- onCommand(commandName, result2);
446286
+ Promise.resolve(onCommand(commandName, result2)).catch((error) => {
446287
+ console.error("Command execution error:", error);
446288
+ });
446215
446289
  }
446216
446290
  });
446217
446291
  buffer.setText("");
@@ -447128,7 +447202,7 @@ var init_FileList = __esm({
447128
447202
  const [isLoading, setIsLoading] = (0, import_react88.useState)(false);
447129
447203
  const [searchDepth, setSearchDepth] = (0, import_react88.useState)(5);
447130
447204
  const [isIncreasingDepth, setIsIncreasingDepth] = (0, import_react88.useState)(false);
447131
- const [actualMaxDepth, setActualMaxDepth] = (0, import_react88.useState)(0);
447205
+ const [hasMoreDepth, setHasMoreDepth] = (0, import_react88.useState)(true);
447132
447206
  const { columns: terminalWidth } = useTerminalSize();
447133
447207
  const MAX_DISPLAY_ITEMS = 5;
447134
447208
  const effectiveMaxItems = (0, import_react88.useMemo)(() => {
@@ -447231,9 +447305,10 @@ var init_FileList = __esm({
447231
447305
  break;
447232
447306
  }
447233
447307
  }
447308
+ const hitDepthLimit = globalMaxDepth >= searchDepth - 1;
447234
447309
  setIsLoading(true);
447235
447310
  setFiles(allFiles);
447236
- setActualMaxDepth(globalMaxDepth);
447311
+ setHasMoreDepth(hitDepthLimit);
447237
447312
  setIsLoading(false);
447238
447313
  }, [searchDepth]);
447239
447314
  const searchFileContent = (0, import_react88.useCallback)(async (query2) => {
@@ -447375,16 +447450,13 @@ var init_FileList = __esm({
447375
447450
  return a.name.localeCompare(b.name);
447376
447451
  });
447377
447452
  setAllFilteredFiles(filtered);
447378
- if (filtered.length === 0 && query.trim().length > 0 && actualMaxDepth >= searchDepth) {
447379
- setIsIncreasingDepth(true);
447453
+ if (filtered.length === 0 && query.trim().length > 0 && hasMoreDepth) {
447380
447454
  const newDepth = searchDepth + 5;
447381
447455
  setSearchDepth(newDepth);
447456
+ setIsIncreasingDepth(true);
447382
447457
  setTimeout(() => {
447383
- loadFiles();
447384
- setTimeout(() => {
447385
- setIsIncreasingDepth(false);
447386
- }, 500);
447387
- }, 100);
447458
+ setIsIncreasingDepth(false);
447459
+ }, 300);
447388
447460
  }
447389
447461
  }
447390
447462
  };
@@ -447400,7 +447472,7 @@ var init_FileList = __esm({
447400
447472
  searchFileContent,
447401
447473
  searchDepth,
447402
447474
  loadFiles,
447403
- actualMaxDepth
447475
+ hasMoreDepth
447404
447476
  ]);
447405
447477
  const filteredFiles = (0, import_react88.useMemo)(() => {
447406
447478
  if (allFilteredFiles.length <= effectiveMaxItems) {
@@ -448944,6 +449016,8 @@ function ToolConfirmation({ toolName, toolArguments, allTools, onConfirm, onHook
448944
449016
  const [hasSelected, setHasSelected] = (0, import_react98.useState)(false);
448945
449017
  const [showRejectInput, setShowRejectInput] = (0, import_react98.useState)(false);
448946
449018
  const [rejectReason, setRejectReason] = (0, import_react98.useState)("");
449019
+ const [menuKey, setMenuKey] = (0, import_react98.useState)(0);
449020
+ const [initialMenuIndex, setInitialMenuIndex] = (0, import_react98.useState)(0);
448947
449021
  const sensitiveCommandCheck = (0, import_react98.useMemo)(() => {
448948
449022
  if (toolName !== "terminal-execute" || !toolArguments) {
448949
449023
  return { isSensitive: false };
@@ -449138,6 +449212,15 @@ Output: ${combinedOutput}`);
449138
449212
  });
449139
449213
  return baseItems;
449140
449214
  }, [sensitiveCommandCheck.isSensitive, t]);
449215
+ use_input_default((_input, key) => {
449216
+ if (showRejectInput && key.escape) {
449217
+ setShowRejectInput(false);
449218
+ setRejectReason("");
449219
+ const idx2 = items.findIndex((i) => i.value === "reject_with_reply");
449220
+ setInitialMenuIndex(idx2 >= 0 ? idx2 : 0);
449221
+ setMenuKey((k) => k + 1);
449222
+ }
449223
+ });
449141
449224
  const handleSelect = (item) => {
449142
449225
  if (!hasSelected) {
449143
449226
  if (item.value === "reject_with_reply") {
@@ -449277,7 +449360,7 @@ Output: ${combinedOutput}`);
449277
449360
  { marginBottom: 1 },
449278
449361
  import_react98.default.createElement(Text, { dimColor: true }, t.toolConfirmation.selectAction)
449279
449362
  ),
449280
- !hasSelected && !showRejectInput && import_react98.default.createElement(SelectInput_default, { items, onSelect: handleSelect }),
449363
+ !hasSelected && !showRejectInput && import_react98.default.createElement(SelectInput_default, { key: menuKey, items, onSelect: handleSelect, initialIndex: initialMenuIndex }),
449281
449364
  showRejectInput && !hasSelected && import_react98.default.createElement(
449282
449365
  Box_default,
449283
449366
  { flexDirection: "column" },
@@ -469289,7 +469372,7 @@ var require_core6 = __commonJS({
469289
469372
  return match2 && match2.index === 0;
469290
469373
  }
469291
469374
  var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
469292
- function join28(regexps, separator = "|") {
469375
+ function join29(regexps, separator = "|") {
469293
469376
  let numCaptures = 0;
469294
469377
  return regexps.map((regex2) => {
469295
469378
  numCaptures += 1;
@@ -469593,7 +469676,7 @@ var require_core6 = __commonJS({
469593
469676
  this.exec = () => null;
469594
469677
  }
469595
469678
  const terminators = this.regexes.map((el) => el[1]);
469596
- this.matcherRe = langRe(join28(terminators), true);
469679
+ this.matcherRe = langRe(join29(terminators), true);
469597
469680
  this.lastIndex = 0;
469598
469681
  }
469599
469682
  /** @param {string} s */
@@ -527483,11 +527566,103 @@ var init_useSessionSave = __esm({
527483
527566
  }
527484
527567
  });
527485
527568
 
527569
+ // dist/utils/config/permissionsConfig.js
527570
+ import { join as join22 } from "path";
527571
+ import { readFileSync as readFileSync17, writeFileSync as writeFileSync11, existsSync as existsSync22, mkdirSync as mkdirSync11 } from "fs";
527572
+ function getSnowDirPath2(workingDirectory) {
527573
+ return join22(workingDirectory, SNOW_DIR3);
527574
+ }
527575
+ function getPermissionsFilePath(workingDirectory) {
527576
+ return join22(getSnowDirPath2(workingDirectory), PERMISSIONS_FILE);
527577
+ }
527578
+ function ensureConfigDirectory7(workingDirectory) {
527579
+ const snowDir = getSnowDirPath2(workingDirectory);
527580
+ if (!existsSync22(snowDir)) {
527581
+ mkdirSync11(snowDir, { recursive: true });
527582
+ }
527583
+ }
527584
+ function loadPermissionsConfig(workingDirectory) {
527585
+ ensureConfigDirectory7(workingDirectory);
527586
+ const configPath = getPermissionsFilePath(workingDirectory);
527587
+ if (!existsSync22(configPath)) {
527588
+ return { ...DEFAULT_CONFIG5 };
527589
+ }
527590
+ try {
527591
+ const configData = readFileSync17(configPath, "utf-8");
527592
+ const config3 = JSON.parse(configData);
527593
+ return {
527594
+ alwaysApprovedTools: Array.isArray(config3.alwaysApprovedTools) ? config3.alwaysApprovedTools : []
527595
+ };
527596
+ } catch (error) {
527597
+ console.error("Failed to load permissions config:", error);
527598
+ return { ...DEFAULT_CONFIG5 };
527599
+ }
527600
+ }
527601
+ function savePermissionsConfig(workingDirectory, config3) {
527602
+ ensureConfigDirectory7(workingDirectory);
527603
+ const configPath = getPermissionsFilePath(workingDirectory);
527604
+ try {
527605
+ const configData = JSON.stringify(config3, null, 2);
527606
+ writeFileSync11(configPath, configData, "utf-8");
527607
+ } catch (error) {
527608
+ console.error("Failed to save permissions config:", error);
527609
+ throw error;
527610
+ }
527611
+ }
527612
+ function addToolToPermissions(workingDirectory, toolName) {
527613
+ const config3 = loadPermissionsConfig(workingDirectory);
527614
+ if (!config3.alwaysApprovedTools.includes(toolName)) {
527615
+ config3.alwaysApprovedTools.push(toolName);
527616
+ savePermissionsConfig(workingDirectory, config3);
527617
+ }
527618
+ }
527619
+ function addMultipleToolsToPermissions(workingDirectory, toolNames) {
527620
+ const config3 = loadPermissionsConfig(workingDirectory);
527621
+ let modified = false;
527622
+ for (const toolName of toolNames) {
527623
+ if (!config3.alwaysApprovedTools.includes(toolName)) {
527624
+ config3.alwaysApprovedTools.push(toolName);
527625
+ modified = true;
527626
+ }
527627
+ }
527628
+ if (modified) {
527629
+ savePermissionsConfig(workingDirectory, config3);
527630
+ }
527631
+ }
527632
+ function removeToolFromPermissions(workingDirectory, toolName) {
527633
+ const config3 = loadPermissionsConfig(workingDirectory);
527634
+ const index = config3.alwaysApprovedTools.indexOf(toolName);
527635
+ if (index !== -1) {
527636
+ config3.alwaysApprovedTools.splice(index, 1);
527637
+ savePermissionsConfig(workingDirectory, config3);
527638
+ }
527639
+ }
527640
+ function clearAllPermissions(workingDirectory) {
527641
+ savePermissionsConfig(workingDirectory, { alwaysApprovedTools: [] });
527642
+ }
527643
+ var SNOW_DIR3, PERMISSIONS_FILE, DEFAULT_CONFIG5;
527644
+ var init_permissionsConfig = __esm({
527645
+ "dist/utils/config/permissionsConfig.js"() {
527646
+ "use strict";
527647
+ SNOW_DIR3 = ".snow";
527648
+ PERMISSIONS_FILE = "permissions.json";
527649
+ DEFAULT_CONFIG5 = {
527650
+ alwaysApprovedTools: []
527651
+ };
527652
+ }
527653
+ });
527654
+
527486
527655
  // dist/hooks/conversation/useToolConfirmation.js
527487
- function useToolConfirmation() {
527656
+ function useToolConfirmation(workingDirectory) {
527488
527657
  const [pendingToolConfirmation, setPendingToolConfirmation] = (0, import_react120.useState)(null);
527489
527658
  const alwaysApprovedToolsRef = (0, import_react120.useRef)(/* @__PURE__ */ new Set());
527490
527659
  const [alwaysApprovedTools, setAlwaysApprovedTools] = (0, import_react120.useState)(/* @__PURE__ */ new Set());
527660
+ (0, import_react120.useEffect)(() => {
527661
+ const config3 = loadPermissionsConfig(workingDirectory);
527662
+ const loadedTools = new Set(config3.alwaysApprovedTools);
527663
+ alwaysApprovedToolsRef.current = loadedTools;
527664
+ setAlwaysApprovedTools(loadedTools);
527665
+ }, [workingDirectory]);
527491
527666
  const requestToolConfirmation = async (toolCall, batchToolNames, allTools) => {
527492
527667
  return new Promise((resolve10) => {
527493
527668
  setPendingToolConfirmation({
@@ -527502,23 +527677,41 @@ function useToolConfirmation() {
527502
527677
  });
527503
527678
  };
527504
527679
  const isToolAutoApproved = (0, import_react120.useCallback)((toolName) => {
527505
- return alwaysApprovedToolsRef.current.has(toolName) || toolName.startsWith("todo-") || toolName.startsWith("subagent-");
527680
+ return alwaysApprovedToolsRef.current.has(toolName) || toolName.startsWith("todo-") || toolName.startsWith("subagent-") || toolName === "askuser-ask_question";
527506
527681
  }, []);
527507
527682
  const addToAlwaysApproved = (0, import_react120.useCallback)((toolName) => {
527508
527683
  alwaysApprovedToolsRef.current.add(toolName);
527509
527684
  setAlwaysApprovedTools((prev) => /* @__PURE__ */ new Set([...prev, toolName]));
527510
- }, []);
527685
+ addToolToPermissions(workingDirectory, toolName);
527686
+ }, [workingDirectory]);
527511
527687
  const addMultipleToAlwaysApproved = (0, import_react120.useCallback)((toolNames) => {
527512
527688
  toolNames.forEach((name) => alwaysApprovedToolsRef.current.add(name));
527513
527689
  setAlwaysApprovedTools((prev) => /* @__PURE__ */ new Set([...prev, ...toolNames]));
527514
- }, []);
527690
+ addMultipleToolsToPermissions(workingDirectory, toolNames);
527691
+ }, [workingDirectory]);
527692
+ const removeFromAlwaysApproved = (0, import_react120.useCallback)((toolName) => {
527693
+ alwaysApprovedToolsRef.current.delete(toolName);
527694
+ setAlwaysApprovedTools((prev) => {
527695
+ const next = new Set(prev);
527696
+ next.delete(toolName);
527697
+ return next;
527698
+ });
527699
+ removeToolFromPermissions(workingDirectory, toolName);
527700
+ }, [workingDirectory]);
527701
+ const clearAllAlwaysApproved = (0, import_react120.useCallback)(() => {
527702
+ alwaysApprovedToolsRef.current.clear();
527703
+ setAlwaysApprovedTools(/* @__PURE__ */ new Set());
527704
+ clearAllPermissions(workingDirectory);
527705
+ }, [workingDirectory]);
527515
527706
  return {
527516
527707
  pendingToolConfirmation,
527517
527708
  alwaysApprovedTools,
527518
527709
  requestToolConfirmation,
527519
527710
  isToolAutoApproved,
527520
527711
  addToAlwaysApproved,
527521
- addMultipleToAlwaysApproved
527712
+ addMultipleToAlwaysApproved,
527713
+ removeFromAlwaysApproved,
527714
+ clearAllAlwaysApproved
527522
527715
  };
527523
527716
  }
527524
527717
  var import_react120;
@@ -527526,6 +527719,7 @@ var init_useToolConfirmation = __esm({
527526
527719
  "dist/hooks/conversation/useToolConfirmation.js"() {
527527
527720
  "use strict";
527528
527721
  import_react120 = __toESM(require_react(), 1);
527722
+ init_permissionsConfig();
527529
527723
  }
527530
527724
  });
527531
527725
 
@@ -528593,33 +528787,46 @@ async function executeContextCompression(sessionId) {
528593
528787
  };
528594
528788
  }
528595
528789
  const newSessionMessages = [];
528596
- newSessionMessages.push({
528597
- role: "user",
528598
- content: `[Context Summary from Previous Conversation]
528790
+ let finalContent = `[Context Summary from Previous Conversation]
528599
528791
 
528600
- ${compressionResult.summary}`,
528601
- timestamp: Date.now()
528602
- });
528792
+ ${compressionResult.summary}`;
528603
528793
  if (compressionResult.preservedMessages && compressionResult.preservedMessages.length > 0) {
528794
+ finalContent += "\n\n---\n\n[Last Interaction - Preserved for Continuity]\n\n";
528604
528795
  for (const msg of compressionResult.preservedMessages) {
528605
- newSessionMessages.push({
528606
- role: msg.role,
528607
- content: msg.content,
528608
- timestamp: Date.now(),
528609
- ...msg.tool_call_id !== void 0 && {
528610
- tool_call_id: msg.tool_call_id
528611
- },
528612
- ...msg.tool_calls !== void 0 && { tool_calls: msg.tool_calls },
528613
- ...msg.images !== void 0 && { images: msg.images },
528614
- ...msg.reasoning !== void 0 && { reasoning: msg.reasoning },
528615
- ...msg.thinking !== void 0 && { thinking: msg.thinking },
528616
- // 保留 thinking 字段(Anthropic Extended Thinking)
528617
- ...msg.subAgentInternal !== void 0 && {
528618
- subAgentInternal: msg.subAgentInternal
528796
+ if (msg.role === "user") {
528797
+ finalContent += `**User:**
528798
+ ${msg.content}
528799
+
528800
+ `;
528801
+ } else if (msg.role === "assistant") {
528802
+ finalContent += `**Assistant:**
528803
+ ${msg.content}`;
528804
+ if (msg.tool_calls && msg.tool_calls.length > 0) {
528805
+ finalContent += "\n\n**[Tool Calls Initiated]:**\n```json\n";
528806
+ finalContent += JSON.stringify(msg.tool_calls, null, 2);
528807
+ finalContent += "\n```\n\n";
528808
+ } else {
528809
+ finalContent += "\n\n";
528619
528810
  }
528620
- });
528811
+ } else if (msg.role === "tool") {
528812
+ finalContent += `**[Tool Result - ${msg.tool_call_id}]:**
528813
+ `;
528814
+ try {
528815
+ const parsed = JSON.parse(msg.content);
528816
+ finalContent += "```json\n" + JSON.stringify(parsed, null, 2) + "\n```\n\n";
528817
+ } catch {
528818
+ finalContent += `${msg.content}
528819
+
528820
+ `;
528821
+ }
528822
+ }
528621
528823
  }
528622
528824
  }
528825
+ newSessionMessages.push({
528826
+ role: "user",
528827
+ content: finalContent,
528828
+ timestamp: Date.now()
528829
+ });
528623
528830
  const compressedSession = await sessionManager.createNewSession(false);
528624
528831
  compressedSession.messages = newSessionMessages;
528625
528832
  compressedSession.messageCount = newSessionMessages.length;
@@ -528674,6 +528881,7 @@ function useCommandHandler(options3) {
528674
528881
  const { stdout } = use_stdout_default();
528675
528882
  const handleCommandExecution = (0, import_react121.useCallback)(async (commandName, result2) => {
528676
528883
  if (commandName === "compact" && result2.success && result2.action === "compact") {
528884
+ console.log("[Compact] Starting compression, setting isCompressing=true");
528677
528885
  options3.setIsCompressing(true);
528678
528886
  options3.setCompressionError(null);
528679
528887
  try {
@@ -528681,16 +528889,19 @@ function useCommandHandler(options3) {
528681
528889
  if (!currentSession) {
528682
528890
  throw new Error("No active session to compress");
528683
528891
  }
528892
+ console.log("[Compact] Executing compression for session:", currentSession.id);
528684
528893
  const compressionResult = await executeContextCompression(currentSession.id);
528685
528894
  if (!compressionResult) {
528686
528895
  throw new Error("Compression failed");
528687
528896
  }
528897
+ console.log("[Compact] Compression completed successfully");
528688
528898
  options3.clearSavedMessages();
528689
528899
  options3.setMessages(compressionResult.uiMessages);
528690
528900
  options3.setRemountKey((prev) => prev + 1);
528691
528901
  options3.setContextUsage(compressionResult.usage);
528692
528902
  } catch (error) {
528693
528903
  const errorMsg = error instanceof Error ? error.message : "Unknown compression error";
528904
+ console.error("[Compact] Compression error:", errorMsg);
528694
528905
  options3.setCompressionError(errorMsg);
528695
528906
  const errorMessage = {
528696
528907
  role: "assistant",
@@ -528701,6 +528912,7 @@ ${errorMsg}`,
528701
528912
  };
528702
528913
  options3.setMessages((prev) => [...prev, errorMessage]);
528703
528914
  } finally {
528915
+ console.log("[Compact] Setting isCompressing=false");
528704
528916
  options3.setIsCompressing(false);
528705
528917
  }
528706
528918
  return;
@@ -528842,6 +529054,14 @@ Output: ${combinedOutput}`;
528842
529054
  commandName
528843
529055
  };
528844
529056
  options3.setMessages((prev) => [...prev, commandMessage]);
529057
+ } else if (result2.success && result2.action === "showPermissionsPanel") {
529058
+ options3.setShowPermissionsPanel(true);
529059
+ const commandMessage = {
529060
+ role: "command",
529061
+ content: "",
529062
+ commandName
529063
+ };
529064
+ options3.setMessages((prev) => [...prev, commandMessage]);
528845
529065
  } else if (result2.success && result2.action === "executeCustomCommand" && result2.prompt) {
528846
529066
  const commandMessage = {
528847
529067
  role: "command",
@@ -529396,6 +529616,7 @@ async function handleConversationWithTools(options3) {
529396
529616
  }
529397
529617
  }
529398
529618
  }
529619
+ setStreamTokenCount(0);
529399
529620
  if (controller.signal.aborted) {
529400
529621
  freeEncoder();
529401
529622
  break;
@@ -530420,27 +530641,27 @@ var init_promptOptimizeAgent = __esm({
530420
530641
  return `${msg.role}: ${content}`;
530421
530642
  }).join("\n");
530422
530643
  }
530423
- const optimizationPrompt = `You are a prompt optimization assistant. Your task is to improve user prompts for better AI understanding while maintaining HIGH FIDELITY to the original content.
530644
+ const optimizationPrompt = `I want you to help me optimize this prompt so the AI can better understand my intent while maintaining HIGH FIDELITY to the original content.
530424
530645
 
530425
- User's original prompt:
530646
+ Here's my original prompt:
530426
530647
  ${userPrompt}${contextSummary}
530427
530648
 
530428
- Your optimization goals (in priority order):
530429
- 1. **HIGH FIDELITY REQUIREMENT**: Preserve ALL important information, details, and requirements from the user's original prompt - DO NOT lose or omit any critical content
530430
- 2. Preserve the EXACT SAME LANGUAGE as the user (if Chinese, stay Chinese; if English, stay English)
530431
- 3. Keep the core intent and meaning unchanged
530432
- 4. Make the prompt clearer and more specific ONLY if vague - if already clear, keep it as-is
530433
- 5. Add relevant context if the user is asking follow-up questions
530434
- 6. Break down complex requests into clear requirements without losing details
530649
+ I want you to follow these optimization goals (in priority order):
530650
+ 1. **HIGH FIDELITY REQUIREMENT**: Preserve ALL important information, details, and requirements from my original prompt - DO NOT lose or omit any critical content
530651
+ 2. Preserve the EXACT SAME LANGUAGE I'm using (if I wrote in Chinese, keep it Chinese; if English, keep it English)
530652
+ 3. Keep my core intent and meaning unchanged
530653
+ 4. Make my prompt clearer and more specific ONLY if it's vague - if it's already clear, keep it as-is
530654
+ 5. Add relevant context if I'm asking follow-up questions
530655
+ 6. Break down my complex requests into clear requirements without losing details
530435
530656
  7. Keep the tone natural and conversational
530436
- 8. DO NOT add unnecessary formality or change the user's communication style
530437
- 9. If the prompt is already clear and specific, return it as-is
530657
+ 8. DO NOT add unnecessary formality or change my communication style
530658
+ 9. If my prompt is already clear and specific, return it as-is
530438
530659
 
530439
530660
  CRITICAL RULES:
530440
- - NEVER remove important details, specific requirements, file paths, code snippets, or technical specifications
530441
- - NEVER simplify the prompt if it means losing user-provided information
530442
- - When in doubt, prefer preserving the original over optimizing
530443
- - The goal is CLARITY, not BREVITY - keep all important content
530661
+ - NEVER remove important details, specific requirements, file paths, code snippets, or technical specifications I provided
530662
+ - NEVER simplify my prompt if it means losing information I gave you
530663
+ - When in doubt, prefer preserving my original content over optimizing
530664
+ - The goal is CLARITY, not BREVITY - keep all my important content
530444
530665
 
530445
530666
  IMPORTANT: Output ONLY the optimized prompt text. No explanations, no meta-commentary, no JSON format. Just the optimized prompt itself.`;
530446
530667
  const messages = [
@@ -534624,6 +534845,218 @@ var init_reindexCodebase = __esm({
534624
534845
  }
534625
534846
  });
534626
534847
 
534848
+ // dist/ui/components/panels/PermissionsPanel.js
534849
+ var PermissionsPanel_exports = {};
534850
+ __export(PermissionsPanel_exports, {
534851
+ default: () => PermissionsPanel
534852
+ });
534853
+ function PermissionsPanel({ alwaysApprovedTools, onRemoveTool, onClearAll, onClose }) {
534854
+ const { t } = useI18n();
534855
+ const { theme: theme14 } = useTheme();
534856
+ const messages = t.permissionsPanel ?? {};
534857
+ const tools = (0, import_react127.useMemo)(() => Array.from(alwaysApprovedTools).sort((a, b) => a.localeCompare(b)), [alwaysApprovedTools]);
534858
+ const [selectedIndex, setSelectedIndex] = (0, import_react127.useState)(0);
534859
+ const [confirmTarget, setConfirmTarget] = (0, import_react127.useState)(null);
534860
+ const [confirmOption, setConfirmOption] = (0, import_react127.useState)(0);
534861
+ const hasTools = tools.length > 0;
534862
+ const clearAllIndex = hasTools ? tools.length : -1;
534863
+ const optionCount = hasTools ? tools.length + 1 : 0;
534864
+ (0, import_react127.useEffect)(() => {
534865
+ if (optionCount === 0) {
534866
+ setSelectedIndex(0);
534867
+ return;
534868
+ }
534869
+ if (selectedIndex >= optionCount) {
534870
+ setSelectedIndex(optionCount - 1);
534871
+ }
534872
+ }, [optionCount, selectedIndex]);
534873
+ (0, import_react127.useEffect)(() => {
534874
+ setConfirmTarget(null);
534875
+ setConfirmOption(0);
534876
+ }, [alwaysApprovedTools]);
534877
+ const handleInput = (0, import_react127.useCallback)((_3, key) => {
534878
+ if (confirmTarget !== null) {
534879
+ if (key.escape) {
534880
+ setConfirmTarget(null);
534881
+ setConfirmOption(0);
534882
+ return;
534883
+ }
534884
+ if (key.upArrow || key.downArrow) {
534885
+ setConfirmOption((prev) => prev === 0 ? 1 : 0);
534886
+ return;
534887
+ }
534888
+ if (key.return) {
534889
+ if (confirmOption === 0) {
534890
+ if (confirmTarget === "clearAll") {
534891
+ onClearAll();
534892
+ setSelectedIndex(0);
534893
+ } else {
534894
+ const tool = tools[confirmTarget];
534895
+ if (tool) {
534896
+ onRemoveTool(tool);
534897
+ if (confirmTarget >= tools.length - 1) {
534898
+ setSelectedIndex(Math.max(0, confirmTarget - 1));
534899
+ }
534900
+ }
534901
+ }
534902
+ }
534903
+ setConfirmTarget(null);
534904
+ setConfirmOption(0);
534905
+ return;
534906
+ }
534907
+ return;
534908
+ }
534909
+ if (key.escape) {
534910
+ onClose();
534911
+ return;
534912
+ }
534913
+ if (optionCount === 0) {
534914
+ return;
534915
+ }
534916
+ if (key.upArrow) {
534917
+ setSelectedIndex((prev) => prev === 0 ? optionCount - 1 : prev - 1);
534918
+ return;
534919
+ }
534920
+ if (key.downArrow) {
534921
+ setSelectedIndex((prev) => prev === optionCount - 1 ? 0 : prev + 1);
534922
+ return;
534923
+ }
534924
+ if (key.return) {
534925
+ if (selectedIndex === clearAllIndex) {
534926
+ setConfirmTarget("clearAll");
534927
+ } else {
534928
+ setConfirmTarget(selectedIndex);
534929
+ }
534930
+ setConfirmOption(0);
534931
+ }
534932
+ }, [
534933
+ optionCount,
534934
+ selectedIndex,
534935
+ clearAllIndex,
534936
+ onClose,
534937
+ onClearAll,
534938
+ onRemoveTool,
534939
+ tools,
534940
+ confirmTarget,
534941
+ confirmOption
534942
+ ]);
534943
+ use_input_default(handleInput);
534944
+ const getConfirmingToolName = () => {
534945
+ if (confirmTarget === "clearAll") {
534946
+ return "";
534947
+ }
534948
+ if (typeof confirmTarget === "number") {
534949
+ return tools[confirmTarget] ?? "";
534950
+ }
534951
+ return "";
534952
+ };
534953
+ if (confirmTarget !== null) {
534954
+ const isConfirmingClearAll = confirmTarget === "clearAll";
534955
+ const toolName = getConfirmingToolName();
534956
+ return import_react127.default.createElement(
534957
+ Box_default,
534958
+ { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 2, paddingY: 1 },
534959
+ import_react127.default.createElement(Text, { color: "red", bold: true }, isConfirmingClearAll ? messages.confirmClearAll ?? "Clear all permissions?" : messages.confirmDelete ?? "Delete allowed tool?"),
534960
+ !isConfirmingClearAll && toolName && import_react127.default.createElement(
534961
+ Box_default,
534962
+ { marginTop: 1, flexDirection: "column" },
534963
+ import_react127.default.createElement(
534964
+ Text,
534965
+ { color: "white", bold: true },
534966
+ " ",
534967
+ toolName
534968
+ )
534969
+ ),
534970
+ import_react127.default.createElement(
534971
+ Box_default,
534972
+ { marginTop: 1, flexDirection: "column" },
534973
+ import_react127.default.createElement(
534974
+ Text,
534975
+ { color: confirmOption === 0 ? theme14.colors.menuSelected : theme14.colors.menuNormal, bold: confirmOption === 0 },
534976
+ confirmOption === 0 ? "\u276F " : " ",
534977
+ messages.yes ?? "Yes"
534978
+ ),
534979
+ import_react127.default.createElement(
534980
+ Text,
534981
+ { color: confirmOption === 1 ? theme14.colors.menuSelected : theme14.colors.menuNormal, bold: confirmOption === 1 },
534982
+ confirmOption === 1 ? "\u276F " : " ",
534983
+ messages.no ?? "No"
534984
+ )
534985
+ )
534986
+ );
534987
+ }
534988
+ return import_react127.default.createElement(
534989
+ Box_default,
534990
+ { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1 },
534991
+ import_react127.default.createElement(Text, { color: "cyan", bold: true }, messages.title ?? "Permissions"),
534992
+ hasTools ? import_react127.default.createElement(
534993
+ Box_default,
534994
+ { flexDirection: "column", marginTop: 1 },
534995
+ tools.map((tool, index) => {
534996
+ const isSelected = index === selectedIndex;
534997
+ return import_react127.default.createElement(
534998
+ Text,
534999
+ { key: tool, color: isSelected ? theme14.colors.menuSelected : theme14.colors.menuNormal, bold: isSelected },
535000
+ isSelected ? "\u276F " : " ",
535001
+ tool
535002
+ );
535003
+ }),
535004
+ import_react127.default.createElement(
535005
+ Box_default,
535006
+ { marginTop: 1 },
535007
+ import_react127.default.createElement(
535008
+ Text,
535009
+ { color: selectedIndex === clearAllIndex ? theme14.colors.warning : theme14.colors.menuSecondary, bold: selectedIndex === clearAllIndex },
535010
+ selectedIndex === clearAllIndex ? "\u276F " : " ",
535011
+ messages.clearAll ?? "Clear All"
535012
+ )
535013
+ )
535014
+ ) : import_react127.default.createElement(
535015
+ Box_default,
535016
+ { marginTop: 1 },
535017
+ import_react127.default.createElement(Text, { color: "gray", dimColor: true }, messages.noTools ?? "No tools are always approved")
535018
+ ),
535019
+ import_react127.default.createElement(
535020
+ Box_default,
535021
+ { marginTop: 1 },
535022
+ import_react127.default.createElement(Text, { color: "gray", dimColor: true }, messages.hint ?? "\u2191\u2193 navigate \u2022 Enter remove \u2022 ESC close")
535023
+ )
535024
+ );
535025
+ }
535026
+ var import_react127;
535027
+ var init_PermissionsPanel = __esm({
535028
+ async "dist/ui/components/panels/PermissionsPanel.js"() {
535029
+ "use strict";
535030
+ import_react127 = __toESM(require_react(), 1);
535031
+ await init_build2();
535032
+ init_i18n();
535033
+ init_ThemeContext();
535034
+ }
535035
+ });
535036
+
535037
+ // dist/utils/commands/permissions.js
535038
+ var permissions_exports = {};
535039
+ __export(permissions_exports, {
535040
+ default: () => permissions_default
535041
+ });
535042
+ var permissions_default;
535043
+ var init_permissions = __esm({
535044
+ "dist/utils/commands/permissions.js"() {
535045
+ "use strict";
535046
+ init_commandExecutor();
535047
+ registerCommand("permissions", {
535048
+ execute: () => {
535049
+ return {
535050
+ success: true,
535051
+ action: "showPermissionsPanel",
535052
+ message: "Opening permissions panel"
535053
+ };
535054
+ }
535055
+ });
535056
+ permissions_default = {};
535057
+ }
535058
+ });
535059
+
534627
535060
  // dist/ui/pages/ChatScreen.js
534628
535061
  var ChatScreen_exports = {};
534629
535062
  __export(ChatScreen_exports, {
@@ -534633,20 +535066,20 @@ function ChatScreen({ autoResume, enableYolo }) {
534633
535066
  const { t } = useI18n();
534634
535067
  const { theme: theme14 } = useTheme();
534635
535068
  const { exit } = use_app_default();
534636
- const [messages, setMessages] = (0, import_react127.useState)([]);
534637
- const [isSaving] = (0, import_react127.useState)(false);
534638
- const [pendingMessages, setPendingMessages] = (0, import_react127.useState)([]);
534639
- const pendingMessagesRef = (0, import_react127.useRef)([]);
534640
- const hasAttemptedAutoVscodeConnect = (0, import_react127.useRef)(false);
534641
- const userInterruptedRef = (0, import_react127.useRef)(false);
534642
- const [remountKey, setRemountKey] = (0, import_react127.useState)(0);
534643
- const [currentContextPercentage, setCurrentContextPercentage] = (0, import_react127.useState)(0);
534644
- const currentContextPercentageRef = (0, import_react127.useRef)(0);
534645
- const [isExecutingTerminalCommand, setIsExecutingTerminalCommand] = (0, import_react127.useState)(false);
534646
- (0, import_react127.useEffect)(() => {
535069
+ const [messages, setMessages] = (0, import_react128.useState)([]);
535070
+ const [isSaving] = (0, import_react128.useState)(false);
535071
+ const [pendingMessages, setPendingMessages] = (0, import_react128.useState)([]);
535072
+ const pendingMessagesRef = (0, import_react128.useRef)([]);
535073
+ const hasAttemptedAutoVscodeConnect = (0, import_react128.useRef)(false);
535074
+ const userInterruptedRef = (0, import_react128.useRef)(false);
535075
+ const [remountKey, setRemountKey] = (0, import_react128.useState)(0);
535076
+ const [currentContextPercentage, setCurrentContextPercentage] = (0, import_react128.useState)(0);
535077
+ const currentContextPercentageRef = (0, import_react128.useRef)(0);
535078
+ const [isExecutingTerminalCommand, setIsExecutingTerminalCommand] = (0, import_react128.useState)(false);
535079
+ (0, import_react128.useEffect)(() => {
534647
535080
  currentContextPercentageRef.current = currentContextPercentage;
534648
535081
  }, [currentContextPercentage]);
534649
- const [yoloMode, setYoloMode] = (0, import_react127.useState)(() => {
535082
+ const [yoloMode, setYoloMode] = (0, import_react128.useState)(() => {
534650
535083
  if (enableYolo !== void 0) {
534651
535084
  return enableYolo;
534652
535085
  }
@@ -534657,7 +535090,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534657
535090
  return false;
534658
535091
  }
534659
535092
  });
534660
- const [planMode, setPlanMode] = (0, import_react127.useState)(() => {
535093
+ const [planMode, setPlanMode] = (0, import_react128.useState)(() => {
534661
535094
  try {
534662
535095
  const saved = localStorage.getItem("snow-plan-mode");
534663
535096
  return saved === "true";
@@ -534665,7 +535098,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534665
535098
  return false;
534666
535099
  }
534667
535100
  });
534668
- const [vulnerabilityHuntingMode, setVulnerabilityHuntingMode] = (0, import_react127.useState)(() => {
535101
+ const [vulnerabilityHuntingMode, setVulnerabilityHuntingMode] = (0, import_react128.useState)(() => {
534669
535102
  try {
534670
535103
  const saved = localStorage.getItem("snow-vulnerability-hunting-mode");
534671
535104
  return saved === "true";
@@ -534673,27 +535106,28 @@ function ChatScreen({ autoResume, enableYolo }) {
534673
535106
  return false;
534674
535107
  }
534675
535108
  });
534676
- const [simpleMode, setSimpleMode2] = (0, import_react127.useState)(() => {
535109
+ const [simpleMode, setSimpleMode2] = (0, import_react128.useState)(() => {
534677
535110
  return getSimpleMode();
534678
535111
  });
534679
- const [showThinking, _setShowThinking] = (0, import_react127.useState)(() => {
535112
+ const [showThinking, _setShowThinking] = (0, import_react128.useState)(() => {
534680
535113
  const config3 = getOpenAiConfig();
534681
535114
  return config3.showThinking !== false;
534682
535115
  });
534683
- const [isCompressing, setIsCompressing] = (0, import_react127.useState)(false);
534684
- const [compressionError, setCompressionError] = (0, import_react127.useState)(null);
534685
- const [restoreInputContent, setRestoreInputContent] = (0, import_react127.useState)(null);
534686
- const [bashSensitiveCommand, setBashSensitiveCommand] = (0, import_react127.useState)(null);
534687
- const [hookError, setHookError] = (0, import_react127.useState)(null);
535116
+ const [isCompressing, setIsCompressing] = (0, import_react128.useState)(false);
535117
+ const [compressionError, setCompressionError] = (0, import_react128.useState)(null);
535118
+ const [showPermissionsPanel, setShowPermissionsPanel] = (0, import_react128.useState)(false);
535119
+ const [restoreInputContent, setRestoreInputContent] = (0, import_react128.useState)(null);
535120
+ const [bashSensitiveCommand, setBashSensitiveCommand] = (0, import_react128.useState)(null);
535121
+ const [hookError, setHookError] = (0, import_react128.useState)(null);
534688
535122
  const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
534689
535123
  const { stdout } = use_stdout_default();
534690
535124
  const workingDirectory = process.cwd();
534691
- const isInitialMount = (0, import_react127.useRef)(true);
534692
- const [codebaseIndexing, setCodebaseIndexing] = (0, import_react127.useState)(false);
534693
- const [codebaseProgress, setCodebaseProgress] = (0, import_react127.useState)(null);
534694
- const [watcherEnabled, setWatcherEnabled] = (0, import_react127.useState)(false);
534695
- const [fileUpdateNotification, setFileUpdateNotification] = (0, import_react127.useState)(null);
534696
- const codebaseAgentRef = (0, import_react127.useRef)(null);
535125
+ const isInitialMount = (0, import_react128.useRef)(true);
535126
+ const [codebaseIndexing, setCodebaseIndexing] = (0, import_react128.useState)(false);
535127
+ const [codebaseProgress, setCodebaseProgress] = (0, import_react128.useState)(null);
535128
+ const [watcherEnabled, setWatcherEnabled] = (0, import_react128.useState)(false);
535129
+ const [fileUpdateNotification, setFileUpdateNotification] = (0, import_react128.useState)(null);
535130
+ const codebaseAgentRef = (0, import_react128.useRef)(null);
534697
535131
  const streamingState = useStreamingState();
534698
535132
  const vscodeState = useVSCodeState();
534699
535133
  const snapshotState = useSnapshotState(messages.length);
@@ -534702,11 +535136,11 @@ function ChatScreen({ autoResume, enableYolo }) {
534702
535136
  const panelState = usePanelState();
534703
535137
  const { hasFocus } = useTerminalFocus();
534704
535138
  const { saveMessage, clearSavedMessages, initializeFromSession } = useSessionSave();
534705
- (0, import_react127.useEffect)(() => {
535139
+ (0, import_react128.useEffect)(() => {
534706
535140
  pendingMessagesRef.current = pendingMessages;
534707
535141
  }, [pendingMessages]);
534708
- const [commandsLoaded, setCommandsLoaded] = (0, import_react127.useState)(false);
534709
- (0, import_react127.useEffect)(() => {
535142
+ const [commandsLoaded, setCommandsLoaded] = (0, import_react128.useState)(false);
535143
+ (0, import_react128.useEffect)(() => {
534710
535144
  Promise.all([
534711
535145
  Promise.resolve().then(() => (init_clear(), clear_exports)),
534712
535146
  Promise.resolve().then(() => (init_resume(), resume_exports)),
@@ -534728,7 +535162,8 @@ function ChatScreen({ autoResume, enableYolo }) {
534728
535162
  Promise.resolve().then(() => (init_skills(), skills_exports)),
534729
535163
  Promise.resolve().then(() => (init_quit(), quit_exports)),
534730
535164
  Promise.resolve().then(() => (init_reindex(), reindex_exports)),
534731
- Promise.resolve().then(() => (init_addDir(), addDir_exports))
535165
+ Promise.resolve().then(() => (init_addDir(), addDir_exports)),
535166
+ Promise.resolve().then(() => (init_permissions(), permissions_exports))
534732
535167
  ]).then(async () => {
534733
535168
  await registerCustomCommands(workingDirectory);
534734
535169
  setCommandsLoaded(true);
@@ -534737,7 +535172,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534737
535172
  setCommandsLoaded(true);
534738
535173
  });
534739
535174
  }, []);
534740
- (0, import_react127.useEffect)(() => {
535175
+ (0, import_react128.useEffect)(() => {
534741
535176
  const startCodebaseIndexing = async () => {
534742
535177
  try {
534743
535178
  const config3 = loadCodebaseConfig();
@@ -534859,7 +535294,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534859
535294
  }
534860
535295
  };
534861
535296
  }, []);
534862
- (0, import_react127.useEffect)(() => {
535297
+ (0, import_react128.useEffect)(() => {
534863
535298
  global.__stopCodebaseIndexing = async () => {
534864
535299
  if (codebaseAgentRef.current) {
534865
535300
  await codebaseAgentRef.current.stop();
@@ -534870,25 +535305,25 @@ function ChatScreen({ autoResume, enableYolo }) {
534870
535305
  delete global.__stopCodebaseIndexing;
534871
535306
  };
534872
535307
  }, []);
534873
- (0, import_react127.useEffect)(() => {
535308
+ (0, import_react128.useEffect)(() => {
534874
535309
  try {
534875
535310
  localStorage.setItem("snow-yolo-mode", String(yoloMode));
534876
535311
  } catch {
534877
535312
  }
534878
535313
  }, [yoloMode]);
534879
- (0, import_react127.useEffect)(() => {
535314
+ (0, import_react128.useEffect)(() => {
534880
535315
  try {
534881
535316
  localStorage.setItem("snow-plan-mode", String(planMode));
534882
535317
  } catch {
534883
535318
  }
534884
535319
  }, [planMode]);
534885
- (0, import_react127.useEffect)(() => {
535320
+ (0, import_react128.useEffect)(() => {
534886
535321
  try {
534887
535322
  localStorage.setItem("snow-vulnerability-hunting-mode", String(vulnerabilityHuntingMode));
534888
535323
  } catch {
534889
535324
  }
534890
535325
  }, [vulnerabilityHuntingMode]);
534891
- (0, import_react127.useEffect)(() => {
535326
+ (0, import_react128.useEffect)(() => {
534892
535327
  const interval = setInterval(() => {
534893
535328
  const currentSimpleMode = getSimpleMode();
534894
535329
  if (currentSimpleMode !== simpleMode) {
@@ -534897,7 +535332,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534897
535332
  }, 1e3);
534898
535333
  return () => clearInterval(interval);
534899
535334
  }, [simpleMode]);
534900
- (0, import_react127.useEffect)(() => {
535335
+ (0, import_react128.useEffect)(() => {
534901
535336
  if (restoreInputContent !== null) {
534902
535337
  const timer2 = setTimeout(() => {
534903
535338
  setRestoreInputContent(null);
@@ -534906,7 +535341,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534906
535341
  }
534907
535342
  return void 0;
534908
535343
  }, [restoreInputContent]);
534909
- (0, import_react127.useEffect)(() => {
535344
+ (0, import_react128.useEffect)(() => {
534910
535345
  if (!autoResume) {
534911
535346
  sessionManager.clearCurrentSession();
534912
535347
  return;
@@ -534931,7 +535366,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534931
535366
  };
534932
535367
  resumeSession();
534933
535368
  }, [autoResume, initializeFromSession]);
534934
- (0, import_react127.useEffect)(() => {
535369
+ (0, import_react128.useEffect)(() => {
534935
535370
  if (isInitialMount.current) {
534936
535371
  isInitialMount.current = false;
534937
535372
  return;
@@ -534944,7 +535379,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534944
535379
  clearTimeout(handler);
534945
535380
  };
534946
535381
  }, [terminalWidth]);
534947
- (0, import_react127.useEffect)(() => {
535382
+ (0, import_react128.useEffect)(() => {
534948
535383
  if (remountKey === 0)
534949
535384
  return;
534950
535385
  const reloadMessages = async () => {
@@ -534956,8 +535391,8 @@ function ChatScreen({ autoResume, enableYolo }) {
534956
535391
  };
534957
535392
  reloadMessages();
534958
535393
  }, [remountKey]);
534959
- const { pendingToolConfirmation, requestToolConfirmation, isToolAutoApproved, addMultipleToAlwaysApproved } = useToolConfirmation();
534960
- const [pendingUserQuestion, setPendingUserQuestion] = (0, import_react127.useState)(null);
535394
+ const { pendingToolConfirmation, alwaysApprovedTools, requestToolConfirmation, isToolAutoApproved, addMultipleToAlwaysApproved, removeFromAlwaysApproved, clearAllAlwaysApproved } = useToolConfirmation(workingDirectory);
535395
+ const [pendingUserQuestion, setPendingUserQuestion] = (0, import_react128.useState)(null);
534961
535396
  const requestUserQuestion = async (question, options3, toolCall) => {
534962
535397
  return new Promise((resolve10) => {
534963
535398
  setPendingUserQuestion({
@@ -535092,6 +535527,7 @@ function ChatScreen({ autoResume, enableYolo }) {
535092
535527
  setShowCustomCommandConfig: panelState.setShowCustomCommandConfig,
535093
535528
  setShowSkillsCreation: panelState.setShowSkillsCreation,
535094
535529
  setShowWorkingDirPanel: panelState.setShowWorkingDirPanel,
535530
+ setShowPermissionsPanel,
535095
535531
  setYoloMode,
535096
535532
  setPlanMode,
535097
535533
  setVulnerabilityHuntingMode,
@@ -535103,7 +535539,7 @@ function ChatScreen({ autoResume, enableYolo }) {
535103
535539
  onQuit: handleQuit,
535104
535540
  onReindexCodebase: handleReindexCodebase
535105
535541
  });
535106
- (0, import_react127.useEffect)(() => {
535542
+ (0, import_react128.useEffect)(() => {
535107
535543
  if (!commandsLoaded) {
535108
535544
  return;
535109
535545
  }
@@ -535132,7 +535568,7 @@ function ChatScreen({ autoResume, enableYolo }) {
535132
535568
  }, 0);
535133
535569
  return () => clearTimeout(timer2);
535134
535570
  }, [commandsLoaded]);
535135
- (0, import_react127.useEffect)(() => {
535571
+ (0, import_react128.useEffect)(() => {
535136
535572
  if (!streamingState.isStreaming && pendingMessages.length > 0) {
535137
535573
  const timer2 = setTimeout(() => {
535138
535574
  processPendingMessages();
@@ -535141,7 +535577,7 @@ function ChatScreen({ autoResume, enableYolo }) {
535141
535577
  }
535142
535578
  return void 0;
535143
535579
  }, [streamingState.isStreaming, pendingMessages.length]);
535144
- (0, import_react127.useEffect)(() => {
535580
+ (0, import_react128.useEffect)(() => {
535145
535581
  const handleSearchEvent = (event) => {
535146
535582
  if (event.type === "search-complete") {
535147
535583
  streamingState.setCodebaseSearchStatus({
@@ -535178,6 +535614,9 @@ function ChatScreen({ autoResume, enableYolo }) {
535178
535614
  };
535179
535615
  }, [streamingState]);
535180
535616
  use_input_default((input2, key) => {
535617
+ if (pendingToolConfirmation) {
535618
+ return;
535619
+ }
535181
535620
  if (bashSensitiveCommand) {
535182
535621
  if (input2.toLowerCase() === "y") {
535183
535622
  bashSensitiveCommand.resolve(true);
@@ -535264,67 +535703,67 @@ function ChatScreen({ autoResume, enableYolo }) {
535264
535703
  }
535265
535704
  };
535266
535705
  if (terminalHeight < MIN_TERMINAL_HEIGHT) {
535267
- return import_react127.default.createElement(
535706
+ return import_react128.default.createElement(
535268
535707
  Box_default,
535269
535708
  { flexDirection: "column", padding: 2 },
535270
- import_react127.default.createElement(
535709
+ import_react128.default.createElement(
535271
535710
  Box_default,
535272
535711
  { borderStyle: "round", borderColor: "red", padding: 1 },
535273
- import_react127.default.createElement(Text, { color: "red", bold: true }, t.chatScreen.terminalTooSmall)
535712
+ import_react128.default.createElement(Text, { color: "red", bold: true }, t.chatScreen.terminalTooSmall)
535274
535713
  ),
535275
- import_react127.default.createElement(
535714
+ import_react128.default.createElement(
535276
535715
  Box_default,
535277
535716
  { marginTop: 1 },
535278
- import_react127.default.createElement(Text, { color: "yellow" }, t.chatScreen.terminalResizePrompt.replace("{current}", terminalHeight.toString()).replace("{required}", MIN_TERMINAL_HEIGHT.toString()))
535717
+ import_react128.default.createElement(Text, { color: "yellow" }, t.chatScreen.terminalResizePrompt.replace("{current}", terminalHeight.toString()).replace("{required}", MIN_TERMINAL_HEIGHT.toString()))
535279
535718
  ),
535280
- import_react127.default.createElement(
535719
+ import_react128.default.createElement(
535281
535720
  Box_default,
535282
535721
  { marginTop: 1 },
535283
- import_react127.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.chatScreen.terminalMinHeight)
535722
+ import_react128.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.chatScreen.terminalMinHeight)
535284
535723
  )
535285
535724
  );
535286
535725
  }
535287
- return import_react127.default.createElement(
535726
+ return import_react128.default.createElement(
535288
535727
  Box_default,
535289
535728
  { flexDirection: "column", height: "100%", width: terminalWidth },
535290
- import_react127.default.createElement(Static, { key: remountKey, items: [
535291
- import_react127.default.createElement(ChatHeader, { key: "header", terminalWidth, simpleMode, workingDirectory }),
535729
+ import_react128.default.createElement(Static, { key: remountKey, items: [
535730
+ import_react128.default.createElement(ChatHeader, { key: "header", terminalWidth, simpleMode, workingDirectory }),
535292
535731
  ...messages.filter((m) => !m.streaming).map((message, index, filteredMessages) => {
535293
535732
  const isLastMessage = index === filteredMessages.length - 1;
535294
- return import_react127.default.createElement(MessageRenderer, { key: `msg-${index}`, message, index, isLastMessage, filteredMessages, terminalWidth, showThinking });
535733
+ return import_react128.default.createElement(MessageRenderer, { key: `msg-${index}`, message, index, isLastMessage, filteredMessages, terminalWidth, showThinking });
535295
535734
  })
535296
535735
  ] }, (item) => item),
535297
- import_react127.default.createElement(LoadingIndicator, { isStreaming: streamingState.isStreaming, isSaving, hasPendingToolConfirmation: !!pendingToolConfirmation, hasPendingUserQuestion: !!pendingUserQuestion, terminalWidth, animationFrame: streamingState.animationFrame, retryStatus: streamingState.retryStatus, codebaseSearchStatus: streamingState.codebaseSearchStatus, isReasoning: streamingState.isReasoning, streamTokenCount: streamingState.streamTokenCount, elapsedSeconds: streamingState.elapsedSeconds, currentModel: streamingState.currentModel }),
535298
- import_react127.default.createElement(
535736
+ import_react128.default.createElement(LoadingIndicator, { isStreaming: streamingState.isStreaming, isSaving, hasPendingToolConfirmation: !!pendingToolConfirmation, hasPendingUserQuestion: !!pendingUserQuestion, terminalWidth, animationFrame: streamingState.animationFrame, retryStatus: streamingState.retryStatus, codebaseSearchStatus: streamingState.codebaseSearchStatus, isReasoning: streamingState.isReasoning, streamTokenCount: streamingState.streamTokenCount, elapsedSeconds: streamingState.elapsedSeconds, currentModel: streamingState.currentModel }),
535737
+ import_react128.default.createElement(
535299
535738
  Box_default,
535300
535739
  { paddingX: 1, width: terminalWidth },
535301
- import_react127.default.createElement(PendingMessages, { pendingMessages })
535740
+ import_react128.default.createElement(PendingMessages, { pendingMessages })
535302
535741
  ),
535303
- hookError && import_react127.default.createElement(
535742
+ hookError && import_react128.default.createElement(
535304
535743
  Box_default,
535305
535744
  { paddingX: 1, width: terminalWidth, marginBottom: 1 },
535306
- import_react127.default.createElement(HookErrorDisplay, { details: hookError })
535745
+ import_react128.default.createElement(HookErrorDisplay, { details: hookError })
535307
535746
  ),
535308
- pendingToolConfirmation && import_react127.default.createElement(ToolConfirmation, { toolName: pendingToolConfirmation.batchToolNames || pendingToolConfirmation.tool.function.name, toolArguments: !pendingToolConfirmation.allTools ? pendingToolConfirmation.tool.function.arguments : void 0, allTools: pendingToolConfirmation.allTools, onConfirm: pendingToolConfirmation.resolve, onHookError: (error) => {
535747
+ pendingToolConfirmation && import_react128.default.createElement(ToolConfirmation, { toolName: pendingToolConfirmation.batchToolNames || pendingToolConfirmation.tool.function.name, toolArguments: !pendingToolConfirmation.allTools ? pendingToolConfirmation.tool.function.arguments : void 0, allTools: pendingToolConfirmation.allTools, onConfirm: pendingToolConfirmation.resolve, onHookError: (error) => {
535309
535748
  setHookError(error);
535310
535749
  } }),
535311
- bashSensitiveCommand && import_react127.default.createElement(
535750
+ bashSensitiveCommand && import_react128.default.createElement(
535312
535751
  Box_default,
535313
535752
  { paddingX: 1, width: terminalWidth },
535314
- import_react127.default.createElement(BashCommandConfirmation, { command: bashSensitiveCommand.command, onConfirm: bashSensitiveCommand.resolve, terminalWidth })
535753
+ import_react128.default.createElement(BashCommandConfirmation, { command: bashSensitiveCommand.command, onConfirm: bashSensitiveCommand.resolve, terminalWidth })
535315
535754
  ),
535316
- bashMode.state.isExecuting && bashMode.state.currentCommand && import_react127.default.createElement(
535755
+ bashMode.state.isExecuting && bashMode.state.currentCommand && import_react128.default.createElement(
535317
535756
  Box_default,
535318
535757
  { paddingX: 1, width: terminalWidth },
535319
- import_react127.default.createElement(BashCommandExecutionStatus, { command: bashMode.state.currentCommand, timeout: bashMode.state.currentTimeout || 3e4, terminalWidth })
535758
+ import_react128.default.createElement(BashCommandExecutionStatus, { command: bashMode.state.currentCommand, timeout: bashMode.state.currentTimeout || 3e4, terminalWidth })
535320
535759
  ),
535321
- terminalExecutionState.state.isExecuting && terminalExecutionState.state.command && import_react127.default.createElement(
535760
+ terminalExecutionState.state.isExecuting && terminalExecutionState.state.command && import_react128.default.createElement(
535322
535761
  Box_default,
535323
535762
  { paddingX: 1, width: terminalWidth },
535324
- import_react127.default.createElement(BashCommandExecutionStatus, { command: terminalExecutionState.state.command, timeout: terminalExecutionState.state.timeout || 3e4, terminalWidth })
535763
+ import_react128.default.createElement(BashCommandExecutionStatus, { command: terminalExecutionState.state.command, timeout: terminalExecutionState.state.timeout || 3e4, terminalWidth })
535325
535764
  ),
535326
- pendingUserQuestion && import_react127.default.createElement(AskUserQuestion, { question: pendingUserQuestion.question, options: pendingUserQuestion.options, onAnswer: handleUserQuestionAnswer }),
535327
- import_react127.default.createElement(PanelsManager, { terminalWidth, workingDirectory, showSessionPanel: panelState.showSessionPanel, showMcpPanel: panelState.showMcpPanel, showUsagePanel: panelState.showUsagePanel, showHelpPanel: panelState.showHelpPanel, showCustomCommandConfig: panelState.showCustomCommandConfig, showSkillsCreation: panelState.showSkillsCreation, showWorkingDirPanel: panelState.showWorkingDirPanel, setShowSessionPanel: panelState.setShowSessionPanel, setShowCustomCommandConfig: panelState.setShowCustomCommandConfig, setShowSkillsCreation: panelState.setShowSkillsCreation, setShowWorkingDirPanel: panelState.setShowWorkingDirPanel, handleSessionPanelSelect, onCustomCommandSave: async (name, command, type, location) => {
535765
+ pendingUserQuestion && import_react128.default.createElement(AskUserQuestion, { question: pendingUserQuestion.question, options: pendingUserQuestion.options, onAnswer: handleUserQuestionAnswer }),
535766
+ import_react128.default.createElement(PanelsManager, { terminalWidth, workingDirectory, showSessionPanel: panelState.showSessionPanel, showMcpPanel: panelState.showMcpPanel, showUsagePanel: panelState.showUsagePanel, showHelpPanel: panelState.showHelpPanel, showCustomCommandConfig: panelState.showCustomCommandConfig, showSkillsCreation: panelState.showSkillsCreation, showWorkingDirPanel: panelState.showWorkingDirPanel, setShowSessionPanel: panelState.setShowSessionPanel, setShowCustomCommandConfig: panelState.setShowCustomCommandConfig, setShowSkillsCreation: panelState.setShowSkillsCreation, setShowWorkingDirPanel: panelState.setShowWorkingDirPanel, handleSessionPanelSelect, onCustomCommandSave: async (name, command, type, location) => {
535328
535767
  await saveCustomCommand(name, command, type, void 0, location, workingDirectory);
535329
535768
  await registerCustomCommands(workingDirectory);
535330
535769
  panelState.setShowCustomCommandConfig(false);
@@ -535370,8 +535809,26 @@ You can now edit these files to customize your skill.`,
535370
535809
  setMessages((prev) => [...prev, errorMessage]);
535371
535810
  }
535372
535811
  } }),
535373
- snapshotState.pendingRollback && import_react127.default.createElement(FileRollbackConfirmation, { fileCount: snapshotState.pendingRollback.fileCount, filePaths: snapshotState.pendingRollback.filePaths || [], onConfirm: handleRollbackConfirm }),
535374
- !pendingToolConfirmation && !pendingUserQuestion && !bashSensitiveCommand && !isCompressing && !(panelState.showSessionPanel || panelState.showMcpPanel || panelState.showUsagePanel || panelState.showHelpPanel || panelState.showCustomCommandConfig || panelState.showSkillsCreation || panelState.showWorkingDirPanel) && !snapshotState.pendingRollback && import_react127.default.createElement(ChatFooter, { onSubmit: handleMessageSubmit, onCommand: handleCommandExecution, onHistorySelect: handleHistorySelect, onSwitchProfile: handleSwitchProfile, handleProfileSelect, handleHistorySelect, disabled: !!pendingToolConfirmation || !!bashSensitiveCommand || isExecutingTerminalCommand, isProcessing: streamingState.isStreaming || isSaving || bashMode.state.isExecuting, chatHistory: messages, yoloMode, setYoloMode, planMode, setPlanMode, vulnerabilityHuntingMode, setVulnerabilityHuntingMode, contextUsage: streamingState.contextUsage ? {
535812
+ showPermissionsPanel && import_react128.default.createElement(
535813
+ Box_default,
535814
+ { paddingX: 1, flexDirection: "column", width: terminalWidth },
535815
+ import_react128.default.createElement(
535816
+ import_react128.Suspense,
535817
+ { fallback: import_react128.default.createElement(
535818
+ Box_default,
535819
+ null,
535820
+ import_react128.default.createElement(
535821
+ Text,
535822
+ null,
535823
+ import_react128.default.createElement(build_default, { type: "dots" }),
535824
+ " Loading..."
535825
+ )
535826
+ ) },
535827
+ import_react128.default.createElement(PermissionsPanel2, { alwaysApprovedTools, onRemoveTool: removeFromAlwaysApproved, onClearAll: clearAllAlwaysApproved, onClose: () => setShowPermissionsPanel(false) })
535828
+ )
535829
+ ),
535830
+ snapshotState.pendingRollback && import_react128.default.createElement(FileRollbackConfirmation, { fileCount: snapshotState.pendingRollback.fileCount, filePaths: snapshotState.pendingRollback.filePaths || [], onConfirm: handleRollbackConfirm }),
535831
+ !pendingToolConfirmation && !pendingUserQuestion && !bashSensitiveCommand && !(panelState.showSessionPanel || panelState.showMcpPanel || panelState.showUsagePanel || panelState.showHelpPanel || panelState.showCustomCommandConfig || panelState.showSkillsCreation || panelState.showWorkingDirPanel || showPermissionsPanel) && !snapshotState.pendingRollback && import_react128.default.createElement(ChatFooter, { onSubmit: handleMessageSubmit, onCommand: handleCommandExecution, onHistorySelect: handleHistorySelect, onSwitchProfile: handleSwitchProfile, handleProfileSelect, handleHistorySelect, disabled: !!pendingToolConfirmation || !!bashSensitiveCommand || isExecutingTerminalCommand || isCompressing, isProcessing: streamingState.isStreaming || isSaving || bashMode.state.isExecuting || isCompressing, chatHistory: messages, yoloMode, setYoloMode, planMode, setPlanMode, vulnerabilityHuntingMode, setVulnerabilityHuntingMode, contextUsage: streamingState.contextUsage ? {
535375
535832
  inputTokens: streamingState.contextUsage.prompt_tokens,
535376
535833
  maxContextTokens: getOpenAiConfig().maxContextTokens || 4e3,
535377
535834
  cacheCreationTokens: streamingState.contextUsage.cache_creation_input_tokens,
@@ -535386,12 +535843,13 @@ You can now edit these files to customize your skill.`,
535386
535843
  }, profileSearchQuery: panelState.profileSearchQuery, setProfileSearchQuery: panelState.setProfileSearchQuery, vscodeConnectionStatus: vscodeState.vscodeConnectionStatus, editorContext: vscodeState.editorContext, codebaseIndexing, codebaseProgress, watcherEnabled, fileUpdateNotification, currentProfileName: panelState.currentProfileName, isCompressing, compressionError })
535387
535844
  );
535388
535845
  }
535389
- var import_react127;
535846
+ var import_react128, PermissionsPanel2;
535390
535847
  var init_ChatScreen = __esm({
535391
535848
  async "dist/ui/pages/ChatScreen.js"() {
535392
535849
  "use strict";
535393
- import_react127 = __toESM(require_react(), 1);
535850
+ import_react128 = __toESM(require_react(), 1);
535394
535851
  await init_build2();
535852
+ await init_build3();
535395
535853
  init_ansi_escapes();
535396
535854
  init_I18nContext();
535397
535855
  init_ThemeContext();
@@ -535432,6 +535890,7 @@ var init_ChatScreen = __esm({
535432
535890
  init_codebaseConfig();
535433
535891
  init_codebaseSearchEvents();
535434
535892
  init_logger();
535893
+ PermissionsPanel2 = (0, import_react128.lazy)(() => init_PermissionsPanel().then(() => PermissionsPanel_exports));
535435
535894
  }
535436
535895
  });
535437
535896
 
@@ -535645,16 +536104,17 @@ ${warningColor}\u26A0 Tool Confirmation Required${resetColor} ${sensitiveCheck.i
535645
536104
  });
535646
536105
  }
535647
536106
  function HeadlessModeScreen({ prompt, onComplete }) {
535648
- const [messages, setMessages] = (0, import_react128.useState)([]);
535649
- const [isComplete, setIsComplete] = (0, import_react128.useState)(false);
535650
- const [lastDisplayedIndex, setLastDisplayedIndex] = (0, import_react128.useState)(-1);
535651
- const [isWaitingForInput, setIsWaitingForInput] = (0, import_react128.useState)(false);
536107
+ const [messages, setMessages] = (0, import_react129.useState)([]);
536108
+ const [isComplete, setIsComplete] = (0, import_react129.useState)(false);
536109
+ const [lastDisplayedIndex, setLastDisplayedIndex] = (0, import_react129.useState)(-1);
536110
+ const [isWaitingForInput, setIsWaitingForInput] = (0, import_react129.useState)(false);
535652
536111
  const { stdout } = use_stdout_default();
536112
+ const workingDirectory = process.cwd();
535653
536113
  const streamingState = useStreamingState();
535654
536114
  const vscodeState = useVSCodeState();
535655
536115
  const { saveMessage } = useSessionSave();
535656
- const { isToolAutoApproved, addMultipleToAlwaysApproved } = useToolConfirmation();
535657
- (0, import_react128.useEffect)(() => {
536116
+ const { isToolAutoApproved, addMultipleToAlwaysApproved } = useToolConfirmation(workingDirectory);
536117
+ (0, import_react129.useEffect)(() => {
535658
536118
  const lastMessage = messages[messages.length - 1];
535659
536119
  const currentIndex = messages.length - 1;
535660
536120
  if (!lastMessage || currentIndex <= lastDisplayedIndex)
@@ -535706,7 +536166,7 @@ function HeadlessModeScreen({ prompt, onComplete }) {
535706
536166
  }
535707
536167
  }
535708
536168
  }, [messages, lastDisplayedIndex]);
535709
- (0, import_react128.useEffect)(() => {
536169
+ (0, import_react129.useEffect)(() => {
535710
536170
  if (isWaitingForInput)
535711
536171
  return;
535712
536172
  if (streamingState.isStreaming) {
@@ -535823,19 +536283,19 @@ function HeadlessModeScreen({ prompt, onComplete }) {
535823
536283
  }, 1e3);
535824
536284
  }
535825
536285
  };
535826
- (0, import_react128.useEffect)(() => {
536286
+ (0, import_react129.useEffect)(() => {
535827
536287
  processMessage();
535828
536288
  }, []);
535829
536289
  if (isComplete) {
535830
536290
  return null;
535831
536291
  }
535832
- return import_react128.default.createElement(import_react128.default.Fragment, null);
536292
+ return import_react129.default.createElement(import_react129.default.Fragment, null);
535833
536293
  }
535834
- var import_react128, import_cli_highlight3, getTheme, getAnsiColor;
536294
+ var import_react129, import_cli_highlight3, getTheme, getAnsiColor;
535835
536295
  var init_HeadlessModeScreen = __esm({
535836
536296
  async "dist/ui/pages/HeadlessModeScreen.js"() {
535837
536297
  "use strict";
535838
- import_react128 = __toESM(require_react(), 1);
536298
+ import_react129 = __toESM(require_react(), 1);
535839
536299
  await init_build2();
535840
536300
  init_ansi_escapes();
535841
536301
  import_cli_highlight3 = __toESM(require_dist14(), 1);
@@ -536106,18 +536566,18 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536106
536566
  var _a21;
536107
536567
  const { theme: theme14 } = useTheme();
536108
536568
  const { t } = useI18n();
536109
- const [tasks, setTasks] = (0, import_react129.useState)([]);
536110
- const [selectedIndex, setSelectedIndex] = (0, import_react129.useState)(0);
536111
- const [scrollOffset, setScrollOffset] = (0, import_react129.useState)(0);
536112
- const [markedTasks, setMarkedTasks] = (0, import_react129.useState)(/* @__PURE__ */ new Set());
536113
- const [isLoading, setIsLoading] = (0, import_react129.useState)(true);
536114
- const [viewMode, setViewMode] = (0, import_react129.useState)("list");
536115
- const [detailTask, setDetailTask] = (0, import_react129.useState)(null);
536116
- const [pendingAction, setPendingAction] = (0, import_react129.useState)(null);
536117
- const [rejectInputMode, setRejectInputMode] = (0, import_react129.useState)(false);
536118
- const [rejectReason, setRejectReason] = (0, import_react129.useState)("");
536569
+ const [tasks, setTasks] = (0, import_react130.useState)([]);
536570
+ const [selectedIndex, setSelectedIndex] = (0, import_react130.useState)(0);
536571
+ const [scrollOffset, setScrollOffset] = (0, import_react130.useState)(0);
536572
+ const [markedTasks, setMarkedTasks] = (0, import_react130.useState)(/* @__PURE__ */ new Set());
536573
+ const [isLoading, setIsLoading] = (0, import_react130.useState)(true);
536574
+ const [viewMode, setViewMode] = (0, import_react130.useState)("list");
536575
+ const [detailTask, setDetailTask] = (0, import_react130.useState)(null);
536576
+ const [pendingAction, setPendingAction] = (0, import_react130.useState)(null);
536577
+ const [rejectInputMode, setRejectInputMode] = (0, import_react130.useState)(false);
536578
+ const [rejectReason, setRejectReason] = (0, import_react130.useState)("");
536119
536579
  const VISIBLE_ITEMS = 5;
536120
- const loadTasks = (0, import_react129.useCallback)(async () => {
536580
+ const loadTasks = (0, import_react130.useCallback)(async () => {
536121
536581
  setIsLoading(true);
536122
536582
  try {
536123
536583
  const taskList = await taskManager.listTasks();
@@ -536129,10 +536589,10 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536129
536589
  setIsLoading(false);
536130
536590
  }
536131
536591
  }, []);
536132
- (0, import_react129.useEffect)(() => {
536592
+ (0, import_react130.useEffect)(() => {
536133
536593
  void loadTasks();
536134
536594
  }, [loadTasks]);
536135
- (0, import_react129.useEffect)(() => {
536595
+ (0, import_react130.useEffect)(() => {
536136
536596
  if (pendingAction) {
536137
536597
  const timer2 = setTimeout(() => {
536138
536598
  setPendingAction(null);
@@ -536141,7 +536601,7 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536141
536601
  }
536142
536602
  return void 0;
536143
536603
  }, [pendingAction]);
536144
- const handleDeleteTask = (0, import_react129.useCallback)(async (taskId) => {
536604
+ const handleDeleteTask = (0, import_react130.useCallback)(async (taskId) => {
536145
536605
  if (!taskId)
536146
536606
  return;
536147
536607
  const success = await taskManager.deleteTask(taskId);
@@ -536336,7 +536796,7 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536336
536796
  return;
536337
536797
  }
536338
536798
  });
536339
- const getStatusColor = (0, import_react129.useCallback)((status) => {
536799
+ const getStatusColor = (0, import_react130.useCallback)((status) => {
536340
536800
  switch (status) {
536341
536801
  case "pending":
536342
536802
  return "yellow";
@@ -536352,7 +536812,7 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536352
536812
  return "gray";
536353
536813
  }
536354
536814
  }, []);
536355
- const getStatusIcon = (0, import_react129.useCallback)((status) => {
536815
+ const getStatusIcon = (0, import_react130.useCallback)((status) => {
536356
536816
  switch (status) {
536357
536817
  case "pending":
536358
536818
  return "\u25CB";
@@ -536368,7 +536828,7 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536368
536828
  return "?";
536369
536829
  }
536370
536830
  }, []);
536371
- const formatDate = (0, import_react129.useCallback)((timestamp) => {
536831
+ const formatDate = (0, import_react130.useCallback)((timestamp) => {
536372
536832
  const date = new Date(timestamp);
536373
536833
  const now = /* @__PURE__ */ new Date();
536374
536834
  const diffMs = now.getTime() - date.getTime();
@@ -536386,24 +536846,24 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536386
536846
  return date.toLocaleDateString("en-US", { month: "short", day: "numeric" });
536387
536847
  }, []);
536388
536848
  if (isLoading) {
536389
- return import_react129.default.createElement(
536849
+ return import_react130.default.createElement(
536390
536850
  Box_default,
536391
536851
  { flexDirection: "column", paddingX: 1 },
536392
- import_react129.default.createElement(
536852
+ import_react130.default.createElement(
536393
536853
  Box_default,
536394
536854
  { borderStyle: "round", borderColor: theme14.colors.menuInfo, paddingX: 1 },
536395
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.loadingTasks)
536855
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.loadingTasks)
536396
536856
  )
536397
536857
  );
536398
536858
  }
536399
536859
  if (tasks.length === 0) {
536400
- return import_react129.default.createElement(
536860
+ return import_react130.default.createElement(
536401
536861
  Box_default,
536402
536862
  { flexDirection: "column", paddingX: 1 },
536403
- import_react129.default.createElement(
536863
+ import_react130.default.createElement(
536404
536864
  Box_default,
536405
536865
  { borderStyle: "round", borderColor: theme14.colors.warning, paddingX: 1 },
536406
- import_react129.default.createElement(
536866
+ import_react130.default.createElement(
536407
536867
  Text,
536408
536868
  { color: theme14.colors.menuSecondary, dimColor: true },
536409
536869
  t.taskManager.noTasksFound,
@@ -536417,32 +536877,32 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536417
536877
  );
536418
536878
  }
536419
536879
  if (viewMode === "detail" && detailTask) {
536420
- return import_react129.default.createElement(
536880
+ return import_react130.default.createElement(
536421
536881
  Box_default,
536422
536882
  { flexDirection: "column", paddingX: 1 },
536423
- import_react129.default.createElement(
536883
+ import_react130.default.createElement(
536424
536884
  Box_default,
536425
536885
  { borderStyle: "round", borderColor: theme14.colors.menuInfo, paddingX: 1, flexDirection: "column" },
536426
- import_react129.default.createElement(
536886
+ import_react130.default.createElement(
536427
536887
  Box_default,
536428
536888
  { flexDirection: "column", marginBottom: 1 },
536429
- import_react129.default.createElement(Text, { color: theme14.colors.menuInfo, bold: true }, t.taskManager.taskDetailsTitle),
536430
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, detailTask.status === "paused" ? t.taskManager.backToList : `${t.taskManager.continueHint} \u2022 ${t.taskManager.backToList}`)
536889
+ import_react130.default.createElement(Text, { color: theme14.colors.menuInfo, bold: true }, t.taskManager.taskDetailsTitle),
536890
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, detailTask.status === "paused" ? t.taskManager.backToList : `${t.taskManager.continueHint} \u2022 ${t.taskManager.backToList}`)
536431
536891
  ),
536432
- import_react129.default.createElement(
536892
+ import_react130.default.createElement(
536433
536893
  Box_default,
536434
536894
  { flexDirection: "column", gap: 1 },
536435
- import_react129.default.createElement(
536895
+ import_react130.default.createElement(
536436
536896
  Box_default,
536437
536897
  { flexDirection: "column" },
536438
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.titleLabel),
536439
- import_react129.default.createElement(Text, null, detailTask.title || t.taskManager.untitled)
536898
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.titleLabel),
536899
+ import_react130.default.createElement(Text, null, detailTask.title || t.taskManager.untitled)
536440
536900
  ),
536441
- import_react129.default.createElement(
536901
+ import_react130.default.createElement(
536442
536902
  Box_default,
536443
536903
  { flexDirection: "column" },
536444
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.statusLabel),
536445
- import_react129.default.createElement(
536904
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.statusLabel),
536905
+ import_react130.default.createElement(
536446
536906
  Text,
536447
536907
  { color: getStatusColor(detailTask.status) },
536448
536908
  getStatusIcon(detailTask.status),
@@ -536450,64 +536910,64 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536450
536910
  detailTask.status
536451
536911
  )
536452
536912
  ),
536453
- import_react129.default.createElement(
536913
+ import_react130.default.createElement(
536454
536914
  Box_default,
536455
536915
  { flexDirection: "column" },
536456
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.createdLabel),
536457
- import_react129.default.createElement(Text, null, new Date(detailTask.createdAt).toLocaleString())
536916
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.createdLabel),
536917
+ import_react130.default.createElement(Text, null, new Date(detailTask.createdAt).toLocaleString())
536458
536918
  ),
536459
- import_react129.default.createElement(
536919
+ import_react130.default.createElement(
536460
536920
  Box_default,
536461
536921
  { flexDirection: "column" },
536462
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.updatedLabel),
536463
- import_react129.default.createElement(Text, null, new Date(detailTask.updatedAt).toLocaleString())
536922
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.updatedLabel),
536923
+ import_react130.default.createElement(Text, null, new Date(detailTask.updatedAt).toLocaleString())
536464
536924
  ),
536465
- import_react129.default.createElement(
536925
+ import_react130.default.createElement(
536466
536926
  Box_default,
536467
536927
  { flexDirection: "column" },
536468
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.messagesLabel.replace("{count}", String(detailTask.messages.length)))
536928
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.messagesLabel.replace("{count}", String(detailTask.messages.length)))
536469
536929
  ),
536470
- detailTask.status === "paused" && ((_a21 = detailTask.pausedInfo) == null ? void 0 : _a21.sensitiveCommand) && import_react129.default.createElement(
536930
+ detailTask.status === "paused" && ((_a21 = detailTask.pausedInfo) == null ? void 0 : _a21.sensitiveCommand) && import_react130.default.createElement(
536471
536931
  Box_default,
536472
536932
  { flexDirection: "column", marginTop: 1 },
536473
- import_react129.default.createElement(
536933
+ import_react130.default.createElement(
536474
536934
  Box_default,
536475
536935
  { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, paddingY: 1 },
536476
- import_react129.default.createElement(Text, { color: "yellow", bold: true }, t.taskManager.sensitiveCommandDetected),
536477
- import_react129.default.createElement(
536936
+ import_react130.default.createElement(Text, { color: "yellow", bold: true }, t.taskManager.sensitiveCommandDetected),
536937
+ import_react130.default.createElement(
536478
536938
  Box_default,
536479
536939
  { marginTop: 1 },
536480
- import_react129.default.createElement(
536940
+ import_react130.default.createElement(
536481
536941
  Text,
536482
536942
  null,
536483
- import_react129.default.createElement(Text, { bold: true }, t.taskManager.commandLabel),
536484
- import_react129.default.createElement(Text, { color: "yellow" }, detailTask.pausedInfo.sensitiveCommand.command)
536943
+ import_react130.default.createElement(Text, { bold: true }, t.taskManager.commandLabel),
536944
+ import_react130.default.createElement(Text, { color: "yellow" }, detailTask.pausedInfo.sensitiveCommand.command)
536485
536945
  )
536486
536946
  ),
536487
- detailTask.pausedInfo.sensitiveCommand.description && import_react129.default.createElement(Text, { dimColor: true }, detailTask.pausedInfo.sensitiveCommand.description),
536488
- !rejectInputMode ? import_react129.default.createElement(
536947
+ detailTask.pausedInfo.sensitiveCommand.description && import_react130.default.createElement(Text, { dimColor: true }, detailTask.pausedInfo.sensitiveCommand.description),
536948
+ !rejectInputMode ? import_react130.default.createElement(
536489
536949
  Box_default,
536490
536950
  { marginTop: 1, paddingTop: 1, borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: "gray", flexDirection: "column" },
536491
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.approveRejectHint)
536492
- ) : import_react129.default.createElement(
536951
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.approveRejectHint)
536952
+ ) : import_react130.default.createElement(
536493
536953
  Box_default,
536494
536954
  { marginTop: 1, paddingTop: 1, borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: "gray", flexDirection: "column" },
536495
- import_react129.default.createElement(Text, { color: "yellow", bold: true }, t.taskManager.enterRejectionReason),
536496
- import_react129.default.createElement(
536955
+ import_react130.default.createElement(Text, { color: "yellow", bold: true }, t.taskManager.enterRejectionReason),
536956
+ import_react130.default.createElement(
536497
536957
  Text,
536498
536958
  null,
536499
536959
  rejectReason,
536500
- import_react129.default.createElement(Text, { color: theme14.colors.menuInfo }, "\u2588")
536960
+ import_react130.default.createElement(Text, { color: theme14.colors.menuInfo }, "\u2588")
536501
536961
  ),
536502
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.submitCancelHint)
536962
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.submitCancelHint)
536503
536963
  )
536504
536964
  )
536505
536965
  )
536506
536966
  ),
536507
- (pendingAction == null ? void 0 : pendingAction.type) === "continue" && pendingAction.taskId === detailTask.id && import_react129.default.createElement(
536967
+ (pendingAction == null ? void 0 : pendingAction.type) === "continue" && pendingAction.taskId === detailTask.id && import_react130.default.createElement(
536508
536968
  Box_default,
536509
536969
  { marginTop: 1 },
536510
- import_react129.default.createElement(Alert, { variant: "warning" }, detailTask.status !== "completed" ? t.taskManager.taskNotCompleted : t.taskManager.confirmConvertToSession)
536970
+ import_react130.default.createElement(Alert, { variant: "warning" }, detailTask.status !== "completed" ? t.taskManager.taskNotCompleted : t.taskManager.confirmConvertToSession)
536511
536971
  )
536512
536972
  )
536513
536973
  );
@@ -536516,21 +536976,21 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536516
536976
  const hasMore = tasks.length > scrollOffset + VISIBLE_ITEMS;
536517
536977
  const hasPrevious = scrollOffset > 0;
536518
536978
  const currentTask = tasks[selectedIndex];
536519
- return import_react129.default.createElement(
536979
+ return import_react130.default.createElement(
536520
536980
  Box_default,
536521
536981
  { flexDirection: "column", paddingX: 1 },
536522
- import_react129.default.createElement(
536982
+ import_react130.default.createElement(
536523
536983
  Box_default,
536524
536984
  { borderStyle: "round", borderColor: theme14.colors.menuInfo, paddingX: 1, flexDirection: "column" },
536525
- import_react129.default.createElement(
536985
+ import_react130.default.createElement(
536526
536986
  Box_default,
536527
536987
  { flexDirection: "column" },
536528
- import_react129.default.createElement(
536988
+ import_react130.default.createElement(
536529
536989
  Text,
536530
536990
  { color: theme14.colors.menuInfo, dimColor: true },
536531
536991
  t.taskManager.tasksCount.replace("{current}", String(selectedIndex + 1)).replace("{total}", String(tasks.length)),
536532
536992
  currentTask && ` \u2022 ${t.taskManager.messagesCount.replace("{count}", String(currentTask.messageCount))}`,
536533
- markedTasks.size > 0 && import_react129.default.createElement(
536993
+ markedTasks.size > 0 && import_react130.default.createElement(
536534
536994
  Text,
536535
536995
  { color: theme14.colors.warning },
536536
536996
  " ",
@@ -536539,9 +536999,9 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536539
536999
  t.taskManager.markedCount.replace("{count}", String(markedTasks.size))
536540
537000
  )
536541
537001
  ),
536542
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.navigationHint)
537002
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.navigationHint)
536543
537003
  ),
536544
- hasPrevious && import_react129.default.createElement(
537004
+ hasPrevious && import_react130.default.createElement(
536545
537005
  Text,
536546
537006
  { color: theme14.colors.menuSecondary, dimColor: true },
536547
537007
  " ",
@@ -536554,24 +537014,24 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536554
537014
  const cleanTitle = (task.title || t.taskManager.untitled).replace(/[\r\n\t]+/g, " ");
536555
537015
  const timeStr = formatDate(task.updatedAt);
536556
537016
  const truncatedTitle = cleanTitle.length > 50 ? cleanTitle.slice(0, 47) + "..." : cleanTitle;
536557
- return import_react129.default.createElement(
537017
+ return import_react130.default.createElement(
536558
537018
  Text,
536559
537019
  { key: task.id },
536560
- import_react129.default.createElement(
537020
+ import_react130.default.createElement(
536561
537021
  Text,
536562
537022
  { color: isSelected ? theme14.colors.menuSelected : "white" },
536563
537023
  isSelected ? "\u276F " : " ",
536564
- isMarked && import_react129.default.createElement(
537024
+ isMarked && import_react130.default.createElement(
536565
537025
  Text,
536566
537026
  { color: theme14.colors.warning, bold: true },
536567
537027
  "\u25CF",
536568
537028
  " "
536569
537029
  ),
536570
- import_react129.default.createElement(Text, { color: getStatusColor(task.status) }, getStatusIcon(task.status)),
537030
+ import_react130.default.createElement(Text, { color: getStatusColor(task.status) }, getStatusIcon(task.status)),
536571
537031
  " ",
536572
537032
  truncatedTitle
536573
537033
  ),
536574
- import_react129.default.createElement(
537034
+ import_react130.default.createElement(
536575
537035
  Text,
536576
537036
  { color: theme14.colors.menuSecondary, dimColor: true },
536577
537037
  " ",
@@ -536580,25 +537040,25 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536580
537040
  )
536581
537041
  );
536582
537042
  }),
536583
- hasMore && import_react129.default.createElement(
537043
+ hasMore && import_react130.default.createElement(
536584
537044
  Text,
536585
537045
  { color: theme14.colors.menuSecondary, dimColor: true },
536586
537046
  " ",
536587
537047
  t.taskManager.moreBelow.replace("{count}", String(tasks.length - scrollOffset - VISIBLE_ITEMS))
536588
537048
  )
536589
537049
  ),
536590
- (pendingAction == null ? void 0 : pendingAction.type) === "delete" && import_react129.default.createElement(
537050
+ (pendingAction == null ? void 0 : pendingAction.type) === "delete" && import_react130.default.createElement(
536591
537051
  Box_default,
536592
537052
  { marginTop: 1 },
536593
- import_react129.default.createElement(Alert, { variant: "warning" }, pendingAction.taskId ? t.taskManager.deleteConfirm : t.taskManager.deleteMultipleConfirm.replace("{count}", String(markedTasks.size)))
537053
+ import_react130.default.createElement(Alert, { variant: "warning" }, pendingAction.taskId ? t.taskManager.deleteConfirm : t.taskManager.deleteMultipleConfirm.replace("{count}", String(markedTasks.size)))
536594
537054
  )
536595
537055
  );
536596
537056
  }
536597
- var import_react129;
537057
+ var import_react130;
536598
537058
  var init_TaskManagerScreen = __esm({
536599
537059
  async "dist/ui/pages/TaskManagerScreen.js"() {
536600
537060
  "use strict";
536601
- import_react129 = __toESM(require_react(), 1);
537061
+ import_react130 = __toESM(require_react(), 1);
536602
537062
  await init_build2();
536603
537063
  await init_build4();
536604
537064
  init_ThemeContext();
@@ -536613,8 +537073,8 @@ __export(MCPConfigScreen_exports, {
536613
537073
  default: () => MCPConfigScreen
536614
537074
  });
536615
537075
  import { spawn as spawn6, execSync as execSync5 } from "child_process";
536616
- import { writeFileSync as writeFileSync11, readFileSync as readFileSync17, existsSync as existsSync22 } from "fs";
536617
- import { join as join25 } from "path";
537076
+ import { writeFileSync as writeFileSync12, readFileSync as readFileSync18, existsSync as existsSync23 } from "fs";
537077
+ import { join as join26 } from "path";
536618
537078
  import { homedir as homedir16, platform as platform4 } from "os";
536619
537079
  function checkCommandExists2(command) {
536620
537080
  if (platform4() === "win32") {
@@ -536666,10 +537126,10 @@ function getSystemEditor() {
536666
537126
  }
536667
537127
  function MCPConfigScreen({ onBack }) {
536668
537128
  const { exit } = use_app_default();
536669
- (0, import_react130.useEffect)(() => {
537129
+ (0, import_react131.useEffect)(() => {
536670
537130
  const openEditor = async () => {
536671
537131
  const config3 = getMCPConfig();
536672
- writeFileSync11(MCP_CONFIG_FILE2, JSON.stringify(config3, null, 2), "utf8");
537132
+ writeFileSync12(MCP_CONFIG_FILE2, JSON.stringify(config3, null, 2), "utf8");
536673
537133
  const editor = getSystemEditor();
536674
537134
  if (!editor) {
536675
537135
  console.error("No text editor found! Please set the EDITOR or VISUAL environment variable.");
@@ -536701,9 +537161,9 @@ function MCPConfigScreen({ onBack }) {
536701
537161
  stdio: "inherit"
536702
537162
  });
536703
537163
  child.on("close", () => {
536704
- if (existsSync22(MCP_CONFIG_FILE2)) {
537164
+ if (existsSync23(MCP_CONFIG_FILE2)) {
536705
537165
  try {
536706
- const editedContent = readFileSync17(MCP_CONFIG_FILE2, "utf8");
537166
+ const editedContent = readFileSync18(MCP_CONFIG_FILE2, "utf8");
536707
537167
  const parsedConfig = JSON.parse(editedContent);
536708
537168
  const validationErrors = validateMCPConfig(parsedConfig);
536709
537169
  if (validationErrors.length === 0) {
@@ -536726,16 +537186,16 @@ function MCPConfigScreen({ onBack }) {
536726
537186
  }, [exit, onBack]);
536727
537187
  return null;
536728
537188
  }
536729
- var import_react130, CONFIG_DIR8, MCP_CONFIG_FILE2;
537189
+ var import_react131, CONFIG_DIR8, MCP_CONFIG_FILE2;
536730
537190
  var init_MCPConfigScreen = __esm({
536731
537191
  async "dist/ui/pages/MCPConfigScreen.js"() {
536732
537192
  "use strict";
536733
- import_react130 = __toESM(require_react(), 1);
537193
+ import_react131 = __toESM(require_react(), 1);
536734
537194
  await init_build2();
536735
537195
  init_apiConfig();
536736
537196
  init_processManager();
536737
- CONFIG_DIR8 = join25(homedir16(), ".snow");
536738
- MCP_CONFIG_FILE2 = join25(CONFIG_DIR8, "mcp-config.json");
537197
+ CONFIG_DIR8 = join26(homedir16(), ".snow");
537198
+ MCP_CONFIG_FILE2 = join26(CONFIG_DIR8, "mcp-config.json");
536739
537199
  }
536740
537200
  });
536741
537201
 
@@ -536745,9 +537205,9 @@ __export(app_exports, {
536745
537205
  default: () => App2
536746
537206
  });
536747
537207
  function ShowTaskListWrapper() {
536748
- const [currentView, setCurrentView] = (0, import_react131.useState)("tasks");
536749
- const [chatScreenKey, setChatScreenKey] = (0, import_react131.useState)(0);
536750
- const [exitNotification, setExitNotification] = (0, import_react131.useState)({
537208
+ const [currentView, setCurrentView] = (0, import_react132.useState)("tasks");
537209
+ const [chatScreenKey, setChatScreenKey] = (0, import_react132.useState)(0);
537210
+ const [exitNotification, setExitNotification] = (0, import_react132.useState)({
536751
537211
  show: false,
536752
537212
  message: ""
536753
537213
  });
@@ -536756,44 +537216,44 @@ function ShowTaskListWrapper() {
536756
537216
  useGlobalExit(setExitNotification);
536757
537217
  const renderView = () => {
536758
537218
  if (currentView === "chat") {
536759
- return import_react131.default.createElement(
536760
- import_react131.Suspense,
537219
+ return import_react132.default.createElement(
537220
+ import_react132.Suspense,
536761
537221
  { fallback: loadingFallback },
536762
- import_react131.default.createElement(ChatScreen2, { key: chatScreenKey, autoResume: true, enableYolo: false })
537222
+ import_react132.default.createElement(ChatScreen2, { key: chatScreenKey, autoResume: true, enableYolo: false })
536763
537223
  );
536764
537224
  }
536765
- return import_react131.default.createElement(
536766
- import_react131.Suspense,
537225
+ return import_react132.default.createElement(
537226
+ import_react132.Suspense,
536767
537227
  { fallback: loadingFallback },
536768
- import_react131.default.createElement(TaskManagerScreen2, { onBack: () => gracefulExit(), onResumeTask: () => {
537228
+ import_react132.default.createElement(TaskManagerScreen2, { onBack: () => gracefulExit(), onResumeTask: () => {
536769
537229
  setCurrentView("chat");
536770
537230
  setChatScreenKey((prev) => prev + 1);
536771
537231
  } })
536772
537232
  );
536773
537233
  };
536774
- return import_react131.default.createElement(
537234
+ return import_react132.default.createElement(
536775
537235
  Box_default,
536776
537236
  { flexDirection: "column", width: terminalWidth },
536777
537237
  renderView(),
536778
- exitNotification.show && import_react131.default.createElement(
537238
+ exitNotification.show && import_react132.default.createElement(
536779
537239
  Box_default,
536780
537240
  { paddingX: 1, flexShrink: 0 },
536781
- import_react131.default.createElement(Alert, { variant: "warning" }, exitNotification.message)
537241
+ import_react132.default.createElement(Alert, { variant: "warning" }, exitNotification.message)
536782
537242
  )
536783
537243
  );
536784
537244
  }
536785
537245
  function AppContent({ version: version2, skipWelcome, autoResume, enableYolo }) {
536786
- const [currentView, setCurrentView] = (0, import_react131.useState)(skipWelcome ? "chat" : "welcome");
536787
- const [chatScreenKey, setChatScreenKey] = (0, import_react131.useState)(0);
536788
- const [welcomeMenuIndex, setWelcomeMenuIndex] = (0, import_react131.useState)(0);
536789
- const [shouldAutoResume, setShouldAutoResume] = (0, import_react131.useState)(false);
536790
- const [exitNotification, setExitNotification] = (0, import_react131.useState)({
537246
+ const [currentView, setCurrentView] = (0, import_react132.useState)(skipWelcome ? "chat" : "welcome");
537247
+ const [chatScreenKey, setChatScreenKey] = (0, import_react132.useState)(0);
537248
+ const [welcomeMenuIndex, setWelcomeMenuIndex] = (0, import_react132.useState)(0);
537249
+ const [shouldAutoResume, setShouldAutoResume] = (0, import_react132.useState)(false);
537250
+ const [exitNotification, setExitNotification] = (0, import_react132.useState)({
536791
537251
  show: false,
536792
537252
  message: ""
536793
537253
  });
536794
537254
  const { columns: terminalWidth } = useTerminalSize();
536795
537255
  useGlobalExit(setExitNotification);
536796
- (0, import_react131.useEffect)(() => {
537256
+ (0, import_react132.useEffect)(() => {
536797
537257
  const unsubscribe = onNavigate((event) => {
536798
537258
  if (event.destination === "welcome" && currentView === "chat") {
536799
537259
  setChatScreenKey((prev) => prev + 1);
@@ -536821,113 +537281,113 @@ function AppContent({ version: version2, skipWelcome, autoResume, enableYolo })
536821
537281
  const loadingFallback = null;
536822
537282
  switch (currentView) {
536823
537283
  case "welcome":
536824
- return import_react131.default.createElement(
536825
- import_react131.Suspense,
537284
+ return import_react132.default.createElement(
537285
+ import_react132.Suspense,
536826
537286
  { fallback: loadingFallback },
536827
- import_react131.default.createElement(WelcomeScreen2, { version: version2, onMenuSelect: handleMenuSelect, defaultMenuIndex: welcomeMenuIndex, onMenuSelectionPersist: setWelcomeMenuIndex })
537287
+ import_react132.default.createElement(WelcomeScreen2, { version: version2, onMenuSelect: handleMenuSelect, defaultMenuIndex: welcomeMenuIndex, onMenuSelectionPersist: setWelcomeMenuIndex })
536828
537288
  );
536829
537289
  case "chat":
536830
- return import_react131.default.createElement(
536831
- import_react131.Suspense,
537290
+ return import_react132.default.createElement(
537291
+ import_react132.Suspense,
536832
537292
  { fallback: loadingFallback },
536833
- import_react131.default.createElement(ChatScreen2, { key: chatScreenKey, autoResume: autoResume || shouldAutoResume, enableYolo })
537293
+ import_react132.default.createElement(ChatScreen2, { key: chatScreenKey, autoResume: autoResume || shouldAutoResume, enableYolo })
536834
537294
  );
536835
537295
  case "settings":
536836
- return import_react131.default.createElement(
537296
+ return import_react132.default.createElement(
536837
537297
  Box_default,
536838
537298
  { flexDirection: "column" },
536839
- import_react131.default.createElement(Text, { color: "blue" }, "Settings"),
536840
- import_react131.default.createElement(Text, { color: "gray" }, "Settings interface would be implemented here")
537299
+ import_react132.default.createElement(Text, { color: "blue" }, "Settings"),
537300
+ import_react132.default.createElement(Text, { color: "gray" }, "Settings interface would be implemented here")
536841
537301
  );
536842
537302
  case "mcp":
536843
- return import_react131.default.createElement(
536844
- import_react131.Suspense,
537303
+ return import_react132.default.createElement(
537304
+ import_react132.Suspense,
536845
537305
  { fallback: loadingFallback },
536846
- import_react131.default.createElement(MCPConfigScreen2, { onBack: () => setCurrentView("welcome"), onSave: () => setCurrentView("welcome") })
537306
+ import_react132.default.createElement(MCPConfigScreen2, { onBack: () => setCurrentView("welcome"), onSave: () => setCurrentView("welcome") })
536847
537307
  );
536848
537308
  case "systemprompt":
536849
- return import_react131.default.createElement(
536850
- import_react131.Suspense,
537309
+ return import_react132.default.createElement(
537310
+ import_react132.Suspense,
536851
537311
  { fallback: loadingFallback },
536852
- import_react131.default.createElement(SystemPromptConfigScreen3, { onBack: () => setCurrentView("welcome") })
537312
+ import_react132.default.createElement(SystemPromptConfigScreen3, { onBack: () => setCurrentView("welcome") })
536853
537313
  );
536854
537314
  case "customheaders":
536855
- return import_react131.default.createElement(
536856
- import_react131.Suspense,
537315
+ return import_react132.default.createElement(
537316
+ import_react132.Suspense,
536857
537317
  { fallback: loadingFallback },
536858
- import_react131.default.createElement(CustomHeadersScreen3, { onBack: () => setCurrentView("welcome") })
537318
+ import_react132.default.createElement(CustomHeadersScreen3, { onBack: () => setCurrentView("welcome") })
536859
537319
  );
536860
537320
  case "tasks":
536861
- return import_react131.default.createElement(
536862
- import_react131.Suspense,
537321
+ return import_react132.default.createElement(
537322
+ import_react132.Suspense,
536863
537323
  { fallback: loadingFallback },
536864
- import_react131.default.createElement(TaskManagerScreen2, { onBack: () => setCurrentView("welcome"), onResumeTask: () => {
537324
+ import_react132.default.createElement(TaskManagerScreen2, { onBack: () => setCurrentView("welcome"), onResumeTask: () => {
536865
537325
  setCurrentView("chat");
536866
537326
  setChatScreenKey((prev) => prev + 1);
536867
537327
  } })
536868
537328
  );
536869
537329
  default:
536870
- return import_react131.default.createElement(
536871
- import_react131.Suspense,
537330
+ return import_react132.default.createElement(
537331
+ import_react132.Suspense,
536872
537332
  { fallback: loadingFallback },
536873
- import_react131.default.createElement(WelcomeScreen2, { version: version2, onMenuSelect: handleMenuSelect, defaultMenuIndex: welcomeMenuIndex, onMenuSelectionPersist: setWelcomeMenuIndex })
537333
+ import_react132.default.createElement(WelcomeScreen2, { version: version2, onMenuSelect: handleMenuSelect, defaultMenuIndex: welcomeMenuIndex, onMenuSelectionPersist: setWelcomeMenuIndex })
536874
537334
  );
536875
537335
  }
536876
537336
  };
536877
- return import_react131.default.createElement(
537337
+ return import_react132.default.createElement(
536878
537338
  Box_default,
536879
537339
  { flexDirection: "column", width: terminalWidth },
536880
537340
  renderView(),
536881
- exitNotification.show && import_react131.default.createElement(
537341
+ exitNotification.show && import_react132.default.createElement(
536882
537342
  Box_default,
536883
537343
  { paddingX: 1, flexShrink: 0 },
536884
- import_react131.default.createElement(Alert, { variant: "warning" }, exitNotification.message)
537344
+ import_react132.default.createElement(Alert, { variant: "warning" }, exitNotification.message)
536885
537345
  )
536886
537346
  );
536887
537347
  }
536888
537348
  function App2({ version: version2, skipWelcome, autoResume, headlessPrompt, showTaskList, enableYolo }) {
536889
537349
  if (headlessPrompt) {
536890
537350
  const loadingFallback = null;
536891
- return import_react131.default.createElement(
537351
+ return import_react132.default.createElement(
536892
537352
  I18nProvider,
536893
537353
  null,
536894
- import_react131.default.createElement(
537354
+ import_react132.default.createElement(
536895
537355
  ThemeProvider,
536896
537356
  null,
536897
- import_react131.default.createElement(
536898
- import_react131.Suspense,
537357
+ import_react132.default.createElement(
537358
+ import_react132.Suspense,
536899
537359
  { fallback: loadingFallback },
536900
- import_react131.default.createElement(HeadlessModeScreen2, { prompt: headlessPrompt, onComplete: () => gracefulExit() })
537360
+ import_react132.default.createElement(HeadlessModeScreen2, { prompt: headlessPrompt, onComplete: () => gracefulExit() })
536901
537361
  )
536902
537362
  )
536903
537363
  );
536904
537364
  }
536905
537365
  if (showTaskList) {
536906
- return import_react131.default.createElement(
537366
+ return import_react132.default.createElement(
536907
537367
  I18nProvider,
536908
537368
  null,
536909
- import_react131.default.createElement(
537369
+ import_react132.default.createElement(
536910
537370
  ThemeProvider,
536911
537371
  null,
536912
- import_react131.default.createElement(ShowTaskListWrapper, null)
537372
+ import_react132.default.createElement(ShowTaskListWrapper, null)
536913
537373
  )
536914
537374
  );
536915
537375
  }
536916
- return import_react131.default.createElement(
537376
+ return import_react132.default.createElement(
536917
537377
  I18nProvider,
536918
537378
  null,
536919
- import_react131.default.createElement(
537379
+ import_react132.default.createElement(
536920
537380
  ThemeProvider,
536921
537381
  null,
536922
- import_react131.default.createElement(AppContent, { version: version2, skipWelcome, autoResume, enableYolo })
537382
+ import_react132.default.createElement(AppContent, { version: version2, skipWelcome, autoResume, enableYolo })
536923
537383
  )
536924
537384
  );
536925
537385
  }
536926
- var import_react131, WelcomeScreen2, ChatScreen2, HeadlessModeScreen2, TaskManagerScreen2, MCPConfigScreen2, SystemPromptConfigScreen3, CustomHeadersScreen3;
537386
+ var import_react132, WelcomeScreen2, ChatScreen2, HeadlessModeScreen2, TaskManagerScreen2, MCPConfigScreen2, SystemPromptConfigScreen3, CustomHeadersScreen3;
536927
537387
  var init_app = __esm({
536928
537388
  async "dist/app.js"() {
536929
537389
  "use strict";
536930
- import_react131 = __toESM(require_react(), 1);
537390
+ import_react132 = __toESM(require_react(), 1);
536931
537391
  await init_build2();
536932
537392
  await init_build4();
536933
537393
  await init_useGlobalExit();
@@ -536937,13 +537397,13 @@ var init_app = __esm({
536937
537397
  init_ThemeContext();
536938
537398
  init_processManager();
536939
537399
  init_apiConfig();
536940
- WelcomeScreen2 = import_react131.default.lazy(() => init_WelcomeScreen().then(() => WelcomeScreen_exports));
536941
- ChatScreen2 = import_react131.default.lazy(() => init_ChatScreen().then(() => ChatScreen_exports));
536942
- HeadlessModeScreen2 = import_react131.default.lazy(() => init_HeadlessModeScreen().then(() => HeadlessModeScreen_exports));
536943
- TaskManagerScreen2 = import_react131.default.lazy(() => init_TaskManagerScreen().then(() => TaskManagerScreen_exports));
536944
- MCPConfigScreen2 = import_react131.default.lazy(() => init_MCPConfigScreen().then(() => MCPConfigScreen_exports));
536945
- SystemPromptConfigScreen3 = import_react131.default.lazy(() => init_SystemPromptConfigScreen().then(() => SystemPromptConfigScreen_exports));
536946
- CustomHeadersScreen3 = import_react131.default.lazy(() => init_CustomHeadersScreen().then(() => CustomHeadersScreen_exports));
537400
+ WelcomeScreen2 = import_react132.default.lazy(() => init_WelcomeScreen().then(() => WelcomeScreen_exports));
537401
+ ChatScreen2 = import_react132.default.lazy(() => init_ChatScreen().then(() => ChatScreen_exports));
537402
+ HeadlessModeScreen2 = import_react132.default.lazy(() => init_HeadlessModeScreen().then(() => HeadlessModeScreen_exports));
537403
+ TaskManagerScreen2 = import_react132.default.lazy(() => init_TaskManagerScreen().then(() => TaskManagerScreen_exports));
537404
+ MCPConfigScreen2 = import_react132.default.lazy(() => init_MCPConfigScreen().then(() => MCPConfigScreen_exports));
537405
+ SystemPromptConfigScreen3 = import_react132.default.lazy(() => init_SystemPromptConfigScreen().then(() => SystemPromptConfigScreen_exports));
537406
+ CustomHeadersScreen3 = import_react132.default.lazy(() => init_CustomHeadersScreen().then(() => CustomHeadersScreen_exports));
536947
537407
  }
536948
537408
  });
536949
537409
 
@@ -536954,17 +537414,17 @@ __export(taskExecutor_exports, {
536954
537414
  executeTaskInBackground: () => executeTaskInBackground
536955
537415
  });
536956
537416
  import { spawn as spawn7 } from "child_process";
536957
- import { writeFileSync as writeFileSync12, appendFileSync, existsSync as existsSync23, mkdirSync as mkdirSync11 } from "fs";
536958
- import { join as join26 } from "path";
537417
+ import { writeFileSync as writeFileSync13, appendFileSync, existsSync as existsSync24, mkdirSync as mkdirSync12 } from "fs";
537418
+ import { join as join27 } from "path";
536959
537419
  import { homedir as homedir17 } from "os";
536960
537420
  function ensureLogDir() {
536961
- if (!existsSync23(TASK_LOG_DIR)) {
536962
- mkdirSync11(TASK_LOG_DIR, { recursive: true });
537421
+ if (!existsSync24(TASK_LOG_DIR)) {
537422
+ mkdirSync12(TASK_LOG_DIR, { recursive: true });
536963
537423
  }
536964
537424
  }
536965
537425
  function getLogPath(taskId) {
536966
537426
  ensureLogDir();
536967
- return join26(TASK_LOG_DIR, `${taskId}.log`);
537427
+ return join27(TASK_LOG_DIR, `${taskId}.log`);
536968
537428
  }
536969
537429
  function writeLog(taskId, message) {
536970
537430
  try {
@@ -536979,7 +537439,7 @@ async function executeTaskInBackground(taskId, prompt) {
536979
537439
  const cliPath = process.argv[1] || "";
536980
537440
  const logPath = getLogPath(taskId);
536981
537441
  ensureLogDir();
536982
- writeFileSync12(logPath, `Task ${taskId} execution log
537442
+ writeFileSync13(logPath, `Task ${taskId} execution log
536983
537443
  `, "utf-8");
536984
537444
  writeLog(taskId, `Starting background task with prompt: ${prompt.slice(0, 100)}...`);
536985
537445
  writeLog(taskId, `CLI path: ${cliPath}`);
@@ -537243,12 +537703,12 @@ var init_taskExecutor = __esm({
537243
537703
  "dist/utils/task/taskExecutor.js"() {
537244
537704
  "use strict";
537245
537705
  init_taskManager();
537246
- TASK_LOG_DIR = join26(homedir17(), ".snow", "task-logs");
537706
+ TASK_LOG_DIR = join27(homedir17(), ".snow", "task-logs");
537247
537707
  }
537248
537708
  });
537249
537709
 
537250
537710
  // dist/cli.js
537251
- var import_react132 = __toESM(require_react(), 1);
537711
+ var import_react133 = __toESM(require_react(), 1);
537252
537712
  await init_build2();
537253
537713
  await init_build3();
537254
537714
 
@@ -538031,8 +538491,8 @@ var meow_default = meow;
538031
538491
 
538032
538492
  // dist/cli.js
538033
538493
  import { execSync as execSync6 } from "child_process";
538034
- import { readFileSync as readFileSync18 } from "fs";
538035
- import { join as join27 } from "path";
538494
+ import { readFileSync as readFileSync19 } from "fs";
538495
+ import { join as join28 } from "path";
538036
538496
  import { fileURLToPath as fileURLToPath6 } from "url";
538037
538497
  process.env["FORCE_COLOR"] = "3";
538038
538498
  var MIN_NODE_VERSION = 16;
@@ -538068,7 +538528,7 @@ if (!isQuickCommand) {
538068
538528
  process.stdout.write("\u280B Loading...\r");
538069
538529
  }
538070
538530
  var __dirname2 = fileURLToPath6(new URL(".", import.meta.url));
538071
- var packageJson = JSON.parse(readFileSync18(join27(__dirname2, "../package.json"), "utf-8"));
538531
+ var packageJson = JSON.parse(readFileSync19(join28(__dirname2, "../package.json"), "utf-8"));
538072
538532
  var VERSION2 = packageJson.version;
538073
538533
  async function loadDependencies() {
538074
538534
  await Promise.resolve().then(() => (init_utils(), utils_exports));
@@ -538203,9 +538663,9 @@ if (cli.flags.taskExecute) {
538203
538663
  process.exit(0);
538204
538664
  }
538205
538665
  var Startup = ({ version: version2, skipWelcome, autoResume, headlessPrompt, showTaskList, isDevMode: isDevMode2, enableYolo }) => {
538206
- const [appReady, setAppReady] = import_react132.default.useState(false);
538207
- const [AppComponent, setAppComponent] = import_react132.default.useState(null);
538208
- import_react132.default.useEffect(() => {
538666
+ const [appReady, setAppReady] = import_react133.default.useState(false);
538667
+ const [AppComponent, setAppComponent] = import_react133.default.useState(null);
538668
+ import_react133.default.useEffect(() => {
538209
538669
  let mounted = true;
538210
538670
  const init = async () => {
538211
538671
  const deps = await loadDependencies();
@@ -538250,22 +538710,22 @@ var Startup = ({ version: version2, skipWelcome, autoResume, headlessPrompt, sho
538250
538710
  };
538251
538711
  }, [version2, isDevMode2]);
538252
538712
  if (!appReady || !AppComponent) {
538253
- return import_react132.default.createElement(
538713
+ return import_react133.default.createElement(
538254
538714
  Box_default,
538255
538715
  { flexDirection: "column" },
538256
- import_react132.default.createElement(
538716
+ import_react133.default.createElement(
538257
538717
  Box_default,
538258
538718
  null,
538259
- import_react132.default.createElement(
538719
+ import_react133.default.createElement(
538260
538720
  Text,
538261
538721
  { color: "cyan" },
538262
- import_react132.default.createElement(build_default, { type: "dots" })
538722
+ import_react133.default.createElement(build_default, { type: "dots" })
538263
538723
  ),
538264
- import_react132.default.createElement(Text, null, " Loading...")
538724
+ import_react133.default.createElement(Text, null, " Loading...")
538265
538725
  )
538266
538726
  );
538267
538727
  }
538268
- return import_react132.default.createElement(AppComponent, { version: version2, skipWelcome, autoResume, headlessPrompt, showTaskList, enableYolo });
538728
+ return import_react133.default.createElement(AppComponent, { version: version2, skipWelcome, autoResume, headlessPrompt, showTaskList, enableYolo });
538269
538729
  };
538270
538730
  process.stdout.write("\x1B[?2004l");
538271
538731
  process.stdout.write("\x1B[2K\r");
@@ -538310,7 +538770,7 @@ process.on("SIGTERM", async () => {
538310
538770
  await cleanupAsync();
538311
538771
  process.exit(0);
538312
538772
  });
538313
- render_default(import_react132.default.createElement(Startup, { version: VERSION2, skipWelcome: Boolean(cli.flags.c || cli.flags.yolo || cli.flags.cYolo), autoResume: Boolean(cli.flags.c || cli.flags.cYolo), headlessPrompt: cli.flags.ask, showTaskList: cli.flags.taskList, isDevMode: cli.flags.dev, enableYolo: Boolean(cli.flags.yolo || cli.flags.cYolo) }), {
538773
+ render_default(import_react133.default.createElement(Startup, { version: VERSION2, skipWelcome: Boolean(cli.flags.c || cli.flags.yolo || cli.flags.cYolo), autoResume: Boolean(cli.flags.c || cli.flags.cYolo), headlessPrompt: cli.flags.ask, showTaskList: cli.flags.taskList, isDevMode: cli.flags.dev, enableYolo: Boolean(cli.flags.yolo || cli.flags.cYolo) }), {
538314
538774
  exitOnCtrlC: false,
538315
538775
  patchConsole: true
538316
538776
  });