snow-ai 0.5.10 → 0.5.12

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;
@@ -88873,12 +88939,21 @@ function Menu({ options: options3, onSelect, onSelectionChange, maxHeight, defau
88873
88939
  setSelectedIndex(newIndex);
88874
88940
  setScrollOffset(getInitialScrollOffset(newIndex, visibleItemCount));
88875
88941
  }, [defaultIndex, options3.length, visibleItemCount]);
88942
+ const onSelectionChangeRef = import_react59.default.useRef(onSelectionChange);
88943
+ import_react59.default.useEffect(() => {
88944
+ onSelectionChangeRef.current = onSelectionChange;
88945
+ }, [onSelectionChange]);
88876
88946
  import_react59.default.useEffect(() => {
88877
88947
  const currentOption = options3[selectedIndex];
88878
- if (onSelectionChange && (currentOption == null ? void 0 : currentOption.infoText)) {
88879
- onSelectionChange(currentOption.infoText, currentOption.value);
88948
+ if (onSelectionChangeRef.current && (currentOption == null ? void 0 : currentOption.infoText)) {
88949
+ const handle = setImmediate(() => {
88950
+ var _a21;
88951
+ (_a21 = onSelectionChangeRef.current) == null ? void 0 : _a21.call(onSelectionChangeRef, currentOption.infoText, currentOption.value);
88952
+ });
88953
+ return () => clearImmediate(handle);
88880
88954
  }
88881
- }, [selectedIndex, options3, onSelectionChange]);
88955
+ return void 0;
88956
+ }, [selectedIndex, options3]);
88882
88957
  import_react59.default.useEffect(() => {
88883
88958
  if (selectedIndex < scrollOffset) {
88884
88959
  setScrollOffset(selectedIndex);
@@ -106352,7 +106427,7 @@ var require_doc = __commonJS({
106352
106427
  type: "cursor",
106353
106428
  placeholder: Symbol("cursor")
106354
106429
  };
106355
- function join28(sep, arr) {
106430
+ function join29(sep, arr) {
106356
106431
  const res = [];
106357
106432
  for (let i = 0; i < arr.length; i++) {
106358
106433
  if (i !== 0) {
@@ -106382,7 +106457,7 @@ var require_doc = __commonJS({
106382
106457
  }
106383
106458
  module22.exports = {
106384
106459
  concat: concat2,
106385
- join: join28,
106460
+ join: join29,
106386
106461
  line,
106387
106462
  softline,
106388
106463
  hardline,
@@ -106574,7 +106649,7 @@ var require_doc = __commonJS({
106574
106649
  var getLast = require_get_last();
106575
106650
  var {
106576
106651
  literalline,
106577
- join: join28
106652
+ join: join29
106578
106653
  } = require_doc_builders();
106579
106654
  var isConcat = (doc) => Array.isArray(doc) || doc && doc.type === "concat";
106580
106655
  var getDocParts = (doc) => {
@@ -106887,7 +106962,7 @@ var require_doc = __commonJS({
106887
106962
  }
106888
106963
  function replaceTextEndOfLine(text2) {
106889
106964
  let replacement = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : literalline;
106890
- return join28(replacement, text2.split("\n")).parts;
106965
+ return join29(replacement, text2.split("\n")).parts;
106891
106966
  }
106892
106967
  function canBreakFn(doc) {
106893
106968
  if (doc.type === "line") {
@@ -115857,7 +115932,7 @@ ${error.message}`;
115857
115932
  value: true
115858
115933
  });
115859
115934
  exports22.readFile = readFile3;
115860
- exports22.readFileSync = readFileSync19;
115935
+ exports22.readFileSync = readFileSync20;
115861
115936
  var _fs = _interopRequireDefault(__require("fs"));
115862
115937
  function _interopRequireDefault(obj2) {
115863
115938
  return obj2 && obj2.__esModule ? obj2 : {
@@ -115887,7 +115962,7 @@ ${error.message}`;
115887
115962
  throw error;
115888
115963
  }
115889
115964
  }
115890
- function readFileSync19(filepath, options3 = {}) {
115965
+ function readFileSync20(filepath, options3 = {}) {
115891
115966
  const throwNotFound = options3.throwNotFound === true;
115892
115967
  try {
115893
115968
  const content = _fs.default.readFileSync(filepath, "utf8");
@@ -116274,7 +116349,7 @@ ${error.message}`;
116274
116349
  var path48 = __require("path");
116275
116350
  var fs40 = __require("fs");
116276
116351
  var exists = fs40.exists || path48.exists;
116277
- var existsSync24 = fs40.existsSync || path48.existsSync;
116352
+ var existsSync25 = fs40.existsSync || path48.existsSync;
116278
116353
  function splitPath(path210) {
116279
116354
  var parts = path210.split(/(\/|\\)/);
116280
116355
  if (!parts.length)
@@ -116299,7 +116374,7 @@ ${error.message}`;
116299
116374
  if (parts.length === 0)
116300
116375
  return null;
116301
116376
  var p = parts.join("");
116302
- var itdoes = existsSync24(path48.join(p, clue));
116377
+ var itdoes = existsSync25(path48.join(p, clue));
116303
116378
  return itdoes ? p : testDir(parts.slice(0, -1));
116304
116379
  }
116305
116380
  return testDir(splitPath(currentFullPath));
@@ -217212,7 +217287,7 @@ var require_prettier = __commonJS({
217212
217287
  tokenize: function tokenize5(value) {
217213
217288
  return value.split("");
217214
217289
  },
217215
- join: function join28(chars) {
217290
+ join: function join29(chars) {
217216
217291
  return chars.join("");
217217
217292
  }
217218
217293
  };
@@ -223131,7 +223206,7 @@ ${frame}`;
223131
223206
  breakParent,
223132
223207
  indent,
223133
223208
  lineSuffix,
223134
- join: join28,
223209
+ join: join29,
223135
223210
  cursor: cursor4
223136
223211
  }
223137
223212
  } = require_doc();
@@ -223513,9 +223588,9 @@ ${frame}`;
223513
223588
  return "";
223514
223589
  }
223515
223590
  if (sameIndent) {
223516
- return join28(hardline, parts);
223591
+ return join29(hardline, parts);
223517
223592
  }
223518
- return indent([hardline, join28(hardline, parts)]);
223593
+ return indent([hardline, join29(hardline, parts)]);
223519
223594
  }
223520
223595
  function printCommentsSeparately(path48, options3, ignored) {
223521
223596
  const value = path48.getValue();
@@ -231064,8 +231139,8 @@ ${error.message}`;
231064
231139
  }
231065
231140
  return x;
231066
231141
  };
231067
- var defaultReadPackageSync = function defaultReadPackageSync2(readFileSync19, pkgfile) {
231068
- var body = readFileSync19(pkgfile);
231142
+ var defaultReadPackageSync = function defaultReadPackageSync2(readFileSync20, pkgfile) {
231143
+ var body = readFileSync20(pkgfile);
231069
231144
  try {
231070
231145
  var pkg = JSON.parse(body);
231071
231146
  return pkg;
@@ -231085,7 +231160,7 @@ ${error.message}`;
231085
231160
  }
231086
231161
  var opts = normalizeOptions(x, options3);
231087
231162
  var isFile = opts.isFile || defaultIsFile;
231088
- var readFileSync19 = opts.readFileSync || fs40.readFileSync;
231163
+ var readFileSync20 = opts.readFileSync || fs40.readFileSync;
231089
231164
  var isDirectory = opts.isDirectory || defaultIsDir;
231090
231165
  var realpathSync = opts.realpathSync || defaultRealpathSync;
231091
231166
  var readPackageSync2 = opts.readPackageSync || defaultReadPackageSync;
@@ -231147,7 +231222,7 @@ ${error.message}`;
231147
231222
  if (!isFile(pkgfile)) {
231148
231223
  return loadpkg(path48.dirname(dir));
231149
231224
  }
231150
- var pkg = readPackageSync2(readFileSync19, pkgfile);
231225
+ var pkg = readPackageSync2(readFileSync20, pkgfile);
231151
231226
  if (pkg && opts.packageFilter) {
231152
231227
  pkg = opts.packageFilter(pkg, dir);
231153
231228
  }
@@ -231160,7 +231235,7 @@ ${error.message}`;
231160
231235
  var pkgfile = path48.join(maybeRealpathSync(realpathSync, x2, opts), "/package.json");
231161
231236
  if (isFile(pkgfile)) {
231162
231237
  try {
231163
- var pkg = readPackageSync2(readFileSync19, pkgfile);
231238
+ var pkg = readPackageSync2(readFileSync20, pkgfile);
231164
231239
  } catch (e) {
231165
231240
  }
231166
231241
  if (pkg && opts.packageFilter) {
@@ -237860,7 +237935,7 @@ ${fromBody}`;
237860
237935
  } = require_util15();
237861
237936
  var {
237862
237937
  builders: {
237863
- join: join28,
237938
+ join: join29,
237864
237939
  hardline,
237865
237940
  softline,
237866
237941
  group: group2,
@@ -237973,7 +238048,7 @@ ${fromBody}`;
237973
238048
  maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth(cell));
237974
238049
  }
237975
238050
  }
237976
- 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, "`");
237977
238052
  return parts;
237978
238053
  }
237979
238054
  }
@@ -238117,7 +238192,7 @@ ${fromBody}`;
238117
238192
  var {
238118
238193
  builders: {
238119
238194
  indent,
238120
- join: join28,
238195
+ join: join29,
238121
238196
  hardline
238122
238197
  }
238123
238198
  } = require_doc();
@@ -238173,7 +238248,7 @@ ${fromBody}`;
238173
238248
  parts.push(expressionDoc);
238174
238249
  }
238175
238250
  }
238176
- return ["`", indent([hardline, join28(hardline, parts)]), hardline, "`"];
238251
+ return ["`", indent([hardline, join29(hardline, parts)]), hardline, "`"];
238177
238252
  }
238178
238253
  function printGraphqlComments(lines) {
238179
238254
  const parts = [];
@@ -238190,7 +238265,7 @@ ${fromBody}`;
238190
238265
  }
238191
238266
  seenComment = true;
238192
238267
  }
238193
- return parts.length === 0 ? null : join28(hardline, parts);
238268
+ return parts.length === 0 ? null : join29(hardline, parts);
238194
238269
  }
238195
238270
  module22.exports = format4;
238196
238271
  }
@@ -239850,7 +239925,7 @@ ${fromBody}`;
239850
239925
  "use strict";
239851
239926
  var {
239852
239927
  builders: {
239853
- join: join28,
239928
+ join: join29,
239854
239929
  line,
239855
239930
  group: group2,
239856
239931
  softline,
@@ -239867,7 +239942,7 @@ ${fromBody}`;
239867
239942
  }
239868
239943
  if (options3.__isVueForBindingLeft) {
239869
239944
  return path48.call((functionDeclarationPath) => {
239870
- const printed = join28([",", line], functionDeclarationPath.map(print, "params"));
239945
+ const printed = join29([",", line], functionDeclarationPath.map(print, "params"));
239871
239946
  const {
239872
239947
  params
239873
239948
  } = functionDeclarationPath.getValue();
@@ -239878,7 +239953,7 @@ ${fromBody}`;
239878
239953
  }, "program", "body", 0);
239879
239954
  }
239880
239955
  if (options3.__isVueBindings) {
239881
- 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);
239882
239957
  }
239883
239958
  }
239884
239959
  function isVueEventBindingExpression(node) {
@@ -239914,7 +239989,7 @@ ${fromBody}`;
239914
239989
  } = require_util15();
239915
239990
  var {
239916
239991
  builders: {
239917
- join: join28,
239992
+ join: join29,
239918
239993
  line,
239919
239994
  softline,
239920
239995
  group: group2,
@@ -239996,7 +240071,7 @@ ${fromBody}`;
239996
240071
  const shouldInline = shouldInlineLogicalExpression(node);
239997
240072
  const lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options3.parser === "__vue_expression") && !hasLeadingOwnLineComment(options3.originalText, node.right);
239998
240073
  const operator = node.type === "NGPipeExpression" ? "|" : node.operator;
239999
- 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))))])) : "";
240000
240075
  let right;
240001
240076
  if (shouldInline) {
240002
240077
  right = [operator, " ", print("right"), rightSuffix];
@@ -240046,7 +240121,7 @@ ${fromBody}`;
240046
240121
  "use strict";
240047
240122
  var {
240048
240123
  builders: {
240049
- join: join28,
240124
+ join: join29,
240050
240125
  line,
240051
240126
  group: group2
240052
240127
  }
@@ -240070,7 +240145,7 @@ ${fromBody}`;
240070
240145
  case "NGPipeExpression":
240071
240146
  return printBinaryishExpression(path48, options3, print);
240072
240147
  case "NGChainedExpression":
240073
- 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")));
240074
240149
  case "NGEmptyExpression":
240075
240150
  return "";
240076
240151
  case "NGQuotedExpression":
@@ -240134,7 +240209,7 @@ ${fromBody}`;
240134
240209
  fill,
240135
240210
  ifBreak,
240136
240211
  lineSuffixBoundary,
240137
- join: join28
240212
+ join: join29
240138
240213
  },
240139
240214
  utils: {
240140
240215
  willBreak
@@ -240472,9 +240547,9 @@ ${fromBody}`;
240472
240547
  case "JSXIdentifier":
240473
240548
  return String(node.name);
240474
240549
  case "JSXNamespacedName":
240475
- return join28(":", [print("namespace"), print("name")]);
240550
+ return join29(":", [print("namespace"), print("name")]);
240476
240551
  case "JSXMemberExpression":
240477
- return join28(".", [print("object"), print("property")]);
240552
+ return join29(".", [print("object"), print("property")]);
240478
240553
  case "JSXSpreadAttribute":
240479
240554
  return printJsxSpreadAttribute(path48, options3, print);
240480
240555
  case "JSXSpreadChild": {
@@ -240681,7 +240756,7 @@ ${fromBody}`;
240681
240756
  type: "cursor",
240682
240757
  placeholder: Symbol("cursor")
240683
240758
  };
240684
- function join28(sep, arr) {
240759
+ function join29(sep, arr) {
240685
240760
  const res = [];
240686
240761
  for (let i = 0; i < arr.length; i++) {
240687
240762
  if (i !== 0) {
@@ -240711,7 +240786,7 @@ ${fromBody}`;
240711
240786
  }
240712
240787
  module22.exports = {
240713
240788
  concat: concat2,
240714
- join: join28,
240789
+ join: join29,
240715
240790
  line,
240716
240791
  softline,
240717
240792
  hardline,
@@ -240744,7 +240819,7 @@ ${fromBody}`;
240744
240819
  var getLast = require_get_last();
240745
240820
  var {
240746
240821
  literalline,
240747
- join: join28
240822
+ join: join29
240748
240823
  } = require_doc_builders();
240749
240824
  var isConcat = (doc2) => Array.isArray(doc2) || doc2 && doc2.type === "concat";
240750
240825
  var getDocParts = (doc2) => {
@@ -241056,7 +241131,7 @@ ${fromBody}`;
241056
241131
  return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" && currentDoc.includes("\n") ? replaceTextEndOfLine(currentDoc) : currentDoc);
241057
241132
  }
241058
241133
  function replaceTextEndOfLine(text2, replacement = literalline) {
241059
- return join28(replacement, text2.split("\n")).parts;
241134
+ return join29(replacement, text2.split("\n")).parts;
241060
241135
  }
241061
241136
  function canBreakFn(doc2) {
241062
241137
  if (doc2.type === "line") {
@@ -241094,7 +241169,7 @@ ${fromBody}`;
241094
241169
  var {
241095
241170
  builders: {
241096
241171
  indent,
241097
- join: join28,
241172
+ join: join29,
241098
241173
  line
241099
241174
  }
241100
241175
  } = require_doc();
@@ -241144,7 +241219,7 @@ ${fromBody}`;
241144
241219
  if (!isNonEmptyArray(node.modifiers)) {
241145
241220
  return "";
241146
241221
  }
241147
- return [join28(" ", path48.map(print, "modifiers")), " "];
241222
+ return [join29(" ", path48.map(print, "modifiers")), " "];
241148
241223
  }
241149
241224
  function adjustClause(node, clause, forceSpace) {
241150
241225
  if (node.type === "EmptyStatement") {
@@ -241527,7 +241602,7 @@ ${fromBody}`;
241527
241602
  } = require_loc();
241528
241603
  var {
241529
241604
  builders: {
241530
- join: join28,
241605
+ join: join29,
241531
241606
  hardline,
241532
241607
  group: group2,
241533
241608
  indent,
@@ -241671,7 +241746,7 @@ ${fromBody}`;
241671
241746
  if (groups2.length === 0) {
241672
241747
  return "";
241673
241748
  }
241674
- return indent(group2([hardline, join28(hardline, groups2.map(printGroup))]));
241749
+ return indent(group2([hardline, join29(hardline, groups2.map(printGroup))]));
241675
241750
  }
241676
241751
  const printedGroups = groups.map(printGroup);
241677
241752
  const oneLine = printedGroups;
@@ -241711,7 +241786,7 @@ ${fromBody}`;
241711
241786
  "use strict";
241712
241787
  var {
241713
241788
  builders: {
241714
- join: join28,
241789
+ join: join29,
241715
241790
  group: group2
241716
241791
  }
241717
241792
  } = require_doc();
@@ -241744,7 +241819,7 @@ ${fromBody}`;
241744
241819
  iterateCallArgumentsPath(path48, () => {
241745
241820
  printed.push(print());
241746
241821
  });
241747
- 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), ")"];
241748
241823
  }
241749
241824
  const isIdentifierWithFlowAnnotation = (options3.parser === "babel" || options3.parser === "babel-flow") && node.callee && node.callee.type === "Identifier" && hasFlowAnnotationComment(node.callee.trailingComments);
241750
241825
  if (isIdentifierWithFlowAnnotation) {
@@ -242226,7 +242301,7 @@ ${fromBody}`;
242226
242301
  var {
242227
242302
  builders: {
242228
242303
  group: group2,
242229
- join: join28,
242304
+ join: join29,
242230
242305
  line,
242231
242306
  softline,
242232
242307
  indent,
@@ -242327,10 +242402,10 @@ ${fromBody}`;
242327
242402
  return printComments(typePath, printedType, options3);
242328
242403
  }, "types");
242329
242404
  if (shouldHug) {
242330
- return join28(" | ", printed);
242405
+ return join29(" | ", printed);
242331
242406
  }
242332
242407
  const shouldAddStartLine = shouldIndent && !hasLeadingOwnLineComment(options3.originalText, node);
242333
- const code2 = [ifBreak([shouldAddStartLine ? line : "", "| "]), join28([line, "| "], printed)];
242408
+ const code2 = [ifBreak([shouldAddStartLine ? line : "", "| "]), join29([line, "| "], printed)];
242334
242409
  if (pathNeedsParens(path48, options3)) {
242335
242410
  return group2([indent(code2), softline]);
242336
242411
  }
@@ -242405,7 +242480,7 @@ ${fromBody}`;
242405
242480
  } = require_comments();
242406
242481
  var {
242407
242482
  builders: {
242408
- join: join28,
242483
+ join: join29,
242409
242484
  line,
242410
242485
  hardline,
242411
242486
  softline,
@@ -242447,10 +242522,10 @@ ${fromBody}`;
242447
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);
242448
242523
  const shouldInline = node[paramsKey].length === 0 || !isArrowFunctionVariable && (isParameterInTestCall || node[paramsKey].length === 1 && (node[paramsKey][0].type === "NullableTypeAnnotation" || shouldHugType(node[paramsKey][0])));
242449
242524
  if (shouldInline) {
242450
- return ["<", join28(", ", path48.map(print, paramsKey)), printDanglingCommentsForInline(path48, options3), ">"];
242525
+ return ["<", join29(", ", path48.map(print, paramsKey)), printDanglingCommentsForInline(path48, options3), ">"];
242451
242526
  }
242452
242527
  const trailingComma = node.type === "TSTypeParameterInstantiation" ? "" : getFunctionParameters(node).length === 1 && isTSXFile(options3) && !node[paramsKey][0].constraint && path48.getParentNode().type === "ArrowFunctionExpression" ? "," : shouldPrintComma(options3, "all") ? ifBreak(",") : "";
242453
- 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, ">"], {
242454
242529
  id: getTypeParametersGroupId(node)
242455
242530
  });
242456
242531
  }
@@ -242588,7 +242663,7 @@ ${fromBody}`;
242588
242663
  indent,
242589
242664
  ifBreak,
242590
242665
  hardline,
242591
- join: join28,
242666
+ join: join29,
242592
242667
  indentIfBreak
242593
242668
  },
242594
242669
  utils: {
@@ -242744,7 +242819,7 @@ ${fromBody}`;
242744
242819
  if (tailNode.body.type === "SequenceExpression") {
242745
242820
  bodyDoc = group2(["(", indent([softline, bodyDoc]), softline, ")"]);
242746
242821
  }
242747
- return group2([group2(indent([isCallee || isAssignmentRhs ? softline : "", group2(join28([" =>", line], signatures), {
242822
+ return group2([group2(indent([isCallee || isAssignmentRhs ? softline : "", group2(join29([" =>", line], signatures), {
242748
242823
  shouldBreak
242749
242824
  })]), {
242750
242825
  id: groupId,
@@ -242896,7 +242971,7 @@ ${fromBody}`;
242896
242971
  builders: {
242897
242972
  line,
242898
242973
  hardline,
242899
- join: join28,
242974
+ join: join29,
242900
242975
  breakParent,
242901
242976
  group: group2
242902
242977
  }
@@ -242910,10 +242985,10 @@ ${fromBody}`;
242910
242985
  } = require_utils72();
242911
242986
  function printClassMemberDecorators(path48, options3, print) {
242912
242987
  const node = path48.getValue();
242913
- 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]);
242914
242989
  }
242915
242990
  function printDecoratorsBeforeExport(path48, options3, print) {
242916
- return [join28(hardline, path48.map(print, "declaration", "decorators")), hardline];
242991
+ return [join29(hardline, path48.map(print, "declaration", "decorators")), hardline];
242917
242992
  }
242918
242993
  function printDecorators(path48, options3, print) {
242919
242994
  const node = path48.getValue();
@@ -242924,7 +242999,7 @@ ${fromBody}`;
242924
242999
  return;
242925
243000
  }
242926
243001
  const shouldBreak = node.type === "ClassExpression" || node.type === "ClassDeclaration" || hasNewlineBetweenOrAfterDecorators(node, options3);
242927
- 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];
242928
243003
  }
242929
243004
  function hasNewlineBetweenOrAfterDecorators(node, options3) {
242930
243005
  return node.decorators.some((decorator) => hasNewline(options3.originalText, locEnd(decorator)));
@@ -242957,7 +243032,7 @@ ${fromBody}`;
242957
243032
  } = require_comments();
242958
243033
  var {
242959
243034
  builders: {
242960
- join: join28,
243035
+ join: join29,
242961
243036
  line,
242962
243037
  hardline,
242963
243038
  softline,
@@ -243057,7 +243132,7 @@ ${fromBody}`;
243057
243132
  }) => marker === listName);
243058
243133
  return [shouldIndentOnlyHeritageClauses(node) ? ifBreak(" ", line, {
243059
243134
  groupId: getTypeParametersGroupId(node.typeParameters)
243060
- }) : 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))]))];
243061
243136
  }
243062
243137
  function printSuperClass(path48, options3, print) {
243063
243138
  const printed = print("superClass");
@@ -243144,7 +243219,7 @@ ${fromBody}`;
243144
243219
  } = require_util15();
243145
243220
  var {
243146
243221
  builders: {
243147
- join: join28,
243222
+ join: join29,
243148
243223
  line,
243149
243224
  group: group2,
243150
243225
  indent,
@@ -243181,7 +243256,7 @@ ${fromBody}`;
243181
243256
  if (isNonEmptyArray(node.extends)) {
243182
243257
  extendsParts.push(shouldIndentOnlyHeritageClauses ? ifBreak(" ", line, {
243183
243258
  groupId: getTypeParametersGroupId(node.typeParameters)
243184
- }) : 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"))));
243185
243260
  }
243186
243261
  if (node.id && hasComment(node.id, CommentCheckFlags.Trailing) || isNonEmptyArray(node.extends)) {
243187
243262
  if (shouldIndentOnlyHeritageClauses) {
@@ -243211,7 +243286,7 @@ ${fromBody}`;
243211
243286
  softline,
243212
243287
  group: group2,
243213
243288
  indent,
243214
- join: join28,
243289
+ join: join29,
243215
243290
  line,
243216
243291
  ifBreak,
243217
243292
  hardline
@@ -243352,14 +243427,14 @@ ${fromBody}`;
243352
243427
  throw new Error(`Unknown specifier type ${JSON.stringify(specifierType)}`);
243353
243428
  }
243354
243429
  }, "specifiers");
243355
- parts.push(join28(", ", standaloneSpecifiers));
243430
+ parts.push(join29(", ", standaloneSpecifiers));
243356
243431
  if (groupedSpecifiers.length > 0) {
243357
243432
  if (standaloneSpecifiers.length > 0) {
243358
243433
  parts.push(", ");
243359
243434
  }
243360
243435
  const canBreak = groupedSpecifiers.length > 1 || standaloneSpecifiers.length > 0 || node.specifiers.some((node2) => hasComment(node2));
243361
243436
  if (canBreak) {
243362
- 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, "}"]));
243363
243438
  } else {
243364
243439
  parts.push(["{", options3.bracketSpacing ? " " : "", ...groupedSpecifiers, options3.bracketSpacing ? " " : "", "}"]);
243365
243440
  }
@@ -243384,7 +243459,7 @@ ${fromBody}`;
243384
243459
  function printImportAssertions(path48, options3, print) {
243385
243460
  const node = path48.getNode();
243386
243461
  if (isNonEmptyArray(node.assertions)) {
243387
- return [" assert {", options3.bracketSpacing ? " " : "", join28(", ", path48.map(print, "assertions")), options3.bracketSpacing ? " " : "", "}"];
243462
+ return [" assert {", options3.bracketSpacing ? " " : "", join29(", ", path48.map(print, "assertions")), options3.bracketSpacing ? " " : "", "}"];
243388
243463
  }
243389
243464
  return "";
243390
243465
  }
@@ -244295,7 +244370,7 @@ ${fromBody}`;
244295
244370
  } = require_util15();
244296
244371
  var {
244297
244372
  builders: {
244298
- join: join28,
244373
+ join: join29,
244299
244374
  line,
244300
244375
  hardline,
244301
244376
  softline,
@@ -244403,7 +244478,7 @@ ${fromBody}`;
244403
244478
  case "TSTypeAliasDeclaration":
244404
244479
  return printTypeAlias(path48, options3, print);
244405
244480
  case "TSQualifiedName":
244406
- return join28(".", [print("left"), print("right")]);
244481
+ return join29(".", [print("left"), print("right")]);
244407
244482
  case "TSAbstractMethodDefinition":
244408
244483
  case "TSDeclareMethod":
244409
244484
  return printClassMethod(path48, options3, print);
@@ -244482,7 +244557,7 @@ ${fromBody}`;
244482
244557
  case "TSIndexSignature": {
244483
244558
  const parent = path48.getParentNode();
244484
244559
  const trailingComma = node.parameters.length > 1 ? ifBreak(shouldPrintComma(options3) ? "," : "") : "";
244485
- 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]);
244486
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 : ""];
244487
244562
  }
244488
244563
  case "TSTypePredicate":
@@ -244654,7 +244729,7 @@ ${fromBody}`;
244654
244729
  } = require_util15();
244655
244730
  var {
244656
244731
  builders: {
244657
- join: join28,
244732
+ join: join29,
244658
244733
  hardline
244659
244734
  },
244660
244735
  utils: {
@@ -244696,7 +244771,7 @@ ${fromBody}`;
244696
244771
  }
244697
244772
  function printIndentableBlockComment(comment2) {
244698
244773
  const lines = comment2.value.split("\n");
244699
- 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()))), "*/"];
244700
244775
  }
244701
244776
  module22.exports = {
244702
244777
  printComment
@@ -244789,7 +244864,7 @@ ${fromBody}`;
244789
244864
  } = require_util15();
244790
244865
  var {
244791
244866
  builders: {
244792
- join: join28,
244867
+ join: join29,
244793
244868
  line,
244794
244869
  hardline,
244795
244870
  softline,
@@ -245136,7 +245211,7 @@ ${fromBody}`;
245136
245211
  }, "expressions");
245137
245212
  return group2(parts2);
245138
245213
  }
245139
- return group2(join28([",", line], path48.map(print, "expressions")));
245214
+ return group2(join29([",", line], path48.map(print, "expressions")));
245140
245215
  }
245141
245216
  case "ThisExpression":
245142
245217
  return "this";
@@ -245259,7 +245334,7 @@ ${fromBody}`;
245259
245334
  }
245260
245335
  return ["catch ", print("body")];
245261
245336
  case "SwitchStatement":
245262
- 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) => {
245263
245338
  const caseNode = casePath.getValue();
245264
245339
  return [print(), index !== cases.length - 1 && isNextLineEmpty(caseNode, options3) ? hardline : ""];
245265
245340
  }, "cases"))]) : "", hardline, "}"];
@@ -245360,7 +245435,7 @@ ${fromBody}`;
245360
245435
  builders: {
245361
245436
  hardline,
245362
245437
  indent,
245363
- join: join28
245438
+ join: join29
245364
245439
  }
245365
245440
  } = require_doc();
245366
245441
  var preprocess = require_print_preprocess();
@@ -245374,10 +245449,10 @@ ${fromBody}`;
245374
245449
  return "[]";
245375
245450
  }
245376
245451
  const printed = path48.map(() => path48.getValue() === null ? "null" : print(), "elements");
245377
- return ["[", indent([hardline, join28([",", hardline], printed)]), hardline, "]"];
245452
+ return ["[", indent([hardline, join29([",", hardline], printed)]), hardline, "]"];
245378
245453
  }
245379
245454
  case "ObjectExpression":
245380
- 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, "}"];
245381
245456
  case "ObjectProperty":
245382
245457
  return [print("key"), ": ", print("value")];
245383
245458
  case "UnaryExpression":
@@ -246663,7 +246738,7 @@ ${fromBody}`;
246663
246738
  } = require_util15();
246664
246739
  var {
246665
246740
  builders: {
246666
- join: join28,
246741
+ join: join29,
246667
246742
  line,
246668
246743
  hardline,
246669
246744
  softline,
@@ -246806,10 +246881,10 @@ ${fromBody}`;
246806
246881
  }
246807
246882
  parts.push(print());
246808
246883
  }, "nodes");
246809
- return group2(indent(join28(line, parts)));
246884
+ return group2(indent(join29(line, parts)));
246810
246885
  }
246811
246886
  case "media-query": {
246812
- return [join28(" ", path48.map(print, "nodes")), isLastNode(path48, node) ? "" : ","];
246887
+ return [join29(" ", path48.map(print, "nodes")), isLastNode(path48, node) ? "" : ","];
246813
246888
  }
246814
246889
  case "media-type": {
246815
246890
  return adjustNumbers(adjustStrings(node.value, options3));
@@ -246839,7 +246914,7 @@ ${fromBody}`;
246839
246914
  return node.value;
246840
246915
  }
246841
246916
  case "selector-root": {
246842
- 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"))]);
246843
246918
  }
246844
246919
  case "selector-selector": {
246845
246920
  return group2(indent(path48.map(print, "nodes")));
@@ -246880,7 +246955,7 @@ ${fromBody}`;
246880
246955
  return [node.namespace ? [node.namespace === true ? "" : node.namespace.trim(), "|"] : "", node.value];
246881
246956
  }
246882
246957
  case "selector-pseudo": {
246883
- 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, ")"]) : ""];
246884
246959
  }
246885
246960
  case "selector-nesting": {
246886
246961
  return node.value;
@@ -247076,7 +247151,7 @@ ${fromBody}`;
247076
247151
  case "value-paren_group": {
247077
247152
  const parentNode = path48.getParentNode();
247078
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:"))) {
247079
- 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") : ""];
247080
247155
  }
247081
247156
  if (!node.open) {
247082
247157
  const printed2 = path48.map(print, "groups");
@@ -247096,7 +247171,7 @@ ${fromBody}`;
247096
247171
  const isConfiguration = isConfigurationNode(node, parentNode);
247097
247172
  const shouldBreak = isConfiguration || isSCSSMapItem && !isKey;
247098
247173
  const shouldDedent = isConfiguration || isKey;
247099
- 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) => {
247100
247175
  const child = childPath.getValue();
247101
247176
  const isLast = index === node.groups.length - 1;
247102
247177
  let printed2 = [print(), isLast ? "" : ","];
@@ -247468,7 +247543,7 @@ ${fromBody}`;
247468
247543
  hardline,
247469
247544
  ifBreak,
247470
247545
  indent,
247471
- join: join28,
247546
+ join: join29,
247472
247547
  line,
247473
247548
  softline
247474
247549
  },
@@ -247560,7 +247635,7 @@ ${fromBody}`;
247560
247635
  return path48.map(print2, "parts");
247561
247636
  }
247562
247637
  case "Hash": {
247563
- return join28(line, path48.map(print2, "pairs"));
247638
+ return join29(line, path48.map(print2, "pairs"));
247564
247639
  }
247565
247640
  case "HashPair": {
247566
247641
  return [node.key, "=", print2("value")];
@@ -247796,7 +247871,7 @@ ${fromBody}`;
247796
247871
  if (isNonEmptyArray(node.program.blockParams)) {
247797
247872
  parts.push(printBlockParams(node.program));
247798
247873
  }
247799
- 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)]);
247800
247875
  }
247801
247876
  function printElseBlock(node, options3) {
247802
247877
  return [options3.htmlWhitespaceSensitivity === "ignore" ? hardline : "", printInverseBlockOpeningMustache(node), "else", printInverseBlockClosingMustache(node)];
@@ -247847,7 +247922,7 @@ ${fromBody}`;
247847
247922
  return "";
247848
247923
  }
247849
247924
  function getTextValueParts(value) {
247850
- return getDocParts(join28(line, splitByHtmlWhitespace(value)));
247925
+ return getDocParts(join29(line, splitByHtmlWhitespace(value)));
247851
247926
  }
247852
247927
  function splitByHtmlWhitespace(string) {
247853
247928
  return string.split(/[\t\n\f\r ]+/);
@@ -247931,7 +248006,7 @@ ${fromBody}`;
247931
248006
  if (parts.length === 0) {
247932
248007
  return "";
247933
248008
  }
247934
- return join28(line, parts);
248009
+ return join29(line, parts);
247935
248010
  }
247936
248011
  function printBlockParams(node) {
247937
248012
  return ["as |", node.blockParams.join(" "), "|"];
@@ -248028,7 +248103,7 @@ ${fromBody}`;
248028
248103
  "use strict";
248029
248104
  var {
248030
248105
  builders: {
248031
- join: join28,
248106
+ join: join29,
248032
248107
  hardline,
248033
248108
  line,
248034
248109
  softline,
@@ -248073,16 +248148,16 @@ ${fromBody}`;
248073
248148
  case "OperationDefinition": {
248074
248149
  const hasOperation = options3.originalText[locStart(node)] !== "{";
248075
248150
  const hasName2 = Boolean(node.name);
248076
- 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")];
248077
248152
  }
248078
248153
  case "FragmentDefinition": {
248079
- 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")];
248080
248155
  }
248081
248156
  case "SelectionSet": {
248082
- return ["{", indent([hardline, join28(hardline, printSequence(path48, options3, print, "selections"))]), hardline, "}"];
248157
+ return ["{", indent([hardline, join29(hardline, printSequence(path48, options3, print, "selections"))]), hardline, "}"];
248083
248158
  }
248084
248159
  case "Field": {
248085
- 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")]);
248086
248161
  }
248087
248162
  case "Name": {
248088
248163
  return node.value;
@@ -248096,7 +248171,7 @@ ${fromBody}`;
248096
248171
  if (lines.every((line2) => line2 === "")) {
248097
248172
  lines.length = 0;
248098
248173
  }
248099
- return join28(hardline, ['"""', ...lines, '"""']);
248174
+ return join29(hardline, ['"""', ...lines, '"""']);
248100
248175
  }
248101
248176
  return ['"', node.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"'];
248102
248177
  }
@@ -248115,17 +248190,17 @@ ${fromBody}`;
248115
248190
  return ["$", print("name")];
248116
248191
  }
248117
248192
  case "ListValue": {
248118
- 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, "]"]);
248119
248194
  }
248120
248195
  case "ObjectValue": {
248121
- 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 ? " " : ""), "}"]);
248122
248197
  }
248123
248198
  case "ObjectField":
248124
248199
  case "Argument": {
248125
248200
  return [print("name"), ": ", print("value")];
248126
248201
  }
248127
248202
  case "Directive": {
248128
- 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, ")"]) : ""];
248129
248204
  }
248130
248205
  case "NamedType": {
248131
248206
  return print("name");
@@ -248135,17 +248210,17 @@ ${fromBody}`;
248135
248210
  }
248136
248211
  case "ObjectTypeExtension":
248137
248212
  case "ObjectTypeDefinition": {
248138
- 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, "}"] : ""];
248139
248214
  }
248140
248215
  case "FieldDefinition": {
248141
- 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)];
248142
248217
  }
248143
248218
  case "DirectiveDefinition": {
248144
- 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"))];
248145
248220
  }
248146
248221
  case "EnumTypeExtension":
248147
248222
  case "EnumTypeDefinition": {
248148
- 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, "}"] : ""];
248149
248224
  }
248150
248225
  case "EnumValueDefinition": {
248151
248226
  return [print("description"), node.description ? hardline : "", print("name"), printDirectives(path48, print, node)];
@@ -248155,20 +248230,20 @@ ${fromBody}`;
248155
248230
  }
248156
248231
  case "InputObjectTypeExtension":
248157
248232
  case "InputObjectTypeDefinition": {
248158
- 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, "}"] : ""];
248159
248234
  }
248160
248235
  case "SchemaExtension": {
248161
- 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, "}"] : []];
248162
248237
  }
248163
248238
  case "SchemaDefinition": {
248164
- 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, "}"];
248165
248240
  }
248166
248241
  case "OperationTypeDefinition": {
248167
248242
  return [print("operation"), ": ", print("type")];
248168
248243
  }
248169
248244
  case "InterfaceTypeExtension":
248170
248245
  case "InterfaceTypeDefinition": {
248171
- 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, "}"] : ""];
248172
248247
  }
248173
248248
  case "FragmentSpread": {
248174
248249
  return ["...", print("name"), printDirectives(path48, print, node)];
@@ -248178,7 +248253,7 @@ ${fromBody}`;
248178
248253
  }
248179
248254
  case "UnionTypeExtension":
248180
248255
  case "UnionTypeDefinition": {
248181
- 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"))])] : ""])]);
248182
248257
  }
248183
248258
  case "ScalarTypeExtension":
248184
248259
  case "ScalarTypeDefinition": {
@@ -248198,7 +248273,7 @@ ${fromBody}`;
248198
248273
  if (node.directives.length === 0) {
248199
248274
  return "";
248200
248275
  }
248201
- const printed = join28(line, path48.map(print, "directives"));
248276
+ const printed = join29(line, path48.map(print, "directives"));
248202
248277
  if (node.kind === "FragmentDefinition" || node.kind === "OperationDefinition") {
248203
248278
  return group2([line, printed]);
248204
248279
  }
@@ -248834,7 +248909,7 @@ ${extracted.content}`;
248834
248909
  var {
248835
248910
  builders: {
248836
248911
  breakParent,
248837
- join: join28,
248912
+ join: join29,
248838
248913
  line,
248839
248914
  literalline,
248840
248915
  markAsRoot,
@@ -249135,9 +249210,9 @@ ${extracted.content}`;
249135
249210
  function printTableContents(isCompact) {
249136
249211
  const parts = [printRow(contents[0], isCompact), printAlign(isCompact)];
249137
249212
  if (contents.length > 1) {
249138
- 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))));
249139
249214
  }
249140
- return join28(hardlineWithoutBreakParent, parts);
249215
+ return join29(hardlineWithoutBreakParent, parts);
249141
249216
  }
249142
249217
  function printAlign(isCompact) {
249143
249218
  const align2 = columnMaxWidths.map((width, index) => {
@@ -249588,7 +249663,7 @@ ${extracted.content}`;
249588
249663
  builders: {
249589
249664
  line,
249590
249665
  hardline,
249591
- join: join28
249666
+ join: join29
249592
249667
  },
249593
249668
  utils: {
249594
249669
  getDocParts,
@@ -249942,7 +250017,7 @@ ${extracted.content}`;
249942
250017
  return tagName === "script" && attributeName === "setup" || tagName === "style" && attributeName === "vars";
249943
250018
  }
249944
250019
  function getTextValueParts(node, value = node.value) {
249945
- 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)));
249946
250021
  }
249947
250022
  function isVueScriptTag(node, options3) {
249948
250023
  return isVueSfcBlock(node, options3) && node.name === "script";
@@ -251237,7 +251312,7 @@ ${extracted.content}`;
251237
251312
  var {
251238
251313
  builders: {
251239
251314
  indent,
251240
- join: join28,
251315
+ join: join29,
251241
251316
  line,
251242
251317
  softline,
251243
251318
  hardline
@@ -251351,7 +251426,7 @@ ${extracted.content}`;
251351
251426
  const forceNotToBreakAttrContent = node.type === "element" && node.fullName === "script" && node.attrs.length === 1 && node.attrs[0].fullName === "src" && node.children.length === 0;
251352
251427
  const shouldPrintAttributePerLine = options3.singleAttributePerLine && node.attrs.length > 1 && !isVueSfcBlock(node, options3);
251353
251428
  const attributeLine = shouldPrintAttributePerLine ? hardline : line;
251354
- const parts = [indent([forceNotToBreakAttrContent ? " " : line, join28(attributeLine, printedAttributes)])];
251429
+ const parts = [indent([forceNotToBreakAttrContent ? " " : line, join29(attributeLine, printedAttributes)])];
251355
251430
  if (node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) || node.isSelfClosing && needsToBorrowLastChildClosingTagEndMarker(node.parent) || forceNotToBreakAttrContent) {
251356
251431
  parts.push(node.isSelfClosing ? " " : "");
251357
251432
  } else {
@@ -251585,7 +251660,7 @@ ${extracted.content}`;
251585
251660
  var {
251586
251661
  builders: {
251587
251662
  ifBreak,
251588
- join: join28,
251663
+ join: join29,
251589
251664
  line
251590
251665
  }
251591
251666
  } = require_doc();
@@ -251620,7 +251695,7 @@ ${extracted.content}`;
251620
251695
  return index === -1 ? descriptor.length : index;
251621
251696
  });
251622
251697
  const maxDescriptorLeftLength = getMax(descriptorLeftLengths);
251623
- return join28([",", line], urls.map((url, index) => {
251698
+ return join29([",", line], urls.map((url, index) => {
251624
251699
  const parts = [url];
251625
251700
  const descriptor = descriptors[index];
251626
251701
  if (descriptor) {
@@ -252794,7 +252869,7 @@ ${text2}`;
252794
252869
  line,
252795
252870
  softline,
252796
252871
  hardline,
252797
- join: join28
252872
+ join: join29
252798
252873
  }
252799
252874
  } = require_doc();
252800
252875
  var {
@@ -252817,7 +252892,7 @@ ${text2}`;
252817
252892
  }
252818
252893
  const lastItem = getLast(node.children);
252819
252894
  const isLastItemEmptyMappingItem = lastItem && lastItem.type === "flowMappingItem" && isEmptyNode(lastItem.key) && isEmptyNode(lastItem.value);
252820
- 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];
252821
252896
  }
252822
252897
  function printChildren(path48, print, options3) {
252823
252898
  const node = path48.getValue();
@@ -252839,7 +252914,7 @@ ${text2}`;
252839
252914
  group: group2,
252840
252915
  hardline,
252841
252916
  ifBreak,
252842
- join: join28,
252917
+ join: join29,
252843
252918
  line
252844
252919
  }
252845
252920
  } = require_doc();
@@ -252881,7 +252956,7 @@ ${text2}`;
252881
252956
  return [": ", alignWithSpaces(2, printedValue)];
252882
252957
  }
252883
252958
  if (hasLeadingComments(value) || !isInlineNode(key.content)) {
252884
- 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)];
252885
252960
  }
252886
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)) {
252887
252962
  return [printedKey, spaceBeforeColon, ": ", printedValue];
@@ -252965,7 +253040,7 @@ ${text2}`;
252965
253040
  dedentToRoot,
252966
253041
  fill,
252967
253042
  hardline,
252968
- join: join28,
253043
+ join: join29,
252969
253044
  line,
252970
253045
  literalline,
252971
253046
  markAsRoot
@@ -253008,7 +253083,7 @@ ${text2}`;
253008
253083
  if (index === 0) {
253009
253084
  contentsParts.push(hardline);
253010
253085
  }
253011
- contentsParts.push(fill(getDocParts(join28(line, lineWords))));
253086
+ contentsParts.push(fill(getDocParts(join29(line, lineWords))));
253012
253087
  if (index !== lineContents.length - 1) {
253013
253088
  contentsParts.push(lineWords.length === 0 ? hardline : markAsRoot(literalline));
253014
253089
  } else if (node.chomping === "keep" && isLastDescendant) {
@@ -253034,7 +253109,7 @@ ${text2}`;
253034
253109
  fill,
253035
253110
  group: group2,
253036
253111
  hardline,
253037
- join: join28,
253112
+ join: join29,
253038
253113
  line,
253039
253114
  lineSuffix,
253040
253115
  literalline
@@ -253083,7 +253158,7 @@ ${text2}`;
253083
253158
  const node = path48.getValue();
253084
253159
  const parts = [];
253085
253160
  if (node.type !== "mappingValue" && hasLeadingComments(node)) {
253086
- parts.push([join28(hardline, path48.map(print, "leadingComments")), hardline]);
253161
+ parts.push([join29(hardline, path48.map(print, "leadingComments")), hardline]);
253087
253162
  }
253088
253163
  const {
253089
253164
  tag: tag2,
@@ -253110,7 +253185,7 @@ ${text2}`;
253110
253185
  }
253111
253186
  }
253112
253187
  if (hasMiddleComments(node)) {
253113
- 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]);
253114
253189
  }
253115
253190
  const parentNode = path48.getParentNode();
253116
253191
  if (hasPrettierIgnore(path48)) {
@@ -253122,7 +253197,7 @@ ${text2}`;
253122
253197
  parts.push(lineSuffix([node.type === "mappingValue" && !node.content ? "" : " ", parentNode.type === "mappingKey" && path48.getParentNode(2).type === "mapping" && isInlineNode(node) ? "" : breakParent, print("trailingComment")]));
253123
253198
  }
253124
253199
  if (shouldPrintEndComments(node)) {
253125
- 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"))]));
253126
253201
  }
253127
253202
  parts.push(nextEmptyLine);
253128
253203
  return parts;
@@ -253172,10 +253247,10 @@ ${text2}`;
253172
253247
  if (shouldPrintDocumentBody(node)) {
253173
253248
  parts.push(print("body"));
253174
253249
  }
253175
- return join28(hardline, parts);
253250
+ return join29(hardline, parts);
253176
253251
  }
253177
253252
  case "documentHead":
253178
- return join28(hardline, [...path48.map(print, "children"), ...path48.map(print, "endComments")]);
253253
+ return join29(hardline, [...path48.map(print, "children"), ...path48.map(print, "endComments")]);
253179
253254
  case "documentBody": {
253180
253255
  const {
253181
253256
  children,
@@ -253192,10 +253267,10 @@ ${text2}`;
253192
253267
  separator = hardline;
253193
253268
  }
253194
253269
  }
253195
- 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"))];
253196
253271
  }
253197
253272
  case "directive":
253198
- return ["%", join28(" ", [node.name, ...node.parameters])];
253273
+ return ["%", join29(" ", [node.name, ...node.parameters])];
253199
253274
  case "comment":
253200
253275
  return ["#", node.value];
253201
253276
  case "alias":
@@ -253230,7 +253305,7 @@ ${text2}`;
253230
253305
  }
253231
253306
  case "mapping":
253232
253307
  case "sequence":
253233
- return join28(hardline, path48.map(print, "children"));
253308
+ return join29(hardline, path48.map(print, "children"));
253234
253309
  case "sequenceItem":
253235
253310
  return ["- ", alignWithSpaces(2, node.content ? print("content") : "")];
253236
253311
  case "mappingKey":
@@ -253267,7 +253342,7 @@ ${text2}`;
253267
253342
  }
253268
253343
  function printFlowScalarContent(nodeType, content, options3) {
253269
253344
  const lineContents = getFlowScalarLineContents(nodeType, content, options3);
253270
- return join28(hardline, lineContents.map((lineContentWords) => fill(getDocParts(join28(line, lineContentWords)))));
253345
+ return join29(hardline, lineContents.map((lineContentWords) => fill(getDocParts(join29(line, lineContentWords)))));
253271
253346
  }
253272
253347
  function clean(node, newNode) {
253273
253348
  if (isNode5(newNode)) {
@@ -263400,7 +263475,7 @@ var require_BufferList = __commonJS({
263400
263475
  this.head = this.tail = null;
263401
263476
  this.length = 0;
263402
263477
  };
263403
- BufferList.prototype.join = function join28(s) {
263478
+ BufferList.prototype.join = function join29(s) {
263404
263479
  if (this.length === 0) return "";
263405
263480
  var p = this.head;
263406
263481
  var ret2 = "" + p.data;
@@ -317448,7 +317523,7 @@ var require_xlsx = __commonJS({
317448
317523
  if (DBF_SUPPORTED_VERSIONS.indexOf(n[0]) > -1 && n[2] <= 12 && n[3] <= 31) return DBF.to_workbook(d, o);
317449
317524
  return read_prn(data, d, o, str2);
317450
317525
  }
317451
- function readFileSync19(filename, opts) {
317526
+ function readFileSync20(filename, opts) {
317452
317527
  var o = opts || {};
317453
317528
  o.type = "file";
317454
317529
  return readSync(filename, o);
@@ -317683,7 +317758,7 @@ var require_xlsx = __commonJS({
317683
317758
  if (ext.match(/^\.[a-z]+$/)) o.bookType = ext.slice(1);
317684
317759
  o.bookType = _BT[o.bookType] || o.bookType;
317685
317760
  }
317686
- function writeFileSync13(wb, filename, opts) {
317761
+ function writeFileSync14(wb, filename, opts) {
317687
317762
  var o = opts || {};
317688
317763
  o.type = "file";
317689
317764
  o.file = filename;
@@ -318284,11 +318359,11 @@ var require_xlsx = __commonJS({
318284
318359
  if (typeof parse_xlscfb !== "undefined") XLSX3.parse_xlscfb = parse_xlscfb;
318285
318360
  XLSX3.parse_zip = parse_zip;
318286
318361
  XLSX3.read = readSync;
318287
- XLSX3.readFile = readFileSync19;
318288
- XLSX3.readFileSync = readFileSync19;
318362
+ XLSX3.readFile = readFileSync20;
318363
+ XLSX3.readFileSync = readFileSync20;
318289
318364
  XLSX3.write = writeSync;
318290
- XLSX3.writeFile = writeFileSync13;
318291
- XLSX3.writeFileSync = writeFileSync13;
318365
+ XLSX3.writeFile = writeFileSync14;
318366
+ XLSX3.writeFileSync = writeFileSync14;
318292
318367
  XLSX3.writeFileAsync = writeFileAsync;
318293
318368
  XLSX3.utils = utils2;
318294
318369
  XLSX3.writeXLSX = writeSyncXLSX;
@@ -320017,7 +320092,7 @@ var init_pdf = __esm({
320017
320092
  var defineProperty = Object.defineProperty;
320018
320093
  var stringSlice = uncurryThis("".slice);
320019
320094
  var replace2 = uncurryThis("".replace);
320020
- var join28 = uncurryThis([].join);
320095
+ var join29 = uncurryThis([].join);
320021
320096
  var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function() {
320022
320097
  return defineProperty(function() {
320023
320098
  }, "length", { value: 8 }).length !== 8;
@@ -320044,7 +320119,7 @@ var init_pdf = __esm({
320044
320119
  }
320045
320120
  var state = enforceInternalState(value);
320046
320121
  if (!hasOwn(state, "source")) {
320047
- state.source = join28(TEMPLATE, typeof name == "string" ? name : "");
320122
+ state.source = join29(TEMPLATE, typeof name == "string" ? name : "");
320048
320123
  }
320049
320124
  return value;
320050
320125
  };
@@ -405015,7 +405090,7 @@ var require_util12 = __commonJS({
405015
405090
  return path48;
405016
405091
  }
405017
405092
  exports2.normalize = normalize5;
405018
- function join28(aRoot, aPath) {
405093
+ function join29(aRoot, aPath) {
405019
405094
  if (aRoot === "") {
405020
405095
  aRoot = ".";
405021
405096
  }
@@ -405047,7 +405122,7 @@ var require_util12 = __commonJS({
405047
405122
  }
405048
405123
  return joined;
405049
405124
  }
405050
- exports2.join = join28;
405125
+ exports2.join = join29;
405051
405126
  exports2.isAbsolute = function(aPath) {
405052
405127
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
405053
405128
  };
@@ -405220,7 +405295,7 @@ var require_util12 = __commonJS({
405220
405295
  parsed.path = parsed.path.substring(0, index + 1);
405221
405296
  }
405222
405297
  }
405223
- sourceURL = join28(urlGenerate(parsed), sourceURL);
405298
+ sourceURL = join29(urlGenerate(parsed), sourceURL);
405224
405299
  }
405225
405300
  return normalize5(sourceURL);
405226
405301
  }
@@ -407022,7 +407097,7 @@ var require_escodegen = __commonJS({
407022
407097
  function noEmptySpace() {
407023
407098
  return space ? space : " ";
407024
407099
  }
407025
- function join28(left, right) {
407100
+ function join29(left, right) {
407026
407101
  var leftSource, rightSource, leftCharCode, rightCharCode;
407027
407102
  leftSource = toSourceNodeWhenNeeded(left).toString();
407028
407103
  if (leftSource.length === 0) {
@@ -407353,8 +407428,8 @@ var require_escodegen = __commonJS({
407353
407428
  } else {
407354
407429
  result2.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
407355
407430
  }
407356
- result2 = join28(result2, operator);
407357
- result2 = [join28(
407431
+ result2 = join29(result2, operator);
407432
+ result2 = [join29(
407358
407433
  result2,
407359
407434
  that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
407360
407435
  ), ")"];
@@ -407497,11 +407572,11 @@ var require_escodegen = __commonJS({
407497
407572
  var result2, fragment;
407498
407573
  result2 = ["class"];
407499
407574
  if (stmt.id) {
407500
- result2 = join28(result2, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
407575
+ result2 = join29(result2, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
407501
407576
  }
407502
407577
  if (stmt.superClass) {
407503
- fragment = join28("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
407504
- result2 = join28(result2, fragment);
407578
+ fragment = join29("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
407579
+ result2 = join29(result2, fragment);
407505
407580
  }
407506
407581
  result2.push(space);
407507
407582
  result2.push(this.generateStatement(stmt.body, S_TFFT));
@@ -407514,9 +407589,9 @@ var require_escodegen = __commonJS({
407514
407589
  return escapeDirective(stmt.directive) + this.semicolon(flags);
407515
407590
  },
407516
407591
  DoWhileStatement: function(stmt, flags) {
407517
- var result2 = join28("do", this.maybeBlock(stmt.body, S_TFFF));
407592
+ var result2 = join29("do", this.maybeBlock(stmt.body, S_TFFF));
407518
407593
  result2 = this.maybeBlockSuffix(stmt.body, result2);
407519
- return join28(result2, [
407594
+ return join29(result2, [
407520
407595
  "while" + space + "(",
407521
407596
  this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
407522
407597
  ")" + this.semicolon(flags)
@@ -407552,11 +407627,11 @@ var require_escodegen = __commonJS({
407552
407627
  ExportDefaultDeclaration: function(stmt, flags) {
407553
407628
  var result2 = ["export"], bodyFlags;
407554
407629
  bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
407555
- result2 = join28(result2, "default");
407630
+ result2 = join29(result2, "default");
407556
407631
  if (isStatement(stmt.declaration)) {
407557
- result2 = join28(result2, this.generateStatement(stmt.declaration, bodyFlags));
407632
+ result2 = join29(result2, this.generateStatement(stmt.declaration, bodyFlags));
407558
407633
  } else {
407559
- 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));
407560
407635
  }
407561
407636
  return result2;
407562
407637
  },
@@ -407564,15 +407639,15 @@ var require_escodegen = __commonJS({
407564
407639
  var result2 = ["export"], bodyFlags, that = this;
407565
407640
  bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
407566
407641
  if (stmt.declaration) {
407567
- return join28(result2, this.generateStatement(stmt.declaration, bodyFlags));
407642
+ return join29(result2, this.generateStatement(stmt.declaration, bodyFlags));
407568
407643
  }
407569
407644
  if (stmt.specifiers) {
407570
407645
  if (stmt.specifiers.length === 0) {
407571
- result2 = join28(result2, "{" + space + "}");
407646
+ result2 = join29(result2, "{" + space + "}");
407572
407647
  } else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
407573
- 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));
407574
407649
  } else {
407575
- result2 = join28(result2, "{");
407650
+ result2 = join29(result2, "{");
407576
407651
  withIndent(function(indent2) {
407577
407652
  var i, iz;
407578
407653
  result2.push(newline3);
@@ -407590,7 +407665,7 @@ var require_escodegen = __commonJS({
407590
407665
  result2.push(base + "}");
407591
407666
  }
407592
407667
  if (stmt.source) {
407593
- result2 = join28(result2, [
407668
+ result2 = join29(result2, [
407594
407669
  "from" + space,
407595
407670
  // ModuleSpecifier
407596
407671
  this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
@@ -407678,7 +407753,7 @@ var require_escodegen = __commonJS({
407678
407753
  ];
407679
407754
  cursor4 = 0;
407680
407755
  if (stmt.specifiers[cursor4].type === Syntax.ImportDefaultSpecifier) {
407681
- result2 = join28(result2, [
407756
+ result2 = join29(result2, [
407682
407757
  this.generateExpression(stmt.specifiers[cursor4], Precedence.Sequence, E_TTT)
407683
407758
  ]);
407684
407759
  ++cursor4;
@@ -407688,7 +407763,7 @@ var require_escodegen = __commonJS({
407688
407763
  result2.push(",");
407689
407764
  }
407690
407765
  if (stmt.specifiers[cursor4].type === Syntax.ImportNamespaceSpecifier) {
407691
- result2 = join28(result2, [
407766
+ result2 = join29(result2, [
407692
407767
  space,
407693
407768
  this.generateExpression(stmt.specifiers[cursor4], Precedence.Sequence, E_TTT)
407694
407769
  ]);
@@ -407717,7 +407792,7 @@ var require_escodegen = __commonJS({
407717
407792
  }
407718
407793
  }
407719
407794
  }
407720
- result2 = join28(result2, [
407795
+ result2 = join29(result2, [
407721
407796
  "from" + space,
407722
407797
  // ModuleSpecifier
407723
407798
  this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
@@ -407771,7 +407846,7 @@ var require_escodegen = __commonJS({
407771
407846
  return result2;
407772
407847
  },
407773
407848
  ThrowStatement: function(stmt, flags) {
407774
- return [join28(
407849
+ return [join29(
407775
407850
  "throw",
407776
407851
  this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
407777
407852
  ), this.semicolon(flags)];
@@ -407782,7 +407857,7 @@ var require_escodegen = __commonJS({
407782
407857
  result2 = this.maybeBlockSuffix(stmt.block, result2);
407783
407858
  if (stmt.handlers) {
407784
407859
  for (i = 0, iz = stmt.handlers.length; i < iz; ++i) {
407785
- result2 = join28(result2, this.generateStatement(stmt.handlers[i], S_TFFF));
407860
+ result2 = join29(result2, this.generateStatement(stmt.handlers[i], S_TFFF));
407786
407861
  if (stmt.finalizer || i + 1 !== iz) {
407787
407862
  result2 = this.maybeBlockSuffix(stmt.handlers[i].body, result2);
407788
407863
  }
@@ -407790,7 +407865,7 @@ var require_escodegen = __commonJS({
407790
407865
  } else {
407791
407866
  guardedHandlers = stmt.guardedHandlers || [];
407792
407867
  for (i = 0, iz = guardedHandlers.length; i < iz; ++i) {
407793
- result2 = join28(result2, this.generateStatement(guardedHandlers[i], S_TFFF));
407868
+ result2 = join29(result2, this.generateStatement(guardedHandlers[i], S_TFFF));
407794
407869
  if (stmt.finalizer || i + 1 !== iz) {
407795
407870
  result2 = this.maybeBlockSuffix(guardedHandlers[i].body, result2);
407796
407871
  }
@@ -407798,13 +407873,13 @@ var require_escodegen = __commonJS({
407798
407873
  if (stmt.handler) {
407799
407874
  if (Array.isArray(stmt.handler)) {
407800
407875
  for (i = 0, iz = stmt.handler.length; i < iz; ++i) {
407801
- result2 = join28(result2, this.generateStatement(stmt.handler[i], S_TFFF));
407876
+ result2 = join29(result2, this.generateStatement(stmt.handler[i], S_TFFF));
407802
407877
  if (stmt.finalizer || i + 1 !== iz) {
407803
407878
  result2 = this.maybeBlockSuffix(stmt.handler[i].body, result2);
407804
407879
  }
407805
407880
  }
407806
407881
  } else {
407807
- result2 = join28(result2, this.generateStatement(stmt.handler, S_TFFF));
407882
+ result2 = join29(result2, this.generateStatement(stmt.handler, S_TFFF));
407808
407883
  if (stmt.finalizer) {
407809
407884
  result2 = this.maybeBlockSuffix(stmt.handler.body, result2);
407810
407885
  }
@@ -407812,7 +407887,7 @@ var require_escodegen = __commonJS({
407812
407887
  }
407813
407888
  }
407814
407889
  if (stmt.finalizer) {
407815
- result2 = join28(result2, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
407890
+ result2 = join29(result2, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
407816
407891
  }
407817
407892
  return result2;
407818
407893
  },
@@ -407846,7 +407921,7 @@ var require_escodegen = __commonJS({
407846
407921
  withIndent(function() {
407847
407922
  if (stmt.test) {
407848
407923
  result2 = [
407849
- join28("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
407924
+ join29("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
407850
407925
  ":"
407851
407926
  ];
407852
407927
  } else {
@@ -407894,9 +407969,9 @@ var require_escodegen = __commonJS({
407894
407969
  result2.push(this.maybeBlock(stmt.consequent, S_TFFF));
407895
407970
  result2 = this.maybeBlockSuffix(stmt.consequent, result2);
407896
407971
  if (stmt.alternate.type === Syntax.IfStatement) {
407897
- result2 = join28(result2, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
407972
+ result2 = join29(result2, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
407898
407973
  } else {
407899
- result2 = join28(result2, join28("else", this.maybeBlock(stmt.alternate, bodyFlags)));
407974
+ result2 = join29(result2, join29("else", this.maybeBlock(stmt.alternate, bodyFlags)));
407900
407975
  }
407901
407976
  } else {
407902
407977
  result2.push(this.maybeBlock(stmt.consequent, bodyFlags));
@@ -407997,7 +408072,7 @@ var require_escodegen = __commonJS({
407997
408072
  },
407998
408073
  ReturnStatement: function(stmt, flags) {
407999
408074
  if (stmt.argument) {
408000
- return [join28(
408075
+ return [join29(
408001
408076
  "return",
408002
408077
  this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
408003
408078
  ), this.semicolon(flags)];
@@ -408086,14 +408161,14 @@ var require_escodegen = __commonJS({
408086
408161
  if (leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
408087
408162
  result2 = [fragment, noEmptySpace(), expr.operator];
408088
408163
  } else {
408089
- result2 = join28(fragment, expr.operator);
408164
+ result2 = join29(fragment, expr.operator);
408090
408165
  }
408091
408166
  fragment = this.generateExpression(expr.right, rightPrecedence, flags);
408092
408167
  if (expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--") {
408093
408168
  result2.push(noEmptySpace());
408094
408169
  result2.push(fragment);
408095
408170
  } else {
408096
- result2 = join28(result2, fragment);
408171
+ result2 = join29(result2, fragment);
408097
408172
  }
408098
408173
  if (expr.operator === "in" && !(flags & F_ALLOW_IN)) {
408099
408174
  return ["(", result2, ")"];
@@ -408133,7 +408208,7 @@ var require_escodegen = __commonJS({
408133
408208
  var result2, length, i, iz, itemFlags;
408134
408209
  length = expr["arguments"].length;
408135
408210
  itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF;
408136
- result2 = join28(
408211
+ result2 = join29(
408137
408212
  "new",
408138
408213
  this.generateExpression(expr.callee, Precedence.New, itemFlags)
408139
408214
  );
@@ -408183,11 +408258,11 @@ var require_escodegen = __commonJS({
408183
408258
  var result2, fragment, rightCharCode, leftSource, leftCharCode;
408184
408259
  fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
408185
408260
  if (space === "") {
408186
- result2 = join28(expr.operator, fragment);
408261
+ result2 = join29(expr.operator, fragment);
408187
408262
  } else {
408188
408263
  result2 = [expr.operator];
408189
408264
  if (expr.operator.length > 2) {
408190
- result2 = join28(result2, fragment);
408265
+ result2 = join29(result2, fragment);
408191
408266
  } else {
408192
408267
  leftSource = toSourceNodeWhenNeeded(result2).toString();
408193
408268
  leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
@@ -408210,7 +408285,7 @@ var require_escodegen = __commonJS({
408210
408285
  result2 = "yield";
408211
408286
  }
408212
408287
  if (expr.argument) {
408213
- result2 = join28(
408288
+ result2 = join29(
408214
408289
  result2,
408215
408290
  this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
408216
408291
  );
@@ -408218,7 +408293,7 @@ var require_escodegen = __commonJS({
408218
408293
  return parenthesize(result2, Precedence.Yield, precedence);
408219
408294
  },
408220
408295
  AwaitExpression: function(expr, precedence, flags) {
408221
- var result2 = join28(
408296
+ var result2 = join29(
408222
408297
  expr.all ? "await*" : "await",
408223
408298
  this.generateExpression(expr.argument, Precedence.Await, E_TTT)
408224
408299
  );
@@ -408301,11 +408376,11 @@ var require_escodegen = __commonJS({
408301
408376
  var result2, fragment;
408302
408377
  result2 = ["class"];
408303
408378
  if (expr.id) {
408304
- result2 = join28(result2, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
408379
+ result2 = join29(result2, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
408305
408380
  }
408306
408381
  if (expr.superClass) {
408307
- fragment = join28("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
408308
- result2 = join28(result2, fragment);
408382
+ fragment = join29("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
408383
+ result2 = join29(result2, fragment);
408309
408384
  }
408310
408385
  result2.push(space);
408311
408386
  result2.push(this.generateStatement(expr.body, S_TFFT));
@@ -408320,7 +408395,7 @@ var require_escodegen = __commonJS({
408320
408395
  }
408321
408396
  if (expr.kind === "get" || expr.kind === "set") {
408322
408397
  fragment = [
408323
- join28(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
408398
+ join29(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
408324
408399
  this.generateFunctionBody(expr.value)
408325
408400
  ];
408326
408401
  } else {
@@ -408330,7 +408405,7 @@ var require_escodegen = __commonJS({
408330
408405
  this.generateFunctionBody(expr.value)
408331
408406
  ];
408332
408407
  }
408333
- return join28(result2, fragment);
408408
+ return join29(result2, fragment);
408334
408409
  },
408335
408410
  Property: function(expr, precedence, flags) {
408336
408411
  if (expr.kind === "get" || expr.kind === "set") {
@@ -408525,7 +408600,7 @@ var require_escodegen = __commonJS({
408525
408600
  for (i = 0, iz = expr.blocks.length; i < iz; ++i) {
408526
408601
  fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT);
408527
408602
  if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
408528
- result2 = join28(result2, fragment);
408603
+ result2 = join29(result2, fragment);
408529
408604
  } else {
408530
408605
  result2.push(fragment);
408531
408606
  }
@@ -408533,13 +408608,13 @@ var require_escodegen = __commonJS({
408533
408608
  });
408534
408609
  }
408535
408610
  if (expr.filter) {
408536
- result2 = join28(result2, "if" + space);
408611
+ result2 = join29(result2, "if" + space);
408537
408612
  fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
408538
- result2 = join28(result2, ["(", fragment, ")"]);
408613
+ result2 = join29(result2, ["(", fragment, ")"]);
408539
408614
  }
408540
408615
  if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
408541
408616
  fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
408542
- result2 = join28(result2, fragment);
408617
+ result2 = join29(result2, fragment);
408543
408618
  }
408544
408619
  result2.push(expr.type === Syntax.GeneratorExpression ? ")" : "]");
408545
408620
  return result2;
@@ -408555,8 +408630,8 @@ var require_escodegen = __commonJS({
408555
408630
  } else {
408556
408631
  fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
408557
408632
  }
408558
- fragment = join28(fragment, expr.of ? "of" : "in");
408559
- 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));
408560
408635
  return ["for" + space + "(", fragment, ")"];
408561
408636
  },
408562
408637
  SpreadElement: function(expr, precedence, flags) {
@@ -438111,7 +438186,7 @@ Tip: Consider breaking down the operation into smaller chunks or filtering the d
438111
438186
  return { isValid: true, tokenCount: estimatedTokens };
438112
438187
  }
438113
438188
  }
438114
- async function wrapToolResultWithTokenLimit(result2, toolName, maxTokens = 5e4) {
438189
+ async function wrapToolResultWithTokenLimit(result2, toolName, maxTokens = 1e5) {
438115
438190
  const validation = await validateTokenLimit(result2, maxTokens);
438116
438191
  if (!validation.isValid) {
438117
438192
  throw new Error(`Tool "${toolName}" returned content that exceeds token limit.
@@ -443667,14 +443742,21 @@ function WelcomeScreen({ version: version2 = "1.0.0", onMenuSelect, defaultMenuI
443667
443742
  }
443668
443743
  ], [t]);
443669
443744
  const [remountKey, setRemountKey] = (0, import_react76.useState)(0);
443745
+ const optionsIndexMap = (0, import_react76.useMemo)(() => {
443746
+ const map3 = /* @__PURE__ */ new Map();
443747
+ menuOptions.forEach((opt, idx2) => {
443748
+ map3.set(opt.value, idx2);
443749
+ });
443750
+ return map3;
443751
+ }, [menuOptions]);
443670
443752
  const handleSelectionChange = (0, import_react76.useCallback)((newInfoText, value) => {
443671
- setInfoText(newInfoText);
443672
- const index = menuOptions.findIndex((opt) => opt.value === value);
443673
- if (index !== -1) {
443753
+ setInfoText((prev) => prev === newInfoText ? prev : newInfoText);
443754
+ const index = optionsIndexMap.get(value);
443755
+ if (index !== void 0) {
443674
443756
  setCurrentMenuIndex(index);
443675
443757
  onMenuSelectionPersist == null ? void 0 : onMenuSelectionPersist(index);
443676
443758
  }
443677
- }, [menuOptions, onMenuSelectionPersist]);
443759
+ }, [optionsIndexMap, onMenuSelectionPersist]);
443678
443760
  const handleInlineMenuSelect = (0, import_react76.useCallback)((value) => {
443679
443761
  const index = menuOptions.findIndex((opt) => opt.value === value);
443680
443762
  if (index !== -1) {
@@ -444755,6 +444837,10 @@ function useCommandPanel(buffer, isProcessing = false) {
444755
444837
  name: "reindex",
444756
444838
  description: t.commandPanel.commands.reindex
444757
444839
  },
444840
+ {
444841
+ name: "permissions",
444842
+ description: t.commandPanel.commands.permissions || "Manage tool permissions"
444843
+ },
444758
444844
  {
444759
444845
  name: "vulnerability-hunting",
444760
444846
  description: t.commandPanel.commands.vulnerabilityHunting || "Toggle vulnerability hunting mode"
@@ -445708,6 +445794,7 @@ function useKeyboardInput(options3) {
445708
445794
  const isPasting = (0, import_react82.useRef)(false);
445709
445795
  const inputStartCursorPos = (0, import_react82.useRef)(0);
445710
445796
  const isProcessingInput = (0, import_react82.useRef)(false);
445797
+ const componentMountTime = (0, import_react82.useRef)(Date.now());
445711
445798
  (0, import_react82.useEffect)(() => {
445712
445799
  return () => {
445713
445800
  if (inputTimer.current) {
@@ -445727,7 +445814,13 @@ function useKeyboardInput(options3) {
445727
445814
  var _a21;
445728
445815
  if (disabled)
445729
445816
  return;
445730
- const focusEventPattern = /(\s|^)\[(?:I|O)(?=(?:\s|$|["'~\\\/]|[A-Za-z]:))/;
445817
+ const timeSinceMount = Date.now() - componentMountTime.current;
445818
+ if (timeSinceMount < 500) {
445819
+ if (input2.includes("[I") || input2.includes("[O") || input2 === "\x1B[I" || input2 === "\x1B[O" || /^[\s\x1b\[IO]+$/.test(input2)) {
445820
+ return;
445821
+ }
445822
+ }
445823
+ const focusEventPattern = /(\s|^)\[(?:I|O)(?=(?:\s|$|["'~\\/]|[A-Za-z]:))/;
445731
445824
  if (
445732
445825
  // Complete escape sequences
445733
445826
  input2 === "\x1B[I" || input2 === "\x1B[O" || // Standalone sequences (exact match only)
@@ -447105,7 +447198,7 @@ var init_FileList = __esm({
447105
447198
  const [isLoading, setIsLoading] = (0, import_react88.useState)(false);
447106
447199
  const [searchDepth, setSearchDepth] = (0, import_react88.useState)(5);
447107
447200
  const [isIncreasingDepth, setIsIncreasingDepth] = (0, import_react88.useState)(false);
447108
- const [actualMaxDepth, setActualMaxDepth] = (0, import_react88.useState)(0);
447201
+ const [hasMoreDepth, setHasMoreDepth] = (0, import_react88.useState)(true);
447109
447202
  const { columns: terminalWidth } = useTerminalSize();
447110
447203
  const MAX_DISPLAY_ITEMS = 5;
447111
447204
  const effectiveMaxItems = (0, import_react88.useMemo)(() => {
@@ -447208,9 +447301,10 @@ var init_FileList = __esm({
447208
447301
  break;
447209
447302
  }
447210
447303
  }
447304
+ const hitDepthLimit = globalMaxDepth >= searchDepth - 1;
447211
447305
  setIsLoading(true);
447212
447306
  setFiles(allFiles);
447213
- setActualMaxDepth(globalMaxDepth);
447307
+ setHasMoreDepth(hitDepthLimit);
447214
447308
  setIsLoading(false);
447215
447309
  }, [searchDepth]);
447216
447310
  const searchFileContent = (0, import_react88.useCallback)(async (query2) => {
@@ -447352,16 +447446,13 @@ var init_FileList = __esm({
447352
447446
  return a.name.localeCompare(b.name);
447353
447447
  });
447354
447448
  setAllFilteredFiles(filtered);
447355
- if (filtered.length === 0 && query.trim().length > 0 && actualMaxDepth >= searchDepth) {
447356
- setIsIncreasingDepth(true);
447449
+ if (filtered.length === 0 && query.trim().length > 0 && hasMoreDepth) {
447357
447450
  const newDepth = searchDepth + 5;
447358
447451
  setSearchDepth(newDepth);
447452
+ setIsIncreasingDepth(true);
447359
447453
  setTimeout(() => {
447360
- loadFiles();
447361
- setTimeout(() => {
447362
- setIsIncreasingDepth(false);
447363
- }, 500);
447364
- }, 100);
447454
+ setIsIncreasingDepth(false);
447455
+ }, 300);
447365
447456
  }
447366
447457
  }
447367
447458
  };
@@ -447377,7 +447468,7 @@ var init_FileList = __esm({
447377
447468
  searchFileContent,
447378
447469
  searchDepth,
447379
447470
  loadFiles,
447380
- actualMaxDepth
447471
+ hasMoreDepth
447381
447472
  ]);
447382
447473
  const filteredFiles = (0, import_react88.useMemo)(() => {
447383
447474
  if (allFilteredFiles.length <= effectiveMaxItems) {
@@ -448921,6 +449012,8 @@ function ToolConfirmation({ toolName, toolArguments, allTools, onConfirm, onHook
448921
449012
  const [hasSelected, setHasSelected] = (0, import_react98.useState)(false);
448922
449013
  const [showRejectInput, setShowRejectInput] = (0, import_react98.useState)(false);
448923
449014
  const [rejectReason, setRejectReason] = (0, import_react98.useState)("");
449015
+ const [menuKey, setMenuKey] = (0, import_react98.useState)(0);
449016
+ const [initialMenuIndex, setInitialMenuIndex] = (0, import_react98.useState)(0);
448924
449017
  const sensitiveCommandCheck = (0, import_react98.useMemo)(() => {
448925
449018
  if (toolName !== "terminal-execute" || !toolArguments) {
448926
449019
  return { isSensitive: false };
@@ -449115,6 +449208,15 @@ Output: ${combinedOutput}`);
449115
449208
  });
449116
449209
  return baseItems;
449117
449210
  }, [sensitiveCommandCheck.isSensitive, t]);
449211
+ use_input_default((_input, key) => {
449212
+ if (showRejectInput && key.escape) {
449213
+ setShowRejectInput(false);
449214
+ setRejectReason("");
449215
+ const idx2 = items.findIndex((i) => i.value === "reject_with_reply");
449216
+ setInitialMenuIndex(idx2 >= 0 ? idx2 : 0);
449217
+ setMenuKey((k) => k + 1);
449218
+ }
449219
+ });
449118
449220
  const handleSelect = (item) => {
449119
449221
  if (!hasSelected) {
449120
449222
  if (item.value === "reject_with_reply") {
@@ -449254,7 +449356,7 @@ Output: ${combinedOutput}`);
449254
449356
  { marginBottom: 1 },
449255
449357
  import_react98.default.createElement(Text, { dimColor: true }, t.toolConfirmation.selectAction)
449256
449358
  ),
449257
- !hasSelected && !showRejectInput && import_react98.default.createElement(SelectInput_default, { items, onSelect: handleSelect }),
449359
+ !hasSelected && !showRejectInput && import_react98.default.createElement(SelectInput_default, { key: menuKey, items, onSelect: handleSelect, initialIndex: initialMenuIndex }),
449258
449360
  showRejectInput && !hasSelected && import_react98.default.createElement(
449259
449361
  Box_default,
449260
449362
  { flexDirection: "column" },
@@ -469266,7 +469368,7 @@ var require_core6 = __commonJS({
469266
469368
  return match2 && match2.index === 0;
469267
469369
  }
469268
469370
  var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
469269
- function join28(regexps, separator = "|") {
469371
+ function join29(regexps, separator = "|") {
469270
469372
  let numCaptures = 0;
469271
469373
  return regexps.map((regex2) => {
469272
469374
  numCaptures += 1;
@@ -469570,7 +469672,7 @@ var require_core6 = __commonJS({
469570
469672
  this.exec = () => null;
469571
469673
  }
469572
469674
  const terminators = this.regexes.map((el) => el[1]);
469573
- this.matcherRe = langRe(join28(terminators), true);
469675
+ this.matcherRe = langRe(join29(terminators), true);
469574
469676
  this.lastIndex = 0;
469575
469677
  }
469576
469678
  /** @param {string} s */
@@ -527460,11 +527562,103 @@ var init_useSessionSave = __esm({
527460
527562
  }
527461
527563
  });
527462
527564
 
527565
+ // dist/utils/config/permissionsConfig.js
527566
+ import { join as join22 } from "path";
527567
+ import { readFileSync as readFileSync17, writeFileSync as writeFileSync11, existsSync as existsSync22, mkdirSync as mkdirSync11 } from "fs";
527568
+ function getSnowDirPath2(workingDirectory) {
527569
+ return join22(workingDirectory, SNOW_DIR3);
527570
+ }
527571
+ function getPermissionsFilePath(workingDirectory) {
527572
+ return join22(getSnowDirPath2(workingDirectory), PERMISSIONS_FILE);
527573
+ }
527574
+ function ensureConfigDirectory7(workingDirectory) {
527575
+ const snowDir = getSnowDirPath2(workingDirectory);
527576
+ if (!existsSync22(snowDir)) {
527577
+ mkdirSync11(snowDir, { recursive: true });
527578
+ }
527579
+ }
527580
+ function loadPermissionsConfig(workingDirectory) {
527581
+ ensureConfigDirectory7(workingDirectory);
527582
+ const configPath = getPermissionsFilePath(workingDirectory);
527583
+ if (!existsSync22(configPath)) {
527584
+ return { ...DEFAULT_CONFIG5 };
527585
+ }
527586
+ try {
527587
+ const configData = readFileSync17(configPath, "utf-8");
527588
+ const config3 = JSON.parse(configData);
527589
+ return {
527590
+ alwaysApprovedTools: Array.isArray(config3.alwaysApprovedTools) ? config3.alwaysApprovedTools : []
527591
+ };
527592
+ } catch (error) {
527593
+ console.error("Failed to load permissions config:", error);
527594
+ return { ...DEFAULT_CONFIG5 };
527595
+ }
527596
+ }
527597
+ function savePermissionsConfig(workingDirectory, config3) {
527598
+ ensureConfigDirectory7(workingDirectory);
527599
+ const configPath = getPermissionsFilePath(workingDirectory);
527600
+ try {
527601
+ const configData = JSON.stringify(config3, null, 2);
527602
+ writeFileSync11(configPath, configData, "utf-8");
527603
+ } catch (error) {
527604
+ console.error("Failed to save permissions config:", error);
527605
+ throw error;
527606
+ }
527607
+ }
527608
+ function addToolToPermissions(workingDirectory, toolName) {
527609
+ const config3 = loadPermissionsConfig(workingDirectory);
527610
+ if (!config3.alwaysApprovedTools.includes(toolName)) {
527611
+ config3.alwaysApprovedTools.push(toolName);
527612
+ savePermissionsConfig(workingDirectory, config3);
527613
+ }
527614
+ }
527615
+ function addMultipleToolsToPermissions(workingDirectory, toolNames) {
527616
+ const config3 = loadPermissionsConfig(workingDirectory);
527617
+ let modified = false;
527618
+ for (const toolName of toolNames) {
527619
+ if (!config3.alwaysApprovedTools.includes(toolName)) {
527620
+ config3.alwaysApprovedTools.push(toolName);
527621
+ modified = true;
527622
+ }
527623
+ }
527624
+ if (modified) {
527625
+ savePermissionsConfig(workingDirectory, config3);
527626
+ }
527627
+ }
527628
+ function removeToolFromPermissions(workingDirectory, toolName) {
527629
+ const config3 = loadPermissionsConfig(workingDirectory);
527630
+ const index = config3.alwaysApprovedTools.indexOf(toolName);
527631
+ if (index !== -1) {
527632
+ config3.alwaysApprovedTools.splice(index, 1);
527633
+ savePermissionsConfig(workingDirectory, config3);
527634
+ }
527635
+ }
527636
+ function clearAllPermissions(workingDirectory) {
527637
+ savePermissionsConfig(workingDirectory, { alwaysApprovedTools: [] });
527638
+ }
527639
+ var SNOW_DIR3, PERMISSIONS_FILE, DEFAULT_CONFIG5;
527640
+ var init_permissionsConfig = __esm({
527641
+ "dist/utils/config/permissionsConfig.js"() {
527642
+ "use strict";
527643
+ SNOW_DIR3 = ".snow";
527644
+ PERMISSIONS_FILE = "permissions.json";
527645
+ DEFAULT_CONFIG5 = {
527646
+ alwaysApprovedTools: []
527647
+ };
527648
+ }
527649
+ });
527650
+
527463
527651
  // dist/hooks/conversation/useToolConfirmation.js
527464
- function useToolConfirmation() {
527652
+ function useToolConfirmation(workingDirectory) {
527465
527653
  const [pendingToolConfirmation, setPendingToolConfirmation] = (0, import_react120.useState)(null);
527466
527654
  const alwaysApprovedToolsRef = (0, import_react120.useRef)(/* @__PURE__ */ new Set());
527467
527655
  const [alwaysApprovedTools, setAlwaysApprovedTools] = (0, import_react120.useState)(/* @__PURE__ */ new Set());
527656
+ (0, import_react120.useEffect)(() => {
527657
+ const config3 = loadPermissionsConfig(workingDirectory);
527658
+ const loadedTools = new Set(config3.alwaysApprovedTools);
527659
+ alwaysApprovedToolsRef.current = loadedTools;
527660
+ setAlwaysApprovedTools(loadedTools);
527661
+ }, [workingDirectory]);
527468
527662
  const requestToolConfirmation = async (toolCall, batchToolNames, allTools) => {
527469
527663
  return new Promise((resolve10) => {
527470
527664
  setPendingToolConfirmation({
@@ -527479,23 +527673,41 @@ function useToolConfirmation() {
527479
527673
  });
527480
527674
  };
527481
527675
  const isToolAutoApproved = (0, import_react120.useCallback)((toolName) => {
527482
- return alwaysApprovedToolsRef.current.has(toolName) || toolName.startsWith("todo-") || toolName.startsWith("subagent-");
527676
+ return alwaysApprovedToolsRef.current.has(toolName) || toolName.startsWith("todo-") || toolName.startsWith("subagent-") || toolName === "askuser-ask_question";
527483
527677
  }, []);
527484
527678
  const addToAlwaysApproved = (0, import_react120.useCallback)((toolName) => {
527485
527679
  alwaysApprovedToolsRef.current.add(toolName);
527486
527680
  setAlwaysApprovedTools((prev) => /* @__PURE__ */ new Set([...prev, toolName]));
527487
- }, []);
527681
+ addToolToPermissions(workingDirectory, toolName);
527682
+ }, [workingDirectory]);
527488
527683
  const addMultipleToAlwaysApproved = (0, import_react120.useCallback)((toolNames) => {
527489
527684
  toolNames.forEach((name) => alwaysApprovedToolsRef.current.add(name));
527490
527685
  setAlwaysApprovedTools((prev) => /* @__PURE__ */ new Set([...prev, ...toolNames]));
527491
- }, []);
527686
+ addMultipleToolsToPermissions(workingDirectory, toolNames);
527687
+ }, [workingDirectory]);
527688
+ const removeFromAlwaysApproved = (0, import_react120.useCallback)((toolName) => {
527689
+ alwaysApprovedToolsRef.current.delete(toolName);
527690
+ setAlwaysApprovedTools((prev) => {
527691
+ const next = new Set(prev);
527692
+ next.delete(toolName);
527693
+ return next;
527694
+ });
527695
+ removeToolFromPermissions(workingDirectory, toolName);
527696
+ }, [workingDirectory]);
527697
+ const clearAllAlwaysApproved = (0, import_react120.useCallback)(() => {
527698
+ alwaysApprovedToolsRef.current.clear();
527699
+ setAlwaysApprovedTools(/* @__PURE__ */ new Set());
527700
+ clearAllPermissions(workingDirectory);
527701
+ }, [workingDirectory]);
527492
527702
  return {
527493
527703
  pendingToolConfirmation,
527494
527704
  alwaysApprovedTools,
527495
527705
  requestToolConfirmation,
527496
527706
  isToolAutoApproved,
527497
527707
  addToAlwaysApproved,
527498
- addMultipleToAlwaysApproved
527708
+ addMultipleToAlwaysApproved,
527709
+ removeFromAlwaysApproved,
527710
+ clearAllAlwaysApproved
527499
527711
  };
527500
527712
  }
527501
527713
  var import_react120;
@@ -527503,6 +527715,7 @@ var init_useToolConfirmation = __esm({
527503
527715
  "dist/hooks/conversation/useToolConfirmation.js"() {
527504
527716
  "use strict";
527505
527717
  import_react120 = __toESM(require_react(), 1);
527718
+ init_permissionsConfig();
527506
527719
  }
527507
527720
  });
527508
527721
 
@@ -528819,6 +529032,14 @@ Output: ${combinedOutput}`;
528819
529032
  commandName
528820
529033
  };
528821
529034
  options3.setMessages((prev) => [...prev, commandMessage]);
529035
+ } else if (result2.success && result2.action === "showPermissionsPanel") {
529036
+ options3.setShowPermissionsPanel(true);
529037
+ const commandMessage = {
529038
+ role: "command",
529039
+ content: "",
529040
+ commandName
529041
+ };
529042
+ options3.setMessages((prev) => [...prev, commandMessage]);
528822
529043
  } else if (result2.success && result2.action === "executeCustomCommand" && result2.prompt) {
528823
529044
  const commandMessage = {
528824
529045
  role: "command",
@@ -529234,6 +529455,7 @@ async function handleConversationWithTools(options3) {
529234
529455
  let toolCallAccumulator = "";
529235
529456
  let reasoningAccumulator = "";
529236
529457
  let chunkCount = 0;
529458
+ let currentTokenCount = 0;
529237
529459
  const currentSession2 = sessionManager.getCurrentSession();
529238
529460
  const cacheKey = currentSession2 == null ? void 0 : currentSession2.id;
529239
529461
  const onRetry = (error, attempt, nextDelay) => {
@@ -529311,24 +529533,27 @@ async function handleConversationWithTools(options3) {
529311
529533
  }
529312
529534
  reasoningAccumulator += chunk2.delta;
529313
529535
  try {
529314
- const tokens2 = encoder.encode(streamedContent + toolCallAccumulator + reasoningAccumulator);
529315
- setStreamTokenCount(tokens2.length);
529536
+ const deltaTokens = encoder.encode(chunk2.delta);
529537
+ currentTokenCount += deltaTokens.length;
529538
+ setStreamTokenCount(currentTokenCount);
529316
529539
  } catch (e) {
529317
529540
  }
529318
529541
  } else if (chunk2.type === "content" && chunk2.content) {
529319
529542
  setIsReasoning == null ? void 0 : setIsReasoning(false);
529320
529543
  streamedContent += chunk2.content;
529321
529544
  try {
529322
- const tokens2 = encoder.encode(streamedContent + toolCallAccumulator + reasoningAccumulator);
529323
- setStreamTokenCount(tokens2.length);
529545
+ const deltaTokens = encoder.encode(chunk2.content);
529546
+ currentTokenCount += deltaTokens.length;
529547
+ setStreamTokenCount(currentTokenCount);
529324
529548
  } catch (e) {
529325
529549
  }
529326
529550
  } else if (chunk2.type === "tool_call_delta" && chunk2.delta) {
529327
529551
  setIsReasoning == null ? void 0 : setIsReasoning(false);
529328
529552
  toolCallAccumulator += chunk2.delta;
529329
529553
  try {
529330
- const tokens2 = encoder.encode(streamedContent + toolCallAccumulator + reasoningAccumulator);
529331
- setStreamTokenCount(tokens2.length);
529554
+ const deltaTokens = encoder.encode(chunk2.delta);
529555
+ currentTokenCount += deltaTokens.length;
529556
+ setStreamTokenCount(currentTokenCount);
529332
529557
  } catch (e) {
529333
529558
  }
529334
529559
  } else if (chunk2.type === "tool_calls" && chunk2.tool_calls) {
@@ -530983,7 +531208,7 @@ ${errorMsg}`,
530983
531208
  setCurrentModel: streamingState.setCurrentModel
530984
531209
  });
530985
531210
  } catch (error) {
530986
- if (!controller.signal.aborted) {
531211
+ if (!controller.signal.aborted && !userInterruptedRef.current) {
530987
531212
  const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
530988
531213
  const finalMessage = {
530989
531214
  role: "assistant",
@@ -531154,7 +531379,7 @@ ${errorMsg}`,
531154
531379
  setCurrentModel: streamingState.setCurrentModel
531155
531380
  });
531156
531381
  } catch (error) {
531157
- if (!controller.signal.aborted) {
531382
+ if (!controller.signal.aborted && !userInterruptedRef.current) {
531158
531383
  const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
531159
531384
  const finalMessage = {
531160
531385
  role: "assistant",
@@ -534598,6 +534823,218 @@ var init_reindexCodebase = __esm({
534598
534823
  }
534599
534824
  });
534600
534825
 
534826
+ // dist/ui/components/panels/PermissionsPanel.js
534827
+ var PermissionsPanel_exports = {};
534828
+ __export(PermissionsPanel_exports, {
534829
+ default: () => PermissionsPanel
534830
+ });
534831
+ function PermissionsPanel({ alwaysApprovedTools, onRemoveTool, onClearAll, onClose }) {
534832
+ const { t } = useI18n();
534833
+ const { theme: theme14 } = useTheme();
534834
+ const messages = t.permissionsPanel ?? {};
534835
+ const tools = (0, import_react127.useMemo)(() => Array.from(alwaysApprovedTools).sort((a, b) => a.localeCompare(b)), [alwaysApprovedTools]);
534836
+ const [selectedIndex, setSelectedIndex] = (0, import_react127.useState)(0);
534837
+ const [confirmTarget, setConfirmTarget] = (0, import_react127.useState)(null);
534838
+ const [confirmOption, setConfirmOption] = (0, import_react127.useState)(0);
534839
+ const hasTools = tools.length > 0;
534840
+ const clearAllIndex = hasTools ? tools.length : -1;
534841
+ const optionCount = hasTools ? tools.length + 1 : 0;
534842
+ (0, import_react127.useEffect)(() => {
534843
+ if (optionCount === 0) {
534844
+ setSelectedIndex(0);
534845
+ return;
534846
+ }
534847
+ if (selectedIndex >= optionCount) {
534848
+ setSelectedIndex(optionCount - 1);
534849
+ }
534850
+ }, [optionCount, selectedIndex]);
534851
+ (0, import_react127.useEffect)(() => {
534852
+ setConfirmTarget(null);
534853
+ setConfirmOption(0);
534854
+ }, [alwaysApprovedTools]);
534855
+ const handleInput = (0, import_react127.useCallback)((_3, key) => {
534856
+ if (confirmTarget !== null) {
534857
+ if (key.escape) {
534858
+ setConfirmTarget(null);
534859
+ setConfirmOption(0);
534860
+ return;
534861
+ }
534862
+ if (key.upArrow || key.downArrow) {
534863
+ setConfirmOption((prev) => prev === 0 ? 1 : 0);
534864
+ return;
534865
+ }
534866
+ if (key.return) {
534867
+ if (confirmOption === 0) {
534868
+ if (confirmTarget === "clearAll") {
534869
+ onClearAll();
534870
+ setSelectedIndex(0);
534871
+ } else {
534872
+ const tool = tools[confirmTarget];
534873
+ if (tool) {
534874
+ onRemoveTool(tool);
534875
+ if (confirmTarget >= tools.length - 1) {
534876
+ setSelectedIndex(Math.max(0, confirmTarget - 1));
534877
+ }
534878
+ }
534879
+ }
534880
+ }
534881
+ setConfirmTarget(null);
534882
+ setConfirmOption(0);
534883
+ return;
534884
+ }
534885
+ return;
534886
+ }
534887
+ if (key.escape) {
534888
+ onClose();
534889
+ return;
534890
+ }
534891
+ if (optionCount === 0) {
534892
+ return;
534893
+ }
534894
+ if (key.upArrow) {
534895
+ setSelectedIndex((prev) => prev === 0 ? optionCount - 1 : prev - 1);
534896
+ return;
534897
+ }
534898
+ if (key.downArrow) {
534899
+ setSelectedIndex((prev) => prev === optionCount - 1 ? 0 : prev + 1);
534900
+ return;
534901
+ }
534902
+ if (key.return) {
534903
+ if (selectedIndex === clearAllIndex) {
534904
+ setConfirmTarget("clearAll");
534905
+ } else {
534906
+ setConfirmTarget(selectedIndex);
534907
+ }
534908
+ setConfirmOption(0);
534909
+ }
534910
+ }, [
534911
+ optionCount,
534912
+ selectedIndex,
534913
+ clearAllIndex,
534914
+ onClose,
534915
+ onClearAll,
534916
+ onRemoveTool,
534917
+ tools,
534918
+ confirmTarget,
534919
+ confirmOption
534920
+ ]);
534921
+ use_input_default(handleInput);
534922
+ const getConfirmingToolName = () => {
534923
+ if (confirmTarget === "clearAll") {
534924
+ return "";
534925
+ }
534926
+ if (typeof confirmTarget === "number") {
534927
+ return tools[confirmTarget] ?? "";
534928
+ }
534929
+ return "";
534930
+ };
534931
+ if (confirmTarget !== null) {
534932
+ const isConfirmingClearAll = confirmTarget === "clearAll";
534933
+ const toolName = getConfirmingToolName();
534934
+ return import_react127.default.createElement(
534935
+ Box_default,
534936
+ { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 2, paddingY: 1 },
534937
+ import_react127.default.createElement(Text, { color: "red", bold: true }, isConfirmingClearAll ? messages.confirmClearAll ?? "Clear all permissions?" : messages.confirmDelete ?? "Delete allowed tool?"),
534938
+ !isConfirmingClearAll && toolName && import_react127.default.createElement(
534939
+ Box_default,
534940
+ { marginTop: 1, flexDirection: "column" },
534941
+ import_react127.default.createElement(
534942
+ Text,
534943
+ { color: "white", bold: true },
534944
+ " ",
534945
+ toolName
534946
+ )
534947
+ ),
534948
+ import_react127.default.createElement(
534949
+ Box_default,
534950
+ { marginTop: 1, flexDirection: "column" },
534951
+ import_react127.default.createElement(
534952
+ Text,
534953
+ { color: confirmOption === 0 ? theme14.colors.menuSelected : theme14.colors.menuNormal, bold: confirmOption === 0 },
534954
+ confirmOption === 0 ? "\u276F " : " ",
534955
+ messages.yes ?? "Yes"
534956
+ ),
534957
+ import_react127.default.createElement(
534958
+ Text,
534959
+ { color: confirmOption === 1 ? theme14.colors.menuSelected : theme14.colors.menuNormal, bold: confirmOption === 1 },
534960
+ confirmOption === 1 ? "\u276F " : " ",
534961
+ messages.no ?? "No"
534962
+ )
534963
+ )
534964
+ );
534965
+ }
534966
+ return import_react127.default.createElement(
534967
+ Box_default,
534968
+ { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1 },
534969
+ import_react127.default.createElement(Text, { color: "cyan", bold: true }, messages.title ?? "Permissions"),
534970
+ hasTools ? import_react127.default.createElement(
534971
+ Box_default,
534972
+ { flexDirection: "column", marginTop: 1 },
534973
+ tools.map((tool, index) => {
534974
+ const isSelected = index === selectedIndex;
534975
+ return import_react127.default.createElement(
534976
+ Text,
534977
+ { key: tool, color: isSelected ? theme14.colors.menuSelected : theme14.colors.menuNormal, bold: isSelected },
534978
+ isSelected ? "\u276F " : " ",
534979
+ tool
534980
+ );
534981
+ }),
534982
+ import_react127.default.createElement(
534983
+ Box_default,
534984
+ { marginTop: 1 },
534985
+ import_react127.default.createElement(
534986
+ Text,
534987
+ { color: selectedIndex === clearAllIndex ? theme14.colors.warning : theme14.colors.menuSecondary, bold: selectedIndex === clearAllIndex },
534988
+ selectedIndex === clearAllIndex ? "\u276F " : " ",
534989
+ messages.clearAll ?? "Clear All"
534990
+ )
534991
+ )
534992
+ ) : import_react127.default.createElement(
534993
+ Box_default,
534994
+ { marginTop: 1 },
534995
+ import_react127.default.createElement(Text, { color: "gray", dimColor: true }, messages.noTools ?? "No tools are always approved")
534996
+ ),
534997
+ import_react127.default.createElement(
534998
+ Box_default,
534999
+ { marginTop: 1 },
535000
+ import_react127.default.createElement(Text, { color: "gray", dimColor: true }, messages.hint ?? "\u2191\u2193 navigate \u2022 Enter remove \u2022 ESC close")
535001
+ )
535002
+ );
535003
+ }
535004
+ var import_react127;
535005
+ var init_PermissionsPanel = __esm({
535006
+ async "dist/ui/components/panels/PermissionsPanel.js"() {
535007
+ "use strict";
535008
+ import_react127 = __toESM(require_react(), 1);
535009
+ await init_build2();
535010
+ init_i18n();
535011
+ init_ThemeContext();
535012
+ }
535013
+ });
535014
+
535015
+ // dist/utils/commands/permissions.js
535016
+ var permissions_exports = {};
535017
+ __export(permissions_exports, {
535018
+ default: () => permissions_default
535019
+ });
535020
+ var permissions_default;
535021
+ var init_permissions = __esm({
535022
+ "dist/utils/commands/permissions.js"() {
535023
+ "use strict";
535024
+ init_commandExecutor();
535025
+ registerCommand("permissions", {
535026
+ execute: () => {
535027
+ return {
535028
+ success: true,
535029
+ action: "showPermissionsPanel",
535030
+ message: "Opening permissions panel"
535031
+ };
535032
+ }
535033
+ });
535034
+ permissions_default = {};
535035
+ }
535036
+ });
535037
+
534601
535038
  // dist/ui/pages/ChatScreen.js
534602
535039
  var ChatScreen_exports = {};
534603
535040
  __export(ChatScreen_exports, {
@@ -534607,20 +535044,20 @@ function ChatScreen({ autoResume, enableYolo }) {
534607
535044
  const { t } = useI18n();
534608
535045
  const { theme: theme14 } = useTheme();
534609
535046
  const { exit } = use_app_default();
534610
- const [messages, setMessages] = (0, import_react127.useState)([]);
534611
- const [isSaving] = (0, import_react127.useState)(false);
534612
- const [pendingMessages, setPendingMessages] = (0, import_react127.useState)([]);
534613
- const pendingMessagesRef = (0, import_react127.useRef)([]);
534614
- const hasAttemptedAutoVscodeConnect = (0, import_react127.useRef)(false);
534615
- const userInterruptedRef = (0, import_react127.useRef)(false);
534616
- const [remountKey, setRemountKey] = (0, import_react127.useState)(0);
534617
- const [currentContextPercentage, setCurrentContextPercentage] = (0, import_react127.useState)(0);
534618
- const currentContextPercentageRef = (0, import_react127.useRef)(0);
534619
- const [isExecutingTerminalCommand, setIsExecutingTerminalCommand] = (0, import_react127.useState)(false);
534620
- (0, import_react127.useEffect)(() => {
535047
+ const [messages, setMessages] = (0, import_react128.useState)([]);
535048
+ const [isSaving] = (0, import_react128.useState)(false);
535049
+ const [pendingMessages, setPendingMessages] = (0, import_react128.useState)([]);
535050
+ const pendingMessagesRef = (0, import_react128.useRef)([]);
535051
+ const hasAttemptedAutoVscodeConnect = (0, import_react128.useRef)(false);
535052
+ const userInterruptedRef = (0, import_react128.useRef)(false);
535053
+ const [remountKey, setRemountKey] = (0, import_react128.useState)(0);
535054
+ const [currentContextPercentage, setCurrentContextPercentage] = (0, import_react128.useState)(0);
535055
+ const currentContextPercentageRef = (0, import_react128.useRef)(0);
535056
+ const [isExecutingTerminalCommand, setIsExecutingTerminalCommand] = (0, import_react128.useState)(false);
535057
+ (0, import_react128.useEffect)(() => {
534621
535058
  currentContextPercentageRef.current = currentContextPercentage;
534622
535059
  }, [currentContextPercentage]);
534623
- const [yoloMode, setYoloMode] = (0, import_react127.useState)(() => {
535060
+ const [yoloMode, setYoloMode] = (0, import_react128.useState)(() => {
534624
535061
  if (enableYolo !== void 0) {
534625
535062
  return enableYolo;
534626
535063
  }
@@ -534631,7 +535068,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534631
535068
  return false;
534632
535069
  }
534633
535070
  });
534634
- const [planMode, setPlanMode] = (0, import_react127.useState)(() => {
535071
+ const [planMode, setPlanMode] = (0, import_react128.useState)(() => {
534635
535072
  try {
534636
535073
  const saved = localStorage.getItem("snow-plan-mode");
534637
535074
  return saved === "true";
@@ -534639,7 +535076,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534639
535076
  return false;
534640
535077
  }
534641
535078
  });
534642
- const [vulnerabilityHuntingMode, setVulnerabilityHuntingMode] = (0, import_react127.useState)(() => {
535079
+ const [vulnerabilityHuntingMode, setVulnerabilityHuntingMode] = (0, import_react128.useState)(() => {
534643
535080
  try {
534644
535081
  const saved = localStorage.getItem("snow-vulnerability-hunting-mode");
534645
535082
  return saved === "true";
@@ -534647,27 +535084,28 @@ function ChatScreen({ autoResume, enableYolo }) {
534647
535084
  return false;
534648
535085
  }
534649
535086
  });
534650
- const [simpleMode, setSimpleMode2] = (0, import_react127.useState)(() => {
535087
+ const [simpleMode, setSimpleMode2] = (0, import_react128.useState)(() => {
534651
535088
  return getSimpleMode();
534652
535089
  });
534653
- const [showThinking, _setShowThinking] = (0, import_react127.useState)(() => {
535090
+ const [showThinking, _setShowThinking] = (0, import_react128.useState)(() => {
534654
535091
  const config3 = getOpenAiConfig();
534655
535092
  return config3.showThinking !== false;
534656
535093
  });
534657
- const [isCompressing, setIsCompressing] = (0, import_react127.useState)(false);
534658
- const [compressionError, setCompressionError] = (0, import_react127.useState)(null);
534659
- const [restoreInputContent, setRestoreInputContent] = (0, import_react127.useState)(null);
534660
- const [bashSensitiveCommand, setBashSensitiveCommand] = (0, import_react127.useState)(null);
534661
- const [hookError, setHookError] = (0, import_react127.useState)(null);
535094
+ const [isCompressing, setIsCompressing] = (0, import_react128.useState)(false);
535095
+ const [compressionError, setCompressionError] = (0, import_react128.useState)(null);
535096
+ const [showPermissionsPanel, setShowPermissionsPanel] = (0, import_react128.useState)(false);
535097
+ const [restoreInputContent, setRestoreInputContent] = (0, import_react128.useState)(null);
535098
+ const [bashSensitiveCommand, setBashSensitiveCommand] = (0, import_react128.useState)(null);
535099
+ const [hookError, setHookError] = (0, import_react128.useState)(null);
534662
535100
  const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
534663
535101
  const { stdout } = use_stdout_default();
534664
535102
  const workingDirectory = process.cwd();
534665
- const isInitialMount = (0, import_react127.useRef)(true);
534666
- const [codebaseIndexing, setCodebaseIndexing] = (0, import_react127.useState)(false);
534667
- const [codebaseProgress, setCodebaseProgress] = (0, import_react127.useState)(null);
534668
- const [watcherEnabled, setWatcherEnabled] = (0, import_react127.useState)(false);
534669
- const [fileUpdateNotification, setFileUpdateNotification] = (0, import_react127.useState)(null);
534670
- const codebaseAgentRef = (0, import_react127.useRef)(null);
535103
+ const isInitialMount = (0, import_react128.useRef)(true);
535104
+ const [codebaseIndexing, setCodebaseIndexing] = (0, import_react128.useState)(false);
535105
+ const [codebaseProgress, setCodebaseProgress] = (0, import_react128.useState)(null);
535106
+ const [watcherEnabled, setWatcherEnabled] = (0, import_react128.useState)(false);
535107
+ const [fileUpdateNotification, setFileUpdateNotification] = (0, import_react128.useState)(null);
535108
+ const codebaseAgentRef = (0, import_react128.useRef)(null);
534671
535109
  const streamingState = useStreamingState();
534672
535110
  const vscodeState = useVSCodeState();
534673
535111
  const snapshotState = useSnapshotState(messages.length);
@@ -534676,11 +535114,11 @@ function ChatScreen({ autoResume, enableYolo }) {
534676
535114
  const panelState = usePanelState();
534677
535115
  const { hasFocus } = useTerminalFocus();
534678
535116
  const { saveMessage, clearSavedMessages, initializeFromSession } = useSessionSave();
534679
- (0, import_react127.useEffect)(() => {
535117
+ (0, import_react128.useEffect)(() => {
534680
535118
  pendingMessagesRef.current = pendingMessages;
534681
535119
  }, [pendingMessages]);
534682
- const [commandsLoaded, setCommandsLoaded] = (0, import_react127.useState)(false);
534683
- (0, import_react127.useEffect)(() => {
535120
+ const [commandsLoaded, setCommandsLoaded] = (0, import_react128.useState)(false);
535121
+ (0, import_react128.useEffect)(() => {
534684
535122
  Promise.all([
534685
535123
  Promise.resolve().then(() => (init_clear(), clear_exports)),
534686
535124
  Promise.resolve().then(() => (init_resume(), resume_exports)),
@@ -534702,7 +535140,8 @@ function ChatScreen({ autoResume, enableYolo }) {
534702
535140
  Promise.resolve().then(() => (init_skills(), skills_exports)),
534703
535141
  Promise.resolve().then(() => (init_quit(), quit_exports)),
534704
535142
  Promise.resolve().then(() => (init_reindex(), reindex_exports)),
534705
- Promise.resolve().then(() => (init_addDir(), addDir_exports))
535143
+ Promise.resolve().then(() => (init_addDir(), addDir_exports)),
535144
+ Promise.resolve().then(() => (init_permissions(), permissions_exports))
534706
535145
  ]).then(async () => {
534707
535146
  await registerCustomCommands(workingDirectory);
534708
535147
  setCommandsLoaded(true);
@@ -534711,7 +535150,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534711
535150
  setCommandsLoaded(true);
534712
535151
  });
534713
535152
  }, []);
534714
- (0, import_react127.useEffect)(() => {
535153
+ (0, import_react128.useEffect)(() => {
534715
535154
  const startCodebaseIndexing = async () => {
534716
535155
  try {
534717
535156
  const config3 = loadCodebaseConfig();
@@ -534833,7 +535272,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534833
535272
  }
534834
535273
  };
534835
535274
  }, []);
534836
- (0, import_react127.useEffect)(() => {
535275
+ (0, import_react128.useEffect)(() => {
534837
535276
  global.__stopCodebaseIndexing = async () => {
534838
535277
  if (codebaseAgentRef.current) {
534839
535278
  await codebaseAgentRef.current.stop();
@@ -534844,25 +535283,25 @@ function ChatScreen({ autoResume, enableYolo }) {
534844
535283
  delete global.__stopCodebaseIndexing;
534845
535284
  };
534846
535285
  }, []);
534847
- (0, import_react127.useEffect)(() => {
535286
+ (0, import_react128.useEffect)(() => {
534848
535287
  try {
534849
535288
  localStorage.setItem("snow-yolo-mode", String(yoloMode));
534850
535289
  } catch {
534851
535290
  }
534852
535291
  }, [yoloMode]);
534853
- (0, import_react127.useEffect)(() => {
535292
+ (0, import_react128.useEffect)(() => {
534854
535293
  try {
534855
535294
  localStorage.setItem("snow-plan-mode", String(planMode));
534856
535295
  } catch {
534857
535296
  }
534858
535297
  }, [planMode]);
534859
- (0, import_react127.useEffect)(() => {
535298
+ (0, import_react128.useEffect)(() => {
534860
535299
  try {
534861
535300
  localStorage.setItem("snow-vulnerability-hunting-mode", String(vulnerabilityHuntingMode));
534862
535301
  } catch {
534863
535302
  }
534864
535303
  }, [vulnerabilityHuntingMode]);
534865
- (0, import_react127.useEffect)(() => {
535304
+ (0, import_react128.useEffect)(() => {
534866
535305
  const interval = setInterval(() => {
534867
535306
  const currentSimpleMode = getSimpleMode();
534868
535307
  if (currentSimpleMode !== simpleMode) {
@@ -534871,7 +535310,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534871
535310
  }, 1e3);
534872
535311
  return () => clearInterval(interval);
534873
535312
  }, [simpleMode]);
534874
- (0, import_react127.useEffect)(() => {
535313
+ (0, import_react128.useEffect)(() => {
534875
535314
  if (restoreInputContent !== null) {
534876
535315
  const timer2 = setTimeout(() => {
534877
535316
  setRestoreInputContent(null);
@@ -534880,7 +535319,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534880
535319
  }
534881
535320
  return void 0;
534882
535321
  }, [restoreInputContent]);
534883
- (0, import_react127.useEffect)(() => {
535322
+ (0, import_react128.useEffect)(() => {
534884
535323
  if (!autoResume) {
534885
535324
  sessionManager.clearCurrentSession();
534886
535325
  return;
@@ -534905,7 +535344,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534905
535344
  };
534906
535345
  resumeSession();
534907
535346
  }, [autoResume, initializeFromSession]);
534908
- (0, import_react127.useEffect)(() => {
535347
+ (0, import_react128.useEffect)(() => {
534909
535348
  if (isInitialMount.current) {
534910
535349
  isInitialMount.current = false;
534911
535350
  return;
@@ -534918,7 +535357,7 @@ function ChatScreen({ autoResume, enableYolo }) {
534918
535357
  clearTimeout(handler);
534919
535358
  };
534920
535359
  }, [terminalWidth]);
534921
- (0, import_react127.useEffect)(() => {
535360
+ (0, import_react128.useEffect)(() => {
534922
535361
  if (remountKey === 0)
534923
535362
  return;
534924
535363
  const reloadMessages = async () => {
@@ -534930,8 +535369,8 @@ function ChatScreen({ autoResume, enableYolo }) {
534930
535369
  };
534931
535370
  reloadMessages();
534932
535371
  }, [remountKey]);
534933
- const { pendingToolConfirmation, requestToolConfirmation, isToolAutoApproved, addMultipleToAlwaysApproved } = useToolConfirmation();
534934
- const [pendingUserQuestion, setPendingUserQuestion] = (0, import_react127.useState)(null);
535372
+ const { pendingToolConfirmation, alwaysApprovedTools, requestToolConfirmation, isToolAutoApproved, addMultipleToAlwaysApproved, removeFromAlwaysApproved, clearAllAlwaysApproved } = useToolConfirmation(workingDirectory);
535373
+ const [pendingUserQuestion, setPendingUserQuestion] = (0, import_react128.useState)(null);
534935
535374
  const requestUserQuestion = async (question, options3, toolCall) => {
534936
535375
  return new Promise((resolve10) => {
534937
535376
  setPendingUserQuestion({
@@ -535066,6 +535505,7 @@ function ChatScreen({ autoResume, enableYolo }) {
535066
535505
  setShowCustomCommandConfig: panelState.setShowCustomCommandConfig,
535067
535506
  setShowSkillsCreation: panelState.setShowSkillsCreation,
535068
535507
  setShowWorkingDirPanel: panelState.setShowWorkingDirPanel,
535508
+ setShowPermissionsPanel,
535069
535509
  setYoloMode,
535070
535510
  setPlanMode,
535071
535511
  setVulnerabilityHuntingMode,
@@ -535077,7 +535517,7 @@ function ChatScreen({ autoResume, enableYolo }) {
535077
535517
  onQuit: handleQuit,
535078
535518
  onReindexCodebase: handleReindexCodebase
535079
535519
  });
535080
- (0, import_react127.useEffect)(() => {
535520
+ (0, import_react128.useEffect)(() => {
535081
535521
  if (!commandsLoaded) {
535082
535522
  return;
535083
535523
  }
@@ -535106,7 +535546,7 @@ function ChatScreen({ autoResume, enableYolo }) {
535106
535546
  }, 0);
535107
535547
  return () => clearTimeout(timer2);
535108
535548
  }, [commandsLoaded]);
535109
- (0, import_react127.useEffect)(() => {
535549
+ (0, import_react128.useEffect)(() => {
535110
535550
  if (!streamingState.isStreaming && pendingMessages.length > 0) {
535111
535551
  const timer2 = setTimeout(() => {
535112
535552
  processPendingMessages();
@@ -535115,7 +535555,7 @@ function ChatScreen({ autoResume, enableYolo }) {
535115
535555
  }
535116
535556
  return void 0;
535117
535557
  }, [streamingState.isStreaming, pendingMessages.length]);
535118
- (0, import_react127.useEffect)(() => {
535558
+ (0, import_react128.useEffect)(() => {
535119
535559
  const handleSearchEvent = (event) => {
535120
535560
  if (event.type === "search-complete") {
535121
535561
  streamingState.setCodebaseSearchStatus({
@@ -535152,6 +535592,9 @@ function ChatScreen({ autoResume, enableYolo }) {
535152
535592
  };
535153
535593
  }, [streamingState]);
535154
535594
  use_input_default((input2, key) => {
535595
+ if (pendingToolConfirmation) {
535596
+ return;
535597
+ }
535155
535598
  if (bashSensitiveCommand) {
535156
535599
  if (input2.toLowerCase() === "y") {
535157
535600
  bashSensitiveCommand.resolve(true);
@@ -535180,8 +535623,10 @@ function ChatScreen({ autoResume, enableYolo }) {
535180
535623
  }
535181
535624
  if (key.escape && streamingState.isStreaming && streamingState.abortController && hasFocus) {
535182
535625
  userInterruptedRef.current = true;
535183
- streamingState.abortController.abort();
535184
535626
  streamingState.setRetryStatus(null);
535627
+ streamingState.setCodebaseSearchStatus(null);
535628
+ streamingState.setIsStreaming(false);
535629
+ streamingState.abortController.abort();
535185
535630
  setMessages((prev) => prev.filter((msg) => !msg.toolPending));
535186
535631
  }
535187
535632
  });
@@ -535236,67 +535681,67 @@ function ChatScreen({ autoResume, enableYolo }) {
535236
535681
  }
535237
535682
  };
535238
535683
  if (terminalHeight < MIN_TERMINAL_HEIGHT) {
535239
- return import_react127.default.createElement(
535684
+ return import_react128.default.createElement(
535240
535685
  Box_default,
535241
535686
  { flexDirection: "column", padding: 2 },
535242
- import_react127.default.createElement(
535687
+ import_react128.default.createElement(
535243
535688
  Box_default,
535244
535689
  { borderStyle: "round", borderColor: "red", padding: 1 },
535245
- import_react127.default.createElement(Text, { color: "red", bold: true }, t.chatScreen.terminalTooSmall)
535690
+ import_react128.default.createElement(Text, { color: "red", bold: true }, t.chatScreen.terminalTooSmall)
535246
535691
  ),
535247
- import_react127.default.createElement(
535692
+ import_react128.default.createElement(
535248
535693
  Box_default,
535249
535694
  { marginTop: 1 },
535250
- import_react127.default.createElement(Text, { color: "yellow" }, t.chatScreen.terminalResizePrompt.replace("{current}", terminalHeight.toString()).replace("{required}", MIN_TERMINAL_HEIGHT.toString()))
535695
+ import_react128.default.createElement(Text, { color: "yellow" }, t.chatScreen.terminalResizePrompt.replace("{current}", terminalHeight.toString()).replace("{required}", MIN_TERMINAL_HEIGHT.toString()))
535251
535696
  ),
535252
- import_react127.default.createElement(
535697
+ import_react128.default.createElement(
535253
535698
  Box_default,
535254
535699
  { marginTop: 1 },
535255
- import_react127.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.chatScreen.terminalMinHeight)
535700
+ import_react128.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.chatScreen.terminalMinHeight)
535256
535701
  )
535257
535702
  );
535258
535703
  }
535259
- return import_react127.default.createElement(
535704
+ return import_react128.default.createElement(
535260
535705
  Box_default,
535261
535706
  { flexDirection: "column", height: "100%", width: terminalWidth },
535262
- import_react127.default.createElement(Static, { key: remountKey, items: [
535263
- import_react127.default.createElement(ChatHeader, { key: "header", terminalWidth, simpleMode, workingDirectory }),
535707
+ import_react128.default.createElement(Static, { key: remountKey, items: [
535708
+ import_react128.default.createElement(ChatHeader, { key: "header", terminalWidth, simpleMode, workingDirectory }),
535264
535709
  ...messages.filter((m) => !m.streaming).map((message, index, filteredMessages) => {
535265
535710
  const isLastMessage = index === filteredMessages.length - 1;
535266
- return import_react127.default.createElement(MessageRenderer, { key: `msg-${index}`, message, index, isLastMessage, filteredMessages, terminalWidth, showThinking });
535711
+ return import_react128.default.createElement(MessageRenderer, { key: `msg-${index}`, message, index, isLastMessage, filteredMessages, terminalWidth, showThinking });
535267
535712
  })
535268
535713
  ] }, (item) => item),
535269
- 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 }),
535270
- import_react127.default.createElement(
535714
+ 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 }),
535715
+ import_react128.default.createElement(
535271
535716
  Box_default,
535272
535717
  { paddingX: 1, width: terminalWidth },
535273
- import_react127.default.createElement(PendingMessages, { pendingMessages })
535718
+ import_react128.default.createElement(PendingMessages, { pendingMessages })
535274
535719
  ),
535275
- hookError && import_react127.default.createElement(
535720
+ hookError && import_react128.default.createElement(
535276
535721
  Box_default,
535277
535722
  { paddingX: 1, width: terminalWidth, marginBottom: 1 },
535278
- import_react127.default.createElement(HookErrorDisplay, { details: hookError })
535723
+ import_react128.default.createElement(HookErrorDisplay, { details: hookError })
535279
535724
  ),
535280
- 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) => {
535725
+ 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) => {
535281
535726
  setHookError(error);
535282
535727
  } }),
535283
- bashSensitiveCommand && import_react127.default.createElement(
535728
+ bashSensitiveCommand && import_react128.default.createElement(
535284
535729
  Box_default,
535285
535730
  { paddingX: 1, width: terminalWidth },
535286
- import_react127.default.createElement(BashCommandConfirmation, { command: bashSensitiveCommand.command, onConfirm: bashSensitiveCommand.resolve, terminalWidth })
535731
+ import_react128.default.createElement(BashCommandConfirmation, { command: bashSensitiveCommand.command, onConfirm: bashSensitiveCommand.resolve, terminalWidth })
535287
535732
  ),
535288
- bashMode.state.isExecuting && bashMode.state.currentCommand && import_react127.default.createElement(
535733
+ bashMode.state.isExecuting && bashMode.state.currentCommand && import_react128.default.createElement(
535289
535734
  Box_default,
535290
535735
  { paddingX: 1, width: terminalWidth },
535291
- import_react127.default.createElement(BashCommandExecutionStatus, { command: bashMode.state.currentCommand, timeout: bashMode.state.currentTimeout || 3e4, terminalWidth })
535736
+ import_react128.default.createElement(BashCommandExecutionStatus, { command: bashMode.state.currentCommand, timeout: bashMode.state.currentTimeout || 3e4, terminalWidth })
535292
535737
  ),
535293
- terminalExecutionState.state.isExecuting && terminalExecutionState.state.command && import_react127.default.createElement(
535738
+ terminalExecutionState.state.isExecuting && terminalExecutionState.state.command && import_react128.default.createElement(
535294
535739
  Box_default,
535295
535740
  { paddingX: 1, width: terminalWidth },
535296
- import_react127.default.createElement(BashCommandExecutionStatus, { command: terminalExecutionState.state.command, timeout: terminalExecutionState.state.timeout || 3e4, terminalWidth })
535741
+ import_react128.default.createElement(BashCommandExecutionStatus, { command: terminalExecutionState.state.command, timeout: terminalExecutionState.state.timeout || 3e4, terminalWidth })
535297
535742
  ),
535298
- pendingUserQuestion && import_react127.default.createElement(AskUserQuestion, { question: pendingUserQuestion.question, options: pendingUserQuestion.options, onAnswer: handleUserQuestionAnswer }),
535299
- 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) => {
535743
+ pendingUserQuestion && import_react128.default.createElement(AskUserQuestion, { question: pendingUserQuestion.question, options: pendingUserQuestion.options, onAnswer: handleUserQuestionAnswer }),
535744
+ 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) => {
535300
535745
  await saveCustomCommand(name, command, type, void 0, location, workingDirectory);
535301
535746
  await registerCustomCommands(workingDirectory);
535302
535747
  panelState.setShowCustomCommandConfig(false);
@@ -535342,8 +535787,26 @@ You can now edit these files to customize your skill.`,
535342
535787
  setMessages((prev) => [...prev, errorMessage]);
535343
535788
  }
535344
535789
  } }),
535345
- snapshotState.pendingRollback && import_react127.default.createElement(FileRollbackConfirmation, { fileCount: snapshotState.pendingRollback.fileCount, filePaths: snapshotState.pendingRollback.filePaths || [], onConfirm: handleRollbackConfirm }),
535346
- !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 ? {
535790
+ showPermissionsPanel && import_react128.default.createElement(
535791
+ Box_default,
535792
+ { paddingX: 1, flexDirection: "column", width: terminalWidth },
535793
+ import_react128.default.createElement(
535794
+ import_react128.Suspense,
535795
+ { fallback: import_react128.default.createElement(
535796
+ Box_default,
535797
+ null,
535798
+ import_react128.default.createElement(
535799
+ Text,
535800
+ null,
535801
+ import_react128.default.createElement(build_default, { type: "dots" }),
535802
+ " Loading..."
535803
+ )
535804
+ ) },
535805
+ import_react128.default.createElement(PermissionsPanel2, { alwaysApprovedTools, onRemoveTool: removeFromAlwaysApproved, onClearAll: clearAllAlwaysApproved, onClose: () => setShowPermissionsPanel(false) })
535806
+ )
535807
+ ),
535808
+ snapshotState.pendingRollback && import_react128.default.createElement(FileRollbackConfirmation, { fileCount: snapshotState.pendingRollback.fileCount, filePaths: snapshotState.pendingRollback.filePaths || [], onConfirm: handleRollbackConfirm }),
535809
+ !pendingToolConfirmation && !pendingUserQuestion && !bashSensitiveCommand && !isCompressing && !(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, isProcessing: streamingState.isStreaming || isSaving || bashMode.state.isExecuting, chatHistory: messages, yoloMode, setYoloMode, planMode, setPlanMode, vulnerabilityHuntingMode, setVulnerabilityHuntingMode, contextUsage: streamingState.contextUsage ? {
535347
535810
  inputTokens: streamingState.contextUsage.prompt_tokens,
535348
535811
  maxContextTokens: getOpenAiConfig().maxContextTokens || 4e3,
535349
535812
  cacheCreationTokens: streamingState.contextUsage.cache_creation_input_tokens,
@@ -535358,12 +535821,13 @@ You can now edit these files to customize your skill.`,
535358
535821
  }, profileSearchQuery: panelState.profileSearchQuery, setProfileSearchQuery: panelState.setProfileSearchQuery, vscodeConnectionStatus: vscodeState.vscodeConnectionStatus, editorContext: vscodeState.editorContext, codebaseIndexing, codebaseProgress, watcherEnabled, fileUpdateNotification, currentProfileName: panelState.currentProfileName, isCompressing, compressionError })
535359
535822
  );
535360
535823
  }
535361
- var import_react127;
535824
+ var import_react128, PermissionsPanel2;
535362
535825
  var init_ChatScreen = __esm({
535363
535826
  async "dist/ui/pages/ChatScreen.js"() {
535364
535827
  "use strict";
535365
- import_react127 = __toESM(require_react(), 1);
535828
+ import_react128 = __toESM(require_react(), 1);
535366
535829
  await init_build2();
535830
+ await init_build3();
535367
535831
  init_ansi_escapes();
535368
535832
  init_I18nContext();
535369
535833
  init_ThemeContext();
@@ -535404,6 +535868,7 @@ var init_ChatScreen = __esm({
535404
535868
  init_codebaseConfig();
535405
535869
  init_codebaseSearchEvents();
535406
535870
  init_logger();
535871
+ PermissionsPanel2 = (0, import_react128.lazy)(() => init_PermissionsPanel().then(() => PermissionsPanel_exports));
535407
535872
  }
535408
535873
  });
535409
535874
 
@@ -535617,16 +536082,17 @@ ${warningColor}\u26A0 Tool Confirmation Required${resetColor} ${sensitiveCheck.i
535617
536082
  });
535618
536083
  }
535619
536084
  function HeadlessModeScreen({ prompt, onComplete }) {
535620
- const [messages, setMessages] = (0, import_react128.useState)([]);
535621
- const [isComplete, setIsComplete] = (0, import_react128.useState)(false);
535622
- const [lastDisplayedIndex, setLastDisplayedIndex] = (0, import_react128.useState)(-1);
535623
- const [isWaitingForInput, setIsWaitingForInput] = (0, import_react128.useState)(false);
536085
+ const [messages, setMessages] = (0, import_react129.useState)([]);
536086
+ const [isComplete, setIsComplete] = (0, import_react129.useState)(false);
536087
+ const [lastDisplayedIndex, setLastDisplayedIndex] = (0, import_react129.useState)(-1);
536088
+ const [isWaitingForInput, setIsWaitingForInput] = (0, import_react129.useState)(false);
535624
536089
  const { stdout } = use_stdout_default();
536090
+ const workingDirectory = process.cwd();
535625
536091
  const streamingState = useStreamingState();
535626
536092
  const vscodeState = useVSCodeState();
535627
536093
  const { saveMessage } = useSessionSave();
535628
- const { isToolAutoApproved, addMultipleToAlwaysApproved } = useToolConfirmation();
535629
- (0, import_react128.useEffect)(() => {
536094
+ const { isToolAutoApproved, addMultipleToAlwaysApproved } = useToolConfirmation(workingDirectory);
536095
+ (0, import_react129.useEffect)(() => {
535630
536096
  const lastMessage = messages[messages.length - 1];
535631
536097
  const currentIndex = messages.length - 1;
535632
536098
  if (!lastMessage || currentIndex <= lastDisplayedIndex)
@@ -535678,7 +536144,7 @@ function HeadlessModeScreen({ prompt, onComplete }) {
535678
536144
  }
535679
536145
  }
535680
536146
  }, [messages, lastDisplayedIndex]);
535681
- (0, import_react128.useEffect)(() => {
536147
+ (0, import_react129.useEffect)(() => {
535682
536148
  if (isWaitingForInput)
535683
536149
  return;
535684
536150
  if (streamingState.isStreaming) {
@@ -535795,19 +536261,19 @@ function HeadlessModeScreen({ prompt, onComplete }) {
535795
536261
  }, 1e3);
535796
536262
  }
535797
536263
  };
535798
- (0, import_react128.useEffect)(() => {
536264
+ (0, import_react129.useEffect)(() => {
535799
536265
  processMessage();
535800
536266
  }, []);
535801
536267
  if (isComplete) {
535802
536268
  return null;
535803
536269
  }
535804
- return import_react128.default.createElement(import_react128.default.Fragment, null);
536270
+ return import_react129.default.createElement(import_react129.default.Fragment, null);
535805
536271
  }
535806
- var import_react128, import_cli_highlight3, getTheme, getAnsiColor;
536272
+ var import_react129, import_cli_highlight3, getTheme, getAnsiColor;
535807
536273
  var init_HeadlessModeScreen = __esm({
535808
536274
  async "dist/ui/pages/HeadlessModeScreen.js"() {
535809
536275
  "use strict";
535810
- import_react128 = __toESM(require_react(), 1);
536276
+ import_react129 = __toESM(require_react(), 1);
535811
536277
  await init_build2();
535812
536278
  init_ansi_escapes();
535813
536279
  import_cli_highlight3 = __toESM(require_dist14(), 1);
@@ -536078,18 +536544,18 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536078
536544
  var _a21;
536079
536545
  const { theme: theme14 } = useTheme();
536080
536546
  const { t } = useI18n();
536081
- const [tasks, setTasks] = (0, import_react129.useState)([]);
536082
- const [selectedIndex, setSelectedIndex] = (0, import_react129.useState)(0);
536083
- const [scrollOffset, setScrollOffset] = (0, import_react129.useState)(0);
536084
- const [markedTasks, setMarkedTasks] = (0, import_react129.useState)(/* @__PURE__ */ new Set());
536085
- const [isLoading, setIsLoading] = (0, import_react129.useState)(true);
536086
- const [viewMode, setViewMode] = (0, import_react129.useState)("list");
536087
- const [detailTask, setDetailTask] = (0, import_react129.useState)(null);
536088
- const [pendingAction, setPendingAction] = (0, import_react129.useState)(null);
536089
- const [rejectInputMode, setRejectInputMode] = (0, import_react129.useState)(false);
536090
- const [rejectReason, setRejectReason] = (0, import_react129.useState)("");
536547
+ const [tasks, setTasks] = (0, import_react130.useState)([]);
536548
+ const [selectedIndex, setSelectedIndex] = (0, import_react130.useState)(0);
536549
+ const [scrollOffset, setScrollOffset] = (0, import_react130.useState)(0);
536550
+ const [markedTasks, setMarkedTasks] = (0, import_react130.useState)(/* @__PURE__ */ new Set());
536551
+ const [isLoading, setIsLoading] = (0, import_react130.useState)(true);
536552
+ const [viewMode, setViewMode] = (0, import_react130.useState)("list");
536553
+ const [detailTask, setDetailTask] = (0, import_react130.useState)(null);
536554
+ const [pendingAction, setPendingAction] = (0, import_react130.useState)(null);
536555
+ const [rejectInputMode, setRejectInputMode] = (0, import_react130.useState)(false);
536556
+ const [rejectReason, setRejectReason] = (0, import_react130.useState)("");
536091
536557
  const VISIBLE_ITEMS = 5;
536092
- const loadTasks = (0, import_react129.useCallback)(async () => {
536558
+ const loadTasks = (0, import_react130.useCallback)(async () => {
536093
536559
  setIsLoading(true);
536094
536560
  try {
536095
536561
  const taskList = await taskManager.listTasks();
@@ -536101,10 +536567,10 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536101
536567
  setIsLoading(false);
536102
536568
  }
536103
536569
  }, []);
536104
- (0, import_react129.useEffect)(() => {
536570
+ (0, import_react130.useEffect)(() => {
536105
536571
  void loadTasks();
536106
536572
  }, [loadTasks]);
536107
- (0, import_react129.useEffect)(() => {
536573
+ (0, import_react130.useEffect)(() => {
536108
536574
  if (pendingAction) {
536109
536575
  const timer2 = setTimeout(() => {
536110
536576
  setPendingAction(null);
@@ -536113,7 +536579,7 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536113
536579
  }
536114
536580
  return void 0;
536115
536581
  }, [pendingAction]);
536116
- const handleDeleteTask = (0, import_react129.useCallback)(async (taskId) => {
536582
+ const handleDeleteTask = (0, import_react130.useCallback)(async (taskId) => {
536117
536583
  if (!taskId)
536118
536584
  return;
536119
536585
  const success = await taskManager.deleteTask(taskId);
@@ -536308,7 +536774,7 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536308
536774
  return;
536309
536775
  }
536310
536776
  });
536311
- const getStatusColor = (0, import_react129.useCallback)((status) => {
536777
+ const getStatusColor = (0, import_react130.useCallback)((status) => {
536312
536778
  switch (status) {
536313
536779
  case "pending":
536314
536780
  return "yellow";
@@ -536324,7 +536790,7 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536324
536790
  return "gray";
536325
536791
  }
536326
536792
  }, []);
536327
- const getStatusIcon = (0, import_react129.useCallback)((status) => {
536793
+ const getStatusIcon = (0, import_react130.useCallback)((status) => {
536328
536794
  switch (status) {
536329
536795
  case "pending":
536330
536796
  return "\u25CB";
@@ -536340,7 +536806,7 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536340
536806
  return "?";
536341
536807
  }
536342
536808
  }, []);
536343
- const formatDate = (0, import_react129.useCallback)((timestamp) => {
536809
+ const formatDate = (0, import_react130.useCallback)((timestamp) => {
536344
536810
  const date = new Date(timestamp);
536345
536811
  const now = /* @__PURE__ */ new Date();
536346
536812
  const diffMs = now.getTime() - date.getTime();
@@ -536358,24 +536824,24 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536358
536824
  return date.toLocaleDateString("en-US", { month: "short", day: "numeric" });
536359
536825
  }, []);
536360
536826
  if (isLoading) {
536361
- return import_react129.default.createElement(
536827
+ return import_react130.default.createElement(
536362
536828
  Box_default,
536363
536829
  { flexDirection: "column", paddingX: 1 },
536364
- import_react129.default.createElement(
536830
+ import_react130.default.createElement(
536365
536831
  Box_default,
536366
536832
  { borderStyle: "round", borderColor: theme14.colors.menuInfo, paddingX: 1 },
536367
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.loadingTasks)
536833
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.loadingTasks)
536368
536834
  )
536369
536835
  );
536370
536836
  }
536371
536837
  if (tasks.length === 0) {
536372
- return import_react129.default.createElement(
536838
+ return import_react130.default.createElement(
536373
536839
  Box_default,
536374
536840
  { flexDirection: "column", paddingX: 1 },
536375
- import_react129.default.createElement(
536841
+ import_react130.default.createElement(
536376
536842
  Box_default,
536377
536843
  { borderStyle: "round", borderColor: theme14.colors.warning, paddingX: 1 },
536378
- import_react129.default.createElement(
536844
+ import_react130.default.createElement(
536379
536845
  Text,
536380
536846
  { color: theme14.colors.menuSecondary, dimColor: true },
536381
536847
  t.taskManager.noTasksFound,
@@ -536389,32 +536855,32 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536389
536855
  );
536390
536856
  }
536391
536857
  if (viewMode === "detail" && detailTask) {
536392
- return import_react129.default.createElement(
536858
+ return import_react130.default.createElement(
536393
536859
  Box_default,
536394
536860
  { flexDirection: "column", paddingX: 1 },
536395
- import_react129.default.createElement(
536861
+ import_react130.default.createElement(
536396
536862
  Box_default,
536397
536863
  { borderStyle: "round", borderColor: theme14.colors.menuInfo, paddingX: 1, flexDirection: "column" },
536398
- import_react129.default.createElement(
536864
+ import_react130.default.createElement(
536399
536865
  Box_default,
536400
536866
  { flexDirection: "column", marginBottom: 1 },
536401
- import_react129.default.createElement(Text, { color: theme14.colors.menuInfo, bold: true }, t.taskManager.taskDetailsTitle),
536402
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, detailTask.status === "paused" ? t.taskManager.backToList : `${t.taskManager.continueHint} \u2022 ${t.taskManager.backToList}`)
536867
+ import_react130.default.createElement(Text, { color: theme14.colors.menuInfo, bold: true }, t.taskManager.taskDetailsTitle),
536868
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, detailTask.status === "paused" ? t.taskManager.backToList : `${t.taskManager.continueHint} \u2022 ${t.taskManager.backToList}`)
536403
536869
  ),
536404
- import_react129.default.createElement(
536870
+ import_react130.default.createElement(
536405
536871
  Box_default,
536406
536872
  { flexDirection: "column", gap: 1 },
536407
- import_react129.default.createElement(
536873
+ import_react130.default.createElement(
536408
536874
  Box_default,
536409
536875
  { flexDirection: "column" },
536410
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.titleLabel),
536411
- import_react129.default.createElement(Text, null, detailTask.title || t.taskManager.untitled)
536876
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.titleLabel),
536877
+ import_react130.default.createElement(Text, null, detailTask.title || t.taskManager.untitled)
536412
536878
  ),
536413
- import_react129.default.createElement(
536879
+ import_react130.default.createElement(
536414
536880
  Box_default,
536415
536881
  { flexDirection: "column" },
536416
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.statusLabel),
536417
- import_react129.default.createElement(
536882
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.statusLabel),
536883
+ import_react130.default.createElement(
536418
536884
  Text,
536419
536885
  { color: getStatusColor(detailTask.status) },
536420
536886
  getStatusIcon(detailTask.status),
@@ -536422,64 +536888,64 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536422
536888
  detailTask.status
536423
536889
  )
536424
536890
  ),
536425
- import_react129.default.createElement(
536891
+ import_react130.default.createElement(
536426
536892
  Box_default,
536427
536893
  { flexDirection: "column" },
536428
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.createdLabel),
536429
- import_react129.default.createElement(Text, null, new Date(detailTask.createdAt).toLocaleString())
536894
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.createdLabel),
536895
+ import_react130.default.createElement(Text, null, new Date(detailTask.createdAt).toLocaleString())
536430
536896
  ),
536431
- import_react129.default.createElement(
536897
+ import_react130.default.createElement(
536432
536898
  Box_default,
536433
536899
  { flexDirection: "column" },
536434
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.updatedLabel),
536435
- import_react129.default.createElement(Text, null, new Date(detailTask.updatedAt).toLocaleString())
536900
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.updatedLabel),
536901
+ import_react130.default.createElement(Text, null, new Date(detailTask.updatedAt).toLocaleString())
536436
536902
  ),
536437
- import_react129.default.createElement(
536903
+ import_react130.default.createElement(
536438
536904
  Box_default,
536439
536905
  { flexDirection: "column" },
536440
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.messagesLabel.replace("{count}", String(detailTask.messages.length)))
536906
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.taskManager.messagesLabel.replace("{count}", String(detailTask.messages.length)))
536441
536907
  ),
536442
- detailTask.status === "paused" && ((_a21 = detailTask.pausedInfo) == null ? void 0 : _a21.sensitiveCommand) && import_react129.default.createElement(
536908
+ detailTask.status === "paused" && ((_a21 = detailTask.pausedInfo) == null ? void 0 : _a21.sensitiveCommand) && import_react130.default.createElement(
536443
536909
  Box_default,
536444
536910
  { flexDirection: "column", marginTop: 1 },
536445
- import_react129.default.createElement(
536911
+ import_react130.default.createElement(
536446
536912
  Box_default,
536447
536913
  { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, paddingY: 1 },
536448
- import_react129.default.createElement(Text, { color: "yellow", bold: true }, t.taskManager.sensitiveCommandDetected),
536449
- import_react129.default.createElement(
536914
+ import_react130.default.createElement(Text, { color: "yellow", bold: true }, t.taskManager.sensitiveCommandDetected),
536915
+ import_react130.default.createElement(
536450
536916
  Box_default,
536451
536917
  { marginTop: 1 },
536452
- import_react129.default.createElement(
536918
+ import_react130.default.createElement(
536453
536919
  Text,
536454
536920
  null,
536455
- import_react129.default.createElement(Text, { bold: true }, t.taskManager.commandLabel),
536456
- import_react129.default.createElement(Text, { color: "yellow" }, detailTask.pausedInfo.sensitiveCommand.command)
536921
+ import_react130.default.createElement(Text, { bold: true }, t.taskManager.commandLabel),
536922
+ import_react130.default.createElement(Text, { color: "yellow" }, detailTask.pausedInfo.sensitiveCommand.command)
536457
536923
  )
536458
536924
  ),
536459
- detailTask.pausedInfo.sensitiveCommand.description && import_react129.default.createElement(Text, { dimColor: true }, detailTask.pausedInfo.sensitiveCommand.description),
536460
- !rejectInputMode ? import_react129.default.createElement(
536925
+ detailTask.pausedInfo.sensitiveCommand.description && import_react130.default.createElement(Text, { dimColor: true }, detailTask.pausedInfo.sensitiveCommand.description),
536926
+ !rejectInputMode ? import_react130.default.createElement(
536461
536927
  Box_default,
536462
536928
  { marginTop: 1, paddingTop: 1, borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: "gray", flexDirection: "column" },
536463
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.approveRejectHint)
536464
- ) : import_react129.default.createElement(
536929
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.approveRejectHint)
536930
+ ) : import_react130.default.createElement(
536465
536931
  Box_default,
536466
536932
  { marginTop: 1, paddingTop: 1, borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: "gray", flexDirection: "column" },
536467
- import_react129.default.createElement(Text, { color: "yellow", bold: true }, t.taskManager.enterRejectionReason),
536468
- import_react129.default.createElement(
536933
+ import_react130.default.createElement(Text, { color: "yellow", bold: true }, t.taskManager.enterRejectionReason),
536934
+ import_react130.default.createElement(
536469
536935
  Text,
536470
536936
  null,
536471
536937
  rejectReason,
536472
- import_react129.default.createElement(Text, { color: theme14.colors.menuInfo }, "\u2588")
536938
+ import_react130.default.createElement(Text, { color: theme14.colors.menuInfo }, "\u2588")
536473
536939
  ),
536474
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.submitCancelHint)
536940
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.submitCancelHint)
536475
536941
  )
536476
536942
  )
536477
536943
  )
536478
536944
  ),
536479
- (pendingAction == null ? void 0 : pendingAction.type) === "continue" && pendingAction.taskId === detailTask.id && import_react129.default.createElement(
536945
+ (pendingAction == null ? void 0 : pendingAction.type) === "continue" && pendingAction.taskId === detailTask.id && import_react130.default.createElement(
536480
536946
  Box_default,
536481
536947
  { marginTop: 1 },
536482
- import_react129.default.createElement(Alert, { variant: "warning" }, detailTask.status !== "completed" ? t.taskManager.taskNotCompleted : t.taskManager.confirmConvertToSession)
536948
+ import_react130.default.createElement(Alert, { variant: "warning" }, detailTask.status !== "completed" ? t.taskManager.taskNotCompleted : t.taskManager.confirmConvertToSession)
536483
536949
  )
536484
536950
  )
536485
536951
  );
@@ -536488,21 +536954,21 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536488
536954
  const hasMore = tasks.length > scrollOffset + VISIBLE_ITEMS;
536489
536955
  const hasPrevious = scrollOffset > 0;
536490
536956
  const currentTask = tasks[selectedIndex];
536491
- return import_react129.default.createElement(
536957
+ return import_react130.default.createElement(
536492
536958
  Box_default,
536493
536959
  { flexDirection: "column", paddingX: 1 },
536494
- import_react129.default.createElement(
536960
+ import_react130.default.createElement(
536495
536961
  Box_default,
536496
536962
  { borderStyle: "round", borderColor: theme14.colors.menuInfo, paddingX: 1, flexDirection: "column" },
536497
- import_react129.default.createElement(
536963
+ import_react130.default.createElement(
536498
536964
  Box_default,
536499
536965
  { flexDirection: "column" },
536500
- import_react129.default.createElement(
536966
+ import_react130.default.createElement(
536501
536967
  Text,
536502
536968
  { color: theme14.colors.menuInfo, dimColor: true },
536503
536969
  t.taskManager.tasksCount.replace("{current}", String(selectedIndex + 1)).replace("{total}", String(tasks.length)),
536504
536970
  currentTask && ` \u2022 ${t.taskManager.messagesCount.replace("{count}", String(currentTask.messageCount))}`,
536505
- markedTasks.size > 0 && import_react129.default.createElement(
536971
+ markedTasks.size > 0 && import_react130.default.createElement(
536506
536972
  Text,
536507
536973
  { color: theme14.colors.warning },
536508
536974
  " ",
@@ -536511,9 +536977,9 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536511
536977
  t.taskManager.markedCount.replace("{count}", String(markedTasks.size))
536512
536978
  )
536513
536979
  ),
536514
- import_react129.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.navigationHint)
536980
+ import_react130.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.taskManager.navigationHint)
536515
536981
  ),
536516
- hasPrevious && import_react129.default.createElement(
536982
+ hasPrevious && import_react130.default.createElement(
536517
536983
  Text,
536518
536984
  { color: theme14.colors.menuSecondary, dimColor: true },
536519
536985
  " ",
@@ -536526,24 +536992,24 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536526
536992
  const cleanTitle = (task.title || t.taskManager.untitled).replace(/[\r\n\t]+/g, " ");
536527
536993
  const timeStr = formatDate(task.updatedAt);
536528
536994
  const truncatedTitle = cleanTitle.length > 50 ? cleanTitle.slice(0, 47) + "..." : cleanTitle;
536529
- return import_react129.default.createElement(
536995
+ return import_react130.default.createElement(
536530
536996
  Text,
536531
536997
  { key: task.id },
536532
- import_react129.default.createElement(
536998
+ import_react130.default.createElement(
536533
536999
  Text,
536534
537000
  { color: isSelected ? theme14.colors.menuSelected : "white" },
536535
537001
  isSelected ? "\u276F " : " ",
536536
- isMarked && import_react129.default.createElement(
537002
+ isMarked && import_react130.default.createElement(
536537
537003
  Text,
536538
537004
  { color: theme14.colors.warning, bold: true },
536539
537005
  "\u25CF",
536540
537006
  " "
536541
537007
  ),
536542
- import_react129.default.createElement(Text, { color: getStatusColor(task.status) }, getStatusIcon(task.status)),
537008
+ import_react130.default.createElement(Text, { color: getStatusColor(task.status) }, getStatusIcon(task.status)),
536543
537009
  " ",
536544
537010
  truncatedTitle
536545
537011
  ),
536546
- import_react129.default.createElement(
537012
+ import_react130.default.createElement(
536547
537013
  Text,
536548
537014
  { color: theme14.colors.menuSecondary, dimColor: true },
536549
537015
  " ",
@@ -536552,25 +537018,25 @@ function TaskManagerScreen({ onBack, onResumeTask }) {
536552
537018
  )
536553
537019
  );
536554
537020
  }),
536555
- hasMore && import_react129.default.createElement(
537021
+ hasMore && import_react130.default.createElement(
536556
537022
  Text,
536557
537023
  { color: theme14.colors.menuSecondary, dimColor: true },
536558
537024
  " ",
536559
537025
  t.taskManager.moreBelow.replace("{count}", String(tasks.length - scrollOffset - VISIBLE_ITEMS))
536560
537026
  )
536561
537027
  ),
536562
- (pendingAction == null ? void 0 : pendingAction.type) === "delete" && import_react129.default.createElement(
537028
+ (pendingAction == null ? void 0 : pendingAction.type) === "delete" && import_react130.default.createElement(
536563
537029
  Box_default,
536564
537030
  { marginTop: 1 },
536565
- import_react129.default.createElement(Alert, { variant: "warning" }, pendingAction.taskId ? t.taskManager.deleteConfirm : t.taskManager.deleteMultipleConfirm.replace("{count}", String(markedTasks.size)))
537031
+ import_react130.default.createElement(Alert, { variant: "warning" }, pendingAction.taskId ? t.taskManager.deleteConfirm : t.taskManager.deleteMultipleConfirm.replace("{count}", String(markedTasks.size)))
536566
537032
  )
536567
537033
  );
536568
537034
  }
536569
- var import_react129;
537035
+ var import_react130;
536570
537036
  var init_TaskManagerScreen = __esm({
536571
537037
  async "dist/ui/pages/TaskManagerScreen.js"() {
536572
537038
  "use strict";
536573
- import_react129 = __toESM(require_react(), 1);
537039
+ import_react130 = __toESM(require_react(), 1);
536574
537040
  await init_build2();
536575
537041
  await init_build4();
536576
537042
  init_ThemeContext();
@@ -536585,8 +537051,8 @@ __export(MCPConfigScreen_exports, {
536585
537051
  default: () => MCPConfigScreen
536586
537052
  });
536587
537053
  import { spawn as spawn6, execSync as execSync5 } from "child_process";
536588
- import { writeFileSync as writeFileSync11, readFileSync as readFileSync17, existsSync as existsSync22 } from "fs";
536589
- import { join as join25 } from "path";
537054
+ import { writeFileSync as writeFileSync12, readFileSync as readFileSync18, existsSync as existsSync23 } from "fs";
537055
+ import { join as join26 } from "path";
536590
537056
  import { homedir as homedir16, platform as platform4 } from "os";
536591
537057
  function checkCommandExists2(command) {
536592
537058
  if (platform4() === "win32") {
@@ -536638,10 +537104,10 @@ function getSystemEditor() {
536638
537104
  }
536639
537105
  function MCPConfigScreen({ onBack }) {
536640
537106
  const { exit } = use_app_default();
536641
- (0, import_react130.useEffect)(() => {
537107
+ (0, import_react131.useEffect)(() => {
536642
537108
  const openEditor = async () => {
536643
537109
  const config3 = getMCPConfig();
536644
- writeFileSync11(MCP_CONFIG_FILE2, JSON.stringify(config3, null, 2), "utf8");
537110
+ writeFileSync12(MCP_CONFIG_FILE2, JSON.stringify(config3, null, 2), "utf8");
536645
537111
  const editor = getSystemEditor();
536646
537112
  if (!editor) {
536647
537113
  console.error("No text editor found! Please set the EDITOR or VISUAL environment variable.");
@@ -536673,9 +537139,9 @@ function MCPConfigScreen({ onBack }) {
536673
537139
  stdio: "inherit"
536674
537140
  });
536675
537141
  child.on("close", () => {
536676
- if (existsSync22(MCP_CONFIG_FILE2)) {
537142
+ if (existsSync23(MCP_CONFIG_FILE2)) {
536677
537143
  try {
536678
- const editedContent = readFileSync17(MCP_CONFIG_FILE2, "utf8");
537144
+ const editedContent = readFileSync18(MCP_CONFIG_FILE2, "utf8");
536679
537145
  const parsedConfig = JSON.parse(editedContent);
536680
537146
  const validationErrors = validateMCPConfig(parsedConfig);
536681
537147
  if (validationErrors.length === 0) {
@@ -536698,16 +537164,16 @@ function MCPConfigScreen({ onBack }) {
536698
537164
  }, [exit, onBack]);
536699
537165
  return null;
536700
537166
  }
536701
- var import_react130, CONFIG_DIR8, MCP_CONFIG_FILE2;
537167
+ var import_react131, CONFIG_DIR8, MCP_CONFIG_FILE2;
536702
537168
  var init_MCPConfigScreen = __esm({
536703
537169
  async "dist/ui/pages/MCPConfigScreen.js"() {
536704
537170
  "use strict";
536705
- import_react130 = __toESM(require_react(), 1);
537171
+ import_react131 = __toESM(require_react(), 1);
536706
537172
  await init_build2();
536707
537173
  init_apiConfig();
536708
537174
  init_processManager();
536709
- CONFIG_DIR8 = join25(homedir16(), ".snow");
536710
- MCP_CONFIG_FILE2 = join25(CONFIG_DIR8, "mcp-config.json");
537175
+ CONFIG_DIR8 = join26(homedir16(), ".snow");
537176
+ MCP_CONFIG_FILE2 = join26(CONFIG_DIR8, "mcp-config.json");
536711
537177
  }
536712
537178
  });
536713
537179
 
@@ -536717,9 +537183,9 @@ __export(app_exports, {
536717
537183
  default: () => App2
536718
537184
  });
536719
537185
  function ShowTaskListWrapper() {
536720
- const [currentView, setCurrentView] = (0, import_react131.useState)("tasks");
536721
- const [chatScreenKey, setChatScreenKey] = (0, import_react131.useState)(0);
536722
- const [exitNotification, setExitNotification] = (0, import_react131.useState)({
537186
+ const [currentView, setCurrentView] = (0, import_react132.useState)("tasks");
537187
+ const [chatScreenKey, setChatScreenKey] = (0, import_react132.useState)(0);
537188
+ const [exitNotification, setExitNotification] = (0, import_react132.useState)({
536723
537189
  show: false,
536724
537190
  message: ""
536725
537191
  });
@@ -536728,44 +537194,44 @@ function ShowTaskListWrapper() {
536728
537194
  useGlobalExit(setExitNotification);
536729
537195
  const renderView = () => {
536730
537196
  if (currentView === "chat") {
536731
- return import_react131.default.createElement(
536732
- import_react131.Suspense,
537197
+ return import_react132.default.createElement(
537198
+ import_react132.Suspense,
536733
537199
  { fallback: loadingFallback },
536734
- import_react131.default.createElement(ChatScreen2, { key: chatScreenKey, autoResume: true, enableYolo: false })
537200
+ import_react132.default.createElement(ChatScreen2, { key: chatScreenKey, autoResume: true, enableYolo: false })
536735
537201
  );
536736
537202
  }
536737
- return import_react131.default.createElement(
536738
- import_react131.Suspense,
537203
+ return import_react132.default.createElement(
537204
+ import_react132.Suspense,
536739
537205
  { fallback: loadingFallback },
536740
- import_react131.default.createElement(TaskManagerScreen2, { onBack: () => gracefulExit(), onResumeTask: () => {
537206
+ import_react132.default.createElement(TaskManagerScreen2, { onBack: () => gracefulExit(), onResumeTask: () => {
536741
537207
  setCurrentView("chat");
536742
537208
  setChatScreenKey((prev) => prev + 1);
536743
537209
  } })
536744
537210
  );
536745
537211
  };
536746
- return import_react131.default.createElement(
537212
+ return import_react132.default.createElement(
536747
537213
  Box_default,
536748
537214
  { flexDirection: "column", width: terminalWidth },
536749
537215
  renderView(),
536750
- exitNotification.show && import_react131.default.createElement(
537216
+ exitNotification.show && import_react132.default.createElement(
536751
537217
  Box_default,
536752
537218
  { paddingX: 1, flexShrink: 0 },
536753
- import_react131.default.createElement(Alert, { variant: "warning" }, exitNotification.message)
537219
+ import_react132.default.createElement(Alert, { variant: "warning" }, exitNotification.message)
536754
537220
  )
536755
537221
  );
536756
537222
  }
536757
537223
  function AppContent({ version: version2, skipWelcome, autoResume, enableYolo }) {
536758
- const [currentView, setCurrentView] = (0, import_react131.useState)(skipWelcome ? "chat" : "welcome");
536759
- const [chatScreenKey, setChatScreenKey] = (0, import_react131.useState)(0);
536760
- const [welcomeMenuIndex, setWelcomeMenuIndex] = (0, import_react131.useState)(0);
536761
- const [shouldAutoResume, setShouldAutoResume] = (0, import_react131.useState)(false);
536762
- const [exitNotification, setExitNotification] = (0, import_react131.useState)({
537224
+ const [currentView, setCurrentView] = (0, import_react132.useState)(skipWelcome ? "chat" : "welcome");
537225
+ const [chatScreenKey, setChatScreenKey] = (0, import_react132.useState)(0);
537226
+ const [welcomeMenuIndex, setWelcomeMenuIndex] = (0, import_react132.useState)(0);
537227
+ const [shouldAutoResume, setShouldAutoResume] = (0, import_react132.useState)(false);
537228
+ const [exitNotification, setExitNotification] = (0, import_react132.useState)({
536763
537229
  show: false,
536764
537230
  message: ""
536765
537231
  });
536766
537232
  const { columns: terminalWidth } = useTerminalSize();
536767
537233
  useGlobalExit(setExitNotification);
536768
- (0, import_react131.useEffect)(() => {
537234
+ (0, import_react132.useEffect)(() => {
536769
537235
  const unsubscribe = onNavigate((event) => {
536770
537236
  if (event.destination === "welcome" && currentView === "chat") {
536771
537237
  setChatScreenKey((prev) => prev + 1);
@@ -536793,113 +537259,113 @@ function AppContent({ version: version2, skipWelcome, autoResume, enableYolo })
536793
537259
  const loadingFallback = null;
536794
537260
  switch (currentView) {
536795
537261
  case "welcome":
536796
- return import_react131.default.createElement(
536797
- import_react131.Suspense,
537262
+ return import_react132.default.createElement(
537263
+ import_react132.Suspense,
536798
537264
  { fallback: loadingFallback },
536799
- import_react131.default.createElement(WelcomeScreen2, { version: version2, onMenuSelect: handleMenuSelect, defaultMenuIndex: welcomeMenuIndex, onMenuSelectionPersist: setWelcomeMenuIndex })
537265
+ import_react132.default.createElement(WelcomeScreen2, { version: version2, onMenuSelect: handleMenuSelect, defaultMenuIndex: welcomeMenuIndex, onMenuSelectionPersist: setWelcomeMenuIndex })
536800
537266
  );
536801
537267
  case "chat":
536802
- return import_react131.default.createElement(
536803
- import_react131.Suspense,
537268
+ return import_react132.default.createElement(
537269
+ import_react132.Suspense,
536804
537270
  { fallback: loadingFallback },
536805
- import_react131.default.createElement(ChatScreen2, { key: chatScreenKey, autoResume: autoResume || shouldAutoResume, enableYolo })
537271
+ import_react132.default.createElement(ChatScreen2, { key: chatScreenKey, autoResume: autoResume || shouldAutoResume, enableYolo })
536806
537272
  );
536807
537273
  case "settings":
536808
- return import_react131.default.createElement(
537274
+ return import_react132.default.createElement(
536809
537275
  Box_default,
536810
537276
  { flexDirection: "column" },
536811
- import_react131.default.createElement(Text, { color: "blue" }, "Settings"),
536812
- import_react131.default.createElement(Text, { color: "gray" }, "Settings interface would be implemented here")
537277
+ import_react132.default.createElement(Text, { color: "blue" }, "Settings"),
537278
+ import_react132.default.createElement(Text, { color: "gray" }, "Settings interface would be implemented here")
536813
537279
  );
536814
537280
  case "mcp":
536815
- return import_react131.default.createElement(
536816
- import_react131.Suspense,
537281
+ return import_react132.default.createElement(
537282
+ import_react132.Suspense,
536817
537283
  { fallback: loadingFallback },
536818
- import_react131.default.createElement(MCPConfigScreen2, { onBack: () => setCurrentView("welcome"), onSave: () => setCurrentView("welcome") })
537284
+ import_react132.default.createElement(MCPConfigScreen2, { onBack: () => setCurrentView("welcome"), onSave: () => setCurrentView("welcome") })
536819
537285
  );
536820
537286
  case "systemprompt":
536821
- return import_react131.default.createElement(
536822
- import_react131.Suspense,
537287
+ return import_react132.default.createElement(
537288
+ import_react132.Suspense,
536823
537289
  { fallback: loadingFallback },
536824
- import_react131.default.createElement(SystemPromptConfigScreen3, { onBack: () => setCurrentView("welcome") })
537290
+ import_react132.default.createElement(SystemPromptConfigScreen3, { onBack: () => setCurrentView("welcome") })
536825
537291
  );
536826
537292
  case "customheaders":
536827
- return import_react131.default.createElement(
536828
- import_react131.Suspense,
537293
+ return import_react132.default.createElement(
537294
+ import_react132.Suspense,
536829
537295
  { fallback: loadingFallback },
536830
- import_react131.default.createElement(CustomHeadersScreen3, { onBack: () => setCurrentView("welcome") })
537296
+ import_react132.default.createElement(CustomHeadersScreen3, { onBack: () => setCurrentView("welcome") })
536831
537297
  );
536832
537298
  case "tasks":
536833
- return import_react131.default.createElement(
536834
- import_react131.Suspense,
537299
+ return import_react132.default.createElement(
537300
+ import_react132.Suspense,
536835
537301
  { fallback: loadingFallback },
536836
- import_react131.default.createElement(TaskManagerScreen2, { onBack: () => setCurrentView("welcome"), onResumeTask: () => {
537302
+ import_react132.default.createElement(TaskManagerScreen2, { onBack: () => setCurrentView("welcome"), onResumeTask: () => {
536837
537303
  setCurrentView("chat");
536838
537304
  setChatScreenKey((prev) => prev + 1);
536839
537305
  } })
536840
537306
  );
536841
537307
  default:
536842
- return import_react131.default.createElement(
536843
- import_react131.Suspense,
537308
+ return import_react132.default.createElement(
537309
+ import_react132.Suspense,
536844
537310
  { fallback: loadingFallback },
536845
- import_react131.default.createElement(WelcomeScreen2, { version: version2, onMenuSelect: handleMenuSelect, defaultMenuIndex: welcomeMenuIndex, onMenuSelectionPersist: setWelcomeMenuIndex })
537311
+ import_react132.default.createElement(WelcomeScreen2, { version: version2, onMenuSelect: handleMenuSelect, defaultMenuIndex: welcomeMenuIndex, onMenuSelectionPersist: setWelcomeMenuIndex })
536846
537312
  );
536847
537313
  }
536848
537314
  };
536849
- return import_react131.default.createElement(
537315
+ return import_react132.default.createElement(
536850
537316
  Box_default,
536851
537317
  { flexDirection: "column", width: terminalWidth },
536852
537318
  renderView(),
536853
- exitNotification.show && import_react131.default.createElement(
537319
+ exitNotification.show && import_react132.default.createElement(
536854
537320
  Box_default,
536855
537321
  { paddingX: 1, flexShrink: 0 },
536856
- import_react131.default.createElement(Alert, { variant: "warning" }, exitNotification.message)
537322
+ import_react132.default.createElement(Alert, { variant: "warning" }, exitNotification.message)
536857
537323
  )
536858
537324
  );
536859
537325
  }
536860
537326
  function App2({ version: version2, skipWelcome, autoResume, headlessPrompt, showTaskList, enableYolo }) {
536861
537327
  if (headlessPrompt) {
536862
537328
  const loadingFallback = null;
536863
- return import_react131.default.createElement(
537329
+ return import_react132.default.createElement(
536864
537330
  I18nProvider,
536865
537331
  null,
536866
- import_react131.default.createElement(
537332
+ import_react132.default.createElement(
536867
537333
  ThemeProvider,
536868
537334
  null,
536869
- import_react131.default.createElement(
536870
- import_react131.Suspense,
537335
+ import_react132.default.createElement(
537336
+ import_react132.Suspense,
536871
537337
  { fallback: loadingFallback },
536872
- import_react131.default.createElement(HeadlessModeScreen2, { prompt: headlessPrompt, onComplete: () => gracefulExit() })
537338
+ import_react132.default.createElement(HeadlessModeScreen2, { prompt: headlessPrompt, onComplete: () => gracefulExit() })
536873
537339
  )
536874
537340
  )
536875
537341
  );
536876
537342
  }
536877
537343
  if (showTaskList) {
536878
- return import_react131.default.createElement(
537344
+ return import_react132.default.createElement(
536879
537345
  I18nProvider,
536880
537346
  null,
536881
- import_react131.default.createElement(
537347
+ import_react132.default.createElement(
536882
537348
  ThemeProvider,
536883
537349
  null,
536884
- import_react131.default.createElement(ShowTaskListWrapper, null)
537350
+ import_react132.default.createElement(ShowTaskListWrapper, null)
536885
537351
  )
536886
537352
  );
536887
537353
  }
536888
- return import_react131.default.createElement(
537354
+ return import_react132.default.createElement(
536889
537355
  I18nProvider,
536890
537356
  null,
536891
- import_react131.default.createElement(
537357
+ import_react132.default.createElement(
536892
537358
  ThemeProvider,
536893
537359
  null,
536894
- import_react131.default.createElement(AppContent, { version: version2, skipWelcome, autoResume, enableYolo })
537360
+ import_react132.default.createElement(AppContent, { version: version2, skipWelcome, autoResume, enableYolo })
536895
537361
  )
536896
537362
  );
536897
537363
  }
536898
- var import_react131, WelcomeScreen2, ChatScreen2, HeadlessModeScreen2, TaskManagerScreen2, MCPConfigScreen2, SystemPromptConfigScreen3, CustomHeadersScreen3;
537364
+ var import_react132, WelcomeScreen2, ChatScreen2, HeadlessModeScreen2, TaskManagerScreen2, MCPConfigScreen2, SystemPromptConfigScreen3, CustomHeadersScreen3;
536899
537365
  var init_app = __esm({
536900
537366
  async "dist/app.js"() {
536901
537367
  "use strict";
536902
- import_react131 = __toESM(require_react(), 1);
537368
+ import_react132 = __toESM(require_react(), 1);
536903
537369
  await init_build2();
536904
537370
  await init_build4();
536905
537371
  await init_useGlobalExit();
@@ -536909,13 +537375,13 @@ var init_app = __esm({
536909
537375
  init_ThemeContext();
536910
537376
  init_processManager();
536911
537377
  init_apiConfig();
536912
- WelcomeScreen2 = import_react131.default.lazy(() => init_WelcomeScreen().then(() => WelcomeScreen_exports));
536913
- ChatScreen2 = import_react131.default.lazy(() => init_ChatScreen().then(() => ChatScreen_exports));
536914
- HeadlessModeScreen2 = import_react131.default.lazy(() => init_HeadlessModeScreen().then(() => HeadlessModeScreen_exports));
536915
- TaskManagerScreen2 = import_react131.default.lazy(() => init_TaskManagerScreen().then(() => TaskManagerScreen_exports));
536916
- MCPConfigScreen2 = import_react131.default.lazy(() => init_MCPConfigScreen().then(() => MCPConfigScreen_exports));
536917
- SystemPromptConfigScreen3 = import_react131.default.lazy(() => init_SystemPromptConfigScreen().then(() => SystemPromptConfigScreen_exports));
536918
- CustomHeadersScreen3 = import_react131.default.lazy(() => init_CustomHeadersScreen().then(() => CustomHeadersScreen_exports));
537378
+ WelcomeScreen2 = import_react132.default.lazy(() => init_WelcomeScreen().then(() => WelcomeScreen_exports));
537379
+ ChatScreen2 = import_react132.default.lazy(() => init_ChatScreen().then(() => ChatScreen_exports));
537380
+ HeadlessModeScreen2 = import_react132.default.lazy(() => init_HeadlessModeScreen().then(() => HeadlessModeScreen_exports));
537381
+ TaskManagerScreen2 = import_react132.default.lazy(() => init_TaskManagerScreen().then(() => TaskManagerScreen_exports));
537382
+ MCPConfigScreen2 = import_react132.default.lazy(() => init_MCPConfigScreen().then(() => MCPConfigScreen_exports));
537383
+ SystemPromptConfigScreen3 = import_react132.default.lazy(() => init_SystemPromptConfigScreen().then(() => SystemPromptConfigScreen_exports));
537384
+ CustomHeadersScreen3 = import_react132.default.lazy(() => init_CustomHeadersScreen().then(() => CustomHeadersScreen_exports));
536919
537385
  }
536920
537386
  });
536921
537387
 
@@ -536926,17 +537392,17 @@ __export(taskExecutor_exports, {
536926
537392
  executeTaskInBackground: () => executeTaskInBackground
536927
537393
  });
536928
537394
  import { spawn as spawn7 } from "child_process";
536929
- import { writeFileSync as writeFileSync12, appendFileSync, existsSync as existsSync23, mkdirSync as mkdirSync11 } from "fs";
536930
- import { join as join26 } from "path";
537395
+ import { writeFileSync as writeFileSync13, appendFileSync, existsSync as existsSync24, mkdirSync as mkdirSync12 } from "fs";
537396
+ import { join as join27 } from "path";
536931
537397
  import { homedir as homedir17 } from "os";
536932
537398
  function ensureLogDir() {
536933
- if (!existsSync23(TASK_LOG_DIR)) {
536934
- mkdirSync11(TASK_LOG_DIR, { recursive: true });
537399
+ if (!existsSync24(TASK_LOG_DIR)) {
537400
+ mkdirSync12(TASK_LOG_DIR, { recursive: true });
536935
537401
  }
536936
537402
  }
536937
537403
  function getLogPath(taskId) {
536938
537404
  ensureLogDir();
536939
- return join26(TASK_LOG_DIR, `${taskId}.log`);
537405
+ return join27(TASK_LOG_DIR, `${taskId}.log`);
536940
537406
  }
536941
537407
  function writeLog(taskId, message) {
536942
537408
  try {
@@ -536951,7 +537417,7 @@ async function executeTaskInBackground(taskId, prompt) {
536951
537417
  const cliPath = process.argv[1] || "";
536952
537418
  const logPath = getLogPath(taskId);
536953
537419
  ensureLogDir();
536954
- writeFileSync12(logPath, `Task ${taskId} execution log
537420
+ writeFileSync13(logPath, `Task ${taskId} execution log
536955
537421
  `, "utf-8");
536956
537422
  writeLog(taskId, `Starting background task with prompt: ${prompt.slice(0, 100)}...`);
536957
537423
  writeLog(taskId, `CLI path: ${cliPath}`);
@@ -537215,12 +537681,12 @@ var init_taskExecutor = __esm({
537215
537681
  "dist/utils/task/taskExecutor.js"() {
537216
537682
  "use strict";
537217
537683
  init_taskManager();
537218
- TASK_LOG_DIR = join26(homedir17(), ".snow", "task-logs");
537684
+ TASK_LOG_DIR = join27(homedir17(), ".snow", "task-logs");
537219
537685
  }
537220
537686
  });
537221
537687
 
537222
537688
  // dist/cli.js
537223
- var import_react132 = __toESM(require_react(), 1);
537689
+ var import_react133 = __toESM(require_react(), 1);
537224
537690
  await init_build2();
537225
537691
  await init_build3();
537226
537692
 
@@ -538003,8 +538469,8 @@ var meow_default = meow;
538003
538469
 
538004
538470
  // dist/cli.js
538005
538471
  import { execSync as execSync6 } from "child_process";
538006
- import { readFileSync as readFileSync18 } from "fs";
538007
- import { join as join27 } from "path";
538472
+ import { readFileSync as readFileSync19 } from "fs";
538473
+ import { join as join28 } from "path";
538008
538474
  import { fileURLToPath as fileURLToPath6 } from "url";
538009
538475
  process.env["FORCE_COLOR"] = "3";
538010
538476
  var MIN_NODE_VERSION = 16;
@@ -538040,7 +538506,7 @@ if (!isQuickCommand) {
538040
538506
  process.stdout.write("\u280B Loading...\r");
538041
538507
  }
538042
538508
  var __dirname2 = fileURLToPath6(new URL(".", import.meta.url));
538043
- var packageJson = JSON.parse(readFileSync18(join27(__dirname2, "../package.json"), "utf-8"));
538509
+ var packageJson = JSON.parse(readFileSync19(join28(__dirname2, "../package.json"), "utf-8"));
538044
538510
  var VERSION2 = packageJson.version;
538045
538511
  async function loadDependencies() {
538046
538512
  await Promise.resolve().then(() => (init_utils(), utils_exports));
@@ -538175,9 +538641,9 @@ if (cli.flags.taskExecute) {
538175
538641
  process.exit(0);
538176
538642
  }
538177
538643
  var Startup = ({ version: version2, skipWelcome, autoResume, headlessPrompt, showTaskList, isDevMode: isDevMode2, enableYolo }) => {
538178
- const [appReady, setAppReady] = import_react132.default.useState(false);
538179
- const [AppComponent, setAppComponent] = import_react132.default.useState(null);
538180
- import_react132.default.useEffect(() => {
538644
+ const [appReady, setAppReady] = import_react133.default.useState(false);
538645
+ const [AppComponent, setAppComponent] = import_react133.default.useState(null);
538646
+ import_react133.default.useEffect(() => {
538181
538647
  let mounted = true;
538182
538648
  const init = async () => {
538183
538649
  const deps = await loadDependencies();
@@ -538222,22 +538688,22 @@ var Startup = ({ version: version2, skipWelcome, autoResume, headlessPrompt, sho
538222
538688
  };
538223
538689
  }, [version2, isDevMode2]);
538224
538690
  if (!appReady || !AppComponent) {
538225
- return import_react132.default.createElement(
538691
+ return import_react133.default.createElement(
538226
538692
  Box_default,
538227
538693
  { flexDirection: "column" },
538228
- import_react132.default.createElement(
538694
+ import_react133.default.createElement(
538229
538695
  Box_default,
538230
538696
  null,
538231
- import_react132.default.createElement(
538697
+ import_react133.default.createElement(
538232
538698
  Text,
538233
538699
  { color: "cyan" },
538234
- import_react132.default.createElement(build_default, { type: "dots" })
538700
+ import_react133.default.createElement(build_default, { type: "dots" })
538235
538701
  ),
538236
- import_react132.default.createElement(Text, null, " Loading...")
538702
+ import_react133.default.createElement(Text, null, " Loading...")
538237
538703
  )
538238
538704
  );
538239
538705
  }
538240
- return import_react132.default.createElement(AppComponent, { version: version2, skipWelcome, autoResume, headlessPrompt, showTaskList, enableYolo });
538706
+ return import_react133.default.createElement(AppComponent, { version: version2, skipWelcome, autoResume, headlessPrompt, showTaskList, enableYolo });
538241
538707
  };
538242
538708
  process.stdout.write("\x1B[?2004l");
538243
538709
  process.stdout.write("\x1B[2K\r");
@@ -538282,7 +538748,7 @@ process.on("SIGTERM", async () => {
538282
538748
  await cleanupAsync();
538283
538749
  process.exit(0);
538284
538750
  });
538285
- 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) }), {
538751
+ 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) }), {
538286
538752
  exitOnCtrlC: false,
538287
538753
  patchConsole: true
538288
538754
  });