@costrict/csc 4.1.0 → 4.1.2

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 (413) hide show
  1. package/dist/{chunk-jj0pqphf.js → chunk-03g34taj.js} +55 -52
  2. package/dist/{chunk-srntgfa4.js → chunk-04h1dzn8.js} +58 -55
  3. package/dist/{chunk-bnqe1rhv.js → chunk-04js9982.js} +14 -14
  4. package/dist/{chunk-a40pqd86.js → chunk-0cm9fcaq.js} +4 -4
  5. package/dist/{chunk-3710m54v.js → chunk-0d8p649e.js} +205 -1297
  6. package/dist/{chunk-q4z98yeq.js → chunk-0ftbdtb6.js} +57909 -57909
  7. package/dist/{chunk-x1xw4k8y.js → chunk-0kv76cch.js} +69 -66
  8. package/dist/{chunk-5fmdr8kf.js → chunk-0q8601fc.js} +56 -53
  9. package/dist/{chunk-99ch3v87.js → chunk-0s2qjxt0.js} +2 -2
  10. package/dist/{chunk-wvexwzsv.js → chunk-0vjhwg78.js} +4 -4
  11. package/dist/{chunk-n20s9kza.js → chunk-0wfby4jk.js} +55 -52
  12. package/dist/{chunk-qsq0dead.js → chunk-0wzfz235.js} +55 -52
  13. package/dist/{chunk-jkkca78b.js → chunk-0z3swktk.js} +58 -55
  14. package/dist/{chunk-b50c6d9d.js → chunk-0zwtzj7s.js} +4 -4
  15. package/dist/{chunk-j4smny6q.js → chunk-12b1dsca.js} +3 -3
  16. package/dist/{chunk-xstgv88m.js → chunk-172aq1cm.js} +3 -3
  17. package/dist/{chunk-4cve1vrz.js → chunk-1928vvnf.js} +16 -16
  18. package/dist/{chunk-18vnrzf5.js → chunk-1gta3pqg.js} +26 -1390
  19. package/dist/{chunk-jkb9g66a.js → chunk-1hr30g9j.js} +56 -53
  20. package/dist/{chunk-qkewrphe.js → chunk-1ta87008.js} +13 -13
  21. package/dist/{chunk-c110nsx0.js → chunk-1tsg5bqp.js} +7 -7
  22. package/dist/{chunk-9ey1xvcm.js → chunk-1xdybmyp.js} +2 -2
  23. package/dist/{chunk-zdkvcpbe.js → chunk-1xqh8b38.js} +2 -2
  24. package/dist/{chunk-pb9tbzx4.js → chunk-1z6393pz.js} +55 -52
  25. package/dist/{chunk-rq1rj0fm.js → chunk-20rdctr8.js} +59 -56
  26. package/dist/{chunk-n99mdb05.js → chunk-2278qvvz.js} +82 -69
  27. package/dist/{chunk-1r3w86w2.js → chunk-27rca2qk.js} +14 -14
  28. package/dist/{chunk-0yw7zdrk.js → chunk-28p3x5mq.js} +58 -55
  29. package/dist/{chunk-cdcg7rv7.js → chunk-29n8fs0h.js} +3 -3
  30. package/dist/{chunk-eemwbs1k.js → chunk-2bahqsy8.js} +5 -5
  31. package/dist/{chunk-vmnb4fe2.js → chunk-2d4az1sb.js} +1051 -213
  32. package/dist/{chunk-bbm8cs3b.js → chunk-2dtsff0m.js} +2 -2
  33. package/dist/{chunk-epb6vn7a.js → chunk-2dvsb5m8.js} +3 -3
  34. package/dist/{chunk-hh9e110e.js → chunk-2ea63hn5.js} +55 -52
  35. package/dist/{chunk-2wzw1ch2.js → chunk-2heyngx7.js} +55 -52
  36. package/dist/{chunk-exy61tq9.js → chunk-2n4jnkr3.js} +5 -5
  37. package/dist/{chunk-04fesxxb.js → chunk-2npy5n4d.js} +3 -3
  38. package/dist/chunk-2yz7ej7r.js +215 -0
  39. package/dist/{chunk-6dszbr2m.js → chunk-347n8wrb.js} +56 -53
  40. package/dist/{chunk-ac8h9vfx.js → chunk-365z3p8q.js} +4 -4
  41. package/dist/{chunk-2bjxdx6v.js → chunk-3ax3g4ky.js} +5 -5
  42. package/dist/{chunk-6tgdp97d.js → chunk-3c22f5y8.js} +4 -4
  43. package/dist/{chunk-y8h1t9ak.js → chunk-3ed5qycn.js} +59 -56
  44. package/dist/{chunk-2afnxgdd.js → chunk-3hw6pcqt.js} +12 -12
  45. package/dist/chunk-3j0f3yyd.js +20 -0
  46. package/dist/{chunk-yc2nybgd.js → chunk-3keyh8d3.js} +2 -2
  47. package/dist/{chunk-hegr0s7q.js → chunk-3n8prx9k.js} +3 -3
  48. package/dist/{chunk-8fvbvp8b.js → chunk-3tnabt1t.js} +2 -2
  49. package/dist/{chunk-0jehknrf.js → chunk-3ydfy1vc.js} +2 -2
  50. package/dist/{chunk-246ewz3k.js → chunk-41ncbfk7.js} +3 -3
  51. package/dist/{chunk-9qdc1dr7.js → chunk-45ynv6r6.js} +2 -2
  52. package/dist/chunk-46sfycpp.js +125 -0
  53. package/dist/{chunk-a1mp5wrb.js → chunk-496449vy.js} +2 -2
  54. package/dist/{chunk-a8w0ptwp.js → chunk-49z79885.js} +3 -3
  55. package/dist/{chunk-25j8nzw3.js → chunk-4c8mdzm1.js} +4 -4
  56. package/dist/{chunk-frafv5eb.js → chunk-4f56n8y8.js} +4 -4
  57. package/dist/{chunk-1mft5mam.js → chunk-4ffz1d36.js} +4 -4
  58. package/dist/{chunk-9jkv01k5.js → chunk-4hgk89n9.js} +59 -56
  59. package/dist/{chunk-g2z79a35.js → chunk-4k4kn7h2.js} +18 -18
  60. package/dist/{chunk-vf5aqnmh.js → chunk-4ks3c21q.js} +64 -61
  61. package/dist/{chunk-bazg62tk.js → chunk-4v3p8phf.js} +15 -15
  62. package/dist/chunk-4vzg1cn7.js +264 -0
  63. package/dist/{chunk-ex5da5zw.js → chunk-4xp653hr.js} +55 -52
  64. package/dist/{chunk-szhqm62n.js → chunk-4zvptd40.js} +60 -56
  65. package/dist/{chunk-70ygvt3c.js → chunk-503675yy.js} +2 -2
  66. package/dist/{chunk-cpmwecza.js → chunk-52d0caw3.js} +58 -55
  67. package/dist/{chunk-x0vsajns.js → chunk-56speggn.js} +3 -3
  68. package/dist/{chunk-94zksc1x.js → chunk-58jcwxyh.js} +14 -14
  69. package/dist/{chunk-ff33xk7c.js → chunk-5bd0sf0q.js} +2 -2
  70. package/dist/chunk-5cxetff3.js +443 -0
  71. package/dist/{chunk-10k5cmhr.js → chunk-5dm3xwms.js} +6 -6
  72. package/dist/{chunk-kb3arncw.js → chunk-5e4sk6wr.js} +3 -3
  73. package/dist/{chunk-azj0n2d5.js → chunk-5fny1a0a.js} +48 -17
  74. package/dist/{chunk-vavwasjv.js → chunk-5hn85d4q.js} +58 -55
  75. package/dist/{chunk-h8mre2wt.js → chunk-5p3bwhcw.js} +5 -5
  76. package/dist/{chunk-sgmscys1.js → chunk-5r57a99p.js} +15 -15
  77. package/dist/{chunk-9t6bcs6h.js → chunk-5thf5z45.js} +136 -44
  78. package/dist/chunk-5vbtjcd2.js +624 -0
  79. package/dist/{chunk-16mcxht8.js → chunk-5w9qcjjt.js} +61 -58
  80. package/dist/{chunk-wvevgh1a.js → chunk-5xj3z42h.js} +5 -5
  81. package/dist/{chunk-r3ve8thc.js → chunk-62r8rxkw.js} +4 -4
  82. package/dist/chunk-64wm5777.js +85 -0
  83. package/dist/{chunk-mht29n4v.js → chunk-6a32d602.js} +55 -52
  84. package/dist/{chunk-007h648h.js → chunk-6aevda19.js} +2 -2
  85. package/dist/{chunk-445bwfcz.js → chunk-6bb0gyhh.js} +55 -52
  86. package/dist/{chunk-72jyr3w9.js → chunk-6d9njm1w.js} +2 -2
  87. package/dist/{chunk-7fxmzq5j.js → chunk-6fbvxhan.js} +3 -3
  88. package/dist/{chunk-d988v6vq.js → chunk-6kddkcqk.js} +57 -54
  89. package/dist/{chunk-ejds7a1j.js → chunk-6sytfk68.js} +5 -5
  90. package/dist/{chunk-7z7d0s4n.js → chunk-6ypvw68g.js} +55 -52
  91. package/dist/{chunk-cga8jcd5.js → chunk-6zkxtny0.js} +4 -4
  92. package/dist/{chunk-k7mg4se1.js → chunk-6zn0szv5.js} +19 -17
  93. package/dist/{chunk-yqb19vg0.js → chunk-71053xes.js} +14 -14
  94. package/dist/chunk-758qmraw.js +66 -0
  95. package/dist/{chunk-41rte42b.js → chunk-76g1m8sa.js} +16 -4
  96. package/dist/{chunk-t7d66zgt.js → chunk-7b1ze28c.js} +55 -52
  97. package/dist/{chunk-a3m8brwc.js → chunk-7bq6az8b.js} +3 -3
  98. package/dist/{chunk-p5zfk1p0.js → chunk-7ckqn3c3.js} +55 -52
  99. package/dist/chunk-7d5gzxsx.js +145 -0
  100. package/dist/{chunk-wwcagza5.js → chunk-7gyjd00q.js} +3 -3
  101. package/dist/{chunk-weq1878z.js → chunk-7hnmt967.js} +84 -80
  102. package/dist/{chunk-07bx2jcz.js → chunk-7jbeh3g8.js} +3 -3
  103. package/dist/{chunk-nk4avpbc.js → chunk-7k0h27s8.js} +7 -7
  104. package/dist/{chunk-zyjnx7p3.js → chunk-7myptjaa.js} +5 -5
  105. package/dist/{chunk-gj458fct.js → chunk-7yq22pd2.js} +57 -54
  106. package/dist/{chunk-jzngaehg.js → chunk-7zxvjs3d.js} +2 -2
  107. package/dist/{chunk-1yw96d3f.js → chunk-83v18n96.js} +14 -14
  108. package/dist/{chunk-cehe5fzp.js → chunk-84a79s9g.js} +124 -149
  109. package/dist/{chunk-188vmn2q.js → chunk-86n03xsk.js} +60 -57
  110. package/dist/{chunk-yrx21nzs.js → chunk-87ddk39d.js} +6 -6
  111. package/dist/{chunk-91pgjs9c.js → chunk-89jrgnx3.js} +15 -15
  112. package/dist/{chunk-0g5nbhfx.js → chunk-8dehkx39.js} +5 -5
  113. package/dist/{chunk-r5m7dsya.js → chunk-8fm77brm.js} +59 -56
  114. package/dist/{chunk-65q352pt.js → chunk-8fqa9v4h.js} +55 -52
  115. package/dist/{chunk-kr7tq75r.js → chunk-8pqe4w62.js} +62 -59
  116. package/dist/{chunk-bnma4wvz.js → chunk-8qp0ytjr.js} +2 -2
  117. package/dist/{chunk-3bz9rf07.js → chunk-8v8n8gxv.js} +3 -3
  118. package/dist/{chunk-nq3atbmt.js → chunk-94jqjx3g.js} +59 -56
  119. package/dist/chunk-9663bsk0.js +18 -0
  120. package/dist/{chunk-k927esxr.js → chunk-96gwphgv.js} +3 -3
  121. package/dist/{chunk-22gbyh19.js → chunk-9bf696cj.js} +95 -87
  122. package/dist/{chunk-50dqzjnc.js → chunk-9cw6etxe.js} +56 -53
  123. package/dist/{chunk-r7a5cqdw.js → chunk-9dwdn2sk.js} +7 -7
  124. package/dist/{chunk-w5hj47pg.js → chunk-9ggwn844.js} +55 -68
  125. package/dist/{chunk-3wdtayab.js → chunk-9gxdrrd5.js} +55 -52
  126. package/dist/{chunk-91n8b2bh.js → chunk-9q952pw0.js} +2 -2
  127. package/dist/{chunk-rh4c6hqb.js → chunk-9qgzdk8y.js} +7 -7
  128. package/dist/{chunk-308mgh4v.js → chunk-9qj9t1g4.js} +2 -2
  129. package/dist/{chunk-fepvmnye.js → chunk-9sr5cheh.js} +55 -52
  130. package/dist/{chunk-4ksc1s3d.js → chunk-9vvffdb6.js} +64 -61
  131. package/dist/chunk-a18ypbnr.js +151 -0
  132. package/dist/{chunk-agp8g4vs.js → chunk-a80y3b1p.js} +3 -3
  133. package/dist/{chunk-82e5ecfq.js → chunk-a96dsyhm.js} +59 -56
  134. package/dist/{chunk-pgjmgh51.js → chunk-a97kj439.js} +2 -2
  135. package/dist/chunk-aggcq5pt.js +16 -0
  136. package/dist/{chunk-42m1b4hy.js → chunk-am5zfwnf.js} +19 -19
  137. package/dist/{chunk-dz9y4ynp.js → chunk-b21j3y4h.js} +2 -2
  138. package/dist/{chunk-k85dxf7e.js → chunk-b52sketm.js} +55 -52
  139. package/dist/{chunk-nda7wdyd.js → chunk-b7fcydvv.js} +18 -18
  140. package/dist/{chunk-tfy2cfmx.js → chunk-bb9h35x7.js} +55 -52
  141. package/dist/{chunk-8yvwvs92.js → chunk-bbpnmz87.js} +2 -2
  142. package/dist/chunk-bcfd2zw7.js +23 -0
  143. package/dist/chunk-bdy3869e.js +35 -0
  144. package/dist/{chunk-6qjny6s9.js → chunk-be8pcep0.js} +2 -2
  145. package/dist/{chunk-gb253fe4.js → chunk-bgpftrxc.js} +56 -53
  146. package/dist/{chunk-1psvq5k9.js → chunk-bh4k9q9y.js} +4 -4
  147. package/dist/{chunk-1ht0vtnv.js → chunk-bjc8f709.js} +62 -59
  148. package/dist/{chunk-3xn43gdg.js → chunk-bm5370d5.js} +14 -14
  149. package/dist/{chunk-g14bjgw2.js → chunk-br1qf4bc.js} +12 -21
  150. package/dist/{chunk-wmxdjz06.js → chunk-bxmc7435.js} +7 -7
  151. package/dist/chunk-c36xznt7.js +1045 -0
  152. package/dist/{chunk-3153jw2k.js → chunk-c3z2f4aq.js} +58 -55
  153. package/dist/chunk-cchv4yn8.js +214 -0
  154. package/dist/{chunk-j4rqvdds.js → chunk-cewbt8ah.js} +2 -2
  155. package/dist/{chunk-txcczr8d.js → chunk-cfeakba6.js} +55 -52
  156. package/dist/{chunk-b0rzqvdk.js → chunk-ckh1zt0n.js} +65 -62
  157. package/dist/{chunk-xcm658wm.js → chunk-ckq5d8ev.js} +3 -3
  158. package/dist/chunk-cnfzmqr8.js +115 -0
  159. package/dist/chunk-crchz5q8.js +16 -0
  160. package/dist/{chunk-nynqcpbc.js → chunk-cwpxrn2d.js} +17 -17
  161. package/dist/chunk-cy223s48.js +881 -0
  162. package/dist/{chunk-7btb0pt0.js → chunk-cydd546q.js} +57 -53
  163. package/dist/{chunk-vwppfk3m.js → chunk-cz5ycdta.js} +3 -3
  164. package/dist/{chunk-mkqj6971.js → chunk-da7f9a81.js} +105 -29
  165. package/dist/{chunk-6w9vbmda.js → chunk-dfzfxt1y.js} +7 -7
  166. package/dist/{chunk-qwn30dmv.js → chunk-dj6y2sr8.js} +3 -3
  167. package/dist/{chunk-cbhwxy49.js → chunk-djbawqmw.js} +55 -52
  168. package/dist/{chunk-n0qw1yqs.js → chunk-dpb1kvb9.js} +56 -53
  169. package/dist/{chunk-gr3hsybk.js → chunk-dt5c48mh.js} +2 -2
  170. package/dist/{chunk-sffjkpkr.js → chunk-e1m95nec.js} +6 -6
  171. package/dist/{chunk-gy5e77gm.js → chunk-e26hypm4.js} +56 -53
  172. package/dist/{chunk-8z65azad.js → chunk-e5kn4hwp.js} +56 -53
  173. package/dist/{chunk-750k6p99.js → chunk-e6dq8apj.js} +55 -52
  174. package/dist/{chunk-afjvd592.js → chunk-e6p5x2p4.js} +4 -4
  175. package/dist/{chunk-4bwmnypz.js → chunk-eb6x30zz.js} +57 -54
  176. package/dist/{chunk-mcmhgv5a.js → chunk-ebfv6acv.js} +12 -12
  177. package/dist/{chunk-zgt8wev2.js → chunk-egkwv0bp.js} +2 -2
  178. package/dist/{chunk-7e6cm3rj.js → chunk-ennzq1s5.js} +14 -4
  179. package/dist/{chunk-4am10fzg.js → chunk-envqyd27.js} +59 -55
  180. package/dist/{chunk-d9c2bj73.js → chunk-epprxdgg.js} +2 -2
  181. package/dist/{chunk-2nrg59n8.js → chunk-et42fzf1.js} +22 -22
  182. package/dist/{chunk-h0rbjg6x.js → chunk-f2mhrmww.js} +10 -3
  183. package/dist/{chunk-ywmprz18.js → chunk-fb5ehysd.js} +57 -54
  184. package/dist/chunk-fbtp7vga.js +37 -0
  185. package/dist/{chunk-d2148dsd.js → chunk-fgna18nd.js} +6 -6
  186. package/dist/{chunk-wzheh2yr.js → chunk-fknjgxt4.js} +56 -53
  187. package/dist/{chunk-y1jcd7xx.js → chunk-fpb43g1s.js} +6 -6
  188. package/dist/{chunk-d24kfzcv.js → chunk-ftfz2eh3.js} +2 -2
  189. package/dist/{chunk-3j8vq1pf.js → chunk-fv94gm4h.js} +56 -53
  190. package/dist/{chunk-fjqp3q7c.js → chunk-fx7pr1g4.js} +13 -13
  191. package/dist/{chunk-ryqepdpz.js → chunk-g0axk7cx.js} +56 -53
  192. package/dist/chunk-g6d9avms.js +205 -0
  193. package/dist/{chunk-xjfqctzs.js → chunk-g9caj6wj.js} +66 -63
  194. package/dist/{chunk-nfbw6f7k.js → chunk-gbekxw41.js} +56 -53
  195. package/dist/{chunk-ahq40vpt.js → chunk-gcpc6b2z.js} +2 -2
  196. package/dist/{chunk-98174mf4.js → chunk-gfycetpg.js} +5 -5
  197. package/dist/{chunk-sjjq8xdb.js → chunk-gn0ja3k5.js} +5 -5
  198. package/dist/{chunk-j2zvdmqh.js → chunk-gt9gwwdh.js} +5 -5
  199. package/dist/{chunk-cf8d6pz4.js → chunk-gz0nj0mm.js} +55 -52
  200. package/dist/{chunk-msr65xs2.js → chunk-gz6pze8f.js} +57 -54
  201. package/dist/{chunk-7m8k6pa3.js → chunk-h1frxdrg.js} +56 -54
  202. package/dist/{chunk-eac7ypee.js → chunk-h93ve2g2.js} +14 -14
  203. package/dist/{chunk-vee2y2a3.js → chunk-h9mr8ey4.js} +13 -13
  204. package/dist/{chunk-59bwmnpt.js → chunk-hd8ydnzq.js} +15 -15
  205. package/dist/{chunk-kgcmddnw.js → chunk-hebz2z6z.js} +58 -55
  206. package/dist/chunk-hgxb4qn5.js +390 -0
  207. package/dist/{chunk-00hg5r38.js → chunk-hh6kgtq5.js} +3 -3
  208. package/dist/{chunk-hd9nkrx3.js → chunk-hhcx2jjn.js} +3 -3
  209. package/dist/{chunk-6x5h6cqf.js → chunk-hjp1yckp.js} +56 -53
  210. package/dist/{chunk-bqbxmdjy.js → chunk-hjxz7a04.js} +58 -55
  211. package/dist/{chunk-0v69sn62.js → chunk-hkkz8rde.js} +55 -52
  212. package/dist/{chunk-677p38pg.js → chunk-hnms0snx.js} +2 -2
  213. package/dist/{chunk-y15fkqed.js → chunk-hq4jd1fy.js} +23 -23
  214. package/dist/{chunk-hknjwtbv.js → chunk-hthfhdty.js} +15 -15
  215. package/dist/{chunk-xkavy09t.js → chunk-hy5vd50e.js} +3 -3
  216. package/dist/{chunk-86nrce87.js → chunk-hyztfnyq.js} +468 -226
  217. package/dist/{chunk-45m4a7v2.js → chunk-j5rnevxw.js} +62 -59
  218. package/dist/{chunk-26g6w0ah.js → chunk-j74ctwq9.js} +3 -3
  219. package/dist/{chunk-nt0qt25w.js → chunk-jcdv05ym.js} +33 -5
  220. package/dist/{chunk-bdjevwn2.js → chunk-jd5xs374.js} +55 -52
  221. package/dist/{chunk-rz56zge4.js → chunk-jgbz49jh.js} +6 -4
  222. package/dist/{chunk-7hsedj2m.js → chunk-jhdtyhk5.js} +57 -54
  223. package/dist/{chunk-e40wen38.js → chunk-jkbkp0ek.js} +14 -14
  224. package/dist/{chunk-kf6gt482.js → chunk-jkyn6ge9.js} +5 -5
  225. package/dist/{chunk-nb02zd8m.js → chunk-jn7qa13m.js} +3 -3
  226. package/dist/{chunk-4ah5x35c.js → chunk-jt7ea6rq.js} +55 -52
  227. package/dist/{chunk-827qm1sh.js → chunk-jt7wch8z.js} +2 -2
  228. package/dist/{chunk-v4vcp64e.js → chunk-jv7tn7yh.js} +55 -52
  229. package/dist/chunk-jx80x2sn.js +267 -0
  230. package/dist/{chunk-03fdnx3e.js → chunk-jy13c47g.js} +5 -5
  231. package/dist/{chunk-dkazyend.js → chunk-k11m1rfc.js} +57 -54
  232. package/dist/{chunk-z2yjcarh.js → chunk-k3mghke5.js} +57 -86
  233. package/dist/{chunk-a0dd5hkn.js → chunk-k5rrrd0q.js} +78 -75
  234. package/dist/{chunk-2wbwn8g8.js → chunk-kbbjfeb8.js} +2 -2
  235. package/dist/chunk-kcz5b7xv.js +73 -0
  236. package/dist/{chunk-173gkvba.js → chunk-khnxj5vx.js} +3 -3
  237. package/dist/{chunk-cgqv2grs.js → chunk-kkwym2b7.js} +5 -5
  238. package/dist/{chunk-hvve83a7.js → chunk-kn345s2x.js} +2 -2
  239. package/dist/{chunk-x07xwqrj.js → chunk-kpqx95pr.js} +2 -2
  240. package/dist/{chunk-qgbfcm47.js → chunk-kszphewb.js} +63 -54
  241. package/dist/{chunk-h9j4zz8p.js → chunk-kxn6mzy3.js} +4 -4
  242. package/dist/{chunk-bjgz0wdj.js → chunk-m0zzdgkt.js} +31 -26
  243. package/dist/{chunk-xpvj19fq.js → chunk-m7qa1fqb.js} +3 -3
  244. package/dist/{chunk-ffg51hwt.js → chunk-mdm5cbxy.js} +55 -52
  245. package/dist/chunk-mnqvtfd5.js +78 -0
  246. package/dist/{chunk-429gckc3.js → chunk-mp5km99q.js} +20 -20
  247. package/dist/{chunk-psbm5jsc.js → chunk-mpxcgg5f.js} +6 -6
  248. package/dist/{chunk-a5615tp4.js → chunk-mqr18cwx.js} +4 -4
  249. package/dist/chunk-n014czx3.js +18 -0
  250. package/dist/{chunk-wtcd14r5.js → chunk-n40kbp9f.js} +55 -52
  251. package/dist/{chunk-z3qy0rgg.js → chunk-n51s6m60.js} +14 -14
  252. package/dist/{chunk-0rr38kc5.js → chunk-n87c314c.js} +56 -53
  253. package/dist/{chunk-qrzeq3x3.js → chunk-nevf0mb9.js} +15 -15
  254. package/dist/{chunk-fe3f357e.js → chunk-nkeknzb2.js} +4 -4
  255. package/dist/{chunk-xcvezw4b.js → chunk-nkgq6a5q.js} +28 -28
  256. package/dist/{chunk-3208ghtw.js → chunk-nmj9qx2x.js} +65 -62
  257. package/dist/{chunk-26bfvj72.js → chunk-nmyfe9j9.js} +57 -54
  258. package/dist/{chunk-fz2zjx1x.js → chunk-nmzy0qjn.js} +7 -7
  259. package/dist/{chunk-gdajxwh7.js → chunk-np05dg07.js} +55 -52
  260. package/dist/{chunk-w51sng2s.js → chunk-npgyhaqc.js} +2 -2
  261. package/dist/{chunk-chfh2dha.js → chunk-nr2skyv7.js} +56 -53
  262. package/dist/{chunk-5wrrjqyd.js → chunk-nv5rddp1.js} +55 -52
  263. package/dist/{chunk-7aeww2z6.js → chunk-p10xajeq.js} +69 -66
  264. package/dist/{chunk-2kajewxj.js → chunk-p1wxbhgj.js} +4 -4
  265. package/dist/{chunk-q65zt8zd.js → chunk-p6fhtt1h.js} +4 -4
  266. package/dist/{chunk-5w18hvcs.js → chunk-p8d1q69a.js} +55 -52
  267. package/dist/{chunk-rrcsw70h.js → chunk-pbmy8ktp.js} +7 -7
  268. package/dist/{chunk-wvp9qznk.js → chunk-pqrb30bj.js} +2 -2
  269. package/dist/{chunk-etd086w1.js → chunk-pr321r8d.js} +3 -3
  270. package/dist/{chunk-t4f85b5b.js → chunk-psq9gtg7.js} +2 -2
  271. package/dist/{chunk-wt40qpf8.js → chunk-ptermrp1.js} +60 -57
  272. package/dist/{chunk-ybpn8zcq.js → chunk-pyfrphvc.js} +57 -54
  273. package/dist/{chunk-vajyw4ea.js → chunk-pzb2zc4x.js} +6 -6
  274. package/dist/{chunk-9p4wsdjj.js → chunk-q0w614e1.js} +3 -3
  275. package/dist/{chunk-x8khmg37.js → chunk-q110twdj.js} +59 -116
  276. package/dist/{chunk-v3ynnwf5.js → chunk-q72dtjqy.js} +2 -2
  277. package/dist/{chunk-73zyqp47.js → chunk-q90bcq6v.js} +59 -56
  278. package/dist/{chunk-cmk5fvhp.js → chunk-qavfmmqd.js} +6 -6
  279. package/dist/{chunk-fsr3wqt8.js → chunk-qjx52q61.js} +2 -2
  280. package/dist/{chunk-fw4y0f76.js → chunk-qk2tvn8y.js} +56 -53
  281. package/dist/{chunk-2d9752es.js → chunk-qm3k6vez.js} +13 -13
  282. package/dist/{chunk-h2q4v2te.js → chunk-qmp50hjb.js} +19 -19
  283. package/dist/{chunk-tvnzqcya.js → chunk-qnztz65r.js} +56 -53
  284. package/dist/{chunk-0c1d11gp.js → chunk-qpatv1ep.js} +13 -13
  285. package/dist/{chunk-dsdbya1y.js → chunk-qwtfyr6d.js} +2 -2
  286. package/dist/{chunk-nz9rqw9y.js → chunk-qxp3d963.js} +2 -2
  287. package/dist/{chunk-xq92sh7h.js → chunk-qzp51m93.js} +3 -3
  288. package/dist/{chunk-gmyt1kr3.js → chunk-r3fadmd6.js} +5 -5
  289. package/dist/{chunk-sgw20vr8.js → chunk-r4mec6w5.js} +3 -3
  290. package/dist/chunk-r6g3xx75.js +415 -0
  291. package/dist/{chunk-3d8wynhd.js → chunk-r8ywba1h.js} +14 -14
  292. package/dist/{chunk-pc761fjv.js → chunk-r974358t.js} +13 -13
  293. package/dist/{chunk-s996ghdk.js → chunk-r9qnxgqt.js} +5 -5
  294. package/dist/{chunk-vyc908t4.js → chunk-rasdgp8g.js} +4 -4
  295. package/dist/{chunk-z4et0c5h.js → chunk-rbr0tsrz.js} +55 -52
  296. package/dist/{chunk-qak319wf.js → chunk-re5p7q2e.js} +4 -4
  297. package/dist/{chunk-ndfk4pk7.js → chunk-rfvzhq5x.js} +55 -52
  298. package/dist/{chunk-bqxeky5x.js → chunk-rfxctace.js} +3 -4
  299. package/dist/chunk-rhqffqzf.js +189 -0
  300. package/dist/{chunk-56qq2p9r.js → chunk-rnjtkqzg.js} +4 -4
  301. package/dist/{chunk-ws77frz2.js → chunk-rqa3fz1t.js} +55 -52
  302. package/dist/{chunk-ss1c88v5.js → chunk-rtgff67y.js} +63 -60
  303. package/dist/{chunk-2vvwrqnf.js → chunk-rw1070pc.js} +4 -4
  304. package/dist/{chunk-cxkxps51.js → chunk-rzrm7j9x.js} +2 -2
  305. package/dist/{chunk-bat87bmz.js → chunk-s262tfgm.js} +3 -3
  306. package/dist/{chunk-mj4zph9q.js → chunk-s4pjm9jw.js} +55 -52
  307. package/dist/chunk-s5pnejsn.js +216 -0
  308. package/dist/{chunk-6fp3tvak.js → chunk-sczmmmvj.js} +2 -2
  309. package/dist/{chunk-pynkknss.js → chunk-sd2g0s0k.js} +9 -9
  310. package/dist/{chunk-rnsws47e.js → chunk-sg5nsm4p.js} +3 -3
  311. package/dist/{chunk-c5sm4sc3.js → chunk-stqsfa68.js} +3 -3
  312. package/dist/{chunk-pxmfaad7.js → chunk-svb5eqfz.js} +14 -14
  313. package/dist/{chunk-5tbfphgg.js → chunk-swr65v0j.js} +10 -10
  314. package/dist/{chunk-4gkqm4bn.js → chunk-swtk97hy.js} +14 -14
  315. package/dist/{chunk-rrbsm1d2.js → chunk-sx4gbak5.js} +56 -53
  316. package/dist/{chunk-4n3kmsaj.js → chunk-t12d6tby.js} +3 -3
  317. package/dist/{chunk-w9dy1w2w.js → chunk-t20f5mnk.js} +14 -14
  318. package/dist/{chunk-rkwfpq4m.js → chunk-t408adb9.js} +56 -53
  319. package/dist/{chunk-gz1jqh8a.js → chunk-t7434h4s.js} +55 -52
  320. package/dist/{chunk-dve0wwbm.js → chunk-t7y6mg54.js} +13 -13
  321. package/dist/{chunk-tdpx7hh3.js → chunk-tdkwcv57.js} +4 -4
  322. package/dist/{chunk-crpj1nw0.js → chunk-tfew976a.js} +55 -52
  323. package/dist/{chunk-n9d1qnp6.js → chunk-thzmxfnt.js} +2 -2
  324. package/dist/{chunk-vh81ygd3.js → chunk-tmedrj3f.js} +4 -4
  325. package/dist/{chunk-j9q7p2m5.js → chunk-tmscbs2k.js} +4 -4
  326. package/dist/chunk-tnk7s4ed.js +22 -0
  327. package/dist/{chunk-h9c871q9.js → chunk-tnqjynvy.js} +14 -14
  328. package/dist/{chunk-2hevw9te.js → chunk-tq32b105.js} +3 -3
  329. package/dist/{chunk-gzpsa71f.js → chunk-tr448vwb.js} +3 -3
  330. package/dist/{chunk-xdfcfm69.js → chunk-tr4hszme.js} +3 -3
  331. package/dist/{chunk-5nzjxkj9.js → chunk-traxf72w.js} +2 -2
  332. package/dist/{chunk-xs5ncg1b.js → chunk-ttzyw0y7.js} +17 -17
  333. package/dist/{chunk-997z9was.js → chunk-tw0b366n.js} +55 -52
  334. package/dist/{chunk-w2z0zq63.js → chunk-txync4kd.js} +7 -7
  335. package/dist/chunk-v060k07j.js +416 -0
  336. package/dist/chunk-v1rkrwwv.js +146 -0
  337. package/dist/{chunk-t15y7qj2.js → chunk-v21ssxkp.js} +2 -2
  338. package/dist/{chunk-dn3k7jx0.js → chunk-v2vzfj4h.js} +55 -52
  339. package/dist/{chunk-f6xc2rtk.js → chunk-v4h7dscd.js} +27 -249
  340. package/dist/{chunk-vn0y1222.js → chunk-v522k1r4.js} +70 -67
  341. package/dist/{chunk-b1akqr40.js → chunk-v9b2rh8h.js} +58 -55
  342. package/dist/{chunk-g8e4wwak.js → chunk-vacje5g9.js} +4 -4
  343. package/dist/{chunk-x36cer09.js → chunk-vetj2j2n.js} +60 -57
  344. package/dist/{chunk-354nk8fp.js → chunk-vpn54vqg.js} +6 -6
  345. package/dist/{chunk-xytm9792.js → chunk-vqhgs52z.js} +7 -7
  346. package/dist/{chunk-0yyajtmg.js → chunk-vtnm80k9.js} +13 -13
  347. package/dist/{chunk-0q17nthv.js → chunk-vvk6wx6b.js} +14 -14
  348. package/dist/{chunk-k4r2smrc.js → chunk-vym5zrn6.js} +4944 -2380
  349. package/dist/{chunk-9ej0hnae.js → chunk-vzxtxv4a.js} +56 -53
  350. package/dist/{chunk-pydt2a2n.js → chunk-w3wdqhv0.js} +62 -59
  351. package/dist/{chunk-esmecavs.js → chunk-w59jkye4.js} +56 -53
  352. package/dist/{chunk-r86f5rq0.js → chunk-w60fa5cj.js} +65 -62
  353. package/dist/{chunk-rnr60956.js → chunk-w8xchcwf.js} +3 -3
  354. package/dist/{chunk-f0a3t1s8.js → chunk-w9fptpp9.js} +64 -61
  355. package/dist/{chunk-4pc3744p.js → chunk-wa7g3yv7.js} +13 -13
  356. package/dist/{chunk-appan6jz.js → chunk-wdn3pb9r.js} +3 -3
  357. package/dist/{chunk-ta3mpea5.js → chunk-wqk03hpc.js} +55 -52
  358. package/dist/{chunk-6hywp0n9.js → chunk-wvs8wv8t.js} +2 -2
  359. package/dist/{chunk-nb32etb5.js → chunk-wwfe7gg7.js} +58 -55
  360. package/dist/{chunk-nmaxmbg9.js → chunk-wz18c465.js} +4 -4
  361. package/dist/{chunk-9gy4amsa.js → chunk-wz34c685.js} +15 -15
  362. package/dist/{chunk-5tg67tyt.js → chunk-wzzaxwej.js} +2 -2
  363. package/dist/chunk-x1wk407b.js +516 -0
  364. package/dist/{chunk-jysm93mk.js → chunk-x2taqvwd.js} +5 -5
  365. package/dist/{chunk-4n33zjr2.js → chunk-x41dz9y9.js} +2 -2
  366. package/dist/chunk-x48x54hx.js +3942 -0
  367. package/dist/{chunk-fapmq0mf.js → chunk-x6cjkxqe.js} +5 -5
  368. package/dist/{chunk-37va52e9.js → chunk-x89sscn0.js} +2 -2
  369. package/dist/chunk-x9qqj8wc.js +153 -0
  370. package/dist/{chunk-wt541mkc.js → chunk-xa9xpah3.js} +3041 -2505
  371. package/dist/{chunk-644422j5.js → chunk-xcxcysx3.js} +2 -2
  372. package/dist/{chunk-qemwdcf4.js → chunk-xftqvncz.js} +9 -46
  373. package/dist/{chunk-zhmz5pc1.js → chunk-xhnmweqe.js} +86 -61
  374. package/dist/{chunk-jvnjg83j.js → chunk-xm6t6khx.js} +56 -53
  375. package/dist/chunk-xt65mfby.js +1395 -0
  376. package/dist/{chunk-e59fmxpj.js → chunk-xvmtyz8q.js} +2 -2
  377. package/dist/{chunk-55cx3c4n.js → chunk-xxfz08mf.js} +55 -52
  378. package/dist/{chunk-9zd21fw9.js → chunk-y061xbn9.js} +5 -5
  379. package/dist/{chunk-1tc6spqh.js → chunk-y0z468z2.js} +56 -53
  380. package/dist/{chunk-8x3wqyv3.js → chunk-y3cshvgb.js} +2 -2
  381. package/dist/{chunk-jakgz278.js → chunk-y6ce2s1q.js} +59 -55
  382. package/dist/chunk-y9bpc4a6.js +97 -0
  383. package/dist/{chunk-8c4wbrma.js → chunk-y9mnawak.js} +4 -4
  384. package/dist/{chunk-4zbc59gv.js → chunk-ycdbp5q4.js} +55 -52
  385. package/dist/{chunk-q6vrrdxm.js → chunk-ycsh7pst.js} +13 -13
  386. package/dist/{chunk-00c1cny7.js → chunk-yedzdc0a.js} +14 -8
  387. package/dist/{chunk-f0613fz6.js → chunk-yrr4d26k.js} +56 -53
  388. package/dist/{chunk-0mmyn5gx.js → chunk-yt5gwdg5.js} +7 -60
  389. package/dist/{chunk-bdd27pgp.js → chunk-yteefw26.js} +55 -52
  390. package/dist/{chunk-m0hg4ry7.js → chunk-yvjzex9w.js} +6 -82
  391. package/dist/{chunk-5n19f2r9.js → chunk-z124zj20.js} +4 -4
  392. package/dist/{chunk-sa5fj0d3.js → chunk-z92c7wdq.js} +4 -4
  393. package/dist/{chunk-pa6m6zh8.js → chunk-zb7ctc11.js} +55 -52
  394. package/dist/{chunk-tx6c6zpp.js → chunk-zc2mfxy0.js} +58 -55
  395. package/dist/{chunk-yh935z65.js → chunk-zdsqreyq.js} +3 -3
  396. package/dist/chunk-zf5btqc3.js +54 -0
  397. package/dist/{chunk-s6afn83n.js → chunk-zfwgjjde.js} +2 -2
  398. package/dist/{chunk-35se2h9e.js → chunk-zgvyn6yk.js} +55 -52
  399. package/dist/{chunk-hryyyanp.js → chunk-zmj9sehj.js} +56 -53
  400. package/dist/{chunk-cv2hk4fq.js → chunk-zr750mg3.js} +93 -56
  401. package/dist/{chunk-z1b4600y.js → chunk-zshw91dr.js} +5 -5
  402. package/dist/{chunk-m2epey0s.js → chunk-zyhpq0w1.js} +17 -5
  403. package/dist/{chunk-arnzwvcj.js → chunk-zzac564h.js} +15 -15
  404. package/dist/cli.js +94 -28
  405. package/dist/services/rawDump/batchWorker.js +3 -3
  406. package/package.json +1 -1
  407. package/dist/chunk-0paqc2yw.js +0 -18
  408. package/dist/chunk-2s9sfj9h.js +0 -99
  409. package/dist/chunk-76xcw4kg.js +0 -138
  410. package/dist/chunk-7bdscsqe.js +0 -197
  411. package/dist/chunk-pppfybd8.js +0 -183
  412. package/dist/chunk-q2pkj7sp.js +0 -18
  413. package/dist/chunk-zbn3eb68.js +0 -57
@@ -2,15 +2,10 @@
2
2
  import {
3
3
  normalizeControlMessageKeys
4
4
  } from "./chunk-nt837qt9.js";
5
- import {
6
- init_slashCommandParsing,
7
- parseSlashCommand
8
- } from "./chunk-rn0v1hk8.js";
9
5
  import {
10
6
  AccountInfoSchema,
11
7
  AgentDefinitionSchema,
12
8
  AgentInfoSchema,
13
- DEFAULT_OUTPUT_STYLE_NAME,
14
9
  FastModeStateSchema,
15
10
  HookEventSchema,
16
11
  HookInputSchema,
@@ -24,87 +19,40 @@ import {
24
19
  SDKStreamlinedTextMessageSchema,
25
20
  SDKStreamlinedToolUseSummaryMessageSchema,
26
21
  SDKUserMessageSchema,
27
- Select,
28
22
  SlashCommandSchema,
29
- Spinner,
30
23
  Stream,
31
24
  addMarketplaceSource,
32
25
  applyPermissionUpdates,
33
- createAttachmentMessage,
34
- createCommandInputMessage,
35
- createImageMetadataText,
36
- createSystemMessage,
37
- createUserMessage,
38
26
  detectImageFormatFromBase64,
39
27
  executePermissionRequestHooks,
40
- executeUserPromptSubmitHooks,
41
- extractTag,
42
- fileHistoryCanRestore,
43
- fileHistoryEnabled,
44
- fileHistoryGetDiffStats,
45
28
  finalizeAutonomyRunCompleted,
46
29
  finalizeAutonomyRunFailed,
47
- findCommand,
48
- getAttachmentMessages,
49
- getBridgeCommandSafety,
50
- getCommandName,
51
- getContentText,
52
30
  getDeclaredMarketplaces,
53
- getUserPromptSubmitHookBlockingMessage,
54
31
  hasPermissionsToUseTool,
55
32
  hookJSONOutputSchema,
56
- init_AppState,
57
33
  init_PermissionUpdate,
58
34
  init_PermissionUpdateSchema,
59
- init_Spinner,
60
- init_attachments,
61
35
  init_autonomyRuns,
62
36
  init_commandLifecycle,
63
- init_commands1 as init_commands,
64
37
  init_coreSchemas,
65
- init_fileHistory,
66
- init_generators,
67
38
  init_hooks,
68
39
  init_hooks1 as init_hooks2,
69
40
  init_imageResizer,
70
- init_imageStore,
71
41
  init_marketplaceManager,
72
- init_messages1 as init_messages,
73
- init_outputStyles,
74
42
  init_permissions,
75
- init_queryProfiler,
76
- init_select,
77
43
  init_stream,
78
- init_textInputTypes,
79
- init_useTerminalSize,
80
- isEmptyMessageText,
81
- isSyntheticMessage,
82
- isToolUseResultMessage,
83
- isValidImagePaste,
84
44
  listAutonomyRuns,
85
45
  loadKnownMarketplacesConfig,
86
46
  markAutonomyRunCancelled,
87
47
  markAutonomyRunRunning,
88
- maybeResizeAndDownsampleImageBlock,
89
48
  notifyCommandLifecycle,
90
49
  permissionUpdateSchema,
91
- persistPermissionUpdates,
92
- queryCheckpoint,
93
- storeImages,
94
- toArray,
95
- useAppState
96
- } from "./chunk-k4r2smrc.js";
50
+ persistPermissionUpdates
51
+ } from "./chunk-vym5zrn6.js";
97
52
  import {
98
53
  init_sessionState,
99
54
  notifySessionStateChanged
100
- } from "./chunk-w5hj47pg.js";
101
- import {
102
- init_useExitOnCtrlCDWithKeybindings,
103
- useExitOnCtrlCDWithKeybindings
104
- } from "./chunk-fapmq0mf.js";
105
- import {
106
- init_useKeybinding
107
- } from "./chunk-2wbwn8g8.js";
55
+ } from "./chunk-9ggwn844.js";
108
56
  import {
109
57
  DEFAULT_CRON_JITTER_CONFIG,
110
58
  findMissedTasks,
@@ -116,45 +64,25 @@ import {
116
64
  oneShotJitteredNextCronRunMs,
117
65
  readCronTasks,
118
66
  removeCronTasks
119
- } from "./chunk-7e6cm3rj.js";
67
+ } from "./chunk-ennzq1s5.js";
120
68
  import {
121
69
  cronToHuman,
122
70
  init_cron
123
71
  } from "./chunk-14ya36qs.js";
124
72
  import {
125
- init_events,
126
- init_sessionTracing,
127
- logOTelEvent,
128
- redactIfDisabled,
129
- startInteractionSpan
130
- } from "./chunk-vyc908t4.js";
131
- import {
132
- AGENT_TOOL_NAME,
133
- LEGACY_AGENT_TOOL_NAME,
134
- getAnthropicApiKeyWithSource,
135
- getFastModeState,
136
73
  getFeatureValue_CACHED_WITH_REFRESH,
137
- getSettings_DEPRECATED,
138
- init_auth,
139
- init_constants1 as init_constants,
140
- init_fastMode,
141
74
  init_file,
142
75
  init_growthbook,
143
76
  init_isEqual,
144
77
  init_schemas,
145
- init_settings1 as init_settings,
146
78
  isEqual_default,
147
79
  isLocalMarketplaceSource,
148
80
  pathExists
149
- } from "./chunk-9t6bcs6h.js";
81
+ } from "./chunk-5thf5z45.js";
150
82
  import {
151
83
  init_json,
152
84
  safeParseJSON
153
85
  } from "./chunk-fs34dpdm.js";
154
- import {
155
- count,
156
- init_array
157
- } from "./chunk-zwarn9h7.js";
158
86
  import {
159
87
  init_lazySchema,
160
88
  lazySchema
@@ -162,7 +90,7 @@ import {
162
90
  import {
163
91
  init_genericProcessUtils,
164
92
  isProcessRunning
165
- } from "./chunk-nz9rqw9y.js";
93
+ } from "./chunk-qxp3d963.js";
166
94
  import {
167
95
  init_v4,
168
96
  v4_default
@@ -170,59 +98,20 @@ import {
170
98
  import {
171
99
  exports_external
172
100
  } from "./chunk-p26t5d5e.js";
173
- import {
174
- formatRelativeTimeAgo,
175
- init_format,
176
- truncate
177
- } from "./chunk-kb3arncw.js";
178
- import {
179
- Divider,
180
- ThemedBox_default,
181
- ThemedText,
182
- init_src,
183
- useKeybinding,
184
- useKeybindings,
185
- useTerminalSize
186
- } from "./chunk-m2epey0s.js";
187
- import {
188
- require_react
189
- } from "./chunk-64k6ybmm.js";
190
- import {
191
- require_jsx_runtime
192
- } from "./chunk-qr5vq8ys.js";
193
101
  import {
194
102
  init_analytics,
195
103
  logEvent
196
- } from "./chunk-h0rbjg6x.js";
104
+ } from "./chunk-f2mhrmww.js";
197
105
  import {
198
106
  findCanonicalGitRoot,
199
107
  init_diagLogs,
200
108
  init_git,
201
109
  logForDiagnosticsNoPII
202
- } from "./chunk-g8e4wwak.js";
203
- import {
204
- getCwd,
205
- init_cwd
206
- } from "./chunk-d24kfzcv.js";
110
+ } from "./chunk-vacje5g9.js";
207
111
  import {
208
- BASH_STDERR_TAG,
209
- BASH_STDOUT_TAG,
210
- COMMAND_MESSAGE_TAG,
211
- LOCAL_COMMAND_STDERR_TAG,
212
- LOCAL_COMMAND_STDOUT_TAG,
213
- TASK_NOTIFICATION_TAG,
214
- TEAMMATE_MESSAGE_TAG,
215
- TICK_TAG,
216
- init_displayTags,
217
112
  init_log,
218
- init_xml,
219
- logError,
220
- stripDisplayTags
113
+ logError
221
114
  } from "./chunk-vtcqe66h.js";
222
- import {
223
- figures_default,
224
- init_figures
225
- } from "./chunk-qajrkk97.js";
226
115
  import {
227
116
  AbortError,
228
117
  errorMessage,
@@ -244,19 +133,16 @@ import {
244
133
  getOriginalCwd,
245
134
  getProjectRoot,
246
135
  getScheduledTasksEnabled,
247
- getSdkBetas,
248
136
  getSessionCronTasks,
249
137
  getSessionId,
250
138
  init_state,
251
139
  removeSessionCronTasks,
252
- setPromptId,
253
140
  setScheduledTasksEnabled
254
141
  } from "./chunk-rcxtkewg.js";
255
142
  import {
256
143
  __esm,
257
144
  __export,
258
- __require,
259
- __toESM
145
+ __require
260
146
  } from "./chunk-qp2qdcda.js";
261
147
 
262
148
  // src/utils/autonomyQueueLifecycle.ts
@@ -423,803 +309,6 @@ var init_autonomyQueueLifecycle = __esm(() => {
423
309
  init_autonomyRuns();
424
310
  });
425
311
 
426
- // src/components/MessageSelector.tsx
427
- var exports_MessageSelector = {};
428
- __export(exports_MessageSelector, {
429
- selectableUserMessagesFilter: () => selectableUserMessagesFilter,
430
- messagesAfterAreOnlySynthetic: () => messagesAfterAreOnlySynthetic,
431
- MessageSelector: () => MessageSelector
432
- });
433
- import { randomUUID } from "crypto";
434
- import * as path from "path";
435
- function isTextBlock(block) {
436
- return block.type === "text";
437
- }
438
- function isSummarizeOption(option) {
439
- return option === "summarize" || option === "summarize_up_to";
440
- }
441
- function MessageSelector({
442
- messages,
443
- onPreRestore,
444
- onRestoreMessage,
445
- onRestoreCode,
446
- onSummarize,
447
- onClose,
448
- preselectedMessage
449
- }) {
450
- const fileHistory = useAppState((s) => s.fileHistory);
451
- const [error, setError] = import_react.useState(undefined);
452
- const isFileHistoryEnabled = fileHistoryEnabled();
453
- const currentUUID = import_react.useMemo(randomUUID, []);
454
- const messageOptions = import_react.useMemo(() => [
455
- ...messages.filter(selectableUserMessagesFilter),
456
- {
457
- ...createUserMessage({
458
- content: ""
459
- }),
460
- uuid: currentUUID
461
- }
462
- ], [messages, currentUUID]);
463
- const [selectedIndex, setSelectedIndex] = import_react.useState(messageOptions.length - 1);
464
- const firstVisibleIndex = Math.max(0, Math.min(selectedIndex - Math.floor(MAX_VISIBLE_MESSAGES / 2), messageOptions.length - MAX_VISIBLE_MESSAGES));
465
- const hasMessagesToSelect = messageOptions.length > 1;
466
- const [messageToRestore, setMessageToRestore] = import_react.useState(preselectedMessage);
467
- const [diffStatsForRestore, setDiffStatsForRestore] = import_react.useState(undefined);
468
- import_react.useEffect(() => {
469
- if (!preselectedMessage || !isFileHistoryEnabled)
470
- return;
471
- let cancelled = false;
472
- fileHistoryGetDiffStats(fileHistory, preselectedMessage.uuid).then((stats) => {
473
- if (!cancelled)
474
- setDiffStatsForRestore(stats);
475
- });
476
- return () => {
477
- cancelled = true;
478
- };
479
- }, [preselectedMessage, isFileHistoryEnabled, fileHistory]);
480
- const [isRestoring, setIsRestoring] = import_react.useState(false);
481
- const [restoringOption, setRestoringOption] = import_react.useState(null);
482
- const [selectedRestoreOption, setSelectedRestoreOption] = import_react.useState("both");
483
- const [summarizeFromFeedback, setSummarizeFromFeedback] = import_react.useState("");
484
- const [summarizeUpToFeedback, setSummarizeUpToFeedback] = import_react.useState("");
485
- function getRestoreOptions(canRestoreCode2) {
486
- const baseOptions = canRestoreCode2 ? [
487
- { value: "both", label: "Restore code and conversation" },
488
- { value: "conversation", label: "Restore conversation" },
489
- { value: "code", label: "Restore code" }
490
- ] : [{ value: "conversation", label: "Restore conversation" }];
491
- const summarizeInputProps = {
492
- type: "input",
493
- placeholder: "add context (optional)",
494
- initialValue: "",
495
- allowEmptySubmitToCancel: true,
496
- showLabelWithValue: true,
497
- labelValueSeparator: ": "
498
- };
499
- baseOptions.push({
500
- value: "summarize",
501
- label: "Summarize from here",
502
- ...summarizeInputProps,
503
- onChange: setSummarizeFromFeedback
504
- });
505
- if (process.env.USER_TYPE === "ant") {
506
- baseOptions.push({
507
- value: "summarize_up_to",
508
- label: "Summarize up to here",
509
- ...summarizeInputProps,
510
- onChange: setSummarizeUpToFeedback
511
- });
512
- }
513
- baseOptions.push({ value: "nevermind", label: "Never mind" });
514
- return baseOptions;
515
- }
516
- import_react.useEffect(() => {
517
- logEvent("tengu_message_selector_opened", {});
518
- }, []);
519
- async function restoreConversationDirectly(message) {
520
- onPreRestore();
521
- setIsRestoring(true);
522
- try {
523
- await onRestoreMessage(message);
524
- setIsRestoring(false);
525
- onClose();
526
- } catch (error2) {
527
- logError(error2);
528
- setIsRestoring(false);
529
- setError(`Failed to restore the conversation:
530
- ${error2}`);
531
- }
532
- }
533
- async function handleSelect(message) {
534
- const index = messages.indexOf(message);
535
- const indexFromEnd = messages.length - 1 - index;
536
- logEvent("tengu_message_selector_selected", {
537
- index_from_end: indexFromEnd,
538
- message_type: message.type,
539
- is_current_prompt: false
540
- });
541
- if (!messages.includes(message)) {
542
- onClose();
543
- return;
544
- }
545
- if (!isFileHistoryEnabled) {
546
- await restoreConversationDirectly(message);
547
- return;
548
- }
549
- const diffStats = await fileHistoryGetDiffStats(fileHistory, message.uuid);
550
- setMessageToRestore(message);
551
- setDiffStatsForRestore(diffStats);
552
- }
553
- async function onSelectRestoreOption(option) {
554
- logEvent("tengu_message_selector_restore_option_selected", {
555
- option
556
- });
557
- if (!messageToRestore) {
558
- setError("Message not found.");
559
- return;
560
- }
561
- if (option === "nevermind") {
562
- if (preselectedMessage)
563
- onClose();
564
- else
565
- setMessageToRestore(undefined);
566
- return;
567
- }
568
- if (isSummarizeOption(option)) {
569
- onPreRestore();
570
- setIsRestoring(true);
571
- setRestoringOption(option);
572
- setError(undefined);
573
- try {
574
- const direction = option === "summarize_up_to" ? "up_to" : "from";
575
- const feedback = (direction === "up_to" ? summarizeUpToFeedback : summarizeFromFeedback).trim() || undefined;
576
- await onSummarize(messageToRestore, feedback, direction);
577
- setIsRestoring(false);
578
- setRestoringOption(null);
579
- setMessageToRestore(undefined);
580
- onClose();
581
- } catch (error2) {
582
- logError(error2);
583
- setIsRestoring(false);
584
- setRestoringOption(null);
585
- setMessageToRestore(undefined);
586
- setError(`Failed to summarize:
587
- ${error2}`);
588
- }
589
- return;
590
- }
591
- onPreRestore();
592
- setIsRestoring(true);
593
- setError(undefined);
594
- let codeError = null;
595
- let conversationError = null;
596
- if (option === "code" || option === "both") {
597
- try {
598
- await onRestoreCode(messageToRestore);
599
- } catch (error2) {
600
- codeError = error2;
601
- logError(codeError);
602
- }
603
- }
604
- if (option === "conversation" || option === "both") {
605
- try {
606
- await onRestoreMessage(messageToRestore);
607
- } catch (error2) {
608
- conversationError = error2;
609
- logError(conversationError);
610
- }
611
- }
612
- setIsRestoring(false);
613
- setMessageToRestore(undefined);
614
- if (conversationError && codeError) {
615
- setError(`Failed to restore the conversation and code:
616
- ${conversationError}
617
- ${codeError}`);
618
- } else if (conversationError) {
619
- setError(`Failed to restore the conversation:
620
- ${conversationError}`);
621
- } else if (codeError) {
622
- setError(`Failed to restore the code:
623
- ${codeError}`);
624
- } else {
625
- onClose();
626
- }
627
- }
628
- const exitState = useExitOnCtrlCDWithKeybindings();
629
- const handleEscape = import_react.useCallback(() => {
630
- if (messageToRestore && !preselectedMessage) {
631
- setMessageToRestore(undefined);
632
- return;
633
- }
634
- logEvent("tengu_message_selector_cancelled", {});
635
- onClose();
636
- }, [onClose, messageToRestore, preselectedMessage]);
637
- const moveUp = import_react.useCallback(() => setSelectedIndex((prev) => Math.max(0, prev - 1)), []);
638
- const moveDown = import_react.useCallback(() => setSelectedIndex((prev) => Math.min(messageOptions.length - 1, prev + 1)), [messageOptions.length]);
639
- const jumpToTop = import_react.useCallback(() => setSelectedIndex(0), []);
640
- const jumpToBottom = import_react.useCallback(() => setSelectedIndex(messageOptions.length - 1), [messageOptions.length]);
641
- const handleSelectCurrent = import_react.useCallback(() => {
642
- const selected = messageOptions[selectedIndex];
643
- if (selected) {
644
- handleSelect(selected);
645
- }
646
- }, [messageOptions, selectedIndex, handleSelect]);
647
- useKeybinding("confirm:no", handleEscape, {
648
- context: "Confirmation",
649
- isActive: !messageToRestore
650
- });
651
- useKeybindings({
652
- "messageSelector:up": moveUp,
653
- "messageSelector:down": moveDown,
654
- "messageSelector:top": jumpToTop,
655
- "messageSelector:bottom": jumpToBottom,
656
- "messageSelector:select": handleSelectCurrent
657
- }, {
658
- context: "MessageSelector",
659
- isActive: !isRestoring && !error && !messageToRestore && hasMessagesToSelect
660
- });
661
- const [fileHistoryMetadata, setFileHistoryMetadata] = import_react.useState({});
662
- import_react.useEffect(() => {
663
- async function loadFileHistoryMetadata() {
664
- if (!isFileHistoryEnabled) {
665
- return;
666
- }
667
- Promise.all(messageOptions.map(async (userMessage, itemIndex) => {
668
- if (userMessage.uuid !== currentUUID) {
669
- const canRestore = fileHistoryCanRestore(fileHistory, userMessage.uuid);
670
- const nextUserMessage = messageOptions.at(itemIndex + 1);
671
- const diffStats = canRestore ? computeDiffStatsBetweenMessages(messages, userMessage.uuid, nextUserMessage?.uuid !== currentUUID ? nextUserMessage?.uuid : undefined) : undefined;
672
- if (diffStats !== undefined) {
673
- setFileHistoryMetadata((prev) => ({
674
- ...prev,
675
- [itemIndex]: diffStats
676
- }));
677
- } else {
678
- setFileHistoryMetadata((prev) => ({
679
- ...prev,
680
- [itemIndex]: undefined
681
- }));
682
- }
683
- }
684
- }));
685
- }
686
- loadFileHistoryMetadata();
687
- }, [messageOptions, messages, currentUUID, fileHistory, isFileHistoryEnabled]);
688
- const canRestoreCode = isFileHistoryEnabled && diffStatsForRestore?.filesChanged && diffStatsForRestore.filesChanged.length > 0;
689
- const showPickList = !error && !messageToRestore && !preselectedMessage && hasMessagesToSelect;
690
- return /* @__PURE__ */ jsx_runtime.jsxs(ThemedBox_default, {
691
- flexDirection: "column",
692
- width: "100%",
693
- children: [
694
- /* @__PURE__ */ jsx_runtime.jsx(Divider, {
695
- color: "suggestion"
696
- }),
697
- /* @__PURE__ */ jsx_runtime.jsxs(ThemedBox_default, {
698
- flexDirection: "column",
699
- marginX: 1,
700
- gap: 1,
701
- children: [
702
- /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
703
- bold: true,
704
- color: "suggestion",
705
- children: "Rewind"
706
- }),
707
- error && /* @__PURE__ */ jsx_runtime.jsx(jsx_runtime.Fragment, {
708
- children: /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
709
- color: "error",
710
- children: [
711
- "Error: ",
712
- error
713
- ]
714
- })
715
- }),
716
- !hasMessagesToSelect && /* @__PURE__ */ jsx_runtime.jsx(jsx_runtime.Fragment, {
717
- children: /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
718
- children: "Nothing to rewind to yet."
719
- })
720
- }),
721
- !error && messageToRestore && hasMessagesToSelect && /* @__PURE__ */ jsx_runtime.jsxs(jsx_runtime.Fragment, {
722
- children: [
723
- /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
724
- children: [
725
- "Confirm you want to restore ",
726
- !diffStatsForRestore && "the conversation ",
727
- "to the point before you sent this message:"
728
- ]
729
- }),
730
- /* @__PURE__ */ jsx_runtime.jsxs(ThemedBox_default, {
731
- flexDirection: "column",
732
- paddingLeft: 1,
733
- borderStyle: "single",
734
- borderRight: false,
735
- borderTop: false,
736
- borderBottom: false,
737
- borderLeft: true,
738
- borderLeftDimColor: true,
739
- children: [
740
- /* @__PURE__ */ jsx_runtime.jsx(UserMessageOption, {
741
- userMessage: messageToRestore,
742
- color: "text",
743
- isCurrent: false
744
- }),
745
- /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
746
- dimColor: true,
747
- children: [
748
- "(",
749
- formatRelativeTimeAgo(new Date(messageToRestore.timestamp)),
750
- ")"
751
- ]
752
- })
753
- ]
754
- }),
755
- /* @__PURE__ */ jsx_runtime.jsx(RestoreOptionDescription, {
756
- selectedRestoreOption,
757
- canRestoreCode: !!canRestoreCode,
758
- diffStatsForRestore
759
- }),
760
- isRestoring && isSummarizeOption(restoringOption) ? /* @__PURE__ */ jsx_runtime.jsxs(ThemedBox_default, {
761
- flexDirection: "row",
762
- gap: 1,
763
- children: [
764
- /* @__PURE__ */ jsx_runtime.jsx(Spinner, {}),
765
- /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
766
- children: "Summarizing\u2026"
767
- })
768
- ]
769
- }) : /* @__PURE__ */ jsx_runtime.jsx(Select, {
770
- isDisabled: isRestoring,
771
- options: getRestoreOptions(!!canRestoreCode),
772
- defaultFocusValue: canRestoreCode ? "both" : "conversation",
773
- onFocus: (value) => setSelectedRestoreOption(value),
774
- onChange: (value) => onSelectRestoreOption(value),
775
- onCancel: () => preselectedMessage ? onClose() : setMessageToRestore(undefined)
776
- }),
777
- canRestoreCode && /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
778
- marginBottom: 1,
779
- children: /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
780
- dimColor: true,
781
- children: [
782
- figures_default.warning,
783
- " Rewinding does not affect files edited manually or via bash."
784
- ]
785
- })
786
- })
787
- ]
788
- }),
789
- showPickList && /* @__PURE__ */ jsx_runtime.jsxs(jsx_runtime.Fragment, {
790
- children: [
791
- isFileHistoryEnabled ? /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
792
- children: "Restore the code and/or conversation to the point before\u2026"
793
- }) : /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
794
- children: "Restore and fork the conversation to the point before\u2026"
795
- }),
796
- /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
797
- width: "100%",
798
- flexDirection: "column",
799
- children: messageOptions.slice(firstVisibleIndex, firstVisibleIndex + MAX_VISIBLE_MESSAGES).map((msg, visibleOptionIndex) => {
800
- const optionIndex = firstVisibleIndex + visibleOptionIndex;
801
- const isSelected = optionIndex === selectedIndex;
802
- const isCurrent = msg.uuid === currentUUID;
803
- const metadataLoaded = optionIndex in fileHistoryMetadata;
804
- const metadata = fileHistoryMetadata[optionIndex];
805
- const numFilesChanged = metadata?.filesChanged && metadata.filesChanged.length;
806
- return /* @__PURE__ */ jsx_runtime.jsxs(ThemedBox_default, {
807
- height: isFileHistoryEnabled ? 3 : 2,
808
- overflow: "hidden",
809
- width: "100%",
810
- flexDirection: "row",
811
- children: [
812
- /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
813
- width: 2,
814
- minWidth: 2,
815
- children: isSelected ? /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
816
- color: "permission",
817
- bold: true,
818
- children: [
819
- figures_default.pointer,
820
- " "
821
- ]
822
- }) : /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
823
- children: " "
824
- })
825
- }),
826
- /* @__PURE__ */ jsx_runtime.jsxs(ThemedBox_default, {
827
- flexDirection: "column",
828
- children: [
829
- /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
830
- flexShrink: 1,
831
- height: 1,
832
- overflow: "hidden",
833
- children: /* @__PURE__ */ jsx_runtime.jsx(UserMessageOption, {
834
- userMessage: msg,
835
- color: isSelected ? "suggestion" : undefined,
836
- isCurrent,
837
- paddingRight: 10
838
- })
839
- }),
840
- isFileHistoryEnabled && metadataLoaded && /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
841
- height: 1,
842
- flexDirection: "row",
843
- children: metadata ? /* @__PURE__ */ jsx_runtime.jsx(jsx_runtime.Fragment, {
844
- children: /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
845
- dimColor: !isSelected,
846
- color: "inactive",
847
- children: numFilesChanged ? /* @__PURE__ */ jsx_runtime.jsxs(jsx_runtime.Fragment, {
848
- children: [
849
- numFilesChanged === 1 && metadata.filesChanged[0] ? `${path.basename(metadata.filesChanged[0])} ` : `${numFilesChanged} files changed `,
850
- /* @__PURE__ */ jsx_runtime.jsx(DiffStatsText, {
851
- diffStats: metadata
852
- })
853
- ]
854
- }) : /* @__PURE__ */ jsx_runtime.jsx(jsx_runtime.Fragment, {
855
- children: "No code changes"
856
- })
857
- })
858
- }) : /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
859
- dimColor: true,
860
- color: "warning",
861
- children: [
862
- figures_default.warning,
863
- " No code restore"
864
- ]
865
- })
866
- })
867
- ]
868
- })
869
- ]
870
- }, msg.uuid);
871
- })
872
- })
873
- ]
874
- }),
875
- !messageToRestore && /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
876
- dimColor: true,
877
- italic: true,
878
- children: exitState.pending ? /* @__PURE__ */ jsx_runtime.jsxs(jsx_runtime.Fragment, {
879
- children: [
880
- "Press ",
881
- exitState.keyName,
882
- " again to exit"
883
- ]
884
- }) : /* @__PURE__ */ jsx_runtime.jsxs(jsx_runtime.Fragment, {
885
- children: [
886
- !error && hasMessagesToSelect && "Enter to continue \xB7 ",
887
- "Esc to exit"
888
- ]
889
- })
890
- })
891
- ]
892
- })
893
- ]
894
- });
895
- }
896
- function getRestoreOptionConversationText(option) {
897
- switch (option) {
898
- case "summarize":
899
- return "Messages after this point will be summarized.";
900
- case "summarize_up_to":
901
- return "Preceding messages will be summarized. This and subsequent messages will remain unchanged \u2014 you will stay at the end of the conversation.";
902
- case "both":
903
- case "conversation":
904
- return "The conversation will be forked.";
905
- case "code":
906
- case "nevermind":
907
- return "The conversation will be unchanged.";
908
- }
909
- }
910
- function RestoreOptionDescription({
911
- selectedRestoreOption,
912
- canRestoreCode,
913
- diffStatsForRestore
914
- }) {
915
- const showCodeRestore = canRestoreCode && (selectedRestoreOption === "both" || selectedRestoreOption === "code");
916
- return /* @__PURE__ */ jsx_runtime.jsxs(ThemedBox_default, {
917
- flexDirection: "column",
918
- children: [
919
- /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
920
- dimColor: true,
921
- children: getRestoreOptionConversationText(selectedRestoreOption)
922
- }),
923
- !isSummarizeOption(selectedRestoreOption) && (showCodeRestore ? /* @__PURE__ */ jsx_runtime.jsx(RestoreCodeConfirmation, {
924
- diffStatsForRestore
925
- }) : /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
926
- dimColor: true,
927
- children: "The code will be unchanged."
928
- }))
929
- ]
930
- });
931
- }
932
- function RestoreCodeConfirmation({
933
- diffStatsForRestore
934
- }) {
935
- if (diffStatsForRestore === undefined) {
936
- return;
937
- }
938
- if (!diffStatsForRestore.filesChanged || !diffStatsForRestore.filesChanged[0]) {
939
- return /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
940
- dimColor: true,
941
- children: "The code has not changed (nothing will be restored)."
942
- });
943
- }
944
- const numFilesChanged = diffStatsForRestore.filesChanged.length;
945
- let fileLabel = "";
946
- if (numFilesChanged === 1) {
947
- fileLabel = path.basename(diffStatsForRestore.filesChanged[0] || "");
948
- } else if (numFilesChanged === 2) {
949
- const file1 = path.basename(diffStatsForRestore.filesChanged[0] || "");
950
- const file2 = path.basename(diffStatsForRestore.filesChanged[1] || "");
951
- fileLabel = `${file1} and ${file2}`;
952
- } else {
953
- const file1 = path.basename(diffStatsForRestore.filesChanged[0] || "");
954
- fileLabel = `${file1} and ${diffStatsForRestore.filesChanged.length - 1} other files`;
955
- }
956
- return /* @__PURE__ */ jsx_runtime.jsx(jsx_runtime.Fragment, {
957
- children: /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
958
- dimColor: true,
959
- children: [
960
- "The code will be restored ",
961
- /* @__PURE__ */ jsx_runtime.jsx(DiffStatsText, {
962
- diffStats: diffStatsForRestore
963
- }),
964
- " in ",
965
- fileLabel,
966
- "."
967
- ]
968
- })
969
- });
970
- }
971
- function DiffStatsText({ diffStats }) {
972
- if (!diffStats || !diffStats.filesChanged) {
973
- return;
974
- }
975
- return /* @__PURE__ */ jsx_runtime.jsxs(jsx_runtime.Fragment, {
976
- children: [
977
- /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
978
- color: "diffAddedWord",
979
- children: [
980
- "+",
981
- diffStats.insertions,
982
- " "
983
- ]
984
- }),
985
- /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
986
- color: "diffRemovedWord",
987
- children: [
988
- "-",
989
- diffStats.deletions
990
- ]
991
- })
992
- ]
993
- });
994
- }
995
- function UserMessageOption({
996
- userMessage,
997
- color,
998
- dimColor,
999
- isCurrent,
1000
- paddingRight
1001
- }) {
1002
- const { columns } = useTerminalSize();
1003
- if (isCurrent) {
1004
- return /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
1005
- width: "100%",
1006
- children: /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
1007
- italic: true,
1008
- color,
1009
- dimColor,
1010
- children: "(current)"
1011
- })
1012
- });
1013
- }
1014
- const content = userMessage.message.content;
1015
- const lastBlock = typeof content === "string" ? null : content[content.length - 1];
1016
- const rawMessageText = typeof content === "string" ? content.trim() : lastBlock && isTextBlock(lastBlock) ? lastBlock.text.trim() : "(no prompt)";
1017
- const messageText = stripDisplayTags(rawMessageText);
1018
- if (isEmptyMessageText(messageText)) {
1019
- return /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
1020
- flexDirection: "row",
1021
- width: "100%",
1022
- children: /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
1023
- italic: true,
1024
- color,
1025
- dimColor,
1026
- children: "((empty message))"
1027
- })
1028
- });
1029
- }
1030
- if (messageText.includes("<bash-input>")) {
1031
- const input = extractTag(messageText, "bash-input");
1032
- if (input) {
1033
- return /* @__PURE__ */ jsx_runtime.jsxs(ThemedBox_default, {
1034
- flexDirection: "row",
1035
- width: "100%",
1036
- children: [
1037
- /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
1038
- color: "bashBorder",
1039
- children: "!"
1040
- }),
1041
- /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
1042
- color,
1043
- dimColor,
1044
- children: [
1045
- " ",
1046
- input
1047
- ]
1048
- })
1049
- ]
1050
- });
1051
- }
1052
- }
1053
- if (messageText.includes(`<${COMMAND_MESSAGE_TAG}>`)) {
1054
- const commandMessage = extractTag(messageText, COMMAND_MESSAGE_TAG);
1055
- const args = extractTag(messageText, "command-args");
1056
- const isSkillFormat = extractTag(messageText, "skill-format") === "true";
1057
- if (commandMessage) {
1058
- if (isSkillFormat) {
1059
- return /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
1060
- flexDirection: "row",
1061
- width: "100%",
1062
- children: /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
1063
- color,
1064
- dimColor,
1065
- children: [
1066
- "Skill(",
1067
- commandMessage,
1068
- ")"
1069
- ]
1070
- })
1071
- });
1072
- } else {
1073
- return /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
1074
- flexDirection: "row",
1075
- width: "100%",
1076
- children: /* @__PURE__ */ jsx_runtime.jsxs(ThemedText, {
1077
- color,
1078
- dimColor,
1079
- children: [
1080
- "/",
1081
- commandMessage,
1082
- " ",
1083
- args
1084
- ]
1085
- })
1086
- });
1087
- }
1088
- }
1089
- }
1090
- return /* @__PURE__ */ jsx_runtime.jsx(ThemedBox_default, {
1091
- flexDirection: "row",
1092
- width: "100%",
1093
- children: /* @__PURE__ */ jsx_runtime.jsx(ThemedText, {
1094
- color,
1095
- dimColor,
1096
- children: paddingRight ? truncate(messageText, columns - paddingRight, true) : messageText.slice(0, 500).split(`
1097
- `).slice(0, 4).join(`
1098
- `)
1099
- })
1100
- });
1101
- }
1102
- function computeDiffStatsBetweenMessages(messages, fromMessageId, toMessageId) {
1103
- const startIndex = messages.findIndex((msg) => msg.uuid === fromMessageId);
1104
- if (startIndex === -1) {
1105
- return;
1106
- }
1107
- let endIndex = toMessageId ? messages.findIndex((msg) => msg.uuid === toMessageId) : messages.length;
1108
- if (endIndex === -1) {
1109
- endIndex = messages.length;
1110
- }
1111
- const filesChanged = [];
1112
- let insertions = 0;
1113
- let deletions = 0;
1114
- for (let i = startIndex + 1;i < endIndex; i++) {
1115
- const msg = messages[i];
1116
- if (!msg || !isToolUseResultMessage(msg)) {
1117
- continue;
1118
- }
1119
- const result = msg.toolUseResult;
1120
- if (!result || !result.filePath || !result.structuredPatch) {
1121
- continue;
1122
- }
1123
- if (!filesChanged.includes(result.filePath)) {
1124
- filesChanged.push(result.filePath);
1125
- }
1126
- try {
1127
- if ("type" in result && result.type === "create") {
1128
- insertions += result.content.split(/\r?\n/).length;
1129
- } else {
1130
- for (const hunk of result.structuredPatch) {
1131
- const additions = count(hunk.lines, (line) => line.startsWith("+"));
1132
- const removals = count(hunk.lines, (line) => line.startsWith("-"));
1133
- insertions += additions;
1134
- deletions += removals;
1135
- }
1136
- }
1137
- } catch {}
1138
- }
1139
- return {
1140
- filesChanged,
1141
- insertions,
1142
- deletions
1143
- };
1144
- }
1145
- function selectableUserMessagesFilter(message) {
1146
- if (message.type !== "user") {
1147
- return false;
1148
- }
1149
- if (Array.isArray(message.message.content) && message.message.content[0]?.type === "tool_result") {
1150
- return false;
1151
- }
1152
- if (isSyntheticMessage(message)) {
1153
- return false;
1154
- }
1155
- if (message.isMeta) {
1156
- return false;
1157
- }
1158
- if (message.isCompactSummary || message.isVisibleInTranscriptOnly) {
1159
- return false;
1160
- }
1161
- const content = message.message.content;
1162
- const lastBlock = typeof content === "string" ? null : content[content.length - 1];
1163
- const messageText = typeof content === "string" ? content.trim() : lastBlock && isTextBlock(lastBlock) ? lastBlock.text.trim() : "";
1164
- if (messageText.indexOf(`<${LOCAL_COMMAND_STDOUT_TAG}>`) !== -1 || messageText.indexOf(`<${LOCAL_COMMAND_STDERR_TAG}>`) !== -1 || messageText.indexOf(`<${BASH_STDOUT_TAG}>`) !== -1 || messageText.indexOf(`<${BASH_STDERR_TAG}>`) !== -1 || messageText.indexOf(`<${TASK_NOTIFICATION_TAG}>`) !== -1 || messageText.indexOf(`<${TICK_TAG}>`) !== -1 || messageText.indexOf(`<${TEAMMATE_MESSAGE_TAG}`) !== -1) {
1165
- return false;
1166
- }
1167
- return true;
1168
- }
1169
- function messagesAfterAreOnlySynthetic(messages, fromIndex) {
1170
- for (let i = fromIndex + 1;i < messages.length; i++) {
1171
- const msg = messages[i];
1172
- if (!msg)
1173
- continue;
1174
- if (isSyntheticMessage(msg))
1175
- continue;
1176
- if (isToolUseResultMessage(msg))
1177
- continue;
1178
- if (msg.type === "progress")
1179
- continue;
1180
- if (msg.type === "system")
1181
- continue;
1182
- if (msg.type === "attachment")
1183
- continue;
1184
- if (msg.type === "user" && msg.isMeta)
1185
- continue;
1186
- if (msg.type === "assistant") {
1187
- const content = msg.message.content;
1188
- if (Array.isArray(content)) {
1189
- const hasMeaningfulContent = content.some((block) => block.type === "text" && block.text.trim() || block.type === "tool_use");
1190
- if (hasMeaningfulContent)
1191
- return false;
1192
- }
1193
- continue;
1194
- }
1195
- if (msg.type === "user") {
1196
- return false;
1197
- }
1198
- }
1199
- return true;
1200
- }
1201
- var import_react, jsx_runtime, MAX_VISIBLE_MESSAGES = 7;
1202
- var init_MessageSelector = __esm(() => {
1203
- init_figures();
1204
- init_analytics();
1205
- init_AppState();
1206
- init_fileHistory();
1207
- init_log();
1208
- init_useExitOnCtrlCDWithKeybindings();
1209
- init_src();
1210
- init_useKeybinding();
1211
- init_displayTags();
1212
- init_messages();
1213
- init_select();
1214
- init_Spinner();
1215
- init_useTerminalSize();
1216
- init_xml();
1217
- init_array();
1218
- init_format();
1219
- import_react = __toESM(require_react(), 1);
1220
- jsx_runtime = __toESM(require_jsx_runtime(), 1);
1221
- });
1222
-
1223
312
  // src/utils/cronJitterConfig.ts
1224
313
  var exports_cronJitterConfig = {};
1225
314
  __export(exports_cronJitterConfig, {
@@ -1266,19 +355,19 @@ async function readLock(dir) {
1266
355
  return result.success ? result.data : undefined;
1267
356
  }
1268
357
  async function tryCreateExclusive(lock, dir) {
1269
- const path2 = getLockPath(dir);
358
+ const path = getLockPath(dir);
1270
359
  const body = jsonStringify(lock);
1271
360
  try {
1272
- await writeFile(path2, body, { flag: "wx" });
361
+ await writeFile(path, body, { flag: "wx" });
1273
362
  return true;
1274
363
  } catch (e) {
1275
364
  const code = getErrnoCode(e);
1276
365
  if (code === "EEXIST")
1277
366
  return false;
1278
367
  if (code === "ENOENT") {
1279
- await mkdir(dirname(path2), { recursive: true });
368
+ await mkdir(dirname(path), { recursive: true });
1280
369
  try {
1281
- await writeFile(path2, body, { flag: "wx" });
370
+ await writeFile(path, body, { flag: "wx" });
1282
371
  return true;
1283
372
  } catch (retryErr) {
1284
373
  if (getErrnoCode(retryErr) === "EEXIST")
@@ -1550,8 +639,8 @@ function createCronScheduler(options) {
1550
639
  lockProbeTimer.unref?.();
1551
640
  }
1552
641
  load(true);
1553
- const path2 = getCronFilePath(dir);
1554
- watcher = chokidar.watch(path2, {
642
+ const path = getCronFilePath(dir);
643
+ watcher = chokidar.watch(path, {
1555
644
  persistent: false,
1556
645
  ignoreInitial: true,
1557
646
  awaitWriteFinish: { stabilityThreshold: FILE_STABILITY_MS },
@@ -1753,7 +842,7 @@ function permissionPromptToolResultToPermissionDecision(result, tool, input, too
1753
842
  }
1754
843
 
1755
844
  // src/cli/structuredIO.ts
1756
- import { randomUUID as randomUUID2 } from "crypto";
845
+ import { randomUUID } from "crypto";
1757
846
 
1758
847
  // src/entrypoints/sdk/controlSchemas.ts
1759
848
  init_v4();
@@ -2123,7 +1212,9 @@ function serializeDecisionReason(reason) {
2123
1212
  if (!reason) {
2124
1213
  return;
2125
1214
  }
2126
- if (false) {}
1215
+ if (reason.type === "classifier") {
1216
+ return reason.reason;
1217
+ }
2127
1218
  switch (reason.type) {
2128
1219
  case "rule":
2129
1220
  case "mode":
@@ -2373,7 +1464,7 @@ class StructuredIO {
2373
1464
  writeToStdout(ndjsonSafeStringify(message) + `
2374
1465
  `);
2375
1466
  }
2376
- async sendRequest(request, schema, signal, requestId = randomUUID2()) {
1467
+ async sendRequest(request, schema, signal, requestId = randomUUID()) {
2377
1468
  const message = {
2378
1469
  type: "control_request",
2379
1470
  request_id: requestId,
@@ -2439,7 +1530,7 @@ class StructuredIO {
2439
1530
  parentSignal.addEventListener("abort", onParentAbort, { once: true });
2440
1531
  try {
2441
1532
  const hookPromise = executePermissionRequestHooksForSDK(tool.name, toolUseID, input, toolUseContext, mainPermissionResult.suggestions).then((decision) => ({ source: "hook", decision }));
2442
- const requestId = randomUUID2();
1533
+ const requestId = randomUUID();
2443
1534
  onPermissionPrompt?.(buildRequiresActionDetails(tool, input, toolUseID, requestId));
2444
1535
  const sdkPromise = this.sendRequest({
2445
1536
  subtype: "can_use_tool",
@@ -2519,7 +1610,7 @@ class StructuredIO {
2519
1610
  subtype: "can_use_tool",
2520
1611
  tool_name: SANDBOX_NETWORK_ACCESS_TOOL_NAME,
2521
1612
  input: { host: hostPattern.host },
2522
- tool_use_id: randomUUID2(),
1613
+ tool_use_id: randomUUID(),
2523
1614
  description: `Allow network connection to ${hostPattern.host}?`
2524
1615
  }, outputSchema());
2525
1616
  return result.behavior === "allow";
@@ -2587,461 +1678,6 @@ async function executePermissionRequestHooksForSDK(toolName, toolUseID, input, t
2587
1678
  return;
2588
1679
  }
2589
1680
 
2590
- // src/utils/messages/systemInit.ts
2591
- init_state();
2592
- init_outputStyles();
2593
- init_constants();
2594
- init_auth();
2595
- init_cwd();
2596
- init_fastMode();
2597
- init_settings();
2598
- import { randomUUID as randomUUID3 } from "crypto";
2599
- function sdkCompatToolName(name) {
2600
- return name === AGENT_TOOL_NAME ? LEGACY_AGENT_TOOL_NAME : name;
2601
- }
2602
- function buildSystemInitMessage(inputs) {
2603
- const settings = getSettings_DEPRECATED();
2604
- const outputStyle = settings?.outputStyle ?? DEFAULT_OUTPUT_STYLE_NAME;
2605
- const initMessage = {
2606
- type: "system",
2607
- subtype: "init",
2608
- cwd: getCwd(),
2609
- session_id: getSessionId(),
2610
- tools: inputs.tools.map((tool) => sdkCompatToolName(tool.name)),
2611
- mcp_servers: inputs.mcpClients.map((client) => ({
2612
- name: client.name,
2613
- status: client.type
2614
- })),
2615
- model: inputs.model,
2616
- permissionMode: inputs.permissionMode,
2617
- slash_commands: inputs.commands.filter((c) => c.userInvocable !== false).map((c) => c.name),
2618
- apiKeySource: getAnthropicApiKeyWithSource().source,
2619
- betas: getSdkBetas(),
2620
- claude_code_version: "4.1.0",
2621
- output_style: outputStyle,
2622
- agents: inputs.agents.map((agent) => agent.agentType),
2623
- skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
2624
- plugins: inputs.plugins.map((plugin) => ({
2625
- name: plugin.name,
2626
- path: plugin.path,
2627
- source: plugin.source
2628
- })),
2629
- uuid: randomUUID3()
2630
- };
2631
- if (false) {}
2632
- initMessage.fast_mode_state = getFastModeState(inputs.model, inputs.fastMode);
2633
- return initMessage;
2634
- }
2635
-
2636
- // src/utils/ultraplan/keyword.ts
2637
- var OPEN_TO_CLOSE = {
2638
- "`": "`",
2639
- '"': '"',
2640
- "<": ">",
2641
- "{": "}",
2642
- "[": "]",
2643
- "(": ")",
2644
- "'": "'"
2645
- };
2646
- function findKeywordTriggerPositions(text, keyword) {
2647
- const re = new RegExp(keyword, "i");
2648
- if (!re.test(text))
2649
- return [];
2650
- if (text.startsWith("/"))
2651
- return [];
2652
- const quotedRanges = [];
2653
- let openQuote = null;
2654
- let openAt = 0;
2655
- const isWord = (ch) => !!ch && /[\p{L}\p{N}_]/u.test(ch);
2656
- for (let i = 0;i < text.length; i++) {
2657
- const ch = text[i];
2658
- if (openQuote) {
2659
- if (openQuote === "[" && ch === "[") {
2660
- openAt = i;
2661
- continue;
2662
- }
2663
- if (ch !== OPEN_TO_CLOSE[openQuote])
2664
- continue;
2665
- if (openQuote === "'" && isWord(text[i + 1]))
2666
- continue;
2667
- quotedRanges.push({ start: openAt, end: i + 1 });
2668
- openQuote = null;
2669
- } else if (ch === "<" && i + 1 < text.length && /[a-zA-Z/]/.test(text[i + 1]) || ch === "'" && !isWord(text[i - 1]) || ch !== "<" && ch !== "'" && ch in OPEN_TO_CLOSE) {
2670
- openQuote = ch;
2671
- openAt = i;
2672
- }
2673
- }
2674
- const positions = [];
2675
- const wordRe = new RegExp(`\\b${keyword}\\b`, "gi");
2676
- const matches = text.matchAll(wordRe);
2677
- for (const match of matches) {
2678
- if (match.index === undefined)
2679
- continue;
2680
- const start = match.index;
2681
- const end = start + match[0].length;
2682
- if (quotedRanges.some((r) => start >= r.start && start < r.end))
2683
- continue;
2684
- const before = text[start - 1];
2685
- const after = text[end];
2686
- if (before === "/" || before === "\\" || before === "-")
2687
- continue;
2688
- if (after === "/" || after === "\\" || after === "-" || after === "?")
2689
- continue;
2690
- if (after === "." && isWord(text[end + 1]))
2691
- continue;
2692
- positions.push({ word: match[0], start, end });
2693
- }
2694
- return positions;
2695
- }
2696
- function findUltraplanTriggerPositions(text) {
2697
- return findKeywordTriggerPositions(text, "ultraplan");
2698
- }
2699
- function findUltrareviewTriggerPositions(text) {
2700
- return findKeywordTriggerPositions(text, "ultrareview");
2701
- }
2702
- function hasUltraplanKeyword(text) {
2703
- return findUltraplanTriggerPositions(text).length > 0;
2704
- }
2705
- function replaceUltraplanKeyword(text) {
2706
- const [trigger] = findUltraplanTriggerPositions(text);
2707
- if (!trigger)
2708
- return text;
2709
- const before = text.slice(0, trigger.start);
2710
- const after = text.slice(trigger.end);
2711
- if (!(before + after).trim())
2712
- return "";
2713
- return before + trigger.word.slice("ultra".length) + after;
2714
- }
2715
-
2716
- // src/utils/processUserInput/processUserInput.ts
2717
- init_analytics();
2718
- init_messages();
2719
- init_commands();
2720
- init_textInputTypes();
2721
- init_attachments();
2722
- init_generators();
2723
- init_hooks2();
2724
- init_imageResizer();
2725
- init_imageStore();
2726
- init_messages();
2727
- init_queryProfiler();
2728
- init_slashCommandParsing();
2729
- import { randomUUID as randomUUID5 } from "crypto";
2730
-
2731
- // src/utils/processUserInput/processTextPrompt.ts
2732
- init_state();
2733
- init_analytics();
2734
- init_messages();
2735
- init_events();
2736
- init_sessionTracing();
2737
- import { randomUUID as randomUUID4 } from "crypto";
2738
-
2739
- // src/utils/userPromptKeywords.ts
2740
- function matchesNegativeKeyword(input) {
2741
- const lowerInput = input.toLowerCase();
2742
- const negativePattern = /\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/;
2743
- return negativePattern.test(lowerInput);
2744
- }
2745
- function matchesKeepGoingKeyword(input) {
2746
- const lowerInput = input.toLowerCase().trim();
2747
- if (lowerInput === "continue") {
2748
- return true;
2749
- }
2750
- const keepGoingPattern = /\b(keep going|go on)\b/;
2751
- return keepGoingPattern.test(lowerInput);
2752
- }
2753
-
2754
- // src/utils/processUserInput/processTextPrompt.ts
2755
- function processTextPrompt(input, imageContentBlocks, imagePasteIds, attachmentMessages, uuid, permissionMode, isMeta) {
2756
- const promptId = randomUUID4();
2757
- setPromptId(promptId);
2758
- const userPromptText = typeof input === "string" ? input : input.find((block) => block.type === "text")?.text || "";
2759
- startInteractionSpan(userPromptText);
2760
- const otelPromptText = typeof input === "string" ? input : input.findLast((block) => block.type === "text")?.text || "";
2761
- if (otelPromptText) {
2762
- logOTelEvent("user_prompt", {
2763
- prompt_length: String(otelPromptText.length),
2764
- prompt: redactIfDisabled(otelPromptText),
2765
- "prompt.id": promptId
2766
- });
2767
- }
2768
- const isNegative = matchesNegativeKeyword(userPromptText);
2769
- const isKeepGoing = matchesKeepGoingKeyword(userPromptText);
2770
- logEvent("tengu_input_prompt", {
2771
- is_negative: isNegative,
2772
- is_keep_going: isKeepGoing
2773
- });
2774
- if (imageContentBlocks.length > 0) {
2775
- const textContent = typeof input === "string" ? input.trim() ? [{ type: "text", text: input }] : [] : input;
2776
- const userMessage2 = createUserMessage({
2777
- content: [...textContent, ...imageContentBlocks],
2778
- uuid,
2779
- imagePasteIds: imagePasteIds.length > 0 ? imagePasteIds : undefined,
2780
- permissionMode,
2781
- isMeta: isMeta || undefined
2782
- });
2783
- return {
2784
- messages: [userMessage2, ...attachmentMessages],
2785
- shouldQuery: true
2786
- };
2787
- }
2788
- const userMessage = createUserMessage({
2789
- content: input,
2790
- uuid,
2791
- permissionMode,
2792
- isMeta: isMeta || undefined
2793
- });
2794
- return {
2795
- messages: [userMessage, ...attachmentMessages],
2796
- shouldQuery: true
2797
- };
2798
- }
2799
-
2800
- // src/utils/processUserInput/processUserInput.ts
2801
- async function processUserInput({
2802
- input,
2803
- preExpansionInput,
2804
- mode,
2805
- setToolJSX,
2806
- context,
2807
- pastedContents,
2808
- ideSelection,
2809
- messages,
2810
- setUserInputOnProcessing,
2811
- uuid,
2812
- isAlreadyProcessing,
2813
- querySource,
2814
- canUseTool,
2815
- skipSlashCommands,
2816
- bridgeOrigin,
2817
- isMeta,
2818
- skipAttachments,
2819
- autonomy
2820
- }) {
2821
- const inputString = typeof input === "string" ? input : null;
2822
- if (mode === "prompt" && inputString !== null && !isMeta) {
2823
- setUserInputOnProcessing?.(inputString);
2824
- }
2825
- queryCheckpoint("query_process_user_input_base_start");
2826
- const appState = context.getAppState();
2827
- const result = await processUserInputBase(input, mode, setToolJSX, context, pastedContents, ideSelection, messages, uuid, isAlreadyProcessing, querySource, canUseTool, appState.toolPermissionContext.mode, skipSlashCommands, bridgeOrigin, isMeta, skipAttachments, preExpansionInput, autonomy);
2828
- queryCheckpoint("query_process_user_input_base_end");
2829
- if (!result.shouldQuery) {
2830
- return result;
2831
- }
2832
- queryCheckpoint("query_hooks_start");
2833
- const inputMessage = getContentText(input) || "";
2834
- for await (const hookResult of executeUserPromptSubmitHooks(inputMessage, appState.toolPermissionContext.mode, context, context.requestPrompt)) {
2835
- if (hookResult.message?.type === "progress") {
2836
- continue;
2837
- }
2838
- if (hookResult.blockingError) {
2839
- const blockingMessage = getUserPromptSubmitHookBlockingMessage(hookResult.blockingError);
2840
- return {
2841
- messages: [
2842
- createSystemMessage(`${blockingMessage}
2843
-
2844
- Original prompt: ${input}`, "warning")
2845
- ],
2846
- shouldQuery: false,
2847
- allowedTools: result.allowedTools
2848
- };
2849
- }
2850
- if (hookResult.preventContinuation) {
2851
- const message = hookResult.stopReason ? `Operation stopped by hook: ${hookResult.stopReason}` : "Operation stopped by hook";
2852
- result.messages.push(createUserMessage({
2853
- content: message
2854
- }));
2855
- result.shouldQuery = false;
2856
- return result;
2857
- }
2858
- if (hookResult.additionalContexts && hookResult.additionalContexts.length > 0) {
2859
- result.messages.push(createAttachmentMessage({
2860
- type: "hook_additional_context",
2861
- content: hookResult.additionalContexts.map(applyTruncation),
2862
- hookName: "UserPromptSubmit",
2863
- toolUseID: `hook-${randomUUID5()}`,
2864
- hookEvent: "UserPromptSubmit"
2865
- }));
2866
- }
2867
- if (hookResult.message) {
2868
- switch (hookResult.message.attachment.type) {
2869
- case "hook_success":
2870
- if (!hookResult.message.attachment.content) {
2871
- break;
2872
- }
2873
- result.messages.push({
2874
- ...hookResult.message,
2875
- attachment: {
2876
- ...hookResult.message.attachment,
2877
- content: applyTruncation(hookResult.message.attachment.content)
2878
- }
2879
- });
2880
- break;
2881
- default:
2882
- result.messages.push(hookResult.message);
2883
- break;
2884
- }
2885
- }
2886
- }
2887
- queryCheckpoint("query_hooks_end");
2888
- return result;
2889
- }
2890
- var MAX_HOOK_OUTPUT_LENGTH = 1e4;
2891
- function applyTruncation(content) {
2892
- if (content.length > MAX_HOOK_OUTPUT_LENGTH) {
2893
- return `${content.substring(0, MAX_HOOK_OUTPUT_LENGTH)}\u2026 [output truncated - exceeded ${MAX_HOOK_OUTPUT_LENGTH} characters]`;
2894
- }
2895
- return content;
2896
- }
2897
- async function processUserInputBase(input, mode, setToolJSX, context, pastedContents, ideSelection, messages, uuid, isAlreadyProcessing, querySource, canUseTool, permissionMode, skipSlashCommands, bridgeOrigin, isMeta, skipAttachments, preExpansionInput, autonomy) {
2898
- let inputString = null;
2899
- let precedingInputBlocks = [];
2900
- const imageMetadataTexts = [];
2901
- let normalizedInput = input;
2902
- if (typeof input === "string") {
2903
- inputString = input;
2904
- } else if (input.length > 0) {
2905
- queryCheckpoint("query_image_processing_start");
2906
- const processedBlocks = [];
2907
- for (const block of input) {
2908
- if (block.type === "image") {
2909
- const resized = await maybeResizeAndDownsampleImageBlock(block);
2910
- if (resized.dimensions) {
2911
- const metadataText = createImageMetadataText(resized.dimensions);
2912
- if (metadataText) {
2913
- imageMetadataTexts.push(metadataText);
2914
- }
2915
- }
2916
- processedBlocks.push(resized.block);
2917
- } else {
2918
- processedBlocks.push(block);
2919
- }
2920
- }
2921
- normalizedInput = processedBlocks;
2922
- queryCheckpoint("query_image_processing_end");
2923
- const lastBlock = processedBlocks[processedBlocks.length - 1];
2924
- if (lastBlock?.type === "text") {
2925
- inputString = lastBlock.text;
2926
- precedingInputBlocks = processedBlocks.slice(0, -1);
2927
- } else {
2928
- precedingInputBlocks = processedBlocks;
2929
- }
2930
- }
2931
- if (inputString === null && mode !== "prompt") {
2932
- throw new Error(`Mode: ${mode} requires a string input.`);
2933
- }
2934
- const imageContents = pastedContents ? Object.values(pastedContents).filter(isValidImagePaste) : [];
2935
- const imagePasteIds = imageContents.map((img) => img.id);
2936
- const storedImagePaths = pastedContents ? await storeImages(pastedContents) : new Map;
2937
- queryCheckpoint("query_pasted_image_processing_start");
2938
- const imageProcessingResults = await Promise.all(imageContents.map(async (pastedImage) => {
2939
- const imageBlock = {
2940
- type: "image",
2941
- source: {
2942
- type: "base64",
2943
- media_type: pastedImage.mediaType || "image/png",
2944
- data: pastedImage.content
2945
- }
2946
- };
2947
- logEvent("tengu_pasted_image_resize_attempt", {
2948
- original_size_bytes: pastedImage.content.length
2949
- });
2950
- const resized = await maybeResizeAndDownsampleImageBlock(imageBlock);
2951
- return {
2952
- resized,
2953
- originalDimensions: pastedImage.dimensions,
2954
- sourcePath: pastedImage.sourcePath ?? storedImagePaths.get(pastedImage.id)
2955
- };
2956
- }));
2957
- const imageContentBlocks = [];
2958
- for (const {
2959
- resized,
2960
- originalDimensions,
2961
- sourcePath
2962
- } of imageProcessingResults) {
2963
- if (resized.dimensions) {
2964
- const metadataText = createImageMetadataText(resized.dimensions, sourcePath);
2965
- if (metadataText) {
2966
- imageMetadataTexts.push(metadataText);
2967
- }
2968
- } else if (originalDimensions) {
2969
- const metadataText = createImageMetadataText(originalDimensions, sourcePath);
2970
- if (metadataText) {
2971
- imageMetadataTexts.push(metadataText);
2972
- }
2973
- } else if (sourcePath) {
2974
- imageMetadataTexts.push(`[Image source: ${sourcePath}]`);
2975
- }
2976
- imageContentBlocks.push(resized.block);
2977
- }
2978
- queryCheckpoint("query_pasted_image_processing_end");
2979
- let effectiveSkipSlash = skipSlashCommands;
2980
- if (bridgeOrigin && inputString !== null && inputString.startsWith("/")) {
2981
- const parsed = parseSlashCommand(inputString);
2982
- const cmd = parsed ? findCommand(parsed.commandName, context.options.commands) : undefined;
2983
- if (cmd) {
2984
- const safety = getBridgeCommandSafety(cmd, parsed?.args ?? "");
2985
- if (safety.ok) {
2986
- effectiveSkipSlash = false;
2987
- } else {
2988
- const msg = safety.reason ?? `/${getCommandName(cmd)} isn't available over Remote Control.`;
2989
- return {
2990
- messages: [
2991
- createUserMessage({ content: inputString, uuid }),
2992
- createCommandInputMessage(`<local-command-stdout>${msg}</local-command-stdout>`)
2993
- ],
2994
- shouldQuery: false,
2995
- resultText: msg
2996
- };
2997
- }
2998
- }
2999
- }
3000
- if (mode === "prompt" && !context.options.isNonInteractiveSession && inputString !== null && !effectiveSkipSlash && !inputString.startsWith("/") && !context.getAppState().ultraplanSessionUrl && !context.getAppState().ultraplanLaunching && hasUltraplanKeyword(preExpansionInput ?? inputString)) {
3001
- logEvent("tengu_ultraplan_keyword", {});
3002
- const rewritten = replaceUltraplanKeyword(inputString).trim();
3003
- const { processSlashCommand } = await import("./chunk-z2yjcarh.js");
3004
- const slashResult = await processSlashCommand(`/ultraplan ${rewritten}`, precedingInputBlocks, imageContentBlocks, [], context, setToolJSX, uuid, isAlreadyProcessing, canUseTool, autonomy);
3005
- return addImageMetadataMessage(slashResult, imageMetadataTexts);
3006
- }
3007
- const shouldExtractAttachments = !skipAttachments && inputString !== null && (mode !== "prompt" || effectiveSkipSlash || !inputString.startsWith("/"));
3008
- queryCheckpoint("query_attachment_loading_start");
3009
- const attachmentMessages = shouldExtractAttachments ? await toArray(getAttachmentMessages(inputString, context, ideSelection ?? null, [], messages, querySource)) : [];
3010
- queryCheckpoint("query_attachment_loading_end");
3011
- if (inputString !== null && mode === "bash") {
3012
- const { processBashCommand } = await import("./chunk-5wrrjqyd.js");
3013
- return addImageMetadataMessage(await processBashCommand(inputString, precedingInputBlocks, attachmentMessages, context, setToolJSX), imageMetadataTexts);
3014
- }
3015
- if (inputString !== null && !effectiveSkipSlash && inputString.startsWith("/")) {
3016
- const { processSlashCommand } = await import("./chunk-z2yjcarh.js");
3017
- const slashResult = await processSlashCommand(inputString, precedingInputBlocks, imageContentBlocks, attachmentMessages, context, setToolJSX, uuid, isAlreadyProcessing, canUseTool, autonomy);
3018
- return addImageMetadataMessage(slashResult, imageMetadataTexts);
3019
- }
3020
- if (inputString !== null && mode === "prompt") {
3021
- const trimmedInput = inputString.trim();
3022
- const agentMention = attachmentMessages.find((m) => m.attachment.type === "agent_mention");
3023
- if (agentMention) {
3024
- const agentMentionString = `@agent-${agentMention.attachment.agentType}`;
3025
- const isSubagentOnly = trimmedInput === agentMentionString;
3026
- const isPrefix = trimmedInput.startsWith(agentMentionString) && !isSubagentOnly;
3027
- logEvent("tengu_subagent_at_mention", {
3028
- is_subagent_only: isSubagentOnly,
3029
- is_prefix: isPrefix
3030
- });
3031
- }
3032
- }
3033
- return addImageMetadataMessage(processTextPrompt(normalizedInput, imageContentBlocks, imagePasteIds, attachmentMessages, uuid, permissionMode, isMeta), imageMetadataTexts);
3034
- }
3035
- function addImageMetadataMessage(result, imageMetadataTexts) {
3036
- if (imageMetadataTexts.length > 0) {
3037
- result.messages.push(createUserMessage({
3038
- content: imageMetadataTexts.map((text) => ({ type: "text", text })),
3039
- isMeta: true
3040
- }));
3041
- }
3042
- return result;
3043
- }
3044
-
3045
1681
  // src/utils/plugins/reconciler.ts
3046
1682
  init_isEqual();
3047
1683
  init_state();
@@ -3171,7 +1807,7 @@ function normalizeSource(source, projectRoot) {
3171
1807
  return source;
3172
1808
  }
3173
1809
 
3174
- export { claimConsumableQueuedAutonomyCommands, cancelQueuedAutonomyCommands, finalizeAutonomyCommandsForTurn, init_autonomyQueueLifecycle, extractInboundMessageFields, sdkCompatToolName, buildSystemInitMessage, MessageSelector, selectableUserMessagesFilter, messagesAfterAreOnlySynthetic, exports_MessageSelector, init_MessageSelector, findUltraplanTriggerPositions, findUltrareviewTriggerPositions, processUserInput, outputSchema, permissionPromptToolResultToPermissionDecision, ndjsonSafeStringify, StructuredIO, diffMarketplaces, reconcileMarketplaces, getCronJitterConfig, exports_cronJitterConfig, init_cronJitterConfig, createCronScheduler, exports_cronScheduler, init_cronScheduler };
1810
+ export { claimConsumableQueuedAutonomyCommands, cancelQueuedAutonomyCommands, finalizeAutonomyCommandsForTurn, init_autonomyQueueLifecycle, extractInboundMessageFields, outputSchema, permissionPromptToolResultToPermissionDecision, ndjsonSafeStringify, SANDBOX_NETWORK_ACCESS_TOOL_NAME, StructuredIO, diffMarketplaces, reconcileMarketplaces, getCronJitterConfig, exports_cronJitterConfig, init_cronJitterConfig, createCronScheduler, exports_cronScheduler, init_cronScheduler };
3175
1811
 
3176
- //# debugId=2D5AC62EF30D33E364756E2164756E21
3177
- //# sourceMappingURL=chunk-18vnrzf5.js.map
1812
+ //# debugId=8EE8B9C3724B636B64756E2164756E21
1813
+ //# sourceMappingURL=chunk-1gta3pqg.js.map