claude-code-best 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/README.md +437 -0
  2. package/dist/chunk-02y0y853.js +277 -0
  3. package/dist/chunk-03nqtgyr.js +93 -0
  4. package/dist/chunk-067wa5sn.js +275 -0
  5. package/dist/chunk-06saje2v.js +39 -0
  6. package/dist/chunk-0731m51q.js +8 -0
  7. package/dist/chunk-07ysf2mw.js +184 -0
  8. package/dist/chunk-0e1xsncc.js +969 -0
  9. package/dist/chunk-0ewgfms5.js +117 -0
  10. package/dist/chunk-0he1tqj5.js +274 -0
  11. package/dist/chunk-0paqc2yw.js +15 -0
  12. package/dist/chunk-0rc2rn3b.js +338 -0
  13. package/dist/chunk-0sb5scxx.js +220 -0
  14. package/dist/chunk-0vkfrmqm.js +690 -0
  15. package/dist/chunk-0wftg29n.js +43 -0
  16. package/dist/chunk-0xjaqda8.js +1124 -0
  17. package/dist/chunk-1141xmr4.js +8 -0
  18. package/dist/chunk-128nh5j9.js +3057 -0
  19. package/dist/chunk-165b9y9k.js +70 -0
  20. package/dist/chunk-17g3drrw.js +121 -0
  21. package/dist/chunk-1cbn5kxf.js +7 -0
  22. package/dist/chunk-1dyeexvn.js +173 -0
  23. package/dist/chunk-1h2famwb.js +49 -0
  24. package/dist/chunk-1hhdpn3t.js +32 -0
  25. package/dist/chunk-1jv1ckhg.js +1152 -0
  26. package/dist/chunk-1pxd1xfp.js +103 -0
  27. package/dist/chunk-1tzexy7d.js +258 -0
  28. package/dist/chunk-1w361mz1.js +438 -0
  29. package/dist/chunk-1xkekb9y.js +19 -0
  30. package/dist/chunk-201dvaa3.js +246 -0
  31. package/dist/chunk-238g70xa.js +36 -0
  32. package/dist/chunk-248szg6m.js +63 -0
  33. package/dist/chunk-271zt54b.js +1871 -0
  34. package/dist/chunk-27xc1csx.js +104 -0
  35. package/dist/chunk-2a27tvzp.js +281 -0
  36. package/dist/chunk-2a42s11t.js +412 -0
  37. package/dist/chunk-2eykm0j0.js +20 -0
  38. package/dist/chunk-2fwze72g.js +24 -0
  39. package/dist/chunk-2g1zxpt7.js +2833 -0
  40. package/dist/chunk-2gzv8nrw.js +205 -0
  41. package/dist/chunk-2jb48txn.js +98 -0
  42. package/dist/chunk-2k995y2x.js +880 -0
  43. package/dist/chunk-2kbk09sb.js +263 -0
  44. package/dist/chunk-2kc13eta.js +88 -0
  45. package/dist/chunk-2mcp388c.js +250 -0
  46. package/dist/chunk-2mcrd0rj.js +672 -0
  47. package/dist/chunk-2nayx6q1.js +63 -0
  48. package/dist/chunk-2t3vw4tx.js +22820 -0
  49. package/dist/chunk-2tkt52mz.js +165 -0
  50. package/dist/chunk-2tme3s1c.js +114 -0
  51. package/dist/chunk-2tw2ve8h.js +145 -0
  52. package/dist/chunk-2v1br2x0.js +59 -0
  53. package/dist/chunk-2x3gmbws.js +120 -0
  54. package/dist/chunk-30rst83v.js +168 -0
  55. package/dist/chunk-36k3f7pn.js +165 -0
  56. package/dist/chunk-3be7ka25.js +56 -0
  57. package/dist/chunk-3c25bcsw.js +17 -0
  58. package/dist/chunk-3cn070p7.js +3205 -0
  59. package/dist/chunk-3gqdqmzb.js +75 -0
  60. package/dist/chunk-3h8a89gy.js +46 -0
  61. package/dist/chunk-3nk79af8.js +8 -0
  62. package/dist/chunk-3psth3ez.js +266 -0
  63. package/dist/chunk-3r24h7t6.js +113 -0
  64. package/dist/chunk-3s5r02ps.js +648 -0
  65. package/dist/chunk-3vpqaqc6.js +339 -0
  66. package/dist/chunk-3w6s9m5w.js +16 -0
  67. package/dist/chunk-404wc7d4.js +385 -0
  68. package/dist/chunk-41xeh3t9.js +81 -0
  69. package/dist/chunk-4491abz9.js +99 -0
  70. package/dist/chunk-44fpr6jq.js +434 -0
  71. package/dist/chunk-45kxdsp8.js +444 -0
  72. package/dist/chunk-495d85x1.js +8066 -0
  73. package/dist/chunk-4bgz02m1.js +285 -0
  74. package/dist/chunk-4dfmgx6h.js +69 -0
  75. package/dist/chunk-4fbyr2hm.js +279 -0
  76. package/dist/chunk-4g3v8y12.js +23 -0
  77. package/dist/chunk-4gj6zzg1.js +98 -0
  78. package/dist/chunk-4jm600zv.js +13 -0
  79. package/dist/chunk-4y62603j.js +117 -0
  80. package/dist/chunk-4zfkzkt6.js +37 -0
  81. package/dist/chunk-52n4py3b.js +225 -0
  82. package/dist/chunk-55wgxwa9.js +13877 -0
  83. package/dist/chunk-5a3cw988.js +38 -0
  84. package/dist/chunk-5dsvtbwb.js +87 -0
  85. package/dist/chunk-5hva0tsg.js +726 -0
  86. package/dist/chunk-5r3ak65p.js +229 -0
  87. package/dist/chunk-5t59fqg3.js +127 -0
  88. package/dist/chunk-5wnn3t3a.js +71 -0
  89. package/dist/chunk-5wxspfct.js +40 -0
  90. package/dist/chunk-60nc5bh3.js +1579 -0
  91. package/dist/chunk-6bd8brc4.js +48 -0
  92. package/dist/chunk-6dcq96a3.js +128 -0
  93. package/dist/chunk-6dj5t602.js +341 -0
  94. package/dist/chunk-6fkwz9yk.js +716 -0
  95. package/dist/chunk-6gr3c3w9.js +378 -0
  96. package/dist/chunk-6heqkcjx.js +153 -0
  97. package/dist/chunk-6n2qgm9v.js +8 -0
  98. package/dist/chunk-6tm5941a.js +152 -0
  99. package/dist/chunk-6tq2v3rk.js +186 -0
  100. package/dist/chunk-73rpbt04.js +1947 -0
  101. package/dist/chunk-760252na.js +101 -0
  102. package/dist/chunk-7739pg2c.js +4261 -0
  103. package/dist/chunk-77g09znh.js +391 -0
  104. package/dist/chunk-79zmgkg5.js +750 -0
  105. package/dist/chunk-7ahman84.js +87 -0
  106. package/dist/chunk-7aw745vx.js +40175 -0
  107. package/dist/chunk-7d35rxr3.js +69 -0
  108. package/dist/chunk-7enxknwt.js +442 -0
  109. package/dist/chunk-7j0wpf4m.js +89 -0
  110. package/dist/chunk-7m2nd8da.js +110 -0
  111. package/dist/chunk-7q6pjeyp.js +1493 -0
  112. package/dist/chunk-7qwme3ab.js +120 -0
  113. package/dist/chunk-7rgwp44r.js +130 -0
  114. package/dist/chunk-7rn4t7tx.js +162 -0
  115. package/dist/chunk-7vtykt4v.js +102 -0
  116. package/dist/chunk-7whgbwhx.js +584 -0
  117. package/dist/chunk-7wm1rjfm.js +16392 -0
  118. package/dist/chunk-7wm5s02e.js +216 -0
  119. package/dist/chunk-7xyswgjh.js +8 -0
  120. package/dist/chunk-7ymfj7m3.js +151 -0
  121. package/dist/chunk-7z8j9qfn.js +121 -0
  122. package/dist/chunk-83hfzbx3.js +10 -0
  123. package/dist/chunk-8bedvdm1.js +32 -0
  124. package/dist/chunk-8c32awe2.js +21933 -0
  125. package/dist/chunk-8d5eyjse.js +26840 -0
  126. package/dist/chunk-8fmbf525.js +95 -0
  127. package/dist/chunk-8hq5kk3y.js +44 -0
  128. package/dist/chunk-8mqwac85.js +73 -0
  129. package/dist/chunk-8tnsngw2.js +31 -0
  130. package/dist/chunk-8y12jxg8.js +10 -0
  131. package/dist/chunk-8ymf4e6z.js +48 -0
  132. package/dist/chunk-90wp6wez.js +10510 -0
  133. package/dist/chunk-91gk0g2y.js +654 -0
  134. package/dist/chunk-97r68x5g.js +3373 -0
  135. package/dist/chunk-9egdc8n4.js +463 -0
  136. package/dist/chunk-9gbamk79.js +93 -0
  137. package/dist/chunk-9rcbyag3.js +16 -0
  138. package/dist/chunk-9rr0wepz.js +56 -0
  139. package/dist/chunk-9x5zgy22.js +12 -0
  140. package/dist/chunk-a3csma98.js +74 -0
  141. package/dist/chunk-a8ejc632.js +3094 -0
  142. package/dist/chunk-a9vdeb6y.js +258 -0
  143. package/dist/chunk-a9zh40sj.js +48 -0
  144. package/dist/chunk-ajp7hmws.js +422 -0
  145. package/dist/chunk-ap2a2er6.js +690 -0
  146. package/dist/chunk-as261f01.js +500 -0
  147. package/dist/chunk-av73dywf.js +862 -0
  148. package/dist/chunk-avwewk4v.js +176 -0
  149. package/dist/chunk-b0105v1f.js +79 -0
  150. package/dist/chunk-b4wg70y1.js +54 -0
  151. package/dist/chunk-bjqw6798.js +328 -0
  152. package/dist/chunk-bm1qb16p.js +17 -0
  153. package/dist/chunk-bmvzacx5.js +998 -0
  154. package/dist/chunk-bq6x1ehp.js +908 -0
  155. package/dist/chunk-bqfnp99q.js +477 -0
  156. package/dist/chunk-bqq4zamw.js +27 -0
  157. package/dist/chunk-brcnd1j0.js +26 -0
  158. package/dist/chunk-bsk44136.js +229 -0
  159. package/dist/chunk-bw093kge.js +129 -0
  160. package/dist/chunk-by7ezad6.js +87 -0
  161. package/dist/chunk-c4q9x8t2.js +105 -0
  162. package/dist/chunk-c6421kme.js +54 -0
  163. package/dist/chunk-cdajcgne.js +195 -0
  164. package/dist/chunk-cdz5yb0r.js +57 -0
  165. package/dist/chunk-cfv996bs.js +22 -0
  166. package/dist/chunk-cg43nnpk.js +87 -0
  167. package/dist/chunk-cgfdkzhb.js +12 -0
  168. package/dist/chunk-ch8avrbh.js +86 -0
  169. package/dist/chunk-chkyv40s.js +2642 -0
  170. package/dist/chunk-ckcagq32.js +208 -0
  171. package/dist/chunk-cpe70sxw.js +79 -0
  172. package/dist/chunk-ctw5jwcd.js +213 -0
  173. package/dist/chunk-cvge4pvp.js +122 -0
  174. package/dist/chunk-d049dd11.js +348 -0
  175. package/dist/chunk-d18z9pna.js +106 -0
  176. package/dist/chunk-d7tw94h4.js +114 -0
  177. package/dist/chunk-da4ve9t5.js +9300 -0
  178. package/dist/chunk-daeav7vb.js +418 -0
  179. package/dist/chunk-dd60e5wj.js +41 -0
  180. package/dist/chunk-def1dc97.js +154 -0
  181. package/dist/chunk-dgqrcy74.js +48 -0
  182. package/dist/chunk-dnh7jtpb.js +37 -0
  183. package/dist/chunk-drv8qvwz.js +83 -0
  184. package/dist/chunk-dv1wfr85.js +6373 -0
  185. package/dist/chunk-dvfb4qwt.js +40 -0
  186. package/dist/chunk-dxnv8hfn.js +536 -0
  187. package/dist/chunk-dy3tzxgq.js +91 -0
  188. package/dist/chunk-e3g8q4cn.js +1646 -0
  189. package/dist/chunk-e5pntxye.js +37 -0
  190. package/dist/chunk-e6s36z54.js +1322 -0
  191. package/dist/chunk-e7393td6.js +42 -0
  192. package/dist/chunk-ea18z8vr.js +438 -0
  193. package/dist/chunk-ebfsjcvm.js +281 -0
  194. package/dist/chunk-ehtwnxpg.js +1591 -0
  195. package/dist/chunk-epmheefa.js +780 -0
  196. package/dist/chunk-eqp1rfft.js +17 -0
  197. package/dist/chunk-eskw6xkv.js +41 -0
  198. package/dist/chunk-ewadzrm8.js +103 -0
  199. package/dist/chunk-ex978bsn.js +24 -0
  200. package/dist/chunk-exy9bnjf.js +212 -0
  201. package/dist/chunk-f1f3dmd5.js +713 -0
  202. package/dist/chunk-f5ma3nh5.js +3436 -0
  203. package/dist/chunk-f7yg1atj.js +47 -0
  204. package/dist/chunk-fakajzny.js +372 -0
  205. package/dist/chunk-fbv4apne.js +51 -0
  206. package/dist/chunk-fcz5eche.js +467 -0
  207. package/dist/chunk-fpf4cgbt.js +4521 -0
  208. package/dist/chunk-fpjzr5jj.js +674 -0
  209. package/dist/chunk-ftrm87vt.js +467 -0
  210. package/dist/chunk-ftsp0cj3.js +105 -0
  211. package/dist/chunk-fv7hhcns.js +345 -0
  212. package/dist/chunk-fvcwxb8x.js +83 -0
  213. package/dist/chunk-fyc5fepv.js +10 -0
  214. package/dist/chunk-g00hs992.js +90 -0
  215. package/dist/chunk-g0j0t6qk.js +26 -0
  216. package/dist/chunk-g338npwr.js +1061 -0
  217. package/dist/chunk-g3t0act8.js +8 -0
  218. package/dist/chunk-g5fpkpeg.js +520 -0
  219. package/dist/chunk-g6e1ab2k.js +143 -0
  220. package/dist/chunk-g7fxbqsc.js +157 -0
  221. package/dist/chunk-g9q2cznf.js +173123 -0
  222. package/dist/chunk-g9qyg278.js +88 -0
  223. package/dist/chunk-g9xf7jc4.js +564 -0
  224. package/dist/chunk-gax0fcbx.js +182 -0
  225. package/dist/chunk-gf96dtb6.js +373 -0
  226. package/dist/chunk-gkjdjqfs.js +112 -0
  227. package/dist/chunk-gkrx7ptx.js +242 -0
  228. package/dist/chunk-gqk545se.js +6107 -0
  229. package/dist/chunk-grdvmq7q.js +1391 -0
  230. package/dist/chunk-gyj242zr.js +20 -0
  231. package/dist/chunk-gzmjp1eb.js +696 -0
  232. package/dist/chunk-h0qngp9w.js +157 -0
  233. package/dist/chunk-h0rbjg6x.js +55 -0
  234. package/dist/chunk-h2j4t3fk.js +41651 -0
  235. package/dist/chunk-h6c8cms4.js +458 -0
  236. package/dist/chunk-ha0xq3e9.js +779 -0
  237. package/dist/chunk-hakdhagh.js +16606 -0
  238. package/dist/chunk-hbh17tng.js +1013 -0
  239. package/dist/chunk-hdfzyzk4.js +85 -0
  240. package/dist/chunk-hdtb5jce.js +101 -0
  241. package/dist/chunk-hdwh7ncw.js +2334 -0
  242. package/dist/chunk-hfzj1m07.js +118 -0
  243. package/dist/chunk-hg776v69.js +745 -0
  244. package/dist/chunk-hgtf13es.js +655 -0
  245. package/dist/chunk-hh7cmy4k.js +20 -0
  246. package/dist/chunk-hjhc4cpt.js +69 -0
  247. package/dist/chunk-hk9xz7gk.js +118 -0
  248. package/dist/chunk-hpwa620w.js +602 -0
  249. package/dist/chunk-hqmz36b3.js +552 -0
  250. package/dist/chunk-hrzerbfw.js +1299 -0
  251. package/dist/chunk-hx2tr4ep.js +7189 -0
  252. package/dist/chunk-hzhe8ygc.js +547 -0
  253. package/dist/chunk-j2k4p94p.js +55 -0
  254. package/dist/chunk-j3a4p81y.js +184 -0
  255. package/dist/chunk-j5j6nrfq.js +40 -0
  256. package/dist/chunk-j5zq8axt.js +432 -0
  257. package/dist/chunk-j64ga6ta.js +8035 -0
  258. package/dist/chunk-j8rw3m89.js +198 -0
  259. package/dist/chunk-j99mjxam.js +220 -0
  260. package/dist/chunk-jafes477.js +29 -0
  261. package/dist/chunk-jaqg0k7h.js +271 -0
  262. package/dist/chunk-jce5r25x.js +18 -0
  263. package/dist/chunk-jd32zbps.js +15 -0
  264. package/dist/chunk-jdew773m.js +115 -0
  265. package/dist/chunk-jdgeec04.js +4249 -0
  266. package/dist/chunk-jfv3zczw.js +227 -0
  267. package/dist/chunk-jjsx6t78.js +169 -0
  268. package/dist/chunk-jnhkref0.js +30 -0
  269. package/dist/chunk-jpr8js4w.js +328 -0
  270. package/dist/chunk-jx817w05.js +11 -0
  271. package/dist/chunk-jy35mvy3.js +1095 -0
  272. package/dist/chunk-jz6sqm8m.js +9175 -0
  273. package/dist/chunk-jzmz18nn.js +65 -0
  274. package/dist/chunk-k0g3jve7.js +89 -0
  275. package/dist/chunk-k0p9w03v.js +4957 -0
  276. package/dist/chunk-k1g3g183.js +128 -0
  277. package/dist/chunk-k1p54aq6.js +54 -0
  278. package/dist/chunk-k3vpzx3c.js +160 -0
  279. package/dist/chunk-k5c8ssc6.js +99 -0
  280. package/dist/chunk-k808gmhk.js +71 -0
  281. package/dist/chunk-k9c3888e.js +644 -0
  282. package/dist/chunk-kexj9c6y.js +5398 -0
  283. package/dist/chunk-kgg1gq3t.js +113 -0
  284. package/dist/chunk-ks0m9njy.js +542 -0
  285. package/dist/chunk-kwekc97v.js +18 -0
  286. package/dist/chunk-kwkrek4t.js +95 -0
  287. package/dist/chunk-m06q12hg.js +61 -0
  288. package/dist/chunk-m23b51r2.js +724 -0
  289. package/dist/chunk-m4gcjpj3.js +103 -0
  290. package/dist/chunk-m6rk1r6q.js +194 -0
  291. package/dist/chunk-madfgr3n.js +216 -0
  292. package/dist/chunk-mb2xmb0d.js +53 -0
  293. package/dist/chunk-mnx3wyv4.js +175 -0
  294. package/dist/chunk-mt25echc.js +6157 -0
  295. package/dist/chunk-mv1pbf3a.js +297 -0
  296. package/dist/chunk-my7r0cca.js +469 -0
  297. package/dist/chunk-n0qaeaa5.js +256 -0
  298. package/dist/chunk-n5crdyay.js +1549 -0
  299. package/dist/chunk-n5t9m8h9.js +524 -0
  300. package/dist/chunk-n78qmqpq.js +208 -0
  301. package/dist/chunk-n7ttdtk0.js +641 -0
  302. package/dist/chunk-njtjmsx7.js +71 -0
  303. package/dist/chunk-nka1g8f4.js +773 -0
  304. package/dist/chunk-nprycdaa.js +525 -0
  305. package/dist/chunk-npv8q5qr.js +333 -0
  306. package/dist/chunk-nq0fxyxh.js +752 -0
  307. package/dist/chunk-nrp9yaq6.js +86 -0
  308. package/dist/chunk-nt837qt9.js +21 -0
  309. package/dist/chunk-nx6nds18.js +60 -0
  310. package/dist/chunk-nxsh6de2.js +1711 -0
  311. package/dist/chunk-p196v9d0.js +140 -0
  312. package/dist/chunk-p2816w9z.js +1486 -0
  313. package/dist/chunk-p2d5nh3g.js +342 -0
  314. package/dist/chunk-p2pztr2r.js +104 -0
  315. package/dist/chunk-p68nf56z.js +92 -0
  316. package/dist/chunk-p6pc9xrz.js +3443 -0
  317. package/dist/chunk-p7g7pf3f.js +336 -0
  318. package/dist/chunk-p7skftb4.js +108 -0
  319. package/dist/chunk-pa2235xc.js +160 -0
  320. package/dist/chunk-pabnr66n.js +83 -0
  321. package/dist/chunk-pmzbyaat.js +99 -0
  322. package/dist/chunk-ppwjyveh.js +8 -0
  323. package/dist/chunk-pqzk7nbh.js +91 -0
  324. package/dist/chunk-ps49ymvj.js +43 -0
  325. package/dist/chunk-ptmcaxqn.js +155 -0
  326. package/dist/chunk-pvvew193.js +802 -0
  327. package/dist/chunk-pvx0x5zm.js +2057 -0
  328. package/dist/chunk-pwwa7s62.js +11 -0
  329. package/dist/chunk-pxvatg16.js +847 -0
  330. package/dist/chunk-py77warv.js +66 -0
  331. package/dist/chunk-q1e6pzwh.js +224 -0
  332. package/dist/chunk-q1txr206.js +532 -0
  333. package/dist/chunk-q25bjaev.js +15 -0
  334. package/dist/chunk-q43gccx5.js +92 -0
  335. package/dist/chunk-q6av622g.js +38 -0
  336. package/dist/chunk-qdrwxg3e.js +316 -0
  337. package/dist/chunk-qnbdekts.js +299 -0
  338. package/dist/chunk-qnfx3qtx.js +617 -0
  339. package/dist/chunk-qp2qdcda.js +100 -0
  340. package/dist/chunk-qqfa0dqg.js +2343 -0
  341. package/dist/chunk-qwvrkydc.js +253 -0
  342. package/dist/chunk-qz2x630m.js +49145 -0
  343. package/dist/chunk-r66hz8j6.js +34 -0
  344. package/dist/chunk-r6b58y3x.js +17 -0
  345. package/dist/chunk-r8f13sz1.js +1551 -0
  346. package/dist/chunk-ra0r65nx.js +173 -0
  347. package/dist/chunk-rcdpvnxh.js +826 -0
  348. package/dist/chunk-rf2w4x97.js +266 -0
  349. package/dist/chunk-rn0v1hk8.js +34 -0
  350. package/dist/chunk-rq1kckze.js +98 -0
  351. package/dist/chunk-rs45skes.js +123 -0
  352. package/dist/chunk-rse6x10x.js +89 -0
  353. package/dist/chunk-rxdhy7ve.js +131 -0
  354. package/dist/chunk-rxwb7b78.js +10476 -0
  355. package/dist/chunk-s0wvh65m.js +5810 -0
  356. package/dist/chunk-s39js2d3.js +61 -0
  357. package/dist/chunk-s3pzvdss.js +50 -0
  358. package/dist/chunk-s8y2tfzf.js +5012 -0
  359. package/dist/chunk-sb2sew2f.js +32 -0
  360. package/dist/chunk-scb48p4v.js +496 -0
  361. package/dist/chunk-sd36yzx8.js +954 -0
  362. package/dist/chunk-sdj9b9wh.js +782 -0
  363. package/dist/chunk-sjqtqj35.js +28 -0
  364. package/dist/chunk-spqaamnc.js +63 -0
  365. package/dist/chunk-sq0wf7jj.js +1919 -0
  366. package/dist/chunk-sy1hkkty.js +400 -0
  367. package/dist/chunk-sy9jf9v2.js +109 -0
  368. package/dist/chunk-szj5wvdy.js +28 -0
  369. package/dist/chunk-t0brxw87.js +153 -0
  370. package/dist/chunk-t0rgmccj.js +39 -0
  371. package/dist/chunk-t2km9bn3.js +87 -0
  372. package/dist/chunk-t4afbt2j.js +88 -0
  373. package/dist/chunk-t4c5qtdc.js +42 -0
  374. package/dist/chunk-t94jxd0x.js +100 -0
  375. package/dist/chunk-t9z6njcr.js +1585 -0
  376. package/dist/chunk-tb2g2bba.js +192 -0
  377. package/dist/chunk-tdpvdzbf.js +97 -0
  378. package/dist/chunk-tf4dw2e2.js +142 -0
  379. package/dist/chunk-tjaqa99q.js +125 -0
  380. package/dist/chunk-tp40437d.js +90 -0
  381. package/dist/chunk-ts2p6bv1.js +224 -0
  382. package/dist/chunk-tse7q7k1.js +255 -0
  383. package/dist/chunk-ttk5dzz8.js +25 -0
  384. package/dist/chunk-v1kzp02e.js +785 -0
  385. package/dist/chunk-v1mgv1et.js +15 -0
  386. package/dist/chunk-v399mzxk.js +58 -0
  387. package/dist/chunk-v4h5psgs.js +247 -0
  388. package/dist/chunk-v78fj8by.js +145 -0
  389. package/dist/chunk-v9smspw2.js +4301 -0
  390. package/dist/chunk-vabm7x8v.js +61 -0
  391. package/dist/chunk-veaq13qy.js +490 -0
  392. package/dist/chunk-vest0y6x.js +3830 -0
  393. package/dist/chunk-vf5sd1nq.js +12 -0
  394. package/dist/chunk-vmz3wcnv.js +641 -0
  395. package/dist/chunk-vpb723tx.js +38 -0
  396. package/dist/chunk-vratq94g.js +349 -0
  397. package/dist/chunk-vsgv16zj.js +756 -0
  398. package/dist/chunk-vxa0avb0.js +105 -0
  399. package/dist/chunk-vyc0rjyx.js +31 -0
  400. package/dist/chunk-vyjeh50y.js +2149 -0
  401. package/dist/chunk-vzqrbsd1.js +22 -0
  402. package/dist/chunk-w0hx9v3y.js +109 -0
  403. package/dist/chunk-w0r5627q.js +788 -0
  404. package/dist/chunk-w2qfgzzh.js +306 -0
  405. package/dist/chunk-w2z5pqd3.js +336 -0
  406. package/dist/chunk-w7h2yphx.js +17 -0
  407. package/dist/chunk-w7wgpqcp.js +157 -0
  408. package/dist/chunk-wf7yz2j0.js +849 -0
  409. package/dist/chunk-wfz0qffj.js +3939 -0
  410. package/dist/chunk-whvdag1y.js +6956 -0
  411. package/dist/chunk-wm2f2f1z.js +20 -0
  412. package/dist/chunk-wqpr7002.js +765 -0
  413. package/dist/chunk-wsqhnjj3.js +606 -0
  414. package/dist/chunk-wszmas1q.js +62 -0
  415. package/dist/chunk-wzpdet3m.js +843 -0
  416. package/dist/chunk-x14dq3v1.js +722 -0
  417. package/dist/chunk-x6bg700t.js +88 -0
  418. package/dist/chunk-x6r4v44b.js +8 -0
  419. package/dist/chunk-x8b7vft8.js +132 -0
  420. package/dist/chunk-xmdcxa8r.js +374 -0
  421. package/dist/chunk-xs0hwvpa.js +476 -0
  422. package/dist/chunk-xsq9ae7x.js +90 -0
  423. package/dist/chunk-xszk7n10.js +14358 -0
  424. package/dist/chunk-xv3era3s.js +8 -0
  425. package/dist/chunk-xyqr1cww.js +4389 -0
  426. package/dist/chunk-y1784krc.js +19 -0
  427. package/dist/chunk-y42a2xmv.js +1316 -0
  428. package/dist/chunk-y47cg3kz.js +42 -0
  429. package/dist/chunk-y56ckcf8.js +44 -0
  430. package/dist/chunk-ybgghjqa.js +602 -0
  431. package/dist/chunk-yt6z8030.js +810 -0
  432. package/dist/chunk-ytg914ra.js +28 -0
  433. package/dist/chunk-ywxd4qw4.js +22 -0
  434. package/dist/chunk-yym1e1dr.js +202 -0
  435. package/dist/chunk-z2dp53wn.js +17 -0
  436. package/dist/chunk-z4wtem3z.js +305 -0
  437. package/dist/chunk-zacq47b2.js +84 -0
  438. package/dist/chunk-ze747xz6.js +692 -0
  439. package/dist/chunk-zk2wsm7d.js +15 -0
  440. package/dist/chunk-zkmxtgc3.js +287 -0
  441. package/dist/chunk-zsfxha74.js +17655 -0
  442. package/dist/chunk-zv3hxg5y.js +267 -0
  443. package/dist/chunk-zw2x3xxq.js +96 -0
  444. package/dist/chunk-zyf9epwn.js +642 -0
  445. package/dist/chunk-zz21rvr7.js +27 -0
  446. package/dist/cli.js +81 -0
  447. package/package.json +165 -0
@@ -0,0 +1,1579 @@
1
+ // @bun
2
+ import {
3
+ StructuredDiff,
4
+ fetchGitDiff,
5
+ fetchGitDiffHunks,
6
+ init_StructuredDiff,
7
+ init_gitDiff,
8
+ init_overlayContext,
9
+ useRegisterOverlay
10
+ } from "./chunk-g9q2cznf.js";
11
+ import"./chunk-q1e6pzwh.js";
12
+ import"./chunk-201dvaa3.js";
13
+ import"./chunk-248szg6m.js";
14
+ import"./chunk-t0rgmccj.js";
15
+ import"./chunk-def1dc97.js";
16
+ import {
17
+ Byline,
18
+ Dialog,
19
+ init_Byline,
20
+ init_Dialog,
21
+ init_useShortcutDisplay,
22
+ useShortcutDisplay
23
+ } from "./chunk-9egdc8n4.js";
24
+ import"./chunk-ehtwnxpg.js";
25
+ import"./chunk-b0105v1f.js";
26
+ import"./chunk-hgtf13es.js";
27
+ import"./chunk-3be7ka25.js";
28
+ import"./chunk-rcdpvnxh.js";
29
+ import"./chunk-2gzv8nrw.js";
30
+ import"./chunk-45kxdsp8.js";
31
+ import"./chunk-cgfdkzhb.js";
32
+ import"./chunk-madfgr3n.js";
33
+ import"./chunk-pmzbyaat.js";
34
+ import"./chunk-9gbamk79.js";
35
+ import"./chunk-ha0xq3e9.js";
36
+ import"./chunk-hfzj1m07.js";
37
+ import {
38
+ Divider,
39
+ init_Divider,
40
+ init_useKeybinding,
41
+ init_useTerminalSize,
42
+ useKeybindings,
43
+ useTerminalSize
44
+ } from "./chunk-pvvew193.js";
45
+ import {
46
+ ThemedBox_default,
47
+ ThemedText,
48
+ init_ink,
49
+ require_compiler_runtime
50
+ } from "./chunk-8d5eyjse.js";
51
+ import"./chunk-7m2nd8da.js";
52
+ import"./chunk-ps49ymvj.js";
53
+ import {
54
+ require_jsx_dev_runtime,
55
+ require_react
56
+ } from "./chunk-g338npwr.js";
57
+ import"./chunk-2v1br2x0.js";
58
+ import"./chunk-zk2wsm7d.js";
59
+ import"./chunk-zkmxtgc3.js";
60
+ import"./chunk-m06q12hg.js";
61
+ import"./chunk-grdvmq7q.js";
62
+ import {
63
+ init_file,
64
+ init_stringUtils,
65
+ plural,
66
+ readFileSafe
67
+ } from "./chunk-7wm1rjfm.js";
68
+ import"./chunk-e3g8q4cn.js";
69
+ import"./chunk-ctw5jwcd.js";
70
+ import"./chunk-vratq94g.js";
71
+ import"./chunk-5hva0tsg.js";
72
+ import"./chunk-0e1xsncc.js";
73
+ import"./chunk-g0j0t6qk.js";
74
+ import"./chunk-3c25bcsw.js";
75
+ import"./chunk-tjaqa99q.js";
76
+ import"./chunk-55wgxwa9.js";
77
+ import"./chunk-spqaamnc.js";
78
+ import"./chunk-4jm600zv.js";
79
+ import"./chunk-w2z5pqd3.js";
80
+ import"./chunk-7ymfj7m3.js";
81
+ import"./chunk-f5ma3nh5.js";
82
+ import"./chunk-qz2x630m.js";
83
+ import"./chunk-cvge4pvp.js";
84
+ import"./chunk-p2816w9z.js";
85
+ import"./chunk-v9smspw2.js";
86
+ import"./chunk-v1kzp02e.js";
87
+ import"./chunk-0vkfrmqm.js";
88
+ import"./chunk-0xjaqda8.js";
89
+ import {
90
+ init_format,
91
+ truncateStartToWidth
92
+ } from "./chunk-x14dq3v1.js";
93
+ import"./chunk-cdz5yb0r.js";
94
+ import"./chunk-h0rbjg6x.js";
95
+ import"./chunk-7z8j9qfn.js";
96
+ import"./chunk-hrzerbfw.js";
97
+ import"./chunk-d18z9pna.js";
98
+ import"./chunk-qnfx3qtx.js";
99
+ import"./chunk-hjhc4cpt.js";
100
+ import"./chunk-vyc0rjyx.js";
101
+ import {
102
+ figures_default,
103
+ init_figures
104
+ } from "./chunk-hx2tr4ep.js";
105
+ import"./chunk-p7g7pf3f.js";
106
+ import"./chunk-8tnsngw2.js";
107
+ import {
108
+ getCwd,
109
+ init_cwd
110
+ } from "./chunk-8bedvdm1.js";
111
+ import"./chunk-7wm5s02e.js";
112
+ import"./chunk-nxsh6de2.js";
113
+ import"./chunk-fbv4apne.js";
114
+ import"./chunk-3r24h7t6.js";
115
+ import"./chunk-qqfa0dqg.js";
116
+ import"./chunk-hqmz36b3.js";
117
+ import"./chunk-4g3v8y12.js";
118
+ import"./chunk-7739pg2c.js";
119
+ import"./chunk-xszk7n10.js";
120
+ import"./chunk-sdj9b9wh.js";
121
+ import {
122
+ __esm,
123
+ __toESM
124
+ } from "./chunk-qp2qdcda.js";
125
+
126
+ // src/hooks/useDiffData.ts
127
+ function useDiffData() {
128
+ const [diffResult, setDiffResult] = import_react.useState(null);
129
+ const [hunks, setHunks] = import_react.useState(new Map);
130
+ const [loading, setLoading] = import_react.useState(true);
131
+ import_react.useEffect(() => {
132
+ let cancelled = false;
133
+ async function loadDiffData() {
134
+ try {
135
+ const [statsResult, hunksResult] = await Promise.all([
136
+ fetchGitDiff(),
137
+ fetchGitDiffHunks()
138
+ ]);
139
+ if (!cancelled) {
140
+ setDiffResult(statsResult);
141
+ setHunks(hunksResult);
142
+ setLoading(false);
143
+ }
144
+ } catch (_error) {
145
+ if (!cancelled) {
146
+ setDiffResult(null);
147
+ setHunks(new Map);
148
+ setLoading(false);
149
+ }
150
+ }
151
+ }
152
+ loadDiffData();
153
+ return () => {
154
+ cancelled = true;
155
+ };
156
+ }, []);
157
+ return import_react.useMemo(() => {
158
+ if (!diffResult) {
159
+ return { stats: null, files: [], hunks: new Map, loading };
160
+ }
161
+ const { stats, perFileStats } = diffResult;
162
+ const files = [];
163
+ for (const [path, fileStats] of perFileStats) {
164
+ const fileHunks = hunks.get(path);
165
+ const isUntracked = fileStats.isUntracked ?? false;
166
+ const isLargeFile = !fileStats.isBinary && !isUntracked && !fileHunks;
167
+ const totalLines = fileStats.added + fileStats.removed;
168
+ const isTruncated = !isLargeFile && !fileStats.isBinary && totalLines > MAX_LINES_PER_FILE;
169
+ files.push({
170
+ path,
171
+ linesAdded: fileStats.added,
172
+ linesRemoved: fileStats.removed,
173
+ isBinary: fileStats.isBinary,
174
+ isLargeFile,
175
+ isTruncated,
176
+ isUntracked
177
+ });
178
+ }
179
+ files.sort((a, b) => a.path.localeCompare(b.path));
180
+ return { stats, files, hunks, loading: false };
181
+ }, [diffResult, hunks, loading]);
182
+ }
183
+ var import_react, MAX_LINES_PER_FILE = 400;
184
+ var init_useDiffData = __esm(() => {
185
+ init_gitDiff();
186
+ import_react = __toESM(require_react(), 1);
187
+ });
188
+
189
+ // src/hooks/useTurnDiffs.ts
190
+ function isFileEditResult(result) {
191
+ if (!result || typeof result !== "object")
192
+ return false;
193
+ const r = result;
194
+ const hasFilePath = typeof r.filePath === "string";
195
+ const hasStructuredPatch = Array.isArray(r.structuredPatch) && r.structuredPatch.length > 0;
196
+ const isNewFile = r.type === "create" && typeof r.content === "string";
197
+ return hasFilePath && (hasStructuredPatch || isNewFile);
198
+ }
199
+ function isFileWriteOutput(result) {
200
+ return "type" in result && (result.type === "create" || result.type === "update");
201
+ }
202
+ function countHunkLines(hunks) {
203
+ let added = 0;
204
+ let removed = 0;
205
+ for (const hunk of hunks) {
206
+ for (const line of hunk.lines) {
207
+ if (line.startsWith("+"))
208
+ added++;
209
+ else if (line.startsWith("-"))
210
+ removed++;
211
+ }
212
+ }
213
+ return { added, removed };
214
+ }
215
+ function getUserPromptPreview(message) {
216
+ if (message.type !== "user")
217
+ return "";
218
+ const content = message.message.content;
219
+ const text = typeof content === "string" ? content : "";
220
+ if (text.length <= 30)
221
+ return text;
222
+ return text.slice(0, 29) + "\u2026";
223
+ }
224
+ function computeTurnStats(turn) {
225
+ let totalAdded = 0;
226
+ let totalRemoved = 0;
227
+ for (const file of turn.files.values()) {
228
+ totalAdded += file.linesAdded;
229
+ totalRemoved += file.linesRemoved;
230
+ }
231
+ turn.stats = {
232
+ filesChanged: turn.files.size,
233
+ linesAdded: totalAdded,
234
+ linesRemoved: totalRemoved
235
+ };
236
+ }
237
+ function useTurnDiffs(messages) {
238
+ const cache = import_react2.useRef({
239
+ completedTurns: [],
240
+ currentTurn: null,
241
+ lastProcessedIndex: 0,
242
+ lastTurnIndex: 0
243
+ });
244
+ return import_react2.useMemo(() => {
245
+ const c = cache.current;
246
+ if (messages.length < c.lastProcessedIndex) {
247
+ c.completedTurns = [];
248
+ c.currentTurn = null;
249
+ c.lastProcessedIndex = 0;
250
+ c.lastTurnIndex = 0;
251
+ }
252
+ for (let i = c.lastProcessedIndex;i < messages.length; i++) {
253
+ const message = messages[i];
254
+ if (!message || message.type !== "user")
255
+ continue;
256
+ const isToolResult = message.toolUseResult || Array.isArray(message.message.content) && message.message.content[0]?.type === "tool_result";
257
+ if (!isToolResult && !message.isMeta) {
258
+ if (c.currentTurn && c.currentTurn.files.size > 0) {
259
+ computeTurnStats(c.currentTurn);
260
+ c.completedTurns.push(c.currentTurn);
261
+ }
262
+ c.lastTurnIndex++;
263
+ c.currentTurn = {
264
+ turnIndex: c.lastTurnIndex,
265
+ userPromptPreview: getUserPromptPreview(message),
266
+ timestamp: message.timestamp,
267
+ files: new Map,
268
+ stats: { filesChanged: 0, linesAdded: 0, linesRemoved: 0 }
269
+ };
270
+ } else if (c.currentTurn && message.toolUseResult) {
271
+ const result2 = message.toolUseResult;
272
+ if (isFileEditResult(result2)) {
273
+ const { filePath, structuredPatch } = result2;
274
+ const isNewFile = "type" in result2 && result2.type === "create";
275
+ let fileEntry = c.currentTurn.files.get(filePath);
276
+ if (!fileEntry) {
277
+ fileEntry = {
278
+ filePath,
279
+ hunks: [],
280
+ isNewFile,
281
+ linesAdded: 0,
282
+ linesRemoved: 0
283
+ };
284
+ c.currentTurn.files.set(filePath, fileEntry);
285
+ }
286
+ if (isNewFile && structuredPatch.length === 0 && isFileWriteOutput(result2)) {
287
+ const content = result2.content;
288
+ const lines = content.split(`
289
+ `);
290
+ const syntheticHunk = {
291
+ oldStart: 0,
292
+ oldLines: 0,
293
+ newStart: 1,
294
+ newLines: lines.length,
295
+ lines: lines.map((l) => "+" + l)
296
+ };
297
+ fileEntry.hunks.push(syntheticHunk);
298
+ fileEntry.linesAdded += lines.length;
299
+ } else {
300
+ fileEntry.hunks.push(...structuredPatch);
301
+ const { added, removed } = countHunkLines(structuredPatch);
302
+ fileEntry.linesAdded += added;
303
+ fileEntry.linesRemoved += removed;
304
+ }
305
+ if (isNewFile) {
306
+ fileEntry.isNewFile = true;
307
+ }
308
+ }
309
+ }
310
+ }
311
+ c.lastProcessedIndex = messages.length;
312
+ const result = [...c.completedTurns];
313
+ if (c.currentTurn && c.currentTurn.files.size > 0) {
314
+ computeTurnStats(c.currentTurn);
315
+ result.push(c.currentTurn);
316
+ }
317
+ return result.reverse();
318
+ }, [messages]);
319
+ }
320
+ var import_react2;
321
+ var init_useTurnDiffs = __esm(() => {
322
+ import_react2 = __toESM(require_react(), 1);
323
+ });
324
+
325
+ // src/components/diff/DiffDetailView.tsx
326
+ import { resolve } from "path";
327
+ function DiffDetailView(t0) {
328
+ const $ = import_compiler_runtime.c(53);
329
+ const {
330
+ filePath,
331
+ hunks,
332
+ isLargeFile,
333
+ isBinary,
334
+ isTruncated,
335
+ isUntracked
336
+ } = t0;
337
+ const {
338
+ columns
339
+ } = useTerminalSize();
340
+ let t1;
341
+ bb0: {
342
+ if (!filePath) {
343
+ let t23;
344
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
345
+ t23 = {
346
+ firstLine: null,
347
+ fileContent: undefined
348
+ };
349
+ $[0] = t23;
350
+ } else {
351
+ t23 = $[0];
352
+ }
353
+ t1 = t23;
354
+ break bb0;
355
+ }
356
+ let content;
357
+ let t22;
358
+ if ($[1] !== filePath) {
359
+ const fullPath = resolve(getCwd(), filePath);
360
+ content = readFileSafe(fullPath);
361
+ t22 = content?.split(`
362
+ `)[0] ?? null;
363
+ $[1] = filePath;
364
+ $[2] = content;
365
+ $[3] = t22;
366
+ } else {
367
+ content = $[2];
368
+ t22 = $[3];
369
+ }
370
+ const t32 = content ?? undefined;
371
+ let t42;
372
+ if ($[4] !== t22 || $[5] !== t32) {
373
+ t42 = {
374
+ firstLine: t22,
375
+ fileContent: t32
376
+ };
377
+ $[4] = t22;
378
+ $[5] = t32;
379
+ $[6] = t42;
380
+ } else {
381
+ t42 = $[6];
382
+ }
383
+ t1 = t42;
384
+ }
385
+ const {
386
+ firstLine,
387
+ fileContent
388
+ } = t1;
389
+ if (isUntracked) {
390
+ let t22;
391
+ if ($[7] !== filePath) {
392
+ t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
393
+ bold: true,
394
+ children: filePath
395
+ }, undefined, false, undefined, this);
396
+ $[7] = filePath;
397
+ $[8] = t22;
398
+ } else {
399
+ t22 = $[8];
400
+ }
401
+ let t32;
402
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
403
+ t32 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
404
+ dimColor: true,
405
+ children: " (untracked)"
406
+ }, undefined, false, undefined, this);
407
+ $[9] = t32;
408
+ } else {
409
+ t32 = $[9];
410
+ }
411
+ let t42;
412
+ if ($[10] !== t22) {
413
+ t42 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
414
+ children: [
415
+ t22,
416
+ t32
417
+ ]
418
+ }, undefined, true, undefined, this);
419
+ $[10] = t22;
420
+ $[11] = t42;
421
+ } else {
422
+ t42 = $[11];
423
+ }
424
+ let t52;
425
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
426
+ t52 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
427
+ padding: 4
428
+ }, undefined, false, undefined, this);
429
+ $[12] = t52;
430
+ } else {
431
+ t52 = $[12];
432
+ }
433
+ let t62;
434
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
435
+ t62 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
436
+ dimColor: true,
437
+ italic: true,
438
+ children: "New file not yet staged."
439
+ }, undefined, false, undefined, this);
440
+ $[13] = t62;
441
+ } else {
442
+ t62 = $[13];
443
+ }
444
+ let t72;
445
+ if ($[14] !== filePath) {
446
+ t72 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
447
+ flexDirection: "column",
448
+ children: [
449
+ t62,
450
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
451
+ dimColor: true,
452
+ italic: true,
453
+ children: [
454
+ "Run `git add ",
455
+ filePath,
456
+ "` to see line counts."
457
+ ]
458
+ }, undefined, true, undefined, this)
459
+ ]
460
+ }, undefined, true, undefined, this);
461
+ $[14] = filePath;
462
+ $[15] = t72;
463
+ } else {
464
+ t72 = $[15];
465
+ }
466
+ let t82;
467
+ if ($[16] !== t42 || $[17] !== t72) {
468
+ t82 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
469
+ flexDirection: "column",
470
+ width: "100%",
471
+ children: [
472
+ t42,
473
+ t52,
474
+ t72
475
+ ]
476
+ }, undefined, true, undefined, this);
477
+ $[16] = t42;
478
+ $[17] = t72;
479
+ $[18] = t82;
480
+ } else {
481
+ t82 = $[18];
482
+ }
483
+ return t82;
484
+ }
485
+ if (isBinary) {
486
+ let t22;
487
+ if ($[19] !== filePath) {
488
+ t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
489
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
490
+ bold: true,
491
+ children: filePath
492
+ }, undefined, false, undefined, this)
493
+ }, undefined, false, undefined, this);
494
+ $[19] = filePath;
495
+ $[20] = t22;
496
+ } else {
497
+ t22 = $[20];
498
+ }
499
+ let t32;
500
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
501
+ t32 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
502
+ padding: 4
503
+ }, undefined, false, undefined, this);
504
+ $[21] = t32;
505
+ } else {
506
+ t32 = $[21];
507
+ }
508
+ let t42;
509
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
510
+ t42 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
511
+ flexDirection: "column",
512
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
513
+ dimColor: true,
514
+ italic: true,
515
+ children: "Binary file - cannot display diff"
516
+ }, undefined, false, undefined, this)
517
+ }, undefined, false, undefined, this);
518
+ $[22] = t42;
519
+ } else {
520
+ t42 = $[22];
521
+ }
522
+ let t52;
523
+ if ($[23] !== t22) {
524
+ t52 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
525
+ flexDirection: "column",
526
+ width: "100%",
527
+ children: [
528
+ t22,
529
+ t32,
530
+ t42
531
+ ]
532
+ }, undefined, true, undefined, this);
533
+ $[23] = t22;
534
+ $[24] = t52;
535
+ } else {
536
+ t52 = $[24];
537
+ }
538
+ return t52;
539
+ }
540
+ if (isLargeFile) {
541
+ let t22;
542
+ if ($[25] !== filePath) {
543
+ t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
544
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
545
+ bold: true,
546
+ children: filePath
547
+ }, undefined, false, undefined, this)
548
+ }, undefined, false, undefined, this);
549
+ $[25] = filePath;
550
+ $[26] = t22;
551
+ } else {
552
+ t22 = $[26];
553
+ }
554
+ let t32;
555
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
556
+ t32 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
557
+ padding: 4
558
+ }, undefined, false, undefined, this);
559
+ $[27] = t32;
560
+ } else {
561
+ t32 = $[27];
562
+ }
563
+ let t42;
564
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
565
+ t42 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
566
+ flexDirection: "column",
567
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
568
+ dimColor: true,
569
+ italic: true,
570
+ children: "Large file - diff exceeds 1 MB limit"
571
+ }, undefined, false, undefined, this)
572
+ }, undefined, false, undefined, this);
573
+ $[28] = t42;
574
+ } else {
575
+ t42 = $[28];
576
+ }
577
+ let t52;
578
+ if ($[29] !== t22) {
579
+ t52 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
580
+ flexDirection: "column",
581
+ width: "100%",
582
+ children: [
583
+ t22,
584
+ t32,
585
+ t42
586
+ ]
587
+ }, undefined, true, undefined, this);
588
+ $[29] = t22;
589
+ $[30] = t52;
590
+ } else {
591
+ t52 = $[30];
592
+ }
593
+ return t52;
594
+ }
595
+ let t2;
596
+ if ($[31] !== filePath) {
597
+ t2 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
598
+ bold: true,
599
+ children: filePath
600
+ }, undefined, false, undefined, this);
601
+ $[31] = filePath;
602
+ $[32] = t2;
603
+ } else {
604
+ t2 = $[32];
605
+ }
606
+ let t3;
607
+ if ($[33] !== isTruncated) {
608
+ t3 = isTruncated && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
609
+ dimColor: true,
610
+ children: " (truncated)"
611
+ }, undefined, false, undefined, this);
612
+ $[33] = isTruncated;
613
+ $[34] = t3;
614
+ } else {
615
+ t3 = $[34];
616
+ }
617
+ let t4;
618
+ if ($[35] !== t2 || $[36] !== t3) {
619
+ t4 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
620
+ children: [
621
+ t2,
622
+ t3
623
+ ]
624
+ }, undefined, true, undefined, this);
625
+ $[35] = t2;
626
+ $[36] = t3;
627
+ $[37] = t4;
628
+ } else {
629
+ t4 = $[37];
630
+ }
631
+ let t5;
632
+ if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
633
+ t5 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
634
+ padding: 4
635
+ }, undefined, false, undefined, this);
636
+ $[38] = t5;
637
+ } else {
638
+ t5 = $[38];
639
+ }
640
+ let t6;
641
+ if ($[39] !== columns || $[40] !== fileContent || $[41] !== filePath || $[42] !== firstLine || $[43] !== hunks) {
642
+ t6 = hunks.length === 0 ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
643
+ dimColor: true,
644
+ children: "No diff content"
645
+ }, undefined, false, undefined, this) : hunks.map((hunk, index) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(StructuredDiff, {
646
+ patch: hunk,
647
+ filePath,
648
+ firstLine,
649
+ fileContent,
650
+ dim: false,
651
+ width: columns - 2 - 2
652
+ }, index, false, undefined, this));
653
+ $[39] = columns;
654
+ $[40] = fileContent;
655
+ $[41] = filePath;
656
+ $[42] = firstLine;
657
+ $[43] = hunks;
658
+ $[44] = t6;
659
+ } else {
660
+ t6 = $[44];
661
+ }
662
+ let t7;
663
+ if ($[45] !== t6) {
664
+ t7 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
665
+ flexDirection: "column",
666
+ children: t6
667
+ }, undefined, false, undefined, this);
668
+ $[45] = t6;
669
+ $[46] = t7;
670
+ } else {
671
+ t7 = $[46];
672
+ }
673
+ let t8;
674
+ if ($[47] !== isTruncated) {
675
+ t8 = isTruncated && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
676
+ dimColor: true,
677
+ italic: true,
678
+ children: "\u2026 diff truncated (exceeded 400 line limit)"
679
+ }, undefined, false, undefined, this);
680
+ $[47] = isTruncated;
681
+ $[48] = t8;
682
+ } else {
683
+ t8 = $[48];
684
+ }
685
+ let t9;
686
+ if ($[49] !== t4 || $[50] !== t7 || $[51] !== t8) {
687
+ t9 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
688
+ flexDirection: "column",
689
+ width: "100%",
690
+ children: [
691
+ t4,
692
+ t5,
693
+ t7,
694
+ t8
695
+ ]
696
+ }, undefined, true, undefined, this);
697
+ $[49] = t4;
698
+ $[50] = t7;
699
+ $[51] = t8;
700
+ $[52] = t9;
701
+ } else {
702
+ t9 = $[52];
703
+ }
704
+ return t9;
705
+ }
706
+ var import_compiler_runtime, jsx_dev_runtime;
707
+ var init_DiffDetailView = __esm(() => {
708
+ init_useTerminalSize();
709
+ init_ink();
710
+ init_cwd();
711
+ init_file();
712
+ init_Divider();
713
+ init_StructuredDiff();
714
+ import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
715
+ jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
716
+ });
717
+
718
+ // src/components/diff/DiffFileList.tsx
719
+ function DiffFileList(t0) {
720
+ const $ = import_compiler_runtime2.c(36);
721
+ const {
722
+ files,
723
+ selectedIndex
724
+ } = t0;
725
+ const {
726
+ columns
727
+ } = useTerminalSize();
728
+ let t1;
729
+ bb0: {
730
+ if (files.length === 0 || files.length <= MAX_VISIBLE_FILES) {
731
+ let t23;
732
+ if ($[0] !== files.length) {
733
+ t23 = {
734
+ startIndex: 0,
735
+ endIndex: files.length
736
+ };
737
+ $[0] = files.length;
738
+ $[1] = t23;
739
+ } else {
740
+ t23 = $[1];
741
+ }
742
+ t1 = t23;
743
+ break bb0;
744
+ }
745
+ let start = Math.max(0, selectedIndex - Math.floor(MAX_VISIBLE_FILES / 2));
746
+ let end = start + MAX_VISIBLE_FILES;
747
+ if (end > files.length) {
748
+ end = files.length;
749
+ start = Math.max(0, end - MAX_VISIBLE_FILES);
750
+ }
751
+ let t22;
752
+ if ($[2] !== end || $[3] !== start) {
753
+ t22 = {
754
+ startIndex: start,
755
+ endIndex: end
756
+ };
757
+ $[2] = end;
758
+ $[3] = start;
759
+ $[4] = t22;
760
+ } else {
761
+ t22 = $[4];
762
+ }
763
+ t1 = t22;
764
+ }
765
+ const {
766
+ startIndex,
767
+ endIndex
768
+ } = t1;
769
+ if (files.length === 0) {
770
+ let t22;
771
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
772
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
773
+ dimColor: true,
774
+ children: "No changed files"
775
+ }, undefined, false, undefined, this);
776
+ $[5] = t22;
777
+ } else {
778
+ t22 = $[5];
779
+ }
780
+ return t22;
781
+ }
782
+ let T0;
783
+ let hasMoreBelow;
784
+ let needsPagination;
785
+ let t2;
786
+ let t3;
787
+ let t4;
788
+ if ($[6] !== columns || $[7] !== endIndex || $[8] !== files || $[9] !== selectedIndex || $[10] !== startIndex) {
789
+ const visibleFiles = files.slice(startIndex, endIndex);
790
+ const hasMoreAbove = startIndex > 0;
791
+ hasMoreBelow = endIndex < files.length;
792
+ needsPagination = files.length > MAX_VISIBLE_FILES;
793
+ const maxPathWidth = Math.max(20, columns - 16 - 3 - 4);
794
+ T0 = ThemedBox_default;
795
+ t2 = "column";
796
+ if ($[17] !== hasMoreAbove || $[18] !== needsPagination || $[19] !== startIndex) {
797
+ t3 = needsPagination && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
798
+ dimColor: true,
799
+ children: hasMoreAbove ? ` \u2191 ${startIndex} more ${plural(startIndex, "file")}` : " "
800
+ }, undefined, false, undefined, this);
801
+ $[17] = hasMoreAbove;
802
+ $[18] = needsPagination;
803
+ $[19] = startIndex;
804
+ $[20] = t3;
805
+ } else {
806
+ t3 = $[20];
807
+ }
808
+ let t52;
809
+ if ($[21] !== maxPathWidth || $[22] !== selectedIndex || $[23] !== startIndex) {
810
+ t52 = (file, index) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(FileItem, {
811
+ file,
812
+ isSelected: startIndex + index === selectedIndex,
813
+ maxPathWidth
814
+ }, file.path, false, undefined, this);
815
+ $[21] = maxPathWidth;
816
+ $[22] = selectedIndex;
817
+ $[23] = startIndex;
818
+ $[24] = t52;
819
+ } else {
820
+ t52 = $[24];
821
+ }
822
+ t4 = visibleFiles.map(t52);
823
+ $[6] = columns;
824
+ $[7] = endIndex;
825
+ $[8] = files;
826
+ $[9] = selectedIndex;
827
+ $[10] = startIndex;
828
+ $[11] = T0;
829
+ $[12] = hasMoreBelow;
830
+ $[13] = needsPagination;
831
+ $[14] = t2;
832
+ $[15] = t3;
833
+ $[16] = t4;
834
+ } else {
835
+ T0 = $[11];
836
+ hasMoreBelow = $[12];
837
+ needsPagination = $[13];
838
+ t2 = $[14];
839
+ t3 = $[15];
840
+ t4 = $[16];
841
+ }
842
+ let t5;
843
+ if ($[25] !== endIndex || $[26] !== files.length || $[27] !== hasMoreBelow || $[28] !== needsPagination) {
844
+ t5 = needsPagination && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
845
+ dimColor: true,
846
+ children: hasMoreBelow ? ` \u2193 ${files.length - endIndex} more ${plural(files.length - endIndex, "file")}` : " "
847
+ }, undefined, false, undefined, this);
848
+ $[25] = endIndex;
849
+ $[26] = files.length;
850
+ $[27] = hasMoreBelow;
851
+ $[28] = needsPagination;
852
+ $[29] = t5;
853
+ } else {
854
+ t5 = $[29];
855
+ }
856
+ let t6;
857
+ if ($[30] !== T0 || $[31] !== t2 || $[32] !== t3 || $[33] !== t4 || $[34] !== t5) {
858
+ t6 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(T0, {
859
+ flexDirection: t2,
860
+ children: [
861
+ t3,
862
+ t4,
863
+ t5
864
+ ]
865
+ }, undefined, true, undefined, this);
866
+ $[30] = T0;
867
+ $[31] = t2;
868
+ $[32] = t3;
869
+ $[33] = t4;
870
+ $[34] = t5;
871
+ $[35] = t6;
872
+ } else {
873
+ t6 = $[35];
874
+ }
875
+ return t6;
876
+ }
877
+ function FileItem(t0) {
878
+ const $ = import_compiler_runtime2.c(14);
879
+ const {
880
+ file,
881
+ isSelected,
882
+ maxPathWidth
883
+ } = t0;
884
+ let t1;
885
+ if ($[0] !== file.path || $[1] !== maxPathWidth) {
886
+ t1 = truncateStartToWidth(file.path, maxPathWidth);
887
+ $[0] = file.path;
888
+ $[1] = maxPathWidth;
889
+ $[2] = t1;
890
+ } else {
891
+ t1 = $[2];
892
+ }
893
+ const displayPath = t1;
894
+ const pointer = isSelected ? figures_default.pointer + " " : " ";
895
+ const line = `${pointer}${displayPath}`;
896
+ const t2 = isSelected ? "background" : undefined;
897
+ let t3;
898
+ if ($[3] !== isSelected || $[4] !== line || $[5] !== t2) {
899
+ t3 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
900
+ bold: isSelected,
901
+ color: t2,
902
+ inverse: isSelected,
903
+ children: line
904
+ }, undefined, false, undefined, this);
905
+ $[3] = isSelected;
906
+ $[4] = line;
907
+ $[5] = t2;
908
+ $[6] = t3;
909
+ } else {
910
+ t3 = $[6];
911
+ }
912
+ let t4;
913
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
914
+ t4 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
915
+ flexGrow: 1
916
+ }, undefined, false, undefined, this);
917
+ $[7] = t4;
918
+ } else {
919
+ t4 = $[7];
920
+ }
921
+ let t5;
922
+ if ($[8] !== file || $[9] !== isSelected) {
923
+ t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(FileStats, {
924
+ file,
925
+ isSelected
926
+ }, undefined, false, undefined, this);
927
+ $[8] = file;
928
+ $[9] = isSelected;
929
+ $[10] = t5;
930
+ } else {
931
+ t5 = $[10];
932
+ }
933
+ let t6;
934
+ if ($[11] !== t3 || $[12] !== t5) {
935
+ t6 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
936
+ flexDirection: "row",
937
+ children: [
938
+ t3,
939
+ t4,
940
+ t5
941
+ ]
942
+ }, undefined, true, undefined, this);
943
+ $[11] = t3;
944
+ $[12] = t5;
945
+ $[13] = t6;
946
+ } else {
947
+ t6 = $[13];
948
+ }
949
+ return t6;
950
+ }
951
+ function FileStats(t0) {
952
+ const $ = import_compiler_runtime2.c(20);
953
+ const {
954
+ file,
955
+ isSelected
956
+ } = t0;
957
+ if (file.isUntracked) {
958
+ const t12 = !isSelected;
959
+ let t22;
960
+ if ($[0] !== t12) {
961
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
962
+ dimColor: t12,
963
+ italic: true,
964
+ children: "untracked"
965
+ }, undefined, false, undefined, this);
966
+ $[0] = t12;
967
+ $[1] = t22;
968
+ } else {
969
+ t22 = $[1];
970
+ }
971
+ return t22;
972
+ }
973
+ if (file.isBinary) {
974
+ const t12 = !isSelected;
975
+ let t22;
976
+ if ($[2] !== t12) {
977
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
978
+ dimColor: t12,
979
+ italic: true,
980
+ children: "Binary file"
981
+ }, undefined, false, undefined, this);
982
+ $[2] = t12;
983
+ $[3] = t22;
984
+ } else {
985
+ t22 = $[3];
986
+ }
987
+ return t22;
988
+ }
989
+ if (file.isLargeFile) {
990
+ const t12 = !isSelected;
991
+ let t22;
992
+ if ($[4] !== t12) {
993
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
994
+ dimColor: t12,
995
+ italic: true,
996
+ children: "Large file modified"
997
+ }, undefined, false, undefined, this);
998
+ $[4] = t12;
999
+ $[5] = t22;
1000
+ } else {
1001
+ t22 = $[5];
1002
+ }
1003
+ return t22;
1004
+ }
1005
+ let t1;
1006
+ if ($[6] !== file.linesAdded || $[7] !== isSelected) {
1007
+ t1 = file.linesAdded > 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1008
+ color: "diffAddedWord",
1009
+ bold: isSelected,
1010
+ children: [
1011
+ "+",
1012
+ file.linesAdded
1013
+ ]
1014
+ }, undefined, true, undefined, this);
1015
+ $[6] = file.linesAdded;
1016
+ $[7] = isSelected;
1017
+ $[8] = t1;
1018
+ } else {
1019
+ t1 = $[8];
1020
+ }
1021
+ const t2 = file.linesAdded > 0 && file.linesRemoved > 0 && " ";
1022
+ let t3;
1023
+ if ($[9] !== file.linesRemoved || $[10] !== isSelected) {
1024
+ t3 = file.linesRemoved > 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1025
+ color: "diffRemovedWord",
1026
+ bold: isSelected,
1027
+ children: [
1028
+ "-",
1029
+ file.linesRemoved
1030
+ ]
1031
+ }, undefined, true, undefined, this);
1032
+ $[9] = file.linesRemoved;
1033
+ $[10] = isSelected;
1034
+ $[11] = t3;
1035
+ } else {
1036
+ t3 = $[11];
1037
+ }
1038
+ let t4;
1039
+ if ($[12] !== file.isTruncated || $[13] !== isSelected) {
1040
+ t4 = file.isTruncated && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1041
+ dimColor: !isSelected,
1042
+ children: " (truncated)"
1043
+ }, undefined, false, undefined, this);
1044
+ $[12] = file.isTruncated;
1045
+ $[13] = isSelected;
1046
+ $[14] = t4;
1047
+ } else {
1048
+ t4 = $[14];
1049
+ }
1050
+ let t5;
1051
+ if ($[15] !== t1 || $[16] !== t2 || $[17] !== t3 || $[18] !== t4) {
1052
+ t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1053
+ children: [
1054
+ t1,
1055
+ t2,
1056
+ t3,
1057
+ t4
1058
+ ]
1059
+ }, undefined, true, undefined, this);
1060
+ $[15] = t1;
1061
+ $[16] = t2;
1062
+ $[17] = t3;
1063
+ $[18] = t4;
1064
+ $[19] = t5;
1065
+ } else {
1066
+ t5 = $[19];
1067
+ }
1068
+ return t5;
1069
+ }
1070
+ var import_compiler_runtime2, jsx_dev_runtime2, MAX_VISIBLE_FILES = 5;
1071
+ var init_DiffFileList = __esm(() => {
1072
+ init_figures();
1073
+ init_useTerminalSize();
1074
+ init_ink();
1075
+ init_format();
1076
+ init_stringUtils();
1077
+ import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
1078
+ jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
1079
+ });
1080
+
1081
+ // src/components/diff/DiffDialog.tsx
1082
+ function turnDiffToDiffData(turn) {
1083
+ const files = Array.from(turn.files.values()).map((f) => ({
1084
+ path: f.filePath,
1085
+ linesAdded: f.linesAdded,
1086
+ linesRemoved: f.linesRemoved,
1087
+ isBinary: false,
1088
+ isLargeFile: false,
1089
+ isTruncated: false,
1090
+ isNewFile: f.isNewFile
1091
+ })).sort((a, b) => a.path.localeCompare(b.path));
1092
+ const hunks = new Map;
1093
+ for (const f of turn.files.values()) {
1094
+ hunks.set(f.filePath, f.hunks);
1095
+ }
1096
+ return {
1097
+ stats: {
1098
+ filesCount: turn.stats.filesChanged,
1099
+ linesAdded: turn.stats.linesAdded,
1100
+ linesRemoved: turn.stats.linesRemoved
1101
+ },
1102
+ files,
1103
+ hunks,
1104
+ loading: false
1105
+ };
1106
+ }
1107
+ function DiffDialog(t0) {
1108
+ const $ = import_compiler_runtime3.c(73);
1109
+ const {
1110
+ messages,
1111
+ onDone
1112
+ } = t0;
1113
+ const gitDiffData = useDiffData();
1114
+ const turnDiffs = useTurnDiffs(messages);
1115
+ const [viewMode, setViewMode] = import_react3.useState("list");
1116
+ const [selectedIndex, setSelectedIndex] = import_react3.useState(0);
1117
+ const [sourceIndex, setSourceIndex] = import_react3.useState(0);
1118
+ let t1;
1119
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1120
+ t1 = {
1121
+ type: "current"
1122
+ };
1123
+ $[0] = t1;
1124
+ } else {
1125
+ t1 = $[0];
1126
+ }
1127
+ let t2;
1128
+ if ($[1] !== turnDiffs) {
1129
+ t2 = [t1, ...turnDiffs.map(_temp)];
1130
+ $[1] = turnDiffs;
1131
+ $[2] = t2;
1132
+ } else {
1133
+ t2 = $[2];
1134
+ }
1135
+ const sources = t2;
1136
+ const currentSource = sources[sourceIndex];
1137
+ const currentTurn = currentSource?.type === "turn" ? currentSource.turn : null;
1138
+ let t3;
1139
+ if ($[3] !== currentTurn || $[4] !== gitDiffData) {
1140
+ t3 = currentTurn ? turnDiffToDiffData(currentTurn) : gitDiffData;
1141
+ $[3] = currentTurn;
1142
+ $[4] = gitDiffData;
1143
+ $[5] = t3;
1144
+ } else {
1145
+ t3 = $[5];
1146
+ }
1147
+ const diffData = t3;
1148
+ const selectedFile = diffData.files[selectedIndex];
1149
+ let t4;
1150
+ if ($[6] !== diffData.hunks || $[7] !== selectedFile) {
1151
+ t4 = selectedFile ? diffData.hunks.get(selectedFile.path) || [] : [];
1152
+ $[6] = diffData.hunks;
1153
+ $[7] = selectedFile;
1154
+ $[8] = t4;
1155
+ } else {
1156
+ t4 = $[8];
1157
+ }
1158
+ const selectedHunks = t4;
1159
+ let t5;
1160
+ let t6;
1161
+ if ($[9] !== sourceIndex || $[10] !== sources.length) {
1162
+ t5 = () => {
1163
+ if (sourceIndex >= sources.length) {
1164
+ setSourceIndex(Math.max(0, sources.length - 1));
1165
+ }
1166
+ };
1167
+ t6 = [sources.length, sourceIndex];
1168
+ $[9] = sourceIndex;
1169
+ $[10] = sources.length;
1170
+ $[11] = t5;
1171
+ $[12] = t6;
1172
+ } else {
1173
+ t5 = $[11];
1174
+ t6 = $[12];
1175
+ }
1176
+ import_react3.useEffect(t5, t6);
1177
+ const prevSourceIndex = import_react3.useRef(sourceIndex);
1178
+ let t7;
1179
+ let t8;
1180
+ if ($[13] !== sourceIndex) {
1181
+ t7 = () => {
1182
+ if (prevSourceIndex.current !== sourceIndex) {
1183
+ setSelectedIndex(0);
1184
+ prevSourceIndex.current = sourceIndex;
1185
+ }
1186
+ };
1187
+ t8 = [sourceIndex];
1188
+ $[13] = sourceIndex;
1189
+ $[14] = t7;
1190
+ $[15] = t8;
1191
+ } else {
1192
+ t7 = $[14];
1193
+ t8 = $[15];
1194
+ }
1195
+ import_react3.useEffect(t7, t8);
1196
+ useRegisterOverlay("diff-dialog", undefined);
1197
+ let t10;
1198
+ let t9;
1199
+ if ($[16] !== sources.length || $[17] !== viewMode) {
1200
+ t9 = () => {
1201
+ if (viewMode === "detail") {
1202
+ setViewMode("list");
1203
+ } else {
1204
+ if (viewMode === "list" && sources.length > 1) {
1205
+ setSourceIndex(_temp2);
1206
+ }
1207
+ }
1208
+ };
1209
+ t10 = () => {
1210
+ if (viewMode === "list" && sources.length > 1) {
1211
+ setSourceIndex((prev_0) => Math.min(sources.length - 1, prev_0 + 1));
1212
+ }
1213
+ };
1214
+ $[16] = sources.length;
1215
+ $[17] = viewMode;
1216
+ $[18] = t10;
1217
+ $[19] = t9;
1218
+ } else {
1219
+ t10 = $[18];
1220
+ t9 = $[19];
1221
+ }
1222
+ let t11;
1223
+ if ($[20] !== viewMode) {
1224
+ t11 = () => {
1225
+ if (viewMode === "detail") {
1226
+ setViewMode("list");
1227
+ }
1228
+ };
1229
+ $[20] = viewMode;
1230
+ $[21] = t11;
1231
+ } else {
1232
+ t11 = $[21];
1233
+ }
1234
+ let t12;
1235
+ if ($[22] !== selectedFile || $[23] !== viewMode) {
1236
+ t12 = () => {
1237
+ if (viewMode === "list" && selectedFile) {
1238
+ setViewMode("detail");
1239
+ }
1240
+ };
1241
+ $[22] = selectedFile;
1242
+ $[23] = viewMode;
1243
+ $[24] = t12;
1244
+ } else {
1245
+ t12 = $[24];
1246
+ }
1247
+ let t13;
1248
+ if ($[25] !== viewMode) {
1249
+ t13 = () => {
1250
+ if (viewMode === "list") {
1251
+ setSelectedIndex(_temp3);
1252
+ }
1253
+ };
1254
+ $[25] = viewMode;
1255
+ $[26] = t13;
1256
+ } else {
1257
+ t13 = $[26];
1258
+ }
1259
+ let t14;
1260
+ if ($[27] !== diffData.files.length || $[28] !== viewMode) {
1261
+ t14 = () => {
1262
+ if (viewMode === "list") {
1263
+ setSelectedIndex((prev_2) => Math.min(diffData.files.length - 1, prev_2 + 1));
1264
+ }
1265
+ };
1266
+ $[27] = diffData.files.length;
1267
+ $[28] = viewMode;
1268
+ $[29] = t14;
1269
+ } else {
1270
+ t14 = $[29];
1271
+ }
1272
+ let t15;
1273
+ if ($[30] !== t10 || $[31] !== t11 || $[32] !== t12 || $[33] !== t13 || $[34] !== t14 || $[35] !== t9) {
1274
+ t15 = {
1275
+ "diff:previousSource": t9,
1276
+ "diff:nextSource": t10,
1277
+ "diff:back": t11,
1278
+ "diff:viewDetails": t12,
1279
+ "diff:previousFile": t13,
1280
+ "diff:nextFile": t14
1281
+ };
1282
+ $[30] = t10;
1283
+ $[31] = t11;
1284
+ $[32] = t12;
1285
+ $[33] = t13;
1286
+ $[34] = t14;
1287
+ $[35] = t9;
1288
+ $[36] = t15;
1289
+ } else {
1290
+ t15 = $[36];
1291
+ }
1292
+ let t16;
1293
+ if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
1294
+ t16 = {
1295
+ context: "DiffDialog"
1296
+ };
1297
+ $[37] = t16;
1298
+ } else {
1299
+ t16 = $[37];
1300
+ }
1301
+ useKeybindings(t15, t16);
1302
+ let t17;
1303
+ if ($[38] !== diffData.stats) {
1304
+ t17 = diffData.stats ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1305
+ dimColor: true,
1306
+ children: [
1307
+ diffData.stats.filesCount,
1308
+ " ",
1309
+ plural(diffData.stats.filesCount, "file"),
1310
+ " ",
1311
+ "changed",
1312
+ diffData.stats.linesAdded > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1313
+ color: "diffAddedWord",
1314
+ children: [
1315
+ " +",
1316
+ diffData.stats.linesAdded
1317
+ ]
1318
+ }, undefined, true, undefined, this),
1319
+ diffData.stats.linesRemoved > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1320
+ color: "diffRemovedWord",
1321
+ children: [
1322
+ " -",
1323
+ diffData.stats.linesRemoved
1324
+ ]
1325
+ }, undefined, true, undefined, this)
1326
+ ]
1327
+ }, undefined, true, undefined, this) : null;
1328
+ $[38] = diffData.stats;
1329
+ $[39] = t17;
1330
+ } else {
1331
+ t17 = $[39];
1332
+ }
1333
+ const subtitle = t17;
1334
+ const headerTitle = currentTurn ? `Turn ${currentTurn.turnIndex}` : "Uncommitted changes";
1335
+ const headerSubtitle = currentTurn ? currentTurn.userPromptPreview ? `"${currentTurn.userPromptPreview}"` : "" : "(git diff HEAD)";
1336
+ let t18;
1337
+ if ($[40] !== sourceIndex || $[41] !== sources) {
1338
+ t18 = sources.length > 1 ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1339
+ children: [
1340
+ sourceIndex > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1341
+ dimColor: true,
1342
+ children: "\u25C0 "
1343
+ }, undefined, false, undefined, this),
1344
+ sources.map((source, i) => {
1345
+ const isSelected = i === sourceIndex;
1346
+ const label = source.type === "current" ? "Current" : `T${source.turn.turnIndex}`;
1347
+ return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1348
+ dimColor: !isSelected,
1349
+ bold: isSelected,
1350
+ children: [
1351
+ i > 0 ? " \xB7 " : "",
1352
+ label
1353
+ ]
1354
+ }, i, true, undefined, this);
1355
+ }),
1356
+ sourceIndex < sources.length - 1 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1357
+ dimColor: true,
1358
+ children: " \u25B6"
1359
+ }, undefined, false, undefined, this)
1360
+ ]
1361
+ }, undefined, true, undefined, this) : null;
1362
+ $[40] = sourceIndex;
1363
+ $[41] = sources;
1364
+ $[42] = t18;
1365
+ } else {
1366
+ t18 = $[42];
1367
+ }
1368
+ const sourceSelector = t18;
1369
+ const dismissShortcut = useShortcutDisplay("diff:dismiss", "DiffDialog", "esc");
1370
+ let t19;
1371
+ bb0: {
1372
+ if (diffData.loading) {
1373
+ t19 = "Loading diff\u2026";
1374
+ break bb0;
1375
+ }
1376
+ if (currentTurn) {
1377
+ t19 = "No file changes in this turn";
1378
+ break bb0;
1379
+ }
1380
+ if (diffData.stats && diffData.stats.filesCount > 0 && diffData.files.length === 0) {
1381
+ t19 = "Too many files to display details";
1382
+ break bb0;
1383
+ }
1384
+ t19 = "Working tree is clean";
1385
+ }
1386
+ const emptyMessage = t19;
1387
+ let t20;
1388
+ if ($[43] !== headerSubtitle) {
1389
+ t20 = headerSubtitle && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1390
+ dimColor: true,
1391
+ children: [
1392
+ " ",
1393
+ headerSubtitle
1394
+ ]
1395
+ }, undefined, true, undefined, this);
1396
+ $[43] = headerSubtitle;
1397
+ $[44] = t20;
1398
+ } else {
1399
+ t20 = $[44];
1400
+ }
1401
+ let t21;
1402
+ if ($[45] !== headerTitle || $[46] !== t20) {
1403
+ t21 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1404
+ children: [
1405
+ headerTitle,
1406
+ t20
1407
+ ]
1408
+ }, undefined, true, undefined, this);
1409
+ $[45] = headerTitle;
1410
+ $[46] = t20;
1411
+ $[47] = t21;
1412
+ } else {
1413
+ t21 = $[47];
1414
+ }
1415
+ const title = t21;
1416
+ let t22;
1417
+ if ($[48] !== onDone || $[49] !== viewMode) {
1418
+ t22 = function handleCancel2() {
1419
+ if (viewMode === "detail") {
1420
+ setViewMode("list");
1421
+ } else {
1422
+ onDone("Diff dialog dismissed", {
1423
+ display: "system"
1424
+ });
1425
+ }
1426
+ };
1427
+ $[48] = onDone;
1428
+ $[49] = viewMode;
1429
+ $[50] = t22;
1430
+ } else {
1431
+ t22 = $[50];
1432
+ }
1433
+ const handleCancel = t22;
1434
+ let t23;
1435
+ if ($[51] !== dismissShortcut || $[52] !== sources.length || $[53] !== viewMode) {
1436
+ t23 = (exitState) => exitState.pending ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1437
+ children: [
1438
+ "Press ",
1439
+ exitState.keyName,
1440
+ " again to exit"
1441
+ ]
1442
+ }, undefined, true, undefined, this) : viewMode === "list" ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Byline, {
1443
+ children: [
1444
+ sources.length > 1 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1445
+ children: "\u2190/\u2192 source"
1446
+ }, undefined, false, undefined, this),
1447
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1448
+ children: "\u2191/\u2193 select"
1449
+ }, undefined, false, undefined, this),
1450
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1451
+ children: "Enter view"
1452
+ }, undefined, false, undefined, this),
1453
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1454
+ children: [
1455
+ dismissShortcut,
1456
+ " close"
1457
+ ]
1458
+ }, undefined, true, undefined, this)
1459
+ ]
1460
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Byline, {
1461
+ children: [
1462
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1463
+ children: "\u2190 back"
1464
+ }, undefined, false, undefined, this),
1465
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1466
+ children: [
1467
+ dismissShortcut,
1468
+ " close"
1469
+ ]
1470
+ }, undefined, true, undefined, this)
1471
+ ]
1472
+ }, undefined, true, undefined, this);
1473
+ $[51] = dismissShortcut;
1474
+ $[52] = sources.length;
1475
+ $[53] = viewMode;
1476
+ $[54] = t23;
1477
+ } else {
1478
+ t23 = $[54];
1479
+ }
1480
+ let t24;
1481
+ if ($[55] !== diffData.files || $[56] !== emptyMessage || $[57] !== selectedFile?.isBinary || $[58] !== selectedFile?.isLargeFile || $[59] !== selectedFile?.isTruncated || $[60] !== selectedFile?.isUntracked || $[61] !== selectedFile?.path || $[62] !== selectedHunks || $[63] !== selectedIndex || $[64] !== viewMode) {
1482
+ t24 = diffData.files.length === 0 ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1483
+ marginTop: 1,
1484
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1485
+ dimColor: true,
1486
+ children: emptyMessage
1487
+ }, undefined, false, undefined, this)
1488
+ }, undefined, false, undefined, this) : viewMode === "list" ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1489
+ flexDirection: "column",
1490
+ marginTop: 1,
1491
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(DiffFileList, {
1492
+ files: diffData.files,
1493
+ selectedIndex
1494
+ }, undefined, false, undefined, this)
1495
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1496
+ flexDirection: "column",
1497
+ marginTop: 1,
1498
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(DiffDetailView, {
1499
+ filePath: selectedFile?.path || "",
1500
+ hunks: selectedHunks,
1501
+ isLargeFile: selectedFile?.isLargeFile,
1502
+ isBinary: selectedFile?.isBinary,
1503
+ isTruncated: selectedFile?.isTruncated,
1504
+ isUntracked: selectedFile?.isUntracked
1505
+ }, undefined, false, undefined, this)
1506
+ }, undefined, false, undefined, this);
1507
+ $[55] = diffData.files;
1508
+ $[56] = emptyMessage;
1509
+ $[57] = selectedFile?.isBinary;
1510
+ $[58] = selectedFile?.isLargeFile;
1511
+ $[59] = selectedFile?.isTruncated;
1512
+ $[60] = selectedFile?.isUntracked;
1513
+ $[61] = selectedFile?.path;
1514
+ $[62] = selectedHunks;
1515
+ $[63] = selectedIndex;
1516
+ $[64] = viewMode;
1517
+ $[65] = t24;
1518
+ } else {
1519
+ t24 = $[65];
1520
+ }
1521
+ let t25;
1522
+ if ($[66] !== handleCancel || $[67] !== sourceSelector || $[68] !== subtitle || $[69] !== t23 || $[70] !== t24 || $[71] !== title) {
1523
+ t25 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Dialog, {
1524
+ title,
1525
+ onCancel: handleCancel,
1526
+ color: "background",
1527
+ inputGuide: t23,
1528
+ children: [
1529
+ sourceSelector,
1530
+ subtitle,
1531
+ t24
1532
+ ]
1533
+ }, undefined, true, undefined, this);
1534
+ $[66] = handleCancel;
1535
+ $[67] = sourceSelector;
1536
+ $[68] = subtitle;
1537
+ $[69] = t23;
1538
+ $[70] = t24;
1539
+ $[71] = title;
1540
+ $[72] = t25;
1541
+ } else {
1542
+ t25 = $[72];
1543
+ }
1544
+ return t25;
1545
+ }
1546
+ function _temp3(prev_1) {
1547
+ return Math.max(0, prev_1 - 1);
1548
+ }
1549
+ function _temp2(prev) {
1550
+ return Math.max(0, prev - 1);
1551
+ }
1552
+ function _temp(turn) {
1553
+ return {
1554
+ type: "turn",
1555
+ turn
1556
+ };
1557
+ }
1558
+ var import_compiler_runtime3, import_react3, jsx_dev_runtime3;
1559
+ var init_DiffDialog = __esm(() => {
1560
+ init_overlayContext();
1561
+ init_useDiffData();
1562
+ init_useTurnDiffs();
1563
+ init_ink();
1564
+ init_useKeybinding();
1565
+ init_useShortcutDisplay();
1566
+ init_stringUtils();
1567
+ init_Byline();
1568
+ init_Dialog();
1569
+ init_DiffDetailView();
1570
+ init_DiffFileList();
1571
+ import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
1572
+ import_react3 = __toESM(require_react(), 1);
1573
+ jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
1574
+ });
1575
+ init_DiffDialog();
1576
+
1577
+ export {
1578
+ DiffDialog
1579
+ };