@foxclicom/foxcli 2.1.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. package/README.md +398 -0
  2. package/bun.lock +2090 -0
  3. package/dist/chunk-003e621m.js +247 -0
  4. package/dist/chunk-04he5cyw.js +169 -0
  5. package/dist/chunk-05gpckd1.js +56 -0
  6. package/dist/chunk-06saje2v.js +39 -0
  7. package/dist/chunk-0731m51q.js +8 -0
  8. package/dist/chunk-098tvb6a.js +490 -0
  9. package/dist/chunk-0akzpfxc.js +117 -0
  10. package/dist/chunk-0dvq0q4g.js +780 -0
  11. package/dist/chunk-0e1xsncc.js +969 -0
  12. package/dist/chunk-0jp9x1pk.js +227 -0
  13. package/dist/chunk-0kep06pv.js +94 -0
  14. package/dist/chunk-0paqc2yw.js +15 -0
  15. package/dist/chunk-0vkfrmqm.js +690 -0
  16. package/dist/chunk-0xjaqda8.js +1124 -0
  17. package/dist/chunk-0yhfpays.js +116 -0
  18. package/dist/chunk-1141xmr4.js +8 -0
  19. package/dist/chunk-14cmss9n.js +655 -0
  20. package/dist/chunk-14nvhjrk.js +280 -0
  21. package/dist/chunk-15ah5bdg.js +17 -0
  22. package/dist/chunk-15tdhhv6.js +97 -0
  23. package/dist/chunk-1c5jv610.js +174 -0
  24. package/dist/chunk-1cbn5kxf.js +7 -0
  25. package/dist/chunk-1fvkskfd.js +432 -0
  26. package/dist/chunk-1fz2kv26.js +85 -0
  27. package/dist/chunk-1h2famwb.js +49 -0
  28. package/dist/chunk-1vwfagpe.js +83 -0
  29. package/dist/chunk-1xkekb9y.js +19 -0
  30. package/dist/chunk-1xy3xzsc.js +9300 -0
  31. package/dist/chunk-238g70xa.js +36 -0
  32. package/dist/chunk-24w0h1qk.js +339 -0
  33. package/dist/chunk-24z6z01r.js +40 -0
  34. package/dist/chunk-27xc1csx.js +104 -0
  35. package/dist/chunk-2a42s11t.js +412 -0
  36. package/dist/chunk-2eavn925.js +5011 -0
  37. package/dist/chunk-2eykm0j0.js +20 -0
  38. package/dist/chunk-2gzv8nrw.js +205 -0
  39. package/dist/chunk-2j3ydfmm.js +208 -0
  40. package/dist/chunk-2k995y2x.js +880 -0
  41. package/dist/chunk-2kg4d2c7.js +601 -0
  42. package/dist/chunk-2n877dxb.js +224 -0
  43. package/dist/chunk-2nayx6q1.js +63 -0
  44. package/dist/chunk-2t3vw4tx.js +22820 -0
  45. package/dist/chunk-2tw2ve8h.js +145 -0
  46. package/dist/chunk-2zsew1hs.js +73 -0
  47. package/dist/chunk-30rst83v.js +168 -0
  48. package/dist/chunk-341888tq.js +102 -0
  49. package/dist/chunk-348de018.js +26 -0
  50. package/dist/chunk-363p49h1.js +172719 -0
  51. package/dist/chunk-387ggdb2.js +195 -0
  52. package/dist/chunk-3be7ka25.js +56 -0
  53. package/dist/chunk-3c25bcsw.js +17 -0
  54. package/dist/chunk-3cyyhp8p.js +1151 -0
  55. package/dist/chunk-3gqdqmzb.js +75 -0
  56. package/dist/chunk-3h8a89gy.js +46 -0
  57. package/dist/chunk-3hk8rrwh.js +908 -0
  58. package/dist/chunk-3j33p45s.js +458 -0
  59. package/dist/chunk-3kc4kyk9.js +819 -0
  60. package/dist/chunk-3qv2jg1k.js +250 -0
  61. package/dist/chunk-3r24h7t6.js +113 -0
  62. package/dist/chunk-3sz3q1g8.js +104 -0
  63. package/dist/chunk-3w6s9m5w.js +16 -0
  64. package/dist/chunk-43251qh9.js +176 -0
  65. package/dist/chunk-44fpr6jq.js +434 -0
  66. package/dist/chunk-45kxdsp8.js +444 -0
  67. package/dist/chunk-466d7sxa.js +2057 -0
  68. package/dist/chunk-495d85x1.js +8066 -0
  69. package/dist/chunk-4cptw4qa.js +714 -0
  70. package/dist/chunk-4g3v8y12.js +23 -0
  71. package/dist/chunk-4jm600zv.js +13 -0
  72. package/dist/chunk-4t0ehd2z.js +89 -0
  73. package/dist/chunk-4x38ez67.js +128 -0
  74. package/dist/chunk-4zfkzkt6.js +37 -0
  75. package/dist/chunk-5157ex2s.js +104 -0
  76. package/dist/chunk-55wgxwa9.js +13877 -0
  77. package/dist/chunk-581q6r6y.js +229 -0
  78. package/dist/chunk-5bbsd66z.js +87 -0
  79. package/dist/chunk-5ctt9z6m.js +216 -0
  80. package/dist/chunk-5hfgayhz.js +153 -0
  81. package/dist/chunk-5kmnvh8h.js +112 -0
  82. package/dist/chunk-5tz6v8a5.js +5393 -0
  83. package/dist/chunk-5w5m8kq9.js +87 -0
  84. package/dist/chunk-5ztq67an.js +2333 -0
  85. package/dist/chunk-62gm8b8n.js +1322 -0
  86. package/dist/chunk-685fmb09.js +535 -0
  87. package/dist/chunk-6bd8brc4.js +48 -0
  88. package/dist/chunk-6dj5t602.js +341 -0
  89. package/dist/chunk-6f4sd6xc.js +127 -0
  90. package/dist/chunk-6gr3c3w9.js +378 -0
  91. package/dist/chunk-6n2qgm9v.js +8 -0
  92. package/dist/chunk-6ns6g3t9.js +1012 -0
  93. package/dist/chunk-6swe4a45.js +87 -0
  94. package/dist/chunk-6tq2v3rk.js +186 -0
  95. package/dist/chunk-6yf4a3pf.js +41 -0
  96. package/dist/chunk-7271bnfv.js +220 -0
  97. package/dist/chunk-72awppzy.js +16 -0
  98. package/dist/chunk-73gyam06.js +40 -0
  99. package/dist/chunk-73rpbt04.js +1947 -0
  100. package/dist/chunk-760252na.js +101 -0
  101. package/dist/chunk-7739pg2c.js +4261 -0
  102. package/dist/chunk-77g09znh.js +391 -0
  103. package/dist/chunk-781t965f.js +202 -0
  104. package/dist/chunk-7aw745vx.js +40175 -0
  105. package/dist/chunk-7br3j88y.js +141 -0
  106. package/dist/chunk-7fxy60g9.js +296 -0
  107. package/dist/chunk-7j3f4h1v.js +689 -0
  108. package/dist/chunk-7ke2txc2.js +309 -0
  109. package/dist/chunk-7m2nd8da.js +110 -0
  110. package/dist/chunk-7rpdgyyb.js +161 -0
  111. package/dist/chunk-7wj3b774.js +287 -0
  112. package/dist/chunk-7wm5s02e.js +216 -0
  113. package/dist/chunk-7yd6jttg.js +862 -0
  114. package/dist/chunk-7yfshpbj.js +1548 -0
  115. package/dist/chunk-7ymfj7m3.js +151 -0
  116. package/dist/chunk-7z8j9qfn.js +121 -0
  117. package/dist/chunk-7zccp7mt.js +91 -0
  118. package/dist/chunk-820bdvg4.js +184 -0
  119. package/dist/chunk-83hfzbx3.js +10 -0
  120. package/dist/chunk-88s6sc85.js +87 -0
  121. package/dist/chunk-8bedvdm1.js +32 -0
  122. package/dist/chunk-8gvdbsaq.js +22 -0
  123. package/dist/chunk-8hq5kk3y.js +44 -0
  124. package/dist/chunk-8nca9sgc.js +208 -0
  125. package/dist/chunk-8qeha1fz.js +103 -0
  126. package/dist/chunk-8qjtqhrr.js +165 -0
  127. package/dist/chunk-8tmegdjp.js +113 -0
  128. package/dist/chunk-8tnsngw2.js +31 -0
  129. package/dist/chunk-8twg4emd.js +71 -0
  130. package/dist/chunk-8vcyvvad.js +348 -0
  131. package/dist/chunk-8w3etwh3.js +601 -0
  132. package/dist/chunk-8y12jxg8.js +10 -0
  133. package/dist/chunk-8ymf4e6z.js +48 -0
  134. package/dist/chunk-90wp6wez.js +10510 -0
  135. package/dist/chunk-91awdvpf.js +61 -0
  136. package/dist/chunk-977kqw0c.js +466 -0
  137. package/dist/chunk-9gbamk79.js +93 -0
  138. package/dist/chunk-9s8v3j7m.js +38 -0
  139. package/dist/chunk-9xezt4wd.js +54 -0
  140. package/dist/chunk-9xzebfy5.js +671 -0
  141. package/dist/chunk-a8ejc632.js +3094 -0
  142. package/dist/chunk-a9ra6h3p.js +219 -0
  143. package/dist/chunk-a9vdeb6y.js +258 -0
  144. package/dist/chunk-a9zh40sj.js +48 -0
  145. package/dist/chunk-aaef8dpx.js +100 -0
  146. package/dist/chunk-aapmv7dy.js +44 -0
  147. package/dist/chunk-adgm4w5w.js +212 -0
  148. package/dist/chunk-ag0gc3th.js +88 -0
  149. package/dist/chunk-ah0w9kp8.js +173 -0
  150. package/dist/chunk-b4wg70y1.js +54 -0
  151. package/dist/chunk-b90bgrf7.js +24 -0
  152. package/dist/chunk-be5g3kd0.js +164 -0
  153. package/dist/chunk-bh8acr81.js +500 -0
  154. package/dist/chunk-bjqw6798.js +328 -0
  155. package/dist/chunk-bm1qb16p.js +17 -0
  156. package/dist/chunk-bqfnp99q.js +477 -0
  157. package/dist/chunk-bvx2gazj.js +304 -0
  158. package/dist/chunk-bwq5zxwv.js +306 -0
  159. package/dist/chunk-byf2zkne.js +524 -0
  160. package/dist/chunk-c0edra3v.js +437 -0
  161. package/dist/chunk-c0tfwbd2.js +723 -0
  162. package/dist/chunk-cbd6nwrj.js +111 -0
  163. package/dist/chunk-cc15x0zt.js +154 -0
  164. package/dist/chunk-cd1aese9.js +20 -0
  165. package/dist/chunk-cdz5yb0r.js +57 -0
  166. package/dist/chunk-cf5bj9j5.js +93 -0
  167. package/dist/chunk-cfv996bs.js +22 -0
  168. package/dist/chunk-cgfdkzhb.js +12 -0
  169. package/dist/chunk-cnkgrwpf.js +87 -0
  170. package/dist/chunk-cr6q93s5.js +42 -0
  171. package/dist/chunk-cspg0r9n.js +584 -0
  172. package/dist/chunk-ctw5jwcd.js +213 -0
  173. package/dist/chunk-cvge4pvp.js +122 -0
  174. package/dist/chunk-d18z9pna.js +106 -0
  175. package/dist/chunk-d1cfb0sj.js +98 -0
  176. package/dist/chunk-d1tp6sk7.js +90 -0
  177. package/dist/chunk-d3e1v3sq.js +344 -0
  178. package/dist/chunk-d7j0zted.js +114 -0
  179. package/dist/chunk-d7zmg667.js +192 -0
  180. package/dist/chunk-ddvhht3h.js +695 -0
  181. package/dist/chunk-dfeh5kmx.js +74 -0
  182. package/dist/chunk-dgjkb800.js +120 -0
  183. package/dist/chunk-dgqrcy74.js +48 -0
  184. package/dist/chunk-dmqarh6q.js +463 -0
  185. package/dist/chunk-dnh7jtpb.js +37 -0
  186. package/dist/chunk-dpeq9h27.js +128 -0
  187. package/dist/chunk-drgy3hh3.js +88 -0
  188. package/dist/chunk-dv1wfr85.js +6373 -0
  189. package/dist/chunk-dv2w9vpb.js +66 -0
  190. package/dist/chunk-dwfxgheg.js +270 -0
  191. package/dist/chunk-e3g8q4cn.js +1646 -0
  192. package/dist/chunk-e5pntxye.js +37 -0
  193. package/dist/chunk-e6v9mqg8.js +281 -0
  194. package/dist/chunk-e7393td6.js +42 -0
  195. package/dist/chunk-ef8r68ej.js +120 -0
  196. package/dist/chunk-ehtwnxpg.js +1591 -0
  197. package/dist/chunk-emhask7n.js +373 -0
  198. package/dist/chunk-eq75ekjx.js +97 -0
  199. package/dist/chunk-eqp1rfft.js +17 -0
  200. package/dist/chunk-ewadzrm8.js +103 -0
  201. package/dist/chunk-f2mt6b5j.js +198 -0
  202. package/dist/chunk-f3d9gb71.js +333 -0
  203. package/dist/chunk-f5ma3nh5.js +3436 -0
  204. package/dist/chunk-f8bgh5qc.js +86 -0
  205. package/dist/chunk-fbgxj8g3.js +1585 -0
  206. package/dist/chunk-fbv4apne.js +51 -0
  207. package/dist/chunk-fdj47yp8.js +108 -0
  208. package/dist/chunk-fer10z2s.js +89 -0
  209. package/dist/chunk-ffewbr1v.js +642 -0
  210. package/dist/chunk-fpzax6rw.js +225 -0
  211. package/dist/chunk-fyc5fepv.js +10 -0
  212. package/dist/chunk-g0j0t6qk.js +26 -0
  213. package/dist/chunk-g1kkd3xm.js +130 -0
  214. package/dist/chunk-g2dr9kyp.js +90 -0
  215. package/dist/chunk-g338npwr.js +1061 -0
  216. package/dist/chunk-g3fcqsc1.js +998 -0
  217. package/dist/chunk-g3t0act8.js +8 -0
  218. package/dist/chunk-g4bng3yk.js +140 -0
  219. package/dist/chunk-gax0fcbx.js +182 -0
  220. package/dist/chunk-gegyrhqa.js +277 -0
  221. package/dist/chunk-gejs9q9d.js +542 -0
  222. package/dist/chunk-gqazdwgf.js +40764 -0
  223. package/dist/chunk-gtayyc80.js +28 -0
  224. package/dist/chunk-gyj242zr.js +20 -0
  225. package/dist/chunk-h0qngp9w.js +157 -0
  226. package/dist/chunk-h0rbjg6x.js +55 -0
  227. package/dist/chunk-h4qybe96.js +531 -0
  228. package/dist/chunk-h8vttfbt.js +82 -0
  229. package/dist/chunk-hakdhagh.js +16606 -0
  230. package/dist/chunk-hb22hd9m.js +373 -0
  231. package/dist/chunk-hbjbyb2r.js +120 -0
  232. package/dist/chunk-henh8e8f.js +69 -0
  233. package/dist/chunk-heqbt4wp.js +43 -0
  234. package/dist/chunk-hf5v5wd0.js +2833 -0
  235. package/dist/chunk-hfzj1m07.js +118 -0
  236. package/dist/chunk-hh7cmy4k.js +20 -0
  237. package/dist/chunk-hhwpdnst.js +173 -0
  238. package/dist/chunk-hjhc4cpt.js +69 -0
  239. package/dist/chunk-hk9xz7gk.js +118 -0
  240. package/dist/chunk-hqmz36b3.js +552 -0
  241. package/dist/chunk-hrzerbfw.js +1299 -0
  242. package/dist/chunk-hvha3949.js +229 -0
  243. package/dist/chunk-hw9yapav.js +644 -0
  244. package/dist/chunk-hx2tr4ep.js +7189 -0
  245. package/dist/chunk-hz2e6s2n.js +384 -0
  246. package/dist/chunk-hzhe8ygc.js +547 -0
  247. package/dist/chunk-j2k4p94p.js +55 -0
  248. package/dist/chunk-j3a4p81y.js +184 -0
  249. package/dist/chunk-j5vj6wem.js +241 -0
  250. package/dist/chunk-j64ga6ta.js +8035 -0
  251. package/dist/chunk-j98bzjtw.js +21933 -0
  252. package/dist/chunk-jafes477.js +29 -0
  253. package/dist/chunk-jce5r25x.js +18 -0
  254. package/dist/chunk-jchz3ws1.js +756 -0
  255. package/dist/chunk-jd32zbps.js +15 -0
  256. package/dist/chunk-jdgeec04.js +4249 -0
  257. package/dist/chunk-jhzdk454.js +278 -0
  258. package/dist/chunk-jjxb16v1.js +691 -0
  259. package/dist/chunk-jmc0vfad.js +275 -0
  260. package/dist/chunk-jnhkref0.js +30 -0
  261. package/dist/chunk-jp85zv57.js +3198 -0
  262. package/dist/chunk-jx817w05.js +11 -0
  263. package/dist/chunk-jxgm95zx.js +802 -0
  264. package/dist/chunk-jzmz18nn.js +65 -0
  265. package/dist/chunk-k0p9w03v.js +4957 -0
  266. package/dist/chunk-kjv7vnsy.js +81 -0
  267. package/dist/chunk-kkt7vkyc.js +273 -0
  268. package/dist/chunk-ks57hmrt.js +98 -0
  269. package/dist/chunk-ksq785ca.js +109 -0
  270. package/dist/chunk-kwekc97v.js +18 -0
  271. package/dist/chunk-m06q12hg.js +61 -0
  272. package/dist/chunk-m1g8ywfk.js +84 -0
  273. package/dist/chunk-m42g016x.js +70 -0
  274. package/dist/chunk-m6m4jdbj.js +1918 -0
  275. package/dist/chunk-ma0h0h17.js +471 -0
  276. package/dist/chunk-mak6ckds.js +102 -0
  277. package/dist/chunk-mceesnzr.js +438 -0
  278. package/dist/chunk-mhs6c4fp.js +765 -0
  279. package/dist/chunk-mm7rd0jd.js +1578 -0
  280. package/dist/chunk-mt25echc.js +6157 -0
  281. package/dist/chunk-mv8hngk2.js +86 -0
  282. package/dist/chunk-mxn9djv2.js +152 -0
  283. package/dist/chunk-n0qaeaa5.js +256 -0
  284. package/dist/chunk-n7ttdtk0.js +641 -0
  285. package/dist/chunk-n83rnk8h.js +62 -0
  286. package/dist/chunk-n89dwhkm.js +69 -0
  287. package/dist/chunk-nj29pqp3.js +155 -0
  288. package/dist/chunk-njchshm5.js +99 -0
  289. package/dist/chunk-nka1g8f4.js +773 -0
  290. package/dist/chunk-npj6g78n.js +8956 -0
  291. package/dist/chunk-nq0fxyxh.js +752 -0
  292. package/dist/chunk-nrdckp85.js +809 -0
  293. package/dist/chunk-nswqqqdd.js +26840 -0
  294. package/dist/chunk-nt837qt9.js +21 -0
  295. package/dist/chunk-ntfnwa7w.js +328 -0
  296. package/dist/chunk-nxsh6de2.js +1711 -0
  297. package/dist/chunk-ny641a2t.js +96 -0
  298. package/dist/chunk-nymbd7tw.js +825 -0
  299. package/dist/chunk-nz9wqm63.js +262 -0
  300. package/dist/chunk-p2816w9z.js +1486 -0
  301. package/dist/chunk-p2d5nh3g.js +342 -0
  302. package/dist/chunk-p3c8dz92.js +3442 -0
  303. package/dist/chunk-p3m2gn04.js +1551 -0
  304. package/dist/chunk-p7g7pf3f.js +336 -0
  305. package/dist/chunk-p82dmx79.js +519 -0
  306. package/dist/chunk-p8t1v3qw.js +713 -0
  307. package/dist/chunk-pg6ke51s.js +60 -0
  308. package/dist/chunk-phc72ftz.js +61 -0
  309. package/dist/chunk-pm51hqt3.js +1863 -0
  310. package/dist/chunk-pngv409n.js +253 -0
  311. package/dist/chunk-pp83rz76.js +27 -0
  312. package/dist/chunk-pqcemkwx.js +640 -0
  313. package/dist/chunk-pqqf5gss.js +4521 -0
  314. package/dist/chunk-pqw1y4f8.js +524 -0
  315. package/dist/chunk-ps49ymvj.js +43 -0
  316. package/dist/chunk-pwwa7s62.js +11 -0
  317. package/dist/chunk-pxjqgrdk.js +59 -0
  318. package/dist/chunk-q1jvyh4z.js +41 -0
  319. package/dist/chunk-q25bjaev.js +15 -0
  320. package/dist/chunk-q6av622g.js +38 -0
  321. package/dist/chunk-qmvk0wr6.js +787 -0
  322. package/dist/chunk-qnfx3qtx.js +617 -0
  323. package/dist/chunk-qp2qdcda.js +100 -0
  324. package/dist/chunk-qpg0bm1g.js +441 -0
  325. package/dist/chunk-qqfa0dqg.js +2343 -0
  326. package/dist/chunk-qtvek1gy.js +466 -0
  327. package/dist/chunk-qz2x630m.js +49145 -0
  328. package/dist/chunk-r4vk0x64.js +674 -0
  329. package/dist/chunk-r4z1107v.js +88 -0
  330. package/dist/chunk-r66hz8j6.js +34 -0
  331. package/dist/chunk-r6b58y3x.js +17 -0
  332. package/dist/chunk-rhftek9r.js +156 -0
  333. package/dist/chunk-rn0v1hk8.js +34 -0
  334. package/dist/chunk-rq2ry4xa.js +648 -0
  335. package/dist/chunk-rqwnwe7k.js +87 -0
  336. package/dist/chunk-rs45skes.js +123 -0
  337. package/dist/chunk-rvqtbt9h.js +726 -0
  338. package/dist/chunk-rzq6ct1h.js +1095 -0
  339. package/dist/chunk-s3pzvdss.js +50 -0
  340. package/dist/chunk-s5cexe2j.js +10476 -0
  341. package/dist/chunk-s79s6rms.js +40 -0
  342. package/dist/chunk-sd36yzx8.js +954 -0
  343. package/dist/chunk-sdj9b9wh.js +782 -0
  344. package/dist/chunk-seaswa9a.js +745 -0
  345. package/dist/chunk-sgy4bnyd.js +496 -0
  346. package/dist/chunk-sjqtqj35.js +28 -0
  347. package/dist/chunk-sk5gyvdj.js +127 -0
  348. package/dist/chunk-skctedsv.js +15679 -0
  349. package/dist/chunk-spqaamnc.js +63 -0
  350. package/dist/chunk-szj5wvdy.js +28 -0
  351. package/dist/chunk-t0rgmccj.js +39 -0
  352. package/dist/chunk-t0zcygwt.js +63 -0
  353. package/dist/chunk-t1pqzjdb.js +400 -0
  354. package/dist/chunk-t20kqvm0.js +1493 -0
  355. package/dist/chunk-t60mq3jn.js +421 -0
  356. package/dist/chunk-t9ak7d0c.js +86 -0
  357. package/dist/chunk-tantc5sm.js +97 -0
  358. package/dist/chunk-tgvzn3q1.js +98 -0
  359. package/dist/chunk-tjaqa99q.js +125 -0
  360. package/dist/chunk-tka1kh41.js +32 -0
  361. package/dist/chunk-tm70zjhw.js +95 -0
  362. package/dist/chunk-ts2p6bv1.js +224 -0
  363. package/dist/chunk-ttk5dzz8.js +25 -0
  364. package/dist/chunk-ty0xmdf9.js +142 -0
  365. package/dist/chunk-v0j5s5w9.js +113 -0
  366. package/dist/chunk-v1kzp02e.js +785 -0
  367. package/dist/chunk-v1mgv1et.js +15 -0
  368. package/dist/chunk-v1vqpm16.js +151 -0
  369. package/dist/chunk-v2drem4p.js +3035 -0
  370. package/dist/chunk-v399mzxk.js +58 -0
  371. package/dist/chunk-v78fj8by.js +145 -0
  372. package/dist/chunk-v7yayd0e.js +102 -0
  373. package/dist/chunk-v9smspw2.js +4301 -0
  374. package/dist/chunk-vdxvgw28.js +5802 -0
  375. package/dist/chunk-vech0vdw.js +258 -0
  376. package/dist/chunk-vest0y6x.js +3830 -0
  377. package/dist/chunk-vf5sd1nq.js +12 -0
  378. package/dist/chunk-vfwbg2m3.js +3351 -0
  379. package/dist/chunk-vhpesgs8.js +193 -0
  380. package/dist/chunk-vjbr8wqg.js +849 -0
  381. package/dist/chunk-vratq94g.js +349 -0
  382. package/dist/chunk-vtchbjt5.js +284 -0
  383. package/dist/chunk-vw60ew4s.js +338 -0
  384. package/dist/chunk-vyc0rjyx.js +31 -0
  385. package/dist/chunk-vyjeh50y.js +2149 -0
  386. package/dist/chunk-w2z5pqd3.js +336 -0
  387. package/dist/chunk-w34c4pn6.js +417 -0
  388. package/dist/chunk-w7wgpqcp.js +157 -0
  389. package/dist/chunk-w9k8zntt.js +1391 -0
  390. package/dist/chunk-wb4p3ft4.js +130 -0
  391. package/dist/chunk-wejsw2n0.js +104 -0
  392. package/dist/chunk-wfz0qffj.js +3939 -0
  393. package/dist/chunk-wj4wyfpy.js +716 -0
  394. package/dist/chunk-ws1jdhta.js +315 -0
  395. package/dist/chunk-wsgyhhg2.js +91 -0
  396. package/dist/chunk-wspkwgra.js +1315 -0
  397. package/dist/chunk-wty0nm0a.js +749 -0
  398. package/dist/chunk-wzfbxdwn.js +71 -0
  399. package/dist/chunk-wzpdet3m.js +843 -0
  400. package/dist/chunk-x14dq3v1.js +722 -0
  401. package/dist/chunk-x7ynqhrv.js +266 -0
  402. package/dist/chunk-x8b7vft8.js +132 -0
  403. package/dist/chunk-xfft987g.js +47 -0
  404. package/dist/chunk-xjz3de9f.js +654 -0
  405. package/dist/chunk-xms0cc06.js +84 -0
  406. package/dist/chunk-xn20ta17.js +107 -0
  407. package/dist/chunk-xsq9ae7x.js +90 -0
  408. package/dist/chunk-xszk7n10.js +14358 -0
  409. package/dist/chunk-xvqpc205.js +159 -0
  410. package/dist/chunk-xx3qkvyg.js +606 -0
  411. package/dist/chunk-y1784krc.js +19 -0
  412. package/dist/chunk-y47cg3kz.js +42 -0
  413. package/dist/chunk-y5mfcqyc.js +254 -0
  414. package/dist/chunk-yhnzwtby.js +4389 -0
  415. package/dist/chunk-yj6dn49f.js +476 -0
  416. package/dist/chunk-yjkfkzxy.js +266 -0
  417. package/dist/chunk-yq0a6dk8.js +265 -0
  418. package/dist/chunk-yqs6zhes.js +6105 -0
  419. package/dist/chunk-ytx08xk9.js +87 -0
  420. package/dist/chunk-ywxd4qw4.js +22 -0
  421. package/dist/chunk-yxnffetf.js +6956 -0
  422. package/dist/chunk-z2dp53wn.js +17 -0
  423. package/dist/chunk-z3hcj5gd.js +372 -0
  424. package/dist/chunk-z3j9hdd8.js +32 -0
  425. package/dist/chunk-z57a5q6t.js +2641 -0
  426. package/dist/chunk-z5bg3c3b.js +54 -0
  427. package/dist/chunk-z74kky8g.js +160 -0
  428. package/dist/chunk-z9w0ffmw.js +99 -0
  429. package/dist/chunk-zhk3aav8.js +79 -0
  430. package/dist/chunk-zk2wsm7d.js +15 -0
  431. package/dist/chunk-zp0509kx.js +563 -0
  432. package/dist/chunk-zsfxha74.js +17655 -0
  433. package/dist/chunk-zw77xgjd.js +38 -0
  434. package/dist/chunk-zwps6dt3.js +83 -0
  435. package/dist/chunk-zx4s70cq.js +298 -0
  436. package/dist/chunk-zxse7h5w.js +71 -0
  437. package/dist/chunk-zz21rvr7.js +27 -0
  438. package/dist/cli.js +81 -0
  439. package/package.json +182 -0
  440. package/sdk-tools.d.ts +2719 -0
  441. package/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
  442. package/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
  443. package/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
  444. package/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
  445. package/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
  446. package/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
  447. package/vendor/ripgrep/COPYING +3 -0
  448. package/vendor/ripgrep/arm64-darwin/rg +0 -0
  449. package/vendor/ripgrep/arm64-linux/rg +0 -0
  450. package/vendor/ripgrep/arm64-win32/rg.exe +0 -0
  451. package/vendor/ripgrep/x64-darwin/rg +0 -0
  452. package/vendor/ripgrep/x64-linux/rg +0 -0
  453. package/vendor/ripgrep/x64-win32/rg.exe +0 -0
@@ -0,0 +1,1578 @@
1
+ // @bun
2
+ import {
3
+ StructuredDiff,
4
+ fetchGitDiff,
5
+ fetchGitDiffHunks,
6
+ init_StructuredDiff,
7
+ init_gitDiff,
8
+ init_overlayContext,
9
+ useRegisterOverlay
10
+ } from "./chunk-363p49h1.js";
11
+ import"./chunk-14cmss9n.js";
12
+ import"./chunk-t0rgmccj.js";
13
+ import"./chunk-2n877dxb.js";
14
+ import"./chunk-cc15x0zt.js";
15
+ import"./chunk-7ke2txc2.js";
16
+ import"./chunk-t0zcygwt.js";
17
+ import {
18
+ Byline,
19
+ Dialog,
20
+ init_Byline,
21
+ init_Dialog,
22
+ init_useShortcutDisplay,
23
+ useShortcutDisplay
24
+ } from "./chunk-dmqarh6q.js";
25
+ import"./chunk-ehtwnxpg.js";
26
+ import"./chunk-3be7ka25.js";
27
+ import"./chunk-nymbd7tw.js";
28
+ import"./chunk-2gzv8nrw.js";
29
+ import"./chunk-45kxdsp8.js";
30
+ import"./chunk-cgfdkzhb.js";
31
+ import"./chunk-5ctt9z6m.js";
32
+ import"./chunk-z9w0ffmw.js";
33
+ import"./chunk-9gbamk79.js";
34
+ import"./chunk-4cptw4qa.js";
35
+ import"./chunk-hfzj1m07.js";
36
+ import {
37
+ Divider,
38
+ init_Divider,
39
+ init_useKeybinding,
40
+ init_useTerminalSize,
41
+ useKeybindings,
42
+ useTerminalSize
43
+ } from "./chunk-jxgm95zx.js";
44
+ import {
45
+ ThemedBox_default,
46
+ ThemedText,
47
+ init_ink,
48
+ require_compiler_runtime
49
+ } from "./chunk-nswqqqdd.js";
50
+ import"./chunk-7m2nd8da.js";
51
+ import"./chunk-ps49ymvj.js";
52
+ import {
53
+ require_jsx_dev_runtime,
54
+ require_react
55
+ } from "./chunk-g338npwr.js";
56
+ import"./chunk-pxjqgrdk.js";
57
+ import"./chunk-zk2wsm7d.js";
58
+ import"./chunk-7wj3b774.js";
59
+ import"./chunk-m06q12hg.js";
60
+ import"./chunk-w9k8zntt.js";
61
+ import {
62
+ init_file,
63
+ init_stringUtils,
64
+ plural,
65
+ readFileSafe
66
+ } from "./chunk-skctedsv.js";
67
+ import"./chunk-e3g8q4cn.js";
68
+ import"./chunk-ctw5jwcd.js";
69
+ import"./chunk-vratq94g.js";
70
+ import"./chunk-rvqtbt9h.js";
71
+ import"./chunk-0e1xsncc.js";
72
+ import"./chunk-g0j0t6qk.js";
73
+ import"./chunk-3c25bcsw.js";
74
+ import"./chunk-tjaqa99q.js";
75
+ import"./chunk-55wgxwa9.js";
76
+ import"./chunk-spqaamnc.js";
77
+ import"./chunk-4jm600zv.js";
78
+ import"./chunk-w2z5pqd3.js";
79
+ import"./chunk-7ymfj7m3.js";
80
+ import"./chunk-f5ma3nh5.js";
81
+ import"./chunk-qz2x630m.js";
82
+ import"./chunk-cvge4pvp.js";
83
+ import"./chunk-p2816w9z.js";
84
+ import"./chunk-v9smspw2.js";
85
+ import"./chunk-v1kzp02e.js";
86
+ import"./chunk-0vkfrmqm.js";
87
+ import"./chunk-0xjaqda8.js";
88
+ import {
89
+ init_format,
90
+ truncateStartToWidth
91
+ } from "./chunk-x14dq3v1.js";
92
+ import"./chunk-cdz5yb0r.js";
93
+ import"./chunk-h0rbjg6x.js";
94
+ import"./chunk-7z8j9qfn.js";
95
+ import"./chunk-hrzerbfw.js";
96
+ import"./chunk-d18z9pna.js";
97
+ import"./chunk-qnfx3qtx.js";
98
+ import"./chunk-hjhc4cpt.js";
99
+ import"./chunk-vyc0rjyx.js";
100
+ import {
101
+ figures_default,
102
+ init_figures
103
+ } from "./chunk-hx2tr4ep.js";
104
+ import"./chunk-p7g7pf3f.js";
105
+ import"./chunk-8tnsngw2.js";
106
+ import {
107
+ getCwd,
108
+ init_cwd
109
+ } from "./chunk-8bedvdm1.js";
110
+ import"./chunk-7wm5s02e.js";
111
+ import"./chunk-nxsh6de2.js";
112
+ import"./chunk-fbv4apne.js";
113
+ import"./chunk-3r24h7t6.js";
114
+ import"./chunk-qqfa0dqg.js";
115
+ import"./chunk-hqmz36b3.js";
116
+ import"./chunk-4g3v8y12.js";
117
+ import"./chunk-7739pg2c.js";
118
+ import"./chunk-xszk7n10.js";
119
+ import"./chunk-sdj9b9wh.js";
120
+ import {
121
+ __esm,
122
+ __toESM
123
+ } from "./chunk-qp2qdcda.js";
124
+
125
+ // src/hooks/useDiffData.ts
126
+ function useDiffData() {
127
+ const [diffResult, setDiffResult] = import_react.useState(null);
128
+ const [hunks, setHunks] = import_react.useState(new Map);
129
+ const [loading, setLoading] = import_react.useState(true);
130
+ import_react.useEffect(() => {
131
+ let cancelled = false;
132
+ async function loadDiffData() {
133
+ try {
134
+ const [statsResult, hunksResult] = await Promise.all([
135
+ fetchGitDiff(),
136
+ fetchGitDiffHunks()
137
+ ]);
138
+ if (!cancelled) {
139
+ setDiffResult(statsResult);
140
+ setHunks(hunksResult);
141
+ setLoading(false);
142
+ }
143
+ } catch (_error) {
144
+ if (!cancelled) {
145
+ setDiffResult(null);
146
+ setHunks(new Map);
147
+ setLoading(false);
148
+ }
149
+ }
150
+ }
151
+ loadDiffData();
152
+ return () => {
153
+ cancelled = true;
154
+ };
155
+ }, []);
156
+ return import_react.useMemo(() => {
157
+ if (!diffResult) {
158
+ return { stats: null, files: [], hunks: new Map, loading };
159
+ }
160
+ const { stats, perFileStats } = diffResult;
161
+ const files = [];
162
+ for (const [path, fileStats] of perFileStats) {
163
+ const fileHunks = hunks.get(path);
164
+ const isUntracked = fileStats.isUntracked ?? false;
165
+ const isLargeFile = !fileStats.isBinary && !isUntracked && !fileHunks;
166
+ const totalLines = fileStats.added + fileStats.removed;
167
+ const isTruncated = !isLargeFile && !fileStats.isBinary && totalLines > MAX_LINES_PER_FILE;
168
+ files.push({
169
+ path,
170
+ linesAdded: fileStats.added,
171
+ linesRemoved: fileStats.removed,
172
+ isBinary: fileStats.isBinary,
173
+ isLargeFile,
174
+ isTruncated,
175
+ isUntracked
176
+ });
177
+ }
178
+ files.sort((a, b) => a.path.localeCompare(b.path));
179
+ return { stats, files, hunks, loading: false };
180
+ }, [diffResult, hunks, loading]);
181
+ }
182
+ var import_react, MAX_LINES_PER_FILE = 400;
183
+ var init_useDiffData = __esm(() => {
184
+ init_gitDiff();
185
+ import_react = __toESM(require_react(), 1);
186
+ });
187
+
188
+ // src/hooks/useTurnDiffs.ts
189
+ function isFileEditResult(result) {
190
+ if (!result || typeof result !== "object")
191
+ return false;
192
+ const r = result;
193
+ const hasFilePath = typeof r.filePath === "string";
194
+ const hasStructuredPatch = Array.isArray(r.structuredPatch) && r.structuredPatch.length > 0;
195
+ const isNewFile = r.type === "create" && typeof r.content === "string";
196
+ return hasFilePath && (hasStructuredPatch || isNewFile);
197
+ }
198
+ function isFileWriteOutput(result) {
199
+ return "type" in result && (result.type === "create" || result.type === "update");
200
+ }
201
+ function countHunkLines(hunks) {
202
+ let added = 0;
203
+ let removed = 0;
204
+ for (const hunk of hunks) {
205
+ for (const line of hunk.lines) {
206
+ if (line.startsWith("+"))
207
+ added++;
208
+ else if (line.startsWith("-"))
209
+ removed++;
210
+ }
211
+ }
212
+ return { added, removed };
213
+ }
214
+ function getUserPromptPreview(message) {
215
+ if (message.type !== "user")
216
+ return "";
217
+ const content = message.message.content;
218
+ const text = typeof content === "string" ? content : "";
219
+ if (text.length <= 30)
220
+ return text;
221
+ return text.slice(0, 29) + "\u2026";
222
+ }
223
+ function computeTurnStats(turn) {
224
+ let totalAdded = 0;
225
+ let totalRemoved = 0;
226
+ for (const file of turn.files.values()) {
227
+ totalAdded += file.linesAdded;
228
+ totalRemoved += file.linesRemoved;
229
+ }
230
+ turn.stats = {
231
+ filesChanged: turn.files.size,
232
+ linesAdded: totalAdded,
233
+ linesRemoved: totalRemoved
234
+ };
235
+ }
236
+ function useTurnDiffs(messages) {
237
+ const cache = import_react2.useRef({
238
+ completedTurns: [],
239
+ currentTurn: null,
240
+ lastProcessedIndex: 0,
241
+ lastTurnIndex: 0
242
+ });
243
+ return import_react2.useMemo(() => {
244
+ const c = cache.current;
245
+ if (messages.length < c.lastProcessedIndex) {
246
+ c.completedTurns = [];
247
+ c.currentTurn = null;
248
+ c.lastProcessedIndex = 0;
249
+ c.lastTurnIndex = 0;
250
+ }
251
+ for (let i = c.lastProcessedIndex;i < messages.length; i++) {
252
+ const message = messages[i];
253
+ if (!message || message.type !== "user")
254
+ continue;
255
+ const isToolResult = message.toolUseResult || Array.isArray(message.message.content) && message.message.content[0]?.type === "tool_result";
256
+ if (!isToolResult && !message.isMeta) {
257
+ if (c.currentTurn && c.currentTurn.files.size > 0) {
258
+ computeTurnStats(c.currentTurn);
259
+ c.completedTurns.push(c.currentTurn);
260
+ }
261
+ c.lastTurnIndex++;
262
+ c.currentTurn = {
263
+ turnIndex: c.lastTurnIndex,
264
+ userPromptPreview: getUserPromptPreview(message),
265
+ timestamp: message.timestamp,
266
+ files: new Map,
267
+ stats: { filesChanged: 0, linesAdded: 0, linesRemoved: 0 }
268
+ };
269
+ } else if (c.currentTurn && message.toolUseResult) {
270
+ const result2 = message.toolUseResult;
271
+ if (isFileEditResult(result2)) {
272
+ const { filePath, structuredPatch } = result2;
273
+ const isNewFile = "type" in result2 && result2.type === "create";
274
+ let fileEntry = c.currentTurn.files.get(filePath);
275
+ if (!fileEntry) {
276
+ fileEntry = {
277
+ filePath,
278
+ hunks: [],
279
+ isNewFile,
280
+ linesAdded: 0,
281
+ linesRemoved: 0
282
+ };
283
+ c.currentTurn.files.set(filePath, fileEntry);
284
+ }
285
+ if (isNewFile && structuredPatch.length === 0 && isFileWriteOutput(result2)) {
286
+ const content = result2.content;
287
+ const lines = content.split(`
288
+ `);
289
+ const syntheticHunk = {
290
+ oldStart: 0,
291
+ oldLines: 0,
292
+ newStart: 1,
293
+ newLines: lines.length,
294
+ lines: lines.map((l) => "+" + l)
295
+ };
296
+ fileEntry.hunks.push(syntheticHunk);
297
+ fileEntry.linesAdded += lines.length;
298
+ } else {
299
+ fileEntry.hunks.push(...structuredPatch);
300
+ const { added, removed } = countHunkLines(structuredPatch);
301
+ fileEntry.linesAdded += added;
302
+ fileEntry.linesRemoved += removed;
303
+ }
304
+ if (isNewFile) {
305
+ fileEntry.isNewFile = true;
306
+ }
307
+ }
308
+ }
309
+ }
310
+ c.lastProcessedIndex = messages.length;
311
+ const result = [...c.completedTurns];
312
+ if (c.currentTurn && c.currentTurn.files.size > 0) {
313
+ computeTurnStats(c.currentTurn);
314
+ result.push(c.currentTurn);
315
+ }
316
+ return result.reverse();
317
+ }, [messages]);
318
+ }
319
+ var import_react2;
320
+ var init_useTurnDiffs = __esm(() => {
321
+ import_react2 = __toESM(require_react(), 1);
322
+ });
323
+
324
+ // src/components/diff/DiffDetailView.tsx
325
+ import { resolve } from "path";
326
+ function DiffDetailView(t0) {
327
+ const $ = import_compiler_runtime.c(53);
328
+ const {
329
+ filePath,
330
+ hunks,
331
+ isLargeFile,
332
+ isBinary,
333
+ isTruncated,
334
+ isUntracked
335
+ } = t0;
336
+ const {
337
+ columns
338
+ } = useTerminalSize();
339
+ let t1;
340
+ bb0: {
341
+ if (!filePath) {
342
+ let t23;
343
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
344
+ t23 = {
345
+ firstLine: null,
346
+ fileContent: undefined
347
+ };
348
+ $[0] = t23;
349
+ } else {
350
+ t23 = $[0];
351
+ }
352
+ t1 = t23;
353
+ break bb0;
354
+ }
355
+ let content;
356
+ let t22;
357
+ if ($[1] !== filePath) {
358
+ const fullPath = resolve(getCwd(), filePath);
359
+ content = readFileSafe(fullPath);
360
+ t22 = content?.split(`
361
+ `)[0] ?? null;
362
+ $[1] = filePath;
363
+ $[2] = content;
364
+ $[3] = t22;
365
+ } else {
366
+ content = $[2];
367
+ t22 = $[3];
368
+ }
369
+ const t32 = content ?? undefined;
370
+ let t42;
371
+ if ($[4] !== t22 || $[5] !== t32) {
372
+ t42 = {
373
+ firstLine: t22,
374
+ fileContent: t32
375
+ };
376
+ $[4] = t22;
377
+ $[5] = t32;
378
+ $[6] = t42;
379
+ } else {
380
+ t42 = $[6];
381
+ }
382
+ t1 = t42;
383
+ }
384
+ const {
385
+ firstLine,
386
+ fileContent
387
+ } = t1;
388
+ if (isUntracked) {
389
+ let t22;
390
+ if ($[7] !== filePath) {
391
+ t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
392
+ bold: true,
393
+ children: filePath
394
+ }, undefined, false, undefined, this);
395
+ $[7] = filePath;
396
+ $[8] = t22;
397
+ } else {
398
+ t22 = $[8];
399
+ }
400
+ let t32;
401
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
402
+ t32 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
403
+ dimColor: true,
404
+ children: " (untracked)"
405
+ }, undefined, false, undefined, this);
406
+ $[9] = t32;
407
+ } else {
408
+ t32 = $[9];
409
+ }
410
+ let t42;
411
+ if ($[10] !== t22) {
412
+ t42 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
413
+ children: [
414
+ t22,
415
+ t32
416
+ ]
417
+ }, undefined, true, undefined, this);
418
+ $[10] = t22;
419
+ $[11] = t42;
420
+ } else {
421
+ t42 = $[11];
422
+ }
423
+ let t52;
424
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
425
+ t52 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
426
+ padding: 4
427
+ }, undefined, false, undefined, this);
428
+ $[12] = t52;
429
+ } else {
430
+ t52 = $[12];
431
+ }
432
+ let t62;
433
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
434
+ t62 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
435
+ dimColor: true,
436
+ italic: true,
437
+ children: "New file not yet staged."
438
+ }, undefined, false, undefined, this);
439
+ $[13] = t62;
440
+ } else {
441
+ t62 = $[13];
442
+ }
443
+ let t72;
444
+ if ($[14] !== filePath) {
445
+ t72 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
446
+ flexDirection: "column",
447
+ children: [
448
+ t62,
449
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
450
+ dimColor: true,
451
+ italic: true,
452
+ children: [
453
+ "Run `git add ",
454
+ filePath,
455
+ "` to see line counts."
456
+ ]
457
+ }, undefined, true, undefined, this)
458
+ ]
459
+ }, undefined, true, undefined, this);
460
+ $[14] = filePath;
461
+ $[15] = t72;
462
+ } else {
463
+ t72 = $[15];
464
+ }
465
+ let t82;
466
+ if ($[16] !== t42 || $[17] !== t72) {
467
+ t82 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
468
+ flexDirection: "column",
469
+ width: "100%",
470
+ children: [
471
+ t42,
472
+ t52,
473
+ t72
474
+ ]
475
+ }, undefined, true, undefined, this);
476
+ $[16] = t42;
477
+ $[17] = t72;
478
+ $[18] = t82;
479
+ } else {
480
+ t82 = $[18];
481
+ }
482
+ return t82;
483
+ }
484
+ if (isBinary) {
485
+ let t22;
486
+ if ($[19] !== filePath) {
487
+ t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
488
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
489
+ bold: true,
490
+ children: filePath
491
+ }, undefined, false, undefined, this)
492
+ }, undefined, false, undefined, this);
493
+ $[19] = filePath;
494
+ $[20] = t22;
495
+ } else {
496
+ t22 = $[20];
497
+ }
498
+ let t32;
499
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
500
+ t32 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
501
+ padding: 4
502
+ }, undefined, false, undefined, this);
503
+ $[21] = t32;
504
+ } else {
505
+ t32 = $[21];
506
+ }
507
+ let t42;
508
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
509
+ t42 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
510
+ flexDirection: "column",
511
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
512
+ dimColor: true,
513
+ italic: true,
514
+ children: "Binary file - cannot display diff"
515
+ }, undefined, false, undefined, this)
516
+ }, undefined, false, undefined, this);
517
+ $[22] = t42;
518
+ } else {
519
+ t42 = $[22];
520
+ }
521
+ let t52;
522
+ if ($[23] !== t22) {
523
+ t52 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
524
+ flexDirection: "column",
525
+ width: "100%",
526
+ children: [
527
+ t22,
528
+ t32,
529
+ t42
530
+ ]
531
+ }, undefined, true, undefined, this);
532
+ $[23] = t22;
533
+ $[24] = t52;
534
+ } else {
535
+ t52 = $[24];
536
+ }
537
+ return t52;
538
+ }
539
+ if (isLargeFile) {
540
+ let t22;
541
+ if ($[25] !== filePath) {
542
+ t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
543
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
544
+ bold: true,
545
+ children: filePath
546
+ }, undefined, false, undefined, this)
547
+ }, undefined, false, undefined, this);
548
+ $[25] = filePath;
549
+ $[26] = t22;
550
+ } else {
551
+ t22 = $[26];
552
+ }
553
+ let t32;
554
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
555
+ t32 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
556
+ padding: 4
557
+ }, undefined, false, undefined, this);
558
+ $[27] = t32;
559
+ } else {
560
+ t32 = $[27];
561
+ }
562
+ let t42;
563
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
564
+ t42 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
565
+ flexDirection: "column",
566
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
567
+ dimColor: true,
568
+ italic: true,
569
+ children: "Large file - diff exceeds 1 MB limit"
570
+ }, undefined, false, undefined, this)
571
+ }, undefined, false, undefined, this);
572
+ $[28] = t42;
573
+ } else {
574
+ t42 = $[28];
575
+ }
576
+ let t52;
577
+ if ($[29] !== t22) {
578
+ t52 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
579
+ flexDirection: "column",
580
+ width: "100%",
581
+ children: [
582
+ t22,
583
+ t32,
584
+ t42
585
+ ]
586
+ }, undefined, true, undefined, this);
587
+ $[29] = t22;
588
+ $[30] = t52;
589
+ } else {
590
+ t52 = $[30];
591
+ }
592
+ return t52;
593
+ }
594
+ let t2;
595
+ if ($[31] !== filePath) {
596
+ t2 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
597
+ bold: true,
598
+ children: filePath
599
+ }, undefined, false, undefined, this);
600
+ $[31] = filePath;
601
+ $[32] = t2;
602
+ } else {
603
+ t2 = $[32];
604
+ }
605
+ let t3;
606
+ if ($[33] !== isTruncated) {
607
+ t3 = isTruncated && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
608
+ dimColor: true,
609
+ children: " (truncated)"
610
+ }, undefined, false, undefined, this);
611
+ $[33] = isTruncated;
612
+ $[34] = t3;
613
+ } else {
614
+ t3 = $[34];
615
+ }
616
+ let t4;
617
+ if ($[35] !== t2 || $[36] !== t3) {
618
+ t4 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
619
+ children: [
620
+ t2,
621
+ t3
622
+ ]
623
+ }, undefined, true, undefined, this);
624
+ $[35] = t2;
625
+ $[36] = t3;
626
+ $[37] = t4;
627
+ } else {
628
+ t4 = $[37];
629
+ }
630
+ let t5;
631
+ if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
632
+ t5 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
633
+ padding: 4
634
+ }, undefined, false, undefined, this);
635
+ $[38] = t5;
636
+ } else {
637
+ t5 = $[38];
638
+ }
639
+ let t6;
640
+ if ($[39] !== columns || $[40] !== fileContent || $[41] !== filePath || $[42] !== firstLine || $[43] !== hunks) {
641
+ t6 = hunks.length === 0 ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
642
+ dimColor: true,
643
+ children: "No diff content"
644
+ }, undefined, false, undefined, this) : hunks.map((hunk, index) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(StructuredDiff, {
645
+ patch: hunk,
646
+ filePath,
647
+ firstLine,
648
+ fileContent,
649
+ dim: false,
650
+ width: columns - 2 - 2
651
+ }, index, false, undefined, this));
652
+ $[39] = columns;
653
+ $[40] = fileContent;
654
+ $[41] = filePath;
655
+ $[42] = firstLine;
656
+ $[43] = hunks;
657
+ $[44] = t6;
658
+ } else {
659
+ t6 = $[44];
660
+ }
661
+ let t7;
662
+ if ($[45] !== t6) {
663
+ t7 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
664
+ flexDirection: "column",
665
+ children: t6
666
+ }, undefined, false, undefined, this);
667
+ $[45] = t6;
668
+ $[46] = t7;
669
+ } else {
670
+ t7 = $[46];
671
+ }
672
+ let t8;
673
+ if ($[47] !== isTruncated) {
674
+ t8 = isTruncated && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
675
+ dimColor: true,
676
+ italic: true,
677
+ children: "\u2026 diff truncated (exceeded 400 line limit)"
678
+ }, undefined, false, undefined, this);
679
+ $[47] = isTruncated;
680
+ $[48] = t8;
681
+ } else {
682
+ t8 = $[48];
683
+ }
684
+ let t9;
685
+ if ($[49] !== t4 || $[50] !== t7 || $[51] !== t8) {
686
+ t9 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
687
+ flexDirection: "column",
688
+ width: "100%",
689
+ children: [
690
+ t4,
691
+ t5,
692
+ t7,
693
+ t8
694
+ ]
695
+ }, undefined, true, undefined, this);
696
+ $[49] = t4;
697
+ $[50] = t7;
698
+ $[51] = t8;
699
+ $[52] = t9;
700
+ } else {
701
+ t9 = $[52];
702
+ }
703
+ return t9;
704
+ }
705
+ var import_compiler_runtime, jsx_dev_runtime;
706
+ var init_DiffDetailView = __esm(() => {
707
+ init_useTerminalSize();
708
+ init_ink();
709
+ init_cwd();
710
+ init_file();
711
+ init_Divider();
712
+ init_StructuredDiff();
713
+ import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
714
+ jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
715
+ });
716
+
717
+ // src/components/diff/DiffFileList.tsx
718
+ function DiffFileList(t0) {
719
+ const $ = import_compiler_runtime2.c(36);
720
+ const {
721
+ files,
722
+ selectedIndex
723
+ } = t0;
724
+ const {
725
+ columns
726
+ } = useTerminalSize();
727
+ let t1;
728
+ bb0: {
729
+ if (files.length === 0 || files.length <= MAX_VISIBLE_FILES) {
730
+ let t23;
731
+ if ($[0] !== files.length) {
732
+ t23 = {
733
+ startIndex: 0,
734
+ endIndex: files.length
735
+ };
736
+ $[0] = files.length;
737
+ $[1] = t23;
738
+ } else {
739
+ t23 = $[1];
740
+ }
741
+ t1 = t23;
742
+ break bb0;
743
+ }
744
+ let start = Math.max(0, selectedIndex - Math.floor(MAX_VISIBLE_FILES / 2));
745
+ let end = start + MAX_VISIBLE_FILES;
746
+ if (end > files.length) {
747
+ end = files.length;
748
+ start = Math.max(0, end - MAX_VISIBLE_FILES);
749
+ }
750
+ let t22;
751
+ if ($[2] !== end || $[3] !== start) {
752
+ t22 = {
753
+ startIndex: start,
754
+ endIndex: end
755
+ };
756
+ $[2] = end;
757
+ $[3] = start;
758
+ $[4] = t22;
759
+ } else {
760
+ t22 = $[4];
761
+ }
762
+ t1 = t22;
763
+ }
764
+ const {
765
+ startIndex,
766
+ endIndex
767
+ } = t1;
768
+ if (files.length === 0) {
769
+ let t22;
770
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
771
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
772
+ dimColor: true,
773
+ children: "No changed files"
774
+ }, undefined, false, undefined, this);
775
+ $[5] = t22;
776
+ } else {
777
+ t22 = $[5];
778
+ }
779
+ return t22;
780
+ }
781
+ let T0;
782
+ let hasMoreBelow;
783
+ let needsPagination;
784
+ let t2;
785
+ let t3;
786
+ let t4;
787
+ if ($[6] !== columns || $[7] !== endIndex || $[8] !== files || $[9] !== selectedIndex || $[10] !== startIndex) {
788
+ const visibleFiles = files.slice(startIndex, endIndex);
789
+ const hasMoreAbove = startIndex > 0;
790
+ hasMoreBelow = endIndex < files.length;
791
+ needsPagination = files.length > MAX_VISIBLE_FILES;
792
+ const maxPathWidth = Math.max(20, columns - 16 - 3 - 4);
793
+ T0 = ThemedBox_default;
794
+ t2 = "column";
795
+ if ($[17] !== hasMoreAbove || $[18] !== needsPagination || $[19] !== startIndex) {
796
+ t3 = needsPagination && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
797
+ dimColor: true,
798
+ children: hasMoreAbove ? ` \u2191 ${startIndex} more ${plural(startIndex, "file")}` : " "
799
+ }, undefined, false, undefined, this);
800
+ $[17] = hasMoreAbove;
801
+ $[18] = needsPagination;
802
+ $[19] = startIndex;
803
+ $[20] = t3;
804
+ } else {
805
+ t3 = $[20];
806
+ }
807
+ let t52;
808
+ if ($[21] !== maxPathWidth || $[22] !== selectedIndex || $[23] !== startIndex) {
809
+ t52 = (file, index) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(FileItem, {
810
+ file,
811
+ isSelected: startIndex + index === selectedIndex,
812
+ maxPathWidth
813
+ }, file.path, false, undefined, this);
814
+ $[21] = maxPathWidth;
815
+ $[22] = selectedIndex;
816
+ $[23] = startIndex;
817
+ $[24] = t52;
818
+ } else {
819
+ t52 = $[24];
820
+ }
821
+ t4 = visibleFiles.map(t52);
822
+ $[6] = columns;
823
+ $[7] = endIndex;
824
+ $[8] = files;
825
+ $[9] = selectedIndex;
826
+ $[10] = startIndex;
827
+ $[11] = T0;
828
+ $[12] = hasMoreBelow;
829
+ $[13] = needsPagination;
830
+ $[14] = t2;
831
+ $[15] = t3;
832
+ $[16] = t4;
833
+ } else {
834
+ T0 = $[11];
835
+ hasMoreBelow = $[12];
836
+ needsPagination = $[13];
837
+ t2 = $[14];
838
+ t3 = $[15];
839
+ t4 = $[16];
840
+ }
841
+ let t5;
842
+ if ($[25] !== endIndex || $[26] !== files.length || $[27] !== hasMoreBelow || $[28] !== needsPagination) {
843
+ t5 = needsPagination && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
844
+ dimColor: true,
845
+ children: hasMoreBelow ? ` \u2193 ${files.length - endIndex} more ${plural(files.length - endIndex, "file")}` : " "
846
+ }, undefined, false, undefined, this);
847
+ $[25] = endIndex;
848
+ $[26] = files.length;
849
+ $[27] = hasMoreBelow;
850
+ $[28] = needsPagination;
851
+ $[29] = t5;
852
+ } else {
853
+ t5 = $[29];
854
+ }
855
+ let t6;
856
+ if ($[30] !== T0 || $[31] !== t2 || $[32] !== t3 || $[33] !== t4 || $[34] !== t5) {
857
+ t6 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(T0, {
858
+ flexDirection: t2,
859
+ children: [
860
+ t3,
861
+ t4,
862
+ t5
863
+ ]
864
+ }, undefined, true, undefined, this);
865
+ $[30] = T0;
866
+ $[31] = t2;
867
+ $[32] = t3;
868
+ $[33] = t4;
869
+ $[34] = t5;
870
+ $[35] = t6;
871
+ } else {
872
+ t6 = $[35];
873
+ }
874
+ return t6;
875
+ }
876
+ function FileItem(t0) {
877
+ const $ = import_compiler_runtime2.c(14);
878
+ const {
879
+ file,
880
+ isSelected,
881
+ maxPathWidth
882
+ } = t0;
883
+ let t1;
884
+ if ($[0] !== file.path || $[1] !== maxPathWidth) {
885
+ t1 = truncateStartToWidth(file.path, maxPathWidth);
886
+ $[0] = file.path;
887
+ $[1] = maxPathWidth;
888
+ $[2] = t1;
889
+ } else {
890
+ t1 = $[2];
891
+ }
892
+ const displayPath = t1;
893
+ const pointer = isSelected ? figures_default.pointer + " " : " ";
894
+ const line = `${pointer}${displayPath}`;
895
+ const t2 = isSelected ? "background" : undefined;
896
+ let t3;
897
+ if ($[3] !== isSelected || $[4] !== line || $[5] !== t2) {
898
+ t3 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
899
+ bold: isSelected,
900
+ color: t2,
901
+ inverse: isSelected,
902
+ children: line
903
+ }, undefined, false, undefined, this);
904
+ $[3] = isSelected;
905
+ $[4] = line;
906
+ $[5] = t2;
907
+ $[6] = t3;
908
+ } else {
909
+ t3 = $[6];
910
+ }
911
+ let t4;
912
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
913
+ t4 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
914
+ flexGrow: 1
915
+ }, undefined, false, undefined, this);
916
+ $[7] = t4;
917
+ } else {
918
+ t4 = $[7];
919
+ }
920
+ let t5;
921
+ if ($[8] !== file || $[9] !== isSelected) {
922
+ t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(FileStats, {
923
+ file,
924
+ isSelected
925
+ }, undefined, false, undefined, this);
926
+ $[8] = file;
927
+ $[9] = isSelected;
928
+ $[10] = t5;
929
+ } else {
930
+ t5 = $[10];
931
+ }
932
+ let t6;
933
+ if ($[11] !== t3 || $[12] !== t5) {
934
+ t6 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
935
+ flexDirection: "row",
936
+ children: [
937
+ t3,
938
+ t4,
939
+ t5
940
+ ]
941
+ }, undefined, true, undefined, this);
942
+ $[11] = t3;
943
+ $[12] = t5;
944
+ $[13] = t6;
945
+ } else {
946
+ t6 = $[13];
947
+ }
948
+ return t6;
949
+ }
950
+ function FileStats(t0) {
951
+ const $ = import_compiler_runtime2.c(20);
952
+ const {
953
+ file,
954
+ isSelected
955
+ } = t0;
956
+ if (file.isUntracked) {
957
+ const t12 = !isSelected;
958
+ let t22;
959
+ if ($[0] !== t12) {
960
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
961
+ dimColor: t12,
962
+ italic: true,
963
+ children: "untracked"
964
+ }, undefined, false, undefined, this);
965
+ $[0] = t12;
966
+ $[1] = t22;
967
+ } else {
968
+ t22 = $[1];
969
+ }
970
+ return t22;
971
+ }
972
+ if (file.isBinary) {
973
+ const t12 = !isSelected;
974
+ let t22;
975
+ if ($[2] !== t12) {
976
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
977
+ dimColor: t12,
978
+ italic: true,
979
+ children: "Binary file"
980
+ }, undefined, false, undefined, this);
981
+ $[2] = t12;
982
+ $[3] = t22;
983
+ } else {
984
+ t22 = $[3];
985
+ }
986
+ return t22;
987
+ }
988
+ if (file.isLargeFile) {
989
+ const t12 = !isSelected;
990
+ let t22;
991
+ if ($[4] !== t12) {
992
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
993
+ dimColor: t12,
994
+ italic: true,
995
+ children: "Large file modified"
996
+ }, undefined, false, undefined, this);
997
+ $[4] = t12;
998
+ $[5] = t22;
999
+ } else {
1000
+ t22 = $[5];
1001
+ }
1002
+ return t22;
1003
+ }
1004
+ let t1;
1005
+ if ($[6] !== file.linesAdded || $[7] !== isSelected) {
1006
+ t1 = file.linesAdded > 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1007
+ color: "diffAddedWord",
1008
+ bold: isSelected,
1009
+ children: [
1010
+ "+",
1011
+ file.linesAdded
1012
+ ]
1013
+ }, undefined, true, undefined, this);
1014
+ $[6] = file.linesAdded;
1015
+ $[7] = isSelected;
1016
+ $[8] = t1;
1017
+ } else {
1018
+ t1 = $[8];
1019
+ }
1020
+ const t2 = file.linesAdded > 0 && file.linesRemoved > 0 && " ";
1021
+ let t3;
1022
+ if ($[9] !== file.linesRemoved || $[10] !== isSelected) {
1023
+ t3 = file.linesRemoved > 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1024
+ color: "diffRemovedWord",
1025
+ bold: isSelected,
1026
+ children: [
1027
+ "-",
1028
+ file.linesRemoved
1029
+ ]
1030
+ }, undefined, true, undefined, this);
1031
+ $[9] = file.linesRemoved;
1032
+ $[10] = isSelected;
1033
+ $[11] = t3;
1034
+ } else {
1035
+ t3 = $[11];
1036
+ }
1037
+ let t4;
1038
+ if ($[12] !== file.isTruncated || $[13] !== isSelected) {
1039
+ t4 = file.isTruncated && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1040
+ dimColor: !isSelected,
1041
+ children: " (truncated)"
1042
+ }, undefined, false, undefined, this);
1043
+ $[12] = file.isTruncated;
1044
+ $[13] = isSelected;
1045
+ $[14] = t4;
1046
+ } else {
1047
+ t4 = $[14];
1048
+ }
1049
+ let t5;
1050
+ if ($[15] !== t1 || $[16] !== t2 || $[17] !== t3 || $[18] !== t4) {
1051
+ t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1052
+ children: [
1053
+ t1,
1054
+ t2,
1055
+ t3,
1056
+ t4
1057
+ ]
1058
+ }, undefined, true, undefined, this);
1059
+ $[15] = t1;
1060
+ $[16] = t2;
1061
+ $[17] = t3;
1062
+ $[18] = t4;
1063
+ $[19] = t5;
1064
+ } else {
1065
+ t5 = $[19];
1066
+ }
1067
+ return t5;
1068
+ }
1069
+ var import_compiler_runtime2, jsx_dev_runtime2, MAX_VISIBLE_FILES = 5;
1070
+ var init_DiffFileList = __esm(() => {
1071
+ init_figures();
1072
+ init_useTerminalSize();
1073
+ init_ink();
1074
+ init_format();
1075
+ init_stringUtils();
1076
+ import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
1077
+ jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
1078
+ });
1079
+
1080
+ // src/components/diff/DiffDialog.tsx
1081
+ function turnDiffToDiffData(turn) {
1082
+ const files = Array.from(turn.files.values()).map((f) => ({
1083
+ path: f.filePath,
1084
+ linesAdded: f.linesAdded,
1085
+ linesRemoved: f.linesRemoved,
1086
+ isBinary: false,
1087
+ isLargeFile: false,
1088
+ isTruncated: false,
1089
+ isNewFile: f.isNewFile
1090
+ })).sort((a, b) => a.path.localeCompare(b.path));
1091
+ const hunks = new Map;
1092
+ for (const f of turn.files.values()) {
1093
+ hunks.set(f.filePath, f.hunks);
1094
+ }
1095
+ return {
1096
+ stats: {
1097
+ filesCount: turn.stats.filesChanged,
1098
+ linesAdded: turn.stats.linesAdded,
1099
+ linesRemoved: turn.stats.linesRemoved
1100
+ },
1101
+ files,
1102
+ hunks,
1103
+ loading: false
1104
+ };
1105
+ }
1106
+ function DiffDialog(t0) {
1107
+ const $ = import_compiler_runtime3.c(73);
1108
+ const {
1109
+ messages,
1110
+ onDone
1111
+ } = t0;
1112
+ const gitDiffData = useDiffData();
1113
+ const turnDiffs = useTurnDiffs(messages);
1114
+ const [viewMode, setViewMode] = import_react3.useState("list");
1115
+ const [selectedIndex, setSelectedIndex] = import_react3.useState(0);
1116
+ const [sourceIndex, setSourceIndex] = import_react3.useState(0);
1117
+ let t1;
1118
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1119
+ t1 = {
1120
+ type: "current"
1121
+ };
1122
+ $[0] = t1;
1123
+ } else {
1124
+ t1 = $[0];
1125
+ }
1126
+ let t2;
1127
+ if ($[1] !== turnDiffs) {
1128
+ t2 = [t1, ...turnDiffs.map(_temp)];
1129
+ $[1] = turnDiffs;
1130
+ $[2] = t2;
1131
+ } else {
1132
+ t2 = $[2];
1133
+ }
1134
+ const sources = t2;
1135
+ const currentSource = sources[sourceIndex];
1136
+ const currentTurn = currentSource?.type === "turn" ? currentSource.turn : null;
1137
+ let t3;
1138
+ if ($[3] !== currentTurn || $[4] !== gitDiffData) {
1139
+ t3 = currentTurn ? turnDiffToDiffData(currentTurn) : gitDiffData;
1140
+ $[3] = currentTurn;
1141
+ $[4] = gitDiffData;
1142
+ $[5] = t3;
1143
+ } else {
1144
+ t3 = $[5];
1145
+ }
1146
+ const diffData = t3;
1147
+ const selectedFile = diffData.files[selectedIndex];
1148
+ let t4;
1149
+ if ($[6] !== diffData.hunks || $[7] !== selectedFile) {
1150
+ t4 = selectedFile ? diffData.hunks.get(selectedFile.path) || [] : [];
1151
+ $[6] = diffData.hunks;
1152
+ $[7] = selectedFile;
1153
+ $[8] = t4;
1154
+ } else {
1155
+ t4 = $[8];
1156
+ }
1157
+ const selectedHunks = t4;
1158
+ let t5;
1159
+ let t6;
1160
+ if ($[9] !== sourceIndex || $[10] !== sources.length) {
1161
+ t5 = () => {
1162
+ if (sourceIndex >= sources.length) {
1163
+ setSourceIndex(Math.max(0, sources.length - 1));
1164
+ }
1165
+ };
1166
+ t6 = [sources.length, sourceIndex];
1167
+ $[9] = sourceIndex;
1168
+ $[10] = sources.length;
1169
+ $[11] = t5;
1170
+ $[12] = t6;
1171
+ } else {
1172
+ t5 = $[11];
1173
+ t6 = $[12];
1174
+ }
1175
+ import_react3.useEffect(t5, t6);
1176
+ const prevSourceIndex = import_react3.useRef(sourceIndex);
1177
+ let t7;
1178
+ let t8;
1179
+ if ($[13] !== sourceIndex) {
1180
+ t7 = () => {
1181
+ if (prevSourceIndex.current !== sourceIndex) {
1182
+ setSelectedIndex(0);
1183
+ prevSourceIndex.current = sourceIndex;
1184
+ }
1185
+ };
1186
+ t8 = [sourceIndex];
1187
+ $[13] = sourceIndex;
1188
+ $[14] = t7;
1189
+ $[15] = t8;
1190
+ } else {
1191
+ t7 = $[14];
1192
+ t8 = $[15];
1193
+ }
1194
+ import_react3.useEffect(t7, t8);
1195
+ useRegisterOverlay("diff-dialog", undefined);
1196
+ let t10;
1197
+ let t9;
1198
+ if ($[16] !== sources.length || $[17] !== viewMode) {
1199
+ t9 = () => {
1200
+ if (viewMode === "detail") {
1201
+ setViewMode("list");
1202
+ } else {
1203
+ if (viewMode === "list" && sources.length > 1) {
1204
+ setSourceIndex(_temp2);
1205
+ }
1206
+ }
1207
+ };
1208
+ t10 = () => {
1209
+ if (viewMode === "list" && sources.length > 1) {
1210
+ setSourceIndex((prev_0) => Math.min(sources.length - 1, prev_0 + 1));
1211
+ }
1212
+ };
1213
+ $[16] = sources.length;
1214
+ $[17] = viewMode;
1215
+ $[18] = t10;
1216
+ $[19] = t9;
1217
+ } else {
1218
+ t10 = $[18];
1219
+ t9 = $[19];
1220
+ }
1221
+ let t11;
1222
+ if ($[20] !== viewMode) {
1223
+ t11 = () => {
1224
+ if (viewMode === "detail") {
1225
+ setViewMode("list");
1226
+ }
1227
+ };
1228
+ $[20] = viewMode;
1229
+ $[21] = t11;
1230
+ } else {
1231
+ t11 = $[21];
1232
+ }
1233
+ let t12;
1234
+ if ($[22] !== selectedFile || $[23] !== viewMode) {
1235
+ t12 = () => {
1236
+ if (viewMode === "list" && selectedFile) {
1237
+ setViewMode("detail");
1238
+ }
1239
+ };
1240
+ $[22] = selectedFile;
1241
+ $[23] = viewMode;
1242
+ $[24] = t12;
1243
+ } else {
1244
+ t12 = $[24];
1245
+ }
1246
+ let t13;
1247
+ if ($[25] !== viewMode) {
1248
+ t13 = () => {
1249
+ if (viewMode === "list") {
1250
+ setSelectedIndex(_temp3);
1251
+ }
1252
+ };
1253
+ $[25] = viewMode;
1254
+ $[26] = t13;
1255
+ } else {
1256
+ t13 = $[26];
1257
+ }
1258
+ let t14;
1259
+ if ($[27] !== diffData.files.length || $[28] !== viewMode) {
1260
+ t14 = () => {
1261
+ if (viewMode === "list") {
1262
+ setSelectedIndex((prev_2) => Math.min(diffData.files.length - 1, prev_2 + 1));
1263
+ }
1264
+ };
1265
+ $[27] = diffData.files.length;
1266
+ $[28] = viewMode;
1267
+ $[29] = t14;
1268
+ } else {
1269
+ t14 = $[29];
1270
+ }
1271
+ let t15;
1272
+ if ($[30] !== t10 || $[31] !== t11 || $[32] !== t12 || $[33] !== t13 || $[34] !== t14 || $[35] !== t9) {
1273
+ t15 = {
1274
+ "diff:previousSource": t9,
1275
+ "diff:nextSource": t10,
1276
+ "diff:back": t11,
1277
+ "diff:viewDetails": t12,
1278
+ "diff:previousFile": t13,
1279
+ "diff:nextFile": t14
1280
+ };
1281
+ $[30] = t10;
1282
+ $[31] = t11;
1283
+ $[32] = t12;
1284
+ $[33] = t13;
1285
+ $[34] = t14;
1286
+ $[35] = t9;
1287
+ $[36] = t15;
1288
+ } else {
1289
+ t15 = $[36];
1290
+ }
1291
+ let t16;
1292
+ if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
1293
+ t16 = {
1294
+ context: "DiffDialog"
1295
+ };
1296
+ $[37] = t16;
1297
+ } else {
1298
+ t16 = $[37];
1299
+ }
1300
+ useKeybindings(t15, t16);
1301
+ let t17;
1302
+ if ($[38] !== diffData.stats) {
1303
+ t17 = diffData.stats ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1304
+ dimColor: true,
1305
+ children: [
1306
+ diffData.stats.filesCount,
1307
+ " ",
1308
+ plural(diffData.stats.filesCount, "file"),
1309
+ " ",
1310
+ "changed",
1311
+ diffData.stats.linesAdded > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1312
+ color: "diffAddedWord",
1313
+ children: [
1314
+ " +",
1315
+ diffData.stats.linesAdded
1316
+ ]
1317
+ }, undefined, true, undefined, this),
1318
+ diffData.stats.linesRemoved > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1319
+ color: "diffRemovedWord",
1320
+ children: [
1321
+ " -",
1322
+ diffData.stats.linesRemoved
1323
+ ]
1324
+ }, undefined, true, undefined, this)
1325
+ ]
1326
+ }, undefined, true, undefined, this) : null;
1327
+ $[38] = diffData.stats;
1328
+ $[39] = t17;
1329
+ } else {
1330
+ t17 = $[39];
1331
+ }
1332
+ const subtitle = t17;
1333
+ const headerTitle = currentTurn ? `Turn ${currentTurn.turnIndex}` : "Uncommitted changes";
1334
+ const headerSubtitle = currentTurn ? currentTurn.userPromptPreview ? `"${currentTurn.userPromptPreview}"` : "" : "(git diff HEAD)";
1335
+ let t18;
1336
+ if ($[40] !== sourceIndex || $[41] !== sources) {
1337
+ t18 = sources.length > 1 ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1338
+ children: [
1339
+ sourceIndex > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1340
+ dimColor: true,
1341
+ children: "\u25C0 "
1342
+ }, undefined, false, undefined, this),
1343
+ sources.map((source, i) => {
1344
+ const isSelected = i === sourceIndex;
1345
+ const label = source.type === "current" ? "Current" : `T${source.turn.turnIndex}`;
1346
+ return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1347
+ dimColor: !isSelected,
1348
+ bold: isSelected,
1349
+ children: [
1350
+ i > 0 ? " \xB7 " : "",
1351
+ label
1352
+ ]
1353
+ }, i, true, undefined, this);
1354
+ }),
1355
+ sourceIndex < sources.length - 1 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1356
+ dimColor: true,
1357
+ children: " \u25B6"
1358
+ }, undefined, false, undefined, this)
1359
+ ]
1360
+ }, undefined, true, undefined, this) : null;
1361
+ $[40] = sourceIndex;
1362
+ $[41] = sources;
1363
+ $[42] = t18;
1364
+ } else {
1365
+ t18 = $[42];
1366
+ }
1367
+ const sourceSelector = t18;
1368
+ const dismissShortcut = useShortcutDisplay("diff:dismiss", "DiffDialog", "esc");
1369
+ let t19;
1370
+ bb0: {
1371
+ if (diffData.loading) {
1372
+ t19 = "Loading diff\u2026";
1373
+ break bb0;
1374
+ }
1375
+ if (currentTurn) {
1376
+ t19 = "No file changes in this turn";
1377
+ break bb0;
1378
+ }
1379
+ if (diffData.stats && diffData.stats.filesCount > 0 && diffData.files.length === 0) {
1380
+ t19 = "Too many files to display details";
1381
+ break bb0;
1382
+ }
1383
+ t19 = "Working tree is clean";
1384
+ }
1385
+ const emptyMessage = t19;
1386
+ let t20;
1387
+ if ($[43] !== headerSubtitle) {
1388
+ t20 = headerSubtitle && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1389
+ dimColor: true,
1390
+ children: [
1391
+ " ",
1392
+ headerSubtitle
1393
+ ]
1394
+ }, undefined, true, undefined, this);
1395
+ $[43] = headerSubtitle;
1396
+ $[44] = t20;
1397
+ } else {
1398
+ t20 = $[44];
1399
+ }
1400
+ let t21;
1401
+ if ($[45] !== headerTitle || $[46] !== t20) {
1402
+ t21 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1403
+ children: [
1404
+ headerTitle,
1405
+ t20
1406
+ ]
1407
+ }, undefined, true, undefined, this);
1408
+ $[45] = headerTitle;
1409
+ $[46] = t20;
1410
+ $[47] = t21;
1411
+ } else {
1412
+ t21 = $[47];
1413
+ }
1414
+ const title = t21;
1415
+ let t22;
1416
+ if ($[48] !== onDone || $[49] !== viewMode) {
1417
+ t22 = function handleCancel2() {
1418
+ if (viewMode === "detail") {
1419
+ setViewMode("list");
1420
+ } else {
1421
+ onDone("Diff dialog dismissed", {
1422
+ display: "system"
1423
+ });
1424
+ }
1425
+ };
1426
+ $[48] = onDone;
1427
+ $[49] = viewMode;
1428
+ $[50] = t22;
1429
+ } else {
1430
+ t22 = $[50];
1431
+ }
1432
+ const handleCancel = t22;
1433
+ let t23;
1434
+ if ($[51] !== dismissShortcut || $[52] !== sources.length || $[53] !== viewMode) {
1435
+ t23 = (exitState) => exitState.pending ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1436
+ children: [
1437
+ "Press ",
1438
+ exitState.keyName,
1439
+ " again to exit"
1440
+ ]
1441
+ }, undefined, true, undefined, this) : viewMode === "list" ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Byline, {
1442
+ children: [
1443
+ sources.length > 1 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1444
+ children: "\u2190/\u2192 source"
1445
+ }, undefined, false, undefined, this),
1446
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1447
+ children: "\u2191/\u2193 select"
1448
+ }, undefined, false, undefined, this),
1449
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1450
+ children: "Enter view"
1451
+ }, undefined, false, undefined, this),
1452
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1453
+ children: [
1454
+ dismissShortcut,
1455
+ " close"
1456
+ ]
1457
+ }, undefined, true, undefined, this)
1458
+ ]
1459
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Byline, {
1460
+ children: [
1461
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1462
+ children: "\u2190 back"
1463
+ }, undefined, false, undefined, this),
1464
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1465
+ children: [
1466
+ dismissShortcut,
1467
+ " close"
1468
+ ]
1469
+ }, undefined, true, undefined, this)
1470
+ ]
1471
+ }, undefined, true, undefined, this);
1472
+ $[51] = dismissShortcut;
1473
+ $[52] = sources.length;
1474
+ $[53] = viewMode;
1475
+ $[54] = t23;
1476
+ } else {
1477
+ t23 = $[54];
1478
+ }
1479
+ let t24;
1480
+ 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) {
1481
+ t24 = diffData.files.length === 0 ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1482
+ marginTop: 1,
1483
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1484
+ dimColor: true,
1485
+ children: emptyMessage
1486
+ }, undefined, false, undefined, this)
1487
+ }, undefined, false, undefined, this) : viewMode === "list" ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1488
+ flexDirection: "column",
1489
+ marginTop: 1,
1490
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(DiffFileList, {
1491
+ files: diffData.files,
1492
+ selectedIndex
1493
+ }, undefined, false, undefined, this)
1494
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1495
+ flexDirection: "column",
1496
+ marginTop: 1,
1497
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(DiffDetailView, {
1498
+ filePath: selectedFile?.path || "",
1499
+ hunks: selectedHunks,
1500
+ isLargeFile: selectedFile?.isLargeFile,
1501
+ isBinary: selectedFile?.isBinary,
1502
+ isTruncated: selectedFile?.isTruncated,
1503
+ isUntracked: selectedFile?.isUntracked
1504
+ }, undefined, false, undefined, this)
1505
+ }, undefined, false, undefined, this);
1506
+ $[55] = diffData.files;
1507
+ $[56] = emptyMessage;
1508
+ $[57] = selectedFile?.isBinary;
1509
+ $[58] = selectedFile?.isLargeFile;
1510
+ $[59] = selectedFile?.isTruncated;
1511
+ $[60] = selectedFile?.isUntracked;
1512
+ $[61] = selectedFile?.path;
1513
+ $[62] = selectedHunks;
1514
+ $[63] = selectedIndex;
1515
+ $[64] = viewMode;
1516
+ $[65] = t24;
1517
+ } else {
1518
+ t24 = $[65];
1519
+ }
1520
+ let t25;
1521
+ if ($[66] !== handleCancel || $[67] !== sourceSelector || $[68] !== subtitle || $[69] !== t23 || $[70] !== t24 || $[71] !== title) {
1522
+ t25 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Dialog, {
1523
+ title,
1524
+ onCancel: handleCancel,
1525
+ color: "background",
1526
+ inputGuide: t23,
1527
+ children: [
1528
+ sourceSelector,
1529
+ subtitle,
1530
+ t24
1531
+ ]
1532
+ }, undefined, true, undefined, this);
1533
+ $[66] = handleCancel;
1534
+ $[67] = sourceSelector;
1535
+ $[68] = subtitle;
1536
+ $[69] = t23;
1537
+ $[70] = t24;
1538
+ $[71] = title;
1539
+ $[72] = t25;
1540
+ } else {
1541
+ t25 = $[72];
1542
+ }
1543
+ return t25;
1544
+ }
1545
+ function _temp3(prev_1) {
1546
+ return Math.max(0, prev_1 - 1);
1547
+ }
1548
+ function _temp2(prev) {
1549
+ return Math.max(0, prev - 1);
1550
+ }
1551
+ function _temp(turn) {
1552
+ return {
1553
+ type: "turn",
1554
+ turn
1555
+ };
1556
+ }
1557
+ var import_compiler_runtime3, import_react3, jsx_dev_runtime3;
1558
+ var init_DiffDialog = __esm(() => {
1559
+ init_overlayContext();
1560
+ init_useDiffData();
1561
+ init_useTurnDiffs();
1562
+ init_ink();
1563
+ init_useKeybinding();
1564
+ init_useShortcutDisplay();
1565
+ init_stringUtils();
1566
+ init_Byline();
1567
+ init_Dialog();
1568
+ init_DiffDetailView();
1569
+ init_DiffFileList();
1570
+ import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
1571
+ import_react3 = __toESM(require_react(), 1);
1572
+ jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
1573
+ });
1574
+ init_DiffDialog();
1575
+
1576
+ export {
1577
+ DiffDialog
1578
+ };