jialing-code 1.1.0

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