claude-code-best 1.0.3

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 (447) hide show
  1. package/README.md +437 -0
  2. package/dist/chunk-02y0y853.js +277 -0
  3. package/dist/chunk-03nqtgyr.js +93 -0
  4. package/dist/chunk-067wa5sn.js +275 -0
  5. package/dist/chunk-06saje2v.js +39 -0
  6. package/dist/chunk-0731m51q.js +8 -0
  7. package/dist/chunk-07ysf2mw.js +184 -0
  8. package/dist/chunk-0e1xsncc.js +969 -0
  9. package/dist/chunk-0ewgfms5.js +117 -0
  10. package/dist/chunk-0he1tqj5.js +274 -0
  11. package/dist/chunk-0paqc2yw.js +15 -0
  12. package/dist/chunk-0rc2rn3b.js +338 -0
  13. package/dist/chunk-0sb5scxx.js +220 -0
  14. package/dist/chunk-0vkfrmqm.js +690 -0
  15. package/dist/chunk-0wftg29n.js +43 -0
  16. package/dist/chunk-0xjaqda8.js +1124 -0
  17. package/dist/chunk-1141xmr4.js +8 -0
  18. package/dist/chunk-128nh5j9.js +3057 -0
  19. package/dist/chunk-165b9y9k.js +70 -0
  20. package/dist/chunk-17g3drrw.js +121 -0
  21. package/dist/chunk-1cbn5kxf.js +7 -0
  22. package/dist/chunk-1dyeexvn.js +173 -0
  23. package/dist/chunk-1h2famwb.js +49 -0
  24. package/dist/chunk-1hhdpn3t.js +32 -0
  25. package/dist/chunk-1jv1ckhg.js +1152 -0
  26. package/dist/chunk-1pxd1xfp.js +103 -0
  27. package/dist/chunk-1tzexy7d.js +258 -0
  28. package/dist/chunk-1w361mz1.js +438 -0
  29. package/dist/chunk-1xkekb9y.js +19 -0
  30. package/dist/chunk-201dvaa3.js +246 -0
  31. package/dist/chunk-238g70xa.js +36 -0
  32. package/dist/chunk-248szg6m.js +63 -0
  33. package/dist/chunk-271zt54b.js +1871 -0
  34. package/dist/chunk-27xc1csx.js +104 -0
  35. package/dist/chunk-2a27tvzp.js +281 -0
  36. package/dist/chunk-2a42s11t.js +412 -0
  37. package/dist/chunk-2eykm0j0.js +20 -0
  38. package/dist/chunk-2fwze72g.js +24 -0
  39. package/dist/chunk-2g1zxpt7.js +2833 -0
  40. package/dist/chunk-2gzv8nrw.js +205 -0
  41. package/dist/chunk-2jb48txn.js +98 -0
  42. package/dist/chunk-2k995y2x.js +880 -0
  43. package/dist/chunk-2kbk09sb.js +263 -0
  44. package/dist/chunk-2kc13eta.js +88 -0
  45. package/dist/chunk-2mcp388c.js +250 -0
  46. package/dist/chunk-2mcrd0rj.js +672 -0
  47. package/dist/chunk-2nayx6q1.js +63 -0
  48. package/dist/chunk-2t3vw4tx.js +22820 -0
  49. package/dist/chunk-2tkt52mz.js +165 -0
  50. package/dist/chunk-2tme3s1c.js +114 -0
  51. package/dist/chunk-2tw2ve8h.js +145 -0
  52. package/dist/chunk-2v1br2x0.js +59 -0
  53. package/dist/chunk-2x3gmbws.js +120 -0
  54. package/dist/chunk-30rst83v.js +168 -0
  55. package/dist/chunk-36k3f7pn.js +165 -0
  56. package/dist/chunk-3be7ka25.js +56 -0
  57. package/dist/chunk-3c25bcsw.js +17 -0
  58. package/dist/chunk-3cn070p7.js +3205 -0
  59. package/dist/chunk-3gqdqmzb.js +75 -0
  60. package/dist/chunk-3h8a89gy.js +46 -0
  61. package/dist/chunk-3nk79af8.js +8 -0
  62. package/dist/chunk-3psth3ez.js +266 -0
  63. package/dist/chunk-3r24h7t6.js +113 -0
  64. package/dist/chunk-3s5r02ps.js +648 -0
  65. package/dist/chunk-3vpqaqc6.js +339 -0
  66. package/dist/chunk-3w6s9m5w.js +16 -0
  67. package/dist/chunk-404wc7d4.js +385 -0
  68. package/dist/chunk-41xeh3t9.js +81 -0
  69. package/dist/chunk-4491abz9.js +99 -0
  70. package/dist/chunk-44fpr6jq.js +434 -0
  71. package/dist/chunk-45kxdsp8.js +444 -0
  72. package/dist/chunk-495d85x1.js +8066 -0
  73. package/dist/chunk-4bgz02m1.js +285 -0
  74. package/dist/chunk-4dfmgx6h.js +69 -0
  75. package/dist/chunk-4fbyr2hm.js +279 -0
  76. package/dist/chunk-4g3v8y12.js +23 -0
  77. package/dist/chunk-4gj6zzg1.js +98 -0
  78. package/dist/chunk-4jm600zv.js +13 -0
  79. package/dist/chunk-4y62603j.js +117 -0
  80. package/dist/chunk-4zfkzkt6.js +37 -0
  81. package/dist/chunk-52n4py3b.js +225 -0
  82. package/dist/chunk-55wgxwa9.js +13877 -0
  83. package/dist/chunk-5a3cw988.js +38 -0
  84. package/dist/chunk-5dsvtbwb.js +87 -0
  85. package/dist/chunk-5hva0tsg.js +726 -0
  86. package/dist/chunk-5r3ak65p.js +229 -0
  87. package/dist/chunk-5t59fqg3.js +127 -0
  88. package/dist/chunk-5wnn3t3a.js +71 -0
  89. package/dist/chunk-5wxspfct.js +40 -0
  90. package/dist/chunk-60nc5bh3.js +1579 -0
  91. package/dist/chunk-6bd8brc4.js +48 -0
  92. package/dist/chunk-6dcq96a3.js +128 -0
  93. package/dist/chunk-6dj5t602.js +341 -0
  94. package/dist/chunk-6fkwz9yk.js +716 -0
  95. package/dist/chunk-6gr3c3w9.js +378 -0
  96. package/dist/chunk-6heqkcjx.js +153 -0
  97. package/dist/chunk-6n2qgm9v.js +8 -0
  98. package/dist/chunk-6tm5941a.js +152 -0
  99. package/dist/chunk-6tq2v3rk.js +186 -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-77g09znh.js +391 -0
  104. package/dist/chunk-79zmgkg5.js +750 -0
  105. package/dist/chunk-7ahman84.js +87 -0
  106. package/dist/chunk-7aw745vx.js +40175 -0
  107. package/dist/chunk-7d35rxr3.js +69 -0
  108. package/dist/chunk-7enxknwt.js +442 -0
  109. package/dist/chunk-7j0wpf4m.js +89 -0
  110. package/dist/chunk-7m2nd8da.js +110 -0
  111. package/dist/chunk-7q6pjeyp.js +1493 -0
  112. package/dist/chunk-7qwme3ab.js +120 -0
  113. package/dist/chunk-7rgwp44r.js +130 -0
  114. package/dist/chunk-7rn4t7tx.js +162 -0
  115. package/dist/chunk-7vtykt4v.js +102 -0
  116. package/dist/chunk-7whgbwhx.js +584 -0
  117. package/dist/chunk-7wm1rjfm.js +16392 -0
  118. package/dist/chunk-7wm5s02e.js +216 -0
  119. package/dist/chunk-7xyswgjh.js +8 -0
  120. package/dist/chunk-7ymfj7m3.js +151 -0
  121. package/dist/chunk-7z8j9qfn.js +121 -0
  122. package/dist/chunk-83hfzbx3.js +10 -0
  123. package/dist/chunk-8bedvdm1.js +32 -0
  124. package/dist/chunk-8c32awe2.js +21933 -0
  125. package/dist/chunk-8d5eyjse.js +26840 -0
  126. package/dist/chunk-8fmbf525.js +95 -0
  127. package/dist/chunk-8hq5kk3y.js +44 -0
  128. package/dist/chunk-8mqwac85.js +73 -0
  129. package/dist/chunk-8tnsngw2.js +31 -0
  130. package/dist/chunk-8y12jxg8.js +10 -0
  131. package/dist/chunk-8ymf4e6z.js +48 -0
  132. package/dist/chunk-90wp6wez.js +10510 -0
  133. package/dist/chunk-91gk0g2y.js +654 -0
  134. package/dist/chunk-97r68x5g.js +3373 -0
  135. package/dist/chunk-9egdc8n4.js +463 -0
  136. package/dist/chunk-9gbamk79.js +93 -0
  137. package/dist/chunk-9rcbyag3.js +16 -0
  138. package/dist/chunk-9rr0wepz.js +56 -0
  139. package/dist/chunk-9x5zgy22.js +12 -0
  140. package/dist/chunk-a3csma98.js +74 -0
  141. package/dist/chunk-a8ejc632.js +3094 -0
  142. package/dist/chunk-a9vdeb6y.js +258 -0
  143. package/dist/chunk-a9zh40sj.js +48 -0
  144. package/dist/chunk-ajp7hmws.js +422 -0
  145. package/dist/chunk-ap2a2er6.js +690 -0
  146. package/dist/chunk-as261f01.js +500 -0
  147. package/dist/chunk-av73dywf.js +862 -0
  148. package/dist/chunk-avwewk4v.js +176 -0
  149. package/dist/chunk-b0105v1f.js +79 -0
  150. package/dist/chunk-b4wg70y1.js +54 -0
  151. package/dist/chunk-bjqw6798.js +328 -0
  152. package/dist/chunk-bm1qb16p.js +17 -0
  153. package/dist/chunk-bmvzacx5.js +998 -0
  154. package/dist/chunk-bq6x1ehp.js +908 -0
  155. package/dist/chunk-bqfnp99q.js +477 -0
  156. package/dist/chunk-bqq4zamw.js +27 -0
  157. package/dist/chunk-brcnd1j0.js +26 -0
  158. package/dist/chunk-bsk44136.js +229 -0
  159. package/dist/chunk-bw093kge.js +129 -0
  160. package/dist/chunk-by7ezad6.js +87 -0
  161. package/dist/chunk-c4q9x8t2.js +105 -0
  162. package/dist/chunk-c6421kme.js +54 -0
  163. package/dist/chunk-cdajcgne.js +195 -0
  164. package/dist/chunk-cdz5yb0r.js +57 -0
  165. package/dist/chunk-cfv996bs.js +22 -0
  166. package/dist/chunk-cg43nnpk.js +87 -0
  167. package/dist/chunk-cgfdkzhb.js +12 -0
  168. package/dist/chunk-ch8avrbh.js +86 -0
  169. package/dist/chunk-chkyv40s.js +2642 -0
  170. package/dist/chunk-ckcagq32.js +208 -0
  171. package/dist/chunk-cpe70sxw.js +79 -0
  172. package/dist/chunk-ctw5jwcd.js +213 -0
  173. package/dist/chunk-cvge4pvp.js +122 -0
  174. package/dist/chunk-d049dd11.js +348 -0
  175. package/dist/chunk-d18z9pna.js +106 -0
  176. package/dist/chunk-d7tw94h4.js +114 -0
  177. package/dist/chunk-da4ve9t5.js +9300 -0
  178. package/dist/chunk-daeav7vb.js +418 -0
  179. package/dist/chunk-dd60e5wj.js +41 -0
  180. package/dist/chunk-def1dc97.js +154 -0
  181. package/dist/chunk-dgqrcy74.js +48 -0
  182. package/dist/chunk-dnh7jtpb.js +37 -0
  183. package/dist/chunk-drv8qvwz.js +83 -0
  184. package/dist/chunk-dv1wfr85.js +6373 -0
  185. package/dist/chunk-dvfb4qwt.js +40 -0
  186. package/dist/chunk-dxnv8hfn.js +536 -0
  187. package/dist/chunk-dy3tzxgq.js +91 -0
  188. package/dist/chunk-e3g8q4cn.js +1646 -0
  189. package/dist/chunk-e5pntxye.js +37 -0
  190. package/dist/chunk-e6s36z54.js +1322 -0
  191. package/dist/chunk-e7393td6.js +42 -0
  192. package/dist/chunk-ea18z8vr.js +438 -0
  193. package/dist/chunk-ebfsjcvm.js +281 -0
  194. package/dist/chunk-ehtwnxpg.js +1591 -0
  195. package/dist/chunk-epmheefa.js +780 -0
  196. package/dist/chunk-eqp1rfft.js +17 -0
  197. package/dist/chunk-eskw6xkv.js +41 -0
  198. package/dist/chunk-ewadzrm8.js +103 -0
  199. package/dist/chunk-ex978bsn.js +24 -0
  200. package/dist/chunk-exy9bnjf.js +212 -0
  201. package/dist/chunk-f1f3dmd5.js +713 -0
  202. package/dist/chunk-f5ma3nh5.js +3436 -0
  203. package/dist/chunk-f7yg1atj.js +47 -0
  204. package/dist/chunk-fakajzny.js +372 -0
  205. package/dist/chunk-fbv4apne.js +51 -0
  206. package/dist/chunk-fcz5eche.js +467 -0
  207. package/dist/chunk-fpf4cgbt.js +4521 -0
  208. package/dist/chunk-fpjzr5jj.js +674 -0
  209. package/dist/chunk-ftrm87vt.js +467 -0
  210. package/dist/chunk-ftsp0cj3.js +105 -0
  211. package/dist/chunk-fv7hhcns.js +345 -0
  212. package/dist/chunk-fvcwxb8x.js +83 -0
  213. package/dist/chunk-fyc5fepv.js +10 -0
  214. package/dist/chunk-g00hs992.js +90 -0
  215. package/dist/chunk-g0j0t6qk.js +26 -0
  216. package/dist/chunk-g338npwr.js +1061 -0
  217. package/dist/chunk-g3t0act8.js +8 -0
  218. package/dist/chunk-g5fpkpeg.js +520 -0
  219. package/dist/chunk-g6e1ab2k.js +143 -0
  220. package/dist/chunk-g7fxbqsc.js +157 -0
  221. package/dist/chunk-g9q2cznf.js +173123 -0
  222. package/dist/chunk-g9qyg278.js +88 -0
  223. package/dist/chunk-g9xf7jc4.js +564 -0
  224. package/dist/chunk-gax0fcbx.js +182 -0
  225. package/dist/chunk-gf96dtb6.js +373 -0
  226. package/dist/chunk-gkjdjqfs.js +112 -0
  227. package/dist/chunk-gkrx7ptx.js +242 -0
  228. package/dist/chunk-gqk545se.js +6107 -0
  229. package/dist/chunk-grdvmq7q.js +1391 -0
  230. package/dist/chunk-gyj242zr.js +20 -0
  231. package/dist/chunk-gzmjp1eb.js +696 -0
  232. package/dist/chunk-h0qngp9w.js +157 -0
  233. package/dist/chunk-h0rbjg6x.js +55 -0
  234. package/dist/chunk-h2j4t3fk.js +41651 -0
  235. package/dist/chunk-h6c8cms4.js +458 -0
  236. package/dist/chunk-ha0xq3e9.js +779 -0
  237. package/dist/chunk-hakdhagh.js +16606 -0
  238. package/dist/chunk-hbh17tng.js +1013 -0
  239. package/dist/chunk-hdfzyzk4.js +85 -0
  240. package/dist/chunk-hdtb5jce.js +101 -0
  241. package/dist/chunk-hdwh7ncw.js +2334 -0
  242. package/dist/chunk-hfzj1m07.js +118 -0
  243. package/dist/chunk-hg776v69.js +745 -0
  244. package/dist/chunk-hgtf13es.js +655 -0
  245. package/dist/chunk-hh7cmy4k.js +20 -0
  246. package/dist/chunk-hjhc4cpt.js +69 -0
  247. package/dist/chunk-hk9xz7gk.js +118 -0
  248. package/dist/chunk-hpwa620w.js +602 -0
  249. package/dist/chunk-hqmz36b3.js +552 -0
  250. package/dist/chunk-hrzerbfw.js +1299 -0
  251. package/dist/chunk-hx2tr4ep.js +7189 -0
  252. package/dist/chunk-hzhe8ygc.js +547 -0
  253. package/dist/chunk-j2k4p94p.js +55 -0
  254. package/dist/chunk-j3a4p81y.js +184 -0
  255. package/dist/chunk-j5j6nrfq.js +40 -0
  256. package/dist/chunk-j5zq8axt.js +432 -0
  257. package/dist/chunk-j64ga6ta.js +8035 -0
  258. package/dist/chunk-j8rw3m89.js +198 -0
  259. package/dist/chunk-j99mjxam.js +220 -0
  260. package/dist/chunk-jafes477.js +29 -0
  261. package/dist/chunk-jaqg0k7h.js +271 -0
  262. package/dist/chunk-jce5r25x.js +18 -0
  263. package/dist/chunk-jd32zbps.js +15 -0
  264. package/dist/chunk-jdew773m.js +115 -0
  265. package/dist/chunk-jdgeec04.js +4249 -0
  266. package/dist/chunk-jfv3zczw.js +227 -0
  267. package/dist/chunk-jjsx6t78.js +169 -0
  268. package/dist/chunk-jnhkref0.js +30 -0
  269. package/dist/chunk-jpr8js4w.js +328 -0
  270. package/dist/chunk-jx817w05.js +11 -0
  271. package/dist/chunk-jy35mvy3.js +1095 -0
  272. package/dist/chunk-jz6sqm8m.js +9175 -0
  273. package/dist/chunk-jzmz18nn.js +65 -0
  274. package/dist/chunk-k0g3jve7.js +89 -0
  275. package/dist/chunk-k0p9w03v.js +4957 -0
  276. package/dist/chunk-k1g3g183.js +128 -0
  277. package/dist/chunk-k1p54aq6.js +54 -0
  278. package/dist/chunk-k3vpzx3c.js +160 -0
  279. package/dist/chunk-k5c8ssc6.js +99 -0
  280. package/dist/chunk-k808gmhk.js +71 -0
  281. package/dist/chunk-k9c3888e.js +644 -0
  282. package/dist/chunk-kexj9c6y.js +5398 -0
  283. package/dist/chunk-kgg1gq3t.js +113 -0
  284. package/dist/chunk-ks0m9njy.js +542 -0
  285. package/dist/chunk-kwekc97v.js +18 -0
  286. package/dist/chunk-kwkrek4t.js +95 -0
  287. package/dist/chunk-m06q12hg.js +61 -0
  288. package/dist/chunk-m23b51r2.js +724 -0
  289. package/dist/chunk-m4gcjpj3.js +103 -0
  290. package/dist/chunk-m6rk1r6q.js +194 -0
  291. package/dist/chunk-madfgr3n.js +216 -0
  292. package/dist/chunk-mb2xmb0d.js +53 -0
  293. package/dist/chunk-mnx3wyv4.js +175 -0
  294. package/dist/chunk-mt25echc.js +6157 -0
  295. package/dist/chunk-mv1pbf3a.js +297 -0
  296. package/dist/chunk-my7r0cca.js +469 -0
  297. package/dist/chunk-n0qaeaa5.js +256 -0
  298. package/dist/chunk-n5crdyay.js +1549 -0
  299. package/dist/chunk-n5t9m8h9.js +524 -0
  300. package/dist/chunk-n78qmqpq.js +208 -0
  301. package/dist/chunk-n7ttdtk0.js +641 -0
  302. package/dist/chunk-njtjmsx7.js +71 -0
  303. package/dist/chunk-nka1g8f4.js +773 -0
  304. package/dist/chunk-nprycdaa.js +525 -0
  305. package/dist/chunk-npv8q5qr.js +333 -0
  306. package/dist/chunk-nq0fxyxh.js +752 -0
  307. package/dist/chunk-nrp9yaq6.js +86 -0
  308. package/dist/chunk-nt837qt9.js +21 -0
  309. package/dist/chunk-nx6nds18.js +60 -0
  310. package/dist/chunk-nxsh6de2.js +1711 -0
  311. package/dist/chunk-p196v9d0.js +140 -0
  312. package/dist/chunk-p2816w9z.js +1486 -0
  313. package/dist/chunk-p2d5nh3g.js +342 -0
  314. package/dist/chunk-p2pztr2r.js +104 -0
  315. package/dist/chunk-p68nf56z.js +92 -0
  316. package/dist/chunk-p6pc9xrz.js +3443 -0
  317. package/dist/chunk-p7g7pf3f.js +336 -0
  318. package/dist/chunk-p7skftb4.js +108 -0
  319. package/dist/chunk-pa2235xc.js +160 -0
  320. package/dist/chunk-pabnr66n.js +83 -0
  321. package/dist/chunk-pmzbyaat.js +99 -0
  322. package/dist/chunk-ppwjyveh.js +8 -0
  323. package/dist/chunk-pqzk7nbh.js +91 -0
  324. package/dist/chunk-ps49ymvj.js +43 -0
  325. package/dist/chunk-ptmcaxqn.js +155 -0
  326. package/dist/chunk-pvvew193.js +802 -0
  327. package/dist/chunk-pvx0x5zm.js +2057 -0
  328. package/dist/chunk-pwwa7s62.js +11 -0
  329. package/dist/chunk-pxvatg16.js +847 -0
  330. package/dist/chunk-py77warv.js +66 -0
  331. package/dist/chunk-q1e6pzwh.js +224 -0
  332. package/dist/chunk-q1txr206.js +532 -0
  333. package/dist/chunk-q25bjaev.js +15 -0
  334. package/dist/chunk-q43gccx5.js +92 -0
  335. package/dist/chunk-q6av622g.js +38 -0
  336. package/dist/chunk-qdrwxg3e.js +316 -0
  337. package/dist/chunk-qnbdekts.js +299 -0
  338. package/dist/chunk-qnfx3qtx.js +617 -0
  339. package/dist/chunk-qp2qdcda.js +100 -0
  340. package/dist/chunk-qqfa0dqg.js +2343 -0
  341. package/dist/chunk-qwvrkydc.js +253 -0
  342. package/dist/chunk-qz2x630m.js +49145 -0
  343. package/dist/chunk-r66hz8j6.js +34 -0
  344. package/dist/chunk-r6b58y3x.js +17 -0
  345. package/dist/chunk-r8f13sz1.js +1551 -0
  346. package/dist/chunk-ra0r65nx.js +173 -0
  347. package/dist/chunk-rcdpvnxh.js +826 -0
  348. package/dist/chunk-rf2w4x97.js +266 -0
  349. package/dist/chunk-rn0v1hk8.js +34 -0
  350. package/dist/chunk-rq1kckze.js +98 -0
  351. package/dist/chunk-rs45skes.js +123 -0
  352. package/dist/chunk-rse6x10x.js +89 -0
  353. package/dist/chunk-rxdhy7ve.js +131 -0
  354. package/dist/chunk-rxwb7b78.js +10476 -0
  355. package/dist/chunk-s0wvh65m.js +5810 -0
  356. package/dist/chunk-s39js2d3.js +61 -0
  357. package/dist/chunk-s3pzvdss.js +50 -0
  358. package/dist/chunk-s8y2tfzf.js +5012 -0
  359. package/dist/chunk-sb2sew2f.js +32 -0
  360. package/dist/chunk-scb48p4v.js +496 -0
  361. package/dist/chunk-sd36yzx8.js +954 -0
  362. package/dist/chunk-sdj9b9wh.js +782 -0
  363. package/dist/chunk-sjqtqj35.js +28 -0
  364. package/dist/chunk-spqaamnc.js +63 -0
  365. package/dist/chunk-sq0wf7jj.js +1919 -0
  366. package/dist/chunk-sy1hkkty.js +400 -0
  367. package/dist/chunk-sy9jf9v2.js +109 -0
  368. package/dist/chunk-szj5wvdy.js +28 -0
  369. package/dist/chunk-t0brxw87.js +153 -0
  370. package/dist/chunk-t0rgmccj.js +39 -0
  371. package/dist/chunk-t2km9bn3.js +87 -0
  372. package/dist/chunk-t4afbt2j.js +88 -0
  373. package/dist/chunk-t4c5qtdc.js +42 -0
  374. package/dist/chunk-t94jxd0x.js +100 -0
  375. package/dist/chunk-t9z6njcr.js +1585 -0
  376. package/dist/chunk-tb2g2bba.js +192 -0
  377. package/dist/chunk-tdpvdzbf.js +97 -0
  378. package/dist/chunk-tf4dw2e2.js +142 -0
  379. package/dist/chunk-tjaqa99q.js +125 -0
  380. package/dist/chunk-tp40437d.js +90 -0
  381. package/dist/chunk-ts2p6bv1.js +224 -0
  382. package/dist/chunk-tse7q7k1.js +255 -0
  383. package/dist/chunk-ttk5dzz8.js +25 -0
  384. package/dist/chunk-v1kzp02e.js +785 -0
  385. package/dist/chunk-v1mgv1et.js +15 -0
  386. package/dist/chunk-v399mzxk.js +58 -0
  387. package/dist/chunk-v4h5psgs.js +247 -0
  388. package/dist/chunk-v78fj8by.js +145 -0
  389. package/dist/chunk-v9smspw2.js +4301 -0
  390. package/dist/chunk-vabm7x8v.js +61 -0
  391. package/dist/chunk-veaq13qy.js +490 -0
  392. package/dist/chunk-vest0y6x.js +3830 -0
  393. package/dist/chunk-vf5sd1nq.js +12 -0
  394. package/dist/chunk-vmz3wcnv.js +641 -0
  395. package/dist/chunk-vpb723tx.js +38 -0
  396. package/dist/chunk-vratq94g.js +349 -0
  397. package/dist/chunk-vsgv16zj.js +756 -0
  398. package/dist/chunk-vxa0avb0.js +105 -0
  399. package/dist/chunk-vyc0rjyx.js +31 -0
  400. package/dist/chunk-vyjeh50y.js +2149 -0
  401. package/dist/chunk-vzqrbsd1.js +22 -0
  402. package/dist/chunk-w0hx9v3y.js +109 -0
  403. package/dist/chunk-w0r5627q.js +788 -0
  404. package/dist/chunk-w2qfgzzh.js +306 -0
  405. package/dist/chunk-w2z5pqd3.js +336 -0
  406. package/dist/chunk-w7h2yphx.js +17 -0
  407. package/dist/chunk-w7wgpqcp.js +157 -0
  408. package/dist/chunk-wf7yz2j0.js +849 -0
  409. package/dist/chunk-wfz0qffj.js +3939 -0
  410. package/dist/chunk-whvdag1y.js +6956 -0
  411. package/dist/chunk-wm2f2f1z.js +20 -0
  412. package/dist/chunk-wqpr7002.js +765 -0
  413. package/dist/chunk-wsqhnjj3.js +606 -0
  414. package/dist/chunk-wszmas1q.js +62 -0
  415. package/dist/chunk-wzpdet3m.js +843 -0
  416. package/dist/chunk-x14dq3v1.js +722 -0
  417. package/dist/chunk-x6bg700t.js +88 -0
  418. package/dist/chunk-x6r4v44b.js +8 -0
  419. package/dist/chunk-x8b7vft8.js +132 -0
  420. package/dist/chunk-xmdcxa8r.js +374 -0
  421. package/dist/chunk-xs0hwvpa.js +476 -0
  422. package/dist/chunk-xsq9ae7x.js +90 -0
  423. package/dist/chunk-xszk7n10.js +14358 -0
  424. package/dist/chunk-xv3era3s.js +8 -0
  425. package/dist/chunk-xyqr1cww.js +4389 -0
  426. package/dist/chunk-y1784krc.js +19 -0
  427. package/dist/chunk-y42a2xmv.js +1316 -0
  428. package/dist/chunk-y47cg3kz.js +42 -0
  429. package/dist/chunk-y56ckcf8.js +44 -0
  430. package/dist/chunk-ybgghjqa.js +602 -0
  431. package/dist/chunk-yt6z8030.js +810 -0
  432. package/dist/chunk-ytg914ra.js +28 -0
  433. package/dist/chunk-ywxd4qw4.js +22 -0
  434. package/dist/chunk-yym1e1dr.js +202 -0
  435. package/dist/chunk-z2dp53wn.js +17 -0
  436. package/dist/chunk-z4wtem3z.js +305 -0
  437. package/dist/chunk-zacq47b2.js +84 -0
  438. package/dist/chunk-ze747xz6.js +692 -0
  439. package/dist/chunk-zk2wsm7d.js +15 -0
  440. package/dist/chunk-zkmxtgc3.js +287 -0
  441. package/dist/chunk-zsfxha74.js +17655 -0
  442. package/dist/chunk-zv3hxg5y.js +267 -0
  443. package/dist/chunk-zw2x3xxq.js +96 -0
  444. package/dist/chunk-zyf9epwn.js +642 -0
  445. package/dist/chunk-zz21rvr7.js +27 -0
  446. package/dist/cli.js +81 -0
  447. package/package.json +165 -0
@@ -0,0 +1,3373 @@
1
+ // @bun
2
+ import {
3
+ ClaudeMdExternalIncludesDialog,
4
+ init_ClaudeMdExternalIncludesDialog
5
+ } from "./chunk-exy9bnjf.js";
6
+ import {
7
+ init_bridgeEnabled
8
+ } from "./chunk-5wxspfct.js";
9
+ import {
10
+ ModelPicker,
11
+ init_ModelPicker,
12
+ init_extraUsage,
13
+ isBilledAsExtraUsage
14
+ } from "./chunk-f1f3dmd5.js";
15
+ import {
16
+ ThemePicker,
17
+ init_ThemePicker
18
+ } from "./chunk-veaq13qy.js";
19
+ import {
20
+ OverageCreditUpsell,
21
+ init_OverageCreditUpsell,
22
+ isEligibleForOverageCreditGrant
23
+ } from "./chunk-tb2g2bba.js";
24
+ import {
25
+ SearchBox,
26
+ init_SearchBox,
27
+ init_useSearchInput,
28
+ useSearchInput
29
+ } from "./chunk-j5zq8axt.js";
30
+ import {
31
+ Tab,
32
+ Tabs,
33
+ init_Tabs,
34
+ useTabHeaderFocus
35
+ } from "./chunk-fakajzny.js";
36
+ import {
37
+ fetchUtilization,
38
+ init_usage
39
+ } from "./chunk-nx6nds18.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-g9q2cznf.js";
85
+ import {
86
+ clearCliTeammateModeOverride,
87
+ getCliTeammateModeOverride,
88
+ init_teammateModeSnapshot
89
+ } from "./chunk-248szg6m.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-9egdc8n4.js";
100
+ import {
101
+ init_useExitOnCtrlCDWithKeybindings,
102
+ useExitOnCtrlCDWithKeybindings
103
+ } from "./chunk-pmzbyaat.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-pvvew193.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-8d5eyjse.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-7wm1rjfm.js";
169
+ import {
170
+ formatResetText,
171
+ init_format
172
+ } from "./chunk-x14dq3v1.js";
173
+ import {
174
+ init_analytics,
175
+ logEvent
176
+ } from "./chunk-h0rbjg6x.js";
177
+ import {
178
+ figures_default,
179
+ init_figures
180
+ } from "./chunk-hx2tr4ep.js";
181
+ import {
182
+ init_log,
183
+ logError
184
+ } from "./chunk-p7g7pf3f.js";
185
+ import {
186
+ getCwd,
187
+ init_cwd
188
+ } from "./chunk-8bedvdm1.js";
189
+ import {
190
+ init_slowOperations,
191
+ jsonStringify
192
+ } from "./chunk-nxsh6de2.js";
193
+ import {
194
+ init_envUtils,
195
+ isEnvTruthy,
196
+ isRunningOnHomespace
197
+ } from "./chunk-3r24h7t6.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: "2.1.888"
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 {
906
+ headerFocused,
907
+ focusHeader
908
+ } = useTabHeaderFocus();
909
+ const insideModal = useIsInsideModal();
910
+ const [, setTheme] = useTheme();
911
+ const themeSetting = useThemeSetting();
912
+ const [globalConfig, setGlobalConfig] = import_react4.useState(getGlobalConfig());
913
+ const initialConfig = React2.useRef(getGlobalConfig());
914
+ const [settingsData, setSettingsData] = import_react4.useState(getInitialSettings());
915
+ const initialSettingsData = React2.useRef(getInitialSettings());
916
+ const [currentOutputStyle, setCurrentOutputStyle] = import_react4.useState(settingsData?.outputStyle || DEFAULT_OUTPUT_STYLE_NAME);
917
+ const initialOutputStyle = React2.useRef(currentOutputStyle);
918
+ const [currentLanguage, setCurrentLanguage] = import_react4.useState(settingsData?.language);
919
+ const initialLanguage = React2.useRef(currentLanguage);
920
+ const [selectedIndex, setSelectedIndex] = import_react4.useState(0);
921
+ const [scrollOffset, setScrollOffset] = import_react4.useState(0);
922
+ const [isSearchMode, setIsSearchMode] = import_react4.useState(true);
923
+ const isTerminalFocused = useTerminalFocus();
924
+ const {
925
+ rows
926
+ } = useTerminalSize();
927
+ const paneCap = contentHeight ?? Math.min(Math.floor(rows * 0.8), 30);
928
+ const maxVisible = Math.max(5, paneCap - 10);
929
+ const mainLoopModel = useAppState((s) => s.mainLoopModel);
930
+ const verbose = useAppState((s_0) => s_0.verbose);
931
+ const thinkingEnabled = useAppState((s_1) => s_1.thinkingEnabled);
932
+ const isFastMode = useAppState((s_2) => isFastModeEnabled() ? s_2.fastMode : false);
933
+ const promptSuggestionEnabled = useAppState((s_3) => s_3.promptSuggestionEnabled);
934
+ const showAutoInDefaultModePicker = false;
935
+ const showDefaultViewPicker = false;
936
+ const setAppState = useSetAppState();
937
+ const [changes, setChanges] = import_react4.useState({});
938
+ const initialThinkingEnabled = React2.useRef(thinkingEnabled);
939
+ const [initialLocalSettings] = import_react4.useState(() => getSettingsForSource("localSettings"));
940
+ const [initialUserSettings] = import_react4.useState(() => getSettingsForSource("userSettings"));
941
+ const initialThemeSetting = React2.useRef(themeSetting);
942
+ const store = useAppStateStore();
943
+ const [initialAppState] = import_react4.useState(() => {
944
+ const s_4 = store.getState();
945
+ return {
946
+ mainLoopModel: s_4.mainLoopModel,
947
+ mainLoopModelForSession: s_4.mainLoopModelForSession,
948
+ verbose: s_4.verbose,
949
+ thinkingEnabled: s_4.thinkingEnabled,
950
+ fastMode: s_4.fastMode,
951
+ promptSuggestionEnabled: s_4.promptSuggestionEnabled,
952
+ isBriefOnly: s_4.isBriefOnly,
953
+ replBridgeEnabled: s_4.replBridgeEnabled,
954
+ replBridgeOutboundOnly: s_4.replBridgeOutboundOnly,
955
+ settings: s_4.settings
956
+ };
957
+ });
958
+ const [initialUserMsgOptIn] = import_react4.useState(() => getUserMsgOptIn());
959
+ const isDirty = React2.useRef(false);
960
+ const [showThinkingWarning, setShowThinkingWarning] = import_react4.useState(false);
961
+ const [showSubmenu, setShowSubmenu] = import_react4.useState(null);
962
+ const {
963
+ query: searchQuery,
964
+ setQuery: setSearchQuery,
965
+ cursorOffset: searchCursorOffset
966
+ } = useSearchInput({
967
+ isActive: isSearchMode && showSubmenu === null && !headerFocused,
968
+ onExit: () => setIsSearchMode(false),
969
+ onExitUp: focusHeader,
970
+ passthroughCtrlKeys: ["c", "d"]
971
+ });
972
+ const ownsEsc = isSearchMode && !headerFocused;
973
+ React2.useEffect(() => {
974
+ onIsSearchModeChange?.(ownsEsc);
975
+ }, [ownsEsc, onIsSearchModeChange]);
976
+ const isConnectedToIde = hasAccessToIDEExtensionDiffFeature(context.options.mcpClients);
977
+ const isFileCheckpointingAvailable = !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING);
978
+ const memoryFiles = React2.use(getMemoryFiles(true));
979
+ const shouldShowExternalIncludesToggle = hasExternalClaudeMdIncludes(memoryFiles);
980
+ const autoUpdaterDisabledReason = getAutoUpdaterDisabledReason();
981
+ function onChangeMainModelConfig(value) {
982
+ const previousModel = mainLoopModel;
983
+ logEvent("tengu_config_model_changed", {
984
+ from_model: previousModel,
985
+ to_model: value
986
+ });
987
+ setAppState((prev) => ({
988
+ ...prev,
989
+ mainLoopModel: value,
990
+ mainLoopModelForSession: null
991
+ }));
992
+ setChanges((prev_0) => {
993
+ const valStr = modelDisplayString(value) + (isBilledAsExtraUsage(value, false, isOpus1mMergeEnabled()) ? " \xB7 Billed as extra usage" : "");
994
+ if ("model" in prev_0) {
995
+ const {
996
+ model,
997
+ ...rest
998
+ } = prev_0;
999
+ return {
1000
+ ...rest,
1001
+ model: valStr
1002
+ };
1003
+ }
1004
+ return {
1005
+ ...prev_0,
1006
+ model: valStr
1007
+ };
1008
+ });
1009
+ }
1010
+ function onChangeVerbose(value_0) {
1011
+ saveGlobalConfig((current) => ({
1012
+ ...current,
1013
+ verbose: value_0
1014
+ }));
1015
+ setGlobalConfig({
1016
+ ...getGlobalConfig(),
1017
+ verbose: value_0
1018
+ });
1019
+ setAppState((prev_1) => ({
1020
+ ...prev_1,
1021
+ verbose: value_0
1022
+ }));
1023
+ setChanges((prev_2) => {
1024
+ if ("verbose" in prev_2) {
1025
+ const {
1026
+ verbose: verbose_0,
1027
+ ...rest_0
1028
+ } = prev_2;
1029
+ return rest_0;
1030
+ }
1031
+ return {
1032
+ ...prev_2,
1033
+ verbose: value_0
1034
+ };
1035
+ });
1036
+ }
1037
+ const settingsItems = [
1038
+ {
1039
+ id: "autoCompactEnabled",
1040
+ label: "Auto-compact",
1041
+ value: globalConfig.autoCompactEnabled,
1042
+ type: "boolean",
1043
+ onChange(autoCompactEnabled) {
1044
+ saveGlobalConfig((current_0) => ({
1045
+ ...current_0,
1046
+ autoCompactEnabled
1047
+ }));
1048
+ setGlobalConfig({
1049
+ ...getGlobalConfig(),
1050
+ autoCompactEnabled
1051
+ });
1052
+ logEvent("tengu_auto_compact_setting_changed", {
1053
+ enabled: autoCompactEnabled
1054
+ });
1055
+ }
1056
+ },
1057
+ {
1058
+ id: "spinnerTipsEnabled",
1059
+ label: "Show tips",
1060
+ value: settingsData?.spinnerTipsEnabled ?? true,
1061
+ type: "boolean",
1062
+ onChange(spinnerTipsEnabled) {
1063
+ updateSettingsForSource("localSettings", {
1064
+ spinnerTipsEnabled
1065
+ });
1066
+ setSettingsData((prev_3) => ({
1067
+ ...prev_3,
1068
+ spinnerTipsEnabled
1069
+ }));
1070
+ logEvent("tengu_tips_setting_changed", {
1071
+ enabled: spinnerTipsEnabled
1072
+ });
1073
+ }
1074
+ },
1075
+ {
1076
+ id: "prefersReducedMotion",
1077
+ label: "Reduce motion",
1078
+ value: settingsData?.prefersReducedMotion ?? false,
1079
+ type: "boolean",
1080
+ onChange(prefersReducedMotion) {
1081
+ updateSettingsForSource("localSettings", {
1082
+ prefersReducedMotion
1083
+ });
1084
+ setSettingsData((prev_4) => ({
1085
+ ...prev_4,
1086
+ prefersReducedMotion
1087
+ }));
1088
+ setAppState((prev_5) => ({
1089
+ ...prev_5,
1090
+ settings: {
1091
+ ...prev_5.settings,
1092
+ prefersReducedMotion
1093
+ }
1094
+ }));
1095
+ logEvent("tengu_reduce_motion_setting_changed", {
1096
+ enabled: prefersReducedMotion
1097
+ });
1098
+ }
1099
+ },
1100
+ {
1101
+ id: "thinkingEnabled",
1102
+ label: "Thinking mode",
1103
+ value: thinkingEnabled ?? true,
1104
+ type: "boolean",
1105
+ onChange(enabled) {
1106
+ setAppState((prev_6) => ({
1107
+ ...prev_6,
1108
+ thinkingEnabled: enabled
1109
+ }));
1110
+ updateSettingsForSource("userSettings", {
1111
+ alwaysThinkingEnabled: enabled ? undefined : false
1112
+ });
1113
+ logEvent("tengu_thinking_toggled", {
1114
+ enabled
1115
+ });
1116
+ }
1117
+ },
1118
+ ...isFastModeEnabled() && isFastModeAvailable() ? [{
1119
+ id: "fastMode",
1120
+ label: `Fast mode (${FAST_MODE_MODEL_DISPLAY} only)`,
1121
+ value: !!isFastMode,
1122
+ type: "boolean",
1123
+ onChange(enabled_0) {
1124
+ clearFastModeCooldown();
1125
+ updateSettingsForSource("userSettings", {
1126
+ fastMode: enabled_0 ? true : undefined
1127
+ });
1128
+ if (enabled_0) {
1129
+ setAppState((prev_7) => ({
1130
+ ...prev_7,
1131
+ mainLoopModel: getFastModeModel(),
1132
+ mainLoopModelForSession: null,
1133
+ fastMode: true
1134
+ }));
1135
+ setChanges((prev_8) => ({
1136
+ ...prev_8,
1137
+ model: getFastModeModel(),
1138
+ "Fast mode": "ON"
1139
+ }));
1140
+ } else {
1141
+ setAppState((prev_9) => ({
1142
+ ...prev_9,
1143
+ fastMode: false
1144
+ }));
1145
+ setChanges((prev_10) => ({
1146
+ ...prev_10,
1147
+ "Fast mode": "OFF"
1148
+ }));
1149
+ }
1150
+ }
1151
+ }] : [],
1152
+ ...getFeatureValue_CACHED_MAY_BE_STALE("tengu_chomp_inflection", false) ? [{
1153
+ id: "promptSuggestionEnabled",
1154
+ label: "Prompt suggestions",
1155
+ value: promptSuggestionEnabled,
1156
+ type: "boolean",
1157
+ onChange(enabled_1) {
1158
+ setAppState((prev_11) => ({
1159
+ ...prev_11,
1160
+ promptSuggestionEnabled: enabled_1
1161
+ }));
1162
+ updateSettingsForSource("userSettings", {
1163
+ promptSuggestionEnabled: enabled_1 ? undefined : false
1164
+ });
1165
+ }
1166
+ }] : [],
1167
+ ...process.env.USER_TYPE === "ant" ? [{
1168
+ id: "speculationEnabled",
1169
+ label: "Speculative execution",
1170
+ value: globalConfig.speculationEnabled ?? true,
1171
+ type: "boolean",
1172
+ onChange(enabled_2) {
1173
+ saveGlobalConfig((current_1) => {
1174
+ if (current_1.speculationEnabled === enabled_2)
1175
+ return current_1;
1176
+ return {
1177
+ ...current_1,
1178
+ speculationEnabled: enabled_2
1179
+ };
1180
+ });
1181
+ setGlobalConfig({
1182
+ ...getGlobalConfig(),
1183
+ speculationEnabled: enabled_2
1184
+ });
1185
+ logEvent("tengu_speculation_setting_changed", {
1186
+ enabled: enabled_2
1187
+ });
1188
+ }
1189
+ }] : [],
1190
+ ...isFileCheckpointingAvailable ? [{
1191
+ id: "fileCheckpointingEnabled",
1192
+ label: "Rewind code (checkpoints)",
1193
+ value: globalConfig.fileCheckpointingEnabled,
1194
+ type: "boolean",
1195
+ onChange(enabled_3) {
1196
+ saveGlobalConfig((current_2) => ({
1197
+ ...current_2,
1198
+ fileCheckpointingEnabled: enabled_3
1199
+ }));
1200
+ setGlobalConfig({
1201
+ ...getGlobalConfig(),
1202
+ fileCheckpointingEnabled: enabled_3
1203
+ });
1204
+ logEvent("tengu_file_history_snapshots_setting_changed", {
1205
+ enabled: enabled_3
1206
+ });
1207
+ }
1208
+ }] : [],
1209
+ {
1210
+ id: "verbose",
1211
+ label: "Verbose output",
1212
+ value: verbose,
1213
+ type: "boolean",
1214
+ onChange: onChangeVerbose
1215
+ },
1216
+ {
1217
+ id: "terminalProgressBarEnabled",
1218
+ label: "Terminal progress bar",
1219
+ value: globalConfig.terminalProgressBarEnabled,
1220
+ type: "boolean",
1221
+ onChange(terminalProgressBarEnabled) {
1222
+ saveGlobalConfig((current_3) => ({
1223
+ ...current_3,
1224
+ terminalProgressBarEnabled
1225
+ }));
1226
+ setGlobalConfig({
1227
+ ...getGlobalConfig(),
1228
+ terminalProgressBarEnabled
1229
+ });
1230
+ logEvent("tengu_terminal_progress_bar_setting_changed", {
1231
+ enabled: terminalProgressBarEnabled
1232
+ });
1233
+ }
1234
+ },
1235
+ ...getFeatureValue_CACHED_MAY_BE_STALE("tengu_terminal_sidebar", false) ? [{
1236
+ id: "showStatusInTerminalTab",
1237
+ label: "Show status in terminal tab",
1238
+ value: globalConfig.showStatusInTerminalTab ?? false,
1239
+ type: "boolean",
1240
+ onChange(showStatusInTerminalTab) {
1241
+ saveGlobalConfig((current_4) => ({
1242
+ ...current_4,
1243
+ showStatusInTerminalTab
1244
+ }));
1245
+ setGlobalConfig({
1246
+ ...getGlobalConfig(),
1247
+ showStatusInTerminalTab
1248
+ });
1249
+ logEvent("tengu_terminal_tab_status_setting_changed", {
1250
+ enabled: showStatusInTerminalTab
1251
+ });
1252
+ }
1253
+ }] : [],
1254
+ {
1255
+ id: "showTurnDuration",
1256
+ label: "Show turn duration",
1257
+ value: globalConfig.showTurnDuration,
1258
+ type: "boolean",
1259
+ onChange(showTurnDuration) {
1260
+ saveGlobalConfig((current_5) => ({
1261
+ ...current_5,
1262
+ showTurnDuration
1263
+ }));
1264
+ setGlobalConfig({
1265
+ ...getGlobalConfig(),
1266
+ showTurnDuration
1267
+ });
1268
+ logEvent("tengu_show_turn_duration_setting_changed", {
1269
+ enabled: showTurnDuration
1270
+ });
1271
+ }
1272
+ },
1273
+ {
1274
+ id: "defaultPermissionMode",
1275
+ label: "Default permission mode",
1276
+ value: settingsData?.permissions?.defaultMode || "default",
1277
+ options: (() => {
1278
+ const priorityOrder = ["default", "plan"];
1279
+ const allModes = EXTERNAL_PERMISSION_MODES;
1280
+ const excluded = ["bypassPermissions"];
1281
+ if (false) {}
1282
+ return [...priorityOrder, ...allModes.filter((m) => !priorityOrder.includes(m) && !excluded.includes(m))];
1283
+ })(),
1284
+ type: "enum",
1285
+ onChange(mode) {
1286
+ const parsedMode = permissionModeFromString(mode);
1287
+ const validatedMode = isExternalPermissionMode(parsedMode) ? toExternalPermissionMode(parsedMode) : parsedMode;
1288
+ const result = updateSettingsForSource("userSettings", {
1289
+ permissions: {
1290
+ ...settingsData?.permissions,
1291
+ defaultMode: validatedMode
1292
+ }
1293
+ });
1294
+ if (result.error) {
1295
+ logError(result.error);
1296
+ return;
1297
+ }
1298
+ setSettingsData((prev_12) => ({
1299
+ ...prev_12,
1300
+ permissions: {
1301
+ ...prev_12?.permissions,
1302
+ defaultMode: validatedMode
1303
+ }
1304
+ }));
1305
+ setChanges((prev_13) => ({
1306
+ ...prev_13,
1307
+ defaultPermissionMode: mode
1308
+ }));
1309
+ logEvent("tengu_config_changed", {
1310
+ setting: "defaultPermissionMode",
1311
+ value: mode
1312
+ });
1313
+ }
1314
+ },
1315
+ ...[],
1316
+ {
1317
+ id: "respectGitignore",
1318
+ label: "Respect .gitignore in file picker",
1319
+ value: globalConfig.respectGitignore,
1320
+ type: "boolean",
1321
+ onChange(respectGitignore) {
1322
+ saveGlobalConfig((current_6) => ({
1323
+ ...current_6,
1324
+ respectGitignore
1325
+ }));
1326
+ setGlobalConfig({
1327
+ ...getGlobalConfig(),
1328
+ respectGitignore
1329
+ });
1330
+ logEvent("tengu_respect_gitignore_setting_changed", {
1331
+ enabled: respectGitignore
1332
+ });
1333
+ }
1334
+ },
1335
+ {
1336
+ id: "copyFullResponse",
1337
+ label: "Always copy full response (skip /copy picker)",
1338
+ value: globalConfig.copyFullResponse,
1339
+ type: "boolean",
1340
+ onChange(copyFullResponse) {
1341
+ saveGlobalConfig((current_7) => ({
1342
+ ...current_7,
1343
+ copyFullResponse
1344
+ }));
1345
+ setGlobalConfig({
1346
+ ...getGlobalConfig(),
1347
+ copyFullResponse
1348
+ });
1349
+ logEvent("tengu_config_changed", {
1350
+ setting: "copyFullResponse",
1351
+ value: String(copyFullResponse)
1352
+ });
1353
+ }
1354
+ },
1355
+ ...isFullscreenEnvEnabled() ? [{
1356
+ id: "copyOnSelect",
1357
+ label: "Copy on select",
1358
+ value: globalConfig.copyOnSelect ?? true,
1359
+ type: "boolean",
1360
+ onChange(copyOnSelect) {
1361
+ saveGlobalConfig((current_8) => ({
1362
+ ...current_8,
1363
+ copyOnSelect
1364
+ }));
1365
+ setGlobalConfig({
1366
+ ...getGlobalConfig(),
1367
+ copyOnSelect
1368
+ });
1369
+ logEvent("tengu_config_changed", {
1370
+ setting: "copyOnSelect",
1371
+ value: String(copyOnSelect)
1372
+ });
1373
+ }
1374
+ }] : [],
1375
+ autoUpdaterDisabledReason ? {
1376
+ id: "autoUpdatesChannel",
1377
+ label: "Auto-update channel",
1378
+ value: "disabled",
1379
+ type: "managedEnum",
1380
+ onChange() {}
1381
+ } : {
1382
+ id: "autoUpdatesChannel",
1383
+ label: "Auto-update channel",
1384
+ value: settingsData?.autoUpdatesChannel ?? "latest",
1385
+ type: "managedEnum",
1386
+ onChange() {}
1387
+ },
1388
+ {
1389
+ id: "theme",
1390
+ label: "Theme",
1391
+ value: themeSetting,
1392
+ type: "managedEnum",
1393
+ onChange: setTheme
1394
+ },
1395
+ {
1396
+ id: "notifChannel",
1397
+ label: "Notifications",
1398
+ value: globalConfig.preferredNotifChannel,
1399
+ options: ["auto", "iterm2", "terminal_bell", "iterm2_with_bell", "kitty", "ghostty", "notifications_disabled"],
1400
+ type: "enum",
1401
+ onChange(notifChannel) {
1402
+ saveGlobalConfig((current_9) => ({
1403
+ ...current_9,
1404
+ preferredNotifChannel: notifChannel
1405
+ }));
1406
+ setGlobalConfig({
1407
+ ...getGlobalConfig(),
1408
+ preferredNotifChannel: notifChannel
1409
+ });
1410
+ }
1411
+ },
1412
+ ...[],
1413
+ {
1414
+ id: "outputStyle",
1415
+ label: "Output style",
1416
+ value: currentOutputStyle,
1417
+ type: "managedEnum",
1418
+ onChange: () => {}
1419
+ },
1420
+ ...showDefaultViewPicker ? [{
1421
+ id: "defaultView",
1422
+ label: "What you see by default",
1423
+ value: settingsData?.defaultView === undefined ? "default" : String(settingsData.defaultView),
1424
+ options: ["transcript", "chat", "default"],
1425
+ type: "enum",
1426
+ onChange(selected) {
1427
+ const defaultView = selected === "default" ? undefined : selected;
1428
+ updateSettingsForSource("localSettings", {
1429
+ defaultView
1430
+ });
1431
+ setSettingsData((prev_17) => ({
1432
+ ...prev_17,
1433
+ defaultView
1434
+ }));
1435
+ const nextBrief = defaultView === "chat";
1436
+ setAppState((prev_18) => {
1437
+ if (prev_18.isBriefOnly === nextBrief)
1438
+ return prev_18;
1439
+ return {
1440
+ ...prev_18,
1441
+ isBriefOnly: nextBrief
1442
+ };
1443
+ });
1444
+ setUserMsgOptIn(nextBrief);
1445
+ setChanges((prev_19) => ({
1446
+ ...prev_19,
1447
+ "Default view": selected
1448
+ }));
1449
+ logEvent("tengu_default_view_setting_changed", {
1450
+ value: defaultView ?? "unset"
1451
+ });
1452
+ }
1453
+ }] : [],
1454
+ {
1455
+ id: "language",
1456
+ label: "Language",
1457
+ value: currentLanguage ?? "Default (English)",
1458
+ type: "managedEnum",
1459
+ onChange: () => {}
1460
+ },
1461
+ {
1462
+ id: "editorMode",
1463
+ label: "Editor mode",
1464
+ value: globalConfig.editorMode === "emacs" ? "normal" : globalConfig.editorMode || "normal",
1465
+ options: ["normal", "vim"],
1466
+ type: "enum",
1467
+ onChange(value_1) {
1468
+ saveGlobalConfig((current_13) => ({
1469
+ ...current_13,
1470
+ editorMode: value_1
1471
+ }));
1472
+ setGlobalConfig({
1473
+ ...getGlobalConfig(),
1474
+ editorMode: value_1
1475
+ });
1476
+ logEvent("tengu_editor_mode_changed", {
1477
+ mode: value_1,
1478
+ source: "config_panel"
1479
+ });
1480
+ }
1481
+ },
1482
+ {
1483
+ id: "prStatusFooterEnabled",
1484
+ label: "Show PR status footer",
1485
+ value: globalConfig.prStatusFooterEnabled ?? true,
1486
+ type: "boolean",
1487
+ onChange(enabled_4) {
1488
+ saveGlobalConfig((current_14) => {
1489
+ if (current_14.prStatusFooterEnabled === enabled_4)
1490
+ return current_14;
1491
+ return {
1492
+ ...current_14,
1493
+ prStatusFooterEnabled: enabled_4
1494
+ };
1495
+ });
1496
+ setGlobalConfig({
1497
+ ...getGlobalConfig(),
1498
+ prStatusFooterEnabled: enabled_4
1499
+ });
1500
+ logEvent("tengu_pr_status_footer_setting_changed", {
1501
+ enabled: enabled_4
1502
+ });
1503
+ }
1504
+ },
1505
+ {
1506
+ id: "model",
1507
+ label: "Model",
1508
+ value: mainLoopModel === null ? "Default (recommended)" : mainLoopModel,
1509
+ type: "managedEnum",
1510
+ onChange: onChangeMainModelConfig
1511
+ },
1512
+ ...isConnectedToIde ? [{
1513
+ id: "diffTool",
1514
+ label: "Diff tool",
1515
+ value: globalConfig.diffTool ?? "auto",
1516
+ options: ["terminal", "auto"],
1517
+ type: "enum",
1518
+ onChange(diffTool) {
1519
+ saveGlobalConfig((current_15) => ({
1520
+ ...current_15,
1521
+ diffTool
1522
+ }));
1523
+ setGlobalConfig({
1524
+ ...getGlobalConfig(),
1525
+ diffTool
1526
+ });
1527
+ logEvent("tengu_diff_tool_changed", {
1528
+ tool: diffTool,
1529
+ source: "config_panel"
1530
+ });
1531
+ }
1532
+ }] : [],
1533
+ ...!isSupportedTerminal() ? [{
1534
+ id: "autoConnectIde",
1535
+ label: "Auto-connect to IDE (external terminal)",
1536
+ value: globalConfig.autoConnectIde ?? false,
1537
+ type: "boolean",
1538
+ onChange(autoConnectIde) {
1539
+ saveGlobalConfig((current_16) => ({
1540
+ ...current_16,
1541
+ autoConnectIde
1542
+ }));
1543
+ setGlobalConfig({
1544
+ ...getGlobalConfig(),
1545
+ autoConnectIde
1546
+ });
1547
+ logEvent("tengu_auto_connect_ide_changed", {
1548
+ enabled: autoConnectIde,
1549
+ source: "config_panel"
1550
+ });
1551
+ }
1552
+ }] : [],
1553
+ ...isSupportedTerminal() ? [{
1554
+ id: "autoInstallIdeExtension",
1555
+ label: "Auto-install IDE extension",
1556
+ value: globalConfig.autoInstallIdeExtension ?? true,
1557
+ type: "boolean",
1558
+ onChange(autoInstallIdeExtension) {
1559
+ saveGlobalConfig((current_17) => ({
1560
+ ...current_17,
1561
+ autoInstallIdeExtension
1562
+ }));
1563
+ setGlobalConfig({
1564
+ ...getGlobalConfig(),
1565
+ autoInstallIdeExtension
1566
+ });
1567
+ logEvent("tengu_auto_install_ide_extension_changed", {
1568
+ enabled: autoInstallIdeExtension,
1569
+ source: "config_panel"
1570
+ });
1571
+ }
1572
+ }] : [],
1573
+ {
1574
+ id: "claudeInChromeDefaultEnabled",
1575
+ label: "Claude in Chrome enabled by default",
1576
+ value: globalConfig.claudeInChromeDefaultEnabled ?? true,
1577
+ type: "boolean",
1578
+ onChange(enabled_5) {
1579
+ saveGlobalConfig((current_18) => ({
1580
+ ...current_18,
1581
+ claudeInChromeDefaultEnabled: enabled_5
1582
+ }));
1583
+ setGlobalConfig({
1584
+ ...getGlobalConfig(),
1585
+ claudeInChromeDefaultEnabled: enabled_5
1586
+ });
1587
+ logEvent("tengu_claude_in_chrome_setting_changed", {
1588
+ enabled: enabled_5
1589
+ });
1590
+ }
1591
+ },
1592
+ ...isAgentSwarmsEnabled() ? (() => {
1593
+ const cliOverride = getCliTeammateModeOverride();
1594
+ const label = cliOverride ? `Teammate mode [overridden: ${cliOverride}]` : "Teammate mode";
1595
+ return [{
1596
+ id: "teammateMode",
1597
+ label,
1598
+ value: globalConfig.teammateMode ?? "auto",
1599
+ options: ["auto", "tmux", "in-process"],
1600
+ type: "enum",
1601
+ onChange(mode_0) {
1602
+ if (mode_0 !== "auto" && mode_0 !== "tmux" && mode_0 !== "in-process") {
1603
+ return;
1604
+ }
1605
+ clearCliTeammateModeOverride(mode_0);
1606
+ saveGlobalConfig((current_19) => ({
1607
+ ...current_19,
1608
+ teammateMode: mode_0
1609
+ }));
1610
+ setGlobalConfig({
1611
+ ...getGlobalConfig(),
1612
+ teammateMode: mode_0
1613
+ });
1614
+ logEvent("tengu_teammate_mode_changed", {
1615
+ mode: mode_0
1616
+ });
1617
+ }
1618
+ }, {
1619
+ id: "teammateDefaultModel",
1620
+ label: "Default teammate model",
1621
+ value: teammateModelDisplayString(globalConfig.teammateDefaultModel),
1622
+ type: "managedEnum",
1623
+ onChange() {}
1624
+ }];
1625
+ })() : [],
1626
+ ...[],
1627
+ ...shouldShowExternalIncludesToggle ? [{
1628
+ id: "showExternalIncludesDialog",
1629
+ label: "External CLAUDE.md includes",
1630
+ value: (() => {
1631
+ const projectConfig = getCurrentProjectConfig();
1632
+ if (projectConfig.hasClaudeMdExternalIncludesApproved) {
1633
+ return "true";
1634
+ } else {
1635
+ return "false";
1636
+ }
1637
+ })(),
1638
+ type: "managedEnum",
1639
+ onChange() {}
1640
+ }] : [],
1641
+ ...process.env.ANTHROPIC_API_KEY && !isRunningOnHomespace() ? [{
1642
+ id: "apiKey",
1643
+ label: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1644
+ children: [
1645
+ "Use custom API key:",
1646
+ " ",
1647
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1648
+ bold: true,
1649
+ children: normalizeApiKeyForConfig(process.env.ANTHROPIC_API_KEY)
1650
+ }, undefined, false, undefined, this)
1651
+ ]
1652
+ }, undefined, true, undefined, this),
1653
+ searchText: "Use custom API key",
1654
+ value: Boolean(process.env.ANTHROPIC_API_KEY && globalConfig.customApiKeyResponses?.approved?.includes(normalizeApiKeyForConfig(process.env.ANTHROPIC_API_KEY))),
1655
+ type: "boolean",
1656
+ onChange(useCustomKey) {
1657
+ saveGlobalConfig((current_22) => {
1658
+ const updated = {
1659
+ ...current_22
1660
+ };
1661
+ if (!updated.customApiKeyResponses) {
1662
+ updated.customApiKeyResponses = {
1663
+ approved: [],
1664
+ rejected: []
1665
+ };
1666
+ }
1667
+ if (!updated.customApiKeyResponses.approved) {
1668
+ updated.customApiKeyResponses = {
1669
+ ...updated.customApiKeyResponses,
1670
+ approved: []
1671
+ };
1672
+ }
1673
+ if (!updated.customApiKeyResponses.rejected) {
1674
+ updated.customApiKeyResponses = {
1675
+ ...updated.customApiKeyResponses,
1676
+ rejected: []
1677
+ };
1678
+ }
1679
+ if (process.env.ANTHROPIC_API_KEY) {
1680
+ const truncatedKey = normalizeApiKeyForConfig(process.env.ANTHROPIC_API_KEY);
1681
+ if (useCustomKey) {
1682
+ updated.customApiKeyResponses = {
1683
+ ...updated.customApiKeyResponses,
1684
+ approved: [...(updated.customApiKeyResponses.approved ?? []).filter((k) => k !== truncatedKey), truncatedKey],
1685
+ rejected: (updated.customApiKeyResponses.rejected ?? []).filter((k_0) => k_0 !== truncatedKey)
1686
+ };
1687
+ } else {
1688
+ updated.customApiKeyResponses = {
1689
+ ...updated.customApiKeyResponses,
1690
+ approved: (updated.customApiKeyResponses.approved ?? []).filter((k_1) => k_1 !== truncatedKey),
1691
+ rejected: [...(updated.customApiKeyResponses.rejected ?? []).filter((k_2) => k_2 !== truncatedKey), truncatedKey]
1692
+ };
1693
+ }
1694
+ }
1695
+ return updated;
1696
+ });
1697
+ setGlobalConfig(getGlobalConfig());
1698
+ }
1699
+ }] : []
1700
+ ];
1701
+ const filteredSettingsItems = React2.useMemo(() => {
1702
+ if (!searchQuery)
1703
+ return settingsItems;
1704
+ const lowerQuery = searchQuery.toLowerCase();
1705
+ return settingsItems.filter((setting) => {
1706
+ if (setting.id.toLowerCase().includes(lowerQuery))
1707
+ return true;
1708
+ const searchableText = "searchText" in setting ? setting.searchText : setting.label;
1709
+ return searchableText.toLowerCase().includes(lowerQuery);
1710
+ });
1711
+ }, [settingsItems, searchQuery]);
1712
+ React2.useEffect(() => {
1713
+ if (selectedIndex >= filteredSettingsItems.length) {
1714
+ const newIndex = Math.max(0, filteredSettingsItems.length - 1);
1715
+ setSelectedIndex(newIndex);
1716
+ setScrollOffset(Math.max(0, newIndex - maxVisible + 1));
1717
+ return;
1718
+ }
1719
+ setScrollOffset((prev_21) => {
1720
+ if (selectedIndex < prev_21)
1721
+ return selectedIndex;
1722
+ if (selectedIndex >= prev_21 + maxVisible)
1723
+ return selectedIndex - maxVisible + 1;
1724
+ return prev_21;
1725
+ });
1726
+ }, [filteredSettingsItems.length, selectedIndex, maxVisible]);
1727
+ const adjustScrollOffset = import_react4.useCallback((newIndex_0) => {
1728
+ setScrollOffset((prev_22) => {
1729
+ if (newIndex_0 < prev_22)
1730
+ return newIndex_0;
1731
+ if (newIndex_0 >= prev_22 + maxVisible)
1732
+ return newIndex_0 - maxVisible + 1;
1733
+ return prev_22;
1734
+ });
1735
+ }, [maxVisible]);
1736
+ const handleSaveAndClose = import_react4.useCallback(() => {
1737
+ if (showSubmenu !== null) {
1738
+ return;
1739
+ }
1740
+ const formattedChanges = Object.entries(changes).map(([key, value_2]) => {
1741
+ logEvent("tengu_config_changed", {
1742
+ key,
1743
+ value: value_2
1744
+ });
1745
+ return `Set ${key} to ${source_default.bold(value_2)}`;
1746
+ });
1747
+ const effectiveApiKey = isRunningOnHomespace() ? undefined : process.env.ANTHROPIC_API_KEY;
1748
+ const initialUsingCustomKey = Boolean(effectiveApiKey && initialConfig.current.customApiKeyResponses?.approved?.includes(normalizeApiKeyForConfig(effectiveApiKey)));
1749
+ const currentUsingCustomKey = Boolean(effectiveApiKey && globalConfig.customApiKeyResponses?.approved?.includes(normalizeApiKeyForConfig(effectiveApiKey)));
1750
+ if (initialUsingCustomKey !== currentUsingCustomKey) {
1751
+ formattedChanges.push(`${currentUsingCustomKey ? "Enabled" : "Disabled"} custom API key`);
1752
+ logEvent("tengu_config_changed", {
1753
+ key: "env.ANTHROPIC_API_KEY",
1754
+ value: currentUsingCustomKey
1755
+ });
1756
+ }
1757
+ if (globalConfig.theme !== initialConfig.current.theme) {
1758
+ formattedChanges.push(`Set theme to ${source_default.bold(globalConfig.theme)}`);
1759
+ }
1760
+ if (globalConfig.preferredNotifChannel !== initialConfig.current.preferredNotifChannel) {
1761
+ formattedChanges.push(`Set notifications to ${source_default.bold(globalConfig.preferredNotifChannel)}`);
1762
+ }
1763
+ if (currentOutputStyle !== initialOutputStyle.current) {
1764
+ formattedChanges.push(`Set output style to ${source_default.bold(currentOutputStyle)}`);
1765
+ }
1766
+ if (currentLanguage !== initialLanguage.current) {
1767
+ formattedChanges.push(`Set response language to ${source_default.bold(currentLanguage ?? "Default (English)")}`);
1768
+ }
1769
+ if (globalConfig.editorMode !== initialConfig.current.editorMode) {
1770
+ formattedChanges.push(`Set editor mode to ${source_default.bold(globalConfig.editorMode || "emacs")}`);
1771
+ }
1772
+ if (globalConfig.diffTool !== initialConfig.current.diffTool) {
1773
+ formattedChanges.push(`Set diff tool to ${source_default.bold(globalConfig.diffTool)}`);
1774
+ }
1775
+ if (globalConfig.autoConnectIde !== initialConfig.current.autoConnectIde) {
1776
+ formattedChanges.push(`${globalConfig.autoConnectIde ? "Enabled" : "Disabled"} auto-connect to IDE`);
1777
+ }
1778
+ if (globalConfig.autoInstallIdeExtension !== initialConfig.current.autoInstallIdeExtension) {
1779
+ formattedChanges.push(`${globalConfig.autoInstallIdeExtension ? "Enabled" : "Disabled"} auto-install IDE extension`);
1780
+ }
1781
+ if (globalConfig.autoCompactEnabled !== initialConfig.current.autoCompactEnabled) {
1782
+ formattedChanges.push(`${globalConfig.autoCompactEnabled ? "Enabled" : "Disabled"} auto-compact`);
1783
+ }
1784
+ if (globalConfig.respectGitignore !== initialConfig.current.respectGitignore) {
1785
+ formattedChanges.push(`${globalConfig.respectGitignore ? "Enabled" : "Disabled"} respect .gitignore in file picker`);
1786
+ }
1787
+ if (globalConfig.copyFullResponse !== initialConfig.current.copyFullResponse) {
1788
+ formattedChanges.push(`${globalConfig.copyFullResponse ? "Enabled" : "Disabled"} always copy full response`);
1789
+ }
1790
+ if (globalConfig.copyOnSelect !== initialConfig.current.copyOnSelect) {
1791
+ formattedChanges.push(`${globalConfig.copyOnSelect ? "Enabled" : "Disabled"} copy on select`);
1792
+ }
1793
+ if (globalConfig.terminalProgressBarEnabled !== initialConfig.current.terminalProgressBarEnabled) {
1794
+ formattedChanges.push(`${globalConfig.terminalProgressBarEnabled ? "Enabled" : "Disabled"} terminal progress bar`);
1795
+ }
1796
+ if (globalConfig.showStatusInTerminalTab !== initialConfig.current.showStatusInTerminalTab) {
1797
+ formattedChanges.push(`${globalConfig.showStatusInTerminalTab ? "Enabled" : "Disabled"} terminal tab status`);
1798
+ }
1799
+ if (globalConfig.showTurnDuration !== initialConfig.current.showTurnDuration) {
1800
+ formattedChanges.push(`${globalConfig.showTurnDuration ? "Enabled" : "Disabled"} turn duration`);
1801
+ }
1802
+ if (globalConfig.remoteControlAtStartup !== initialConfig.current.remoteControlAtStartup) {
1803
+ const remoteLabel = globalConfig.remoteControlAtStartup === undefined ? "Reset Remote Control to default" : `${globalConfig.remoteControlAtStartup ? "Enabled" : "Disabled"} Remote Control for all sessions`;
1804
+ formattedChanges.push(remoteLabel);
1805
+ }
1806
+ if (settingsData?.autoUpdatesChannel !== initialSettingsData.current?.autoUpdatesChannel) {
1807
+ formattedChanges.push(`Set auto-update channel to ${source_default.bold(settingsData?.autoUpdatesChannel ?? "latest")}`);
1808
+ }
1809
+ if (formattedChanges.length > 0) {
1810
+ onClose(formattedChanges.join(`
1811
+ `));
1812
+ } else {
1813
+ onClose("Config dialog dismissed", {
1814
+ display: "system"
1815
+ });
1816
+ }
1817
+ }, [showSubmenu, changes, globalConfig, mainLoopModel, currentOutputStyle, currentLanguage, settingsData?.autoUpdatesChannel, isFastModeEnabled() ? settingsData?.fastMode : undefined, onClose]);
1818
+ const revertChanges = import_react4.useCallback(() => {
1819
+ if (themeSetting !== initialThemeSetting.current) {
1820
+ setTheme(initialThemeSetting.current);
1821
+ }
1822
+ saveGlobalConfig(() => initialConfig.current);
1823
+ const il = initialLocalSettings;
1824
+ updateSettingsForSource("localSettings", {
1825
+ spinnerTipsEnabled: il?.spinnerTipsEnabled,
1826
+ prefersReducedMotion: il?.prefersReducedMotion,
1827
+ defaultView: il?.defaultView,
1828
+ outputStyle: il?.outputStyle
1829
+ });
1830
+ const iu = initialUserSettings;
1831
+ updateSettingsForSource("userSettings", {
1832
+ alwaysThinkingEnabled: iu?.alwaysThinkingEnabled,
1833
+ fastMode: iu?.fastMode,
1834
+ promptSuggestionEnabled: iu?.promptSuggestionEnabled,
1835
+ autoUpdatesChannel: iu?.autoUpdatesChannel,
1836
+ minimumVersion: iu?.minimumVersion,
1837
+ language: iu?.language,
1838
+ ...{},
1839
+ syntaxHighlightingDisabled: iu?.syntaxHighlightingDisabled,
1840
+ permissions: iu?.permissions === undefined ? undefined : {
1841
+ ...iu.permissions,
1842
+ defaultMode: iu.permissions.defaultMode
1843
+ }
1844
+ });
1845
+ const ia = initialAppState;
1846
+ setAppState((prev_23) => ({
1847
+ ...prev_23,
1848
+ mainLoopModel: ia.mainLoopModel,
1849
+ mainLoopModelForSession: ia.mainLoopModelForSession,
1850
+ verbose: ia.verbose,
1851
+ thinkingEnabled: ia.thinkingEnabled,
1852
+ fastMode: ia.fastMode,
1853
+ promptSuggestionEnabled: ia.promptSuggestionEnabled,
1854
+ isBriefOnly: ia.isBriefOnly,
1855
+ replBridgeEnabled: ia.replBridgeEnabled,
1856
+ replBridgeOutboundOnly: ia.replBridgeOutboundOnly,
1857
+ settings: ia.settings,
1858
+ toolPermissionContext: transitionPlanAutoMode(prev_23.toolPermissionContext)
1859
+ }));
1860
+ if (getUserMsgOptIn() !== initialUserMsgOptIn) {
1861
+ setUserMsgOptIn(initialUserMsgOptIn);
1862
+ }
1863
+ }, [themeSetting, setTheme, initialLocalSettings, initialUserSettings, initialAppState, initialUserMsgOptIn, setAppState]);
1864
+ const handleEscape = import_react4.useCallback(() => {
1865
+ if (showSubmenu !== null) {
1866
+ return;
1867
+ }
1868
+ if (isDirty.current) {
1869
+ revertChanges();
1870
+ }
1871
+ onClose("Config dialog dismissed", {
1872
+ display: "system"
1873
+ });
1874
+ }, [showSubmenu, revertChanges, onClose]);
1875
+ useKeybinding("confirm:no", handleEscape, {
1876
+ context: "Settings",
1877
+ isActive: showSubmenu === null && !isSearchMode && !headerFocused
1878
+ });
1879
+ useKeybinding("settings:close", handleSaveAndClose, {
1880
+ context: "Settings",
1881
+ isActive: showSubmenu === null && !isSearchMode && !headerFocused
1882
+ });
1883
+ const toggleSetting = import_react4.useCallback(() => {
1884
+ const setting_0 = filteredSettingsItems[selectedIndex];
1885
+ if (!setting_0 || !setting_0.onChange) {
1886
+ return;
1887
+ }
1888
+ if (setting_0.type === "boolean") {
1889
+ isDirty.current = true;
1890
+ setting_0.onChange(!setting_0.value);
1891
+ if (setting_0.id === "thinkingEnabled") {
1892
+ const newValue = !setting_0.value;
1893
+ const backToInitial = newValue === initialThinkingEnabled.current;
1894
+ if (backToInitial) {
1895
+ setShowThinkingWarning(false);
1896
+ } else if (context.messages.some((m_0) => m_0.type === "assistant")) {
1897
+ setShowThinkingWarning(true);
1898
+ }
1899
+ }
1900
+ return;
1901
+ }
1902
+ 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") {
1903
+ switch (setting_0.id) {
1904
+ case "theme":
1905
+ setShowSubmenu("Theme");
1906
+ setTabsHidden(true);
1907
+ return;
1908
+ case "model":
1909
+ setShowSubmenu("Model");
1910
+ setTabsHidden(true);
1911
+ return;
1912
+ case "teammateDefaultModel":
1913
+ setShowSubmenu("TeammateModel");
1914
+ setTabsHidden(true);
1915
+ return;
1916
+ case "showExternalIncludesDialog":
1917
+ setShowSubmenu("ExternalIncludes");
1918
+ setTabsHidden(true);
1919
+ return;
1920
+ case "outputStyle":
1921
+ setShowSubmenu("OutputStyle");
1922
+ setTabsHidden(true);
1923
+ return;
1924
+ case "language":
1925
+ setShowSubmenu("Language");
1926
+ setTabsHidden(true);
1927
+ return;
1928
+ }
1929
+ }
1930
+ if (setting_0.id === "autoUpdatesChannel") {
1931
+ if (autoUpdaterDisabledReason) {
1932
+ setShowSubmenu("EnableAutoUpdates");
1933
+ setTabsHidden(true);
1934
+ return;
1935
+ }
1936
+ const currentChannel = settingsData?.autoUpdatesChannel ?? "latest";
1937
+ if (currentChannel === "latest") {
1938
+ setShowSubmenu("ChannelDowngrade");
1939
+ setTabsHidden(true);
1940
+ } else {
1941
+ isDirty.current = true;
1942
+ updateSettingsForSource("userSettings", {
1943
+ autoUpdatesChannel: "latest",
1944
+ minimumVersion: undefined
1945
+ });
1946
+ setSettingsData((prev_24) => ({
1947
+ ...prev_24,
1948
+ autoUpdatesChannel: "latest",
1949
+ minimumVersion: undefined
1950
+ }));
1951
+ logEvent("tengu_autoupdate_channel_changed", {
1952
+ channel: "latest"
1953
+ });
1954
+ }
1955
+ return;
1956
+ }
1957
+ if (setting_0.type === "enum") {
1958
+ isDirty.current = true;
1959
+ const currentIndex = setting_0.options.indexOf(setting_0.value);
1960
+ const nextIndex = (currentIndex + 1) % setting_0.options.length;
1961
+ setting_0.onChange(setting_0.options[nextIndex]);
1962
+ return;
1963
+ }
1964
+ }, [autoUpdaterDisabledReason, filteredSettingsItems, selectedIndex, settingsData?.autoUpdatesChannel, setTabsHidden]);
1965
+ const moveSelection = (delta) => {
1966
+ setShowThinkingWarning(false);
1967
+ const newIndex_1 = Math.max(0, Math.min(filteredSettingsItems.length - 1, selectedIndex + delta));
1968
+ setSelectedIndex(newIndex_1);
1969
+ adjustScrollOffset(newIndex_1);
1970
+ };
1971
+ useKeybindings({
1972
+ "select:previous": () => {
1973
+ if (selectedIndex === 0) {
1974
+ setShowThinkingWarning(false);
1975
+ setIsSearchMode(true);
1976
+ setScrollOffset(0);
1977
+ } else {
1978
+ moveSelection(-1);
1979
+ }
1980
+ },
1981
+ "select:next": () => moveSelection(1),
1982
+ "scroll:lineUp": () => moveSelection(-1),
1983
+ "scroll:lineDown": () => moveSelection(1),
1984
+ "select:accept": toggleSetting,
1985
+ "settings:search": () => {
1986
+ setIsSearchMode(true);
1987
+ setSearchQuery("");
1988
+ }
1989
+ }, {
1990
+ context: "Settings",
1991
+ isActive: showSubmenu === null && !isSearchMode && !headerFocused
1992
+ });
1993
+ const handleKeyDown = import_react4.useCallback((e) => {
1994
+ if (showSubmenu !== null)
1995
+ return;
1996
+ if (headerFocused)
1997
+ return;
1998
+ if (isSearchMode) {
1999
+ if (e.key === "escape") {
2000
+ e.preventDefault();
2001
+ if (searchQuery.length > 0) {
2002
+ setSearchQuery("");
2003
+ } else {
2004
+ setIsSearchMode(false);
2005
+ }
2006
+ return;
2007
+ }
2008
+ if (e.key === "return" || e.key === "down" || e.key === "wheeldown") {
2009
+ e.preventDefault();
2010
+ setIsSearchMode(false);
2011
+ setSelectedIndex(0);
2012
+ setScrollOffset(0);
2013
+ }
2014
+ return;
2015
+ }
2016
+ if (e.key === "left" || e.key === "right" || e.key === "tab") {
2017
+ e.preventDefault();
2018
+ toggleSetting();
2019
+ return;
2020
+ }
2021
+ if (e.ctrl || e.meta)
2022
+ return;
2023
+ if (e.key === "j" || e.key === "k" || e.key === "/")
2024
+ return;
2025
+ if (e.key.length === 1 && e.key !== " ") {
2026
+ e.preventDefault();
2027
+ setIsSearchMode(true);
2028
+ setSearchQuery(e.key);
2029
+ }
2030
+ }, [showSubmenu, headerFocused, isSearchMode, searchQuery, setSearchQuery, toggleSetting]);
2031
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2032
+ flexDirection: "column",
2033
+ width: "100%",
2034
+ tabIndex: 0,
2035
+ autoFocus: true,
2036
+ onKeyDown: handleKeyDown,
2037
+ children: showSubmenu === "Theme" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2038
+ children: [
2039
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemePicker, {
2040
+ onThemeSelect: (setting_1) => {
2041
+ isDirty.current = true;
2042
+ setTheme(setting_1);
2043
+ setShowSubmenu(null);
2044
+ setTabsHidden(false);
2045
+ },
2046
+ onCancel: () => {
2047
+ setShowSubmenu(null);
2048
+ setTabsHidden(false);
2049
+ },
2050
+ hideEscToCancel: true,
2051
+ skipExitHandling: true
2052
+ }, undefined, false, undefined, this),
2053
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2054
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2055
+ dimColor: true,
2056
+ italic: true,
2057
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2058
+ children: [
2059
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2060
+ shortcut: "Enter",
2061
+ action: "select"
2062
+ }, undefined, false, undefined, this),
2063
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2064
+ action: "confirm:no",
2065
+ context: "Confirmation",
2066
+ fallback: "Esc",
2067
+ description: "cancel"
2068
+ }, undefined, false, undefined, this)
2069
+ ]
2070
+ }, undefined, true, undefined, this)
2071
+ }, undefined, false, undefined, this)
2072
+ }, undefined, false, undefined, this)
2073
+ ]
2074
+ }, undefined, true, undefined, this) : showSubmenu === "Model" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2075
+ children: [
2076
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ModelPicker, {
2077
+ initial: mainLoopModel,
2078
+ onSelect: (model_0, _effort) => {
2079
+ isDirty.current = true;
2080
+ onChangeMainModelConfig(model_0);
2081
+ setShowSubmenu(null);
2082
+ setTabsHidden(false);
2083
+ },
2084
+ onCancel: () => {
2085
+ setShowSubmenu(null);
2086
+ setTabsHidden(false);
2087
+ },
2088
+ showFastModeNotice: isFastModeEnabled() ? isFastMode && isFastModeSupportedByModel(mainLoopModel) && isFastModeAvailable() : false
2089
+ }, undefined, false, undefined, this),
2090
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2091
+ dimColor: true,
2092
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2093
+ children: [
2094
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2095
+ shortcut: "Enter",
2096
+ action: "confirm"
2097
+ }, undefined, false, undefined, this),
2098
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2099
+ action: "confirm:no",
2100
+ context: "Confirmation",
2101
+ fallback: "Esc",
2102
+ description: "cancel"
2103
+ }, undefined, false, undefined, this)
2104
+ ]
2105
+ }, undefined, true, undefined, this)
2106
+ }, undefined, false, undefined, this)
2107
+ ]
2108
+ }, undefined, true, undefined, this) : showSubmenu === "TeammateModel" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2109
+ children: [
2110
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ModelPicker, {
2111
+ initial: globalConfig.teammateDefaultModel ?? null,
2112
+ skipSettingsWrite: true,
2113
+ headerText: "Default model for newly spawned teammates. The leader can override via the tool call's model parameter.",
2114
+ onSelect: (model_1, _effort_0) => {
2115
+ setShowSubmenu(null);
2116
+ setTabsHidden(false);
2117
+ if (globalConfig.teammateDefaultModel === undefined && model_1 === null) {
2118
+ return;
2119
+ }
2120
+ isDirty.current = true;
2121
+ saveGlobalConfig((current_23) => current_23.teammateDefaultModel === model_1 ? current_23 : {
2122
+ ...current_23,
2123
+ teammateDefaultModel: model_1
2124
+ });
2125
+ setGlobalConfig({
2126
+ ...getGlobalConfig(),
2127
+ teammateDefaultModel: model_1
2128
+ });
2129
+ setChanges((prev_25) => ({
2130
+ ...prev_25,
2131
+ teammateDefaultModel: teammateModelDisplayString(model_1)
2132
+ }));
2133
+ logEvent("tengu_teammate_default_model_changed", {
2134
+ model: model_1
2135
+ });
2136
+ },
2137
+ onCancel: () => {
2138
+ setShowSubmenu(null);
2139
+ setTabsHidden(false);
2140
+ }
2141
+ }, undefined, false, undefined, this),
2142
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2143
+ dimColor: true,
2144
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2145
+ children: [
2146
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2147
+ shortcut: "Enter",
2148
+ action: "confirm"
2149
+ }, undefined, false, undefined, this),
2150
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2151
+ action: "confirm:no",
2152
+ context: "Confirmation",
2153
+ fallback: "Esc",
2154
+ description: "cancel"
2155
+ }, undefined, false, undefined, this)
2156
+ ]
2157
+ }, undefined, true, undefined, this)
2158
+ }, undefined, false, undefined, this)
2159
+ ]
2160
+ }, undefined, true, undefined, this) : showSubmenu === "ExternalIncludes" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2161
+ children: [
2162
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ClaudeMdExternalIncludesDialog, {
2163
+ onDone: () => {
2164
+ setShowSubmenu(null);
2165
+ setTabsHidden(false);
2166
+ },
2167
+ externalIncludes: getExternalClaudeMdIncludes(memoryFiles)
2168
+ }, undefined, false, undefined, this),
2169
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2170
+ dimColor: true,
2171
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2172
+ children: [
2173
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2174
+ shortcut: "Enter",
2175
+ action: "confirm"
2176
+ }, undefined, false, undefined, this),
2177
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2178
+ action: "confirm:no",
2179
+ context: "Confirmation",
2180
+ fallback: "Esc",
2181
+ description: "disable external includes"
2182
+ }, undefined, false, undefined, this)
2183
+ ]
2184
+ }, undefined, true, undefined, this)
2185
+ }, undefined, false, undefined, this)
2186
+ ]
2187
+ }, undefined, true, undefined, this) : showSubmenu === "OutputStyle" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2188
+ children: [
2189
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(OutputStylePicker, {
2190
+ initialStyle: currentOutputStyle,
2191
+ onComplete: (style) => {
2192
+ isDirty.current = true;
2193
+ setCurrentOutputStyle(style ?? DEFAULT_OUTPUT_STYLE_NAME);
2194
+ setShowSubmenu(null);
2195
+ setTabsHidden(false);
2196
+ updateSettingsForSource("localSettings", {
2197
+ outputStyle: style
2198
+ });
2199
+ logEvent("tengu_output_style_changed", {
2200
+ style: style ?? DEFAULT_OUTPUT_STYLE_NAME,
2201
+ source: "config_panel",
2202
+ settings_source: "localSettings"
2203
+ });
2204
+ },
2205
+ onCancel: () => {
2206
+ setShowSubmenu(null);
2207
+ setTabsHidden(false);
2208
+ }
2209
+ }, undefined, false, undefined, this),
2210
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2211
+ dimColor: true,
2212
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2213
+ children: [
2214
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2215
+ shortcut: "Enter",
2216
+ action: "confirm"
2217
+ }, undefined, false, undefined, this),
2218
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2219
+ action: "confirm:no",
2220
+ context: "Confirmation",
2221
+ fallback: "Esc",
2222
+ description: "cancel"
2223
+ }, undefined, false, undefined, this)
2224
+ ]
2225
+ }, undefined, true, undefined, this)
2226
+ }, undefined, false, undefined, this)
2227
+ ]
2228
+ }, undefined, true, undefined, this) : showSubmenu === "Language" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2229
+ children: [
2230
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(LanguagePicker, {
2231
+ initialLanguage: currentLanguage,
2232
+ onComplete: (language) => {
2233
+ isDirty.current = true;
2234
+ setCurrentLanguage(language);
2235
+ setShowSubmenu(null);
2236
+ setTabsHidden(false);
2237
+ updateSettingsForSource("userSettings", {
2238
+ language
2239
+ });
2240
+ logEvent("tengu_language_changed", {
2241
+ language: language ?? "default",
2242
+ source: "config_panel"
2243
+ });
2244
+ },
2245
+ onCancel: () => {
2246
+ setShowSubmenu(null);
2247
+ setTabsHidden(false);
2248
+ }
2249
+ }, undefined, false, undefined, this),
2250
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2251
+ dimColor: true,
2252
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2253
+ children: [
2254
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2255
+ shortcut: "Enter",
2256
+ action: "confirm"
2257
+ }, undefined, false, undefined, this),
2258
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2259
+ action: "confirm:no",
2260
+ context: "Settings",
2261
+ fallback: "Esc",
2262
+ description: "cancel"
2263
+ }, undefined, false, undefined, this)
2264
+ ]
2265
+ }, undefined, true, undefined, this)
2266
+ }, undefined, false, undefined, this)
2267
+ ]
2268
+ }, undefined, true, undefined, this) : showSubmenu === "EnableAutoUpdates" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
2269
+ title: "Enable Auto-Updates",
2270
+ onCancel: () => {
2271
+ setShowSubmenu(null);
2272
+ setTabsHidden(false);
2273
+ },
2274
+ hideBorder: true,
2275
+ hideInputGuide: true,
2276
+ children: autoUpdaterDisabledReason?.type !== "config" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2277
+ children: [
2278
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2279
+ children: autoUpdaterDisabledReason?.type === "env" ? "Auto-updates are controlled by an environment variable and cannot be changed here." : "Auto-updates are disabled in development builds."
2280
+ }, undefined, false, undefined, this),
2281
+ autoUpdaterDisabledReason?.type === "env" && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2282
+ dimColor: true,
2283
+ children: [
2284
+ "Unset ",
2285
+ autoUpdaterDisabledReason.envVar,
2286
+ " to re-enable auto-updates."
2287
+ ]
2288
+ }, undefined, true, undefined, this)
2289
+ ]
2290
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Select, {
2291
+ options: [{
2292
+ label: "Enable with latest channel",
2293
+ value: "latest"
2294
+ }, {
2295
+ label: "Enable with stable channel",
2296
+ value: "stable"
2297
+ }],
2298
+ onChange: (channel) => {
2299
+ isDirty.current = true;
2300
+ setShowSubmenu(null);
2301
+ setTabsHidden(false);
2302
+ saveGlobalConfig((current_24) => ({
2303
+ ...current_24,
2304
+ autoUpdates: true
2305
+ }));
2306
+ setGlobalConfig({
2307
+ ...getGlobalConfig(),
2308
+ autoUpdates: true
2309
+ });
2310
+ updateSettingsForSource("userSettings", {
2311
+ autoUpdatesChannel: channel,
2312
+ minimumVersion: undefined
2313
+ });
2314
+ setSettingsData((prev_26) => ({
2315
+ ...prev_26,
2316
+ autoUpdatesChannel: channel,
2317
+ minimumVersion: undefined
2318
+ }));
2319
+ logEvent("tengu_autoupdate_enabled", {
2320
+ channel
2321
+ });
2322
+ }
2323
+ }, undefined, false, undefined, this)
2324
+ }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ChannelDowngradeDialog, {
2325
+ currentVersion: "2.1.888",
2326
+ onChoice: (choice) => {
2327
+ setShowSubmenu(null);
2328
+ setTabsHidden(false);
2329
+ if (choice === "cancel") {
2330
+ return;
2331
+ }
2332
+ isDirty.current = true;
2333
+ const newSettings = {
2334
+ autoUpdatesChannel: "stable"
2335
+ };
2336
+ if (choice === "stay") {
2337
+ newSettings.minimumVersion = "2.1.888";
2338
+ }
2339
+ updateSettingsForSource("userSettings", newSettings);
2340
+ setSettingsData((prev_27) => ({
2341
+ ...prev_27,
2342
+ ...newSettings
2343
+ }));
2344
+ logEvent("tengu_autoupdate_channel_changed", {
2345
+ channel: "stable",
2346
+ minimum_version_set: choice === "stay"
2347
+ });
2348
+ }
2349
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2350
+ flexDirection: "column",
2351
+ gap: 1,
2352
+ marginY: insideModal ? undefined : 1,
2353
+ children: [
2354
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SearchBox, {
2355
+ query: searchQuery,
2356
+ isFocused: isSearchMode && !headerFocused,
2357
+ isTerminalFocused,
2358
+ cursorOffset: searchCursorOffset,
2359
+ placeholder: "Search settings\u2026"
2360
+ }, undefined, false, undefined, this),
2361
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2362
+ flexDirection: "column",
2363
+ children: filteredSettingsItems.length === 0 ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2364
+ dimColor: true,
2365
+ italic: true,
2366
+ children: [
2367
+ 'No settings match "',
2368
+ searchQuery,
2369
+ '"'
2370
+ ]
2371
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2372
+ children: [
2373
+ scrollOffset > 0 && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2374
+ dimColor: true,
2375
+ children: [
2376
+ figures_default.arrowUp,
2377
+ " ",
2378
+ scrollOffset,
2379
+ " more above"
2380
+ ]
2381
+ }, undefined, true, undefined, this),
2382
+ filteredSettingsItems.slice(scrollOffset, scrollOffset + maxVisible).map((setting_2, i) => {
2383
+ const actualIndex = scrollOffset + i;
2384
+ const isSelected = actualIndex === selectedIndex && !headerFocused && !isSearchMode;
2385
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(React2.Fragment, {
2386
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2387
+ children: [
2388
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2389
+ width: 44,
2390
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2391
+ color: isSelected ? "suggestion" : undefined,
2392
+ children: [
2393
+ isSelected ? figures_default.pointer : " ",
2394
+ " ",
2395
+ setting_2.label
2396
+ ]
2397
+ }, undefined, true, undefined, this)
2398
+ }, undefined, false, undefined, this),
2399
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2400
+ children: setting_2.type === "boolean" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2401
+ children: [
2402
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2403
+ color: isSelected ? "suggestion" : undefined,
2404
+ children: setting_2.value.toString()
2405
+ }, undefined, false, undefined, this),
2406
+ showThinkingWarning && setting_2.id === "thinkingEnabled" && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2407
+ color: "warning",
2408
+ children: [
2409
+ " ",
2410
+ "Changing thinking mode mid-conversation will increase latency and may reduce quality."
2411
+ ]
2412
+ }, undefined, true, undefined, this)
2413
+ ]
2414
+ }, undefined, true, undefined, this) : setting_2.id === "theme" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2415
+ color: isSelected ? "suggestion" : undefined,
2416
+ children: THEME_LABELS[setting_2.value.toString()] ?? setting_2.value.toString()
2417
+ }, undefined, false, undefined, this) : setting_2.id === "notifChannel" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2418
+ color: isSelected ? "suggestion" : undefined,
2419
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(NotifChannelLabel, {
2420
+ value: setting_2.value.toString()
2421
+ }, undefined, false, undefined, this)
2422
+ }, undefined, false, undefined, this) : setting_2.id === "defaultPermissionMode" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2423
+ color: isSelected ? "suggestion" : undefined,
2424
+ children: permissionModeTitle(setting_2.value)
2425
+ }, undefined, false, undefined, this) : setting_2.id === "autoUpdatesChannel" && autoUpdaterDisabledReason ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2426
+ flexDirection: "column",
2427
+ children: [
2428
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2429
+ color: isSelected ? "suggestion" : undefined,
2430
+ children: "disabled"
2431
+ }, undefined, false, undefined, this),
2432
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2433
+ dimColor: true,
2434
+ children: [
2435
+ "(",
2436
+ formatAutoUpdaterDisabledReason(autoUpdaterDisabledReason),
2437
+ ")"
2438
+ ]
2439
+ }, undefined, true, undefined, this)
2440
+ ]
2441
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2442
+ color: isSelected ? "suggestion" : undefined,
2443
+ children: setting_2.value.toString()
2444
+ }, undefined, false, undefined, this)
2445
+ }, isSelected ? "selected" : "unselected", false, undefined, this)
2446
+ ]
2447
+ }, undefined, true, undefined, this)
2448
+ }, setting_2.id, false, undefined, this);
2449
+ }),
2450
+ scrollOffset + maxVisible < filteredSettingsItems.length && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2451
+ dimColor: true,
2452
+ children: [
2453
+ figures_default.arrowDown,
2454
+ " ",
2455
+ filteredSettingsItems.length - scrollOffset - maxVisible,
2456
+ " ",
2457
+ "more below"
2458
+ ]
2459
+ }, undefined, true, undefined, this)
2460
+ ]
2461
+ }, undefined, true, undefined, this)
2462
+ }, undefined, false, undefined, this),
2463
+ headerFocused ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2464
+ dimColor: true,
2465
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2466
+ children: [
2467
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2468
+ shortcut: "\u2190/\u2192 tab",
2469
+ action: "switch"
2470
+ }, undefined, false, undefined, this),
2471
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2472
+ shortcut: "\u2193",
2473
+ action: "return"
2474
+ }, undefined, false, undefined, this),
2475
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2476
+ action: "confirm:no",
2477
+ context: "Settings",
2478
+ fallback: "Esc",
2479
+ description: "close"
2480
+ }, undefined, false, undefined, this)
2481
+ ]
2482
+ }, undefined, true, undefined, this)
2483
+ }, undefined, false, undefined, this) : isSearchMode ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2484
+ dimColor: true,
2485
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2486
+ children: [
2487
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2488
+ children: "Type to filter"
2489
+ }, undefined, false, undefined, this),
2490
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2491
+ shortcut: "Enter/\u2193",
2492
+ action: "select"
2493
+ }, undefined, false, undefined, this),
2494
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2495
+ shortcut: "\u2191",
2496
+ action: "tabs"
2497
+ }, undefined, false, undefined, this),
2498
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2499
+ action: "confirm:no",
2500
+ context: "Settings",
2501
+ fallback: "Esc",
2502
+ description: "clear"
2503
+ }, undefined, false, undefined, this)
2504
+ ]
2505
+ }, undefined, true, undefined, this)
2506
+ }, undefined, false, undefined, this) : /* @__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(ConfigurableShortcutHint, {
2511
+ action: "select:accept",
2512
+ context: "Settings",
2513
+ fallback: "Space",
2514
+ description: "change"
2515
+ }, undefined, false, undefined, this),
2516
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2517
+ action: "settings:close",
2518
+ context: "Settings",
2519
+ fallback: "Enter",
2520
+ description: "save"
2521
+ }, undefined, false, undefined, this),
2522
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2523
+ action: "settings:search",
2524
+ context: "Settings",
2525
+ fallback: "/",
2526
+ description: "search"
2527
+ }, undefined, false, undefined, this),
2528
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2529
+ action: "confirm:no",
2530
+ context: "Settings",
2531
+ fallback: "Esc",
2532
+ description: "cancel"
2533
+ }, undefined, false, undefined, this)
2534
+ ]
2535
+ }, undefined, true, undefined, this)
2536
+ }, undefined, false, undefined, this)
2537
+ ]
2538
+ }, undefined, true, undefined, this)
2539
+ }, undefined, false, undefined, this);
2540
+ }
2541
+ function teammateModelDisplayString(value) {
2542
+ if (value === undefined) {
2543
+ return modelDisplayString(getHardcodedTeammateModelFallback());
2544
+ }
2545
+ if (value === null)
2546
+ return "Default (leader's model)";
2547
+ return modelDisplayString(value);
2548
+ }
2549
+ function NotifChannelLabel(t0) {
2550
+ const $ = import_compiler_runtime5.c(4);
2551
+ const {
2552
+ value
2553
+ } = t0;
2554
+ switch (value) {
2555
+ case "auto": {
2556
+ return "Auto";
2557
+ }
2558
+ case "iterm2": {
2559
+ let t1;
2560
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
2561
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2562
+ children: [
2563
+ "iTerm2 ",
2564
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2565
+ dimColor: true,
2566
+ children: "(OSC 9)"
2567
+ }, undefined, false, undefined, this)
2568
+ ]
2569
+ }, undefined, true, undefined, this);
2570
+ $[0] = t1;
2571
+ } else {
2572
+ t1 = $[0];
2573
+ }
2574
+ return t1;
2575
+ }
2576
+ case "terminal_bell": {
2577
+ let t1;
2578
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
2579
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2580
+ children: [
2581
+ "Terminal Bell ",
2582
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2583
+ dimColor: true,
2584
+ children: "(\\a)"
2585
+ }, undefined, false, undefined, this)
2586
+ ]
2587
+ }, undefined, true, undefined, this);
2588
+ $[1] = t1;
2589
+ } else {
2590
+ t1 = $[1];
2591
+ }
2592
+ return t1;
2593
+ }
2594
+ case "kitty": {
2595
+ let t1;
2596
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
2597
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2598
+ children: [
2599
+ "Kitty ",
2600
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2601
+ dimColor: true,
2602
+ children: "(OSC 99)"
2603
+ }, undefined, false, undefined, this)
2604
+ ]
2605
+ }, undefined, true, undefined, this);
2606
+ $[2] = t1;
2607
+ } else {
2608
+ t1 = $[2];
2609
+ }
2610
+ return t1;
2611
+ }
2612
+ case "ghostty": {
2613
+ let t1;
2614
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
2615
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2616
+ children: [
2617
+ "Ghostty ",
2618
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2619
+ dimColor: true,
2620
+ children: "(OSC 777)"
2621
+ }, undefined, false, undefined, this)
2622
+ ]
2623
+ }, undefined, true, undefined, this);
2624
+ $[3] = t1;
2625
+ } else {
2626
+ t1 = $[3];
2627
+ }
2628
+ return t1;
2629
+ }
2630
+ case "iterm2_with_bell": {
2631
+ return "iTerm2 w/ Bell";
2632
+ }
2633
+ case "notifications_disabled": {
2634
+ return "Disabled";
2635
+ }
2636
+ default: {
2637
+ return value;
2638
+ }
2639
+ }
2640
+ }
2641
+ var import_compiler_runtime5, React2, import_react4, jsx_dev_runtime5, THEME_LABELS;
2642
+ var init_Config = __esm(() => {
2643
+ init_ink();
2644
+ init_useKeybinding();
2645
+ init_figures();
2646
+ init_config();
2647
+ init_authPortable();
2648
+ init_config();
2649
+ init_source();
2650
+ init_PermissionMode();
2651
+ init_permissionSetup();
2652
+ init_log();
2653
+ init_analytics();
2654
+ init_bridgeEnabled();
2655
+ init_ThemePicker();
2656
+ init_AppState();
2657
+ init_ModelPicker();
2658
+ init_model();
2659
+ init_extraUsage();
2660
+ init_ClaudeMdExternalIncludesDialog();
2661
+ init_ChannelDowngradeDialog();
2662
+ init_Dialog();
2663
+ init_CustomSelect();
2664
+ init_OutputStylePicker();
2665
+ init_LanguagePicker();
2666
+ init_claudemd();
2667
+ init_KeyboardShortcutHint();
2668
+ init_ConfigurableShortcutHint();
2669
+ init_Byline();
2670
+ init_Tabs();
2671
+ init_modalContext();
2672
+ init_SearchBox();
2673
+ init_ide();
2674
+ init_settings();
2675
+ init_state();
2676
+ init_outputStyles();
2677
+ init_envUtils();
2678
+ init_growthbook();
2679
+ init_agentSwarmsEnabled();
2680
+ init_teammateModeSnapshot();
2681
+ init_teammateModel();
2682
+ init_useSearchInput();
2683
+ init_useTerminalSize();
2684
+ init_fastMode();
2685
+ init_fullscreen();
2686
+ import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
2687
+ React2 = __toESM(require_react(), 1);
2688
+ import_react4 = __toESM(require_react(), 1);
2689
+ jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
2690
+ THEME_LABELS = {
2691
+ auto: "Auto (match terminal)",
2692
+ dark: "Dark mode",
2693
+ light: "Light mode",
2694
+ "dark-daltonized": "Dark mode (colorblind-friendly)",
2695
+ "light-daltonized": "Light mode (colorblind-friendly)",
2696
+ "dark-ansi": "Dark mode (ANSI colors only)",
2697
+ "light-ansi": "Light mode (ANSI colors only)"
2698
+ };
2699
+ });
2700
+
2701
+ // src/components/Settings/Usage.tsx
2702
+ function LimitBar(t0) {
2703
+ const $ = import_compiler_runtime6.c(34);
2704
+ const {
2705
+ title,
2706
+ limit,
2707
+ maxWidth,
2708
+ showTimeInReset: t1,
2709
+ extraSubtext
2710
+ } = t0;
2711
+ const showTimeInReset = t1 === undefined ? true : t1;
2712
+ const {
2713
+ utilization,
2714
+ resets_at
2715
+ } = limit;
2716
+ if (utilization === null) {
2717
+ return null;
2718
+ }
2719
+ const usedText = `${Math.floor(utilization)}% used`;
2720
+ let subtext;
2721
+ if (resets_at) {
2722
+ let t2;
2723
+ if ($[0] !== resets_at || $[1] !== showTimeInReset) {
2724
+ t2 = formatResetText(resets_at, true, showTimeInReset);
2725
+ $[0] = resets_at;
2726
+ $[1] = showTimeInReset;
2727
+ $[2] = t2;
2728
+ } else {
2729
+ t2 = $[2];
2730
+ }
2731
+ subtext = `Resets ${t2}`;
2732
+ }
2733
+ if (extraSubtext) {
2734
+ if (subtext) {
2735
+ subtext = `${extraSubtext} \xB7 ${subtext}`;
2736
+ } else {
2737
+ subtext = extraSubtext;
2738
+ }
2739
+ }
2740
+ if (maxWidth >= 62) {
2741
+ let t2;
2742
+ if ($[3] !== title) {
2743
+ t2 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2744
+ bold: true,
2745
+ children: title
2746
+ }, undefined, false, undefined, this);
2747
+ $[3] = title;
2748
+ $[4] = t2;
2749
+ } else {
2750
+ t2 = $[4];
2751
+ }
2752
+ const t3 = utilization / 100;
2753
+ let t4;
2754
+ if ($[5] !== t3) {
2755
+ t4 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ProgressBar, {
2756
+ ratio: t3,
2757
+ width: 50,
2758
+ fillColor: "rate_limit_fill",
2759
+ emptyColor: "rate_limit_empty"
2760
+ }, undefined, false, undefined, this);
2761
+ $[5] = t3;
2762
+ $[6] = t4;
2763
+ } else {
2764
+ t4 = $[6];
2765
+ }
2766
+ let t5;
2767
+ if ($[7] !== usedText) {
2768
+ t5 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2769
+ children: usedText
2770
+ }, undefined, false, undefined, this);
2771
+ $[7] = usedText;
2772
+ $[8] = t5;
2773
+ } else {
2774
+ t5 = $[8];
2775
+ }
2776
+ let t6;
2777
+ if ($[9] !== t4 || $[10] !== t5) {
2778
+ t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2779
+ flexDirection: "row",
2780
+ gap: 1,
2781
+ children: [
2782
+ t4,
2783
+ t5
2784
+ ]
2785
+ }, undefined, true, undefined, this);
2786
+ $[9] = t4;
2787
+ $[10] = t5;
2788
+ $[11] = t6;
2789
+ } else {
2790
+ t6 = $[11];
2791
+ }
2792
+ let t7;
2793
+ if ($[12] !== subtext) {
2794
+ t7 = subtext && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2795
+ dimColor: true,
2796
+ children: subtext
2797
+ }, undefined, false, undefined, this);
2798
+ $[12] = subtext;
2799
+ $[13] = t7;
2800
+ } else {
2801
+ t7 = $[13];
2802
+ }
2803
+ let t8;
2804
+ if ($[14] !== t2 || $[15] !== t6 || $[16] !== t7) {
2805
+ t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2806
+ flexDirection: "column",
2807
+ children: [
2808
+ t2,
2809
+ t6,
2810
+ t7
2811
+ ]
2812
+ }, undefined, true, undefined, this);
2813
+ $[14] = t2;
2814
+ $[15] = t6;
2815
+ $[16] = t7;
2816
+ $[17] = t8;
2817
+ } else {
2818
+ t8 = $[17];
2819
+ }
2820
+ return t8;
2821
+ } else {
2822
+ let t2;
2823
+ if ($[18] !== title) {
2824
+ t2 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2825
+ bold: true,
2826
+ children: title
2827
+ }, undefined, false, undefined, this);
2828
+ $[18] = title;
2829
+ $[19] = t2;
2830
+ } else {
2831
+ t2 = $[19];
2832
+ }
2833
+ let t3;
2834
+ if ($[20] !== subtext) {
2835
+ t3 = subtext && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(jsx_dev_runtime6.Fragment, {
2836
+ children: [
2837
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2838
+ children: " "
2839
+ }, undefined, false, undefined, this),
2840
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2841
+ dimColor: true,
2842
+ children: [
2843
+ "\xB7 ",
2844
+ subtext
2845
+ ]
2846
+ }, undefined, true, undefined, this)
2847
+ ]
2848
+ }, undefined, true, undefined, this);
2849
+ $[20] = subtext;
2850
+ $[21] = t3;
2851
+ } else {
2852
+ t3 = $[21];
2853
+ }
2854
+ let t4;
2855
+ if ($[22] !== t2 || $[23] !== t3) {
2856
+ t4 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2857
+ children: [
2858
+ t2,
2859
+ t3
2860
+ ]
2861
+ }, undefined, true, undefined, this);
2862
+ $[22] = t2;
2863
+ $[23] = t3;
2864
+ $[24] = t4;
2865
+ } else {
2866
+ t4 = $[24];
2867
+ }
2868
+ const t5 = utilization / 100;
2869
+ let t6;
2870
+ if ($[25] !== maxWidth || $[26] !== t5) {
2871
+ t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ProgressBar, {
2872
+ ratio: t5,
2873
+ width: maxWidth,
2874
+ fillColor: "rate_limit_fill",
2875
+ emptyColor: "rate_limit_empty"
2876
+ }, undefined, false, undefined, this);
2877
+ $[25] = maxWidth;
2878
+ $[26] = t5;
2879
+ $[27] = t6;
2880
+ } else {
2881
+ t6 = $[27];
2882
+ }
2883
+ let t7;
2884
+ if ($[28] !== usedText) {
2885
+ t7 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2886
+ children: usedText
2887
+ }, undefined, false, undefined, this);
2888
+ $[28] = usedText;
2889
+ $[29] = t7;
2890
+ } else {
2891
+ t7 = $[29];
2892
+ }
2893
+ let t8;
2894
+ if ($[30] !== t4 || $[31] !== t6 || $[32] !== t7) {
2895
+ t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2896
+ flexDirection: "column",
2897
+ children: [
2898
+ t4,
2899
+ t6,
2900
+ t7
2901
+ ]
2902
+ }, undefined, true, undefined, this);
2903
+ $[30] = t4;
2904
+ $[31] = t6;
2905
+ $[32] = t7;
2906
+ $[33] = t8;
2907
+ } else {
2908
+ t8 = $[33];
2909
+ }
2910
+ return t8;
2911
+ }
2912
+ }
2913
+ function Usage() {
2914
+ const [utilization, setUtilization] = import_react5.useState(null);
2915
+ const [error, setError] = import_react5.useState(null);
2916
+ const [isLoading, setIsLoading] = import_react5.useState(true);
2917
+ const {
2918
+ columns
2919
+ } = useTerminalSize();
2920
+ const availableWidth = columns - 2;
2921
+ const maxWidth = Math.min(availableWidth, 80);
2922
+ const loadUtilization = React3.useCallback(async () => {
2923
+ setIsLoading(true);
2924
+ setError(null);
2925
+ try {
2926
+ const data = await fetchUtilization();
2927
+ setUtilization(data);
2928
+ } catch (err) {
2929
+ logError(err);
2930
+ const axiosError = err;
2931
+ const responseBody = axiosError.response?.data ? jsonStringify(axiosError.response.data) : undefined;
2932
+ setError(responseBody ? `Failed to load usage data: ${responseBody}` : "Failed to load usage data");
2933
+ } finally {
2934
+ setIsLoading(false);
2935
+ }
2936
+ }, []);
2937
+ import_react5.useEffect(() => {
2938
+ loadUtilization();
2939
+ }, [loadUtilization]);
2940
+ useKeybinding("settings:retry", () => {
2941
+ loadUtilization();
2942
+ }, {
2943
+ context: "Settings",
2944
+ isActive: !!error && !isLoading
2945
+ });
2946
+ if (error) {
2947
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2948
+ flexDirection: "column",
2949
+ gap: 1,
2950
+ children: [
2951
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2952
+ color: "error",
2953
+ children: [
2954
+ "Error: ",
2955
+ error
2956
+ ]
2957
+ }, undefined, true, undefined, this),
2958
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2959
+ dimColor: true,
2960
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Byline, {
2961
+ children: [
2962
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
2963
+ action: "settings:retry",
2964
+ context: "Settings",
2965
+ fallback: "r",
2966
+ description: "retry"
2967
+ }, undefined, false, undefined, this),
2968
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
2969
+ action: "confirm:no",
2970
+ context: "Settings",
2971
+ fallback: "Esc",
2972
+ description: "cancel"
2973
+ }, undefined, false, undefined, this)
2974
+ ]
2975
+ }, undefined, true, undefined, this)
2976
+ }, undefined, false, undefined, this)
2977
+ ]
2978
+ }, undefined, true, undefined, this);
2979
+ }
2980
+ if (!utilization) {
2981
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2982
+ flexDirection: "column",
2983
+ gap: 1,
2984
+ children: [
2985
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2986
+ dimColor: true,
2987
+ children: "Loading usage data\u2026"
2988
+ }, undefined, false, undefined, this),
2989
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2990
+ dimColor: true,
2991
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
2992
+ action: "confirm:no",
2993
+ context: "Settings",
2994
+ fallback: "Esc",
2995
+ description: "cancel"
2996
+ }, undefined, false, undefined, this)
2997
+ }, undefined, false, undefined, this)
2998
+ ]
2999
+ }, undefined, true, undefined, this);
3000
+ }
3001
+ const subscriptionType = getSubscriptionType();
3002
+ const showSonnetBar = subscriptionType === "max" || subscriptionType === "team" || subscriptionType === null;
3003
+ const limits = [{
3004
+ title: "Current session",
3005
+ limit: utilization.five_hour
3006
+ }, {
3007
+ title: "Current week (all models)",
3008
+ limit: utilization.seven_day
3009
+ }, ...showSonnetBar ? [{
3010
+ title: "Current week (Sonnet only)",
3011
+ limit: utilization.seven_day_sonnet
3012
+ }] : []];
3013
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
3014
+ flexDirection: "column",
3015
+ gap: 1,
3016
+ width: "100%",
3017
+ children: [
3018
+ limits.some(({
3019
+ limit
3020
+ }) => limit) || /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3021
+ dimColor: true,
3022
+ children: "/usage is only available for subscription plans."
3023
+ }, undefined, false, undefined, this),
3024
+ limits.map(({
3025
+ title,
3026
+ limit: limit_0
3027
+ }) => limit_0 && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(LimitBar, {
3028
+ title,
3029
+ limit: limit_0,
3030
+ maxWidth
3031
+ }, title, false, undefined, this)),
3032
+ utilization.extra_usage && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ExtraUsageSection, {
3033
+ extraUsage: utilization.extra_usage,
3034
+ maxWidth
3035
+ }, undefined, false, undefined, this),
3036
+ isEligibleForOverageCreditGrant() && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(OverageCreditUpsell, {
3037
+ maxWidth
3038
+ }, undefined, false, undefined, this),
3039
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3040
+ dimColor: true,
3041
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
3042
+ action: "confirm:no",
3043
+ context: "Settings",
3044
+ fallback: "Esc",
3045
+ description: "cancel"
3046
+ }, undefined, false, undefined, this)
3047
+ }, undefined, false, undefined, this)
3048
+ ]
3049
+ }, undefined, true, undefined, this);
3050
+ }
3051
+ function ExtraUsageSection(t0) {
3052
+ const $ = import_compiler_runtime6.c(20);
3053
+ const {
3054
+ extraUsage: extraUsage2,
3055
+ maxWidth
3056
+ } = t0;
3057
+ const subscriptionType = getSubscriptionType();
3058
+ const isProOrMax = subscriptionType === "pro" || subscriptionType === "max";
3059
+ if (!isProOrMax) {
3060
+ return false;
3061
+ }
3062
+ if (!extraUsage2.is_enabled) {
3063
+ if (extraUsage.isEnabled()) {
3064
+ let t12;
3065
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
3066
+ t12 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
3067
+ flexDirection: "column",
3068
+ children: [
3069
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3070
+ bold: true,
3071
+ children: EXTRA_USAGE_SECTION_TITLE
3072
+ }, undefined, false, undefined, this),
3073
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3074
+ dimColor: true,
3075
+ children: "Extra usage not enabled \xB7 /extra-usage to enable"
3076
+ }, undefined, false, undefined, this)
3077
+ ]
3078
+ }, undefined, true, undefined, this);
3079
+ $[0] = t12;
3080
+ } else {
3081
+ t12 = $[0];
3082
+ }
3083
+ return t12;
3084
+ }
3085
+ return null;
3086
+ }
3087
+ if (extraUsage2.monthly_limit === null) {
3088
+ let t12;
3089
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
3090
+ t12 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
3091
+ flexDirection: "column",
3092
+ children: [
3093
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3094
+ bold: true,
3095
+ children: EXTRA_USAGE_SECTION_TITLE
3096
+ }, undefined, false, undefined, this),
3097
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3098
+ dimColor: true,
3099
+ children: "Unlimited"
3100
+ }, undefined, false, undefined, this)
3101
+ ]
3102
+ }, undefined, true, undefined, this);
3103
+ $[1] = t12;
3104
+ } else {
3105
+ t12 = $[1];
3106
+ }
3107
+ return t12;
3108
+ }
3109
+ if (typeof extraUsage2.used_credits !== "number" || typeof extraUsage2.utilization !== "number") {
3110
+ return null;
3111
+ }
3112
+ const t1 = extraUsage2.used_credits / 100;
3113
+ let t2;
3114
+ if ($[2] !== t1) {
3115
+ t2 = formatCost(t1, 2);
3116
+ $[2] = t1;
3117
+ $[3] = t2;
3118
+ } else {
3119
+ t2 = $[3];
3120
+ }
3121
+ const formattedUsedCredits = t2;
3122
+ const t3 = extraUsage2.monthly_limit / 100;
3123
+ let t4;
3124
+ if ($[4] !== t3) {
3125
+ t4 = formatCost(t3, 2);
3126
+ $[4] = t3;
3127
+ $[5] = t4;
3128
+ } else {
3129
+ t4 = $[5];
3130
+ }
3131
+ const formattedMonthlyLimit = t4;
3132
+ let T0;
3133
+ let t5;
3134
+ let t6;
3135
+ let t7;
3136
+ if ($[6] !== extraUsage2.utilization) {
3137
+ const now = new Date;
3138
+ const oneMonthReset = new Date(now.getFullYear(), now.getMonth() + 1, 1);
3139
+ T0 = LimitBar;
3140
+ t7 = EXTRA_USAGE_SECTION_TITLE;
3141
+ t5 = extraUsage2.utilization;
3142
+ t6 = oneMonthReset.toISOString();
3143
+ $[6] = extraUsage2.utilization;
3144
+ $[7] = T0;
3145
+ $[8] = t5;
3146
+ $[9] = t6;
3147
+ $[10] = t7;
3148
+ } else {
3149
+ T0 = $[7];
3150
+ t5 = $[8];
3151
+ t6 = $[9];
3152
+ t7 = $[10];
3153
+ }
3154
+ let t8;
3155
+ if ($[11] !== t5 || $[12] !== t6) {
3156
+ t8 = {
3157
+ utilization: t5,
3158
+ resets_at: t6
3159
+ };
3160
+ $[11] = t5;
3161
+ $[12] = t6;
3162
+ $[13] = t8;
3163
+ } else {
3164
+ t8 = $[13];
3165
+ }
3166
+ const t9 = `${formattedUsedCredits} / ${formattedMonthlyLimit} spent`;
3167
+ let t10;
3168
+ if ($[14] !== T0 || $[15] !== maxWidth || $[16] !== t7 || $[17] !== t8 || $[18] !== t9) {
3169
+ t10 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(T0, {
3170
+ title: t7,
3171
+ limit: t8,
3172
+ showTimeInReset: false,
3173
+ extraSubtext: t9,
3174
+ maxWidth
3175
+ }, undefined, false, undefined, this);
3176
+ $[14] = T0;
3177
+ $[15] = maxWidth;
3178
+ $[16] = t7;
3179
+ $[17] = t8;
3180
+ $[18] = t9;
3181
+ $[19] = t10;
3182
+ } else {
3183
+ t10 = $[19];
3184
+ }
3185
+ return t10;
3186
+ }
3187
+ var import_compiler_runtime6, React3, import_react5, jsx_dev_runtime6, EXTRA_USAGE_SECTION_TITLE = "Extra usage";
3188
+ var init_Usage = __esm(() => {
3189
+ init_extra_usage();
3190
+ init_cost_tracker();
3191
+ init_auth();
3192
+ init_useTerminalSize();
3193
+ init_ink();
3194
+ init_useKeybinding();
3195
+ init_usage();
3196
+ init_format();
3197
+ init_log();
3198
+ init_slowOperations();
3199
+ init_ConfigurableShortcutHint();
3200
+ init_Byline();
3201
+ init_ProgressBar();
3202
+ init_OverageCreditUpsell();
3203
+ import_compiler_runtime6 = __toESM(require_compiler_runtime(), 1);
3204
+ React3 = __toESM(require_react(), 1);
3205
+ import_react5 = __toESM(require_react(), 1);
3206
+ jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
3207
+ });
3208
+
3209
+ // src/components/Settings/Settings.tsx
3210
+ function Settings(t0) {
3211
+ const $ = import_compiler_runtime7.c(25);
3212
+ const {
3213
+ onClose,
3214
+ context,
3215
+ defaultTab
3216
+ } = t0;
3217
+ const [selectedTab, setSelectedTab] = import_react6.useState(defaultTab);
3218
+ const [tabsHidden, setTabsHidden] = import_react6.useState(false);
3219
+ const [configOwnsEsc, setConfigOwnsEsc] = import_react6.useState(false);
3220
+ const [gatesOwnsEsc, setGatesOwnsEsc] = import_react6.useState(false);
3221
+ const insideModal = useIsInsideModal();
3222
+ const {
3223
+ rows
3224
+ } = useModalOrTerminalSize(useTerminalSize());
3225
+ const contentHeight = insideModal ? rows + 1 : Math.max(15, Math.min(Math.floor(rows * 0.8), 30));
3226
+ const [diagnosticsPromise] = import_react6.useState(_temp22);
3227
+ useExitOnCtrlCDWithKeybindings();
3228
+ let t1;
3229
+ if ($[0] !== onClose || $[1] !== tabsHidden) {
3230
+ t1 = () => {
3231
+ if (tabsHidden) {
3232
+ return;
3233
+ }
3234
+ onClose("Status dialog dismissed", {
3235
+ display: "system"
3236
+ });
3237
+ };
3238
+ $[0] = onClose;
3239
+ $[1] = tabsHidden;
3240
+ $[2] = t1;
3241
+ } else {
3242
+ t1 = $[2];
3243
+ }
3244
+ const handleEscape = t1;
3245
+ const t2 = !tabsHidden && !(selectedTab === "Config" && configOwnsEsc) && !(selectedTab === "Gates" && gatesOwnsEsc);
3246
+ let t3;
3247
+ if ($[3] !== t2) {
3248
+ t3 = {
3249
+ context: "Settings",
3250
+ isActive: t2
3251
+ };
3252
+ $[3] = t2;
3253
+ $[4] = t3;
3254
+ } else {
3255
+ t3 = $[4];
3256
+ }
3257
+ useKeybinding("confirm:no", handleEscape, t3);
3258
+ let t4;
3259
+ if ($[5] !== context || $[6] !== diagnosticsPromise) {
3260
+ t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
3261
+ title: "Status",
3262
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Status, {
3263
+ context,
3264
+ diagnosticsPromise
3265
+ }, undefined, false, undefined, this)
3266
+ }, "status", false, undefined, this);
3267
+ $[5] = context;
3268
+ $[6] = diagnosticsPromise;
3269
+ $[7] = t4;
3270
+ } else {
3271
+ t4 = $[7];
3272
+ }
3273
+ let t5;
3274
+ if ($[8] !== contentHeight || $[9] !== context || $[10] !== onClose) {
3275
+ t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
3276
+ title: "Config",
3277
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(import_react6.Suspense, {
3278
+ fallback: null,
3279
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Config, {
3280
+ context,
3281
+ onClose,
3282
+ setTabsHidden,
3283
+ onIsSearchModeChange: setConfigOwnsEsc,
3284
+ contentHeight
3285
+ }, undefined, false, undefined, this)
3286
+ }, undefined, false, undefined, this)
3287
+ }, "config", false, undefined, this);
3288
+ $[8] = contentHeight;
3289
+ $[9] = context;
3290
+ $[10] = onClose;
3291
+ $[11] = t5;
3292
+ } else {
3293
+ t5 = $[11];
3294
+ }
3295
+ let t6;
3296
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
3297
+ t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
3298
+ title: "Usage",
3299
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Usage, {}, undefined, false, undefined, this)
3300
+ }, "usage", false, undefined, this);
3301
+ $[12] = t6;
3302
+ } else {
3303
+ t6 = $[12];
3304
+ }
3305
+ let t7;
3306
+ if ($[13] !== contentHeight) {
3307
+ t7 = [];
3308
+ $[13] = contentHeight;
3309
+ $[14] = t7;
3310
+ } else {
3311
+ t7 = $[14];
3312
+ }
3313
+ let t8;
3314
+ if ($[15] !== t4 || $[16] !== t5 || $[17] !== t7) {
3315
+ t8 = [t4, t5, t6, ...t7];
3316
+ $[15] = t4;
3317
+ $[16] = t5;
3318
+ $[17] = t7;
3319
+ $[18] = t8;
3320
+ } else {
3321
+ t8 = $[18];
3322
+ }
3323
+ const tabs = t8;
3324
+ const t9 = defaultTab !== "Config" && defaultTab !== "Gates";
3325
+ const t10 = tabsHidden || insideModal ? undefined : contentHeight;
3326
+ let t11;
3327
+ if ($[19] !== selectedTab || $[20] !== t10 || $[21] !== t9 || $[22] !== tabs || $[23] !== tabsHidden) {
3328
+ t11 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Pane, {
3329
+ color: "permission",
3330
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tabs, {
3331
+ color: "permission",
3332
+ selectedTab,
3333
+ onTabChange: setSelectedTab,
3334
+ hidden: tabsHidden,
3335
+ initialHeaderFocused: t9,
3336
+ contentHeight: t10,
3337
+ children: tabs
3338
+ }, undefined, false, undefined, this)
3339
+ }, undefined, false, undefined, this);
3340
+ $[19] = selectedTab;
3341
+ $[20] = t10;
3342
+ $[21] = t9;
3343
+ $[22] = tabs;
3344
+ $[23] = tabsHidden;
3345
+ $[24] = t11;
3346
+ } else {
3347
+ t11 = $[24];
3348
+ }
3349
+ return t11;
3350
+ }
3351
+ function _temp22() {
3352
+ return buildDiagnostics().catch(_temp6);
3353
+ }
3354
+ function _temp6() {
3355
+ return [];
3356
+ }
3357
+ var import_compiler_runtime7, import_react6, jsx_dev_runtime7;
3358
+ var init_Settings = __esm(() => {
3359
+ init_useKeybinding();
3360
+ init_useExitOnCtrlCDWithKeybindings();
3361
+ init_useTerminalSize();
3362
+ init_modalContext();
3363
+ init_Pane();
3364
+ init_Tabs();
3365
+ init_Status();
3366
+ init_Config();
3367
+ init_Usage();
3368
+ import_compiler_runtime7 = __toESM(require_compiler_runtime(), 1);
3369
+ import_react6 = __toESM(require_react(), 1);
3370
+ jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
3371
+ });
3372
+
3373
+ export { Settings, init_Settings };