@foxclicom/foxcli 2.1.89

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 (453) hide show
  1. package/README.md +398 -0
  2. package/bun.lock +2090 -0
  3. package/dist/chunk-003e621m.js +247 -0
  4. package/dist/chunk-04he5cyw.js +169 -0
  5. package/dist/chunk-05gpckd1.js +56 -0
  6. package/dist/chunk-06saje2v.js +39 -0
  7. package/dist/chunk-0731m51q.js +8 -0
  8. package/dist/chunk-098tvb6a.js +490 -0
  9. package/dist/chunk-0akzpfxc.js +117 -0
  10. package/dist/chunk-0dvq0q4g.js +780 -0
  11. package/dist/chunk-0e1xsncc.js +969 -0
  12. package/dist/chunk-0jp9x1pk.js +227 -0
  13. package/dist/chunk-0kep06pv.js +94 -0
  14. package/dist/chunk-0paqc2yw.js +15 -0
  15. package/dist/chunk-0vkfrmqm.js +690 -0
  16. package/dist/chunk-0xjaqda8.js +1124 -0
  17. package/dist/chunk-0yhfpays.js +116 -0
  18. package/dist/chunk-1141xmr4.js +8 -0
  19. package/dist/chunk-14cmss9n.js +655 -0
  20. package/dist/chunk-14nvhjrk.js +280 -0
  21. package/dist/chunk-15ah5bdg.js +17 -0
  22. package/dist/chunk-15tdhhv6.js +97 -0
  23. package/dist/chunk-1c5jv610.js +174 -0
  24. package/dist/chunk-1cbn5kxf.js +7 -0
  25. package/dist/chunk-1fvkskfd.js +432 -0
  26. package/dist/chunk-1fz2kv26.js +85 -0
  27. package/dist/chunk-1h2famwb.js +49 -0
  28. package/dist/chunk-1vwfagpe.js +83 -0
  29. package/dist/chunk-1xkekb9y.js +19 -0
  30. package/dist/chunk-1xy3xzsc.js +9300 -0
  31. package/dist/chunk-238g70xa.js +36 -0
  32. package/dist/chunk-24w0h1qk.js +339 -0
  33. package/dist/chunk-24z6z01r.js +40 -0
  34. package/dist/chunk-27xc1csx.js +104 -0
  35. package/dist/chunk-2a42s11t.js +412 -0
  36. package/dist/chunk-2eavn925.js +5011 -0
  37. package/dist/chunk-2eykm0j0.js +20 -0
  38. package/dist/chunk-2gzv8nrw.js +205 -0
  39. package/dist/chunk-2j3ydfmm.js +208 -0
  40. package/dist/chunk-2k995y2x.js +880 -0
  41. package/dist/chunk-2kg4d2c7.js +601 -0
  42. package/dist/chunk-2n877dxb.js +224 -0
  43. package/dist/chunk-2nayx6q1.js +63 -0
  44. package/dist/chunk-2t3vw4tx.js +22820 -0
  45. package/dist/chunk-2tw2ve8h.js +145 -0
  46. package/dist/chunk-2zsew1hs.js +73 -0
  47. package/dist/chunk-30rst83v.js +168 -0
  48. package/dist/chunk-341888tq.js +102 -0
  49. package/dist/chunk-348de018.js +26 -0
  50. package/dist/chunk-363p49h1.js +172719 -0
  51. package/dist/chunk-387ggdb2.js +195 -0
  52. package/dist/chunk-3be7ka25.js +56 -0
  53. package/dist/chunk-3c25bcsw.js +17 -0
  54. package/dist/chunk-3cyyhp8p.js +1151 -0
  55. package/dist/chunk-3gqdqmzb.js +75 -0
  56. package/dist/chunk-3h8a89gy.js +46 -0
  57. package/dist/chunk-3hk8rrwh.js +908 -0
  58. package/dist/chunk-3j33p45s.js +458 -0
  59. package/dist/chunk-3kc4kyk9.js +819 -0
  60. package/dist/chunk-3qv2jg1k.js +250 -0
  61. package/dist/chunk-3r24h7t6.js +113 -0
  62. package/dist/chunk-3sz3q1g8.js +104 -0
  63. package/dist/chunk-3w6s9m5w.js +16 -0
  64. package/dist/chunk-43251qh9.js +176 -0
  65. package/dist/chunk-44fpr6jq.js +434 -0
  66. package/dist/chunk-45kxdsp8.js +444 -0
  67. package/dist/chunk-466d7sxa.js +2057 -0
  68. package/dist/chunk-495d85x1.js +8066 -0
  69. package/dist/chunk-4cptw4qa.js +714 -0
  70. package/dist/chunk-4g3v8y12.js +23 -0
  71. package/dist/chunk-4jm600zv.js +13 -0
  72. package/dist/chunk-4t0ehd2z.js +89 -0
  73. package/dist/chunk-4x38ez67.js +128 -0
  74. package/dist/chunk-4zfkzkt6.js +37 -0
  75. package/dist/chunk-5157ex2s.js +104 -0
  76. package/dist/chunk-55wgxwa9.js +13877 -0
  77. package/dist/chunk-581q6r6y.js +229 -0
  78. package/dist/chunk-5bbsd66z.js +87 -0
  79. package/dist/chunk-5ctt9z6m.js +216 -0
  80. package/dist/chunk-5hfgayhz.js +153 -0
  81. package/dist/chunk-5kmnvh8h.js +112 -0
  82. package/dist/chunk-5tz6v8a5.js +5393 -0
  83. package/dist/chunk-5w5m8kq9.js +87 -0
  84. package/dist/chunk-5ztq67an.js +2333 -0
  85. package/dist/chunk-62gm8b8n.js +1322 -0
  86. package/dist/chunk-685fmb09.js +535 -0
  87. package/dist/chunk-6bd8brc4.js +48 -0
  88. package/dist/chunk-6dj5t602.js +341 -0
  89. package/dist/chunk-6f4sd6xc.js +127 -0
  90. package/dist/chunk-6gr3c3w9.js +378 -0
  91. package/dist/chunk-6n2qgm9v.js +8 -0
  92. package/dist/chunk-6ns6g3t9.js +1012 -0
  93. package/dist/chunk-6swe4a45.js +87 -0
  94. package/dist/chunk-6tq2v3rk.js +186 -0
  95. package/dist/chunk-6yf4a3pf.js +41 -0
  96. package/dist/chunk-7271bnfv.js +220 -0
  97. package/dist/chunk-72awppzy.js +16 -0
  98. package/dist/chunk-73gyam06.js +40 -0
  99. package/dist/chunk-73rpbt04.js +1947 -0
  100. package/dist/chunk-760252na.js +101 -0
  101. package/dist/chunk-7739pg2c.js +4261 -0
  102. package/dist/chunk-77g09znh.js +391 -0
  103. package/dist/chunk-781t965f.js +202 -0
  104. package/dist/chunk-7aw745vx.js +40175 -0
  105. package/dist/chunk-7br3j88y.js +141 -0
  106. package/dist/chunk-7fxy60g9.js +296 -0
  107. package/dist/chunk-7j3f4h1v.js +689 -0
  108. package/dist/chunk-7ke2txc2.js +309 -0
  109. package/dist/chunk-7m2nd8da.js +110 -0
  110. package/dist/chunk-7rpdgyyb.js +161 -0
  111. package/dist/chunk-7wj3b774.js +287 -0
  112. package/dist/chunk-7wm5s02e.js +216 -0
  113. package/dist/chunk-7yd6jttg.js +862 -0
  114. package/dist/chunk-7yfshpbj.js +1548 -0
  115. package/dist/chunk-7ymfj7m3.js +151 -0
  116. package/dist/chunk-7z8j9qfn.js +121 -0
  117. package/dist/chunk-7zccp7mt.js +91 -0
  118. package/dist/chunk-820bdvg4.js +184 -0
  119. package/dist/chunk-83hfzbx3.js +10 -0
  120. package/dist/chunk-88s6sc85.js +87 -0
  121. package/dist/chunk-8bedvdm1.js +32 -0
  122. package/dist/chunk-8gvdbsaq.js +22 -0
  123. package/dist/chunk-8hq5kk3y.js +44 -0
  124. package/dist/chunk-8nca9sgc.js +208 -0
  125. package/dist/chunk-8qeha1fz.js +103 -0
  126. package/dist/chunk-8qjtqhrr.js +165 -0
  127. package/dist/chunk-8tmegdjp.js +113 -0
  128. package/dist/chunk-8tnsngw2.js +31 -0
  129. package/dist/chunk-8twg4emd.js +71 -0
  130. package/dist/chunk-8vcyvvad.js +348 -0
  131. package/dist/chunk-8w3etwh3.js +601 -0
  132. package/dist/chunk-8y12jxg8.js +10 -0
  133. package/dist/chunk-8ymf4e6z.js +48 -0
  134. package/dist/chunk-90wp6wez.js +10510 -0
  135. package/dist/chunk-91awdvpf.js +61 -0
  136. package/dist/chunk-977kqw0c.js +466 -0
  137. package/dist/chunk-9gbamk79.js +93 -0
  138. package/dist/chunk-9s8v3j7m.js +38 -0
  139. package/dist/chunk-9xezt4wd.js +54 -0
  140. package/dist/chunk-9xzebfy5.js +671 -0
  141. package/dist/chunk-a8ejc632.js +3094 -0
  142. package/dist/chunk-a9ra6h3p.js +219 -0
  143. package/dist/chunk-a9vdeb6y.js +258 -0
  144. package/dist/chunk-a9zh40sj.js +48 -0
  145. package/dist/chunk-aaef8dpx.js +100 -0
  146. package/dist/chunk-aapmv7dy.js +44 -0
  147. package/dist/chunk-adgm4w5w.js +212 -0
  148. package/dist/chunk-ag0gc3th.js +88 -0
  149. package/dist/chunk-ah0w9kp8.js +173 -0
  150. package/dist/chunk-b4wg70y1.js +54 -0
  151. package/dist/chunk-b90bgrf7.js +24 -0
  152. package/dist/chunk-be5g3kd0.js +164 -0
  153. package/dist/chunk-bh8acr81.js +500 -0
  154. package/dist/chunk-bjqw6798.js +328 -0
  155. package/dist/chunk-bm1qb16p.js +17 -0
  156. package/dist/chunk-bqfnp99q.js +477 -0
  157. package/dist/chunk-bvx2gazj.js +304 -0
  158. package/dist/chunk-bwq5zxwv.js +306 -0
  159. package/dist/chunk-byf2zkne.js +524 -0
  160. package/dist/chunk-c0edra3v.js +437 -0
  161. package/dist/chunk-c0tfwbd2.js +723 -0
  162. package/dist/chunk-cbd6nwrj.js +111 -0
  163. package/dist/chunk-cc15x0zt.js +154 -0
  164. package/dist/chunk-cd1aese9.js +20 -0
  165. package/dist/chunk-cdz5yb0r.js +57 -0
  166. package/dist/chunk-cf5bj9j5.js +93 -0
  167. package/dist/chunk-cfv996bs.js +22 -0
  168. package/dist/chunk-cgfdkzhb.js +12 -0
  169. package/dist/chunk-cnkgrwpf.js +87 -0
  170. package/dist/chunk-cr6q93s5.js +42 -0
  171. package/dist/chunk-cspg0r9n.js +584 -0
  172. package/dist/chunk-ctw5jwcd.js +213 -0
  173. package/dist/chunk-cvge4pvp.js +122 -0
  174. package/dist/chunk-d18z9pna.js +106 -0
  175. package/dist/chunk-d1cfb0sj.js +98 -0
  176. package/dist/chunk-d1tp6sk7.js +90 -0
  177. package/dist/chunk-d3e1v3sq.js +344 -0
  178. package/dist/chunk-d7j0zted.js +114 -0
  179. package/dist/chunk-d7zmg667.js +192 -0
  180. package/dist/chunk-ddvhht3h.js +695 -0
  181. package/dist/chunk-dfeh5kmx.js +74 -0
  182. package/dist/chunk-dgjkb800.js +120 -0
  183. package/dist/chunk-dgqrcy74.js +48 -0
  184. package/dist/chunk-dmqarh6q.js +463 -0
  185. package/dist/chunk-dnh7jtpb.js +37 -0
  186. package/dist/chunk-dpeq9h27.js +128 -0
  187. package/dist/chunk-drgy3hh3.js +88 -0
  188. package/dist/chunk-dv1wfr85.js +6373 -0
  189. package/dist/chunk-dv2w9vpb.js +66 -0
  190. package/dist/chunk-dwfxgheg.js +270 -0
  191. package/dist/chunk-e3g8q4cn.js +1646 -0
  192. package/dist/chunk-e5pntxye.js +37 -0
  193. package/dist/chunk-e6v9mqg8.js +281 -0
  194. package/dist/chunk-e7393td6.js +42 -0
  195. package/dist/chunk-ef8r68ej.js +120 -0
  196. package/dist/chunk-ehtwnxpg.js +1591 -0
  197. package/dist/chunk-emhask7n.js +373 -0
  198. package/dist/chunk-eq75ekjx.js +97 -0
  199. package/dist/chunk-eqp1rfft.js +17 -0
  200. package/dist/chunk-ewadzrm8.js +103 -0
  201. package/dist/chunk-f2mt6b5j.js +198 -0
  202. package/dist/chunk-f3d9gb71.js +333 -0
  203. package/dist/chunk-f5ma3nh5.js +3436 -0
  204. package/dist/chunk-f8bgh5qc.js +86 -0
  205. package/dist/chunk-fbgxj8g3.js +1585 -0
  206. package/dist/chunk-fbv4apne.js +51 -0
  207. package/dist/chunk-fdj47yp8.js +108 -0
  208. package/dist/chunk-fer10z2s.js +89 -0
  209. package/dist/chunk-ffewbr1v.js +642 -0
  210. package/dist/chunk-fpzax6rw.js +225 -0
  211. package/dist/chunk-fyc5fepv.js +10 -0
  212. package/dist/chunk-g0j0t6qk.js +26 -0
  213. package/dist/chunk-g1kkd3xm.js +130 -0
  214. package/dist/chunk-g2dr9kyp.js +90 -0
  215. package/dist/chunk-g338npwr.js +1061 -0
  216. package/dist/chunk-g3fcqsc1.js +998 -0
  217. package/dist/chunk-g3t0act8.js +8 -0
  218. package/dist/chunk-g4bng3yk.js +140 -0
  219. package/dist/chunk-gax0fcbx.js +182 -0
  220. package/dist/chunk-gegyrhqa.js +277 -0
  221. package/dist/chunk-gejs9q9d.js +542 -0
  222. package/dist/chunk-gqazdwgf.js +40764 -0
  223. package/dist/chunk-gtayyc80.js +28 -0
  224. package/dist/chunk-gyj242zr.js +20 -0
  225. package/dist/chunk-h0qngp9w.js +157 -0
  226. package/dist/chunk-h0rbjg6x.js +55 -0
  227. package/dist/chunk-h4qybe96.js +531 -0
  228. package/dist/chunk-h8vttfbt.js +82 -0
  229. package/dist/chunk-hakdhagh.js +16606 -0
  230. package/dist/chunk-hb22hd9m.js +373 -0
  231. package/dist/chunk-hbjbyb2r.js +120 -0
  232. package/dist/chunk-henh8e8f.js +69 -0
  233. package/dist/chunk-heqbt4wp.js +43 -0
  234. package/dist/chunk-hf5v5wd0.js +2833 -0
  235. package/dist/chunk-hfzj1m07.js +118 -0
  236. package/dist/chunk-hh7cmy4k.js +20 -0
  237. package/dist/chunk-hhwpdnst.js +173 -0
  238. package/dist/chunk-hjhc4cpt.js +69 -0
  239. package/dist/chunk-hk9xz7gk.js +118 -0
  240. package/dist/chunk-hqmz36b3.js +552 -0
  241. package/dist/chunk-hrzerbfw.js +1299 -0
  242. package/dist/chunk-hvha3949.js +229 -0
  243. package/dist/chunk-hw9yapav.js +644 -0
  244. package/dist/chunk-hx2tr4ep.js +7189 -0
  245. package/dist/chunk-hz2e6s2n.js +384 -0
  246. package/dist/chunk-hzhe8ygc.js +547 -0
  247. package/dist/chunk-j2k4p94p.js +55 -0
  248. package/dist/chunk-j3a4p81y.js +184 -0
  249. package/dist/chunk-j5vj6wem.js +241 -0
  250. package/dist/chunk-j64ga6ta.js +8035 -0
  251. package/dist/chunk-j98bzjtw.js +21933 -0
  252. package/dist/chunk-jafes477.js +29 -0
  253. package/dist/chunk-jce5r25x.js +18 -0
  254. package/dist/chunk-jchz3ws1.js +756 -0
  255. package/dist/chunk-jd32zbps.js +15 -0
  256. package/dist/chunk-jdgeec04.js +4249 -0
  257. package/dist/chunk-jhzdk454.js +278 -0
  258. package/dist/chunk-jjxb16v1.js +691 -0
  259. package/dist/chunk-jmc0vfad.js +275 -0
  260. package/dist/chunk-jnhkref0.js +30 -0
  261. package/dist/chunk-jp85zv57.js +3198 -0
  262. package/dist/chunk-jx817w05.js +11 -0
  263. package/dist/chunk-jxgm95zx.js +802 -0
  264. package/dist/chunk-jzmz18nn.js +65 -0
  265. package/dist/chunk-k0p9w03v.js +4957 -0
  266. package/dist/chunk-kjv7vnsy.js +81 -0
  267. package/dist/chunk-kkt7vkyc.js +273 -0
  268. package/dist/chunk-ks57hmrt.js +98 -0
  269. package/dist/chunk-ksq785ca.js +109 -0
  270. package/dist/chunk-kwekc97v.js +18 -0
  271. package/dist/chunk-m06q12hg.js +61 -0
  272. package/dist/chunk-m1g8ywfk.js +84 -0
  273. package/dist/chunk-m42g016x.js +70 -0
  274. package/dist/chunk-m6m4jdbj.js +1918 -0
  275. package/dist/chunk-ma0h0h17.js +471 -0
  276. package/dist/chunk-mak6ckds.js +102 -0
  277. package/dist/chunk-mceesnzr.js +438 -0
  278. package/dist/chunk-mhs6c4fp.js +765 -0
  279. package/dist/chunk-mm7rd0jd.js +1578 -0
  280. package/dist/chunk-mt25echc.js +6157 -0
  281. package/dist/chunk-mv8hngk2.js +86 -0
  282. package/dist/chunk-mxn9djv2.js +152 -0
  283. package/dist/chunk-n0qaeaa5.js +256 -0
  284. package/dist/chunk-n7ttdtk0.js +641 -0
  285. package/dist/chunk-n83rnk8h.js +62 -0
  286. package/dist/chunk-n89dwhkm.js +69 -0
  287. package/dist/chunk-nj29pqp3.js +155 -0
  288. package/dist/chunk-njchshm5.js +99 -0
  289. package/dist/chunk-nka1g8f4.js +773 -0
  290. package/dist/chunk-npj6g78n.js +8956 -0
  291. package/dist/chunk-nq0fxyxh.js +752 -0
  292. package/dist/chunk-nrdckp85.js +809 -0
  293. package/dist/chunk-nswqqqdd.js +26840 -0
  294. package/dist/chunk-nt837qt9.js +21 -0
  295. package/dist/chunk-ntfnwa7w.js +328 -0
  296. package/dist/chunk-nxsh6de2.js +1711 -0
  297. package/dist/chunk-ny641a2t.js +96 -0
  298. package/dist/chunk-nymbd7tw.js +825 -0
  299. package/dist/chunk-nz9wqm63.js +262 -0
  300. package/dist/chunk-p2816w9z.js +1486 -0
  301. package/dist/chunk-p2d5nh3g.js +342 -0
  302. package/dist/chunk-p3c8dz92.js +3442 -0
  303. package/dist/chunk-p3m2gn04.js +1551 -0
  304. package/dist/chunk-p7g7pf3f.js +336 -0
  305. package/dist/chunk-p82dmx79.js +519 -0
  306. package/dist/chunk-p8t1v3qw.js +713 -0
  307. package/dist/chunk-pg6ke51s.js +60 -0
  308. package/dist/chunk-phc72ftz.js +61 -0
  309. package/dist/chunk-pm51hqt3.js +1863 -0
  310. package/dist/chunk-pngv409n.js +253 -0
  311. package/dist/chunk-pp83rz76.js +27 -0
  312. package/dist/chunk-pqcemkwx.js +640 -0
  313. package/dist/chunk-pqqf5gss.js +4521 -0
  314. package/dist/chunk-pqw1y4f8.js +524 -0
  315. package/dist/chunk-ps49ymvj.js +43 -0
  316. package/dist/chunk-pwwa7s62.js +11 -0
  317. package/dist/chunk-pxjqgrdk.js +59 -0
  318. package/dist/chunk-q1jvyh4z.js +41 -0
  319. package/dist/chunk-q25bjaev.js +15 -0
  320. package/dist/chunk-q6av622g.js +38 -0
  321. package/dist/chunk-qmvk0wr6.js +787 -0
  322. package/dist/chunk-qnfx3qtx.js +617 -0
  323. package/dist/chunk-qp2qdcda.js +100 -0
  324. package/dist/chunk-qpg0bm1g.js +441 -0
  325. package/dist/chunk-qqfa0dqg.js +2343 -0
  326. package/dist/chunk-qtvek1gy.js +466 -0
  327. package/dist/chunk-qz2x630m.js +49145 -0
  328. package/dist/chunk-r4vk0x64.js +674 -0
  329. package/dist/chunk-r4z1107v.js +88 -0
  330. package/dist/chunk-r66hz8j6.js +34 -0
  331. package/dist/chunk-r6b58y3x.js +17 -0
  332. package/dist/chunk-rhftek9r.js +156 -0
  333. package/dist/chunk-rn0v1hk8.js +34 -0
  334. package/dist/chunk-rq2ry4xa.js +648 -0
  335. package/dist/chunk-rqwnwe7k.js +87 -0
  336. package/dist/chunk-rs45skes.js +123 -0
  337. package/dist/chunk-rvqtbt9h.js +726 -0
  338. package/dist/chunk-rzq6ct1h.js +1095 -0
  339. package/dist/chunk-s3pzvdss.js +50 -0
  340. package/dist/chunk-s5cexe2j.js +10476 -0
  341. package/dist/chunk-s79s6rms.js +40 -0
  342. package/dist/chunk-sd36yzx8.js +954 -0
  343. package/dist/chunk-sdj9b9wh.js +782 -0
  344. package/dist/chunk-seaswa9a.js +745 -0
  345. package/dist/chunk-sgy4bnyd.js +496 -0
  346. package/dist/chunk-sjqtqj35.js +28 -0
  347. package/dist/chunk-sk5gyvdj.js +127 -0
  348. package/dist/chunk-skctedsv.js +15679 -0
  349. package/dist/chunk-spqaamnc.js +63 -0
  350. package/dist/chunk-szj5wvdy.js +28 -0
  351. package/dist/chunk-t0rgmccj.js +39 -0
  352. package/dist/chunk-t0zcygwt.js +63 -0
  353. package/dist/chunk-t1pqzjdb.js +400 -0
  354. package/dist/chunk-t20kqvm0.js +1493 -0
  355. package/dist/chunk-t60mq3jn.js +421 -0
  356. package/dist/chunk-t9ak7d0c.js +86 -0
  357. package/dist/chunk-tantc5sm.js +97 -0
  358. package/dist/chunk-tgvzn3q1.js +98 -0
  359. package/dist/chunk-tjaqa99q.js +125 -0
  360. package/dist/chunk-tka1kh41.js +32 -0
  361. package/dist/chunk-tm70zjhw.js +95 -0
  362. package/dist/chunk-ts2p6bv1.js +224 -0
  363. package/dist/chunk-ttk5dzz8.js +25 -0
  364. package/dist/chunk-ty0xmdf9.js +142 -0
  365. package/dist/chunk-v0j5s5w9.js +113 -0
  366. package/dist/chunk-v1kzp02e.js +785 -0
  367. package/dist/chunk-v1mgv1et.js +15 -0
  368. package/dist/chunk-v1vqpm16.js +151 -0
  369. package/dist/chunk-v2drem4p.js +3035 -0
  370. package/dist/chunk-v399mzxk.js +58 -0
  371. package/dist/chunk-v78fj8by.js +145 -0
  372. package/dist/chunk-v7yayd0e.js +102 -0
  373. package/dist/chunk-v9smspw2.js +4301 -0
  374. package/dist/chunk-vdxvgw28.js +5802 -0
  375. package/dist/chunk-vech0vdw.js +258 -0
  376. package/dist/chunk-vest0y6x.js +3830 -0
  377. package/dist/chunk-vf5sd1nq.js +12 -0
  378. package/dist/chunk-vfwbg2m3.js +3351 -0
  379. package/dist/chunk-vhpesgs8.js +193 -0
  380. package/dist/chunk-vjbr8wqg.js +849 -0
  381. package/dist/chunk-vratq94g.js +349 -0
  382. package/dist/chunk-vtchbjt5.js +284 -0
  383. package/dist/chunk-vw60ew4s.js +338 -0
  384. package/dist/chunk-vyc0rjyx.js +31 -0
  385. package/dist/chunk-vyjeh50y.js +2149 -0
  386. package/dist/chunk-w2z5pqd3.js +336 -0
  387. package/dist/chunk-w34c4pn6.js +417 -0
  388. package/dist/chunk-w7wgpqcp.js +157 -0
  389. package/dist/chunk-w9k8zntt.js +1391 -0
  390. package/dist/chunk-wb4p3ft4.js +130 -0
  391. package/dist/chunk-wejsw2n0.js +104 -0
  392. package/dist/chunk-wfz0qffj.js +3939 -0
  393. package/dist/chunk-wj4wyfpy.js +716 -0
  394. package/dist/chunk-ws1jdhta.js +315 -0
  395. package/dist/chunk-wsgyhhg2.js +91 -0
  396. package/dist/chunk-wspkwgra.js +1315 -0
  397. package/dist/chunk-wty0nm0a.js +749 -0
  398. package/dist/chunk-wzfbxdwn.js +71 -0
  399. package/dist/chunk-wzpdet3m.js +843 -0
  400. package/dist/chunk-x14dq3v1.js +722 -0
  401. package/dist/chunk-x7ynqhrv.js +266 -0
  402. package/dist/chunk-x8b7vft8.js +132 -0
  403. package/dist/chunk-xfft987g.js +47 -0
  404. package/dist/chunk-xjz3de9f.js +654 -0
  405. package/dist/chunk-xms0cc06.js +84 -0
  406. package/dist/chunk-xn20ta17.js +107 -0
  407. package/dist/chunk-xsq9ae7x.js +90 -0
  408. package/dist/chunk-xszk7n10.js +14358 -0
  409. package/dist/chunk-xvqpc205.js +159 -0
  410. package/dist/chunk-xx3qkvyg.js +606 -0
  411. package/dist/chunk-y1784krc.js +19 -0
  412. package/dist/chunk-y47cg3kz.js +42 -0
  413. package/dist/chunk-y5mfcqyc.js +254 -0
  414. package/dist/chunk-yhnzwtby.js +4389 -0
  415. package/dist/chunk-yj6dn49f.js +476 -0
  416. package/dist/chunk-yjkfkzxy.js +266 -0
  417. package/dist/chunk-yq0a6dk8.js +265 -0
  418. package/dist/chunk-yqs6zhes.js +6105 -0
  419. package/dist/chunk-ytx08xk9.js +87 -0
  420. package/dist/chunk-ywxd4qw4.js +22 -0
  421. package/dist/chunk-yxnffetf.js +6956 -0
  422. package/dist/chunk-z2dp53wn.js +17 -0
  423. package/dist/chunk-z3hcj5gd.js +372 -0
  424. package/dist/chunk-z3j9hdd8.js +32 -0
  425. package/dist/chunk-z57a5q6t.js +2641 -0
  426. package/dist/chunk-z5bg3c3b.js +54 -0
  427. package/dist/chunk-z74kky8g.js +160 -0
  428. package/dist/chunk-z9w0ffmw.js +99 -0
  429. package/dist/chunk-zhk3aav8.js +79 -0
  430. package/dist/chunk-zk2wsm7d.js +15 -0
  431. package/dist/chunk-zp0509kx.js +563 -0
  432. package/dist/chunk-zsfxha74.js +17655 -0
  433. package/dist/chunk-zw77xgjd.js +38 -0
  434. package/dist/chunk-zwps6dt3.js +83 -0
  435. package/dist/chunk-zx4s70cq.js +298 -0
  436. package/dist/chunk-zxse7h5w.js +71 -0
  437. package/dist/chunk-zz21rvr7.js +27 -0
  438. package/dist/cli.js +81 -0
  439. package/package.json +182 -0
  440. package/sdk-tools.d.ts +2719 -0
  441. package/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
  442. package/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
  443. package/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
  444. package/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
  445. package/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
  446. package/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
  447. package/vendor/ripgrep/COPYING +3 -0
  448. package/vendor/ripgrep/arm64-darwin/rg +0 -0
  449. package/vendor/ripgrep/arm64-linux/rg +0 -0
  450. package/vendor/ripgrep/arm64-win32/rg.exe +0 -0
  451. package/vendor/ripgrep/x64-darwin/rg +0 -0
  452. package/vendor/ripgrep/x64-linux/rg +0 -0
  453. package/vendor/ripgrep/x64-win32/rg.exe +0 -0
@@ -0,0 +1,3351 @@
1
+ // @bun
2
+ import {
3
+ ClaudeMdExternalIncludesDialog,
4
+ init_ClaudeMdExternalIncludesDialog
5
+ } from "./chunk-adgm4w5w.js";
6
+ import {
7
+ init_bridgeEnabled
8
+ } from "./chunk-s79s6rms.js";
9
+ import {
10
+ ModelPicker,
11
+ init_ModelPicker,
12
+ init_extraUsage,
13
+ isBilledAsExtraUsage
14
+ } from "./chunk-p8t1v3qw.js";
15
+ import {
16
+ ThemePicker,
17
+ init_ThemePicker
18
+ } from "./chunk-098tvb6a.js";
19
+ import {
20
+ OverageCreditUpsell,
21
+ init_OverageCreditUpsell,
22
+ isEligibleForOverageCreditGrant
23
+ } from "./chunk-d7zmg667.js";
24
+ import {
25
+ SearchBox,
26
+ init_SearchBox,
27
+ init_useSearchInput,
28
+ useSearchInput
29
+ } from "./chunk-1fvkskfd.js";
30
+ import {
31
+ Tab,
32
+ Tabs,
33
+ init_Tabs,
34
+ useTabHeaderFocus
35
+ } from "./chunk-z3hcj5gd.js";
36
+ import {
37
+ fetchUtilization,
38
+ init_usage
39
+ } from "./chunk-pg6ke51s.js";
40
+ import {
41
+ DEFAULT_OUTPUT_STYLE_NAME,
42
+ FAST_MODE_MODEL_DISPLAY,
43
+ OUTPUT_STYLE_CONFIG,
44
+ ProgressBar,
45
+ Select,
46
+ TextInput,
47
+ buildAPIProviderProperties,
48
+ buildAccountProperties,
49
+ buildIDEProperties,
50
+ buildInstallationDiagnostics,
51
+ buildInstallationHealthDiagnostics,
52
+ buildMcpProperties,
53
+ buildMemoryDiagnostics,
54
+ buildSandboxProperties,
55
+ buildSettingSourcesProperties,
56
+ clearFastModeCooldown,
57
+ extraUsage,
58
+ formatCost,
59
+ getAllOutputStyles,
60
+ getCurrentSessionTitle,
61
+ getExternalClaudeMdIncludes,
62
+ getFastModeModel,
63
+ getHardcodedTeammateModelFallback,
64
+ getMemoryFiles,
65
+ getModelDisplayLabel,
66
+ hasAccessToIDEExtensionDiffFeature,
67
+ hasExternalClaudeMdIncludes,
68
+ init_AppState,
69
+ init_CustomSelect,
70
+ init_ProgressBar,
71
+ init_TextInput,
72
+ init_claudemd,
73
+ init_cost_tracker,
74
+ init_extra_usage,
75
+ init_fastMode,
76
+ init_ide,
77
+ init_outputStyles,
78
+ init_permissionSetup,
79
+ init_select,
80
+ init_sessionStorage,
81
+ init_status,
82
+ init_teammateModel,
83
+ isFastModeAvailable,
84
+ isFastModeEnabled,
85
+ isFastModeSupportedByModel,
86
+ isSupportedTerminal,
87
+ transitionPlanAutoMode,
88
+ useAppState,
89
+ useAppStateStore,
90
+ useSetAppState
91
+ } from "./chunk-363p49h1.js";
92
+ import {
93
+ clearCliTeammateModeOverride,
94
+ getCliTeammateModeOverride,
95
+ init_teammateModeSnapshot
96
+ } from "./chunk-t0zcygwt.js";
97
+ import {
98
+ Byline,
99
+ ConfigurableShortcutHint,
100
+ Dialog,
101
+ KeyboardShortcutHint,
102
+ init_Byline,
103
+ init_ConfigurableShortcutHint,
104
+ init_Dialog,
105
+ init_KeyboardShortcutHint
106
+ } from "./chunk-dmqarh6q.js";
107
+ import {
108
+ init_useExitOnCtrlCDWithKeybindings,
109
+ useExitOnCtrlCDWithKeybindings
110
+ } from "./chunk-z9w0ffmw.js";
111
+ import {
112
+ Pane,
113
+ init_Pane,
114
+ init_modalContext,
115
+ init_useKeybinding,
116
+ init_useTerminalSize,
117
+ useIsInsideModal,
118
+ useKeybinding,
119
+ useKeybindings,
120
+ useModalOrTerminalSize,
121
+ useTerminalSize
122
+ } from "./chunk-jxgm95zx.js";
123
+ import {
124
+ ThemedBox_default,
125
+ ThemedText,
126
+ init_fullscreen,
127
+ init_ink,
128
+ isFullscreenEnvEnabled,
129
+ require_compiler_runtime,
130
+ useTerminalFocus,
131
+ useTheme,
132
+ useThemeSetting
133
+ } from "./chunk-nswqqqdd.js";
134
+ import {
135
+ require_jsx_dev_runtime,
136
+ require_react
137
+ } from "./chunk-g338npwr.js";
138
+ import {
139
+ EXTERNAL_PERMISSION_MODES,
140
+ formatAutoUpdaterDisabledReason,
141
+ getAutoUpdaterDisabledReason,
142
+ getCurrentProjectConfig,
143
+ getFeatureValue_CACHED_MAY_BE_STALE,
144
+ getGlobalConfig,
145
+ getInitialSettings,
146
+ getSettingsForSource,
147
+ getSubscriptionType,
148
+ init_PermissionMode,
149
+ init_agentSwarmsEnabled,
150
+ init_auth,
151
+ init_authPortable,
152
+ init_config1 as init_config,
153
+ init_growthbook,
154
+ init_model,
155
+ init_settings1 as init_settings,
156
+ init_source,
157
+ isAgentSwarmsEnabled,
158
+ isExternalPermissionMode,
159
+ isOpus1mMergeEnabled,
160
+ modelDisplayString,
161
+ normalizeApiKeyForConfig,
162
+ permissionModeFromString,
163
+ permissionModeTitle,
164
+ saveGlobalConfig,
165
+ source_default,
166
+ toExternalPermissionMode,
167
+ updateSettingsForSource
168
+ } from "./chunk-skctedsv.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
+ ...[],
1168
+ ...isFileCheckpointingAvailable ? [{
1169
+ id: "fileCheckpointingEnabled",
1170
+ label: "Rewind code (checkpoints)",
1171
+ value: globalConfig.fileCheckpointingEnabled,
1172
+ type: "boolean",
1173
+ onChange(enabled_3) {
1174
+ saveGlobalConfig((current_2) => ({
1175
+ ...current_2,
1176
+ fileCheckpointingEnabled: enabled_3
1177
+ }));
1178
+ setGlobalConfig({
1179
+ ...getGlobalConfig(),
1180
+ fileCheckpointingEnabled: enabled_3
1181
+ });
1182
+ logEvent("tengu_file_history_snapshots_setting_changed", {
1183
+ enabled: enabled_3
1184
+ });
1185
+ }
1186
+ }] : [],
1187
+ {
1188
+ id: "verbose",
1189
+ label: "Verbose output",
1190
+ value: verbose,
1191
+ type: "boolean",
1192
+ onChange: onChangeVerbose
1193
+ },
1194
+ {
1195
+ id: "terminalProgressBarEnabled",
1196
+ label: "Terminal progress bar",
1197
+ value: globalConfig.terminalProgressBarEnabled,
1198
+ type: "boolean",
1199
+ onChange(terminalProgressBarEnabled) {
1200
+ saveGlobalConfig((current_3) => ({
1201
+ ...current_3,
1202
+ terminalProgressBarEnabled
1203
+ }));
1204
+ setGlobalConfig({
1205
+ ...getGlobalConfig(),
1206
+ terminalProgressBarEnabled
1207
+ });
1208
+ logEvent("tengu_terminal_progress_bar_setting_changed", {
1209
+ enabled: terminalProgressBarEnabled
1210
+ });
1211
+ }
1212
+ },
1213
+ ...getFeatureValue_CACHED_MAY_BE_STALE("tengu_terminal_sidebar", false) ? [{
1214
+ id: "showStatusInTerminalTab",
1215
+ label: "Show status in terminal tab",
1216
+ value: globalConfig.showStatusInTerminalTab ?? false,
1217
+ type: "boolean",
1218
+ onChange(showStatusInTerminalTab) {
1219
+ saveGlobalConfig((current_4) => ({
1220
+ ...current_4,
1221
+ showStatusInTerminalTab
1222
+ }));
1223
+ setGlobalConfig({
1224
+ ...getGlobalConfig(),
1225
+ showStatusInTerminalTab
1226
+ });
1227
+ logEvent("tengu_terminal_tab_status_setting_changed", {
1228
+ enabled: showStatusInTerminalTab
1229
+ });
1230
+ }
1231
+ }] : [],
1232
+ {
1233
+ id: "showTurnDuration",
1234
+ label: "Show turn duration",
1235
+ value: globalConfig.showTurnDuration,
1236
+ type: "boolean",
1237
+ onChange(showTurnDuration) {
1238
+ saveGlobalConfig((current_5) => ({
1239
+ ...current_5,
1240
+ showTurnDuration
1241
+ }));
1242
+ setGlobalConfig({
1243
+ ...getGlobalConfig(),
1244
+ showTurnDuration
1245
+ });
1246
+ logEvent("tengu_show_turn_duration_setting_changed", {
1247
+ enabled: showTurnDuration
1248
+ });
1249
+ }
1250
+ },
1251
+ {
1252
+ id: "defaultPermissionMode",
1253
+ label: "Default permission mode",
1254
+ value: settingsData?.permissions?.defaultMode || "default",
1255
+ options: (() => {
1256
+ const priorityOrder = ["default", "plan"];
1257
+ const allModes = EXTERNAL_PERMISSION_MODES;
1258
+ const excluded = ["bypassPermissions"];
1259
+ if (false) {}
1260
+ return [...priorityOrder, ...allModes.filter((m) => !priorityOrder.includes(m) && !excluded.includes(m))];
1261
+ })(),
1262
+ type: "enum",
1263
+ onChange(mode) {
1264
+ const parsedMode = permissionModeFromString(mode);
1265
+ const validatedMode = isExternalPermissionMode(parsedMode) ? toExternalPermissionMode(parsedMode) : parsedMode;
1266
+ const result = updateSettingsForSource("userSettings", {
1267
+ permissions: {
1268
+ ...settingsData?.permissions,
1269
+ defaultMode: validatedMode
1270
+ }
1271
+ });
1272
+ if (result.error) {
1273
+ logError(result.error);
1274
+ return;
1275
+ }
1276
+ setSettingsData((prev_12) => ({
1277
+ ...prev_12,
1278
+ permissions: {
1279
+ ...prev_12?.permissions,
1280
+ defaultMode: validatedMode
1281
+ }
1282
+ }));
1283
+ setChanges((prev_13) => ({
1284
+ ...prev_13,
1285
+ defaultPermissionMode: mode
1286
+ }));
1287
+ logEvent("tengu_config_changed", {
1288
+ setting: "defaultPermissionMode",
1289
+ value: mode
1290
+ });
1291
+ }
1292
+ },
1293
+ ...[],
1294
+ {
1295
+ id: "respectGitignore",
1296
+ label: "Respect .gitignore in file picker",
1297
+ value: globalConfig.respectGitignore,
1298
+ type: "boolean",
1299
+ onChange(respectGitignore) {
1300
+ saveGlobalConfig((current_6) => ({
1301
+ ...current_6,
1302
+ respectGitignore
1303
+ }));
1304
+ setGlobalConfig({
1305
+ ...getGlobalConfig(),
1306
+ respectGitignore
1307
+ });
1308
+ logEvent("tengu_respect_gitignore_setting_changed", {
1309
+ enabled: respectGitignore
1310
+ });
1311
+ }
1312
+ },
1313
+ {
1314
+ id: "copyFullResponse",
1315
+ label: "Always copy full response (skip /copy picker)",
1316
+ value: globalConfig.copyFullResponse,
1317
+ type: "boolean",
1318
+ onChange(copyFullResponse) {
1319
+ saveGlobalConfig((current_7) => ({
1320
+ ...current_7,
1321
+ copyFullResponse
1322
+ }));
1323
+ setGlobalConfig({
1324
+ ...getGlobalConfig(),
1325
+ copyFullResponse
1326
+ });
1327
+ logEvent("tengu_config_changed", {
1328
+ setting: "copyFullResponse",
1329
+ value: String(copyFullResponse)
1330
+ });
1331
+ }
1332
+ },
1333
+ ...isFullscreenEnvEnabled() ? [{
1334
+ id: "copyOnSelect",
1335
+ label: "Copy on select",
1336
+ value: globalConfig.copyOnSelect ?? true,
1337
+ type: "boolean",
1338
+ onChange(copyOnSelect) {
1339
+ saveGlobalConfig((current_8) => ({
1340
+ ...current_8,
1341
+ copyOnSelect
1342
+ }));
1343
+ setGlobalConfig({
1344
+ ...getGlobalConfig(),
1345
+ copyOnSelect
1346
+ });
1347
+ logEvent("tengu_config_changed", {
1348
+ setting: "copyOnSelect",
1349
+ value: String(copyOnSelect)
1350
+ });
1351
+ }
1352
+ }] : [],
1353
+ autoUpdaterDisabledReason ? {
1354
+ id: "autoUpdatesChannel",
1355
+ label: "Auto-update channel",
1356
+ value: "disabled",
1357
+ type: "managedEnum",
1358
+ onChange() {}
1359
+ } : {
1360
+ id: "autoUpdatesChannel",
1361
+ label: "Auto-update channel",
1362
+ value: settingsData?.autoUpdatesChannel ?? "latest",
1363
+ type: "managedEnum",
1364
+ onChange() {}
1365
+ },
1366
+ {
1367
+ id: "theme",
1368
+ label: "Theme",
1369
+ value: themeSetting,
1370
+ type: "managedEnum",
1371
+ onChange: setTheme
1372
+ },
1373
+ {
1374
+ id: "notifChannel",
1375
+ label: "Notifications",
1376
+ value: globalConfig.preferredNotifChannel,
1377
+ options: ["auto", "iterm2", "terminal_bell", "iterm2_with_bell", "kitty", "ghostty", "notifications_disabled"],
1378
+ type: "enum",
1379
+ onChange(notifChannel) {
1380
+ saveGlobalConfig((current_9) => ({
1381
+ ...current_9,
1382
+ preferredNotifChannel: notifChannel
1383
+ }));
1384
+ setGlobalConfig({
1385
+ ...getGlobalConfig(),
1386
+ preferredNotifChannel: notifChannel
1387
+ });
1388
+ }
1389
+ },
1390
+ ...[],
1391
+ {
1392
+ id: "outputStyle",
1393
+ label: "Output style",
1394
+ value: currentOutputStyle,
1395
+ type: "managedEnum",
1396
+ onChange: () => {}
1397
+ },
1398
+ ...showDefaultViewPicker ? [{
1399
+ id: "defaultView",
1400
+ label: "What you see by default",
1401
+ value: settingsData?.defaultView === undefined ? "default" : String(settingsData.defaultView),
1402
+ options: ["transcript", "chat", "default"],
1403
+ type: "enum",
1404
+ onChange(selected) {
1405
+ const defaultView = selected === "default" ? undefined : selected;
1406
+ updateSettingsForSource("localSettings", {
1407
+ defaultView
1408
+ });
1409
+ setSettingsData((prev_17) => ({
1410
+ ...prev_17,
1411
+ defaultView
1412
+ }));
1413
+ const nextBrief = defaultView === "chat";
1414
+ setAppState((prev_18) => {
1415
+ if (prev_18.isBriefOnly === nextBrief)
1416
+ return prev_18;
1417
+ return {
1418
+ ...prev_18,
1419
+ isBriefOnly: nextBrief
1420
+ };
1421
+ });
1422
+ setUserMsgOptIn(nextBrief);
1423
+ setChanges((prev_19) => ({
1424
+ ...prev_19,
1425
+ "Default view": selected
1426
+ }));
1427
+ logEvent("tengu_default_view_setting_changed", {
1428
+ value: defaultView ?? "unset"
1429
+ });
1430
+ }
1431
+ }] : [],
1432
+ {
1433
+ id: "language",
1434
+ label: "Language",
1435
+ value: currentLanguage ?? "Default (English)",
1436
+ type: "managedEnum",
1437
+ onChange: () => {}
1438
+ },
1439
+ {
1440
+ id: "editorMode",
1441
+ label: "Editor mode",
1442
+ value: globalConfig.editorMode === "emacs" ? "normal" : globalConfig.editorMode || "normal",
1443
+ options: ["normal", "vim"],
1444
+ type: "enum",
1445
+ onChange(value_1) {
1446
+ saveGlobalConfig((current_13) => ({
1447
+ ...current_13,
1448
+ editorMode: value_1
1449
+ }));
1450
+ setGlobalConfig({
1451
+ ...getGlobalConfig(),
1452
+ editorMode: value_1
1453
+ });
1454
+ logEvent("tengu_editor_mode_changed", {
1455
+ mode: value_1,
1456
+ source: "config_panel"
1457
+ });
1458
+ }
1459
+ },
1460
+ {
1461
+ id: "prStatusFooterEnabled",
1462
+ label: "Show PR status footer",
1463
+ value: globalConfig.prStatusFooterEnabled ?? true,
1464
+ type: "boolean",
1465
+ onChange(enabled_4) {
1466
+ saveGlobalConfig((current_14) => {
1467
+ if (current_14.prStatusFooterEnabled === enabled_4)
1468
+ return current_14;
1469
+ return {
1470
+ ...current_14,
1471
+ prStatusFooterEnabled: enabled_4
1472
+ };
1473
+ });
1474
+ setGlobalConfig({
1475
+ ...getGlobalConfig(),
1476
+ prStatusFooterEnabled: enabled_4
1477
+ });
1478
+ logEvent("tengu_pr_status_footer_setting_changed", {
1479
+ enabled: enabled_4
1480
+ });
1481
+ }
1482
+ },
1483
+ {
1484
+ id: "model",
1485
+ label: "Model",
1486
+ value: mainLoopModel === null ? "Default (recommended)" : mainLoopModel,
1487
+ type: "managedEnum",
1488
+ onChange: onChangeMainModelConfig
1489
+ },
1490
+ ...isConnectedToIde ? [{
1491
+ id: "diffTool",
1492
+ label: "Diff tool",
1493
+ value: globalConfig.diffTool ?? "auto",
1494
+ options: ["terminal", "auto"],
1495
+ type: "enum",
1496
+ onChange(diffTool) {
1497
+ saveGlobalConfig((current_15) => ({
1498
+ ...current_15,
1499
+ diffTool
1500
+ }));
1501
+ setGlobalConfig({
1502
+ ...getGlobalConfig(),
1503
+ diffTool
1504
+ });
1505
+ logEvent("tengu_diff_tool_changed", {
1506
+ tool: diffTool,
1507
+ source: "config_panel"
1508
+ });
1509
+ }
1510
+ }] : [],
1511
+ ...!isSupportedTerminal() ? [{
1512
+ id: "autoConnectIde",
1513
+ label: "Auto-connect to IDE (external terminal)",
1514
+ value: globalConfig.autoConnectIde ?? false,
1515
+ type: "boolean",
1516
+ onChange(autoConnectIde) {
1517
+ saveGlobalConfig((current_16) => ({
1518
+ ...current_16,
1519
+ autoConnectIde
1520
+ }));
1521
+ setGlobalConfig({
1522
+ ...getGlobalConfig(),
1523
+ autoConnectIde
1524
+ });
1525
+ logEvent("tengu_auto_connect_ide_changed", {
1526
+ enabled: autoConnectIde,
1527
+ source: "config_panel"
1528
+ });
1529
+ }
1530
+ }] : [],
1531
+ ...isSupportedTerminal() ? [{
1532
+ id: "autoInstallIdeExtension",
1533
+ label: "Auto-install IDE extension",
1534
+ value: globalConfig.autoInstallIdeExtension ?? true,
1535
+ type: "boolean",
1536
+ onChange(autoInstallIdeExtension) {
1537
+ saveGlobalConfig((current_17) => ({
1538
+ ...current_17,
1539
+ autoInstallIdeExtension
1540
+ }));
1541
+ setGlobalConfig({
1542
+ ...getGlobalConfig(),
1543
+ autoInstallIdeExtension
1544
+ });
1545
+ logEvent("tengu_auto_install_ide_extension_changed", {
1546
+ enabled: autoInstallIdeExtension,
1547
+ source: "config_panel"
1548
+ });
1549
+ }
1550
+ }] : [],
1551
+ {
1552
+ id: "claudeInChromeDefaultEnabled",
1553
+ label: "Claude in Chrome enabled by default",
1554
+ value: globalConfig.claudeInChromeDefaultEnabled ?? true,
1555
+ type: "boolean",
1556
+ onChange(enabled_5) {
1557
+ saveGlobalConfig((current_18) => ({
1558
+ ...current_18,
1559
+ claudeInChromeDefaultEnabled: enabled_5
1560
+ }));
1561
+ setGlobalConfig({
1562
+ ...getGlobalConfig(),
1563
+ claudeInChromeDefaultEnabled: enabled_5
1564
+ });
1565
+ logEvent("tengu_claude_in_chrome_setting_changed", {
1566
+ enabled: enabled_5
1567
+ });
1568
+ }
1569
+ },
1570
+ ...isAgentSwarmsEnabled() ? (() => {
1571
+ const cliOverride = getCliTeammateModeOverride();
1572
+ const label = cliOverride ? `Teammate mode [overridden: ${cliOverride}]` : "Teammate mode";
1573
+ return [{
1574
+ id: "teammateMode",
1575
+ label,
1576
+ value: globalConfig.teammateMode ?? "auto",
1577
+ options: ["auto", "tmux", "in-process"],
1578
+ type: "enum",
1579
+ onChange(mode_0) {
1580
+ if (mode_0 !== "auto" && mode_0 !== "tmux" && mode_0 !== "in-process") {
1581
+ return;
1582
+ }
1583
+ clearCliTeammateModeOverride(mode_0);
1584
+ saveGlobalConfig((current_19) => ({
1585
+ ...current_19,
1586
+ teammateMode: mode_0
1587
+ }));
1588
+ setGlobalConfig({
1589
+ ...getGlobalConfig(),
1590
+ teammateMode: mode_0
1591
+ });
1592
+ logEvent("tengu_teammate_mode_changed", {
1593
+ mode: mode_0
1594
+ });
1595
+ }
1596
+ }, {
1597
+ id: "teammateDefaultModel",
1598
+ label: "Default teammate model",
1599
+ value: teammateModelDisplayString(globalConfig.teammateDefaultModel),
1600
+ type: "managedEnum",
1601
+ onChange() {}
1602
+ }];
1603
+ })() : [],
1604
+ ...[],
1605
+ ...shouldShowExternalIncludesToggle ? [{
1606
+ id: "showExternalIncludesDialog",
1607
+ label: "External CLAUDE.md includes",
1608
+ value: (() => {
1609
+ const projectConfig = getCurrentProjectConfig();
1610
+ if (projectConfig.hasClaudeMdExternalIncludesApproved) {
1611
+ return "true";
1612
+ } else {
1613
+ return "false";
1614
+ }
1615
+ })(),
1616
+ type: "managedEnum",
1617
+ onChange() {}
1618
+ }] : [],
1619
+ ...process.env.ANTHROPIC_API_KEY && !isRunningOnHomespace() ? [{
1620
+ id: "apiKey",
1621
+ label: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1622
+ children: [
1623
+ "Use custom API key:",
1624
+ " ",
1625
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1626
+ bold: true,
1627
+ children: normalizeApiKeyForConfig(process.env.ANTHROPIC_API_KEY)
1628
+ }, undefined, false, undefined, this)
1629
+ ]
1630
+ }, undefined, true, undefined, this),
1631
+ searchText: "Use custom API key",
1632
+ value: Boolean(process.env.ANTHROPIC_API_KEY && globalConfig.customApiKeyResponses?.approved?.includes(normalizeApiKeyForConfig(process.env.ANTHROPIC_API_KEY))),
1633
+ type: "boolean",
1634
+ onChange(useCustomKey) {
1635
+ saveGlobalConfig((current_22) => {
1636
+ const updated = {
1637
+ ...current_22
1638
+ };
1639
+ if (!updated.customApiKeyResponses) {
1640
+ updated.customApiKeyResponses = {
1641
+ approved: [],
1642
+ rejected: []
1643
+ };
1644
+ }
1645
+ if (!updated.customApiKeyResponses.approved) {
1646
+ updated.customApiKeyResponses = {
1647
+ ...updated.customApiKeyResponses,
1648
+ approved: []
1649
+ };
1650
+ }
1651
+ if (!updated.customApiKeyResponses.rejected) {
1652
+ updated.customApiKeyResponses = {
1653
+ ...updated.customApiKeyResponses,
1654
+ rejected: []
1655
+ };
1656
+ }
1657
+ if (process.env.ANTHROPIC_API_KEY) {
1658
+ const truncatedKey = normalizeApiKeyForConfig(process.env.ANTHROPIC_API_KEY);
1659
+ if (useCustomKey) {
1660
+ updated.customApiKeyResponses = {
1661
+ ...updated.customApiKeyResponses,
1662
+ approved: [...(updated.customApiKeyResponses.approved ?? []).filter((k) => k !== truncatedKey), truncatedKey],
1663
+ rejected: (updated.customApiKeyResponses.rejected ?? []).filter((k_0) => k_0 !== truncatedKey)
1664
+ };
1665
+ } else {
1666
+ updated.customApiKeyResponses = {
1667
+ ...updated.customApiKeyResponses,
1668
+ approved: (updated.customApiKeyResponses.approved ?? []).filter((k_1) => k_1 !== truncatedKey),
1669
+ rejected: [...(updated.customApiKeyResponses.rejected ?? []).filter((k_2) => k_2 !== truncatedKey), truncatedKey]
1670
+ };
1671
+ }
1672
+ }
1673
+ return updated;
1674
+ });
1675
+ setGlobalConfig(getGlobalConfig());
1676
+ }
1677
+ }] : []
1678
+ ];
1679
+ const filteredSettingsItems = React2.useMemo(() => {
1680
+ if (!searchQuery)
1681
+ return settingsItems;
1682
+ const lowerQuery = searchQuery.toLowerCase();
1683
+ return settingsItems.filter((setting) => {
1684
+ if (setting.id.toLowerCase().includes(lowerQuery))
1685
+ return true;
1686
+ const searchableText = "searchText" in setting ? setting.searchText : setting.label;
1687
+ return searchableText.toLowerCase().includes(lowerQuery);
1688
+ });
1689
+ }, [settingsItems, searchQuery]);
1690
+ React2.useEffect(() => {
1691
+ if (selectedIndex >= filteredSettingsItems.length) {
1692
+ const newIndex = Math.max(0, filteredSettingsItems.length - 1);
1693
+ setSelectedIndex(newIndex);
1694
+ setScrollOffset(Math.max(0, newIndex - maxVisible + 1));
1695
+ return;
1696
+ }
1697
+ setScrollOffset((prev_21) => {
1698
+ if (selectedIndex < prev_21)
1699
+ return selectedIndex;
1700
+ if (selectedIndex >= prev_21 + maxVisible)
1701
+ return selectedIndex - maxVisible + 1;
1702
+ return prev_21;
1703
+ });
1704
+ }, [filteredSettingsItems.length, selectedIndex, maxVisible]);
1705
+ const adjustScrollOffset = import_react4.useCallback((newIndex_0) => {
1706
+ setScrollOffset((prev_22) => {
1707
+ if (newIndex_0 < prev_22)
1708
+ return newIndex_0;
1709
+ if (newIndex_0 >= prev_22 + maxVisible)
1710
+ return newIndex_0 - maxVisible + 1;
1711
+ return prev_22;
1712
+ });
1713
+ }, [maxVisible]);
1714
+ const handleSaveAndClose = import_react4.useCallback(() => {
1715
+ if (showSubmenu !== null) {
1716
+ return;
1717
+ }
1718
+ const formattedChanges = Object.entries(changes).map(([key, value_2]) => {
1719
+ logEvent("tengu_config_changed", {
1720
+ key,
1721
+ value: value_2
1722
+ });
1723
+ return `Set ${key} to ${source_default.bold(value_2)}`;
1724
+ });
1725
+ const effectiveApiKey = isRunningOnHomespace() ? undefined : process.env.ANTHROPIC_API_KEY;
1726
+ const initialUsingCustomKey = Boolean(effectiveApiKey && initialConfig.current.customApiKeyResponses?.approved?.includes(normalizeApiKeyForConfig(effectiveApiKey)));
1727
+ const currentUsingCustomKey = Boolean(effectiveApiKey && globalConfig.customApiKeyResponses?.approved?.includes(normalizeApiKeyForConfig(effectiveApiKey)));
1728
+ if (initialUsingCustomKey !== currentUsingCustomKey) {
1729
+ formattedChanges.push(`${currentUsingCustomKey ? "Enabled" : "Disabled"} custom API key`);
1730
+ logEvent("tengu_config_changed", {
1731
+ key: "env.ANTHROPIC_API_KEY",
1732
+ value: currentUsingCustomKey
1733
+ });
1734
+ }
1735
+ if (globalConfig.theme !== initialConfig.current.theme) {
1736
+ formattedChanges.push(`Set theme to ${source_default.bold(globalConfig.theme)}`);
1737
+ }
1738
+ if (globalConfig.preferredNotifChannel !== initialConfig.current.preferredNotifChannel) {
1739
+ formattedChanges.push(`Set notifications to ${source_default.bold(globalConfig.preferredNotifChannel)}`);
1740
+ }
1741
+ if (currentOutputStyle !== initialOutputStyle.current) {
1742
+ formattedChanges.push(`Set output style to ${source_default.bold(currentOutputStyle)}`);
1743
+ }
1744
+ if (currentLanguage !== initialLanguage.current) {
1745
+ formattedChanges.push(`Set response language to ${source_default.bold(currentLanguage ?? "Default (English)")}`);
1746
+ }
1747
+ if (globalConfig.editorMode !== initialConfig.current.editorMode) {
1748
+ formattedChanges.push(`Set editor mode to ${source_default.bold(globalConfig.editorMode || "emacs")}`);
1749
+ }
1750
+ if (globalConfig.diffTool !== initialConfig.current.diffTool) {
1751
+ formattedChanges.push(`Set diff tool to ${source_default.bold(globalConfig.diffTool)}`);
1752
+ }
1753
+ if (globalConfig.autoConnectIde !== initialConfig.current.autoConnectIde) {
1754
+ formattedChanges.push(`${globalConfig.autoConnectIde ? "Enabled" : "Disabled"} auto-connect to IDE`);
1755
+ }
1756
+ if (globalConfig.autoInstallIdeExtension !== initialConfig.current.autoInstallIdeExtension) {
1757
+ formattedChanges.push(`${globalConfig.autoInstallIdeExtension ? "Enabled" : "Disabled"} auto-install IDE extension`);
1758
+ }
1759
+ if (globalConfig.autoCompactEnabled !== initialConfig.current.autoCompactEnabled) {
1760
+ formattedChanges.push(`${globalConfig.autoCompactEnabled ? "Enabled" : "Disabled"} auto-compact`);
1761
+ }
1762
+ if (globalConfig.respectGitignore !== initialConfig.current.respectGitignore) {
1763
+ formattedChanges.push(`${globalConfig.respectGitignore ? "Enabled" : "Disabled"} respect .gitignore in file picker`);
1764
+ }
1765
+ if (globalConfig.copyFullResponse !== initialConfig.current.copyFullResponse) {
1766
+ formattedChanges.push(`${globalConfig.copyFullResponse ? "Enabled" : "Disabled"} always copy full response`);
1767
+ }
1768
+ if (globalConfig.copyOnSelect !== initialConfig.current.copyOnSelect) {
1769
+ formattedChanges.push(`${globalConfig.copyOnSelect ? "Enabled" : "Disabled"} copy on select`);
1770
+ }
1771
+ if (globalConfig.terminalProgressBarEnabled !== initialConfig.current.terminalProgressBarEnabled) {
1772
+ formattedChanges.push(`${globalConfig.terminalProgressBarEnabled ? "Enabled" : "Disabled"} terminal progress bar`);
1773
+ }
1774
+ if (globalConfig.showStatusInTerminalTab !== initialConfig.current.showStatusInTerminalTab) {
1775
+ formattedChanges.push(`${globalConfig.showStatusInTerminalTab ? "Enabled" : "Disabled"} terminal tab status`);
1776
+ }
1777
+ if (globalConfig.showTurnDuration !== initialConfig.current.showTurnDuration) {
1778
+ formattedChanges.push(`${globalConfig.showTurnDuration ? "Enabled" : "Disabled"} turn duration`);
1779
+ }
1780
+ if (globalConfig.remoteControlAtStartup !== initialConfig.current.remoteControlAtStartup) {
1781
+ const remoteLabel = globalConfig.remoteControlAtStartup === undefined ? "Reset Remote Control to default" : `${globalConfig.remoteControlAtStartup ? "Enabled" : "Disabled"} Remote Control for all sessions`;
1782
+ formattedChanges.push(remoteLabel);
1783
+ }
1784
+ if (settingsData?.autoUpdatesChannel !== initialSettingsData.current?.autoUpdatesChannel) {
1785
+ formattedChanges.push(`Set auto-update channel to ${source_default.bold(settingsData?.autoUpdatesChannel ?? "latest")}`);
1786
+ }
1787
+ if (formattedChanges.length > 0) {
1788
+ onClose(formattedChanges.join(`
1789
+ `));
1790
+ } else {
1791
+ onClose("Config dialog dismissed", {
1792
+ display: "system"
1793
+ });
1794
+ }
1795
+ }, [showSubmenu, changes, globalConfig, mainLoopModel, currentOutputStyle, currentLanguage, settingsData?.autoUpdatesChannel, isFastModeEnabled() ? settingsData?.fastMode : undefined, onClose]);
1796
+ const revertChanges = import_react4.useCallback(() => {
1797
+ if (themeSetting !== initialThemeSetting.current) {
1798
+ setTheme(initialThemeSetting.current);
1799
+ }
1800
+ saveGlobalConfig(() => initialConfig.current);
1801
+ const il = initialLocalSettings;
1802
+ updateSettingsForSource("localSettings", {
1803
+ spinnerTipsEnabled: il?.spinnerTipsEnabled,
1804
+ prefersReducedMotion: il?.prefersReducedMotion,
1805
+ defaultView: il?.defaultView,
1806
+ outputStyle: il?.outputStyle
1807
+ });
1808
+ const iu = initialUserSettings;
1809
+ updateSettingsForSource("userSettings", {
1810
+ alwaysThinkingEnabled: iu?.alwaysThinkingEnabled,
1811
+ fastMode: iu?.fastMode,
1812
+ promptSuggestionEnabled: iu?.promptSuggestionEnabled,
1813
+ autoUpdatesChannel: iu?.autoUpdatesChannel,
1814
+ minimumVersion: iu?.minimumVersion,
1815
+ language: iu?.language,
1816
+ ...{},
1817
+ syntaxHighlightingDisabled: iu?.syntaxHighlightingDisabled,
1818
+ permissions: iu?.permissions === undefined ? undefined : {
1819
+ ...iu.permissions,
1820
+ defaultMode: iu.permissions.defaultMode
1821
+ }
1822
+ });
1823
+ const ia = initialAppState;
1824
+ setAppState((prev_23) => ({
1825
+ ...prev_23,
1826
+ mainLoopModel: ia.mainLoopModel,
1827
+ mainLoopModelForSession: ia.mainLoopModelForSession,
1828
+ verbose: ia.verbose,
1829
+ thinkingEnabled: ia.thinkingEnabled,
1830
+ fastMode: ia.fastMode,
1831
+ promptSuggestionEnabled: ia.promptSuggestionEnabled,
1832
+ isBriefOnly: ia.isBriefOnly,
1833
+ replBridgeEnabled: ia.replBridgeEnabled,
1834
+ replBridgeOutboundOnly: ia.replBridgeOutboundOnly,
1835
+ settings: ia.settings,
1836
+ toolPermissionContext: transitionPlanAutoMode(prev_23.toolPermissionContext)
1837
+ }));
1838
+ if (getUserMsgOptIn() !== initialUserMsgOptIn) {
1839
+ setUserMsgOptIn(initialUserMsgOptIn);
1840
+ }
1841
+ }, [themeSetting, setTheme, initialLocalSettings, initialUserSettings, initialAppState, initialUserMsgOptIn, setAppState]);
1842
+ const handleEscape = import_react4.useCallback(() => {
1843
+ if (showSubmenu !== null) {
1844
+ return;
1845
+ }
1846
+ if (isDirty.current) {
1847
+ revertChanges();
1848
+ }
1849
+ onClose("Config dialog dismissed", {
1850
+ display: "system"
1851
+ });
1852
+ }, [showSubmenu, revertChanges, onClose]);
1853
+ useKeybinding("confirm:no", handleEscape, {
1854
+ context: "Settings",
1855
+ isActive: showSubmenu === null && !isSearchMode && !headerFocused
1856
+ });
1857
+ useKeybinding("settings:close", handleSaveAndClose, {
1858
+ context: "Settings",
1859
+ isActive: showSubmenu === null && !isSearchMode && !headerFocused
1860
+ });
1861
+ const toggleSetting = import_react4.useCallback(() => {
1862
+ const setting_0 = filteredSettingsItems[selectedIndex];
1863
+ if (!setting_0 || !setting_0.onChange) {
1864
+ return;
1865
+ }
1866
+ if (setting_0.type === "boolean") {
1867
+ isDirty.current = true;
1868
+ setting_0.onChange(!setting_0.value);
1869
+ if (setting_0.id === "thinkingEnabled") {
1870
+ const newValue = !setting_0.value;
1871
+ const backToInitial = newValue === initialThinkingEnabled.current;
1872
+ if (backToInitial) {
1873
+ setShowThinkingWarning(false);
1874
+ } else if (context.messages.some((m_0) => m_0.type === "assistant")) {
1875
+ setShowThinkingWarning(true);
1876
+ }
1877
+ }
1878
+ return;
1879
+ }
1880
+ 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") {
1881
+ switch (setting_0.id) {
1882
+ case "theme":
1883
+ setShowSubmenu("Theme");
1884
+ setTabsHidden(true);
1885
+ return;
1886
+ case "model":
1887
+ setShowSubmenu("Model");
1888
+ setTabsHidden(true);
1889
+ return;
1890
+ case "teammateDefaultModel":
1891
+ setShowSubmenu("TeammateModel");
1892
+ setTabsHidden(true);
1893
+ return;
1894
+ case "showExternalIncludesDialog":
1895
+ setShowSubmenu("ExternalIncludes");
1896
+ setTabsHidden(true);
1897
+ return;
1898
+ case "outputStyle":
1899
+ setShowSubmenu("OutputStyle");
1900
+ setTabsHidden(true);
1901
+ return;
1902
+ case "language":
1903
+ setShowSubmenu("Language");
1904
+ setTabsHidden(true);
1905
+ return;
1906
+ }
1907
+ }
1908
+ if (setting_0.id === "autoUpdatesChannel") {
1909
+ if (autoUpdaterDisabledReason) {
1910
+ setShowSubmenu("EnableAutoUpdates");
1911
+ setTabsHidden(true);
1912
+ return;
1913
+ }
1914
+ const currentChannel = settingsData?.autoUpdatesChannel ?? "latest";
1915
+ if (currentChannel === "latest") {
1916
+ setShowSubmenu("ChannelDowngrade");
1917
+ setTabsHidden(true);
1918
+ } else {
1919
+ isDirty.current = true;
1920
+ updateSettingsForSource("userSettings", {
1921
+ autoUpdatesChannel: "latest",
1922
+ minimumVersion: undefined
1923
+ });
1924
+ setSettingsData((prev_24) => ({
1925
+ ...prev_24,
1926
+ autoUpdatesChannel: "latest",
1927
+ minimumVersion: undefined
1928
+ }));
1929
+ logEvent("tengu_autoupdate_channel_changed", {
1930
+ channel: "latest"
1931
+ });
1932
+ }
1933
+ return;
1934
+ }
1935
+ if (setting_0.type === "enum") {
1936
+ isDirty.current = true;
1937
+ const currentIndex = setting_0.options.indexOf(setting_0.value);
1938
+ const nextIndex = (currentIndex + 1) % setting_0.options.length;
1939
+ setting_0.onChange(setting_0.options[nextIndex]);
1940
+ return;
1941
+ }
1942
+ }, [autoUpdaterDisabledReason, filteredSettingsItems, selectedIndex, settingsData?.autoUpdatesChannel, setTabsHidden]);
1943
+ const moveSelection = (delta) => {
1944
+ setShowThinkingWarning(false);
1945
+ const newIndex_1 = Math.max(0, Math.min(filteredSettingsItems.length - 1, selectedIndex + delta));
1946
+ setSelectedIndex(newIndex_1);
1947
+ adjustScrollOffset(newIndex_1);
1948
+ };
1949
+ useKeybindings({
1950
+ "select:previous": () => {
1951
+ if (selectedIndex === 0) {
1952
+ setShowThinkingWarning(false);
1953
+ setIsSearchMode(true);
1954
+ setScrollOffset(0);
1955
+ } else {
1956
+ moveSelection(-1);
1957
+ }
1958
+ },
1959
+ "select:next": () => moveSelection(1),
1960
+ "scroll:lineUp": () => moveSelection(-1),
1961
+ "scroll:lineDown": () => moveSelection(1),
1962
+ "select:accept": toggleSetting,
1963
+ "settings:search": () => {
1964
+ setIsSearchMode(true);
1965
+ setSearchQuery("");
1966
+ }
1967
+ }, {
1968
+ context: "Settings",
1969
+ isActive: showSubmenu === null && !isSearchMode && !headerFocused
1970
+ });
1971
+ const handleKeyDown = import_react4.useCallback((e) => {
1972
+ if (showSubmenu !== null)
1973
+ return;
1974
+ if (headerFocused)
1975
+ return;
1976
+ if (isSearchMode) {
1977
+ if (e.key === "escape") {
1978
+ e.preventDefault();
1979
+ if (searchQuery.length > 0) {
1980
+ setSearchQuery("");
1981
+ } else {
1982
+ setIsSearchMode(false);
1983
+ }
1984
+ return;
1985
+ }
1986
+ if (e.key === "return" || e.key === "down" || e.key === "wheeldown") {
1987
+ e.preventDefault();
1988
+ setIsSearchMode(false);
1989
+ setSelectedIndex(0);
1990
+ setScrollOffset(0);
1991
+ }
1992
+ return;
1993
+ }
1994
+ if (e.key === "left" || e.key === "right" || e.key === "tab") {
1995
+ e.preventDefault();
1996
+ toggleSetting();
1997
+ return;
1998
+ }
1999
+ if (e.ctrl || e.meta)
2000
+ return;
2001
+ if (e.key === "j" || e.key === "k" || e.key === "/")
2002
+ return;
2003
+ if (e.key.length === 1 && e.key !== " ") {
2004
+ e.preventDefault();
2005
+ setIsSearchMode(true);
2006
+ setSearchQuery(e.key);
2007
+ }
2008
+ }, [showSubmenu, headerFocused, isSearchMode, searchQuery, setSearchQuery, toggleSetting]);
2009
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2010
+ flexDirection: "column",
2011
+ width: "100%",
2012
+ tabIndex: 0,
2013
+ autoFocus: true,
2014
+ onKeyDown: handleKeyDown,
2015
+ children: showSubmenu === "Theme" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2016
+ children: [
2017
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemePicker, {
2018
+ onThemeSelect: (setting_1) => {
2019
+ isDirty.current = true;
2020
+ setTheme(setting_1);
2021
+ setShowSubmenu(null);
2022
+ setTabsHidden(false);
2023
+ },
2024
+ onCancel: () => {
2025
+ setShowSubmenu(null);
2026
+ setTabsHidden(false);
2027
+ },
2028
+ hideEscToCancel: true,
2029
+ skipExitHandling: true
2030
+ }, undefined, false, undefined, this),
2031
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2032
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2033
+ dimColor: true,
2034
+ italic: true,
2035
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2036
+ children: [
2037
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2038
+ shortcut: "Enter",
2039
+ action: "select"
2040
+ }, undefined, false, undefined, this),
2041
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2042
+ action: "confirm:no",
2043
+ context: "Confirmation",
2044
+ fallback: "Esc",
2045
+ description: "cancel"
2046
+ }, undefined, false, undefined, this)
2047
+ ]
2048
+ }, undefined, true, undefined, this)
2049
+ }, undefined, false, undefined, this)
2050
+ }, undefined, false, undefined, this)
2051
+ ]
2052
+ }, undefined, true, undefined, this) : showSubmenu === "Model" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2053
+ children: [
2054
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ModelPicker, {
2055
+ initial: mainLoopModel,
2056
+ onSelect: (model_0, _effort) => {
2057
+ isDirty.current = true;
2058
+ onChangeMainModelConfig(model_0);
2059
+ setShowSubmenu(null);
2060
+ setTabsHidden(false);
2061
+ },
2062
+ onCancel: () => {
2063
+ setShowSubmenu(null);
2064
+ setTabsHidden(false);
2065
+ },
2066
+ showFastModeNotice: isFastModeEnabled() ? isFastMode && isFastModeSupportedByModel(mainLoopModel) && isFastModeAvailable() : false
2067
+ }, undefined, false, undefined, this),
2068
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2069
+ dimColor: true,
2070
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2071
+ children: [
2072
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2073
+ shortcut: "Enter",
2074
+ action: "confirm"
2075
+ }, undefined, false, undefined, this),
2076
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2077
+ action: "confirm:no",
2078
+ context: "Confirmation",
2079
+ fallback: "Esc",
2080
+ description: "cancel"
2081
+ }, undefined, false, undefined, this)
2082
+ ]
2083
+ }, undefined, true, undefined, this)
2084
+ }, undefined, false, undefined, this)
2085
+ ]
2086
+ }, undefined, true, undefined, this) : showSubmenu === "TeammateModel" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2087
+ children: [
2088
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ModelPicker, {
2089
+ initial: globalConfig.teammateDefaultModel ?? null,
2090
+ skipSettingsWrite: true,
2091
+ headerText: "Default model for newly spawned teammates. The leader can override via the tool call's model parameter.",
2092
+ onSelect: (model_1, _effort_0) => {
2093
+ setShowSubmenu(null);
2094
+ setTabsHidden(false);
2095
+ if (globalConfig.teammateDefaultModel === undefined && model_1 === null) {
2096
+ return;
2097
+ }
2098
+ isDirty.current = true;
2099
+ saveGlobalConfig((current_23) => current_23.teammateDefaultModel === model_1 ? current_23 : {
2100
+ ...current_23,
2101
+ teammateDefaultModel: model_1
2102
+ });
2103
+ setGlobalConfig({
2104
+ ...getGlobalConfig(),
2105
+ teammateDefaultModel: model_1
2106
+ });
2107
+ setChanges((prev_25) => ({
2108
+ ...prev_25,
2109
+ teammateDefaultModel: teammateModelDisplayString(model_1)
2110
+ }));
2111
+ logEvent("tengu_teammate_default_model_changed", {
2112
+ model: model_1
2113
+ });
2114
+ },
2115
+ onCancel: () => {
2116
+ setShowSubmenu(null);
2117
+ setTabsHidden(false);
2118
+ }
2119
+ }, undefined, false, undefined, this),
2120
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2121
+ dimColor: true,
2122
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2123
+ children: [
2124
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2125
+ shortcut: "Enter",
2126
+ action: "confirm"
2127
+ }, undefined, false, undefined, this),
2128
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2129
+ action: "confirm:no",
2130
+ context: "Confirmation",
2131
+ fallback: "Esc",
2132
+ description: "cancel"
2133
+ }, undefined, false, undefined, this)
2134
+ ]
2135
+ }, undefined, true, undefined, this)
2136
+ }, undefined, false, undefined, this)
2137
+ ]
2138
+ }, undefined, true, undefined, this) : showSubmenu === "ExternalIncludes" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2139
+ children: [
2140
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ClaudeMdExternalIncludesDialog, {
2141
+ onDone: () => {
2142
+ setShowSubmenu(null);
2143
+ setTabsHidden(false);
2144
+ },
2145
+ externalIncludes: getExternalClaudeMdIncludes(memoryFiles)
2146
+ }, undefined, false, undefined, this),
2147
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2148
+ dimColor: true,
2149
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2150
+ children: [
2151
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2152
+ shortcut: "Enter",
2153
+ action: "confirm"
2154
+ }, undefined, false, undefined, this),
2155
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2156
+ action: "confirm:no",
2157
+ context: "Confirmation",
2158
+ fallback: "Esc",
2159
+ description: "disable external includes"
2160
+ }, undefined, false, undefined, this)
2161
+ ]
2162
+ }, undefined, true, undefined, this)
2163
+ }, undefined, false, undefined, this)
2164
+ ]
2165
+ }, undefined, true, undefined, this) : showSubmenu === "OutputStyle" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2166
+ children: [
2167
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(OutputStylePicker, {
2168
+ initialStyle: currentOutputStyle,
2169
+ onComplete: (style) => {
2170
+ isDirty.current = true;
2171
+ setCurrentOutputStyle(style ?? DEFAULT_OUTPUT_STYLE_NAME);
2172
+ setShowSubmenu(null);
2173
+ setTabsHidden(false);
2174
+ updateSettingsForSource("localSettings", {
2175
+ outputStyle: style
2176
+ });
2177
+ logEvent("tengu_output_style_changed", {
2178
+ style: style ?? DEFAULT_OUTPUT_STYLE_NAME,
2179
+ source: "config_panel",
2180
+ settings_source: "localSettings"
2181
+ });
2182
+ },
2183
+ onCancel: () => {
2184
+ setShowSubmenu(null);
2185
+ setTabsHidden(false);
2186
+ }
2187
+ }, undefined, false, undefined, this),
2188
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2189
+ dimColor: true,
2190
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2191
+ children: [
2192
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2193
+ shortcut: "Enter",
2194
+ action: "confirm"
2195
+ }, undefined, false, undefined, this),
2196
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2197
+ action: "confirm:no",
2198
+ context: "Confirmation",
2199
+ fallback: "Esc",
2200
+ description: "cancel"
2201
+ }, undefined, false, undefined, this)
2202
+ ]
2203
+ }, undefined, true, undefined, this)
2204
+ }, undefined, false, undefined, this)
2205
+ ]
2206
+ }, undefined, true, undefined, this) : showSubmenu === "Language" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2207
+ children: [
2208
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(LanguagePicker, {
2209
+ initialLanguage: currentLanguage,
2210
+ onComplete: (language) => {
2211
+ isDirty.current = true;
2212
+ setCurrentLanguage(language);
2213
+ setShowSubmenu(null);
2214
+ setTabsHidden(false);
2215
+ updateSettingsForSource("userSettings", {
2216
+ language
2217
+ });
2218
+ logEvent("tengu_language_changed", {
2219
+ language: language ?? "default",
2220
+ source: "config_panel"
2221
+ });
2222
+ },
2223
+ onCancel: () => {
2224
+ setShowSubmenu(null);
2225
+ setTabsHidden(false);
2226
+ }
2227
+ }, undefined, false, undefined, this),
2228
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2229
+ dimColor: true,
2230
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2231
+ children: [
2232
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2233
+ shortcut: "Enter",
2234
+ action: "confirm"
2235
+ }, undefined, false, undefined, this),
2236
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2237
+ action: "confirm:no",
2238
+ context: "Settings",
2239
+ fallback: "Esc",
2240
+ description: "cancel"
2241
+ }, undefined, false, undefined, this)
2242
+ ]
2243
+ }, undefined, true, undefined, this)
2244
+ }, undefined, false, undefined, this)
2245
+ ]
2246
+ }, undefined, true, undefined, this) : showSubmenu === "EnableAutoUpdates" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
2247
+ title: "Enable Auto-Updates",
2248
+ onCancel: () => {
2249
+ setShowSubmenu(null);
2250
+ setTabsHidden(false);
2251
+ },
2252
+ hideBorder: true,
2253
+ hideInputGuide: true,
2254
+ children: autoUpdaterDisabledReason?.type !== "config" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2255
+ children: [
2256
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2257
+ children: autoUpdaterDisabledReason?.type === "env" ? "Auto-updates are controlled by an environment variable and cannot be changed here." : "Auto-updates are disabled in development builds."
2258
+ }, undefined, false, undefined, this),
2259
+ autoUpdaterDisabledReason?.type === "env" && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2260
+ dimColor: true,
2261
+ children: [
2262
+ "Unset ",
2263
+ autoUpdaterDisabledReason.envVar,
2264
+ " to re-enable auto-updates."
2265
+ ]
2266
+ }, undefined, true, undefined, this)
2267
+ ]
2268
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Select, {
2269
+ options: [{
2270
+ label: "Enable with latest channel",
2271
+ value: "latest"
2272
+ }, {
2273
+ label: "Enable with stable channel",
2274
+ value: "stable"
2275
+ }],
2276
+ onChange: (channel) => {
2277
+ isDirty.current = true;
2278
+ setShowSubmenu(null);
2279
+ setTabsHidden(false);
2280
+ saveGlobalConfig((current_24) => ({
2281
+ ...current_24,
2282
+ autoUpdates: true
2283
+ }));
2284
+ setGlobalConfig({
2285
+ ...getGlobalConfig(),
2286
+ autoUpdates: true
2287
+ });
2288
+ updateSettingsForSource("userSettings", {
2289
+ autoUpdatesChannel: channel,
2290
+ minimumVersion: undefined
2291
+ });
2292
+ setSettingsData((prev_26) => ({
2293
+ ...prev_26,
2294
+ autoUpdatesChannel: channel,
2295
+ minimumVersion: undefined
2296
+ }));
2297
+ logEvent("tengu_autoupdate_enabled", {
2298
+ channel
2299
+ });
2300
+ }
2301
+ }, undefined, false, undefined, this)
2302
+ }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ChannelDowngradeDialog, {
2303
+ currentVersion: "2.1.888",
2304
+ onChoice: (choice) => {
2305
+ setShowSubmenu(null);
2306
+ setTabsHidden(false);
2307
+ if (choice === "cancel") {
2308
+ return;
2309
+ }
2310
+ isDirty.current = true;
2311
+ const newSettings = {
2312
+ autoUpdatesChannel: "stable"
2313
+ };
2314
+ if (choice === "stay") {
2315
+ newSettings.minimumVersion = "2.1.888";
2316
+ }
2317
+ updateSettingsForSource("userSettings", newSettings);
2318
+ setSettingsData((prev_27) => ({
2319
+ ...prev_27,
2320
+ ...newSettings
2321
+ }));
2322
+ logEvent("tengu_autoupdate_channel_changed", {
2323
+ channel: "stable",
2324
+ minimum_version_set: choice === "stay"
2325
+ });
2326
+ }
2327
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2328
+ flexDirection: "column",
2329
+ gap: 1,
2330
+ marginY: insideModal ? undefined : 1,
2331
+ children: [
2332
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SearchBox, {
2333
+ query: searchQuery,
2334
+ isFocused: isSearchMode && !headerFocused,
2335
+ isTerminalFocused,
2336
+ cursorOffset: searchCursorOffset,
2337
+ placeholder: "Search settings\u2026"
2338
+ }, undefined, false, undefined, this),
2339
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2340
+ flexDirection: "column",
2341
+ children: filteredSettingsItems.length === 0 ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2342
+ dimColor: true,
2343
+ italic: true,
2344
+ children: [
2345
+ 'No settings match "',
2346
+ searchQuery,
2347
+ '"'
2348
+ ]
2349
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2350
+ children: [
2351
+ scrollOffset > 0 && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2352
+ dimColor: true,
2353
+ children: [
2354
+ figures_default.arrowUp,
2355
+ " ",
2356
+ scrollOffset,
2357
+ " more above"
2358
+ ]
2359
+ }, undefined, true, undefined, this),
2360
+ filteredSettingsItems.slice(scrollOffset, scrollOffset + maxVisible).map((setting_2, i) => {
2361
+ const actualIndex = scrollOffset + i;
2362
+ const isSelected = actualIndex === selectedIndex && !headerFocused && !isSearchMode;
2363
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(React2.Fragment, {
2364
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2365
+ children: [
2366
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2367
+ width: 44,
2368
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2369
+ color: isSelected ? "suggestion" : undefined,
2370
+ children: [
2371
+ isSelected ? figures_default.pointer : " ",
2372
+ " ",
2373
+ setting_2.label
2374
+ ]
2375
+ }, undefined, true, undefined, this)
2376
+ }, undefined, false, undefined, this),
2377
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2378
+ children: setting_2.type === "boolean" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
2379
+ children: [
2380
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2381
+ color: isSelected ? "suggestion" : undefined,
2382
+ children: setting_2.value.toString()
2383
+ }, undefined, false, undefined, this),
2384
+ showThinkingWarning && setting_2.id === "thinkingEnabled" && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2385
+ color: "warning",
2386
+ children: [
2387
+ " ",
2388
+ "Changing thinking mode mid-conversation will increase latency and may reduce quality."
2389
+ ]
2390
+ }, undefined, true, undefined, this)
2391
+ ]
2392
+ }, undefined, true, undefined, this) : setting_2.id === "theme" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2393
+ color: isSelected ? "suggestion" : undefined,
2394
+ children: THEME_LABELS[setting_2.value.toString()] ?? setting_2.value.toString()
2395
+ }, undefined, false, undefined, this) : setting_2.id === "notifChannel" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2396
+ color: isSelected ? "suggestion" : undefined,
2397
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(NotifChannelLabel, {
2398
+ value: setting_2.value.toString()
2399
+ }, undefined, false, undefined, this)
2400
+ }, undefined, false, undefined, this) : setting_2.id === "defaultPermissionMode" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2401
+ color: isSelected ? "suggestion" : undefined,
2402
+ children: permissionModeTitle(setting_2.value)
2403
+ }, undefined, false, undefined, this) : setting_2.id === "autoUpdatesChannel" && autoUpdaterDisabledReason ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
2404
+ flexDirection: "column",
2405
+ children: [
2406
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2407
+ color: isSelected ? "suggestion" : undefined,
2408
+ children: "disabled"
2409
+ }, undefined, false, undefined, this),
2410
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2411
+ dimColor: true,
2412
+ children: [
2413
+ "(",
2414
+ formatAutoUpdaterDisabledReason(autoUpdaterDisabledReason),
2415
+ ")"
2416
+ ]
2417
+ }, undefined, true, undefined, this)
2418
+ ]
2419
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2420
+ color: isSelected ? "suggestion" : undefined,
2421
+ children: setting_2.value.toString()
2422
+ }, undefined, false, undefined, this)
2423
+ }, isSelected ? "selected" : "unselected", false, undefined, this)
2424
+ ]
2425
+ }, undefined, true, undefined, this)
2426
+ }, setting_2.id, false, undefined, this);
2427
+ }),
2428
+ scrollOffset + maxVisible < filteredSettingsItems.length && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2429
+ dimColor: true,
2430
+ children: [
2431
+ figures_default.arrowDown,
2432
+ " ",
2433
+ filteredSettingsItems.length - scrollOffset - maxVisible,
2434
+ " ",
2435
+ "more below"
2436
+ ]
2437
+ }, undefined, true, undefined, this)
2438
+ ]
2439
+ }, undefined, true, undefined, this)
2440
+ }, undefined, false, undefined, this),
2441
+ headerFocused ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2442
+ dimColor: true,
2443
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2444
+ children: [
2445
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2446
+ shortcut: "\u2190/\u2192 tab",
2447
+ action: "switch"
2448
+ }, undefined, false, undefined, this),
2449
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2450
+ shortcut: "\u2193",
2451
+ action: "return"
2452
+ }, undefined, false, undefined, this),
2453
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2454
+ action: "confirm:no",
2455
+ context: "Settings",
2456
+ fallback: "Esc",
2457
+ description: "close"
2458
+ }, undefined, false, undefined, this)
2459
+ ]
2460
+ }, undefined, true, undefined, this)
2461
+ }, undefined, false, undefined, this) : isSearchMode ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2462
+ dimColor: true,
2463
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2464
+ children: [
2465
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2466
+ children: "Type to filter"
2467
+ }, undefined, false, undefined, this),
2468
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2469
+ shortcut: "Enter/\u2193",
2470
+ action: "select"
2471
+ }, undefined, false, undefined, this),
2472
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(KeyboardShortcutHint, {
2473
+ shortcut: "\u2191",
2474
+ action: "tabs"
2475
+ }, undefined, false, undefined, this),
2476
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2477
+ action: "confirm:no",
2478
+ context: "Settings",
2479
+ fallback: "Esc",
2480
+ description: "clear"
2481
+ }, undefined, false, undefined, this)
2482
+ ]
2483
+ }, undefined, true, undefined, this)
2484
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2485
+ dimColor: true,
2486
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Byline, {
2487
+ children: [
2488
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2489
+ action: "select:accept",
2490
+ context: "Settings",
2491
+ fallback: "Space",
2492
+ description: "change"
2493
+ }, undefined, false, undefined, this),
2494
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2495
+ action: "settings:close",
2496
+ context: "Settings",
2497
+ fallback: "Enter",
2498
+ description: "save"
2499
+ }, undefined, false, undefined, this),
2500
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2501
+ action: "settings:search",
2502
+ context: "Settings",
2503
+ fallback: "/",
2504
+ description: "search"
2505
+ }, undefined, false, undefined, this),
2506
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ConfigurableShortcutHint, {
2507
+ action: "confirm:no",
2508
+ context: "Settings",
2509
+ fallback: "Esc",
2510
+ description: "cancel"
2511
+ }, undefined, false, undefined, this)
2512
+ ]
2513
+ }, undefined, true, undefined, this)
2514
+ }, undefined, false, undefined, this)
2515
+ ]
2516
+ }, undefined, true, undefined, this)
2517
+ }, undefined, false, undefined, this);
2518
+ }
2519
+ function teammateModelDisplayString(value) {
2520
+ if (value === undefined) {
2521
+ return modelDisplayString(getHardcodedTeammateModelFallback());
2522
+ }
2523
+ if (value === null)
2524
+ return "Default (leader's model)";
2525
+ return modelDisplayString(value);
2526
+ }
2527
+ function NotifChannelLabel(t0) {
2528
+ const $ = import_compiler_runtime5.c(4);
2529
+ const {
2530
+ value
2531
+ } = t0;
2532
+ switch (value) {
2533
+ case "auto": {
2534
+ return "Auto";
2535
+ }
2536
+ case "iterm2": {
2537
+ let t1;
2538
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
2539
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2540
+ children: [
2541
+ "iTerm2 ",
2542
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2543
+ dimColor: true,
2544
+ children: "(OSC 9)"
2545
+ }, undefined, false, undefined, this)
2546
+ ]
2547
+ }, undefined, true, undefined, this);
2548
+ $[0] = t1;
2549
+ } else {
2550
+ t1 = $[0];
2551
+ }
2552
+ return t1;
2553
+ }
2554
+ case "terminal_bell": {
2555
+ let t1;
2556
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
2557
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2558
+ children: [
2559
+ "Terminal Bell ",
2560
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2561
+ dimColor: true,
2562
+ children: "(\\a)"
2563
+ }, undefined, false, undefined, this)
2564
+ ]
2565
+ }, undefined, true, undefined, this);
2566
+ $[1] = t1;
2567
+ } else {
2568
+ t1 = $[1];
2569
+ }
2570
+ return t1;
2571
+ }
2572
+ case "kitty": {
2573
+ let t1;
2574
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
2575
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2576
+ children: [
2577
+ "Kitty ",
2578
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2579
+ dimColor: true,
2580
+ children: "(OSC 99)"
2581
+ }, undefined, false, undefined, this)
2582
+ ]
2583
+ }, undefined, true, undefined, this);
2584
+ $[2] = t1;
2585
+ } else {
2586
+ t1 = $[2];
2587
+ }
2588
+ return t1;
2589
+ }
2590
+ case "ghostty": {
2591
+ let t1;
2592
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
2593
+ t1 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2594
+ children: [
2595
+ "Ghostty ",
2596
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
2597
+ dimColor: true,
2598
+ children: "(OSC 777)"
2599
+ }, undefined, false, undefined, this)
2600
+ ]
2601
+ }, undefined, true, undefined, this);
2602
+ $[3] = t1;
2603
+ } else {
2604
+ t1 = $[3];
2605
+ }
2606
+ return t1;
2607
+ }
2608
+ case "iterm2_with_bell": {
2609
+ return "iTerm2 w/ Bell";
2610
+ }
2611
+ case "notifications_disabled": {
2612
+ return "Disabled";
2613
+ }
2614
+ default: {
2615
+ return value;
2616
+ }
2617
+ }
2618
+ }
2619
+ var import_compiler_runtime5, React2, import_react4, jsx_dev_runtime5, THEME_LABELS;
2620
+ var init_Config = __esm(() => {
2621
+ init_ink();
2622
+ init_useKeybinding();
2623
+ init_figures();
2624
+ init_config();
2625
+ init_authPortable();
2626
+ init_config();
2627
+ init_source();
2628
+ init_PermissionMode();
2629
+ init_permissionSetup();
2630
+ init_log();
2631
+ init_analytics();
2632
+ init_bridgeEnabled();
2633
+ init_ThemePicker();
2634
+ init_AppState();
2635
+ init_ModelPicker();
2636
+ init_model();
2637
+ init_extraUsage();
2638
+ init_ClaudeMdExternalIncludesDialog();
2639
+ init_ChannelDowngradeDialog();
2640
+ init_Dialog();
2641
+ init_CustomSelect();
2642
+ init_OutputStylePicker();
2643
+ init_LanguagePicker();
2644
+ init_claudemd();
2645
+ init_KeyboardShortcutHint();
2646
+ init_ConfigurableShortcutHint();
2647
+ init_Byline();
2648
+ init_Tabs();
2649
+ init_modalContext();
2650
+ init_SearchBox();
2651
+ init_ide();
2652
+ init_settings();
2653
+ init_state();
2654
+ init_outputStyles();
2655
+ init_envUtils();
2656
+ init_growthbook();
2657
+ init_agentSwarmsEnabled();
2658
+ init_teammateModeSnapshot();
2659
+ init_teammateModel();
2660
+ init_useSearchInput();
2661
+ init_useTerminalSize();
2662
+ init_fastMode();
2663
+ init_fullscreen();
2664
+ import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
2665
+ React2 = __toESM(require_react(), 1);
2666
+ import_react4 = __toESM(require_react(), 1);
2667
+ jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
2668
+ THEME_LABELS = {
2669
+ auto: "Auto (match terminal)",
2670
+ dark: "Dark mode",
2671
+ light: "Light mode",
2672
+ "dark-daltonized": "Dark mode (colorblind-friendly)",
2673
+ "light-daltonized": "Light mode (colorblind-friendly)",
2674
+ "dark-ansi": "Dark mode (ANSI colors only)",
2675
+ "light-ansi": "Light mode (ANSI colors only)"
2676
+ };
2677
+ });
2678
+
2679
+ // src/components/Settings/Usage.tsx
2680
+ function LimitBar(t0) {
2681
+ const $ = import_compiler_runtime6.c(34);
2682
+ const {
2683
+ title,
2684
+ limit,
2685
+ maxWidth,
2686
+ showTimeInReset: t1,
2687
+ extraSubtext
2688
+ } = t0;
2689
+ const showTimeInReset = t1 === undefined ? true : t1;
2690
+ const {
2691
+ utilization,
2692
+ resets_at
2693
+ } = limit;
2694
+ if (utilization === null) {
2695
+ return null;
2696
+ }
2697
+ const usedText = `${Math.floor(utilization)}% used`;
2698
+ let subtext;
2699
+ if (resets_at) {
2700
+ let t2;
2701
+ if ($[0] !== resets_at || $[1] !== showTimeInReset) {
2702
+ t2 = formatResetText(resets_at, true, showTimeInReset);
2703
+ $[0] = resets_at;
2704
+ $[1] = showTimeInReset;
2705
+ $[2] = t2;
2706
+ } else {
2707
+ t2 = $[2];
2708
+ }
2709
+ subtext = `Resets ${t2}`;
2710
+ }
2711
+ if (extraSubtext) {
2712
+ if (subtext) {
2713
+ subtext = `${extraSubtext} \xB7 ${subtext}`;
2714
+ } else {
2715
+ subtext = extraSubtext;
2716
+ }
2717
+ }
2718
+ if (maxWidth >= 62) {
2719
+ let t2;
2720
+ if ($[3] !== title) {
2721
+ t2 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2722
+ bold: true,
2723
+ children: title
2724
+ }, undefined, false, undefined, this);
2725
+ $[3] = title;
2726
+ $[4] = t2;
2727
+ } else {
2728
+ t2 = $[4];
2729
+ }
2730
+ const t3 = utilization / 100;
2731
+ let t4;
2732
+ if ($[5] !== t3) {
2733
+ t4 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ProgressBar, {
2734
+ ratio: t3,
2735
+ width: 50,
2736
+ fillColor: "rate_limit_fill",
2737
+ emptyColor: "rate_limit_empty"
2738
+ }, undefined, false, undefined, this);
2739
+ $[5] = t3;
2740
+ $[6] = t4;
2741
+ } else {
2742
+ t4 = $[6];
2743
+ }
2744
+ let t5;
2745
+ if ($[7] !== usedText) {
2746
+ t5 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2747
+ children: usedText
2748
+ }, undefined, false, undefined, this);
2749
+ $[7] = usedText;
2750
+ $[8] = t5;
2751
+ } else {
2752
+ t5 = $[8];
2753
+ }
2754
+ let t6;
2755
+ if ($[9] !== t4 || $[10] !== t5) {
2756
+ t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2757
+ flexDirection: "row",
2758
+ gap: 1,
2759
+ children: [
2760
+ t4,
2761
+ t5
2762
+ ]
2763
+ }, undefined, true, undefined, this);
2764
+ $[9] = t4;
2765
+ $[10] = t5;
2766
+ $[11] = t6;
2767
+ } else {
2768
+ t6 = $[11];
2769
+ }
2770
+ let t7;
2771
+ if ($[12] !== subtext) {
2772
+ t7 = subtext && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2773
+ dimColor: true,
2774
+ children: subtext
2775
+ }, undefined, false, undefined, this);
2776
+ $[12] = subtext;
2777
+ $[13] = t7;
2778
+ } else {
2779
+ t7 = $[13];
2780
+ }
2781
+ let t8;
2782
+ if ($[14] !== t2 || $[15] !== t6 || $[16] !== t7) {
2783
+ t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2784
+ flexDirection: "column",
2785
+ children: [
2786
+ t2,
2787
+ t6,
2788
+ t7
2789
+ ]
2790
+ }, undefined, true, undefined, this);
2791
+ $[14] = t2;
2792
+ $[15] = t6;
2793
+ $[16] = t7;
2794
+ $[17] = t8;
2795
+ } else {
2796
+ t8 = $[17];
2797
+ }
2798
+ return t8;
2799
+ } else {
2800
+ let t2;
2801
+ if ($[18] !== title) {
2802
+ t2 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2803
+ bold: true,
2804
+ children: title
2805
+ }, undefined, false, undefined, this);
2806
+ $[18] = title;
2807
+ $[19] = t2;
2808
+ } else {
2809
+ t2 = $[19];
2810
+ }
2811
+ let t3;
2812
+ if ($[20] !== subtext) {
2813
+ t3 = subtext && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(jsx_dev_runtime6.Fragment, {
2814
+ children: [
2815
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2816
+ children: " "
2817
+ }, undefined, false, undefined, this),
2818
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2819
+ dimColor: true,
2820
+ children: [
2821
+ "\xB7 ",
2822
+ subtext
2823
+ ]
2824
+ }, undefined, true, undefined, this)
2825
+ ]
2826
+ }, undefined, true, undefined, this);
2827
+ $[20] = subtext;
2828
+ $[21] = t3;
2829
+ } else {
2830
+ t3 = $[21];
2831
+ }
2832
+ let t4;
2833
+ if ($[22] !== t2 || $[23] !== t3) {
2834
+ t4 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2835
+ children: [
2836
+ t2,
2837
+ t3
2838
+ ]
2839
+ }, undefined, true, undefined, this);
2840
+ $[22] = t2;
2841
+ $[23] = t3;
2842
+ $[24] = t4;
2843
+ } else {
2844
+ t4 = $[24];
2845
+ }
2846
+ const t5 = utilization / 100;
2847
+ let t6;
2848
+ if ($[25] !== maxWidth || $[26] !== t5) {
2849
+ t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ProgressBar, {
2850
+ ratio: t5,
2851
+ width: maxWidth,
2852
+ fillColor: "rate_limit_fill",
2853
+ emptyColor: "rate_limit_empty"
2854
+ }, undefined, false, undefined, this);
2855
+ $[25] = maxWidth;
2856
+ $[26] = t5;
2857
+ $[27] = t6;
2858
+ } else {
2859
+ t6 = $[27];
2860
+ }
2861
+ let t7;
2862
+ if ($[28] !== usedText) {
2863
+ t7 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2864
+ children: usedText
2865
+ }, undefined, false, undefined, this);
2866
+ $[28] = usedText;
2867
+ $[29] = t7;
2868
+ } else {
2869
+ t7 = $[29];
2870
+ }
2871
+ let t8;
2872
+ if ($[30] !== t4 || $[31] !== t6 || $[32] !== t7) {
2873
+ t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2874
+ flexDirection: "column",
2875
+ children: [
2876
+ t4,
2877
+ t6,
2878
+ t7
2879
+ ]
2880
+ }, undefined, true, undefined, this);
2881
+ $[30] = t4;
2882
+ $[31] = t6;
2883
+ $[32] = t7;
2884
+ $[33] = t8;
2885
+ } else {
2886
+ t8 = $[33];
2887
+ }
2888
+ return t8;
2889
+ }
2890
+ }
2891
+ function Usage() {
2892
+ const [utilization, setUtilization] = import_react5.useState(null);
2893
+ const [error, setError] = import_react5.useState(null);
2894
+ const [isLoading, setIsLoading] = import_react5.useState(true);
2895
+ const {
2896
+ columns
2897
+ } = useTerminalSize();
2898
+ const availableWidth = columns - 2;
2899
+ const maxWidth = Math.min(availableWidth, 80);
2900
+ const loadUtilization = React3.useCallback(async () => {
2901
+ setIsLoading(true);
2902
+ setError(null);
2903
+ try {
2904
+ const data = await fetchUtilization();
2905
+ setUtilization(data);
2906
+ } catch (err) {
2907
+ logError(err);
2908
+ const axiosError = err;
2909
+ const responseBody = axiosError.response?.data ? jsonStringify(axiosError.response.data) : undefined;
2910
+ setError(responseBody ? `Failed to load usage data: ${responseBody}` : "Failed to load usage data");
2911
+ } finally {
2912
+ setIsLoading(false);
2913
+ }
2914
+ }, []);
2915
+ import_react5.useEffect(() => {
2916
+ loadUtilization();
2917
+ }, [loadUtilization]);
2918
+ useKeybinding("settings:retry", () => {
2919
+ loadUtilization();
2920
+ }, {
2921
+ context: "Settings",
2922
+ isActive: !!error && !isLoading
2923
+ });
2924
+ if (error) {
2925
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2926
+ flexDirection: "column",
2927
+ gap: 1,
2928
+ children: [
2929
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2930
+ color: "error",
2931
+ children: [
2932
+ "Error: ",
2933
+ error
2934
+ ]
2935
+ }, undefined, true, undefined, this),
2936
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2937
+ dimColor: true,
2938
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Byline, {
2939
+ children: [
2940
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
2941
+ action: "settings:retry",
2942
+ context: "Settings",
2943
+ fallback: "r",
2944
+ description: "retry"
2945
+ }, undefined, false, undefined, this),
2946
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
2947
+ action: "confirm:no",
2948
+ context: "Settings",
2949
+ fallback: "Esc",
2950
+ description: "cancel"
2951
+ }, undefined, false, undefined, this)
2952
+ ]
2953
+ }, undefined, true, undefined, this)
2954
+ }, undefined, false, undefined, this)
2955
+ ]
2956
+ }, undefined, true, undefined, this);
2957
+ }
2958
+ if (!utilization) {
2959
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2960
+ flexDirection: "column",
2961
+ gap: 1,
2962
+ children: [
2963
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2964
+ dimColor: true,
2965
+ children: "Loading usage data\u2026"
2966
+ }, undefined, false, undefined, this),
2967
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2968
+ dimColor: true,
2969
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
2970
+ action: "confirm:no",
2971
+ context: "Settings",
2972
+ fallback: "Esc",
2973
+ description: "cancel"
2974
+ }, undefined, false, undefined, this)
2975
+ }, undefined, false, undefined, this)
2976
+ ]
2977
+ }, undefined, true, undefined, this);
2978
+ }
2979
+ const subscriptionType = getSubscriptionType();
2980
+ const showSonnetBar = subscriptionType === "max" || subscriptionType === "team" || subscriptionType === null;
2981
+ const limits = [{
2982
+ title: "Current session",
2983
+ limit: utilization.five_hour
2984
+ }, {
2985
+ title: "Current week (all models)",
2986
+ limit: utilization.seven_day
2987
+ }, ...showSonnetBar ? [{
2988
+ title: "Current week (Sonnet only)",
2989
+ limit: utilization.seven_day_sonnet
2990
+ }] : []];
2991
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
2992
+ flexDirection: "column",
2993
+ gap: 1,
2994
+ width: "100%",
2995
+ children: [
2996
+ limits.some(({
2997
+ limit
2998
+ }) => limit) || /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
2999
+ dimColor: true,
3000
+ children: "/usage is only available for subscription plans."
3001
+ }, undefined, false, undefined, this),
3002
+ limits.map(({
3003
+ title,
3004
+ limit: limit_0
3005
+ }) => limit_0 && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(LimitBar, {
3006
+ title,
3007
+ limit: limit_0,
3008
+ maxWidth
3009
+ }, title, false, undefined, this)),
3010
+ utilization.extra_usage && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ExtraUsageSection, {
3011
+ extraUsage: utilization.extra_usage,
3012
+ maxWidth
3013
+ }, undefined, false, undefined, this),
3014
+ isEligibleForOverageCreditGrant() && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(OverageCreditUpsell, {
3015
+ maxWidth
3016
+ }, undefined, false, undefined, this),
3017
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3018
+ dimColor: true,
3019
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ConfigurableShortcutHint, {
3020
+ action: "confirm:no",
3021
+ context: "Settings",
3022
+ fallback: "Esc",
3023
+ description: "cancel"
3024
+ }, undefined, false, undefined, this)
3025
+ }, undefined, false, undefined, this)
3026
+ ]
3027
+ }, undefined, true, undefined, this);
3028
+ }
3029
+ function ExtraUsageSection(t0) {
3030
+ const $ = import_compiler_runtime6.c(20);
3031
+ const {
3032
+ extraUsage: extraUsage2,
3033
+ maxWidth
3034
+ } = t0;
3035
+ const subscriptionType = getSubscriptionType();
3036
+ const isProOrMax = subscriptionType === "pro" || subscriptionType === "max";
3037
+ if (!isProOrMax) {
3038
+ return false;
3039
+ }
3040
+ if (!extraUsage2.is_enabled) {
3041
+ if (extraUsage.isEnabled()) {
3042
+ let t12;
3043
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
3044
+ t12 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
3045
+ flexDirection: "column",
3046
+ children: [
3047
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3048
+ bold: true,
3049
+ children: EXTRA_USAGE_SECTION_TITLE
3050
+ }, undefined, false, undefined, this),
3051
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3052
+ dimColor: true,
3053
+ children: "Extra usage not enabled \xB7 /extra-usage to enable"
3054
+ }, undefined, false, undefined, this)
3055
+ ]
3056
+ }, undefined, true, undefined, this);
3057
+ $[0] = t12;
3058
+ } else {
3059
+ t12 = $[0];
3060
+ }
3061
+ return t12;
3062
+ }
3063
+ return null;
3064
+ }
3065
+ if (extraUsage2.monthly_limit === null) {
3066
+ let t12;
3067
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
3068
+ t12 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
3069
+ flexDirection: "column",
3070
+ children: [
3071
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3072
+ bold: true,
3073
+ children: EXTRA_USAGE_SECTION_TITLE
3074
+ }, undefined, false, undefined, this),
3075
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
3076
+ dimColor: true,
3077
+ children: "Unlimited"
3078
+ }, undefined, false, undefined, this)
3079
+ ]
3080
+ }, undefined, true, undefined, this);
3081
+ $[1] = t12;
3082
+ } else {
3083
+ t12 = $[1];
3084
+ }
3085
+ return t12;
3086
+ }
3087
+ if (typeof extraUsage2.used_credits !== "number" || typeof extraUsage2.utilization !== "number") {
3088
+ return null;
3089
+ }
3090
+ const t1 = extraUsage2.used_credits / 100;
3091
+ let t2;
3092
+ if ($[2] !== t1) {
3093
+ t2 = formatCost(t1, 2);
3094
+ $[2] = t1;
3095
+ $[3] = t2;
3096
+ } else {
3097
+ t2 = $[3];
3098
+ }
3099
+ const formattedUsedCredits = t2;
3100
+ const t3 = extraUsage2.monthly_limit / 100;
3101
+ let t4;
3102
+ if ($[4] !== t3) {
3103
+ t4 = formatCost(t3, 2);
3104
+ $[4] = t3;
3105
+ $[5] = t4;
3106
+ } else {
3107
+ t4 = $[5];
3108
+ }
3109
+ const formattedMonthlyLimit = t4;
3110
+ let T0;
3111
+ let t5;
3112
+ let t6;
3113
+ let t7;
3114
+ if ($[6] !== extraUsage2.utilization) {
3115
+ const now = new Date;
3116
+ const oneMonthReset = new Date(now.getFullYear(), now.getMonth() + 1, 1);
3117
+ T0 = LimitBar;
3118
+ t7 = EXTRA_USAGE_SECTION_TITLE;
3119
+ t5 = extraUsage2.utilization;
3120
+ t6 = oneMonthReset.toISOString();
3121
+ $[6] = extraUsage2.utilization;
3122
+ $[7] = T0;
3123
+ $[8] = t5;
3124
+ $[9] = t6;
3125
+ $[10] = t7;
3126
+ } else {
3127
+ T0 = $[7];
3128
+ t5 = $[8];
3129
+ t6 = $[9];
3130
+ t7 = $[10];
3131
+ }
3132
+ let t8;
3133
+ if ($[11] !== t5 || $[12] !== t6) {
3134
+ t8 = {
3135
+ utilization: t5,
3136
+ resets_at: t6
3137
+ };
3138
+ $[11] = t5;
3139
+ $[12] = t6;
3140
+ $[13] = t8;
3141
+ } else {
3142
+ t8 = $[13];
3143
+ }
3144
+ const t9 = `${formattedUsedCredits} / ${formattedMonthlyLimit} spent`;
3145
+ let t10;
3146
+ if ($[14] !== T0 || $[15] !== maxWidth || $[16] !== t7 || $[17] !== t8 || $[18] !== t9) {
3147
+ t10 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(T0, {
3148
+ title: t7,
3149
+ limit: t8,
3150
+ showTimeInReset: false,
3151
+ extraSubtext: t9,
3152
+ maxWidth
3153
+ }, undefined, false, undefined, this);
3154
+ $[14] = T0;
3155
+ $[15] = maxWidth;
3156
+ $[16] = t7;
3157
+ $[17] = t8;
3158
+ $[18] = t9;
3159
+ $[19] = t10;
3160
+ } else {
3161
+ t10 = $[19];
3162
+ }
3163
+ return t10;
3164
+ }
3165
+ var import_compiler_runtime6, React3, import_react5, jsx_dev_runtime6, EXTRA_USAGE_SECTION_TITLE = "Extra usage";
3166
+ var init_Usage = __esm(() => {
3167
+ init_extra_usage();
3168
+ init_cost_tracker();
3169
+ init_auth();
3170
+ init_useTerminalSize();
3171
+ init_ink();
3172
+ init_useKeybinding();
3173
+ init_usage();
3174
+ init_format();
3175
+ init_log();
3176
+ init_slowOperations();
3177
+ init_ConfigurableShortcutHint();
3178
+ init_Byline();
3179
+ init_ProgressBar();
3180
+ init_OverageCreditUpsell();
3181
+ import_compiler_runtime6 = __toESM(require_compiler_runtime(), 1);
3182
+ React3 = __toESM(require_react(), 1);
3183
+ import_react5 = __toESM(require_react(), 1);
3184
+ jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
3185
+ });
3186
+
3187
+ // src/components/Settings/Settings.tsx
3188
+ function Settings(t0) {
3189
+ const $ = import_compiler_runtime7.c(25);
3190
+ const {
3191
+ onClose,
3192
+ context,
3193
+ defaultTab
3194
+ } = t0;
3195
+ const [selectedTab, setSelectedTab] = import_react6.useState(defaultTab);
3196
+ const [tabsHidden, setTabsHidden] = import_react6.useState(false);
3197
+ const [configOwnsEsc, setConfigOwnsEsc] = import_react6.useState(false);
3198
+ const [gatesOwnsEsc, setGatesOwnsEsc] = import_react6.useState(false);
3199
+ const insideModal = useIsInsideModal();
3200
+ const {
3201
+ rows
3202
+ } = useModalOrTerminalSize(useTerminalSize());
3203
+ const contentHeight = insideModal ? rows + 1 : Math.max(15, Math.min(Math.floor(rows * 0.8), 30));
3204
+ const [diagnosticsPromise] = import_react6.useState(_temp22);
3205
+ useExitOnCtrlCDWithKeybindings();
3206
+ let t1;
3207
+ if ($[0] !== onClose || $[1] !== tabsHidden) {
3208
+ t1 = () => {
3209
+ if (tabsHidden) {
3210
+ return;
3211
+ }
3212
+ onClose("Status dialog dismissed", {
3213
+ display: "system"
3214
+ });
3215
+ };
3216
+ $[0] = onClose;
3217
+ $[1] = tabsHidden;
3218
+ $[2] = t1;
3219
+ } else {
3220
+ t1 = $[2];
3221
+ }
3222
+ const handleEscape = t1;
3223
+ const t2 = !tabsHidden && !(selectedTab === "Config" && configOwnsEsc) && !(selectedTab === "Gates" && gatesOwnsEsc);
3224
+ let t3;
3225
+ if ($[3] !== t2) {
3226
+ t3 = {
3227
+ context: "Settings",
3228
+ isActive: t2
3229
+ };
3230
+ $[3] = t2;
3231
+ $[4] = t3;
3232
+ } else {
3233
+ t3 = $[4];
3234
+ }
3235
+ useKeybinding("confirm:no", handleEscape, t3);
3236
+ let t4;
3237
+ if ($[5] !== context || $[6] !== diagnosticsPromise) {
3238
+ t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
3239
+ title: "Status",
3240
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Status, {
3241
+ context,
3242
+ diagnosticsPromise
3243
+ }, undefined, false, undefined, this)
3244
+ }, "status", false, undefined, this);
3245
+ $[5] = context;
3246
+ $[6] = diagnosticsPromise;
3247
+ $[7] = t4;
3248
+ } else {
3249
+ t4 = $[7];
3250
+ }
3251
+ let t5;
3252
+ if ($[8] !== contentHeight || $[9] !== context || $[10] !== onClose) {
3253
+ t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
3254
+ title: "Config",
3255
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(import_react6.Suspense, {
3256
+ fallback: null,
3257
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Config, {
3258
+ context,
3259
+ onClose,
3260
+ setTabsHidden,
3261
+ onIsSearchModeChange: setConfigOwnsEsc,
3262
+ contentHeight
3263
+ }, undefined, false, undefined, this)
3264
+ }, undefined, false, undefined, this)
3265
+ }, "config", false, undefined, this);
3266
+ $[8] = contentHeight;
3267
+ $[9] = context;
3268
+ $[10] = onClose;
3269
+ $[11] = t5;
3270
+ } else {
3271
+ t5 = $[11];
3272
+ }
3273
+ let t6;
3274
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
3275
+ t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
3276
+ title: "Usage",
3277
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Usage, {}, undefined, false, undefined, this)
3278
+ }, "usage", false, undefined, this);
3279
+ $[12] = t6;
3280
+ } else {
3281
+ t6 = $[12];
3282
+ }
3283
+ let t7;
3284
+ if ($[13] !== contentHeight) {
3285
+ t7 = [];
3286
+ $[13] = contentHeight;
3287
+ $[14] = t7;
3288
+ } else {
3289
+ t7 = $[14];
3290
+ }
3291
+ let t8;
3292
+ if ($[15] !== t4 || $[16] !== t5 || $[17] !== t7) {
3293
+ t8 = [t4, t5, t6, ...t7];
3294
+ $[15] = t4;
3295
+ $[16] = t5;
3296
+ $[17] = t7;
3297
+ $[18] = t8;
3298
+ } else {
3299
+ t8 = $[18];
3300
+ }
3301
+ const tabs = t8;
3302
+ const t9 = defaultTab !== "Config" && defaultTab !== "Gates";
3303
+ const t10 = tabsHidden || insideModal ? undefined : contentHeight;
3304
+ let t11;
3305
+ if ($[19] !== selectedTab || $[20] !== t10 || $[21] !== t9 || $[22] !== tabs || $[23] !== tabsHidden) {
3306
+ t11 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Pane, {
3307
+ color: "permission",
3308
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tabs, {
3309
+ color: "permission",
3310
+ selectedTab,
3311
+ onTabChange: setSelectedTab,
3312
+ hidden: tabsHidden,
3313
+ initialHeaderFocused: t9,
3314
+ contentHeight: t10,
3315
+ children: tabs
3316
+ }, undefined, false, undefined, this)
3317
+ }, undefined, false, undefined, this);
3318
+ $[19] = selectedTab;
3319
+ $[20] = t10;
3320
+ $[21] = t9;
3321
+ $[22] = tabs;
3322
+ $[23] = tabsHidden;
3323
+ $[24] = t11;
3324
+ } else {
3325
+ t11 = $[24];
3326
+ }
3327
+ return t11;
3328
+ }
3329
+ function _temp22() {
3330
+ return buildDiagnostics().catch(_temp6);
3331
+ }
3332
+ function _temp6() {
3333
+ return [];
3334
+ }
3335
+ var import_compiler_runtime7, import_react6, jsx_dev_runtime7;
3336
+ var init_Settings = __esm(() => {
3337
+ init_useKeybinding();
3338
+ init_useExitOnCtrlCDWithKeybindings();
3339
+ init_useTerminalSize();
3340
+ init_modalContext();
3341
+ init_Pane();
3342
+ init_Tabs();
3343
+ init_Status();
3344
+ init_Config();
3345
+ init_Usage();
3346
+ import_compiler_runtime7 = __toESM(require_compiler_runtime(), 1);
3347
+ import_react6 = __toESM(require_react(), 1);
3348
+ jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
3349
+ });
3350
+
3351
+ export { Settings, init_Settings };