@zyycn/claudex 1.0.3-fork.3767904

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.
Files changed (441) hide show
  1. package/LICENSE.md +5 -0
  2. package/README.md +468 -0
  3. package/bin/claudex.js +40 -0
  4. package/dist/chunk-028383m5.js +654 -0
  5. package/dist/chunk-03metnxx.js +83 -0
  6. package/dist/chunk-06saje2v.js +39 -0
  7. package/dist/chunk-0731m51q.js +8 -0
  8. package/dist/chunk-0b8kwsg7.js +1322 -0
  9. package/dist/chunk-0ef5aqfn.js +266 -0
  10. package/dist/chunk-0paqc2yw.js +15 -0
  11. package/dist/chunk-0q2xkmse.js +58 -0
  12. package/dist/chunk-0vkfrmqm.js +690 -0
  13. package/dist/chunk-0xjaqda8.js +1124 -0
  14. package/dist/chunk-0xkvxzm1.js +788 -0
  15. package/dist/chunk-1141xmr4.js +8 -0
  16. package/dist/chunk-16egjxjg.js +606 -0
  17. package/dist/chunk-197ypc6t.js +281 -0
  18. package/dist/chunk-1bznajh9.js +87 -0
  19. package/dist/chunk-1c04yf47.js +98 -0
  20. package/dist/chunk-1cbn5kxf.js +7 -0
  21. package/dist/chunk-1ed0q5rg.js +825 -0
  22. package/dist/chunk-1h2famwb.js +49 -0
  23. package/dist/chunk-1pq0cspt.js +5393 -0
  24. package/dist/chunk-1vsjpj70.js +584 -0
  25. package/dist/chunk-1xkekb9y.js +19 -0
  26. package/dist/chunk-1zmd9pc1.js +98 -0
  27. package/dist/chunk-21tvhhzh.js +470 -0
  28. package/dist/chunk-238g70xa.js +36 -0
  29. package/dist/chunk-27xc1csx.js +104 -0
  30. package/dist/chunk-28eznw6x.js +266 -0
  31. package/dist/chunk-29pq2e6e.js +162 -0
  32. package/dist/chunk-2a42s11t.js +412 -0
  33. package/dist/chunk-2degyn49.js +696 -0
  34. package/dist/chunk-2eykm0j0.js +20 -0
  35. package/dist/chunk-2gzv8nrw.js +205 -0
  36. package/dist/chunk-2k995y2x.js +880 -0
  37. package/dist/chunk-2nayx6q1.js +63 -0
  38. package/dist/chunk-2nhwtayn.js +285 -0
  39. package/dist/chunk-2pfz17d6.js +89 -0
  40. package/dist/chunk-2q98zgr7.js +120 -0
  41. package/dist/chunk-2r6p51j7.js +40 -0
  42. package/dist/chunk-2t3vw4tx.js +22820 -0
  43. package/dist/chunk-30rst83v.js +168 -0
  44. package/dist/chunk-34c7ey17.js +155 -0
  45. package/dist/chunk-34sv2j2s.js +690 -0
  46. package/dist/chunk-37jrk2jd.js +117 -0
  47. package/dist/chunk-38700exh.js +42 -0
  48. package/dist/chunk-38qkmq6a.js +274 -0
  49. package/dist/chunk-3b00105q.js +17 -0
  50. package/dist/chunk-3b6pmmxx.js +195 -0
  51. package/dist/chunk-3bbk64vc.js +8966 -0
  52. package/dist/chunk-3c25bcsw.js +17 -0
  53. package/dist/chunk-3cdajpj8.js +90 -0
  54. package/dist/chunk-3cr1nha2.js +198 -0
  55. package/dist/chunk-3d9rvrf3.js +103 -0
  56. package/dist/chunk-3dzknnm6.js +38 -0
  57. package/dist/chunk-3es29zn5.js +105 -0
  58. package/dist/chunk-3h8a89gy.js +46 -0
  59. package/dist/chunk-3pfbtkm1.js +105 -0
  60. package/dist/chunk-3pka9vsd.js +129 -0
  61. package/dist/chunk-3raf9w1p.js +115 -0
  62. package/dist/chunk-3vs3nm7w.js +31 -0
  63. package/dist/chunk-3w31rhxj.js +98 -0
  64. package/dist/chunk-3w6s9m5w.js +16 -0
  65. package/dist/chunk-3ze6jmfd.js +74 -0
  66. package/dist/chunk-40er4qb4.js +202 -0
  67. package/dist/chunk-40nmwkst.js +2838 -0
  68. package/dist/chunk-42ytstxy.js +109 -0
  69. package/dist/chunk-44fpr6jq.js +434 -0
  70. package/dist/chunk-495d85x1.js +8066 -0
  71. package/dist/chunk-49eehs1a.js +165 -0
  72. package/dist/chunk-4bfhat6k.js +89 -0
  73. package/dist/chunk-4cfef3e8.js +602 -0
  74. package/dist/chunk-4g3v8y12.js +23 -0
  75. package/dist/chunk-4jm600zv.js +13 -0
  76. package/dist/chunk-4n6x67m0.js +88 -0
  77. package/dist/chunk-4qz9vbs1.js +349 -0
  78. package/dist/chunk-4r4hb7td.js +564 -0
  79. package/dist/chunk-4tabtkpc.js +496 -0
  80. package/dist/chunk-4yd15ach.js +84 -0
  81. package/dist/chunk-4zfkzkt6.js +37 -0
  82. package/dist/chunk-50kxdgx6.js +255 -0
  83. package/dist/chunk-55wgxwa9.js +13877 -0
  84. package/dist/chunk-56jgazae.js +28 -0
  85. package/dist/chunk-56xwtm1c.js +229 -0
  86. package/dist/chunk-5nvye4tw.js +69 -0
  87. package/dist/chunk-5qe9gb40.js +99 -0
  88. package/dist/chunk-5vx14htd.js +87 -0
  89. package/dist/chunk-5y1tah98.js +756 -0
  90. package/dist/chunk-64wxa5zw.js +810 -0
  91. package/dist/chunk-65s8h28p.js +123 -0
  92. package/dist/chunk-6bd8brc4.js +48 -0
  93. package/dist/chunk-6dec7yq0.js +79 -0
  94. package/dist/chunk-6dj5t602.js +341 -0
  95. package/dist/chunk-6ghjp8m8.js +87 -0
  96. package/dist/chunk-6gr3c3w9.js +378 -0
  97. package/dist/chunk-6n2qgm9v.js +8 -0
  98. package/dist/chunk-6tq2v3rk.js +186 -0
  99. package/dist/chunk-6v4a0yqc.js +299 -0
  100. package/dist/chunk-73rpbt04.js +1947 -0
  101. package/dist/chunk-760252na.js +101 -0
  102. package/dist/chunk-7739pg2c.js +4261 -0
  103. package/dist/chunk-7956bsy7.js +85 -0
  104. package/dist/chunk-7aw745vx.js +40175 -0
  105. package/dist/chunk-7e6ahfxz.js +61 -0
  106. package/dist/chunk-7en5fc51.js +263 -0
  107. package/dist/chunk-7gf30dzb.js +184 -0
  108. package/dist/chunk-7kpp8d5g.js +644 -0
  109. package/dist/chunk-7m2nd8da.js +110 -0
  110. package/dist/chunk-7wb627p2.js +418 -0
  111. package/dist/chunk-7wm5s02e.js +216 -0
  112. package/dist/chunk-7x9kyp5a.js +780 -0
  113. package/dist/chunk-7zaxrfnt.js +42 -0
  114. package/dist/chunk-808756xy.js +348 -0
  115. package/dist/chunk-819jqhcr.js +192 -0
  116. package/dist/chunk-83hfzbx3.js +10 -0
  117. package/dist/chunk-83myqqga.js +642 -0
  118. package/dist/chunk-84xggq3w.js +713 -0
  119. package/dist/chunk-85n4mydq.js +100 -0
  120. package/dist/chunk-86czeeyf.js +38 -0
  121. package/dist/chunk-8aww16wk.js +26840 -0
  122. package/dist/chunk-8bedvdm1.js +32 -0
  123. package/dist/chunk-8hq5kk3y.js +44 -0
  124. package/dist/chunk-8jmc7234.js +3198 -0
  125. package/dist/chunk-8jq1r68j.js +5946 -0
  126. package/dist/chunk-8mtb0zzs.js +40 -0
  127. package/dist/chunk-8qm7hxn7.js +27 -0
  128. package/dist/chunk-8tnsngw2.js +31 -0
  129. package/dist/chunk-8y0qvap3.js +333 -0
  130. package/dist/chunk-8y12jxg8.js +10 -0
  131. package/dist/chunk-8ymf4e6z.js +48 -0
  132. package/dist/chunk-90c8d4yc.js +1549 -0
  133. package/dist/chunk-90wp6wez.js +10510 -0
  134. package/dist/chunk-97q4f0d5.js +160 -0
  135. package/dist/chunk-9gbamk79.js +93 -0
  136. package/dist/chunk-9k2drwej.js +106 -0
  137. package/dist/chunk-9nta4x35.js +726 -0
  138. package/dist/chunk-9v90tzwk.js +175 -0
  139. package/dist/chunk-a8ejc632.js +3094 -0
  140. package/dist/chunk-a8fvd2bk.js +224 -0
  141. package/dist/chunk-a8pyxxmz.js +374 -0
  142. package/dist/chunk-a9vdeb6y.js +258 -0
  143. package/dist/chunk-a9zh40sj.js +48 -0
  144. package/dist/chunk-abmaztjr.js +157 -0
  145. package/dist/chunk-actwcnvp.js +69 -0
  146. package/dist/chunk-acy41n63.js +339 -0
  147. package/dist/chunk-ah8ppcb2.js +176 -0
  148. package/dist/chunk-aj276jn4.js +95 -0
  149. package/dist/chunk-ajs4f0bc.js +4521 -0
  150. package/dist/chunk-as7vh4kb.js +140 -0
  151. package/dist/chunk-atjpyqps.js +250 -0
  152. package/dist/chunk-azzv8k3w.js +724 -0
  153. package/dist/chunk-b2k6rctr.js +225 -0
  154. package/dist/chunk-b3e5kx55.js +602 -0
  155. package/dist/chunk-b4wg70y1.js +54 -0
  156. package/dist/chunk-b5x836wt.js +114 -0
  157. package/dist/chunk-b75fzr8e.js +969 -0
  158. package/dist/chunk-b8m6vy4x.js +86 -0
  159. package/dist/chunk-b8x1gk3y.js +1299 -0
  160. package/dist/chunk-bjqw6798.js +328 -0
  161. package/dist/chunk-bm1qb16p.js +17 -0
  162. package/dist/chunk-bpkdecb4.js +267 -0
  163. package/dist/chunk-bqfnp99q.js +477 -0
  164. package/dist/chunk-bvp4dgm4.js +182 -0
  165. package/dist/chunk-bwwtzjsw.js +28 -0
  166. package/dist/chunk-by7f0myv.js +91 -0
  167. package/dist/chunk-by9nr4w6.js +442 -0
  168. package/dist/chunk-c2nsc73g.js +1579 -0
  169. package/dist/chunk-c5dc5tw8.js +275 -0
  170. package/dist/chunk-cdz5yb0r.js +57 -0
  171. package/dist/chunk-cfv996bs.js +22 -0
  172. package/dist/chunk-cgfdkzhb.js +12 -0
  173. package/dist/chunk-cjxa22k7.js +438 -0
  174. package/dist/chunk-crkef7n3.js +10476 -0
  175. package/dist/chunk-cssdmv6r.js +127 -0
  176. package/dist/chunk-d69y9a95.js +1316 -0
  177. package/dist/chunk-d6qpsqd1.js +91 -0
  178. package/dist/chunk-d6rxfmhy.js +4389 -0
  179. package/dist/chunk-d88jf4t3.js +525 -0
  180. package/dist/chunk-d8ksq0y0.js +26 -0
  181. package/dist/chunk-d9kz373t.js +122 -0
  182. package/dist/chunk-ddk0ak7r.js +63 -0
  183. package/dist/chunk-ddqs9xnj.js +173 -0
  184. package/dist/chunk-detc4mva.js +99 -0
  185. package/dist/chunk-dfg36kvt.js +691 -0
  186. package/dist/chunk-dgqrcy74.js +48 -0
  187. package/dist/chunk-dhd6zm3z.js +1095 -0
  188. package/dist/chunk-dnh7jtpb.js +37 -0
  189. package/dist/chunk-dq9afpqh.js +432 -0
  190. package/dist/chunk-dqqfd54g.js +672 -0
  191. package/dist/chunk-dstxhxsx.js +121 -0
  192. package/dist/chunk-dv1wfr85.js +6373 -0
  193. package/dist/chunk-dw5yr66c.js +109 -0
  194. package/dist/chunk-dx6pnab5.js +56 -0
  195. package/dist/chunk-dz5j8gp2.js +66 -0
  196. package/dist/chunk-e5pntxye.js +37 -0
  197. package/dist/chunk-ec2tspnc.js +253 -0
  198. package/dist/chunk-eebcvtbb.js +1646 -0
  199. package/dist/chunk-egentr97.js +328 -0
  200. package/dist/chunk-ehtwnxpg.js +1591 -0
  201. package/dist/chunk-en4dwrtx.js +674 -0
  202. package/dist/chunk-enjbm16s.js +212 -0
  203. package/dist/chunk-epf7hfx9.js +130 -0
  204. package/dist/chunk-eqp1rfft.js +17 -0
  205. package/dist/chunk-er596fa7.js +246 -0
  206. package/dist/chunk-ewadzrm8.js +103 -0
  207. package/dist/chunk-ey1kf1m1.js +96 -0
  208. package/dist/chunk-f2xj33w0.js +59 -0
  209. package/dist/chunk-f5ma3nh5.js +3436 -0
  210. package/dist/chunk-f8vjkfqy.js +169 -0
  211. package/dist/chunk-fbpftpf0.js +69 -0
  212. package/dist/chunk-fbv4apne.js +51 -0
  213. package/dist/chunk-fka484jr.js +142 -0
  214. package/dist/chunk-fmkhaba7.js +1585 -0
  215. package/dist/chunk-fny8kwbq.js +88 -0
  216. package/dist/chunk-fvjqz54k.js +297 -0
  217. package/dist/chunk-fxdk70se.js +457 -0
  218. package/dist/chunk-fyc5fepv.js +10 -0
  219. package/dist/chunk-fytfjpnf.js +400 -0
  220. package/dist/chunk-fz99t69n.js +152 -0
  221. package/dist/chunk-g0j0t6qk.js +26 -0
  222. package/dist/chunk-g338npwr.js +1061 -0
  223. package/dist/chunk-g3t0act8.js +8 -0
  224. package/dist/chunk-g5xn13xx.js +143 -0
  225. package/dist/chunk-gc1s3jhh.js +40767 -0
  226. package/dist/chunk-gd397pcz.js +54 -0
  227. package/dist/chunk-gee88a3c.js +2642 -0
  228. package/dist/chunk-gmwkf29y.js +372 -0
  229. package/dist/chunk-gsxnne70.js +6106 -0
  230. package/dist/chunk-gv0tqhg0.js +118 -0
  231. package/dist/chunk-gx25wmv5.js +71 -0
  232. package/dist/chunk-gyj242zr.js +20 -0
  233. package/dist/chunk-gzzfhtdv.js +7189 -0
  234. package/dist/chunk-h0qngp9w.js +157 -0
  235. package/dist/chunk-h0rbjg6x.js +55 -0
  236. package/dist/chunk-h0xeqdrp.js +258 -0
  237. package/dist/chunk-h5f90qy3.js +220 -0
  238. package/dist/chunk-hakdhagh.js +16606 -0
  239. package/dist/chunk-hamj71dy.js +40 -0
  240. package/dist/chunk-hbrqcjwt.js +2334 -0
  241. package/dist/chunk-heg1nmw6.js +16 -0
  242. package/dist/chunk-hh7cmy4k.js +20 -0
  243. package/dist/chunk-hhxj3n5k.js +153 -0
  244. package/dist/chunk-hk9xz7gk.js +118 -0
  245. package/dist/chunk-hmxkx429.js +108 -0
  246. package/dist/chunk-hq6y1jbc.js +89 -0
  247. package/dist/chunk-hqmz36b3.js +552 -0
  248. package/dist/chunk-hrqdc2z6.js +208 -0
  249. package/dist/chunk-hzhe8ygc.js +547 -0
  250. package/dist/chunk-j0xd989k.js +655 -0
  251. package/dist/chunk-j2k4p94p.js +55 -0
  252. package/dist/chunk-j3a4p81y.js +184 -0
  253. package/dist/chunk-j5hc27hv.js +444 -0
  254. package/dist/chunk-j64ga6ta.js +8035 -0
  255. package/dist/chunk-janw82mh.js +1864 -0
  256. package/dist/chunk-jce5r25x.js +18 -0
  257. package/dist/chunk-jd32zbps.js +15 -0
  258. package/dist/chunk-jdgeec04.js +4249 -0
  259. package/dist/chunk-jgpqexxb.js +83 -0
  260. package/dist/chunk-jja22ke5.js +81 -0
  261. package/dist/chunk-jm91zc2r.js +102 -0
  262. package/dist/chunk-jnhkref0.js +30 -0
  263. package/dist/chunk-jrhwm6kh.js +1556 -0
  264. package/dist/chunk-jttemgp6.js +532 -0
  265. package/dist/chunk-jtx453jx.js +281 -0
  266. package/dist/chunk-jwft70vy.js +476 -0
  267. package/dist/chunk-jx817w05.js +11 -0
  268. package/dist/chunk-jzmz18nn.js +65 -0
  269. package/dist/chunk-k0p9w03v.js +4957 -0
  270. package/dist/chunk-k0ymf9zj.js +113 -0
  271. package/dist/chunk-k1tve81h.js +345 -0
  272. package/dist/chunk-k2bkmhp4.js +385 -0
  273. package/dist/chunk-k2qkkhf9.js +463 -0
  274. package/dist/chunk-k542zrk6.js +88 -0
  275. package/dist/chunk-kez03ppq.js +490 -0
  276. package/dist/chunk-kgmzdyrz.js +242 -0
  277. package/dist/chunk-khs0jvy0.js +216 -0
  278. package/dist/chunk-kr244txf.js +306 -0
  279. package/dist/chunk-ksawj46w.js +536 -0
  280. package/dist/chunk-kwekc97v.js +18 -0
  281. package/dist/chunk-kz6f106c.js +6956 -0
  282. package/dist/chunk-kzmfv2aw.js +745 -0
  283. package/dist/chunk-m26pp852.js +87 -0
  284. package/dist/chunk-m4pma84k.js +2057 -0
  285. package/dist/chunk-mfp30vsr.js +458 -0
  286. package/dist/chunk-mjn6p2km.js +92 -0
  287. package/dist/chunk-mk6tjz0j.js +469 -0
  288. package/dist/chunk-mqcwefg3.js +105 -0
  289. package/dist/chunk-mqm3kg01.js +61 -0
  290. package/dist/chunk-mt25echc.js +6157 -0
  291. package/dist/chunk-mw9ve19d.js +277 -0
  292. package/dist/chunk-mxt2wn9a.js +131 -0
  293. package/dist/chunk-n0qaeaa5.js +256 -0
  294. package/dist/chunk-n154ybpk.js +1919 -0
  295. package/dist/chunk-n2ktrmm8.js +62 -0
  296. package/dist/chunk-n59gj2nk.js +438 -0
  297. package/dist/chunk-n7ttdtk0.js +641 -0
  298. package/dist/chunk-nb9z2xs5.js +128 -0
  299. package/dist/chunk-nh8ssb02.js +88 -0
  300. package/dist/chunk-nj17bhkh.js +125 -0
  301. package/dist/chunk-njmw3yt4.js +173564 -0
  302. package/dist/chunk-njwzgb7j.js +61 -0
  303. package/dist/chunk-nka1g8f4.js +773 -0
  304. package/dist/chunk-nq0fxyxh.js +752 -0
  305. package/dist/chunk-nt837qt9.js +21 -0
  306. package/dist/chunk-nwsmn6zm.js +15 -0
  307. package/dist/chunk-nx4e896a.js +208 -0
  308. package/dist/chunk-p2816w9z.js +1486 -0
  309. package/dist/chunk-p2d5nh3g.js +342 -0
  310. package/dist/chunk-p331ghzg.js +391 -0
  311. package/dist/chunk-p4qrpz5a.js +99 -0
  312. package/dist/chunk-p8syd69s.js +47 -0
  313. package/dist/chunk-pdyq9kvn.js +83 -0
  314. package/dist/chunk-pkb4qnmq.js +1391 -0
  315. package/dist/chunk-pkcx8qa3.js +154 -0
  316. package/dist/chunk-pmsp9ed2.js +34 -0
  317. package/dist/chunk-pnmh6v4t.js +373 -0
  318. package/dist/chunk-ps49ymvj.js +43 -0
  319. package/dist/chunk-pwwa7s62.js +11 -0
  320. package/dist/chunk-pxy618ae.js +714 -0
  321. package/dist/chunk-py5y9jh1.js +38 -0
  322. package/dist/chunk-pzz93fck.js +173 -0
  323. package/dist/chunk-q25bjaev.js +15 -0
  324. package/dist/chunk-q756tpn6.js +765 -0
  325. package/dist/chunk-qbt1tq74.js +145 -0
  326. package/dist/chunk-qkkj0em0.js +104 -0
  327. package/dist/chunk-qnfx3qtx.js +617 -0
  328. package/dist/chunk-qp2qdcda.js +100 -0
  329. package/dist/chunk-qpkxg63w.js +160 -0
  330. package/dist/chunk-qqfa0dqg.js +2343 -0
  331. package/dist/chunk-qsd1r4pm.js +9300 -0
  332. package/dist/chunk-qseetcxd.js +908 -0
  333. package/dist/chunk-qvt2hjv0.js +849 -0
  334. package/dist/chunk-qxdv72g8.js +93 -0
  335. package/dist/chunk-qy0vwqgp.js +194 -0
  336. package/dist/chunk-qz2x630m.js +49145 -0
  337. package/dist/chunk-qzqagb7y.js +87 -0
  338. package/dist/chunk-r14xvkat.js +641 -0
  339. package/dist/chunk-r6b58y3x.js +17 -0
  340. package/dist/chunk-r6z6t5wr.js +97 -0
  341. package/dist/chunk-r855fz3z.js +41 -0
  342. package/dist/chunk-raqgs410.js +116 -0
  343. package/dist/chunk-rd5rdsdz.js +95 -0
  344. package/dist/chunk-renve22b.js +524 -0
  345. package/dist/chunk-res7qrc9.js +820 -0
  346. package/dist/chunk-rk7ns7gp.js +220 -0
  347. package/dist/chunk-rm0q8bwx.js +271 -0
  348. package/dist/chunk-rm56f6q8.js +41 -0
  349. package/dist/chunk-rn0v1hk8.js +34 -0
  350. package/dist/chunk-rrxeqt07.js +73 -0
  351. package/dist/chunk-rvgeep5b.js +117 -0
  352. package/dist/chunk-rx4c84ah.js +86 -0
  353. package/dist/chunk-s3pzvdss.js +50 -0
  354. package/dist/chunk-s5vqcxp0.js +54 -0
  355. package/dist/chunk-s88vzmek.js +542 -0
  356. package/dist/chunk-sazb7y67.js +279 -0
  357. package/dist/chunk-sbbj6ta3.js +1711 -0
  358. package/dist/chunk-sd36yzx8.js +954 -0
  359. package/dist/chunk-sdj9b9wh.js +782 -0
  360. package/dist/chunk-shb6nvk6.js +27 -0
  361. package/dist/chunk-szj5wvdy.js +28 -0
  362. package/dist/chunk-t0rgmccj.js +39 -0
  363. package/dist/chunk-t1jh3jk8.js +3036 -0
  364. package/dist/chunk-t3360k46.js +75 -0
  365. package/dist/chunk-t3h6pwp3.js +112 -0
  366. package/dist/chunk-t5ymtx9c.js +1493 -0
  367. package/dist/chunk-t6p76a55.js +120 -0
  368. package/dist/chunk-t7fdh24y.js +648 -0
  369. package/dist/chunk-texzbcna.js +716 -0
  370. package/dist/chunk-tjw7n4me.js +21933 -0
  371. package/dist/chunk-tjyhp966.js +24 -0
  372. package/dist/chunk-tnd5xbeh.js +802 -0
  373. package/dist/chunk-trfa7dbr.js +998 -0
  374. package/dist/chunk-ts2p6bv1.js +224 -0
  375. package/dist/chunk-tssr3fyd.js +287 -0
  376. package/dist/chunk-ttk5dzz8.js +25 -0
  377. package/dist/chunk-tvhjre1h.js +316 -0
  378. package/dist/chunk-txndc2j2.js +70 -0
  379. package/dist/chunk-v1kzp02e.js +785 -0
  380. package/dist/chunk-v2pc6h28.js +32 -0
  381. package/dist/chunk-v78fj8by.js +145 -0
  382. package/dist/chunk-v90xv5n9.js +157 -0
  383. package/dist/chunk-v9smspw2.js +4301 -0
  384. package/dist/chunk-vest0y6x.js +3830 -0
  385. package/dist/chunk-vf5sd1nq.js +12 -0
  386. package/dist/chunk-vhjx5fag.js +56 -0
  387. package/dist/chunk-vjtbtamj.js +165 -0
  388. package/dist/chunk-vkkay00s.js +229 -0
  389. package/dist/chunk-vqc05a0b.js +121 -0
  390. package/dist/chunk-vqk1n5qr.js +63 -0
  391. package/dist/chunk-vqvd3qz0.js +151 -0
  392. package/dist/chunk-vtp96y1a.js +90 -0
  393. package/dist/chunk-vyjeh50y.js +2149 -0
  394. package/dist/chunk-vz6s9tzt.js +43 -0
  395. package/dist/chunk-w3agqtpz.js +42 -0
  396. package/dist/chunk-w3dz905t.js +22 -0
  397. package/dist/chunk-w8yw30sd.js +15 -0
  398. package/dist/chunk-wa6b7bv9.js +467 -0
  399. package/dist/chunk-wb36q47x.js +128 -0
  400. package/dist/chunk-wbnv75aa.js +114 -0
  401. package/dist/chunk-wcepsp07.js +1013 -0
  402. package/dist/chunk-wecrhvf7.js +247 -0
  403. package/dist/chunk-wfz0qffj.js +3939 -0
  404. package/dist/chunk-wgcssf6v.js +722 -0
  405. package/dist/chunk-wn2268qd.js +335 -0
  406. package/dist/chunk-wtr5hjf7.js +3443 -0
  407. package/dist/chunk-wzpdet3m.js +843 -0
  408. package/dist/chunk-x0328bb5.js +305 -0
  409. package/dist/chunk-x5psxyg8.js +20 -0
  410. package/dist/chunk-x8b7vft8.js +132 -0
  411. package/dist/chunk-x8n22y7f.js +5017 -0
  412. package/dist/chunk-xq4cfvpn.js +213 -0
  413. package/dist/chunk-xqdvndvx.js +3394 -0
  414. package/dist/chunk-xrv9qadt.js +44 -0
  415. package/dist/chunk-xsq9ae7x.js +90 -0
  416. package/dist/chunk-xszk7n10.js +14358 -0
  417. package/dist/chunk-xx6h50zt.js +338 -0
  418. package/dist/chunk-y1784krc.js +19 -0
  419. package/dist/chunk-yfcsc3s4.js +153 -0
  420. package/dist/chunk-yngvgvqm.js +103 -0
  421. package/dist/chunk-yntm0ebf.js +500 -0
  422. package/dist/chunk-yw9xqzna.js +71 -0
  423. package/dist/chunk-ywxd4qw4.js +22 -0
  424. package/dist/chunk-yysj6sxt.js +336 -0
  425. package/dist/chunk-yzhxz894.js +32 -0
  426. package/dist/chunk-yztq1rhb.js +60 -0
  427. package/dist/chunk-z06751ss.js +16386 -0
  428. package/dist/chunk-z2dp53wn.js +17 -0
  429. package/dist/chunk-z5cvbngc.js +520 -0
  430. package/dist/chunk-z6vf0bdm.js +101 -0
  431. package/dist/chunk-zbqfbyfb.js +247 -0
  432. package/dist/chunk-zc6g0qqe.js +29 -0
  433. package/dist/chunk-zj863fgn.js +92 -0
  434. package/dist/chunk-zjd1m23p.js +1152 -0
  435. package/dist/chunk-zk2wsm7d.js +15 -0
  436. package/dist/chunk-zmwhk0zy.js +750 -0
  437. package/dist/chunk-zpywc76a.js +862 -0
  438. package/dist/chunk-zqm995gk.js +71 -0
  439. package/dist/chunk-zsfxha74.js +17655 -0
  440. package/dist/cli.js +89 -0
  441. package/package.json +36 -0
@@ -0,0 +1,3394 @@
1
+ // @bun
2
+ import {
3
+ ClaudeMdExternalIncludesDialog,
4
+ init_ClaudeMdExternalIncludesDialog
5
+ } from "./chunk-enjbm16s.js";
6
+ import {
7
+ init_bridgeEnabled
8
+ } from "./chunk-2r6p51j7.js";
9
+ import {
10
+ ModelPicker,
11
+ init_ModelPicker,
12
+ init_extraUsage,
13
+ isBilledAsExtraUsage
14
+ } from "./chunk-84xggq3w.js";
15
+ import {
16
+ ThemePicker,
17
+ init_ThemePicker
18
+ } from "./chunk-kez03ppq.js";
19
+ import {
20
+ OverageCreditUpsell,
21
+ init_OverageCreditUpsell,
22
+ isEligibleForOverageCreditGrant
23
+ } from "./chunk-819jqhcr.js";
24
+ import {
25
+ SearchBox,
26
+ init_SearchBox,
27
+ init_useSearchInput,
28
+ useSearchInput
29
+ } from "./chunk-dq9afpqh.js";
30
+ import {
31
+ Tab,
32
+ Tabs,
33
+ init_Tabs,
34
+ useTabHeaderFocus
35
+ } from "./chunk-gmwkf29y.js";
36
+ import {
37
+ fetchUtilization,
38
+ init_usage
39
+ } from "./chunk-yztq1rhb.js";
40
+ import {
41
+ DEFAULT_OUTPUT_STYLE_NAME,
42
+ OUTPUT_STYLE_CONFIG,
43
+ ProgressBar,
44
+ Select,
45
+ TextInput,
46
+ buildAPIProviderProperties,
47
+ buildAccountProperties,
48
+ buildIDEProperties,
49
+ buildInstallationDiagnostics,
50
+ buildInstallationHealthDiagnostics,
51
+ buildMcpProperties,
52
+ buildMemoryDiagnostics,
53
+ buildSandboxProperties,
54
+ buildSettingSourcesProperties,
55
+ extraUsage,
56
+ formatCost,
57
+ getAllOutputStyles,
58
+ getCurrentSessionTitle,
59
+ getExternalClaudeMdIncludes,
60
+ getHardcodedTeammateModelFallback,
61
+ getMemoryFiles,
62
+ getModelDisplayLabel,
63
+ hasAccessToIDEExtensionDiffFeature,
64
+ hasExternalClaudeMdIncludes,
65
+ init_AppState,
66
+ init_CustomSelect,
67
+ init_ProgressBar,
68
+ init_TextInput,
69
+ init_claudemd,
70
+ init_cost_tracker,
71
+ init_extra_usage,
72
+ init_ide,
73
+ init_outputStyles,
74
+ init_permissionSetup,
75
+ init_select,
76
+ init_sessionStorage,
77
+ init_status,
78
+ init_teammateModel,
79
+ isSupportedTerminal,
80
+ transitionPlanAutoMode,
81
+ useAppState,
82
+ useAppStateStore,
83
+ useSetAppState
84
+ } from "./chunk-njmw3yt4.js";
85
+ import {
86
+ clearCliTeammateModeOverride,
87
+ getCliTeammateModeOverride,
88
+ init_teammateModeSnapshot
89
+ } from "./chunk-ddk0ak7r.js";
90
+ import {
91
+ Byline,
92
+ ConfigurableShortcutHint,
93
+ Dialog,
94
+ KeyboardShortcutHint,
95
+ init_Byline,
96
+ init_ConfigurableShortcutHint,
97
+ init_Dialog,
98
+ init_KeyboardShortcutHint
99
+ } from "./chunk-k2qkkhf9.js";
100
+ import {
101
+ init_useExitOnCtrlCDWithKeybindings,
102
+ useExitOnCtrlCDWithKeybindings
103
+ } from "./chunk-p4qrpz5a.js";
104
+ import {
105
+ Pane,
106
+ init_Pane,
107
+ init_modalContext,
108
+ init_useKeybinding,
109
+ init_useTerminalSize,
110
+ useIsInsideModal,
111
+ useKeybinding,
112
+ useKeybindings,
113
+ useModalOrTerminalSize,
114
+ useTerminalSize
115
+ } from "./chunk-tnd5xbeh.js";
116
+ import {
117
+ ThemedBox_default,
118
+ ThemedText,
119
+ init_fullscreen,
120
+ init_ink,
121
+ isFullscreenEnvEnabled,
122
+ require_compiler_runtime,
123
+ useTerminalFocus,
124
+ useTheme,
125
+ useThemeSetting
126
+ } from "./chunk-8aww16wk.js";
127
+ import {
128
+ require_jsx_dev_runtime,
129
+ require_react
130
+ } from "./chunk-g338npwr.js";
131
+ import {
132
+ EXTERNAL_PERMISSION_MODES,
133
+ FAST_MODE_MODEL_DISPLAY,
134
+ clearFastModeCooldown,
135
+ formatAutoUpdaterDisabledReason,
136
+ getAutoUpdaterDisabledReason,
137
+ getCurrentProjectConfig,
138
+ getFastModeModel,
139
+ getFeatureValue_CACHED_MAY_BE_STALE,
140
+ getGlobalConfig,
141
+ getInitialSettings,
142
+ getSettingsForSource,
143
+ getSubscriptionType,
144
+ init_PermissionMode,
145
+ init_agentSwarmsEnabled,
146
+ init_auth,
147
+ init_authPortable,
148
+ init_config1 as init_config,
149
+ init_fastMode,
150
+ init_growthbook,
151
+ init_model,
152
+ init_settings1 as init_settings,
153
+ init_source,
154
+ isAgentSwarmsEnabled,
155
+ isExternalPermissionMode,
156
+ isFastModeAvailable,
157
+ isFastModeEnabled,
158
+ isFastModeSupportedByModel,
159
+ isOpus1mMergeEnabled,
160
+ modelDisplayString,
161
+ normalizeApiKeyForConfig,
162
+ permissionModeFromString,
163
+ permissionModeTitle,
164
+ saveGlobalConfig,
165
+ source_default,
166
+ toExternalPermissionMode,
167
+ updateSettingsForSource
168
+ } from "./chunk-z06751ss.js";
169
+ import {
170
+ formatResetText,
171
+ init_format
172
+ } from "./chunk-wgcssf6v.js";
173
+ import {
174
+ init_analytics,
175
+ logEvent
176
+ } from "./chunk-h0rbjg6x.js";
177
+ import {
178
+ figures_default,
179
+ init_figures
180
+ } from "./chunk-gzzfhtdv.js";
181
+ import {
182
+ init_log,
183
+ logError
184
+ } from "./chunk-yysj6sxt.js";
185
+ import {
186
+ getCwd,
187
+ init_cwd
188
+ } from "./chunk-8bedvdm1.js";
189
+ import {
190
+ init_slowOperations,
191
+ jsonStringify
192
+ } from "./chunk-sbbj6ta3.js";
193
+ import {
194
+ init_envUtils,
195
+ isEnvTruthy,
196
+ isRunningOnHomespace
197
+ } from "./chunk-raqgs410.js";
198
+ import {
199
+ getSessionId,
200
+ getUserMsgOptIn,
201
+ init_state,
202
+ setUserMsgOptIn
203
+ } from "./chunk-qqfa0dqg.js";
204
+ import {
205
+ __esm,
206
+ __toESM
207
+ } from "./chunk-qp2qdcda.js";
208
+
209
+ // src/components/Settings/Status.tsx
210
+ function buildPrimarySection() {
211
+ const sessionId = getSessionId();
212
+ const customTitle = getCurrentSessionTitle(sessionId);
213
+ const nameValue = customTitle ?? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
214
+ dimColor: true,
215
+ children: "/rename to add a name"
216
+ }, undefined, false, undefined, this);
217
+ return [{
218
+ label: "Version",
219
+ value: "1.0.3-fork.3767904"
220
+ }, {
221
+ label: "Session name",
222
+ value: nameValue
223
+ }, {
224
+ label: "Session ID",
225
+ value: sessionId
226
+ }, {
227
+ label: "cwd",
228
+ value: getCwd()
229
+ }, ...buildAccountProperties(), ...buildAPIProviderProperties()];
230
+ }
231
+ function buildSecondarySection({
232
+ mainLoopModel,
233
+ mcp,
234
+ theme,
235
+ context
236
+ }) {
237
+ const modelLabel = getModelDisplayLabel(mainLoopModel);
238
+ return [{
239
+ label: "Model",
240
+ value: modelLabel
241
+ }, ...buildIDEProperties(mcp.clients, context.options.ideInstallationStatus, theme), ...buildMcpProperties(mcp.clients, theme), ...buildSandboxProperties(), ...buildSettingSourcesProperties()];
242
+ }
243
+ async function buildDiagnostics() {
244
+ return [...await buildInstallationDiagnostics(), ...await buildInstallationHealthDiagnostics(), ...await buildMemoryDiagnostics()];
245
+ }
246
+ function PropertyValue(t0) {
247
+ const $ = import_compiler_runtime.c(8);
248
+ const {
249
+ value
250
+ } = t0;
251
+ if (Array.isArray(value)) {
252
+ let t1;
253
+ if ($[0] !== value) {
254
+ let t22;
255
+ if ($[2] !== value.length) {
256
+ t22 = (item, i) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
257
+ children: [
258
+ item,
259
+ i < value.length - 1 ? "," : ""
260
+ ]
261
+ }, i, true, undefined, this);
262
+ $[2] = value.length;
263
+ $[3] = t22;
264
+ } else {
265
+ t22 = $[3];
266
+ }
267
+ t1 = value.map(t22);
268
+ $[0] = value;
269
+ $[1] = t1;
270
+ } else {
271
+ t1 = $[1];
272
+ }
273
+ let t2;
274
+ if ($[4] !== t1) {
275
+ t2 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
276
+ flexWrap: "wrap",
277
+ columnGap: 1,
278
+ flexShrink: 99,
279
+ children: t1
280
+ }, undefined, false, undefined, this);
281
+ $[4] = t1;
282
+ $[5] = t2;
283
+ } else {
284
+ t2 = $[5];
285
+ }
286
+ return t2;
287
+ }
288
+ if (typeof value === "string") {
289
+ let t1;
290
+ if ($[6] !== value) {
291
+ t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
292
+ children: value
293
+ }, undefined, false, undefined, this);
294
+ $[6] = value;
295
+ $[7] = t1;
296
+ } else {
297
+ t1 = $[7];
298
+ }
299
+ return t1;
300
+ }
301
+ return value;
302
+ }
303
+ function Status(t0) {
304
+ const $ = import_compiler_runtime.c(20);
305
+ const {
306
+ context,
307
+ diagnosticsPromise
308
+ } = t0;
309
+ const mainLoopModel = useAppState(_temp);
310
+ const mcp = useAppState(_temp2);
311
+ const [theme] = useTheme();
312
+ let t1;
313
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
314
+ t1 = buildPrimarySection();
315
+ $[0] = t1;
316
+ } else {
317
+ t1 = $[0];
318
+ }
319
+ let t2;
320
+ if ($[1] !== context || $[2] !== mainLoopModel || $[3] !== mcp || $[4] !== theme) {
321
+ t2 = buildSecondarySection({
322
+ mainLoopModel,
323
+ mcp,
324
+ theme,
325
+ context
326
+ });
327
+ $[1] = context;
328
+ $[2] = mainLoopModel;
329
+ $[3] = mcp;
330
+ $[4] = theme;
331
+ $[5] = t2;
332
+ } else {
333
+ t2 = $[5];
334
+ }
335
+ let t3;
336
+ if ($[6] !== t2) {
337
+ t3 = [t1, t2];
338
+ $[6] = t2;
339
+ $[7] = t3;
340
+ } else {
341
+ t3 = $[7];
342
+ }
343
+ const sections = t3;
344
+ const grow = useIsInsideModal() ? 1 : undefined;
345
+ let t4;
346
+ if ($[8] !== sections) {
347
+ t4 = sections.map(_temp4);
348
+ $[8] = sections;
349
+ $[9] = t4;
350
+ } else {
351
+ t4 = $[9];
352
+ }
353
+ let t5;
354
+ if ($[10] !== diagnosticsPromise) {
355
+ t5 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(import_react.Suspense, {
356
+ fallback: null,
357
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Diagnostics, {
358
+ promise: diagnosticsPromise
359
+ }, undefined, false, undefined, this)
360
+ }, undefined, false, undefined, this);
361
+ $[10] = diagnosticsPromise;
362
+ $[11] = t5;
363
+ } else {
364
+ t5 = $[11];
365
+ }
366
+ let t6;
367
+ if ($[12] !== grow || $[13] !== t4 || $[14] !== t5) {
368
+ t6 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
369
+ flexDirection: "column",
370
+ gap: 1,
371
+ flexGrow: grow,
372
+ children: [
373
+ t4,
374
+ t5
375
+ ]
376
+ }, undefined, true, undefined, this);
377
+ $[12] = grow;
378
+ $[13] = t4;
379
+ $[14] = t5;
380
+ $[15] = t6;
381
+ } else {
382
+ t6 = $[15];
383
+ }
384
+ let t7;
385
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
386
+ t7 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
387
+ dimColor: true,
388
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ConfigurableShortcutHint, {
389
+ action: "confirm:no",
390
+ context: "Settings",
391
+ fallback: "Esc",
392
+ description: "cancel"
393
+ }, undefined, false, undefined, this)
394
+ }, undefined, false, undefined, this);
395
+ $[16] = t7;
396
+ } else {
397
+ t7 = $[16];
398
+ }
399
+ let t8;
400
+ if ($[17] !== grow || $[18] !== t6) {
401
+ t8 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
402
+ flexDirection: "column",
403
+ flexGrow: grow,
404
+ children: [
405
+ t6,
406
+ t7
407
+ ]
408
+ }, undefined, true, undefined, this);
409
+ $[17] = grow;
410
+ $[18] = t6;
411
+ $[19] = t8;
412
+ } else {
413
+ t8 = $[19];
414
+ }
415
+ return t8;
416
+ }
417
+ function _temp4(properties, i) {
418
+ return properties.length > 0 && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
419
+ flexDirection: "column",
420
+ children: properties.map(_temp3)
421
+ }, i, false, undefined, this);
422
+ }
423
+ function _temp3(t0, j) {
424
+ const {
425
+ label,
426
+ value
427
+ } = t0;
428
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
429
+ flexDirection: "row",
430
+ gap: 1,
431
+ flexShrink: 0,
432
+ children: [
433
+ label !== undefined && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
434
+ bold: true,
435
+ children: [
436
+ label,
437
+ ":"
438
+ ]
439
+ }, undefined, true, undefined, this),
440
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(PropertyValue, {
441
+ value
442
+ }, undefined, false, undefined, this)
443
+ ]
444
+ }, j, true, undefined, this);
445
+ }
446
+ function _temp2(s_0) {
447
+ return s_0.mcp;
448
+ }
449
+ function _temp(s) {
450
+ return s.mainLoopModel;
451
+ }
452
+ function Diagnostics(t0) {
453
+ const $ = import_compiler_runtime.c(5);
454
+ const {
455
+ promise
456
+ } = t0;
457
+ const diagnostics = import_react.use(promise);
458
+ if (diagnostics.length === 0) {
459
+ return null;
460
+ }
461
+ let t1;
462
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
463
+ t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
464
+ bold: true,
465
+ children: "System Diagnostics"
466
+ }, undefined, false, undefined, this);
467
+ $[0] = t1;
468
+ } else {
469
+ t1 = $[0];
470
+ }
471
+ let t2;
472
+ if ($[1] !== diagnostics) {
473
+ t2 = diagnostics.map(_temp5);
474
+ $[1] = diagnostics;
475
+ $[2] = t2;
476
+ } else {
477
+ t2 = $[2];
478
+ }
479
+ let t3;
480
+ if ($[3] !== t2) {
481
+ t3 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
482
+ flexDirection: "column",
483
+ paddingBottom: 1,
484
+ children: [
485
+ t1,
486
+ t2
487
+ ]
488
+ }, undefined, true, undefined, this);
489
+ $[3] = t2;
490
+ $[4] = t3;
491
+ } else {
492
+ t3 = $[4];
493
+ }
494
+ return t3;
495
+ }
496
+ function _temp5(diagnostic, i) {
497
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
498
+ flexDirection: "row",
499
+ gap: 1,
500
+ paddingX: 1,
501
+ children: [
502
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
503
+ color: "error",
504
+ children: figures_default.warning
505
+ }, undefined, false, undefined, this),
506
+ typeof diagnostic === "string" ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
507
+ wrap: "wrap",
508
+ children: diagnostic
509
+ }, undefined, false, undefined, this) : diagnostic
510
+ ]
511
+ }, i, true, undefined, this);
512
+ }
513
+ var import_compiler_runtime, import_react, jsx_dev_runtime;
514
+ var init_Status = __esm(() => {
515
+ init_figures();
516
+ init_state();
517
+ init_modalContext();
518
+ init_ink();
519
+ init_AppState();
520
+ init_cwd();
521
+ init_sessionStorage();
522
+ init_status();
523
+ init_ConfigurableShortcutHint();
524
+ import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
525
+ import_react = __toESM(require_react(), 1);
526
+ jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
527
+ });
528
+
529
+ // src/components/ChannelDowngradeDialog.tsx
530
+ function ChannelDowngradeDialog(t0) {
531
+ const $ = import_compiler_runtime2.c(17);
532
+ const {
533
+ currentVersion,
534
+ onChoice
535
+ } = t0;
536
+ let t1;
537
+ if ($[0] !== onChoice) {
538
+ t1 = function handleSelect2(value) {
539
+ onChoice(value);
540
+ };
541
+ $[0] = onChoice;
542
+ $[1] = t1;
543
+ } else {
544
+ t1 = $[1];
545
+ }
546
+ const handleSelect = t1;
547
+ let t2;
548
+ if ($[2] !== onChoice) {
549
+ t2 = function handleCancel2() {
550
+ onChoice("cancel");
551
+ };
552
+ $[2] = onChoice;
553
+ $[3] = t2;
554
+ } else {
555
+ t2 = $[3];
556
+ }
557
+ const handleCancel = t2;
558
+ let t3;
559
+ if ($[4] !== currentVersion) {
560
+ t3 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
561
+ children: [
562
+ "The stable channel may have an older version than what you're currently running (",
563
+ currentVersion,
564
+ ")."
565
+ ]
566
+ }, undefined, true, undefined, this);
567
+ $[4] = currentVersion;
568
+ $[5] = t3;
569
+ } else {
570
+ t3 = $[5];
571
+ }
572
+ let t4;
573
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
574
+ t4 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
575
+ dimColor: true,
576
+ children: "How would you like to handle this?"
577
+ }, undefined, false, undefined, this);
578
+ $[6] = t4;
579
+ } else {
580
+ t4 = $[6];
581
+ }
582
+ let t5;
583
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
584
+ t5 = {
585
+ label: "Allow possible downgrade to stable version",
586
+ value: "downgrade"
587
+ };
588
+ $[7] = t5;
589
+ } else {
590
+ t5 = $[7];
591
+ }
592
+ const t6 = `Stay on current version (${currentVersion}) until stable catches up`;
593
+ let t7;
594
+ if ($[8] !== t6) {
595
+ t7 = [t5, {
596
+ label: t6,
597
+ value: "stay"
598
+ }];
599
+ $[8] = t6;
600
+ $[9] = t7;
601
+ } else {
602
+ t7 = $[9];
603
+ }
604
+ let t8;
605
+ if ($[10] !== handleSelect || $[11] !== t7) {
606
+ t8 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
607
+ options: t7,
608
+ onChange: handleSelect
609
+ }, undefined, false, undefined, this);
610
+ $[10] = handleSelect;
611
+ $[11] = t7;
612
+ $[12] = t8;
613
+ } else {
614
+ t8 = $[12];
615
+ }
616
+ let t9;
617
+ if ($[13] !== handleCancel || $[14] !== t3 || $[15] !== t8) {
618
+ t9 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
619
+ title: "Switch to Stable Channel",
620
+ onCancel: handleCancel,
621
+ color: "permission",
622
+ hideBorder: true,
623
+ hideInputGuide: true,
624
+ children: [
625
+ t3,
626
+ t4,
627
+ t8
628
+ ]
629
+ }, undefined, true, undefined, this);
630
+ $[13] = handleCancel;
631
+ $[14] = t3;
632
+ $[15] = t8;
633
+ $[16] = t9;
634
+ } else {
635
+ t9 = $[16];
636
+ }
637
+ return t9;
638
+ }
639
+ var import_compiler_runtime2, jsx_dev_runtime2;
640
+ var init_ChannelDowngradeDialog = __esm(() => {
641
+ init_ink();
642
+ init_CustomSelect();
643
+ init_Dialog();
644
+ import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
645
+ jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
646
+ });
647
+
648
+ // src/components/OutputStylePicker.tsx
649
+ function mapConfigsToOptions(styles) {
650
+ return Object.entries(styles).map(([style, config]) => ({
651
+ label: config?.name ?? DEFAULT_OUTPUT_STYLE_LABEL,
652
+ value: style,
653
+ description: config?.description ?? DEFAULT_OUTPUT_STYLE_DESCRIPTION
654
+ }));
655
+ }
656
+ function OutputStylePicker(t0) {
657
+ const $ = import_compiler_runtime3.c(16);
658
+ const {
659
+ initialStyle,
660
+ onComplete,
661
+ onCancel,
662
+ isStandaloneCommand
663
+ } = t0;
664
+ let t1;
665
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
666
+ t1 = [];
667
+ $[0] = t1;
668
+ } else {
669
+ t1 = $[0];
670
+ }
671
+ const [styleOptions, setStyleOptions] = import_react2.useState(t1);
672
+ const [isLoading, setIsLoading] = import_react2.useState(true);
673
+ let t2;
674
+ let t3;
675
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
676
+ t2 = () => {
677
+ getAllOutputStyles(getCwd()).then((allStyles) => {
678
+ const options = mapConfigsToOptions(allStyles);
679
+ setStyleOptions(options);
680
+ setIsLoading(false);
681
+ }).catch(() => {
682
+ const builtInOptions = mapConfigsToOptions(OUTPUT_STYLE_CONFIG);
683
+ setStyleOptions(builtInOptions);
684
+ setIsLoading(false);
685
+ });
686
+ };
687
+ t3 = [];
688
+ $[1] = t2;
689
+ $[2] = t3;
690
+ } else {
691
+ t2 = $[1];
692
+ t3 = $[2];
693
+ }
694
+ import_react2.useEffect(t2, t3);
695
+ let t4;
696
+ if ($[3] !== onComplete) {
697
+ t4 = (style) => {
698
+ const outputStyle = style;
699
+ onComplete(outputStyle);
700
+ };
701
+ $[3] = onComplete;
702
+ $[4] = t4;
703
+ } else {
704
+ t4 = $[4];
705
+ }
706
+ const handleStyleSelect = t4;
707
+ const t5 = !isStandaloneCommand;
708
+ const t6 = !isStandaloneCommand;
709
+ let t7;
710
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
711
+ t7 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
712
+ marginTop: 1,
713
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
714
+ dimColor: true,
715
+ children: "This changes how Claude Code communicates with you"
716
+ }, undefined, false, undefined, this)
717
+ }, undefined, false, undefined, this);
718
+ $[5] = t7;
719
+ } else {
720
+ t7 = $[5];
721
+ }
722
+ let t8;
723
+ if ($[6] !== handleStyleSelect || $[7] !== initialStyle || $[8] !== isLoading || $[9] !== styleOptions) {
724
+ t8 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
725
+ flexDirection: "column",
726
+ gap: 1,
727
+ children: [
728
+ t7,
729
+ isLoading ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
730
+ dimColor: true,
731
+ children: "Loading output styles\u2026"
732
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Select, {
733
+ options: styleOptions,
734
+ onChange: handleStyleSelect,
735
+ visibleOptionCount: 10,
736
+ defaultValue: initialStyle
737
+ }, undefined, false, undefined, this)
738
+ ]
739
+ }, undefined, true, undefined, this);
740
+ $[6] = handleStyleSelect;
741
+ $[7] = initialStyle;
742
+ $[8] = isLoading;
743
+ $[9] = styleOptions;
744
+ $[10] = t8;
745
+ } else {
746
+ t8 = $[10];
747
+ }
748
+ let t9;
749
+ if ($[11] !== onCancel || $[12] !== t5 || $[13] !== t6 || $[14] !== t8) {
750
+ t9 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Dialog, {
751
+ title: "Preferred output style",
752
+ onCancel,
753
+ hideInputGuide: t5,
754
+ hideBorder: t6,
755
+ children: t8
756
+ }, undefined, false, undefined, this);
757
+ $[11] = onCancel;
758
+ $[12] = t5;
759
+ $[13] = t6;
760
+ $[14] = t8;
761
+ $[15] = t9;
762
+ } else {
763
+ t9 = $[15];
764
+ }
765
+ return t9;
766
+ }
767
+ var import_compiler_runtime3, import_react2, jsx_dev_runtime3, DEFAULT_OUTPUT_STYLE_LABEL = "Default", DEFAULT_OUTPUT_STYLE_DESCRIPTION = "Claude completes coding tasks efficiently and provides concise responses";
768
+ var init_OutputStylePicker = __esm(() => {
769
+ init_outputStyles();
770
+ init_ink();
771
+ init_cwd();
772
+ init_select();
773
+ init_Dialog();
774
+ import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
775
+ import_react2 = __toESM(require_react(), 1);
776
+ jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
777
+ });
778
+
779
+ // src/components/LanguagePicker.tsx
780
+ function LanguagePicker(t0) {
781
+ const $ = import_compiler_runtime4.c(13);
782
+ const {
783
+ initialLanguage,
784
+ onComplete,
785
+ onCancel
786
+ } = t0;
787
+ const [language, setLanguage] = import_react3.useState(initialLanguage);
788
+ const [cursorOffset, setCursorOffset] = import_react3.useState((initialLanguage ?? "").length);
789
+ let t1;
790
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
791
+ t1 = {
792
+ context: "Settings"
793
+ };
794
+ $[0] = t1;
795
+ } else {
796
+ t1 = $[0];
797
+ }
798
+ useKeybinding("confirm:no", onCancel, t1);
799
+ let t2;
800
+ if ($[1] !== language || $[2] !== onComplete) {
801
+ t2 = function handleSubmit2() {
802
+ const trimmed = language?.trim();
803
+ onComplete(trimmed || undefined);
804
+ };
805
+ $[1] = language;
806
+ $[2] = onComplete;
807
+ $[3] = t2;
808
+ } else {
809
+ t2 = $[3];
810
+ }
811
+ const handleSubmit = t2;
812
+ let t3;
813
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
814
+ t3 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
815
+ children: "Enter your preferred response and voice language:"
816
+ }, undefined, false, undefined, this);
817
+ $[4] = t3;
818
+ } else {
819
+ t3 = $[4];
820
+ }
821
+ let t4;
822
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
823
+ t4 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
824
+ children: figures_default.pointer
825
+ }, undefined, false, undefined, this);
826
+ $[5] = t4;
827
+ } else {
828
+ t4 = $[5];
829
+ }
830
+ const t5 = language ?? "";
831
+ let t6;
832
+ if ($[6] !== cursorOffset || $[7] !== handleSubmit || $[8] !== t5) {
833
+ t6 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
834
+ flexDirection: "row",
835
+ gap: 1,
836
+ children: [
837
+ t4,
838
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(TextInput, {
839
+ value: t5,
840
+ onChange: setLanguage,
841
+ onSubmit: handleSubmit,
842
+ focus: true,
843
+ showCursor: true,
844
+ placeholder: `e.g., Japanese, \u65E5\u672C\u8A9E, Espa\xF1ol${figures_default.ellipsis}`,
845
+ columns: 60,
846
+ cursorOffset,
847
+ onChangeCursorOffset: setCursorOffset
848
+ }, undefined, false, undefined, this)
849
+ ]
850
+ }, undefined, true, undefined, this);
851
+ $[6] = cursorOffset;
852
+ $[7] = handleSubmit;
853
+ $[8] = t5;
854
+ $[9] = t6;
855
+ } else {
856
+ t6 = $[9];
857
+ }
858
+ let t7;
859
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
860
+ t7 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
861
+ dimColor: true,
862
+ children: "Leave empty for default (English)"
863
+ }, undefined, false, undefined, this);
864
+ $[10] = t7;
865
+ } else {
866
+ t7 = $[10];
867
+ }
868
+ let t8;
869
+ if ($[11] !== t6) {
870
+ t8 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
871
+ flexDirection: "column",
872
+ gap: 1,
873
+ children: [
874
+ t3,
875
+ t6,
876
+ t7
877
+ ]
878
+ }, undefined, true, undefined, this);
879
+ $[11] = t6;
880
+ $[12] = t8;
881
+ } else {
882
+ t8 = $[12];
883
+ }
884
+ return t8;
885
+ }
886
+ var import_compiler_runtime4, import_react3, jsx_dev_runtime4;
887
+ var init_LanguagePicker = __esm(() => {
888
+ init_figures();
889
+ init_ink();
890
+ init_useKeybinding();
891
+ init_TextInput();
892
+ import_compiler_runtime4 = __toESM(require_compiler_runtime(), 1);
893
+ import_react3 = __toESM(require_react(), 1);
894
+ jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
895
+ });
896
+
897
+ // src/components/Settings/Config.tsx
898
+ function Config({
899
+ onClose,
900
+ context,
901
+ setTabsHidden,
902
+ onIsSearchModeChange,
903
+ contentHeight
904
+ }) {
905
+ const { headerFocused, focusHeader } = useTabHeaderFocus();
906
+ const insideModal = useIsInsideModal();
907
+ const [, setTheme] = useTheme();
908
+ const themeSetting = useThemeSetting();
909
+ const [globalConfig, setGlobalConfig] = import_react4.useState(getGlobalConfig());
910
+ const initialConfig = React2.useRef(getGlobalConfig());
911
+ const [settingsData, setSettingsData] = import_react4.useState(getInitialSettings());
912
+ const initialSettingsData = React2.useRef(getInitialSettings());
913
+ const [currentOutputStyle, setCurrentOutputStyle] = import_react4.useState(settingsData?.outputStyle || DEFAULT_OUTPUT_STYLE_NAME);
914
+ const initialOutputStyle = React2.useRef(currentOutputStyle);
915
+ const [currentLanguage, setCurrentLanguage] = import_react4.useState(settingsData?.language);
916
+ const initialLanguage = React2.useRef(currentLanguage);
917
+ const [selectedIndex, setSelectedIndex] = import_react4.useState(0);
918
+ const [scrollOffset, setScrollOffset] = import_react4.useState(0);
919
+ const [isSearchMode, setIsSearchMode] = import_react4.useState(true);
920
+ const isTerminalFocused = useTerminalFocus();
921
+ const { rows } = useTerminalSize();
922
+ const paneCap = contentHeight ?? Math.min(Math.floor(rows * 0.8), 30);
923
+ const maxVisible = Math.max(5, paneCap - 10);
924
+ const mainLoopModel = useAppState((s) => s.mainLoopModel);
925
+ const verbose = useAppState((s_0) => s_0.verbose);
926
+ const thinkingEnabled = useAppState((s_1) => s_1.thinkingEnabled);
927
+ const isFastMode = useAppState((s_2) => isFastModeEnabled() ? s_2.fastMode : false);
928
+ const promptSuggestionEnabled = useAppState((s_3) => s_3.promptSuggestionEnabled);
929
+ const showAutoInDefaultModePicker = false;
930
+ const showDefaultViewPicker = false;
931
+ const setAppState = useSetAppState();
932
+ const [changes, setChanges] = import_react4.useState({});
933
+ const initialThinkingEnabled = React2.useRef(thinkingEnabled);
934
+ const [initialLocalSettings] = import_react4.useState(() => getSettingsForSource("localSettings"));
935
+ const [initialUserSettings] = import_react4.useState(() => getSettingsForSource("userSettings"));
936
+ const initialThemeSetting = React2.useRef(themeSetting);
937
+ const store = useAppStateStore();
938
+ const [initialAppState] = import_react4.useState(() => {
939
+ const s_4 = store.getState();
940
+ return {
941
+ mainLoopModel: s_4.mainLoopModel,
942
+ mainLoopModelForSession: s_4.mainLoopModelForSession,
943
+ verbose: s_4.verbose,
944
+ thinkingEnabled: s_4.thinkingEnabled,
945
+ fastMode: s_4.fastMode,
946
+ promptSuggestionEnabled: s_4.promptSuggestionEnabled,
947
+ isBriefOnly: s_4.isBriefOnly,
948
+ replBridgeEnabled: s_4.replBridgeEnabled,
949
+ replBridgeOutboundOnly: s_4.replBridgeOutboundOnly,
950
+ settings: s_4.settings
951
+ };
952
+ });
953
+ const [initialUserMsgOptIn] = import_react4.useState(() => getUserMsgOptIn());
954
+ const isDirty = React2.useRef(false);
955
+ const [showThinkingWarning, setShowThinkingWarning] = import_react4.useState(false);
956
+ const [showSubmenu, setShowSubmenu] = import_react4.useState(null);
957
+ const {
958
+ query: searchQuery,
959
+ setQuery: setSearchQuery,
960
+ cursorOffset: searchCursorOffset
961
+ } = useSearchInput({
962
+ isActive: isSearchMode && showSubmenu === null && !headerFocused,
963
+ onExit: () => setIsSearchMode(false),
964
+ onExitUp: focusHeader,
965
+ passthroughCtrlKeys: ["c", "d"]
966
+ });
967
+ const ownsEsc = isSearchMode && !headerFocused;
968
+ React2.useEffect(() => {
969
+ onIsSearchModeChange?.(ownsEsc);
970
+ }, [ownsEsc, onIsSearchModeChange]);
971
+ const isConnectedToIde = hasAccessToIDEExtensionDiffFeature(context.options.mcpClients);
972
+ const isFileCheckpointingAvailable = !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING);
973
+ const memoryFiles = React2.use(getMemoryFiles(true));
974
+ const shouldShowExternalIncludesToggle = hasExternalClaudeMdIncludes(memoryFiles);
975
+ const autoUpdaterDisabledReason = getAutoUpdaterDisabledReason();
976
+ function onChangeMainModelConfig(value) {
977
+ const previousModel = mainLoopModel;
978
+ logEvent("tengu_config_model_changed", {
979
+ from_model: previousModel,
980
+ to_model: value
981
+ });
982
+ setAppState((prev) => ({
983
+ ...prev,
984
+ mainLoopModel: value,
985
+ mainLoopModelForSession: null
986
+ }));
987
+ setChanges((prev_0) => {
988
+ const valStr = modelDisplayString(value) + (isBilledAsExtraUsage(value, false, isOpus1mMergeEnabled()) ? " \xB7 Billed as extra usage" : "");
989
+ if ("model" in prev_0) {
990
+ const { model, ...rest } = prev_0;
991
+ return {
992
+ ...rest,
993
+ model: valStr
994
+ };
995
+ }
996
+ return {
997
+ ...prev_0,
998
+ model: valStr
999
+ };
1000
+ });
1001
+ }
1002
+ function onChangeVerbose(value_0) {
1003
+ saveGlobalConfig((current) => ({
1004
+ ...current,
1005
+ verbose: value_0
1006
+ }));
1007
+ setGlobalConfig({
1008
+ ...getGlobalConfig(),
1009
+ verbose: value_0
1010
+ });
1011
+ setAppState((prev_1) => ({
1012
+ ...prev_1,
1013
+ verbose: value_0
1014
+ }));
1015
+ setChanges((prev_2) => {
1016
+ if ("verbose" in prev_2) {
1017
+ const { verbose: verbose_0, ...rest_0 } = prev_2;
1018
+ return rest_0;
1019
+ }
1020
+ return {
1021
+ ...prev_2,
1022
+ verbose: value_0
1023
+ };
1024
+ });
1025
+ }
1026
+ const settingsItems = [
1027
+ {
1028
+ id: "autoCompactEnabled",
1029
+ label: "Auto-compact",
1030
+ value: globalConfig.autoCompactEnabled,
1031
+ type: "boolean",
1032
+ onChange(autoCompactEnabled) {
1033
+ saveGlobalConfig((current_0) => ({
1034
+ ...current_0,
1035
+ autoCompactEnabled
1036
+ }));
1037
+ setGlobalConfig({
1038
+ ...getGlobalConfig(),
1039
+ autoCompactEnabled
1040
+ });
1041
+ logEvent("tengu_auto_compact_setting_changed", {
1042
+ enabled: autoCompactEnabled
1043
+ });
1044
+ }
1045
+ },
1046
+ {
1047
+ id: "spinnerTipsEnabled",
1048
+ label: "Show tips",
1049
+ value: settingsData?.spinnerTipsEnabled ?? true,
1050
+ type: "boolean",
1051
+ onChange(spinnerTipsEnabled) {
1052
+ updateSettingsForSource("localSettings", {
1053
+ spinnerTipsEnabled
1054
+ });
1055
+ setSettingsData((prev_3) => ({
1056
+ ...prev_3,
1057
+ spinnerTipsEnabled
1058
+ }));
1059
+ logEvent("tengu_tips_setting_changed", {
1060
+ enabled: spinnerTipsEnabled
1061
+ });
1062
+ }
1063
+ },
1064
+ {
1065
+ id: "prefersReducedMotion",
1066
+ label: "Reduce motion",
1067
+ value: settingsData?.prefersReducedMotion ?? false,
1068
+ type: "boolean",
1069
+ onChange(prefersReducedMotion) {
1070
+ updateSettingsForSource("localSettings", {
1071
+ prefersReducedMotion
1072
+ });
1073
+ setSettingsData((prev_4) => ({
1074
+ ...prev_4,
1075
+ prefersReducedMotion
1076
+ }));
1077
+ setAppState((prev_5) => ({
1078
+ ...prev_5,
1079
+ settings: {
1080
+ ...prev_5.settings,
1081
+ prefersReducedMotion
1082
+ }
1083
+ }));
1084
+ logEvent("tengu_reduce_motion_setting_changed", {
1085
+ enabled: prefersReducedMotion
1086
+ });
1087
+ }
1088
+ },
1089
+ {
1090
+ id: "thinkingEnabled",
1091
+ label: "Thinking mode",
1092
+ value: thinkingEnabled ?? true,
1093
+ type: "boolean",
1094
+ onChange(enabled) {
1095
+ setAppState((prev_6) => ({
1096
+ ...prev_6,
1097
+ thinkingEnabled: enabled
1098
+ }));
1099
+ updateSettingsForSource("userSettings", {
1100
+ alwaysThinkingEnabled: enabled ? undefined : false
1101
+ });
1102
+ logEvent("tengu_thinking_toggled", {
1103
+ enabled
1104
+ });
1105
+ }
1106
+ },
1107
+ ...isFastModeEnabled() && isFastModeAvailable() ? [
1108
+ {
1109
+ id: "fastMode",
1110
+ label: `Fast mode (${FAST_MODE_MODEL_DISPLAY} only)`,
1111
+ value: !!isFastMode,
1112
+ type: "boolean",
1113
+ onChange(enabled_0) {
1114
+ clearFastModeCooldown();
1115
+ updateSettingsForSource("userSettings", {
1116
+ fastMode: enabled_0 ? true : undefined
1117
+ });
1118
+ if (enabled_0) {
1119
+ setAppState((prev_7) => ({
1120
+ ...prev_7,
1121
+ mainLoopModel: getFastModeModel(),
1122
+ mainLoopModelForSession: null,
1123
+ fastMode: true
1124
+ }));
1125
+ setChanges((prev_8) => ({
1126
+ ...prev_8,
1127
+ model: getFastModeModel(),
1128
+ "Fast mode": "ON"
1129
+ }));
1130
+ } else {
1131
+ setAppState((prev_9) => ({
1132
+ ...prev_9,
1133
+ fastMode: false
1134
+ }));
1135
+ setChanges((prev_10) => ({
1136
+ ...prev_10,
1137
+ "Fast mode": "OFF"
1138
+ }));
1139
+ }
1140
+ }
1141
+ }
1142
+ ] : [],
1143
+ ...getFeatureValue_CACHED_MAY_BE_STALE("tengu_chomp_inflection", false) ? [
1144
+ {
1145
+ id: "promptSuggestionEnabled",
1146
+ label: "Prompt suggestions",
1147
+ value: promptSuggestionEnabled,
1148
+ type: "boolean",
1149
+ onChange(enabled_1) {
1150
+ setAppState((prev_11) => ({
1151
+ ...prev_11,
1152
+ promptSuggestionEnabled: enabled_1
1153
+ }));
1154
+ updateSettingsForSource("userSettings", {
1155
+ promptSuggestionEnabled: enabled_1 ? undefined : false
1156
+ });
1157
+ }
1158
+ }
1159
+ ] : [],
1160
+ ...[],
1161
+ ...isFileCheckpointingAvailable ? [
1162
+ {
1163
+ id: "fileCheckpointingEnabled",
1164
+ label: "Rewind code (checkpoints)",
1165
+ value: globalConfig.fileCheckpointingEnabled,
1166
+ type: "boolean",
1167
+ onChange(enabled_3) {
1168
+ saveGlobalConfig((current_2) => ({
1169
+ ...current_2,
1170
+ fileCheckpointingEnabled: enabled_3
1171
+ }));
1172
+ setGlobalConfig({
1173
+ ...getGlobalConfig(),
1174
+ fileCheckpointingEnabled: enabled_3
1175
+ });
1176
+ logEvent("tengu_file_history_snapshots_setting_changed", {
1177
+ enabled: enabled_3
1178
+ });
1179
+ }
1180
+ }
1181
+ ] : [],
1182
+ {
1183
+ id: "verbose",
1184
+ label: "Verbose output",
1185
+ value: verbose,
1186
+ type: "boolean",
1187
+ onChange: onChangeVerbose
1188
+ },
1189
+ {
1190
+ id: "terminalProgressBarEnabled",
1191
+ label: "Terminal progress bar",
1192
+ value: globalConfig.terminalProgressBarEnabled,
1193
+ type: "boolean",
1194
+ onChange(terminalProgressBarEnabled) {
1195
+ saveGlobalConfig((current_3) => ({
1196
+ ...current_3,
1197
+ terminalProgressBarEnabled
1198
+ }));
1199
+ setGlobalConfig({
1200
+ ...getGlobalConfig(),
1201
+ terminalProgressBarEnabled
1202
+ });
1203
+ logEvent("tengu_terminal_progress_bar_setting_changed", {
1204
+ enabled: terminalProgressBarEnabled
1205
+ });
1206
+ }
1207
+ },
1208
+ ...getFeatureValue_CACHED_MAY_BE_STALE("tengu_terminal_sidebar", false) ? [
1209
+ {
1210
+ id: "showStatusInTerminalTab",
1211
+ label: "Show status in terminal tab",
1212
+ value: globalConfig.showStatusInTerminalTab ?? false,
1213
+ type: "boolean",
1214
+ onChange(showStatusInTerminalTab) {
1215
+ saveGlobalConfig((current_4) => ({
1216
+ ...current_4,
1217
+ showStatusInTerminalTab
1218
+ }));
1219
+ setGlobalConfig({
1220
+ ...getGlobalConfig(),
1221
+ showStatusInTerminalTab
1222
+ });
1223
+ logEvent("tengu_terminal_tab_status_setting_changed", {
1224
+ enabled: showStatusInTerminalTab
1225
+ });
1226
+ }
1227
+ }
1228
+ ] : [],
1229
+ {
1230
+ id: "showTurnDuration",
1231
+ label: "Show turn duration",
1232
+ value: globalConfig.showTurnDuration,
1233
+ type: "boolean",
1234
+ onChange(showTurnDuration) {
1235
+ saveGlobalConfig((current_5) => ({
1236
+ ...current_5,
1237
+ showTurnDuration
1238
+ }));
1239
+ setGlobalConfig({
1240
+ ...getGlobalConfig(),
1241
+ showTurnDuration
1242
+ });
1243
+ logEvent("tengu_show_turn_duration_setting_changed", {
1244
+ enabled: showTurnDuration
1245
+ });
1246
+ }
1247
+ },
1248
+ {
1249
+ id: "defaultPermissionMode",
1250
+ label: "Default permission mode",
1251
+ value: settingsData?.permissions?.defaultMode || "default",
1252
+ options: (() => {
1253
+ const priorityOrder = ["default", "plan"];
1254
+ const allModes = EXTERNAL_PERMISSION_MODES;
1255
+ const excluded = ["bypassPermissions"];
1256
+ if (false) {}
1257
+ return [...priorityOrder, ...allModes.filter((m) => !priorityOrder.includes(m) && !excluded.includes(m))];
1258
+ })(),
1259
+ type: "enum",
1260
+ onChange(mode) {
1261
+ const parsedMode = permissionModeFromString(mode);
1262
+ const validatedMode = isExternalPermissionMode(parsedMode) ? toExternalPermissionMode(parsedMode) : parsedMode;
1263
+ const result = updateSettingsForSource("userSettings", {
1264
+ permissions: {
1265
+ ...settingsData?.permissions,
1266
+ defaultMode: validatedMode
1267
+ }
1268
+ });
1269
+ if (result.error) {
1270
+ logError(result.error);
1271
+ return;
1272
+ }
1273
+ setSettingsData((prev_12) => ({
1274
+ ...prev_12,
1275
+ permissions: {
1276
+ ...prev_12?.permissions,
1277
+ defaultMode: validatedMode
1278
+ }
1279
+ }));
1280
+ setChanges((prev_13) => ({
1281
+ ...prev_13,
1282
+ defaultPermissionMode: mode
1283
+ }));
1284
+ logEvent("tengu_config_changed", {
1285
+ setting: "defaultPermissionMode",
1286
+ value: mode
1287
+ });
1288
+ }
1289
+ },
1290
+ ...[],
1291
+ {
1292
+ id: "respectGitignore",
1293
+ label: "Respect .gitignore in file picker",
1294
+ value: globalConfig.respectGitignore,
1295
+ type: "boolean",
1296
+ onChange(respectGitignore) {
1297
+ saveGlobalConfig((current_6) => ({
1298
+ ...current_6,
1299
+ respectGitignore
1300
+ }));
1301
+ setGlobalConfig({
1302
+ ...getGlobalConfig(),
1303
+ respectGitignore
1304
+ });
1305
+ logEvent("tengu_respect_gitignore_setting_changed", {
1306
+ enabled: respectGitignore
1307
+ });
1308
+ }
1309
+ },
1310
+ {
1311
+ id: "copyFullResponse",
1312
+ label: "Always copy full response (skip /copy picker)",
1313
+ value: globalConfig.copyFullResponse,
1314
+ type: "boolean",
1315
+ onChange(copyFullResponse) {
1316
+ saveGlobalConfig((current_7) => ({
1317
+ ...current_7,
1318
+ copyFullResponse
1319
+ }));
1320
+ setGlobalConfig({
1321
+ ...getGlobalConfig(),
1322
+ copyFullResponse
1323
+ });
1324
+ logEvent("tengu_config_changed", {
1325
+ setting: "copyFullResponse",
1326
+ value: String(copyFullResponse)
1327
+ });
1328
+ }
1329
+ },
1330
+ ...isFullscreenEnvEnabled() ? [
1331
+ {
1332
+ id: "copyOnSelect",
1333
+ label: "Copy on select",
1334
+ value: globalConfig.copyOnSelect ?? true,
1335
+ type: "boolean",
1336
+ onChange(copyOnSelect) {
1337
+ saveGlobalConfig((current_8) => ({
1338
+ ...current_8,
1339
+ copyOnSelect
1340
+ }));
1341
+ setGlobalConfig({
1342
+ ...getGlobalConfig(),
1343
+ copyOnSelect
1344
+ });
1345
+ logEvent("tengu_config_changed", {
1346
+ setting: "copyOnSelect",
1347
+ value: String(copyOnSelect)
1348
+ });
1349
+ }
1350
+ }
1351
+ ] : [],
1352
+ autoUpdaterDisabledReason ? {
1353
+ id: "autoUpdatesChannel",
1354
+ label: "Auto-update channel",
1355
+ value: "disabled",
1356
+ type: "managedEnum",
1357
+ onChange() {}
1358
+ } : {
1359
+ id: "autoUpdatesChannel",
1360
+ label: "Auto-update channel",
1361
+ value: settingsData?.autoUpdatesChannel ?? "latest",
1362
+ type: "managedEnum",
1363
+ onChange() {}
1364
+ },
1365
+ {
1366
+ id: "theme",
1367
+ label: "Theme",
1368
+ value: themeSetting,
1369
+ type: "managedEnum",
1370
+ onChange: setTheme
1371
+ },
1372
+ {
1373
+ id: "notifChannel",
1374
+ label: "Notifications",
1375
+ value: globalConfig.preferredNotifChannel,
1376
+ options: ["auto", "iterm2", "terminal_bell", "iterm2_with_bell", "kitty", "ghostty", "notifications_disabled"],
1377
+ type: "enum",
1378
+ onChange(notifChannel) {
1379
+ saveGlobalConfig((current_9) => ({
1380
+ ...current_9,
1381
+ preferredNotifChannel: notifChannel
1382
+ }));
1383
+ setGlobalConfig({
1384
+ ...getGlobalConfig(),
1385
+ preferredNotifChannel: notifChannel
1386
+ });
1387
+ }
1388
+ },
1389
+ ...[],
1390
+ {
1391
+ id: "outputStyle",
1392
+ label: "Output style",
1393
+ value: currentOutputStyle,
1394
+ type: "managedEnum",
1395
+ onChange: () => {}
1396
+ },
1397
+ ...showDefaultViewPicker ? [
1398
+ {
1399
+ id: "defaultView",
1400
+ label: "What you see by default",
1401
+ value: settingsData?.defaultView === undefined ? "default" : String(settingsData.defaultView),
1402
+ options: ["transcript", "chat", "default"],
1403
+ type: "enum",
1404
+ onChange(selected) {
1405
+ const defaultView = selected === "default" ? undefined : selected;
1406
+ updateSettingsForSource("localSettings", {
1407
+ defaultView
1408
+ });
1409
+ setSettingsData((prev_17) => ({
1410
+ ...prev_17,
1411
+ defaultView
1412
+ }));
1413
+ const nextBrief = defaultView === "chat";
1414
+ setAppState((prev_18) => {
1415
+ if (prev_18.isBriefOnly === nextBrief)
1416
+ return prev_18;
1417
+ return {
1418
+ ...prev_18,
1419
+ isBriefOnly: nextBrief
1420
+ };
1421
+ });
1422
+ setUserMsgOptIn(nextBrief);
1423
+ setChanges((prev_19) => ({
1424
+ ...prev_19,
1425
+ "Default view": selected
1426
+ }));
1427
+ logEvent("tengu_default_view_setting_changed", {
1428
+ value: defaultView ?? "unset"
1429
+ });
1430
+ }
1431
+ }
1432
+ ] : [],
1433
+ {
1434
+ id: "language",
1435
+ label: "Language",
1436
+ value: currentLanguage ?? "Default (English)",
1437
+ type: "managedEnum",
1438
+ onChange: () => {}
1439
+ },
1440
+ {
1441
+ id: "editorMode",
1442
+ label: "Editor mode",
1443
+ value: globalConfig.editorMode === "emacs" ? "normal" : globalConfig.editorMode || "normal",
1444
+ options: ["normal", "vim"],
1445
+ type: "enum",
1446
+ onChange(value_1) {
1447
+ saveGlobalConfig((current_13) => ({
1448
+ ...current_13,
1449
+ editorMode: value_1
1450
+ }));
1451
+ setGlobalConfig({
1452
+ ...getGlobalConfig(),
1453
+ editorMode: value_1
1454
+ });
1455
+ logEvent("tengu_editor_mode_changed", {
1456
+ mode: value_1,
1457
+ source: "config_panel"
1458
+ });
1459
+ }
1460
+ },
1461
+ {
1462
+ id: "prStatusFooterEnabled",
1463
+ label: "Show PR status footer",
1464
+ value: globalConfig.prStatusFooterEnabled ?? true,
1465
+ type: "boolean",
1466
+ onChange(enabled_4) {
1467
+ saveGlobalConfig((current_14) => {
1468
+ if (current_14.prStatusFooterEnabled === enabled_4)
1469
+ return current_14;
1470
+ return {
1471
+ ...current_14,
1472
+ prStatusFooterEnabled: enabled_4
1473
+ };
1474
+ });
1475
+ setGlobalConfig({
1476
+ ...getGlobalConfig(),
1477
+ prStatusFooterEnabled: enabled_4
1478
+ });
1479
+ logEvent("tengu_pr_status_footer_setting_changed", {
1480
+ enabled: enabled_4
1481
+ });
1482
+ }
1483
+ },
1484
+ {
1485
+ id: "model",
1486
+ label: "Model",
1487
+ value: mainLoopModel === null ? "Default (recommended)" : mainLoopModel,
1488
+ type: "managedEnum",
1489
+ onChange: onChangeMainModelConfig
1490
+ },
1491
+ ...isConnectedToIde ? [
1492
+ {
1493
+ id: "diffTool",
1494
+ label: "Diff tool",
1495
+ value: globalConfig.diffTool ?? "auto",
1496
+ options: ["terminal", "auto"],
1497
+ type: "enum",
1498
+ onChange(diffTool) {
1499
+ saveGlobalConfig((current_15) => ({
1500
+ ...current_15,
1501
+ diffTool
1502
+ }));
1503
+ setGlobalConfig({
1504
+ ...getGlobalConfig(),
1505
+ diffTool
1506
+ });
1507
+ logEvent("tengu_diff_tool_changed", {
1508
+ tool: diffTool,
1509
+ source: "config_panel"
1510
+ });
1511
+ }
1512
+ }
1513
+ ] : [],
1514
+ ...!isSupportedTerminal() ? [
1515
+ {
1516
+ id: "autoConnectIde",
1517
+ label: "Auto-connect to IDE (external terminal)",
1518
+ value: globalConfig.autoConnectIde ?? false,
1519
+ type: "boolean",
1520
+ onChange(autoConnectIde) {
1521
+ saveGlobalConfig((current_16) => ({
1522
+ ...current_16,
1523
+ autoConnectIde
1524
+ }));
1525
+ setGlobalConfig({
1526
+ ...getGlobalConfig(),
1527
+ autoConnectIde
1528
+ });
1529
+ logEvent("tengu_auto_connect_ide_changed", {
1530
+ enabled: autoConnectIde,
1531
+ source: "config_panel"
1532
+ });
1533
+ }
1534
+ }
1535
+ ] : [],
1536
+ ...isSupportedTerminal() ? [
1537
+ {
1538
+ id: "autoInstallIdeExtension",
1539
+ label: "Auto-install IDE extension",
1540
+ value: globalConfig.autoInstallIdeExtension ?? true,
1541
+ type: "boolean",
1542
+ onChange(autoInstallIdeExtension) {
1543
+ saveGlobalConfig((current_17) => ({
1544
+ ...current_17,
1545
+ autoInstallIdeExtension
1546
+ }));
1547
+ setGlobalConfig({
1548
+ ...getGlobalConfig(),
1549
+ autoInstallIdeExtension
1550
+ });
1551
+ logEvent("tengu_auto_install_ide_extension_changed", {
1552
+ enabled: autoInstallIdeExtension,
1553
+ source: "config_panel"
1554
+ });
1555
+ }
1556
+ }
1557
+ ] : [],
1558
+ {
1559
+ id: "claudeInChromeDefaultEnabled",
1560
+ label: "Claude in Chrome enabled by default",
1561
+ value: globalConfig.claudeInChromeDefaultEnabled ?? true,
1562
+ type: "boolean",
1563
+ onChange(enabled_5) {
1564
+ saveGlobalConfig((current_18) => ({
1565
+ ...current_18,
1566
+ claudeInChromeDefaultEnabled: enabled_5
1567
+ }));
1568
+ setGlobalConfig({
1569
+ ...getGlobalConfig(),
1570
+ claudeInChromeDefaultEnabled: enabled_5
1571
+ });
1572
+ logEvent("tengu_claude_in_chrome_setting_changed", {
1573
+ enabled: enabled_5
1574
+ });
1575
+ }
1576
+ },
1577
+ ...isAgentSwarmsEnabled() ? (() => {
1578
+ const cliOverride = getCliTeammateModeOverride();
1579
+ const label = cliOverride ? `Teammate mode [overridden: ${cliOverride}]` : "Teammate mode";
1580
+ return [
1581
+ {
1582
+ id: "teammateMode",
1583
+ label,
1584
+ value: globalConfig.teammateMode ?? "auto",
1585
+ options: ["auto", "tmux", "in-process"],
1586
+ type: "enum",
1587
+ onChange(mode_0) {
1588
+ if (mode_0 !== "auto" && mode_0 !== "tmux" && mode_0 !== "in-process") {
1589
+ return;
1590
+ }
1591
+ clearCliTeammateModeOverride(mode_0);
1592
+ saveGlobalConfig((current_19) => ({
1593
+ ...current_19,
1594
+ teammateMode: mode_0
1595
+ }));
1596
+ setGlobalConfig({
1597
+ ...getGlobalConfig(),
1598
+ teammateMode: mode_0
1599
+ });
1600
+ logEvent("tengu_teammate_mode_changed", {
1601
+ mode: mode_0
1602
+ });
1603
+ }
1604
+ },
1605
+ {
1606
+ id: "teammateDefaultModel",
1607
+ label: "Default teammate model",
1608
+ value: teammateModelDisplayString(globalConfig.teammateDefaultModel),
1609
+ type: "managedEnum",
1610
+ onChange() {}
1611
+ }
1612
+ ];
1613
+ })() : [],
1614
+ ...[],
1615
+ ...shouldShowExternalIncludesToggle ? [
1616
+ {
1617
+ id: "showExternalIncludesDialog",
1618
+ label: "External CLAUDE.md includes",
1619
+ value: (() => {
1620
+ const projectConfig = getCurrentProjectConfig();
1621
+ if (projectConfig.hasClaudeMdExternalIncludesApproved) {
1622
+ return "true";
1623
+ } else {
1624
+ return "false";
1625
+ }
1626
+ })(),
1627
+ type: "managedEnum",
1628
+ onChange() {}
1629
+ }
1630
+ ] : [],
1631
+ ...process.env.ANTHROPIC_API_KEY && !isRunningOnHomespace() ? [
1632
+ {
1633
+ id: "apiKey",
1634
+ label: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1635
+ children: [
1636
+ "Use custom API key: ",
1637
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1638
+ bold: true,
1639
+ children: normalizeApiKeyForConfig(process.env.ANTHROPIC_API_KEY)
1640
+ }, undefined, false, undefined, this)
1641
+ ]
1642
+ }, undefined, true, undefined, this),
1643
+ searchText: "Use custom API key",
1644
+ value: Boolean(process.env.ANTHROPIC_API_KEY && globalConfig.customApiKeyResponses?.approved?.includes(normalizeApiKeyForConfig(process.env.ANTHROPIC_API_KEY))),
1645
+ type: "boolean",
1646
+ onChange(useCustomKey) {
1647
+ saveGlobalConfig((current_22) => {
1648
+ const updated = {
1649
+ ...current_22
1650
+ };
1651
+ if (!updated.customApiKeyResponses) {
1652
+ updated.customApiKeyResponses = {
1653
+ approved: [],
1654
+ rejected: []
1655
+ };
1656
+ }
1657
+ if (!updated.customApiKeyResponses.approved) {
1658
+ updated.customApiKeyResponses = {
1659
+ ...updated.customApiKeyResponses,
1660
+ approved: []
1661
+ };
1662
+ }
1663
+ if (!updated.customApiKeyResponses.rejected) {
1664
+ updated.customApiKeyResponses = {
1665
+ ...updated.customApiKeyResponses,
1666
+ rejected: []
1667
+ };
1668
+ }
1669
+ if (process.env.ANTHROPIC_API_KEY) {
1670
+ const truncatedKey = normalizeApiKeyForConfig(process.env.ANTHROPIC_API_KEY);
1671
+ if (useCustomKey) {
1672
+ updated.customApiKeyResponses = {
1673
+ ...updated.customApiKeyResponses,
1674
+ approved: [
1675
+ ...(updated.customApiKeyResponses.approved ?? []).filter((k) => k !== truncatedKey),
1676
+ truncatedKey
1677
+ ],
1678
+ rejected: (updated.customApiKeyResponses.rejected ?? []).filter((k_0) => k_0 !== truncatedKey)
1679
+ };
1680
+ } else {
1681
+ updated.customApiKeyResponses = {
1682
+ ...updated.customApiKeyResponses,
1683
+ approved: (updated.customApiKeyResponses.approved ?? []).filter((k_1) => k_1 !== truncatedKey),
1684
+ rejected: [
1685
+ ...(updated.customApiKeyResponses.rejected ?? []).filter((k_2) => k_2 !== truncatedKey),
1686
+ truncatedKey
1687
+ ]
1688
+ };
1689
+ }
1690
+ }
1691
+ return updated;
1692
+ });
1693
+ setGlobalConfig(getGlobalConfig());
1694
+ }
1695
+ }
1696
+ ] : []
1697
+ ];
1698
+ const filteredSettingsItems = React2.useMemo(() => {
1699
+ if (!searchQuery)
1700
+ return settingsItems;
1701
+ const lowerQuery = searchQuery.toLowerCase();
1702
+ return settingsItems.filter((setting) => {
1703
+ if (setting.id.toLowerCase().includes(lowerQuery))
1704
+ return true;
1705
+ const searchableText = "searchText" in setting ? setting.searchText : setting.label;
1706
+ return searchableText.toLowerCase().includes(lowerQuery);
1707
+ });
1708
+ }, [settingsItems, searchQuery]);
1709
+ React2.useEffect(() => {
1710
+ if (selectedIndex >= filteredSettingsItems.length) {
1711
+ const newIndex = Math.max(0, filteredSettingsItems.length - 1);
1712
+ setSelectedIndex(newIndex);
1713
+ setScrollOffset(Math.max(0, newIndex - maxVisible + 1));
1714
+ return;
1715
+ }
1716
+ setScrollOffset((prev_21) => {
1717
+ if (selectedIndex < prev_21)
1718
+ return selectedIndex;
1719
+ if (selectedIndex >= prev_21 + maxVisible)
1720
+ return selectedIndex - maxVisible + 1;
1721
+ return prev_21;
1722
+ });
1723
+ }, [filteredSettingsItems.length, selectedIndex, maxVisible]);
1724
+ const adjustScrollOffset = import_react4.useCallback((newIndex_0) => {
1725
+ setScrollOffset((prev_22) => {
1726
+ if (newIndex_0 < prev_22)
1727
+ return newIndex_0;
1728
+ if (newIndex_0 >= prev_22 + maxVisible)
1729
+ return newIndex_0 - maxVisible + 1;
1730
+ return prev_22;
1731
+ });
1732
+ }, [maxVisible]);
1733
+ const handleSaveAndClose = import_react4.useCallback(() => {
1734
+ if (showSubmenu !== null) {
1735
+ return;
1736
+ }
1737
+ const formattedChanges = Object.entries(changes).map(([key, value_2]) => {
1738
+ logEvent("tengu_config_changed", {
1739
+ key,
1740
+ value: value_2
1741
+ });
1742
+ return `Set ${key} to ${source_default.bold(value_2)}`;
1743
+ });
1744
+ const effectiveApiKey = isRunningOnHomespace() ? undefined : process.env.ANTHROPIC_API_KEY;
1745
+ const initialUsingCustomKey = Boolean(effectiveApiKey && initialConfig.current.customApiKeyResponses?.approved?.includes(normalizeApiKeyForConfig(effectiveApiKey)));
1746
+ const currentUsingCustomKey = Boolean(effectiveApiKey && globalConfig.customApiKeyResponses?.approved?.includes(normalizeApiKeyForConfig(effectiveApiKey)));
1747
+ if (initialUsingCustomKey !== currentUsingCustomKey) {
1748
+ formattedChanges.push(`${currentUsingCustomKey ? "Enabled" : "Disabled"} custom API key`);
1749
+ logEvent("tengu_config_changed", {
1750
+ key: "env.ANTHROPIC_API_KEY",
1751
+ value: currentUsingCustomKey
1752
+ });
1753
+ }
1754
+ if (globalConfig.theme !== initialConfig.current.theme) {
1755
+ formattedChanges.push(`Set theme to ${source_default.bold(globalConfig.theme)}`);
1756
+ }
1757
+ if (globalConfig.preferredNotifChannel !== initialConfig.current.preferredNotifChannel) {
1758
+ formattedChanges.push(`Set notifications to ${source_default.bold(globalConfig.preferredNotifChannel)}`);
1759
+ }
1760
+ if (currentOutputStyle !== initialOutputStyle.current) {
1761
+ formattedChanges.push(`Set output style to ${source_default.bold(currentOutputStyle)}`);
1762
+ }
1763
+ if (currentLanguage !== initialLanguage.current) {
1764
+ formattedChanges.push(`Set response language to ${source_default.bold(currentLanguage ?? "Default (English)")}`);
1765
+ }
1766
+ if (globalConfig.editorMode !== initialConfig.current.editorMode) {
1767
+ formattedChanges.push(`Set editor mode to ${source_default.bold(globalConfig.editorMode || "emacs")}`);
1768
+ }
1769
+ if (globalConfig.diffTool !== initialConfig.current.diffTool) {
1770
+ formattedChanges.push(`Set diff tool to ${source_default.bold(globalConfig.diffTool)}`);
1771
+ }
1772
+ if (globalConfig.autoConnectIde !== initialConfig.current.autoConnectIde) {
1773
+ formattedChanges.push(`${globalConfig.autoConnectIde ? "Enabled" : "Disabled"} auto-connect to IDE`);
1774
+ }
1775
+ if (globalConfig.autoInstallIdeExtension !== initialConfig.current.autoInstallIdeExtension) {
1776
+ formattedChanges.push(`${globalConfig.autoInstallIdeExtension ? "Enabled" : "Disabled"} auto-install IDE extension`);
1777
+ }
1778
+ if (globalConfig.autoCompactEnabled !== initialConfig.current.autoCompactEnabled) {
1779
+ formattedChanges.push(`${globalConfig.autoCompactEnabled ? "Enabled" : "Disabled"} auto-compact`);
1780
+ }
1781
+ if (globalConfig.respectGitignore !== initialConfig.current.respectGitignore) {
1782
+ formattedChanges.push(`${globalConfig.respectGitignore ? "Enabled" : "Disabled"} respect .gitignore in file picker`);
1783
+ }
1784
+ if (globalConfig.copyFullResponse !== initialConfig.current.copyFullResponse) {
1785
+ formattedChanges.push(`${globalConfig.copyFullResponse ? "Enabled" : "Disabled"} always copy full response`);
1786
+ }
1787
+ if (globalConfig.copyOnSelect !== initialConfig.current.copyOnSelect) {
1788
+ formattedChanges.push(`${globalConfig.copyOnSelect ? "Enabled" : "Disabled"} copy on select`);
1789
+ }
1790
+ if (globalConfig.terminalProgressBarEnabled !== initialConfig.current.terminalProgressBarEnabled) {
1791
+ formattedChanges.push(`${globalConfig.terminalProgressBarEnabled ? "Enabled" : "Disabled"} terminal progress bar`);
1792
+ }
1793
+ if (globalConfig.showStatusInTerminalTab !== initialConfig.current.showStatusInTerminalTab) {
1794
+ formattedChanges.push(`${globalConfig.showStatusInTerminalTab ? "Enabled" : "Disabled"} terminal tab status`);
1795
+ }
1796
+ if (globalConfig.showTurnDuration !== initialConfig.current.showTurnDuration) {
1797
+ formattedChanges.push(`${globalConfig.showTurnDuration ? "Enabled" : "Disabled"} turn duration`);
1798
+ }
1799
+ if (globalConfig.remoteControlAtStartup !== initialConfig.current.remoteControlAtStartup) {
1800
+ const remoteLabel = globalConfig.remoteControlAtStartup === undefined ? "Reset Remote Control to default" : `${globalConfig.remoteControlAtStartup ? "Enabled" : "Disabled"} Remote Control for all sessions`;
1801
+ formattedChanges.push(remoteLabel);
1802
+ }
1803
+ if (settingsData?.autoUpdatesChannel !== initialSettingsData.current?.autoUpdatesChannel) {
1804
+ formattedChanges.push(`Set auto-update channel to ${source_default.bold(settingsData?.autoUpdatesChannel ?? "latest")}`);
1805
+ }
1806
+ if (formattedChanges.length > 0) {
1807
+ onClose(formattedChanges.join(`
1808
+ `));
1809
+ } else {
1810
+ onClose("Config dialog dismissed", {
1811
+ display: "system"
1812
+ });
1813
+ }
1814
+ }, [
1815
+ showSubmenu,
1816
+ changes,
1817
+ globalConfig,
1818
+ mainLoopModel,
1819
+ currentOutputStyle,
1820
+ currentLanguage,
1821
+ settingsData?.autoUpdatesChannel,
1822
+ isFastModeEnabled() ? settingsData?.fastMode : undefined,
1823
+ onClose
1824
+ ]);
1825
+ const revertChanges = import_react4.useCallback(() => {
1826
+ if (themeSetting !== initialThemeSetting.current) {
1827
+ setTheme(initialThemeSetting.current);
1828
+ }
1829
+ saveGlobalConfig(() => initialConfig.current);
1830
+ const il = initialLocalSettings;
1831
+ updateSettingsForSource("localSettings", {
1832
+ spinnerTipsEnabled: il?.spinnerTipsEnabled,
1833
+ prefersReducedMotion: il?.prefersReducedMotion,
1834
+ defaultView: il?.defaultView,
1835
+ outputStyle: il?.outputStyle
1836
+ });
1837
+ const iu = initialUserSettings;
1838
+ updateSettingsForSource("userSettings", {
1839
+ alwaysThinkingEnabled: iu?.alwaysThinkingEnabled,
1840
+ fastMode: iu?.fastMode,
1841
+ promptSuggestionEnabled: iu?.promptSuggestionEnabled,
1842
+ autoUpdatesChannel: iu?.autoUpdatesChannel,
1843
+ minimumVersion: iu?.minimumVersion,
1844
+ language: iu?.language,
1845
+ ...{},
1846
+ syntaxHighlightingDisabled: iu?.syntaxHighlightingDisabled,
1847
+ permissions: iu?.permissions === undefined ? undefined : {
1848
+ ...iu.permissions,
1849
+ defaultMode: iu.permissions.defaultMode
1850
+ }
1851
+ });
1852
+ const ia = initialAppState;
1853
+ setAppState((prev_23) => ({
1854
+ ...prev_23,
1855
+ mainLoopModel: ia.mainLoopModel,
1856
+ mainLoopModelForSession: ia.mainLoopModelForSession,
1857
+ verbose: ia.verbose,
1858
+ thinkingEnabled: ia.thinkingEnabled,
1859
+ fastMode: ia.fastMode,
1860
+ promptSuggestionEnabled: ia.promptSuggestionEnabled,
1861
+ isBriefOnly: ia.isBriefOnly,
1862
+ replBridgeEnabled: ia.replBridgeEnabled,
1863
+ replBridgeOutboundOnly: ia.replBridgeOutboundOnly,
1864
+ settings: ia.settings,
1865
+ toolPermissionContext: transitionPlanAutoMode(prev_23.toolPermissionContext)
1866
+ }));
1867
+ if (getUserMsgOptIn() !== initialUserMsgOptIn) {
1868
+ setUserMsgOptIn(initialUserMsgOptIn);
1869
+ }
1870
+ }, [
1871
+ themeSetting,
1872
+ setTheme,
1873
+ initialLocalSettings,
1874
+ initialUserSettings,
1875
+ initialAppState,
1876
+ initialUserMsgOptIn,
1877
+ setAppState
1878
+ ]);
1879
+ const handleEscape = import_react4.useCallback(() => {
1880
+ if (showSubmenu !== null) {
1881
+ return;
1882
+ }
1883
+ if (isDirty.current) {
1884
+ revertChanges();
1885
+ }
1886
+ onClose("Config dialog dismissed", {
1887
+ display: "system"
1888
+ });
1889
+ }, [showSubmenu, revertChanges, onClose]);
1890
+ useKeybinding("confirm:no", handleEscape, {
1891
+ context: "Settings",
1892
+ isActive: showSubmenu === null && !isSearchMode && !headerFocused
1893
+ });
1894
+ useKeybinding("settings:close", handleSaveAndClose, {
1895
+ context: "Settings",
1896
+ isActive: showSubmenu === null && !isSearchMode && !headerFocused
1897
+ });
1898
+ const toggleSetting = import_react4.useCallback(() => {
1899
+ const setting_0 = filteredSettingsItems[selectedIndex];
1900
+ if (!setting_0 || !setting_0.onChange) {
1901
+ return;
1902
+ }
1903
+ if (setting_0.type === "boolean") {
1904
+ isDirty.current = true;
1905
+ setting_0.onChange(!setting_0.value);
1906
+ if (setting_0.id === "thinkingEnabled") {
1907
+ const newValue = !setting_0.value;
1908
+ const backToInitial = newValue === initialThinkingEnabled.current;
1909
+ if (backToInitial) {
1910
+ setShowThinkingWarning(false);
1911
+ } else if (context.messages.some((m_0) => m_0.type === "assistant")) {
1912
+ setShowThinkingWarning(true);
1913
+ }
1914
+ }
1915
+ return;
1916
+ }
1917
+ if (setting_0.id === "theme" || setting_0.id === "model" || setting_0.id === "teammateDefaultModel" || setting_0.id === "showExternalIncludesDialog" || setting_0.id === "outputStyle" || setting_0.id === "language") {
1918
+ switch (setting_0.id) {
1919
+ case "theme":
1920
+ setShowSubmenu("Theme");
1921
+ setTabsHidden(true);
1922
+ return;
1923
+ case "model":
1924
+ setShowSubmenu("Model");
1925
+ setTabsHidden(true);
1926
+ return;
1927
+ case "teammateDefaultModel":
1928
+ setShowSubmenu("TeammateModel");
1929
+ setTabsHidden(true);
1930
+ return;
1931
+ case "showExternalIncludesDialog":
1932
+ setShowSubmenu("ExternalIncludes");
1933
+ setTabsHidden(true);
1934
+ return;
1935
+ case "outputStyle":
1936
+ setShowSubmenu("OutputStyle");
1937
+ setTabsHidden(true);
1938
+ return;
1939
+ case "language":
1940
+ setShowSubmenu("Language");
1941
+ setTabsHidden(true);
1942
+ return;
1943
+ }
1944
+ }
1945
+ if (setting_0.id === "autoUpdatesChannel") {
1946
+ if (autoUpdaterDisabledReason) {
1947
+ setShowSubmenu("EnableAutoUpdates");
1948
+ setTabsHidden(true);
1949
+ return;
1950
+ }
1951
+ const currentChannel = settingsData?.autoUpdatesChannel ?? "latest";
1952
+ if (currentChannel === "latest") {
1953
+ setShowSubmenu("ChannelDowngrade");
1954
+ setTabsHidden(true);
1955
+ } else {
1956
+ isDirty.current = true;
1957
+ updateSettingsForSource("userSettings", {
1958
+ autoUpdatesChannel: "latest",
1959
+ minimumVersion: undefined
1960
+ });
1961
+ setSettingsData((prev_24) => ({
1962
+ ...prev_24,
1963
+ autoUpdatesChannel: "latest",
1964
+ minimumVersion: undefined
1965
+ }));
1966
+ logEvent("tengu_autoupdate_channel_changed", {
1967
+ channel: "latest"
1968
+ });
1969
+ }
1970
+ return;
1971
+ }
1972
+ if (setting_0.type === "enum") {
1973
+ isDirty.current = true;
1974
+ const currentIndex = setting_0.options.indexOf(setting_0.value);
1975
+ const nextIndex = (currentIndex + 1) % setting_0.options.length;
1976
+ setting_0.onChange(setting_0.options[nextIndex]);
1977
+ return;
1978
+ }
1979
+ }, [
1980
+ autoUpdaterDisabledReason,
1981
+ filteredSettingsItems,
1982
+ selectedIndex,
1983
+ settingsData?.autoUpdatesChannel,
1984
+ setTabsHidden
1985
+ ]);
1986
+ const moveSelection = (delta) => {
1987
+ setShowThinkingWarning(false);
1988
+ const newIndex_1 = Math.max(0, Math.min(filteredSettingsItems.length - 1, selectedIndex + delta));
1989
+ setSelectedIndex(newIndex_1);
1990
+ adjustScrollOffset(newIndex_1);
1991
+ };
1992
+ useKeybindings({
1993
+ "select:previous": () => {
1994
+ if (selectedIndex === 0) {
1995
+ setShowThinkingWarning(false);
1996
+ setIsSearchMode(true);
1997
+ setScrollOffset(0);
1998
+ } else {
1999
+ moveSelection(-1);
2000
+ }
2001
+ },
2002
+ "select:next": () => moveSelection(1),
2003
+ "scroll:lineUp": () => moveSelection(-1),
2004
+ "scroll:lineDown": () => moveSelection(1),
2005
+ "select:accept": toggleSetting,
2006
+ "settings:search": () => {
2007
+ setIsSearchMode(true);
2008
+ setSearchQuery("");
2009
+ }
2010
+ }, {
2011
+ context: "Settings",
2012
+ isActive: showSubmenu === null && !isSearchMode && !headerFocused
2013
+ });
2014
+ const handleKeyDown = import_react4.useCallback((e) => {
2015
+ if (showSubmenu !== null)
2016
+ return;
2017
+ if (headerFocused)
2018
+ return;
2019
+ if (isSearchMode) {
2020
+ if (e.key === "escape") {
2021
+ e.preventDefault();
2022
+ if (searchQuery.length > 0) {
2023
+ setSearchQuery("");
2024
+ } else {
2025
+ setIsSearchMode(false);
2026
+ }
2027
+ return;
2028
+ }
2029
+ if (e.key === "return" || e.key === "down" || e.key === "wheeldown") {
2030
+ e.preventDefault();
2031
+ setIsSearchMode(false);
2032
+ setSelectedIndex(0);
2033
+ setScrollOffset(0);
2034
+ }
2035
+ return;
2036
+ }
2037
+ if (e.key === "left" || e.key === "right" || e.key === "tab") {
2038
+ e.preventDefault();
2039
+ toggleSetting();
2040
+ return;
2041
+ }
2042
+ if (e.ctrl || e.meta)
2043
+ return;
2044
+ if (e.key === "j" || e.key === "k" || e.key === "/")
2045
+ return;
2046
+ if (e.key.length === 1 && e.key !== " ") {
2047
+ e.preventDefault();
2048
+ setIsSearchMode(true);
2049
+ setSearchQuery(e.key);
2050
+ }
2051
+ }, [showSubmenu, headerFocused, isSearchMode, searchQuery, setSearchQuery, toggleSetting]);
2052
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2053
+ flexDirection: "column",
2054
+ width: "100%",
2055
+ tabIndex: 0,
2056
+ autoFocus: true,
2057
+ onKeyDown: handleKeyDown,
2058
+ children: showSubmenu === "Theme" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2059
+ children: [
2060
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemePicker, {
2061
+ onThemeSelect: (setting_1) => {
2062
+ isDirty.current = true;
2063
+ setTheme(setting_1);
2064
+ setShowSubmenu(null);
2065
+ setTabsHidden(false);
2066
+ },
2067
+ onCancel: () => {
2068
+ setShowSubmenu(null);
2069
+ setTabsHidden(false);
2070
+ },
2071
+ hideEscToCancel: true,
2072
+ skipExitHandling: true
2073
+ }, undefined, false, undefined, this),
2074
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2075
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2076
+ dimColor: true,
2077
+ italic: true,
2078
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2079
+ children: [
2080
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2081
+ shortcut: "Enter",
2082
+ action: "select"
2083
+ }, undefined, false, undefined, this),
2084
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2085
+ action: "confirm:no",
2086
+ context: "Confirmation",
2087
+ fallback: "Esc",
2088
+ description: "cancel"
2089
+ }, undefined, false, undefined, this)
2090
+ ]
2091
+ }, undefined, true, undefined, this)
2092
+ }, undefined, false, undefined, this)
2093
+ }, undefined, false, undefined, this)
2094
+ ]
2095
+ }, undefined, true, undefined, this) : showSubmenu === "Model" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2096
+ children: [
2097
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ModelPicker, {
2098
+ initial: mainLoopModel,
2099
+ onSelect: (model_0, _effort) => {
2100
+ isDirty.current = true;
2101
+ onChangeMainModelConfig(model_0);
2102
+ setShowSubmenu(null);
2103
+ setTabsHidden(false);
2104
+ },
2105
+ onCancel: () => {
2106
+ setShowSubmenu(null);
2107
+ setTabsHidden(false);
2108
+ },
2109
+ showFastModeNotice: isFastModeEnabled() ? isFastMode && isFastModeSupportedByModel(mainLoopModel) && isFastModeAvailable() : false
2110
+ }, undefined, false, undefined, this),
2111
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2112
+ dimColor: true,
2113
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2114
+ children: [
2115
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2116
+ shortcut: "Enter",
2117
+ action: "confirm"
2118
+ }, undefined, false, undefined, this),
2119
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2120
+ action: "confirm:no",
2121
+ context: "Confirmation",
2122
+ fallback: "Esc",
2123
+ description: "cancel"
2124
+ }, undefined, false, undefined, this)
2125
+ ]
2126
+ }, undefined, true, undefined, this)
2127
+ }, undefined, false, undefined, this)
2128
+ ]
2129
+ }, undefined, true, undefined, this) : showSubmenu === "TeammateModel" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2130
+ children: [
2131
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ModelPicker, {
2132
+ initial: globalConfig.teammateDefaultModel ?? null,
2133
+ skipSettingsWrite: true,
2134
+ headerText: "Default model for newly spawned teammates. The leader can override via the tool call's model parameter.",
2135
+ onSelect: (model_1, _effort_0) => {
2136
+ setShowSubmenu(null);
2137
+ setTabsHidden(false);
2138
+ if (globalConfig.teammateDefaultModel === undefined && model_1 === null) {
2139
+ return;
2140
+ }
2141
+ isDirty.current = true;
2142
+ saveGlobalConfig((current_23) => current_23.teammateDefaultModel === model_1 ? current_23 : {
2143
+ ...current_23,
2144
+ teammateDefaultModel: model_1
2145
+ });
2146
+ setGlobalConfig({
2147
+ ...getGlobalConfig(),
2148
+ teammateDefaultModel: model_1
2149
+ });
2150
+ setChanges((prev_25) => ({
2151
+ ...prev_25,
2152
+ teammateDefaultModel: teammateModelDisplayString(model_1)
2153
+ }));
2154
+ logEvent("tengu_teammate_default_model_changed", {
2155
+ model: model_1
2156
+ });
2157
+ },
2158
+ onCancel: () => {
2159
+ setShowSubmenu(null);
2160
+ setTabsHidden(false);
2161
+ }
2162
+ }, undefined, false, undefined, this),
2163
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2164
+ dimColor: true,
2165
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2166
+ children: [
2167
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2168
+ shortcut: "Enter",
2169
+ action: "confirm"
2170
+ }, undefined, false, undefined, this),
2171
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2172
+ action: "confirm:no",
2173
+ context: "Confirmation",
2174
+ fallback: "Esc",
2175
+ description: "cancel"
2176
+ }, undefined, false, undefined, this)
2177
+ ]
2178
+ }, undefined, true, undefined, this)
2179
+ }, undefined, false, undefined, this)
2180
+ ]
2181
+ }, undefined, true, undefined, this) : showSubmenu === "ExternalIncludes" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2182
+ children: [
2183
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ClaudeMdExternalIncludesDialog, {
2184
+ onDone: () => {
2185
+ setShowSubmenu(null);
2186
+ setTabsHidden(false);
2187
+ },
2188
+ externalIncludes: getExternalClaudeMdIncludes(memoryFiles)
2189
+ }, undefined, false, undefined, this),
2190
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2191
+ dimColor: true,
2192
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2193
+ children: [
2194
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2195
+ shortcut: "Enter",
2196
+ action: "confirm"
2197
+ }, undefined, false, undefined, this),
2198
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2199
+ action: "confirm:no",
2200
+ context: "Confirmation",
2201
+ fallback: "Esc",
2202
+ description: "disable external includes"
2203
+ }, undefined, false, undefined, this)
2204
+ ]
2205
+ }, undefined, true, undefined, this)
2206
+ }, undefined, false, undefined, this)
2207
+ ]
2208
+ }, undefined, true, undefined, this) : showSubmenu === "OutputStyle" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2209
+ children: [
2210
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(OutputStylePicker, {
2211
+ initialStyle: currentOutputStyle,
2212
+ onComplete: (style) => {
2213
+ isDirty.current = true;
2214
+ setCurrentOutputStyle(style ?? DEFAULT_OUTPUT_STYLE_NAME);
2215
+ setShowSubmenu(null);
2216
+ setTabsHidden(false);
2217
+ updateSettingsForSource("localSettings", {
2218
+ outputStyle: style
2219
+ });
2220
+ logEvent("tengu_output_style_changed", {
2221
+ style: style ?? DEFAULT_OUTPUT_STYLE_NAME,
2222
+ source: "config_panel",
2223
+ settings_source: "localSettings"
2224
+ });
2225
+ },
2226
+ onCancel: () => {
2227
+ setShowSubmenu(null);
2228
+ setTabsHidden(false);
2229
+ }
2230
+ }, undefined, false, undefined, this),
2231
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2232
+ dimColor: true,
2233
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2234
+ children: [
2235
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2236
+ shortcut: "Enter",
2237
+ action: "confirm"
2238
+ }, undefined, false, undefined, this),
2239
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2240
+ action: "confirm:no",
2241
+ context: "Confirmation",
2242
+ fallback: "Esc",
2243
+ description: "cancel"
2244
+ }, undefined, false, undefined, this)
2245
+ ]
2246
+ }, undefined, true, undefined, this)
2247
+ }, undefined, false, undefined, this)
2248
+ ]
2249
+ }, undefined, true, undefined, this) : showSubmenu === "Language" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2250
+ children: [
2251
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(LanguagePicker, {
2252
+ initialLanguage: currentLanguage,
2253
+ onComplete: (language) => {
2254
+ isDirty.current = true;
2255
+ setCurrentLanguage(language);
2256
+ setShowSubmenu(null);
2257
+ setTabsHidden(false);
2258
+ updateSettingsForSource("userSettings", {
2259
+ language
2260
+ });
2261
+ logEvent("tengu_language_changed", {
2262
+ language: language ?? "default",
2263
+ source: "config_panel"
2264
+ });
2265
+ },
2266
+ onCancel: () => {
2267
+ setShowSubmenu(null);
2268
+ setTabsHidden(false);
2269
+ }
2270
+ }, undefined, false, undefined, this),
2271
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2272
+ dimColor: true,
2273
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2274
+ children: [
2275
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2276
+ shortcut: "Enter",
2277
+ action: "confirm"
2278
+ }, undefined, false, undefined, this),
2279
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2280
+ action: "confirm:no",
2281
+ context: "Settings",
2282
+ fallback: "Esc",
2283
+ description: "cancel"
2284
+ }, undefined, false, undefined, this)
2285
+ ]
2286
+ }, undefined, true, undefined, this)
2287
+ }, undefined, false, undefined, this)
2288
+ ]
2289
+ }, undefined, true, undefined, this) : showSubmenu === "EnableAutoUpdates" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
2290
+ title: "Enable Auto-Updates",
2291
+ onCancel: () => {
2292
+ setShowSubmenu(null);
2293
+ setTabsHidden(false);
2294
+ },
2295
+ hideBorder: true,
2296
+ hideInputGuide: true,
2297
+ children: autoUpdaterDisabledReason?.type !== "config" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2298
+ children: [
2299
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2300
+ children: autoUpdaterDisabledReason?.type === "env" ? "Auto-updates are controlled by an environment variable and cannot be changed here." : autoUpdaterDisabledReason?.type === "distribution" ? "Automatic installation is disabled for this fork distribution, but version checks remain enabled." : "Auto-updates are disabled in development builds."
2301
+ }, undefined, false, undefined, this),
2302
+ autoUpdaterDisabledReason?.type === "env" && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2303
+ dimColor: true,
2304
+ children: [
2305
+ "Unset ",
2306
+ autoUpdaterDisabledReason.envVar,
2307
+ " to re-enable auto-updates."
2308
+ ]
2309
+ }, undefined, true, undefined, this)
2310
+ ]
2311
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Select, {
2312
+ options: [
2313
+ {
2314
+ label: "Enable with latest channel",
2315
+ value: "latest"
2316
+ },
2317
+ {
2318
+ label: "Enable with stable channel",
2319
+ value: "stable"
2320
+ }
2321
+ ],
2322
+ onChange: (channel) => {
2323
+ isDirty.current = true;
2324
+ setShowSubmenu(null);
2325
+ setTabsHidden(false);
2326
+ saveGlobalConfig((current_24) => ({
2327
+ ...current_24,
2328
+ autoUpdates: true
2329
+ }));
2330
+ setGlobalConfig({
2331
+ ...getGlobalConfig(),
2332
+ autoUpdates: true
2333
+ });
2334
+ updateSettingsForSource("userSettings", {
2335
+ autoUpdatesChannel: channel,
2336
+ minimumVersion: undefined
2337
+ });
2338
+ setSettingsData((prev_26) => ({
2339
+ ...prev_26,
2340
+ autoUpdatesChannel: channel,
2341
+ minimumVersion: undefined
2342
+ }));
2343
+ logEvent("tengu_autoupdate_enabled", {
2344
+ channel
2345
+ });
2346
+ }
2347
+ }, undefined, false, undefined, this)
2348
+ }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ChannelDowngradeDialog, {
2349
+ currentVersion: "1.0.3-fork.3767904",
2350
+ onChoice: (choice) => {
2351
+ setShowSubmenu(null);
2352
+ setTabsHidden(false);
2353
+ if (choice === "cancel") {
2354
+ return;
2355
+ }
2356
+ isDirty.current = true;
2357
+ const newSettings = {
2358
+ autoUpdatesChannel: "stable"
2359
+ };
2360
+ if (choice === "stay") {
2361
+ newSettings.minimumVersion = "1.0.3-fork.3767904";
2362
+ }
2363
+ updateSettingsForSource("userSettings", newSettings);
2364
+ setSettingsData((prev_27) => ({
2365
+ ...prev_27,
2366
+ ...newSettings
2367
+ }));
2368
+ logEvent("tengu_autoupdate_channel_changed", {
2369
+ channel: "stable",
2370
+ minimum_version_set: choice === "stay"
2371
+ });
2372
+ }
2373
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2374
+ flexDirection: "column",
2375
+ gap: 1,
2376
+ marginY: insideModal ? undefined : 1,
2377
+ children: [
2378
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SearchBox, {
2379
+ query: searchQuery,
2380
+ isFocused: isSearchMode && !headerFocused,
2381
+ isTerminalFocused,
2382
+ cursorOffset: searchCursorOffset,
2383
+ placeholder: "Search settings\u2026"
2384
+ }, undefined, false, undefined, this),
2385
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2386
+ flexDirection: "column",
2387
+ children: filteredSettingsItems.length === 0 ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2388
+ dimColor: true,
2389
+ italic: true,
2390
+ children: [
2391
+ 'No settings match "',
2392
+ searchQuery,
2393
+ '"'
2394
+ ]
2395
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2396
+ children: [
2397
+ scrollOffset > 0 && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2398
+ dimColor: true,
2399
+ children: [
2400
+ figures_default.arrowUp,
2401
+ " ",
2402
+ scrollOffset,
2403
+ " more above"
2404
+ ]
2405
+ }, undefined, true, undefined, this),
2406
+ filteredSettingsItems.slice(scrollOffset, scrollOffset + maxVisible).map((setting_2, i) => {
2407
+ const actualIndex = scrollOffset + i;
2408
+ const isSelected = actualIndex === selectedIndex && !headerFocused && !isSearchMode;
2409
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(React2.Fragment, {
2410
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2411
+ children: [
2412
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2413
+ width: 44,
2414
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2415
+ color: isSelected ? "suggestion" : undefined,
2416
+ children: [
2417
+ isSelected ? figures_default.pointer : " ",
2418
+ " ",
2419
+ setting_2.label
2420
+ ]
2421
+ }, undefined, true, undefined, this)
2422
+ }, undefined, false, undefined, this),
2423
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2424
+ children: setting_2.type === "boolean" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2425
+ children: [
2426
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2427
+ color: isSelected ? "suggestion" : undefined,
2428
+ children: setting_2.value.toString()
2429
+ }, undefined, false, undefined, this),
2430
+ showThinkingWarning && setting_2.id === "thinkingEnabled" && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2431
+ color: "warning",
2432
+ children: [
2433
+ " ",
2434
+ "Changing thinking mode mid-conversation will increase latency and may reduce quality."
2435
+ ]
2436
+ }, undefined, true, undefined, this)
2437
+ ]
2438
+ }, undefined, true, undefined, this) : setting_2.id === "theme" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2439
+ color: isSelected ? "suggestion" : undefined,
2440
+ children: THEME_LABELS[setting_2.value.toString()] ?? setting_2.value.toString()
2441
+ }, undefined, false, undefined, this) : setting_2.id === "notifChannel" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2442
+ color: isSelected ? "suggestion" : undefined,
2443
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(NotifChannelLabel, {
2444
+ value: setting_2.value.toString()
2445
+ }, undefined, false, undefined, this)
2446
+ }, undefined, false, undefined, this) : setting_2.id === "defaultPermissionMode" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2447
+ color: isSelected ? "suggestion" : undefined,
2448
+ children: permissionModeTitle(setting_2.value)
2449
+ }, undefined, false, undefined, this) : setting_2.id === "autoUpdatesChannel" && autoUpdaterDisabledReason ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2450
+ flexDirection: "column",
2451
+ children: [
2452
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2453
+ color: isSelected ? "suggestion" : undefined,
2454
+ children: "disabled"
2455
+ }, undefined, false, undefined, this),
2456
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2457
+ dimColor: true,
2458
+ children: [
2459
+ "(",
2460
+ formatAutoUpdaterDisabledReason(autoUpdaterDisabledReason),
2461
+ ")"
2462
+ ]
2463
+ }, undefined, true, undefined, this)
2464
+ ]
2465
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2466
+ color: isSelected ? "suggestion" : undefined,
2467
+ children: setting_2.value.toString()
2468
+ }, undefined, false, undefined, this)
2469
+ }, isSelected ? "selected" : "unselected", false, undefined, this)
2470
+ ]
2471
+ }, undefined, true, undefined, this)
2472
+ }, setting_2.id, false, undefined, this);
2473
+ }),
2474
+ scrollOffset + maxVisible < filteredSettingsItems.length && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2475
+ dimColor: true,
2476
+ children: [
2477
+ figures_default.arrowDown,
2478
+ " ",
2479
+ filteredSettingsItems.length - scrollOffset - maxVisible,
2480
+ " more below"
2481
+ ]
2482
+ }, undefined, true, undefined, this)
2483
+ ]
2484
+ }, undefined, true, undefined, this)
2485
+ }, undefined, false, undefined, this),
2486
+ headerFocused ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2487
+ dimColor: true,
2488
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2489
+ children: [
2490
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2491
+ shortcut: "\u2190/\u2192 tab",
2492
+ action: "switch"
2493
+ }, undefined, false, undefined, this),
2494
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2495
+ shortcut: "\u2193",
2496
+ action: "return"
2497
+ }, undefined, false, undefined, this),
2498
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2499
+ action: "confirm:no",
2500
+ context: "Settings",
2501
+ fallback: "Esc",
2502
+ description: "close"
2503
+ }, undefined, false, undefined, this)
2504
+ ]
2505
+ }, undefined, true, undefined, this)
2506
+ }, undefined, false, undefined, this) : isSearchMode ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2507
+ dimColor: true,
2508
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2509
+ children: [
2510
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2511
+ children: "Type to filter"
2512
+ }, undefined, false, undefined, this),
2513
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2514
+ shortcut: "Enter/\u2193",
2515
+ action: "select"
2516
+ }, undefined, false, undefined, this),
2517
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2518
+ shortcut: "\u2191",
2519
+ action: "tabs"
2520
+ }, undefined, false, undefined, this),
2521
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2522
+ action: "confirm:no",
2523
+ context: "Settings",
2524
+ fallback: "Esc",
2525
+ description: "clear"
2526
+ }, undefined, false, undefined, this)
2527
+ ]
2528
+ }, undefined, true, undefined, this)
2529
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2530
+ dimColor: true,
2531
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2532
+ children: [
2533
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2534
+ action: "select:accept",
2535
+ context: "Settings",
2536
+ fallback: "Space",
2537
+ description: "change"
2538
+ }, undefined, false, undefined, this),
2539
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2540
+ action: "settings:close",
2541
+ context: "Settings",
2542
+ fallback: "Enter",
2543
+ description: "save"
2544
+ }, undefined, false, undefined, this),
2545
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2546
+ action: "settings:search",
2547
+ context: "Settings",
2548
+ fallback: "/",
2549
+ description: "search"
2550
+ }, undefined, false, undefined, this),
2551
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2552
+ action: "confirm:no",
2553
+ context: "Settings",
2554
+ fallback: "Esc",
2555
+ description: "cancel"
2556
+ }, undefined, false, undefined, this)
2557
+ ]
2558
+ }, undefined, true, undefined, this)
2559
+ }, undefined, false, undefined, this)
2560
+ ]
2561
+ }, undefined, true, undefined, this)
2562
+ }, undefined, false, undefined, this);
2563
+ }
2564
+ function teammateModelDisplayString(value) {
2565
+ if (value === undefined) {
2566
+ return modelDisplayString(getHardcodedTeammateModelFallback());
2567
+ }
2568
+ if (value === null)
2569
+ return "Default (leader's model)";
2570
+ return modelDisplayString(value);
2571
+ }
2572
+ function NotifChannelLabel(t0) {
2573
+ const $ = import_compiler_runtime5.c(4);
2574
+ const { value } = t0;
2575
+ switch (value) {
2576
+ case "auto": {
2577
+ return "Auto";
2578
+ }
2579
+ case "iterm2": {
2580
+ let t1;
2581
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
2582
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2583
+ children: [
2584
+ "iTerm2 ",
2585
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2586
+ dimColor: true,
2587
+ children: "(OSC 9)"
2588
+ }, undefined, false, undefined, this)
2589
+ ]
2590
+ }, undefined, true, undefined, this);
2591
+ $[0] = t1;
2592
+ } else {
2593
+ t1 = $[0];
2594
+ }
2595
+ return t1;
2596
+ }
2597
+ case "terminal_bell": {
2598
+ let t1;
2599
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
2600
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2601
+ children: [
2602
+ "Terminal Bell ",
2603
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2604
+ dimColor: true,
2605
+ children: "(\\a)"
2606
+ }, undefined, false, undefined, this)
2607
+ ]
2608
+ }, undefined, true, undefined, this);
2609
+ $[1] = t1;
2610
+ } else {
2611
+ t1 = $[1];
2612
+ }
2613
+ return t1;
2614
+ }
2615
+ case "kitty": {
2616
+ let t1;
2617
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
2618
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2619
+ children: [
2620
+ "Kitty ",
2621
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2622
+ dimColor: true,
2623
+ children: "(OSC 99)"
2624
+ }, undefined, false, undefined, this)
2625
+ ]
2626
+ }, undefined, true, undefined, this);
2627
+ $[2] = t1;
2628
+ } else {
2629
+ t1 = $[2];
2630
+ }
2631
+ return t1;
2632
+ }
2633
+ case "ghostty": {
2634
+ let t1;
2635
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
2636
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2637
+ children: [
2638
+ "Ghostty ",
2639
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2640
+ dimColor: true,
2641
+ children: "(OSC 777)"
2642
+ }, undefined, false, undefined, this)
2643
+ ]
2644
+ }, undefined, true, undefined, this);
2645
+ $[3] = t1;
2646
+ } else {
2647
+ t1 = $[3];
2648
+ }
2649
+ return t1;
2650
+ }
2651
+ case "iterm2_with_bell": {
2652
+ return "iTerm2 w/ Bell";
2653
+ }
2654
+ case "notifications_disabled": {
2655
+ return "Disabled";
2656
+ }
2657
+ default: {
2658
+ return value;
2659
+ }
2660
+ }
2661
+ }
2662
+ var import_compiler_runtime5, React2, import_react4, jsx_dev_runtime5, THEME_LABELS;
2663
+ var init_Config = __esm(() => {
2664
+ init_ink();
2665
+ init_useKeybinding();
2666
+ init_figures();
2667
+ init_config();
2668
+ init_authPortable();
2669
+ init_config();
2670
+ init_source();
2671
+ init_PermissionMode();
2672
+ init_permissionSetup();
2673
+ init_log();
2674
+ init_analytics();
2675
+ init_bridgeEnabled();
2676
+ init_ThemePicker();
2677
+ init_AppState();
2678
+ init_ModelPicker();
2679
+ init_model();
2680
+ init_extraUsage();
2681
+ init_ClaudeMdExternalIncludesDialog();
2682
+ init_ChannelDowngradeDialog();
2683
+ init_Dialog();
2684
+ init_CustomSelect();
2685
+ init_OutputStylePicker();
2686
+ init_LanguagePicker();
2687
+ init_claudemd();
2688
+ init_KeyboardShortcutHint();
2689
+ init_ConfigurableShortcutHint();
2690
+ init_Byline();
2691
+ init_Tabs();
2692
+ init_modalContext();
2693
+ init_SearchBox();
2694
+ init_ide();
2695
+ init_settings();
2696
+ init_state();
2697
+ init_outputStyles();
2698
+ init_envUtils();
2699
+ init_growthbook();
2700
+ init_agentSwarmsEnabled();
2701
+ init_teammateModeSnapshot();
2702
+ init_teammateModel();
2703
+ init_useSearchInput();
2704
+ init_useTerminalSize();
2705
+ init_fastMode();
2706
+ init_fullscreen();
2707
+ import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
2708
+ React2 = __toESM(require_react(), 1);
2709
+ import_react4 = __toESM(require_react(), 1);
2710
+ jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
2711
+ THEME_LABELS = {
2712
+ auto: "Auto (match terminal)",
2713
+ dark: "Dark mode",
2714
+ light: "Light mode",
2715
+ "dark-daltonized": "Dark mode (colorblind-friendly)",
2716
+ "light-daltonized": "Light mode (colorblind-friendly)",
2717
+ "dark-ansi": "Dark mode (ANSI colors only)",
2718
+ "light-ansi": "Light mode (ANSI colors only)"
2719
+ };
2720
+ });
2721
+
2722
+ // src/components/Settings/Usage.tsx
2723
+ function LimitBar(t0) {
2724
+ const $ = import_compiler_runtime6.c(34);
2725
+ const {
2726
+ title,
2727
+ limit,
2728
+ maxWidth,
2729
+ showTimeInReset: t1,
2730
+ extraSubtext
2731
+ } = t0;
2732
+ const showTimeInReset = t1 === undefined ? true : t1;
2733
+ const {
2734
+ utilization,
2735
+ resets_at
2736
+ } = limit;
2737
+ if (utilization === null) {
2738
+ return null;
2739
+ }
2740
+ const usedText = `${Math.floor(utilization)}% used`;
2741
+ let subtext;
2742
+ if (resets_at) {
2743
+ let t2;
2744
+ if ($[0] !== resets_at || $[1] !== showTimeInReset) {
2745
+ t2 = formatResetText(resets_at, true, showTimeInReset);
2746
+ $[0] = resets_at;
2747
+ $[1] = showTimeInReset;
2748
+ $[2] = t2;
2749
+ } else {
2750
+ t2 = $[2];
2751
+ }
2752
+ subtext = `Resets ${t2}`;
2753
+ }
2754
+ if (extraSubtext) {
2755
+ if (subtext) {
2756
+ subtext = `${extraSubtext} \xB7 ${subtext}`;
2757
+ } else {
2758
+ subtext = extraSubtext;
2759
+ }
2760
+ }
2761
+ if (maxWidth >= 62) {
2762
+ let t2;
2763
+ if ($[3] !== title) {
2764
+ t2 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2765
+ bold: true,
2766
+ children: title
2767
+ }, undefined, false, undefined, this);
2768
+ $[3] = title;
2769
+ $[4] = t2;
2770
+ } else {
2771
+ t2 = $[4];
2772
+ }
2773
+ const t3 = utilization / 100;
2774
+ let t4;
2775
+ if ($[5] !== t3) {
2776
+ t4 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ProgressBar, {
2777
+ ratio: t3,
2778
+ width: 50,
2779
+ fillColor: "rate_limit_fill",
2780
+ emptyColor: "rate_limit_empty"
2781
+ }, undefined, false, undefined, this);
2782
+ $[5] = t3;
2783
+ $[6] = t4;
2784
+ } else {
2785
+ t4 = $[6];
2786
+ }
2787
+ let t5;
2788
+ if ($[7] !== usedText) {
2789
+ t5 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2790
+ children: usedText
2791
+ }, undefined, false, undefined, this);
2792
+ $[7] = usedText;
2793
+ $[8] = t5;
2794
+ } else {
2795
+ t5 = $[8];
2796
+ }
2797
+ let t6;
2798
+ if ($[9] !== t4 || $[10] !== t5) {
2799
+ t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2800
+ flexDirection: "row",
2801
+ gap: 1,
2802
+ children: [
2803
+ t4,
2804
+ t5
2805
+ ]
2806
+ }, undefined, true, undefined, this);
2807
+ $[9] = t4;
2808
+ $[10] = t5;
2809
+ $[11] = t6;
2810
+ } else {
2811
+ t6 = $[11];
2812
+ }
2813
+ let t7;
2814
+ if ($[12] !== subtext) {
2815
+ t7 = subtext && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2816
+ dimColor: true,
2817
+ children: subtext
2818
+ }, undefined, false, undefined, this);
2819
+ $[12] = subtext;
2820
+ $[13] = t7;
2821
+ } else {
2822
+ t7 = $[13];
2823
+ }
2824
+ let t8;
2825
+ if ($[14] !== t2 || $[15] !== t6 || $[16] !== t7) {
2826
+ t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2827
+ flexDirection: "column",
2828
+ children: [
2829
+ t2,
2830
+ t6,
2831
+ t7
2832
+ ]
2833
+ }, undefined, true, undefined, this);
2834
+ $[14] = t2;
2835
+ $[15] = t6;
2836
+ $[16] = t7;
2837
+ $[17] = t8;
2838
+ } else {
2839
+ t8 = $[17];
2840
+ }
2841
+ return t8;
2842
+ } else {
2843
+ let t2;
2844
+ if ($[18] !== title) {
2845
+ t2 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2846
+ bold: true,
2847
+ children: title
2848
+ }, undefined, false, undefined, this);
2849
+ $[18] = title;
2850
+ $[19] = t2;
2851
+ } else {
2852
+ t2 = $[19];
2853
+ }
2854
+ let t3;
2855
+ if ($[20] !== subtext) {
2856
+ t3 = subtext && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(jsx_dev_runtime6.Fragment, {
2857
+ children: [
2858
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2859
+ children: " "
2860
+ }, undefined, false, undefined, this),
2861
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2862
+ dimColor: true,
2863
+ children: [
2864
+ "\xB7 ",
2865
+ subtext
2866
+ ]
2867
+ }, undefined, true, undefined, this)
2868
+ ]
2869
+ }, undefined, true, undefined, this);
2870
+ $[20] = subtext;
2871
+ $[21] = t3;
2872
+ } else {
2873
+ t3 = $[21];
2874
+ }
2875
+ let t4;
2876
+ if ($[22] !== t2 || $[23] !== t3) {
2877
+ t4 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2878
+ children: [
2879
+ t2,
2880
+ t3
2881
+ ]
2882
+ }, undefined, true, undefined, this);
2883
+ $[22] = t2;
2884
+ $[23] = t3;
2885
+ $[24] = t4;
2886
+ } else {
2887
+ t4 = $[24];
2888
+ }
2889
+ const t5 = utilization / 100;
2890
+ let t6;
2891
+ if ($[25] !== maxWidth || $[26] !== t5) {
2892
+ t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ProgressBar, {
2893
+ ratio: t5,
2894
+ width: maxWidth,
2895
+ fillColor: "rate_limit_fill",
2896
+ emptyColor: "rate_limit_empty"
2897
+ }, undefined, false, undefined, this);
2898
+ $[25] = maxWidth;
2899
+ $[26] = t5;
2900
+ $[27] = t6;
2901
+ } else {
2902
+ t6 = $[27];
2903
+ }
2904
+ let t7;
2905
+ if ($[28] !== usedText) {
2906
+ t7 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2907
+ children: usedText
2908
+ }, undefined, false, undefined, this);
2909
+ $[28] = usedText;
2910
+ $[29] = t7;
2911
+ } else {
2912
+ t7 = $[29];
2913
+ }
2914
+ let t8;
2915
+ if ($[30] !== t4 || $[31] !== t6 || $[32] !== t7) {
2916
+ t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2917
+ flexDirection: "column",
2918
+ children: [
2919
+ t4,
2920
+ t6,
2921
+ t7
2922
+ ]
2923
+ }, undefined, true, undefined, this);
2924
+ $[30] = t4;
2925
+ $[31] = t6;
2926
+ $[32] = t7;
2927
+ $[33] = t8;
2928
+ } else {
2929
+ t8 = $[33];
2930
+ }
2931
+ return t8;
2932
+ }
2933
+ }
2934
+ function Usage() {
2935
+ const [utilization, setUtilization] = import_react5.useState(null);
2936
+ const [error, setError] = import_react5.useState(null);
2937
+ const [isLoading, setIsLoading] = import_react5.useState(true);
2938
+ const {
2939
+ columns
2940
+ } = useTerminalSize();
2941
+ const availableWidth = columns - 2;
2942
+ const maxWidth = Math.min(availableWidth, 80);
2943
+ const loadUtilization = React3.useCallback(async () => {
2944
+ setIsLoading(true);
2945
+ setError(null);
2946
+ try {
2947
+ const data = await fetchUtilization();
2948
+ setUtilization(data);
2949
+ } catch (err) {
2950
+ logError(err);
2951
+ const axiosError = err;
2952
+ const responseBody = axiosError.response?.data ? jsonStringify(axiosError.response.data) : undefined;
2953
+ setError(responseBody ? `Failed to load usage data: ${responseBody}` : "Failed to load usage data");
2954
+ } finally {
2955
+ setIsLoading(false);
2956
+ }
2957
+ }, []);
2958
+ import_react5.useEffect(() => {
2959
+ loadUtilization();
2960
+ }, [loadUtilization]);
2961
+ useKeybinding("settings:retry", () => {
2962
+ loadUtilization();
2963
+ }, {
2964
+ context: "Settings",
2965
+ isActive: !!error && !isLoading
2966
+ });
2967
+ if (error) {
2968
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2969
+ flexDirection: "column",
2970
+ gap: 1,
2971
+ children: [
2972
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2973
+ color: "error",
2974
+ children: [
2975
+ "Error: ",
2976
+ error
2977
+ ]
2978
+ }, undefined, true, undefined, this),
2979
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2980
+ dimColor: true,
2981
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Byline, {
2982
+ children: [
2983
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
2984
+ action: "settings:retry",
2985
+ context: "Settings",
2986
+ fallback: "r",
2987
+ description: "retry"
2988
+ }, undefined, false, undefined, this),
2989
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
2990
+ action: "confirm:no",
2991
+ context: "Settings",
2992
+ fallback: "Esc",
2993
+ description: "cancel"
2994
+ }, undefined, false, undefined, this)
2995
+ ]
2996
+ }, undefined, true, undefined, this)
2997
+ }, undefined, false, undefined, this)
2998
+ ]
2999
+ }, undefined, true, undefined, this);
3000
+ }
3001
+ if (!utilization) {
3002
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
3003
+ flexDirection: "column",
3004
+ gap: 1,
3005
+ children: [
3006
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3007
+ dimColor: true,
3008
+ children: "Loading usage data\u2026"
3009
+ }, undefined, false, undefined, this),
3010
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3011
+ dimColor: true,
3012
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
3013
+ action: "confirm:no",
3014
+ context: "Settings",
3015
+ fallback: "Esc",
3016
+ description: "cancel"
3017
+ }, undefined, false, undefined, this)
3018
+ }, undefined, false, undefined, this)
3019
+ ]
3020
+ }, undefined, true, undefined, this);
3021
+ }
3022
+ const subscriptionType = getSubscriptionType();
3023
+ const showSonnetBar = subscriptionType === "max" || subscriptionType === "team" || subscriptionType === null;
3024
+ const limits = [{
3025
+ title: "Current session",
3026
+ limit: utilization.five_hour
3027
+ }, {
3028
+ title: "Current week (all models)",
3029
+ limit: utilization.seven_day
3030
+ }, ...showSonnetBar ? [{
3031
+ title: "Current week (Sonnet only)",
3032
+ limit: utilization.seven_day_sonnet
3033
+ }] : []];
3034
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
3035
+ flexDirection: "column",
3036
+ gap: 1,
3037
+ width: "100%",
3038
+ children: [
3039
+ limits.some(({
3040
+ limit
3041
+ }) => limit) || /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3042
+ dimColor: true,
3043
+ children: "/usage is only available for subscription plans."
3044
+ }, undefined, false, undefined, this),
3045
+ limits.map(({
3046
+ title,
3047
+ limit: limit_0
3048
+ }) => limit_0 && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(LimitBar, {
3049
+ title,
3050
+ limit: limit_0,
3051
+ maxWidth
3052
+ }, title, false, undefined, this)),
3053
+ utilization.extra_usage && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ExtraUsageSection, {
3054
+ extraUsage: utilization.extra_usage,
3055
+ maxWidth
3056
+ }, undefined, false, undefined, this),
3057
+ isEligibleForOverageCreditGrant() && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(OverageCreditUpsell, {
3058
+ maxWidth
3059
+ }, undefined, false, undefined, this),
3060
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3061
+ dimColor: true,
3062
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
3063
+ action: "confirm:no",
3064
+ context: "Settings",
3065
+ fallback: "Esc",
3066
+ description: "cancel"
3067
+ }, undefined, false, undefined, this)
3068
+ }, undefined, false, undefined, this)
3069
+ ]
3070
+ }, undefined, true, undefined, this);
3071
+ }
3072
+ function ExtraUsageSection(t0) {
3073
+ const $ = import_compiler_runtime6.c(20);
3074
+ const {
3075
+ extraUsage: extraUsage2,
3076
+ maxWidth
3077
+ } = t0;
3078
+ const subscriptionType = getSubscriptionType();
3079
+ const isProOrMax = subscriptionType === "pro" || subscriptionType === "max";
3080
+ if (!isProOrMax) {
3081
+ return false;
3082
+ }
3083
+ if (!extraUsage2.is_enabled) {
3084
+ if (extraUsage.isEnabled()) {
3085
+ let t12;
3086
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
3087
+ t12 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
3088
+ flexDirection: "column",
3089
+ children: [
3090
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3091
+ bold: true,
3092
+ children: EXTRA_USAGE_SECTION_TITLE
3093
+ }, undefined, false, undefined, this),
3094
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3095
+ dimColor: true,
3096
+ children: "Extra usage not enabled \xB7 /extra-usage to enable"
3097
+ }, undefined, false, undefined, this)
3098
+ ]
3099
+ }, undefined, true, undefined, this);
3100
+ $[0] = t12;
3101
+ } else {
3102
+ t12 = $[0];
3103
+ }
3104
+ return t12;
3105
+ }
3106
+ return null;
3107
+ }
3108
+ if (extraUsage2.monthly_limit === null) {
3109
+ let t12;
3110
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
3111
+ t12 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
3112
+ flexDirection: "column",
3113
+ children: [
3114
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3115
+ bold: true,
3116
+ children: EXTRA_USAGE_SECTION_TITLE
3117
+ }, undefined, false, undefined, this),
3118
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3119
+ dimColor: true,
3120
+ children: "Unlimited"
3121
+ }, undefined, false, undefined, this)
3122
+ ]
3123
+ }, undefined, true, undefined, this);
3124
+ $[1] = t12;
3125
+ } else {
3126
+ t12 = $[1];
3127
+ }
3128
+ return t12;
3129
+ }
3130
+ if (typeof extraUsage2.used_credits !== "number" || typeof extraUsage2.utilization !== "number") {
3131
+ return null;
3132
+ }
3133
+ const t1 = extraUsage2.used_credits / 100;
3134
+ let t2;
3135
+ if ($[2] !== t1) {
3136
+ t2 = formatCost(t1, 2);
3137
+ $[2] = t1;
3138
+ $[3] = t2;
3139
+ } else {
3140
+ t2 = $[3];
3141
+ }
3142
+ const formattedUsedCredits = t2;
3143
+ const t3 = extraUsage2.monthly_limit / 100;
3144
+ let t4;
3145
+ if ($[4] !== t3) {
3146
+ t4 = formatCost(t3, 2);
3147
+ $[4] = t3;
3148
+ $[5] = t4;
3149
+ } else {
3150
+ t4 = $[5];
3151
+ }
3152
+ const formattedMonthlyLimit = t4;
3153
+ let T0;
3154
+ let t5;
3155
+ let t6;
3156
+ let t7;
3157
+ if ($[6] !== extraUsage2.utilization) {
3158
+ const now = new Date;
3159
+ const oneMonthReset = new Date(now.getFullYear(), now.getMonth() + 1, 1);
3160
+ T0 = LimitBar;
3161
+ t7 = EXTRA_USAGE_SECTION_TITLE;
3162
+ t5 = extraUsage2.utilization;
3163
+ t6 = oneMonthReset.toISOString();
3164
+ $[6] = extraUsage2.utilization;
3165
+ $[7] = T0;
3166
+ $[8] = t5;
3167
+ $[9] = t6;
3168
+ $[10] = t7;
3169
+ } else {
3170
+ T0 = $[7];
3171
+ t5 = $[8];
3172
+ t6 = $[9];
3173
+ t7 = $[10];
3174
+ }
3175
+ let t8;
3176
+ if ($[11] !== t5 || $[12] !== t6) {
3177
+ t8 = {
3178
+ utilization: t5,
3179
+ resets_at: t6
3180
+ };
3181
+ $[11] = t5;
3182
+ $[12] = t6;
3183
+ $[13] = t8;
3184
+ } else {
3185
+ t8 = $[13];
3186
+ }
3187
+ const t9 = `${formattedUsedCredits} / ${formattedMonthlyLimit} spent`;
3188
+ let t10;
3189
+ if ($[14] !== T0 || $[15] !== maxWidth || $[16] !== t7 || $[17] !== t8 || $[18] !== t9) {
3190
+ t10 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(T0, {
3191
+ title: t7,
3192
+ limit: t8,
3193
+ showTimeInReset: false,
3194
+ extraSubtext: t9,
3195
+ maxWidth
3196
+ }, undefined, false, undefined, this);
3197
+ $[14] = T0;
3198
+ $[15] = maxWidth;
3199
+ $[16] = t7;
3200
+ $[17] = t8;
3201
+ $[18] = t9;
3202
+ $[19] = t10;
3203
+ } else {
3204
+ t10 = $[19];
3205
+ }
3206
+ return t10;
3207
+ }
3208
+ var import_compiler_runtime6, React3, import_react5, jsx_dev_runtime6, EXTRA_USAGE_SECTION_TITLE = "Extra usage";
3209
+ var init_Usage = __esm(() => {
3210
+ init_extra_usage();
3211
+ init_cost_tracker();
3212
+ init_auth();
3213
+ init_useTerminalSize();
3214
+ init_ink();
3215
+ init_useKeybinding();
3216
+ init_usage();
3217
+ init_format();
3218
+ init_log();
3219
+ init_slowOperations();
3220
+ init_ConfigurableShortcutHint();
3221
+ init_Byline();
3222
+ init_ProgressBar();
3223
+ init_OverageCreditUpsell();
3224
+ import_compiler_runtime6 = __toESM(require_compiler_runtime(), 1);
3225
+ React3 = __toESM(require_react(), 1);
3226
+ import_react5 = __toESM(require_react(), 1);
3227
+ jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
3228
+ });
3229
+
3230
+ // src/components/Settings/Settings.tsx
3231
+ function Settings(t0) {
3232
+ const $ = import_compiler_runtime7.c(25);
3233
+ const {
3234
+ onClose,
3235
+ context,
3236
+ defaultTab
3237
+ } = t0;
3238
+ const [selectedTab, setSelectedTab] = import_react6.useState(defaultTab);
3239
+ const [tabsHidden, setTabsHidden] = import_react6.useState(false);
3240
+ const [configOwnsEsc, setConfigOwnsEsc] = import_react6.useState(false);
3241
+ const [gatesOwnsEsc, setGatesOwnsEsc] = import_react6.useState(false);
3242
+ const insideModal = useIsInsideModal();
3243
+ const {
3244
+ rows
3245
+ } = useModalOrTerminalSize(useTerminalSize());
3246
+ const contentHeight = insideModal ? rows + 1 : Math.max(15, Math.min(Math.floor(rows * 0.8), 30));
3247
+ const [diagnosticsPromise] = import_react6.useState(_temp22);
3248
+ useExitOnCtrlCDWithKeybindings();
3249
+ let t1;
3250
+ if ($[0] !== onClose || $[1] !== tabsHidden) {
3251
+ t1 = () => {
3252
+ if (tabsHidden) {
3253
+ return;
3254
+ }
3255
+ onClose("Status dialog dismissed", {
3256
+ display: "system"
3257
+ });
3258
+ };
3259
+ $[0] = onClose;
3260
+ $[1] = tabsHidden;
3261
+ $[2] = t1;
3262
+ } else {
3263
+ t1 = $[2];
3264
+ }
3265
+ const handleEscape = t1;
3266
+ const t2 = !tabsHidden && !(selectedTab === "Config" && configOwnsEsc) && !(selectedTab === "Gates" && gatesOwnsEsc);
3267
+ let t3;
3268
+ if ($[3] !== t2) {
3269
+ t3 = {
3270
+ context: "Settings",
3271
+ isActive: t2
3272
+ };
3273
+ $[3] = t2;
3274
+ $[4] = t3;
3275
+ } else {
3276
+ t3 = $[4];
3277
+ }
3278
+ useKeybinding("confirm:no", handleEscape, t3);
3279
+ let t4;
3280
+ if ($[5] !== context || $[6] !== diagnosticsPromise) {
3281
+ t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
3282
+ title: "Status",
3283
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Status, {
3284
+ context,
3285
+ diagnosticsPromise
3286
+ }, undefined, false, undefined, this)
3287
+ }, "status", false, undefined, this);
3288
+ $[5] = context;
3289
+ $[6] = diagnosticsPromise;
3290
+ $[7] = t4;
3291
+ } else {
3292
+ t4 = $[7];
3293
+ }
3294
+ let t5;
3295
+ if ($[8] !== contentHeight || $[9] !== context || $[10] !== onClose) {
3296
+ t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
3297
+ title: "Config",
3298
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(import_react6.Suspense, {
3299
+ fallback: null,
3300
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Config, {
3301
+ context,
3302
+ onClose,
3303
+ setTabsHidden,
3304
+ onIsSearchModeChange: setConfigOwnsEsc,
3305
+ contentHeight
3306
+ }, undefined, false, undefined, this)
3307
+ }, undefined, false, undefined, this)
3308
+ }, "config", false, undefined, this);
3309
+ $[8] = contentHeight;
3310
+ $[9] = context;
3311
+ $[10] = onClose;
3312
+ $[11] = t5;
3313
+ } else {
3314
+ t5 = $[11];
3315
+ }
3316
+ let t6;
3317
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
3318
+ t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
3319
+ title: "Usage",
3320
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Usage, {}, undefined, false, undefined, this)
3321
+ }, "usage", false, undefined, this);
3322
+ $[12] = t6;
3323
+ } else {
3324
+ t6 = $[12];
3325
+ }
3326
+ let t7;
3327
+ if ($[13] !== contentHeight) {
3328
+ t7 = [];
3329
+ $[13] = contentHeight;
3330
+ $[14] = t7;
3331
+ } else {
3332
+ t7 = $[14];
3333
+ }
3334
+ let t8;
3335
+ if ($[15] !== t4 || $[16] !== t5 || $[17] !== t7) {
3336
+ t8 = [t4, t5, t6, ...t7];
3337
+ $[15] = t4;
3338
+ $[16] = t5;
3339
+ $[17] = t7;
3340
+ $[18] = t8;
3341
+ } else {
3342
+ t8 = $[18];
3343
+ }
3344
+ const tabs = t8;
3345
+ const t9 = defaultTab !== "Config" && defaultTab !== "Gates";
3346
+ const t10 = tabsHidden || insideModal ? undefined : contentHeight;
3347
+ let t11;
3348
+ if ($[19] !== selectedTab || $[20] !== t10 || $[21] !== t9 || $[22] !== tabs || $[23] !== tabsHidden) {
3349
+ t11 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Pane, {
3350
+ color: "permission",
3351
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tabs, {
3352
+ color: "permission",
3353
+ selectedTab,
3354
+ onTabChange: setSelectedTab,
3355
+ hidden: tabsHidden,
3356
+ initialHeaderFocused: t9,
3357
+ contentHeight: t10,
3358
+ children: tabs
3359
+ }, undefined, false, undefined, this)
3360
+ }, undefined, false, undefined, this);
3361
+ $[19] = selectedTab;
3362
+ $[20] = t10;
3363
+ $[21] = t9;
3364
+ $[22] = tabs;
3365
+ $[23] = tabsHidden;
3366
+ $[24] = t11;
3367
+ } else {
3368
+ t11 = $[24];
3369
+ }
3370
+ return t11;
3371
+ }
3372
+ function _temp22() {
3373
+ return buildDiagnostics().catch(_temp6);
3374
+ }
3375
+ function _temp6() {
3376
+ return [];
3377
+ }
3378
+ var import_compiler_runtime7, import_react6, jsx_dev_runtime7;
3379
+ var init_Settings = __esm(() => {
3380
+ init_useKeybinding();
3381
+ init_useExitOnCtrlCDWithKeybindings();
3382
+ init_useTerminalSize();
3383
+ init_modalContext();
3384
+ init_Pane();
3385
+ init_Tabs();
3386
+ init_Status();
3387
+ init_Config();
3388
+ init_Usage();
3389
+ import_compiler_runtime7 = __toESM(require_compiler_runtime(), 1);
3390
+ import_react6 = __toESM(require_react(), 1);
3391
+ jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
3392
+ });
3393
+
3394
+ export { Settings, init_Settings };