claude-code-best 1.3.7 → 1.4.1

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 (378) hide show
  1. package/README.md +1 -0
  2. package/dist/{chunk-cdgv0k77.js → chunk-00vfg42v.js} +61 -59
  3. package/dist/{chunk-6ex0f5ej.js → chunk-01ysfcs0.js} +6 -8
  4. package/dist/{chunk-1vzb650a.js → chunk-04ws37gv.js} +6 -8
  5. package/dist/{chunk-7etmzq13.js → chunk-0b0fq180.js} +27 -27
  6. package/dist/{chunk-drsh1vv8.js → chunk-0cs46nj6.js} +63 -62
  7. package/dist/chunk-0fzcyd0s.js +116 -0
  8. package/dist/{chunk-7nebst32.js → chunk-0knhp7v5.js} +2 -2
  9. package/dist/{chunk-n42nvr59.js → chunk-0xth516w.js} +14 -14
  10. package/dist/{chunk-egcx83tp.js → chunk-0y6h57c5.js} +6 -6
  11. package/dist/{chunk-d267stxj.js → chunk-0z0m6mm5.js} +1 -1
  12. package/dist/{chunk-y10byvag.js → chunk-196qs1ty.js} +30 -29
  13. package/dist/chunk-1d39h7zf.js +57 -0
  14. package/dist/{chunk-antr836n.js → chunk-1k3ahc24.js} +59 -57
  15. package/dist/{chunk-5scrgrwv.js → chunk-1nhx3qpn.js} +2 -2
  16. package/dist/{chunk-zv5yt0g4.js → chunk-1qbype3e.js} +9 -9
  17. package/dist/{chunk-bkzs71af.js → chunk-1r70yykn.js} +3 -3
  18. package/dist/{chunk-tvnrwrg3.js → chunk-1x1wb96n.js} +62 -60
  19. package/dist/{chunk-j44ngncb.js → chunk-1yscv3t1.js} +7 -9
  20. package/dist/{chunk-zhe3rws3.js → chunk-27ppq985.js} +7 -9
  21. package/dist/{chunk-kbshq7zc.js → chunk-28a1ffp7.js} +59 -56
  22. package/dist/{chunk-m95fj0wm.js → chunk-2ag1bjqx.js} +4 -4
  23. package/dist/{chunk-2fx2x8qp.js → chunk-2cz1rwf3.js} +22 -21
  24. package/dist/{chunk-v1chtgnf.js → chunk-2m6jk78c.js} +1 -1
  25. package/dist/{chunk-nzchm0f2.js → chunk-2mhgyhns.js} +1 -1
  26. package/dist/{chunk-n5pe3jtt.js → chunk-2pjptqfa.js} +2 -2
  27. package/dist/{chunk-5r3wgr44.js → chunk-2qfb22ax.js} +29 -1399
  28. package/dist/{chunk-n0rn505k.js → chunk-2rcaw0yh.js} +4 -4
  29. package/dist/{chunk-wp9nwczx.js → chunk-2rtngpm1.js} +8 -10
  30. package/dist/{chunk-s2cwz71x.js → chunk-2tzmvvew.js} +60 -57
  31. package/dist/{chunk-ydraa9ey.js → chunk-2xrp0wp0.js} +70 -68
  32. package/dist/{chunk-jty4xkhc.js → chunk-313nbvgt.js} +5 -5
  33. package/dist/chunk-3e2a6c4k.js +33 -0
  34. package/dist/{chunk-hbf3y5tw.js → chunk-3fnhdnj6.js} +22 -21
  35. package/dist/{chunk-qahkzpj6.js → chunk-3g6kvmg4.js} +6 -8
  36. package/dist/{chunk-kz13d2bs.js → chunk-3mapywg0.js} +2 -2
  37. package/dist/{chunk-tw4tjc73.js → chunk-3rk983b5.js} +1 -1
  38. package/dist/chunk-3vc6mx77.js +119 -0
  39. package/dist/{chunk-nsxw7en4.js → chunk-3yzyedet.js} +23 -22
  40. package/dist/{chunk-1q82ecz5.js → chunk-40w1c21c.js} +58 -55
  41. package/dist/{chunk-bnvd1jc1.js → chunk-4brmjvph.js} +4 -4
  42. package/dist/{chunk-zwrt0s3s.js → chunk-4er46edn.js} +69 -141
  43. package/dist/{chunk-fsex4yt2.js → chunk-4h9ek408.js} +7 -9
  44. package/dist/chunk-4mdqm8b7.js +115 -0
  45. package/dist/{chunk-9p95042q.js → chunk-4qjh89qr.js} +1 -1
  46. package/dist/chunk-506gq3zq.js +104 -0
  47. package/dist/{chunk-w6rh4zpx.js → chunk-5158j5ph.js} +8 -10
  48. package/dist/{chunk-d969b8ne.js → chunk-524xgs6r.js} +7 -7
  49. package/dist/{chunk-76hrbqgr.js → chunk-52rnpp5t.js} +16 -18
  50. package/dist/{chunk-0a2qnsbr.js → chunk-54bwa086.js} +61 -57
  51. package/dist/{chunk-qn4cbm38.js → chunk-5famfv4a.js} +23 -22
  52. package/dist/{chunk-kmgp6prw.js → chunk-5khwvj1z.js} +112 -5
  53. package/dist/{chunk-9byk2a4b.js → chunk-5m7095hq.js} +25 -25
  54. package/dist/{chunk-g14ex9z0.js → chunk-5mv51kkx.js} +59 -56
  55. package/dist/{chunk-p2sww3pd.js → chunk-5vqwq0f9.js} +59 -56
  56. package/dist/{chunk-s26mv9yh.js → chunk-5zbp0a48.js} +7 -8
  57. package/dist/{chunk-pvtzf6vs.js → chunk-60xm3v9r.js} +3 -3
  58. package/dist/chunk-6356tyx5.js +32 -0
  59. package/dist/{chunk-1vzaw5f6.js → chunk-66s9m31j.js} +23 -22
  60. package/dist/{chunk-c1cm8km0.js → chunk-6ebb5ym0.js} +58 -55
  61. package/dist/{chunk-yp2yx0qj.js → chunk-6f0296p8.js} +5 -7
  62. package/dist/{chunk-m2cskgz4.js → chunk-6gftrxn5.js} +86 -81
  63. package/dist/{chunk-y95se10r.js → chunk-6h1reb8m.js} +22 -21
  64. package/dist/{chunk-fy6tp8zj.js → chunk-6pb9n4m3.js} +2 -2
  65. package/dist/{chunk-ardzdtan.js → chunk-6y2wszkc.js} +1 -1
  66. package/dist/{chunk-4ydmya8m.js → chunk-6y8e5c85.js} +24 -22
  67. package/dist/{chunk-rshk7m9c.js → chunk-718k4vsj.js} +62 -60
  68. package/dist/{chunk-tm4w23dp.js → chunk-72091jsk.js} +1 -1
  69. package/dist/{chunk-xtaw765g.js → chunk-760hjt0a.js} +3 -3
  70. package/dist/chunk-77dnrj5q.js +119 -0
  71. package/dist/{chunk-gz4r3k7a.js → chunk-77w9ffyy.js} +5 -5
  72. package/dist/{chunk-xaw4scep.js → chunk-78009jh9.js} +2 -2
  73. package/dist/{chunk-6xr5mayh.js → chunk-79vh2q13.js} +58 -55
  74. package/dist/{chunk-p7d5ms03.js → chunk-7ba2qns8.js} +22 -21
  75. package/dist/{chunk-6wrs3ahh.js → chunk-7dy65axk.js} +22 -21
  76. package/dist/{chunk-n35gnb9g.js → chunk-7hmy36fh.js} +121 -2
  77. package/dist/{chunk-erxndz83.js → chunk-7kfps7yt.js} +7 -9
  78. package/dist/chunk-7r3d9nyj.js +113 -0
  79. package/dist/{chunk-dne2ghq6.js → chunk-7yfxza07.js} +16 -22
  80. package/dist/chunk-7zw138yt.js +32 -0
  81. package/dist/{chunk-6ye6d9gw.js → chunk-81dxa3fd.js} +1 -1
  82. package/dist/{chunk-540608wh.js → chunk-86jhenxk.js} +66 -57
  83. package/dist/chunk-88mfsn97.js +115 -0
  84. package/dist/{chunk-zy4fsy90.js → chunk-8gs07wbw.js} +18 -18
  85. package/dist/{chunk-4ayhftnk.js → chunk-8h4gpg9r.js} +83 -119
  86. package/dist/{chunk-brnc96x6.js → chunk-8h7bg6q9.js} +203 -24
  87. package/dist/chunk-8mspr5sg.js +47 -0
  88. package/dist/{chunk-62dx37pf.js → chunk-8pskaz4y.js} +9 -11
  89. package/dist/{chunk-sn3wbs2w.js → chunk-8xbwczap.js} +58 -55
  90. package/dist/{chunk-tw2wjsnb.js → chunk-8xsjtkh4.js} +4 -4
  91. package/dist/{chunk-ky85ntn8.js → chunk-8y0ghcs4.js} +69 -66
  92. package/dist/chunk-8zzqydag.js +101 -0
  93. package/dist/{chunk-cpvn0j86.js → chunk-924n94wb.js} +22 -21
  94. package/dist/{chunk-0asd58w2.js → chunk-92p2k7yk.js} +11 -11
  95. package/dist/{chunk-qvywetwr.js → chunk-93cd0z7w.js} +66 -64
  96. package/dist/{chunk-db82mfh9.js → chunk-97svwq59.js} +73 -71
  97. package/dist/{chunk-3j857x3k.js → chunk-99cjjht1.js} +60 -58
  98. package/dist/{chunk-pedmqmrf.js → chunk-9awawyvh.js} +6 -6
  99. package/dist/{chunk-22rs73mh.js → chunk-9b6wqcyk.js} +60 -57
  100. package/dist/{chunk-cxf74p1t.js → chunk-9datyj43.js} +2 -2
  101. package/dist/{chunk-n1pa72ns.js → chunk-9qh5f9r3.js} +7 -12
  102. package/dist/{chunk-vb6w46m9.js → chunk-9revwk5g.js} +59 -56
  103. package/dist/{chunk-g71q1n7x.js → chunk-a0m994d6.js} +58 -55
  104. package/dist/{chunk-ftajx4gw.js → chunk-a0qhdfct.js} +49 -160
  105. package/dist/{chunk-0xq2bfvv.js → chunk-a5w8nyhg.js} +2 -2
  106. package/dist/{chunk-ms9225af.js → chunk-a85wqwq4.js} +58 -55
  107. package/dist/{chunk-3c81vb6k.js → chunk-a92eevfn.js} +6 -8
  108. package/dist/{chunk-2katyzq9.js → chunk-ab6gc90x.js} +3 -5
  109. package/dist/{chunk-j50zvssc.js → chunk-ad6rg8vz.js} +5 -5
  110. package/dist/{chunk-z7svjppe.js → chunk-admwpsa6.js} +10 -14
  111. package/dist/{chunk-v081mpyx.js → chunk-ahexmj4s.js} +24 -26
  112. package/dist/{chunk-7z0078sp.js → chunk-att0rknb.js} +2 -2
  113. package/dist/{chunk-prgsmrmy.js → chunk-axenqvc8.js} +2 -2
  114. package/dist/{chunk-mfzgqp0c.js → chunk-azq1qstz.js} +10 -14
  115. package/dist/{chunk-zajs1j2b.js → chunk-b125aa22.js} +59 -57
  116. package/dist/{chunk-9f01qpne.js → chunk-b4wfv4fx.js} +73 -71
  117. package/dist/{chunk-ns3babbs.js → chunk-b5wxetbv.js} +224 -1
  118. package/dist/chunk-b62vj92a.js +94 -0
  119. package/dist/{chunk-9v5bwvbm.js → chunk-b6drr9se.js} +63 -61
  120. package/dist/chunk-b7kfr260.js +168 -0
  121. package/dist/chunk-b9pqgq8z.js +37 -0
  122. package/dist/{chunk-c8rgc3hw.js → chunk-bevwqet9.js} +66 -64
  123. package/dist/{chunk-m2rx2dtd.js → chunk-bgf5zvvv.js} +91 -89
  124. package/dist/{chunk-fye86v7m.js → chunk-bq8zdg7m.js} +58 -55
  125. package/dist/chunk-bww2h6d4.js +114 -0
  126. package/dist/{chunk-m83vaktc.js → chunk-bx165r58.js} +1 -1
  127. package/dist/{chunk-4q5a5mjb.js → chunk-c092k38b.js} +3532 -1684
  128. package/dist/{chunk-163379k5.js → chunk-c0avjkfn.js} +58 -55
  129. package/dist/{chunk-ermvk1xn.js → chunk-c3s22pgw.js} +61 -58
  130. package/dist/{chunk-zahg0adp.js → chunk-c4g5qaey.js} +5 -5
  131. package/dist/{chunk-f6wypwa6.js → chunk-c6nthjxa.js} +6 -4
  132. package/dist/{chunk-wmd0v561.js → chunk-c7d1acex.js} +5 -7
  133. package/dist/{chunk-wmbpegg3.js → chunk-c7t69jmn.js} +1 -1
  134. package/dist/{chunk-vm0b9vaz.js → chunk-cg3bb5pe.js} +9 -9
  135. package/dist/{chunk-m8v1x99r.js → chunk-chzfw06n.js} +3 -5
  136. package/dist/chunk-cm2xfg7q.js +1394 -0
  137. package/dist/{chunk-4yxd0e7k.js → chunk-crj9bjh5.js} +58 -55
  138. package/dist/{chunk-v4nrk2f9.js → chunk-cstkqpd5.js} +7 -8
  139. package/dist/{chunk-3nwsgn73.js → chunk-ctj2ehwz.js} +59 -56
  140. package/dist/{chunk-mcbqmbp2.js → chunk-cwwfyvbq.js} +6 -4
  141. package/dist/{chunk-9nddm5c7.js → chunk-cxf9amp4.js} +2 -3
  142. package/dist/chunk-cxmyg49v.js +104 -0
  143. package/dist/{chunk-5wb5ym2h.js → chunk-cy1z66c2.js} +3 -5
  144. package/dist/{chunk-nbzntnkz.js → chunk-d2q17m4k.js} +60 -58
  145. package/dist/{chunk-ymtkahxp.js → chunk-d2wzkwws.js} +69 -66
  146. package/dist/{chunk-x4t0n8t3.js → chunk-d4qdesrx.js} +3 -4
  147. package/dist/chunk-d4zyytan.js +3802 -0
  148. package/dist/{chunk-8q4yg5pk.js → chunk-d57t992t.js} +9 -96
  149. package/dist/{chunk-g2tmm7k7.js → chunk-dafnbqhh.js} +76 -74
  150. package/dist/{chunk-tjbjxrqz.js → chunk-dfcm57ek.js} +6 -6
  151. package/dist/{chunk-ynjbppdn.js → chunk-dgnwk906.js} +60 -58
  152. package/dist/{chunk-7gxyarah.js → chunk-dhwpmz98.js} +61 -58
  153. package/dist/{chunk-yevbmk5g.js → chunk-djzvjzdg.js} +3 -3
  154. package/dist/chunk-dm5e2sj0.js +187 -0
  155. package/dist/{chunk-145d3809.js → chunk-dnpy3zcs.js} +63 -60
  156. package/dist/{chunk-h7ffkxg4.js → chunk-drvfxfe5.js} +26 -25
  157. package/dist/{chunk-c14sp904.js → chunk-dv4dsh0t.js} +7 -7
  158. package/dist/{chunk-9ejadhq8.js → chunk-dyp88vca.js} +64 -62
  159. package/dist/{chunk-xfft38wf.js → chunk-dytg8n15.js} +12 -12
  160. package/dist/{chunk-j3ctqpsn.js → chunk-e1bt4m2g.js} +2 -2
  161. package/dist/{chunk-vvm5az9j.js → chunk-e23snepr.js} +3 -3
  162. package/dist/{chunk-hgfw7nx2.js → chunk-e6sqr0av.js} +58 -55
  163. package/dist/{chunk-v7xwthvg.js → chunk-e9eyqwk5.js} +405 -283
  164. package/dist/{chunk-2wvxqpfc.js → chunk-efkjha6m.js} +8 -9
  165. package/dist/{chunk-3s2gjp2n.js → chunk-ekpm458a.js} +67 -65
  166. package/dist/{chunk-vf3etxnx.js → chunk-emxnq07z.js} +1 -1
  167. package/dist/{chunk-c4x4fb6d.js → chunk-erkssp71.js} +58 -55
  168. package/dist/chunk-es08rrda.js +112 -0
  169. package/dist/{chunk-c209ascy.js → chunk-ewxpkqxt.js} +9 -9
  170. package/dist/{chunk-1wykga1n.js → chunk-f25pnrvx.js} +4 -6
  171. package/dist/chunk-f2y3t9hh.js +295 -0
  172. package/dist/{chunk-427mfnyx.js → chunk-f31b63fd.js} +1 -1
  173. package/dist/{chunk-2dsqf7sp.js → chunk-f57cvf1d.js} +1 -1
  174. package/dist/{chunk-ry1jb15g.js → chunk-f872fekv.js} +58 -55
  175. package/dist/{chunk-r7s0jwb1.js → chunk-faey4sqw.js} +59 -56
  176. package/dist/{chunk-40ax4h54.js → chunk-fbbjchdz.js} +60 -58
  177. package/dist/{chunk-fskf0b3x.js → chunk-fbedkst6.js} +6 -8
  178. package/dist/{chunk-9msn8xwq.js → chunk-fckykghd.js} +2 -3
  179. package/dist/{chunk-ztrgnar4.js → chunk-fdbvcs34.js} +7 -9
  180. package/dist/{chunk-667f3w39.js → chunk-ffpz33kr.js} +23 -22
  181. package/dist/{chunk-0fpkjw2j.js → chunk-ffvja87d.js} +8 -10
  182. package/dist/{chunk-r6gyed9y.js → chunk-fjpdtr6s.js} +9 -9
  183. package/dist/{chunk-8y1zs48n.js → chunk-fnpd8cnq.js} +1 -1
  184. package/dist/{chunk-eef1npre.js → chunk-fxpsa506.js} +4 -6
  185. package/dist/{chunk-2z6bv21c.js → chunk-fxrrsvnw.js} +23 -27
  186. package/dist/chunk-fz4wmnm6.js +157 -0
  187. package/dist/{chunk-2c4jgf3n.js → chunk-g3dbfhxa.js} +5 -7
  188. package/dist/{chunk-s13m8efn.js → chunk-g86dg6h5.js} +5 -5
  189. package/dist/{chunk-h7mpryyc.js → chunk-gc4x22mt.js} +59 -56
  190. package/dist/{chunk-5s1bctjb.js → chunk-gfxebcsw.js} +28 -28
  191. package/dist/chunk-ghbtnfr2.js +117 -0
  192. package/dist/{chunk-gpk30ekc.js → chunk-gqftywrx.js} +23 -22
  193. package/dist/{chunk-z2aps7d9.js → chunk-gwrngewt.js} +3 -3
  194. package/dist/{chunk-psp1n9vg.js → chunk-gxfbedta.js} +1 -1
  195. package/dist/{chunk-fq1j9zm0.js → chunk-gybj15eh.js} +2 -3
  196. package/dist/chunk-h0vzd5vg.js +1012 -0
  197. package/dist/{chunk-0ahxmrws.js → chunk-h14dkna4.js} +23 -22
  198. package/dist/{chunk-x42kc5wj.js → chunk-h26xfh6d.js} +22 -21
  199. package/dist/{chunk-nwgkkhk7.js → chunk-h2vfn30x.js} +4 -4
  200. package/dist/{chunk-mh8752jz.js → chunk-h37gar4j.js} +1 -1
  201. package/dist/{chunk-n612gr22.js → chunk-h4k9kgjw.js} +59 -56
  202. package/dist/{chunk-1av0kkwh.js → chunk-hc1tkwfn.js} +3 -5
  203. package/dist/{chunk-h5dk6k0g.js → chunk-hf086e2e.js} +58 -55
  204. package/dist/{chunk-66j7fn6z.js → chunk-hhwqk5as.js} +58 -55
  205. package/dist/{chunk-e8zmtbry.js → chunk-hjw03d0k.js} +60 -58
  206. package/dist/{chunk-e1t8jh0t.js → chunk-hkh1vbm6.js} +58 -55
  207. package/dist/{chunk-81dq52pk.js → chunk-hnxmafvc.js} +2 -2
  208. package/dist/{chunk-cj8m3h8r.js → chunk-hqpzpr71.js} +2 -2
  209. package/dist/{chunk-s3aygngf.js → chunk-hrz2d28r.js} +62 -60
  210. package/dist/chunk-hxb3js2g.js +91 -0
  211. package/dist/{chunk-j06y02aw.js → chunk-hxc8e6wd.js} +1 -1
  212. package/dist/chunk-hyy2fcba.js +351 -0
  213. package/dist/{chunk-dvf5921w.js → chunk-hyz9tx05.js} +15 -17
  214. package/dist/{chunk-ag3hbrat.js → chunk-j34h8cfj.js} +23 -22
  215. package/dist/{chunk-b31v41mz.js → chunk-j5w0b4d2.js} +23 -22
  216. package/dist/{chunk-2tcznfv0.js → chunk-j66ragf9.js} +1 -1
  217. package/dist/chunk-j7b884wk.js +397 -0
  218. package/dist/{chunk-35xyzbd2.js → chunk-ja21qbpj.js} +65 -62
  219. package/dist/{chunk-dchgtage.js → chunk-ja3eb4h9.js} +3 -3
  220. package/dist/{chunk-2crz81z3.js → chunk-jac470kz.js} +1 -1
  221. package/dist/{chunk-9nydmbm4.js → chunk-jaqtnpbt.js} +2 -2
  222. package/dist/{chunk-e03zrq9n.js → chunk-jc5dtv57.js} +60 -58
  223. package/dist/{chunk-jg7na104.js → chunk-jda4vjad.js} +58 -55
  224. package/dist/{chunk-drnxbc1w.js → chunk-jeqt4y47.js} +2 -2
  225. package/dist/{chunk-r7r3jm3y.js → chunk-jga4j8jp.js} +59 -57
  226. package/dist/{chunk-58rg6rn2.js → chunk-jge10dbd.js} +4 -6
  227. package/dist/{chunk-9k2c5sxb.js → chunk-jhbj5mnf.js} +58 -55
  228. package/dist/{chunk-zh6xf1fd.js → chunk-jje04m6z.js} +2 -2
  229. package/dist/{chunk-qkrenskm.js → chunk-jnfd01as.js} +9 -11
  230. package/dist/chunk-jpbkdg47.js +131 -0
  231. package/dist/{chunk-xcq3rdb0.js → chunk-jwb3bqa7.js} +27 -31
  232. package/dist/{chunk-s1p2w5a5.js → chunk-jy4dnnjk.js} +5 -5
  233. package/dist/{chunk-c9p5eyxf.js → chunk-k27dq4vd.js} +60 -57
  234. package/dist/{chunk-kmcaa88h.js → chunk-k81zec2p.js} +1 -1
  235. package/dist/{chunk-fxqp3yt4.js → chunk-kb2b4rkg.js} +4 -5
  236. package/dist/{chunk-h6dqpbac.js → chunk-kbsckx2r.js} +3 -3
  237. package/dist/{chunk-451hjtv9.js → chunk-kvezjrjy.js} +58 -55
  238. package/dist/{chunk-zc1s4swn.js → chunk-kw2ymvyv.js} +6 -8
  239. package/dist/{chunk-9jg130e9.js → chunk-kymh4vxw.js} +58 -55
  240. package/dist/{chunk-z66q1nam.js → chunk-kz3q1ce0.js} +58 -55
  241. package/dist/chunk-m089kb0s.js +312 -0
  242. package/dist/{chunk-86tz7yxt.js → chunk-m1efbjqe.js} +58 -55
  243. package/dist/chunk-m1xw79dd.js +1757 -0
  244. package/dist/{chunk-k303kw9v.js → chunk-m365zhp8.js} +59 -56
  245. package/dist/{chunk-0h4sw1v3.js → chunk-m97dyxn0.js} +61 -60
  246. package/dist/{chunk-e4jqbn4d.js → chunk-m9w972ny.js} +2 -4
  247. package/dist/{chunk-eserktyd.js → chunk-mb93ek5j.js} +4 -6
  248. package/dist/{chunk-c96k89rp.js → chunk-mgjc0yj9.js} +59 -57
  249. package/dist/{chunk-qmckdcc4.js → chunk-mh2pdxpc.js} +60 -58
  250. package/dist/{chunk-hnx0eg6x.js → chunk-mkae8zj9.js} +3 -3
  251. package/dist/{chunk-h0s737p0.js → chunk-mmq55gyp.js} +4 -4
  252. package/dist/{chunk-5k4kh5n9.js → chunk-ndrn50x0.js} +59 -57
  253. package/dist/{chunk-0pxmxyxv.js → chunk-ng2xq7ey.js} +3 -3
  254. package/dist/{chunk-gdb6dvba.js → chunk-nsbpzpmf.js} +61 -59
  255. package/dist/{chunk-18mm4jf8.js → chunk-nz7sgbbr.js} +5 -5
  256. package/dist/{chunk-t0b0bas5.js → chunk-nzfwsrd7.js} +3 -3
  257. package/dist/{chunk-rhxtttx1.js → chunk-p3zbzfbn.js} +3 -3
  258. package/dist/{chunk-9tc901nb.js → chunk-p5jssxha.js} +24 -24
  259. package/dist/{chunk-zmpygkz6.js → chunk-p7es39d1.js} +47 -122
  260. package/dist/{chunk-qwj4n799.js → chunk-p7pj6wf8.js} +1 -1
  261. package/dist/{chunk-855katq2.js → chunk-p9f12fp9.js} +60 -57
  262. package/dist/chunk-pb73zgyd.js +55 -0
  263. package/dist/chunk-prpjmapz.js +117 -0
  264. package/dist/{chunk-379rspd7.js → chunk-ps01q3n9.js} +64 -63
  265. package/dist/{chunk-ay9wm3tf.js → chunk-q19p9j0v.js} +5 -5
  266. package/dist/{chunk-536fmbtq.js → chunk-q7e12ymw.js} +4 -4
  267. package/dist/{chunk-w65283w4.js → chunk-qgajfxr7.js} +7 -7
  268. package/dist/{chunk-24qcj0k5.js → chunk-qgnsf30p.js} +24 -23
  269. package/dist/{chunk-xvjdbsfa.js → chunk-qs2atqgy.js} +60 -58
  270. package/dist/chunk-r469z4mx.js +183 -0
  271. package/dist/chunk-r5mqktt5.js +100 -0
  272. package/dist/chunk-r854e43q.js +25 -0
  273. package/dist/{chunk-fx6ghdvg.js → chunk-rbgr86hh.js} +59 -57
  274. package/dist/{chunk-qxv21mcq.js → chunk-rbvawtdz.js} +59 -56
  275. package/dist/chunk-rce8gj2b.js +93 -0
  276. package/dist/{chunk-t0twk3e5.js → chunk-rd2884ff.js} +1 -1
  277. package/dist/{chunk-c2ktjyc0.js → chunk-reqz49y3.js} +336 -1149
  278. package/dist/{chunk-b4twmt0s.js → chunk-rhjb0dgd.js} +24 -23
  279. package/dist/{chunk-bpmw0wp2.js → chunk-rq1nfp7x.js} +60 -58
  280. package/dist/{chunk-qhbchv06.js → chunk-rsr0mksm.js} +61 -59
  281. package/dist/{chunk-txeekahj.js → chunk-rz3rq0gt.js} +4 -6
  282. package/dist/{chunk-14mkqwft.js → chunk-rz69sqyh.js} +70 -68
  283. package/dist/{chunk-gfk81w5r.js → chunk-s2n5kxm0.js} +5 -5
  284. package/dist/{chunk-3b9ar57s.js → chunk-s39ksgef.js} +4 -6
  285. package/dist/{chunk-3er4wswe.js → chunk-s70z817q.js} +197 -196
  286. package/dist/{chunk-5h17d17z.js → chunk-se153zng.js} +1 -1
  287. package/dist/chunk-spqq5qf1.js +116 -0
  288. package/dist/{chunk-xjd32sva.js → chunk-srnstx2s.js} +23 -22
  289. package/dist/{chunk-s9nr589x.js → chunk-sv7afh51.js} +6 -8
  290. package/dist/{chunk-b6whrv9m.js → chunk-swzfr1f5.js} +24 -23
  291. package/dist/{chunk-2h06sph0.js → chunk-t2822cex.js} +63 -60
  292. package/dist/{chunk-h93tjx98.js → chunk-t2re5hhc.js} +125 -119
  293. package/dist/{chunk-r325sbz7.js → chunk-t7e9etws.js} +23 -25
  294. package/dist/{chunk-59mg8c5k.js → chunk-tnx1zk9t.js} +62 -59
  295. package/dist/{chunk-rgpxnjx4.js → chunk-tw24rz1x.js} +11 -13
  296. package/dist/{chunk-r8m19xnp.js → chunk-v038k0we.js} +4 -6
  297. package/dist/chunk-v2qqkqxp.js +116 -0
  298. package/dist/{chunk-fjne3x6c.js → chunk-v4qke3cz.js} +8 -8
  299. package/dist/{chunk-qwa5erw8.js → chunk-v6p3019x.js} +24 -23
  300. package/dist/{chunk-4stgesb0.js → chunk-vatz6gan.js} +25 -27
  301. package/dist/chunk-vfmx405p.js +14 -0
  302. package/dist/{chunk-x639j7py.js → chunk-vnn4x6jw.js} +62 -59
  303. package/dist/{chunk-b4btw5kv.js → chunk-vpe2s4eq.js} +7 -9
  304. package/dist/{chunk-2t5ve6ev.js → chunk-vsbyhpfy.js} +1 -1
  305. package/dist/{chunk-52evx0rm.js → chunk-w0pf4mvz.js} +12 -16
  306. package/dist/chunk-w5j0dhpp.js +14 -0
  307. package/dist/{chunk-vqawqpkx.js → chunk-w7zp9j8v.js} +72 -70
  308. package/dist/{chunk-d2vb6m9e.js → chunk-wd8mqz95.js} +3 -5
  309. package/dist/chunk-wj0c0zfa.js +36 -0
  310. package/dist/{chunk-ps5rsyxe.js → chunk-wqdr8v9x.js} +58 -55
  311. package/dist/{chunk-vpp13z80.js → chunk-wxa2hdfg.js} +2 -2
  312. package/dist/{chunk-kh04yrpx.js → chunk-wy3f5b81.js} +59 -56
  313. package/dist/{chunk-5dn1m1r7.js → chunk-x0ym1db4.js} +2 -4
  314. package/dist/{chunk-d73t8nhj.js → chunk-x1t80e36.js} +39 -39
  315. package/dist/{chunk-08a6n2pp.js → chunk-x63c39tp.js} +5 -7
  316. package/dist/{chunk-q890kpff.js → chunk-x6622cb2.js} +23 -22
  317. package/dist/{chunk-wcxc5m91.js → chunk-x95fhbwq.js} +1 -1
  318. package/dist/{chunk-px27vhxx.js → chunk-x9gbnheg.js} +8 -10
  319. package/dist/{chunk-9gypgvd7.js → chunk-xahpt5e2.js} +3 -5
  320. package/dist/{chunk-y3rg86fk.js → chunk-xct1m4sf.js} +23 -22
  321. package/dist/chunk-xee276gg.js +367 -0
  322. package/dist/{chunk-n8whv674.js → chunk-xfkf8q6w.js} +5 -6
  323. package/dist/chunk-xhesahm0.js +15 -0
  324. package/dist/{chunk-tbma29g4.js → chunk-xk1wdwxq.js} +60 -57
  325. package/dist/{chunk-gwah3f17.js → chunk-xpj4qca4.js} +58 -55
  326. package/dist/{chunk-h6wkvzrd.js → chunk-xqk8srdh.js} +6 -8
  327. package/dist/{chunk-39zy97qa.js → chunk-xsc3ccj0.js} +3 -3
  328. package/dist/{chunk-y82s03p7.js → chunk-xwc8e4yv.js} +2 -2
  329. package/dist/{chunk-8wv29424.js → chunk-xxmxv448.js} +8 -9
  330. package/dist/{chunk-symd8dvh.js → chunk-xz7cf7fa.js} +69 -66
  331. package/dist/{chunk-h7bkf3h2.js → chunk-y3qdyf8r.js} +28 -27
  332. package/dist/{chunk-j5eb93j4.js → chunk-y48wfwm4.js} +1 -517
  333. package/dist/{chunk-6qexrv9a.js → chunk-y7vzcjyn.js} +60 -58
  334. package/dist/chunk-yb03gvd8.js +271 -0
  335. package/dist/chunk-yem3ge7z.js +182 -0
  336. package/dist/{chunk-vmpcmvqq.js → chunk-yf5qwpnp.js} +3 -3
  337. package/dist/{chunk-awwfrm4f.js → chunk-yrnbgtk0.js} +26 -25
  338. package/dist/{chunk-64mwy58c.js → chunk-yrs92qya.js} +5 -7
  339. package/dist/{chunk-y29pdynp.js → chunk-ys6cza46.js} +7 -9
  340. package/dist/{chunk-kcp8svja.js → chunk-yvgmpc5z.js} +5 -5
  341. package/dist/{chunk-3avnvgnv.js → chunk-yxr0yf6h.js} +4 -4
  342. package/dist/{chunk-ar8awa36.js → chunk-yyc1yvnr.js} +59 -57
  343. package/dist/{chunk-kmzv85ze.js → chunk-z0vk43bt.js} +69 -66
  344. package/dist/chunk-z1seyvya.js +110 -0
  345. package/dist/{chunk-2pdcq92c.js → chunk-z6hqga26.js} +3 -4
  346. package/dist/{chunk-5ccpwbk7.js → chunk-z7hv619f.js} +58 -55
  347. package/dist/{chunk-1ez8vf1y.js → chunk-zb0mctxm.js} +6 -6
  348. package/dist/{chunk-49n22kr8.js → chunk-zhyc7npp.js} +58 -55
  349. package/dist/{chunk-9r28w6ye.js → chunk-zttmdag3.js} +1 -1
  350. package/dist/{chunk-p1af059d.js → chunk-zvegtrc4.js} +63 -60
  351. package/dist/{chunk-n2gc23dm.js → chunk-zwsrj2yy.js} +9 -11
  352. package/dist/cli.js +58 -22
  353. package/package.json +12 -4
  354. package/dist/chunk-0731m51q.js +0 -8
  355. package/dist/chunk-2fwze72g.js +0 -24
  356. package/dist/chunk-3ev51j3h.js +0 -117
  357. package/dist/chunk-5cc50ecq.js +0 -116
  358. package/dist/chunk-74v2mh4t.js +0 -40
  359. package/dist/chunk-9b0btjar.js +0 -114
  360. package/dist/chunk-bhvmpf9m.js +0 -113
  361. package/dist/chunk-bzps3qec.js +0 -113
  362. package/dist/chunk-e6nenv5n.js +0 -112
  363. package/dist/chunk-ez958w7j.js +0 -110
  364. package/dist/chunk-fve53rbk.js +0 -22
  365. package/dist/chunk-g5rf37hh.js +0 -116
  366. package/dist/chunk-ga2vcmhy.js +0 -111
  367. package/dist/chunk-k5c76pvm.js +0 -114
  368. package/dist/chunk-npf5eh3g.js +0 -8
  369. package/dist/chunk-ppwjyveh.js +0 -8
  370. package/dist/chunk-t38536jf.js +0 -254
  371. package/dist/chunk-tf8gr3bs.js +0 -112
  372. package/dist/chunk-vam5at9t.js +0 -175
  373. package/dist/chunk-vxnvzfnv.js +0 -233
  374. package/dist/chunk-wef34bk5.js +0 -107
  375. package/dist/chunk-wkjjv1jr.js +0 -1026
  376. package/dist/chunk-wkx2xsed.js +0 -113
  377. package/dist/chunk-x6r4v44b.js +0 -8
  378. package/dist/chunk-xwhmcc3g.js +0 -109
@@ -0,0 +1,1394 @@
1
+ // @bun
2
+ import {
3
+ init_slashCommandParsing,
4
+ parseSlashCommand
5
+ } from "./chunk-rn0v1hk8.js";
6
+ import {
7
+ DEFAULT_OUTPUT_STYLE_NAME,
8
+ Select,
9
+ Spinner,
10
+ createAttachmentMessage,
11
+ createCommandInputMessage,
12
+ createImageMetadataText,
13
+ createSystemMessage,
14
+ createUserMessage,
15
+ executeUserPromptSubmitHooks,
16
+ extractTag,
17
+ fileHistoryCanRestore,
18
+ fileHistoryEnabled,
19
+ fileHistoryGetDiffStats,
20
+ findCommand,
21
+ getAttachmentMessages,
22
+ getCommandName,
23
+ getContentText,
24
+ getUserPromptSubmitHookBlockingMessage,
25
+ init_AppState,
26
+ init_Spinner,
27
+ init_attachments,
28
+ init_commands1 as init_commands,
29
+ init_fileHistory,
30
+ init_generators,
31
+ init_hooks1 as init_hooks,
32
+ init_imageResizer,
33
+ init_imageStore,
34
+ init_messages1 as init_messages,
35
+ init_outputStyles,
36
+ init_queryProfiler,
37
+ init_select,
38
+ init_textInputTypes,
39
+ init_useTerminalSize,
40
+ isBridgeSafeCommand,
41
+ isEmptyMessageText,
42
+ isSyntheticMessage,
43
+ isToolUseResultMessage,
44
+ isValidImagePaste,
45
+ maybeResizeAndDownsampleImageBlock,
46
+ queryCheckpoint,
47
+ storeImages,
48
+ toArray,
49
+ useAppState
50
+ } from "./chunk-c092k38b.js";
51
+ import {
52
+ init_useExitOnCtrlCDWithKeybindings,
53
+ useExitOnCtrlCDWithKeybindings
54
+ } from "./chunk-qgajfxr7.js";
55
+ import {
56
+ init_useKeybinding
57
+ } from "./chunk-rd2884ff.js";
58
+ import {
59
+ init_events,
60
+ init_sessionTracing,
61
+ logOTelEvent,
62
+ redactIfDisabled,
63
+ startInteractionSpan
64
+ } from "./chunk-xahpt5e2.js";
65
+ import {
66
+ AGENT_TOOL_NAME,
67
+ LEGACY_AGENT_TOOL_NAME,
68
+ getAnthropicApiKeyWithSource,
69
+ getFastModeState,
70
+ getSettings_DEPRECATED,
71
+ init_auth,
72
+ init_constants1 as init_constants,
73
+ init_fastMode,
74
+ init_settings1 as init_settings
75
+ } from "./chunk-p7es39d1.js";
76
+ import {
77
+ count,
78
+ init_array
79
+ } from "./chunk-zwarn9h7.js";
80
+ import {
81
+ formatRelativeTimeAgo,
82
+ init_format,
83
+ truncate
84
+ } from "./chunk-axenqvc8.js";
85
+ import {
86
+ Divider,
87
+ ThemedBox_default,
88
+ ThemedText,
89
+ init_src,
90
+ useKeybinding,
91
+ useKeybindings,
92
+ useTerminalSize
93
+ } from "./chunk-m9w972ny.js";
94
+ import {
95
+ require_jsx_dev_runtime,
96
+ require_react
97
+ } from "./chunk-b5wxetbv.js";
98
+ import {
99
+ init_analytics,
100
+ logEvent
101
+ } from "./chunk-h0rbjg6x.js";
102
+ import {
103
+ getCwd,
104
+ init_cwd
105
+ } from "./chunk-tv74hgw9.js";
106
+ import {
107
+ BASH_STDERR_TAG,
108
+ BASH_STDOUT_TAG,
109
+ COMMAND_MESSAGE_TAG,
110
+ LOCAL_COMMAND_STDERR_TAG,
111
+ LOCAL_COMMAND_STDOUT_TAG,
112
+ TASK_NOTIFICATION_TAG,
113
+ TEAMMATE_MESSAGE_TAG,
114
+ TICK_TAG,
115
+ init_displayTags,
116
+ init_log,
117
+ init_xml,
118
+ logError,
119
+ stripDisplayTags
120
+ } from "./chunk-wd8mqz95.js";
121
+ import {
122
+ figures_default,
123
+ init_figures
124
+ } from "./chunk-qajrkk97.js";
125
+ import {
126
+ getSdkBetas,
127
+ getSessionId,
128
+ init_state,
129
+ setPromptId
130
+ } from "./chunk-gzp6rza1.js";
131
+ import {
132
+ __esm,
133
+ __export,
134
+ __require,
135
+ __toESM
136
+ } from "./chunk-qp2qdcda.js";
137
+
138
+ // src/components/MessageSelector.tsx
139
+ var exports_MessageSelector = {};
140
+ __export(exports_MessageSelector, {
141
+ selectableUserMessagesFilter: () => selectableUserMessagesFilter,
142
+ messagesAfterAreOnlySynthetic: () => messagesAfterAreOnlySynthetic,
143
+ MessageSelector: () => MessageSelector
144
+ });
145
+ import { randomUUID } from "crypto";
146
+ import * as path from "path";
147
+ function isTextBlock(block) {
148
+ return block.type === "text";
149
+ }
150
+ function isSummarizeOption(option) {
151
+ return option === "summarize" || option === "summarize_up_to";
152
+ }
153
+ function MessageSelector({
154
+ messages,
155
+ onPreRestore,
156
+ onRestoreMessage,
157
+ onRestoreCode,
158
+ onSummarize,
159
+ onClose,
160
+ preselectedMessage
161
+ }) {
162
+ const fileHistory = useAppState((s) => s.fileHistory);
163
+ const [error, setError] = import_react.useState(undefined);
164
+ const isFileHistoryEnabled = fileHistoryEnabled();
165
+ const currentUUID = import_react.useMemo(randomUUID, []);
166
+ const messageOptions = import_react.useMemo(() => [
167
+ ...messages.filter(selectableUserMessagesFilter),
168
+ {
169
+ ...createUserMessage({
170
+ content: ""
171
+ }),
172
+ uuid: currentUUID
173
+ }
174
+ ], [messages, currentUUID]);
175
+ const [selectedIndex, setSelectedIndex] = import_react.useState(messageOptions.length - 1);
176
+ const firstVisibleIndex = Math.max(0, Math.min(selectedIndex - Math.floor(MAX_VISIBLE_MESSAGES / 2), messageOptions.length - MAX_VISIBLE_MESSAGES));
177
+ const hasMessagesToSelect = messageOptions.length > 1;
178
+ const [messageToRestore, setMessageToRestore] = import_react.useState(preselectedMessage);
179
+ const [diffStatsForRestore, setDiffStatsForRestore] = import_react.useState(undefined);
180
+ import_react.useEffect(() => {
181
+ if (!preselectedMessage || !isFileHistoryEnabled)
182
+ return;
183
+ let cancelled = false;
184
+ fileHistoryGetDiffStats(fileHistory, preselectedMessage.uuid).then((stats) => {
185
+ if (!cancelled)
186
+ setDiffStatsForRestore(stats);
187
+ });
188
+ return () => {
189
+ cancelled = true;
190
+ };
191
+ }, [preselectedMessage, isFileHistoryEnabled, fileHistory]);
192
+ const [isRestoring, setIsRestoring] = import_react.useState(false);
193
+ const [restoringOption, setRestoringOption] = import_react.useState(null);
194
+ const [selectedRestoreOption, setSelectedRestoreOption] = import_react.useState("both");
195
+ const [summarizeFromFeedback, setSummarizeFromFeedback] = import_react.useState("");
196
+ const [summarizeUpToFeedback, setSummarizeUpToFeedback] = import_react.useState("");
197
+ function getRestoreOptions(canRestoreCode2) {
198
+ const baseOptions = canRestoreCode2 ? [
199
+ { value: "both", label: "Restore code and conversation" },
200
+ { value: "conversation", label: "Restore conversation" },
201
+ { value: "code", label: "Restore code" }
202
+ ] : [{ value: "conversation", label: "Restore conversation" }];
203
+ const summarizeInputProps = {
204
+ type: "input",
205
+ placeholder: "add context (optional)",
206
+ initialValue: "",
207
+ allowEmptySubmitToCancel: true,
208
+ showLabelWithValue: true,
209
+ labelValueSeparator: ": "
210
+ };
211
+ baseOptions.push({
212
+ value: "summarize",
213
+ label: "Summarize from here",
214
+ ...summarizeInputProps,
215
+ onChange: setSummarizeFromFeedback
216
+ });
217
+ if (process.env.USER_TYPE === "ant") {
218
+ baseOptions.push({
219
+ value: "summarize_up_to",
220
+ label: "Summarize up to here",
221
+ ...summarizeInputProps,
222
+ onChange: setSummarizeUpToFeedback
223
+ });
224
+ }
225
+ baseOptions.push({ value: "nevermind", label: "Never mind" });
226
+ return baseOptions;
227
+ }
228
+ import_react.useEffect(() => {
229
+ logEvent("tengu_message_selector_opened", {});
230
+ }, []);
231
+ async function restoreConversationDirectly(message) {
232
+ onPreRestore();
233
+ setIsRestoring(true);
234
+ try {
235
+ await onRestoreMessage(message);
236
+ setIsRestoring(false);
237
+ onClose();
238
+ } catch (error2) {
239
+ logError(error2);
240
+ setIsRestoring(false);
241
+ setError(`Failed to restore the conversation:
242
+ ${error2}`);
243
+ }
244
+ }
245
+ async function handleSelect(message) {
246
+ const index = messages.indexOf(message);
247
+ const indexFromEnd = messages.length - 1 - index;
248
+ logEvent("tengu_message_selector_selected", {
249
+ index_from_end: indexFromEnd,
250
+ message_type: message.type,
251
+ is_current_prompt: false
252
+ });
253
+ if (!messages.includes(message)) {
254
+ onClose();
255
+ return;
256
+ }
257
+ if (!isFileHistoryEnabled) {
258
+ await restoreConversationDirectly(message);
259
+ return;
260
+ }
261
+ const diffStats = await fileHistoryGetDiffStats(fileHistory, message.uuid);
262
+ setMessageToRestore(message);
263
+ setDiffStatsForRestore(diffStats);
264
+ }
265
+ async function onSelectRestoreOption(option) {
266
+ logEvent("tengu_message_selector_restore_option_selected", {
267
+ option
268
+ });
269
+ if (!messageToRestore) {
270
+ setError("Message not found.");
271
+ return;
272
+ }
273
+ if (option === "nevermind") {
274
+ if (preselectedMessage)
275
+ onClose();
276
+ else
277
+ setMessageToRestore(undefined);
278
+ return;
279
+ }
280
+ if (isSummarizeOption(option)) {
281
+ onPreRestore();
282
+ setIsRestoring(true);
283
+ setRestoringOption(option);
284
+ setError(undefined);
285
+ try {
286
+ const direction = option === "summarize_up_to" ? "up_to" : "from";
287
+ const feedback = (direction === "up_to" ? summarizeUpToFeedback : summarizeFromFeedback).trim() || undefined;
288
+ await onSummarize(messageToRestore, feedback, direction);
289
+ setIsRestoring(false);
290
+ setRestoringOption(null);
291
+ setMessageToRestore(undefined);
292
+ onClose();
293
+ } catch (error2) {
294
+ logError(error2);
295
+ setIsRestoring(false);
296
+ setRestoringOption(null);
297
+ setMessageToRestore(undefined);
298
+ setError(`Failed to summarize:
299
+ ${error2}`);
300
+ }
301
+ return;
302
+ }
303
+ onPreRestore();
304
+ setIsRestoring(true);
305
+ setError(undefined);
306
+ let codeError = null;
307
+ let conversationError = null;
308
+ if (option === "code" || option === "both") {
309
+ try {
310
+ await onRestoreCode(messageToRestore);
311
+ } catch (error2) {
312
+ codeError = error2;
313
+ logError(codeError);
314
+ }
315
+ }
316
+ if (option === "conversation" || option === "both") {
317
+ try {
318
+ await onRestoreMessage(messageToRestore);
319
+ } catch (error2) {
320
+ conversationError = error2;
321
+ logError(conversationError);
322
+ }
323
+ }
324
+ setIsRestoring(false);
325
+ setMessageToRestore(undefined);
326
+ if (conversationError && codeError) {
327
+ setError(`Failed to restore the conversation and code:
328
+ ${conversationError}
329
+ ${codeError}`);
330
+ } else if (conversationError) {
331
+ setError(`Failed to restore the conversation:
332
+ ${conversationError}`);
333
+ } else if (codeError) {
334
+ setError(`Failed to restore the code:
335
+ ${codeError}`);
336
+ } else {
337
+ onClose();
338
+ }
339
+ }
340
+ const exitState = useExitOnCtrlCDWithKeybindings();
341
+ const handleEscape = import_react.useCallback(() => {
342
+ if (messageToRestore && !preselectedMessage) {
343
+ setMessageToRestore(undefined);
344
+ return;
345
+ }
346
+ logEvent("tengu_message_selector_cancelled", {});
347
+ onClose();
348
+ }, [onClose, messageToRestore, preselectedMessage]);
349
+ const moveUp = import_react.useCallback(() => setSelectedIndex((prev) => Math.max(0, prev - 1)), []);
350
+ const moveDown = import_react.useCallback(() => setSelectedIndex((prev) => Math.min(messageOptions.length - 1, prev + 1)), [messageOptions.length]);
351
+ const jumpToTop = import_react.useCallback(() => setSelectedIndex(0), []);
352
+ const jumpToBottom = import_react.useCallback(() => setSelectedIndex(messageOptions.length - 1), [messageOptions.length]);
353
+ const handleSelectCurrent = import_react.useCallback(() => {
354
+ const selected = messageOptions[selectedIndex];
355
+ if (selected) {
356
+ handleSelect(selected);
357
+ }
358
+ }, [messageOptions, selectedIndex, handleSelect]);
359
+ useKeybinding("confirm:no", handleEscape, {
360
+ context: "Confirmation",
361
+ isActive: !messageToRestore
362
+ });
363
+ useKeybindings({
364
+ "messageSelector:up": moveUp,
365
+ "messageSelector:down": moveDown,
366
+ "messageSelector:top": jumpToTop,
367
+ "messageSelector:bottom": jumpToBottom,
368
+ "messageSelector:select": handleSelectCurrent
369
+ }, {
370
+ context: "MessageSelector",
371
+ isActive: !isRestoring && !error && !messageToRestore && hasMessagesToSelect
372
+ });
373
+ const [fileHistoryMetadata, setFileHistoryMetadata] = import_react.useState({});
374
+ import_react.useEffect(() => {
375
+ async function loadFileHistoryMetadata() {
376
+ if (!isFileHistoryEnabled) {
377
+ return;
378
+ }
379
+ Promise.all(messageOptions.map(async (userMessage, itemIndex) => {
380
+ if (userMessage.uuid !== currentUUID) {
381
+ const canRestore = fileHistoryCanRestore(fileHistory, userMessage.uuid);
382
+ const nextUserMessage = messageOptions.at(itemIndex + 1);
383
+ const diffStats = canRestore ? computeDiffStatsBetweenMessages(messages, userMessage.uuid, nextUserMessage?.uuid !== currentUUID ? nextUserMessage?.uuid : undefined) : undefined;
384
+ if (diffStats !== undefined) {
385
+ setFileHistoryMetadata((prev) => ({
386
+ ...prev,
387
+ [itemIndex]: diffStats
388
+ }));
389
+ } else {
390
+ setFileHistoryMetadata((prev) => ({
391
+ ...prev,
392
+ [itemIndex]: undefined
393
+ }));
394
+ }
395
+ }
396
+ }));
397
+ }
398
+ loadFileHistoryMetadata();
399
+ }, [messageOptions, messages, currentUUID, fileHistory, isFileHistoryEnabled]);
400
+ const canRestoreCode = isFileHistoryEnabled && diffStatsForRestore?.filesChanged && diffStatsForRestore.filesChanged.length > 0;
401
+ const showPickList = !error && !messageToRestore && !preselectedMessage && hasMessagesToSelect;
402
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
403
+ flexDirection: "column",
404
+ width: "100%",
405
+ children: [
406
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
407
+ color: "suggestion"
408
+ }, undefined, false, undefined, this),
409
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
410
+ flexDirection: "column",
411
+ marginX: 1,
412
+ gap: 1,
413
+ children: [
414
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
415
+ bold: true,
416
+ color: "suggestion",
417
+ children: "Rewind"
418
+ }, undefined, false, undefined, this),
419
+ error && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
420
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
421
+ color: "error",
422
+ children: [
423
+ "Error: ",
424
+ error
425
+ ]
426
+ }, undefined, true, undefined, this)
427
+ }, undefined, false, undefined, this),
428
+ !hasMessagesToSelect && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
429
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
430
+ children: "Nothing to rewind to yet."
431
+ }, undefined, false, undefined, this)
432
+ }, undefined, false, undefined, this),
433
+ !error && messageToRestore && hasMessagesToSelect && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
434
+ children: [
435
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
436
+ children: [
437
+ "Confirm you want to restore",
438
+ " ",
439
+ !diffStatsForRestore && "the conversation ",
440
+ "to the point before you sent this message:"
441
+ ]
442
+ }, undefined, true, undefined, this),
443
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
444
+ flexDirection: "column",
445
+ paddingLeft: 1,
446
+ borderStyle: "single",
447
+ borderRight: false,
448
+ borderTop: false,
449
+ borderBottom: false,
450
+ borderLeft: true,
451
+ borderLeftDimColor: true,
452
+ children: [
453
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(UserMessageOption, {
454
+ userMessage: messageToRestore,
455
+ color: "text",
456
+ isCurrent: false
457
+ }, undefined, false, undefined, this),
458
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
459
+ dimColor: true,
460
+ children: [
461
+ "(",
462
+ formatRelativeTimeAgo(new Date(messageToRestore.timestamp)),
463
+ ")"
464
+ ]
465
+ }, undefined, true, undefined, this)
466
+ ]
467
+ }, undefined, true, undefined, this),
468
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(RestoreOptionDescription, {
469
+ selectedRestoreOption,
470
+ canRestoreCode: !!canRestoreCode,
471
+ diffStatsForRestore
472
+ }, undefined, false, undefined, this),
473
+ isRestoring && isSummarizeOption(restoringOption) ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
474
+ flexDirection: "row",
475
+ gap: 1,
476
+ children: [
477
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Spinner, {}, undefined, false, undefined, this),
478
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
479
+ children: "Summarizing\u2026"
480
+ }, undefined, false, undefined, this)
481
+ ]
482
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Select, {
483
+ isDisabled: isRestoring,
484
+ options: getRestoreOptions(!!canRestoreCode),
485
+ defaultFocusValue: canRestoreCode ? "both" : "conversation",
486
+ onFocus: (value) => setSelectedRestoreOption(value),
487
+ onChange: (value) => onSelectRestoreOption(value),
488
+ onCancel: () => preselectedMessage ? onClose() : setMessageToRestore(undefined)
489
+ }, undefined, false, undefined, this),
490
+ canRestoreCode && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
491
+ marginBottom: 1,
492
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
493
+ dimColor: true,
494
+ children: [
495
+ figures_default.warning,
496
+ " Rewinding does not affect files edited manually or via bash."
497
+ ]
498
+ }, undefined, true, undefined, this)
499
+ }, undefined, false, undefined, this)
500
+ ]
501
+ }, undefined, true, undefined, this),
502
+ showPickList && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
503
+ children: [
504
+ isFileHistoryEnabled ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
505
+ children: "Restore the code and/or conversation to the point before\u2026"
506
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
507
+ children: "Restore and fork the conversation to the point before\u2026"
508
+ }, undefined, false, undefined, this),
509
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
510
+ width: "100%",
511
+ flexDirection: "column",
512
+ children: messageOptions.slice(firstVisibleIndex, firstVisibleIndex + MAX_VISIBLE_MESSAGES).map((msg, visibleOptionIndex) => {
513
+ const optionIndex = firstVisibleIndex + visibleOptionIndex;
514
+ const isSelected = optionIndex === selectedIndex;
515
+ const isCurrent = msg.uuid === currentUUID;
516
+ const metadataLoaded = optionIndex in fileHistoryMetadata;
517
+ const metadata = fileHistoryMetadata[optionIndex];
518
+ const numFilesChanged = metadata?.filesChanged && metadata.filesChanged.length;
519
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
520
+ height: isFileHistoryEnabled ? 3 : 2,
521
+ overflow: "hidden",
522
+ width: "100%",
523
+ flexDirection: "row",
524
+ children: [
525
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
526
+ width: 2,
527
+ minWidth: 2,
528
+ children: isSelected ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
529
+ color: "permission",
530
+ bold: true,
531
+ children: [
532
+ figures_default.pointer,
533
+ " "
534
+ ]
535
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
536
+ children: " "
537
+ }, undefined, false, undefined, this)
538
+ }, undefined, false, undefined, this),
539
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
540
+ flexDirection: "column",
541
+ children: [
542
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
543
+ flexShrink: 1,
544
+ height: 1,
545
+ overflow: "hidden",
546
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(UserMessageOption, {
547
+ userMessage: msg,
548
+ color: isSelected ? "suggestion" : undefined,
549
+ isCurrent,
550
+ paddingRight: 10
551
+ }, undefined, false, undefined, this)
552
+ }, undefined, false, undefined, this),
553
+ isFileHistoryEnabled && metadataLoaded && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
554
+ height: 1,
555
+ flexDirection: "row",
556
+ children: metadata ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
557
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
558
+ dimColor: !isSelected,
559
+ color: "inactive",
560
+ children: numFilesChanged ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
561
+ children: [
562
+ numFilesChanged === 1 && metadata.filesChanged[0] ? `${path.basename(metadata.filesChanged[0])} ` : `${numFilesChanged} files changed `,
563
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(DiffStatsText, {
564
+ diffStats: metadata
565
+ }, undefined, false, undefined, this)
566
+ ]
567
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
568
+ children: "No code changes"
569
+ }, undefined, false, undefined, this)
570
+ }, undefined, false, undefined, this)
571
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
572
+ dimColor: true,
573
+ color: "warning",
574
+ children: [
575
+ figures_default.warning,
576
+ " No code restore"
577
+ ]
578
+ }, undefined, true, undefined, this)
579
+ }, undefined, false, undefined, this)
580
+ ]
581
+ }, undefined, true, undefined, this)
582
+ ]
583
+ }, msg.uuid, true, undefined, this);
584
+ })
585
+ }, undefined, false, undefined, this)
586
+ ]
587
+ }, undefined, true, undefined, this),
588
+ !messageToRestore && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
589
+ dimColor: true,
590
+ italic: true,
591
+ children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
592
+ children: [
593
+ "Press ",
594
+ exitState.keyName,
595
+ " again to exit"
596
+ ]
597
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
598
+ children: [
599
+ !error && hasMessagesToSelect && "Enter to continue \xB7 ",
600
+ "Esc to exit"
601
+ ]
602
+ }, undefined, true, undefined, this)
603
+ }, undefined, false, undefined, this)
604
+ ]
605
+ }, undefined, true, undefined, this)
606
+ ]
607
+ }, undefined, true, undefined, this);
608
+ }
609
+ function getRestoreOptionConversationText(option) {
610
+ switch (option) {
611
+ case "summarize":
612
+ return "Messages after this point will be summarized.";
613
+ case "summarize_up_to":
614
+ return "Preceding messages will be summarized. This and subsequent messages will remain unchanged \u2014 you will stay at the end of the conversation.";
615
+ case "both":
616
+ case "conversation":
617
+ return "The conversation will be forked.";
618
+ case "code":
619
+ case "nevermind":
620
+ return "The conversation will be unchanged.";
621
+ }
622
+ }
623
+ function RestoreOptionDescription({
624
+ selectedRestoreOption,
625
+ canRestoreCode,
626
+ diffStatsForRestore
627
+ }) {
628
+ const showCodeRestore = canRestoreCode && (selectedRestoreOption === "both" || selectedRestoreOption === "code");
629
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
630
+ flexDirection: "column",
631
+ children: [
632
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
633
+ dimColor: true,
634
+ children: getRestoreOptionConversationText(selectedRestoreOption)
635
+ }, undefined, false, undefined, this),
636
+ !isSummarizeOption(selectedRestoreOption) && (showCodeRestore ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(RestoreCodeConfirmation, {
637
+ diffStatsForRestore
638
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
639
+ dimColor: true,
640
+ children: "The code will be unchanged."
641
+ }, undefined, false, undefined, this))
642
+ ]
643
+ }, undefined, true, undefined, this);
644
+ }
645
+ function RestoreCodeConfirmation({
646
+ diffStatsForRestore
647
+ }) {
648
+ if (diffStatsForRestore === undefined) {
649
+ return;
650
+ }
651
+ if (!diffStatsForRestore.filesChanged || !diffStatsForRestore.filesChanged[0]) {
652
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
653
+ dimColor: true,
654
+ children: "The code has not changed (nothing will be restored)."
655
+ }, undefined, false, undefined, this);
656
+ }
657
+ const numFilesChanged = diffStatsForRestore.filesChanged.length;
658
+ let fileLabel = "";
659
+ if (numFilesChanged === 1) {
660
+ fileLabel = path.basename(diffStatsForRestore.filesChanged[0] || "");
661
+ } else if (numFilesChanged === 2) {
662
+ const file1 = path.basename(diffStatsForRestore.filesChanged[0] || "");
663
+ const file2 = path.basename(diffStatsForRestore.filesChanged[1] || "");
664
+ fileLabel = `${file1} and ${file2}`;
665
+ } else {
666
+ const file1 = path.basename(diffStatsForRestore.filesChanged[0] || "");
667
+ fileLabel = `${file1} and ${diffStatsForRestore.filesChanged.length - 1} other files`;
668
+ }
669
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
670
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
671
+ dimColor: true,
672
+ children: [
673
+ "The code will be restored",
674
+ " ",
675
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(DiffStatsText, {
676
+ diffStats: diffStatsForRestore
677
+ }, undefined, false, undefined, this),
678
+ " in ",
679
+ fileLabel,
680
+ "."
681
+ ]
682
+ }, undefined, true, undefined, this)
683
+ }, undefined, false, undefined, this);
684
+ }
685
+ function DiffStatsText({
686
+ diffStats
687
+ }) {
688
+ if (!diffStats || !diffStats.filesChanged) {
689
+ return;
690
+ }
691
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(jsx_dev_runtime.Fragment, {
692
+ children: [
693
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
694
+ color: "diffAddedWord",
695
+ children: [
696
+ "+",
697
+ diffStats.insertions,
698
+ " "
699
+ ]
700
+ }, undefined, true, undefined, this),
701
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
702
+ color: "diffRemovedWord",
703
+ children: [
704
+ "-",
705
+ diffStats.deletions
706
+ ]
707
+ }, undefined, true, undefined, this)
708
+ ]
709
+ }, undefined, true, undefined, this);
710
+ }
711
+ function UserMessageOption({
712
+ userMessage,
713
+ color,
714
+ dimColor,
715
+ isCurrent,
716
+ paddingRight
717
+ }) {
718
+ const { columns } = useTerminalSize();
719
+ if (isCurrent) {
720
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
721
+ width: "100%",
722
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
723
+ italic: true,
724
+ color,
725
+ dimColor,
726
+ children: "(current)"
727
+ }, undefined, false, undefined, this)
728
+ }, undefined, false, undefined, this);
729
+ }
730
+ const content = userMessage.message.content;
731
+ const lastBlock = typeof content === "string" ? null : content[content.length - 1];
732
+ const rawMessageText = typeof content === "string" ? content.trim() : lastBlock && isTextBlock(lastBlock) ? lastBlock.text.trim() : "(no prompt)";
733
+ const messageText = stripDisplayTags(rawMessageText);
734
+ if (isEmptyMessageText(messageText)) {
735
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
736
+ flexDirection: "row",
737
+ width: "100%",
738
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
739
+ italic: true,
740
+ color,
741
+ dimColor,
742
+ children: "((empty message))"
743
+ }, undefined, false, undefined, this)
744
+ }, undefined, false, undefined, this);
745
+ }
746
+ if (messageText.includes("<bash-input>")) {
747
+ const input = extractTag(messageText, "bash-input");
748
+ if (input) {
749
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
750
+ flexDirection: "row",
751
+ width: "100%",
752
+ children: [
753
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
754
+ color: "bashBorder",
755
+ children: "!"
756
+ }, undefined, false, undefined, this),
757
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
758
+ color,
759
+ dimColor,
760
+ children: [
761
+ " ",
762
+ input
763
+ ]
764
+ }, undefined, true, undefined, this)
765
+ ]
766
+ }, undefined, true, undefined, this);
767
+ }
768
+ }
769
+ if (messageText.includes(`<${COMMAND_MESSAGE_TAG}>`)) {
770
+ const commandMessage = extractTag(messageText, COMMAND_MESSAGE_TAG);
771
+ const args = extractTag(messageText, "command-args");
772
+ const isSkillFormat = extractTag(messageText, "skill-format") === "true";
773
+ if (commandMessage) {
774
+ if (isSkillFormat) {
775
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
776
+ flexDirection: "row",
777
+ width: "100%",
778
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
779
+ color,
780
+ dimColor,
781
+ children: [
782
+ "Skill(",
783
+ commandMessage,
784
+ ")"
785
+ ]
786
+ }, undefined, true, undefined, this)
787
+ }, undefined, false, undefined, this);
788
+ } else {
789
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
790
+ flexDirection: "row",
791
+ width: "100%",
792
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
793
+ color,
794
+ dimColor,
795
+ children: [
796
+ "/",
797
+ commandMessage,
798
+ " ",
799
+ args
800
+ ]
801
+ }, undefined, true, undefined, this)
802
+ }, undefined, false, undefined, this);
803
+ }
804
+ }
805
+ }
806
+ return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
807
+ flexDirection: "row",
808
+ width: "100%",
809
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
810
+ color,
811
+ dimColor,
812
+ children: paddingRight ? truncate(messageText, columns - paddingRight, true) : messageText.slice(0, 500).split(`
813
+ `).slice(0, 4).join(`
814
+ `)
815
+ }, undefined, false, undefined, this)
816
+ }, undefined, false, undefined, this);
817
+ }
818
+ function computeDiffStatsBetweenMessages(messages, fromMessageId, toMessageId) {
819
+ const startIndex = messages.findIndex((msg) => msg.uuid === fromMessageId);
820
+ if (startIndex === -1) {
821
+ return;
822
+ }
823
+ let endIndex = toMessageId ? messages.findIndex((msg) => msg.uuid === toMessageId) : messages.length;
824
+ if (endIndex === -1) {
825
+ endIndex = messages.length;
826
+ }
827
+ const filesChanged = [];
828
+ let insertions = 0;
829
+ let deletions = 0;
830
+ for (let i = startIndex + 1;i < endIndex; i++) {
831
+ const msg = messages[i];
832
+ if (!msg || !isToolUseResultMessage(msg)) {
833
+ continue;
834
+ }
835
+ const result = msg.toolUseResult;
836
+ if (!result || !result.filePath || !result.structuredPatch) {
837
+ continue;
838
+ }
839
+ if (!filesChanged.includes(result.filePath)) {
840
+ filesChanged.push(result.filePath);
841
+ }
842
+ try {
843
+ if ("type" in result && result.type === "create") {
844
+ insertions += result.content.split(/\r?\n/).length;
845
+ } else {
846
+ for (const hunk of result.structuredPatch) {
847
+ const additions = count(hunk.lines, (line) => line.startsWith("+"));
848
+ const removals = count(hunk.lines, (line) => line.startsWith("-"));
849
+ insertions += additions;
850
+ deletions += removals;
851
+ }
852
+ }
853
+ } catch {
854
+ continue;
855
+ }
856
+ }
857
+ return {
858
+ filesChanged,
859
+ insertions,
860
+ deletions
861
+ };
862
+ }
863
+ function selectableUserMessagesFilter(message) {
864
+ if (message.type !== "user") {
865
+ return false;
866
+ }
867
+ if (Array.isArray(message.message.content) && message.message.content[0]?.type === "tool_result") {
868
+ return false;
869
+ }
870
+ if (isSyntheticMessage(message)) {
871
+ return false;
872
+ }
873
+ if (message.isMeta) {
874
+ return false;
875
+ }
876
+ if (message.isCompactSummary || message.isVisibleInTranscriptOnly) {
877
+ return false;
878
+ }
879
+ const content = message.message.content;
880
+ const lastBlock = typeof content === "string" ? null : content[content.length - 1];
881
+ const messageText = typeof content === "string" ? content.trim() : lastBlock && isTextBlock(lastBlock) ? lastBlock.text.trim() : "";
882
+ 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) {
883
+ return false;
884
+ }
885
+ return true;
886
+ }
887
+ function messagesAfterAreOnlySynthetic(messages, fromIndex) {
888
+ for (let i = fromIndex + 1;i < messages.length; i++) {
889
+ const msg = messages[i];
890
+ if (!msg)
891
+ continue;
892
+ if (isSyntheticMessage(msg))
893
+ continue;
894
+ if (isToolUseResultMessage(msg))
895
+ continue;
896
+ if (msg.type === "progress")
897
+ continue;
898
+ if (msg.type === "system")
899
+ continue;
900
+ if (msg.type === "attachment")
901
+ continue;
902
+ if (msg.type === "user" && msg.isMeta)
903
+ continue;
904
+ if (msg.type === "assistant") {
905
+ const content = msg.message.content;
906
+ if (Array.isArray(content)) {
907
+ const hasMeaningfulContent = content.some((block) => block.type === "text" && block.text.trim() || block.type === "tool_use");
908
+ if (hasMeaningfulContent)
909
+ return false;
910
+ }
911
+ continue;
912
+ }
913
+ if (msg.type === "user") {
914
+ return false;
915
+ }
916
+ }
917
+ return true;
918
+ }
919
+ var import_react, jsx_dev_runtime, MAX_VISIBLE_MESSAGES = 7;
920
+ var init_MessageSelector = __esm(() => {
921
+ init_figures();
922
+ init_analytics();
923
+ init_AppState();
924
+ init_fileHistory();
925
+ init_log();
926
+ init_useExitOnCtrlCDWithKeybindings();
927
+ init_src();
928
+ init_useKeybinding();
929
+ init_displayTags();
930
+ init_messages();
931
+ init_select();
932
+ init_Spinner();
933
+ init_useTerminalSize();
934
+ init_xml();
935
+ init_array();
936
+ init_format();
937
+ import_react = __toESM(require_react(), 1);
938
+ jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
939
+ });
940
+
941
+ // src/utils/ultraplan/keyword.ts
942
+ var OPEN_TO_CLOSE = {
943
+ "`": "`",
944
+ '"': '"',
945
+ "<": ">",
946
+ "{": "}",
947
+ "[": "]",
948
+ "(": ")",
949
+ "'": "'"
950
+ };
951
+ function findKeywordTriggerPositions(text, keyword) {
952
+ const re = new RegExp(keyword, "i");
953
+ if (!re.test(text))
954
+ return [];
955
+ if (text.startsWith("/"))
956
+ return [];
957
+ const quotedRanges = [];
958
+ let openQuote = null;
959
+ let openAt = 0;
960
+ const isWord = (ch) => !!ch && /[\p{L}\p{N}_]/u.test(ch);
961
+ for (let i = 0;i < text.length; i++) {
962
+ const ch = text[i];
963
+ if (openQuote) {
964
+ if (openQuote === "[" && ch === "[") {
965
+ openAt = i;
966
+ continue;
967
+ }
968
+ if (ch !== OPEN_TO_CLOSE[openQuote])
969
+ continue;
970
+ if (openQuote === "'" && isWord(text[i + 1]))
971
+ continue;
972
+ quotedRanges.push({ start: openAt, end: i + 1 });
973
+ openQuote = null;
974
+ } 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) {
975
+ openQuote = ch;
976
+ openAt = i;
977
+ }
978
+ }
979
+ const positions = [];
980
+ const wordRe = new RegExp(`\\b${keyword}\\b`, "gi");
981
+ const matches = text.matchAll(wordRe);
982
+ for (const match of matches) {
983
+ if (match.index === undefined)
984
+ continue;
985
+ const start = match.index;
986
+ const end = start + match[0].length;
987
+ if (quotedRanges.some((r) => start >= r.start && start < r.end))
988
+ continue;
989
+ const before = text[start - 1];
990
+ const after = text[end];
991
+ if (before === "/" || before === "\\" || before === "-")
992
+ continue;
993
+ if (after === "/" || after === "\\" || after === "-" || after === "?")
994
+ continue;
995
+ if (after === "." && isWord(text[end + 1]))
996
+ continue;
997
+ positions.push({ word: match[0], start, end });
998
+ }
999
+ return positions;
1000
+ }
1001
+ function findUltraplanTriggerPositions(text) {
1002
+ return findKeywordTriggerPositions(text, "ultraplan");
1003
+ }
1004
+ function findUltrareviewTriggerPositions(text) {
1005
+ return findKeywordTriggerPositions(text, "ultrareview");
1006
+ }
1007
+ function hasUltraplanKeyword(text) {
1008
+ return findUltraplanTriggerPositions(text).length > 0;
1009
+ }
1010
+ function replaceUltraplanKeyword(text) {
1011
+ const [trigger] = findUltraplanTriggerPositions(text);
1012
+ if (!trigger)
1013
+ return text;
1014
+ const before = text.slice(0, trigger.start);
1015
+ const after = text.slice(trigger.end);
1016
+ if (!(before + after).trim())
1017
+ return "";
1018
+ return before + trigger.word.slice("ultra".length) + after;
1019
+ }
1020
+
1021
+ // src/utils/processUserInput/processUserInput.ts
1022
+ init_analytics();
1023
+ init_messages();
1024
+ init_commands();
1025
+ init_textInputTypes();
1026
+ init_attachments();
1027
+ init_generators();
1028
+ init_hooks();
1029
+ init_imageResizer();
1030
+ init_imageStore();
1031
+ init_messages();
1032
+ init_queryProfiler();
1033
+ init_slashCommandParsing();
1034
+ import { randomUUID as randomUUID3 } from "crypto";
1035
+
1036
+ // src/utils/processUserInput/processTextPrompt.ts
1037
+ init_state();
1038
+ init_analytics();
1039
+ init_messages();
1040
+ init_events();
1041
+ init_sessionTracing();
1042
+ import { randomUUID as randomUUID2 } from "crypto";
1043
+
1044
+ // src/utils/userPromptKeywords.ts
1045
+ function matchesNegativeKeyword(input) {
1046
+ const lowerInput = input.toLowerCase();
1047
+ 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/;
1048
+ return negativePattern.test(lowerInput);
1049
+ }
1050
+ function matchesKeepGoingKeyword(input) {
1051
+ const lowerInput = input.toLowerCase().trim();
1052
+ if (lowerInput === "continue") {
1053
+ return true;
1054
+ }
1055
+ const keepGoingPattern = /\b(keep going|go on)\b/;
1056
+ return keepGoingPattern.test(lowerInput);
1057
+ }
1058
+
1059
+ // src/utils/processUserInput/processTextPrompt.ts
1060
+ function processTextPrompt(input, imageContentBlocks, imagePasteIds, attachmentMessages, uuid, permissionMode, isMeta) {
1061
+ const promptId = randomUUID2();
1062
+ setPromptId(promptId);
1063
+ const userPromptText = typeof input === "string" ? input : input.find((block) => block.type === "text")?.text || "";
1064
+ startInteractionSpan(userPromptText);
1065
+ const otelPromptText = typeof input === "string" ? input : input.findLast((block) => block.type === "text")?.text || "";
1066
+ if (otelPromptText) {
1067
+ logOTelEvent("user_prompt", {
1068
+ prompt_length: String(otelPromptText.length),
1069
+ prompt: redactIfDisabled(otelPromptText),
1070
+ "prompt.id": promptId
1071
+ });
1072
+ }
1073
+ const isNegative = matchesNegativeKeyword(userPromptText);
1074
+ const isKeepGoing = matchesKeepGoingKeyword(userPromptText);
1075
+ logEvent("tengu_input_prompt", {
1076
+ is_negative: isNegative,
1077
+ is_keep_going: isKeepGoing
1078
+ });
1079
+ if (imageContentBlocks.length > 0) {
1080
+ const textContent = typeof input === "string" ? input.trim() ? [{ type: "text", text: input }] : [] : input;
1081
+ const userMessage2 = createUserMessage({
1082
+ content: [...textContent, ...imageContentBlocks],
1083
+ uuid,
1084
+ imagePasteIds: imagePasteIds.length > 0 ? imagePasteIds : undefined,
1085
+ permissionMode,
1086
+ isMeta: isMeta || undefined
1087
+ });
1088
+ return {
1089
+ messages: [userMessage2, ...attachmentMessages],
1090
+ shouldQuery: true
1091
+ };
1092
+ }
1093
+ const userMessage = createUserMessage({
1094
+ content: input,
1095
+ uuid,
1096
+ permissionMode,
1097
+ isMeta: isMeta || undefined
1098
+ });
1099
+ return {
1100
+ messages: [userMessage, ...attachmentMessages],
1101
+ shouldQuery: true
1102
+ };
1103
+ }
1104
+
1105
+ // src/utils/processUserInput/processUserInput.ts
1106
+ async function processUserInput({
1107
+ input,
1108
+ preExpansionInput,
1109
+ mode,
1110
+ setToolJSX,
1111
+ context,
1112
+ pastedContents,
1113
+ ideSelection,
1114
+ messages,
1115
+ setUserInputOnProcessing,
1116
+ uuid,
1117
+ isAlreadyProcessing,
1118
+ querySource,
1119
+ canUseTool,
1120
+ skipSlashCommands,
1121
+ bridgeOrigin,
1122
+ isMeta,
1123
+ skipAttachments
1124
+ }) {
1125
+ const inputString = typeof input === "string" ? input : null;
1126
+ if (mode === "prompt" && inputString !== null && !isMeta) {
1127
+ setUserInputOnProcessing?.(inputString);
1128
+ }
1129
+ queryCheckpoint("query_process_user_input_base_start");
1130
+ const appState = context.getAppState();
1131
+ const result = await processUserInputBase(input, mode, setToolJSX, context, pastedContents, ideSelection, messages, uuid, isAlreadyProcessing, querySource, canUseTool, appState.toolPermissionContext.mode, skipSlashCommands, bridgeOrigin, isMeta, skipAttachments, preExpansionInput);
1132
+ queryCheckpoint("query_process_user_input_base_end");
1133
+ if (!result.shouldQuery) {
1134
+ return result;
1135
+ }
1136
+ queryCheckpoint("query_hooks_start");
1137
+ const inputMessage = getContentText(input) || "";
1138
+ for await (const hookResult of executeUserPromptSubmitHooks(inputMessage, appState.toolPermissionContext.mode, context, context.requestPrompt)) {
1139
+ if (hookResult.message?.type === "progress") {
1140
+ continue;
1141
+ }
1142
+ if (hookResult.blockingError) {
1143
+ const blockingMessage = getUserPromptSubmitHookBlockingMessage(hookResult.blockingError);
1144
+ return {
1145
+ messages: [
1146
+ createSystemMessage(`${blockingMessage}
1147
+
1148
+ Original prompt: ${input}`, "warning")
1149
+ ],
1150
+ shouldQuery: false,
1151
+ allowedTools: result.allowedTools
1152
+ };
1153
+ }
1154
+ if (hookResult.preventContinuation) {
1155
+ const message = hookResult.stopReason ? `Operation stopped by hook: ${hookResult.stopReason}` : "Operation stopped by hook";
1156
+ result.messages.push(createUserMessage({
1157
+ content: message
1158
+ }));
1159
+ result.shouldQuery = false;
1160
+ return result;
1161
+ }
1162
+ if (hookResult.additionalContexts && hookResult.additionalContexts.length > 0) {
1163
+ result.messages.push(createAttachmentMessage({
1164
+ type: "hook_additional_context",
1165
+ content: hookResult.additionalContexts.map(applyTruncation),
1166
+ hookName: "UserPromptSubmit",
1167
+ toolUseID: `hook-${randomUUID3()}`,
1168
+ hookEvent: "UserPromptSubmit"
1169
+ }));
1170
+ }
1171
+ if (hookResult.message) {
1172
+ switch (hookResult.message.attachment.type) {
1173
+ case "hook_success":
1174
+ if (!hookResult.message.attachment.content) {
1175
+ break;
1176
+ }
1177
+ result.messages.push({
1178
+ ...hookResult.message,
1179
+ attachment: {
1180
+ ...hookResult.message.attachment,
1181
+ content: applyTruncation(hookResult.message.attachment.content)
1182
+ }
1183
+ });
1184
+ break;
1185
+ default:
1186
+ result.messages.push(hookResult.message);
1187
+ break;
1188
+ }
1189
+ }
1190
+ }
1191
+ queryCheckpoint("query_hooks_end");
1192
+ return result;
1193
+ }
1194
+ var MAX_HOOK_OUTPUT_LENGTH = 1e4;
1195
+ function applyTruncation(content) {
1196
+ if (content.length > MAX_HOOK_OUTPUT_LENGTH) {
1197
+ return `${content.substring(0, MAX_HOOK_OUTPUT_LENGTH)}\u2026 [output truncated - exceeded ${MAX_HOOK_OUTPUT_LENGTH} characters]`;
1198
+ }
1199
+ return content;
1200
+ }
1201
+ async function processUserInputBase(input, mode, setToolJSX, context, pastedContents, ideSelection, messages, uuid, isAlreadyProcessing, querySource, canUseTool, permissionMode, skipSlashCommands, bridgeOrigin, isMeta, skipAttachments, preExpansionInput) {
1202
+ let inputString = null;
1203
+ let precedingInputBlocks = [];
1204
+ const imageMetadataTexts = [];
1205
+ let normalizedInput = input;
1206
+ if (typeof input === "string") {
1207
+ inputString = input;
1208
+ } else if (input.length > 0) {
1209
+ queryCheckpoint("query_image_processing_start");
1210
+ const processedBlocks = [];
1211
+ for (const block of input) {
1212
+ if (block.type === "image") {
1213
+ const resized = await maybeResizeAndDownsampleImageBlock(block);
1214
+ if (resized.dimensions) {
1215
+ const metadataText = createImageMetadataText(resized.dimensions);
1216
+ if (metadataText) {
1217
+ imageMetadataTexts.push(metadataText);
1218
+ }
1219
+ }
1220
+ processedBlocks.push(resized.block);
1221
+ } else {
1222
+ processedBlocks.push(block);
1223
+ }
1224
+ }
1225
+ normalizedInput = processedBlocks;
1226
+ queryCheckpoint("query_image_processing_end");
1227
+ const lastBlock = processedBlocks[processedBlocks.length - 1];
1228
+ if (lastBlock?.type === "text") {
1229
+ inputString = lastBlock.text;
1230
+ precedingInputBlocks = processedBlocks.slice(0, -1);
1231
+ } else {
1232
+ precedingInputBlocks = processedBlocks;
1233
+ }
1234
+ }
1235
+ if (inputString === null && mode !== "prompt") {
1236
+ throw new Error(`Mode: ${mode} requires a string input.`);
1237
+ }
1238
+ const imageContents = pastedContents ? Object.values(pastedContents).filter(isValidImagePaste) : [];
1239
+ const imagePasteIds = imageContents.map((img) => img.id);
1240
+ const storedImagePaths = pastedContents ? await storeImages(pastedContents) : new Map;
1241
+ queryCheckpoint("query_pasted_image_processing_start");
1242
+ const imageProcessingResults = await Promise.all(imageContents.map(async (pastedImage) => {
1243
+ const imageBlock = {
1244
+ type: "image",
1245
+ source: {
1246
+ type: "base64",
1247
+ media_type: pastedImage.mediaType || "image/png",
1248
+ data: pastedImage.content
1249
+ }
1250
+ };
1251
+ logEvent("tengu_pasted_image_resize_attempt", {
1252
+ original_size_bytes: pastedImage.content.length
1253
+ });
1254
+ const resized = await maybeResizeAndDownsampleImageBlock(imageBlock);
1255
+ return {
1256
+ resized,
1257
+ originalDimensions: pastedImage.dimensions,
1258
+ sourcePath: pastedImage.sourcePath ?? storedImagePaths.get(pastedImage.id)
1259
+ };
1260
+ }));
1261
+ const imageContentBlocks = [];
1262
+ for (const {
1263
+ resized,
1264
+ originalDimensions,
1265
+ sourcePath
1266
+ } of imageProcessingResults) {
1267
+ if (resized.dimensions) {
1268
+ const metadataText = createImageMetadataText(resized.dimensions, sourcePath);
1269
+ if (metadataText) {
1270
+ imageMetadataTexts.push(metadataText);
1271
+ }
1272
+ } else if (originalDimensions) {
1273
+ const metadataText = createImageMetadataText(originalDimensions, sourcePath);
1274
+ if (metadataText) {
1275
+ imageMetadataTexts.push(metadataText);
1276
+ }
1277
+ } else if (sourcePath) {
1278
+ imageMetadataTexts.push(`[Image source: ${sourcePath}]`);
1279
+ }
1280
+ imageContentBlocks.push(resized.block);
1281
+ }
1282
+ queryCheckpoint("query_pasted_image_processing_end");
1283
+ let effectiveSkipSlash = skipSlashCommands;
1284
+ if (bridgeOrigin && inputString !== null && inputString.startsWith("/")) {
1285
+ const parsed = parseSlashCommand(inputString);
1286
+ const cmd = parsed ? findCommand(parsed.commandName, context.options.commands) : undefined;
1287
+ if (cmd) {
1288
+ if (isBridgeSafeCommand(cmd)) {
1289
+ effectiveSkipSlash = false;
1290
+ } else {
1291
+ const msg = `/${getCommandName(cmd)} isn't available over Remote Control.`;
1292
+ return {
1293
+ messages: [
1294
+ createUserMessage({ content: inputString, uuid }),
1295
+ createCommandInputMessage(`<local-command-stdout>${msg}</local-command-stdout>`)
1296
+ ],
1297
+ shouldQuery: false,
1298
+ resultText: msg
1299
+ };
1300
+ }
1301
+ }
1302
+ }
1303
+ if (mode === "prompt" && !context.options.isNonInteractiveSession && inputString !== null && !effectiveSkipSlash && !inputString.startsWith("/") && !context.getAppState().ultraplanSessionUrl && !context.getAppState().ultraplanLaunching && hasUltraplanKeyword(preExpansionInput ?? inputString)) {
1304
+ logEvent("tengu_ultraplan_keyword", {});
1305
+ const rewritten = replaceUltraplanKeyword(inputString).trim();
1306
+ const { processSlashCommand } = await import("./chunk-718k4vsj.js");
1307
+ const slashResult = await processSlashCommand(`/ultraplan ${rewritten}`, precedingInputBlocks, imageContentBlocks, [], context, setToolJSX, uuid, isAlreadyProcessing, canUseTool);
1308
+ return addImageMetadataMessage(slashResult, imageMetadataTexts);
1309
+ }
1310
+ const shouldExtractAttachments = !skipAttachments && inputString !== null && (mode !== "prompt" || effectiveSkipSlash || !inputString.startsWith("/"));
1311
+ queryCheckpoint("query_attachment_loading_start");
1312
+ const attachmentMessages = shouldExtractAttachments ? await toArray(getAttachmentMessages(inputString, context, ideSelection ?? null, [], messages, querySource)) : [];
1313
+ queryCheckpoint("query_attachment_loading_end");
1314
+ if (inputString !== null && mode === "bash") {
1315
+ const { processBashCommand } = await import("./chunk-6ebb5ym0.js");
1316
+ return addImageMetadataMessage(await processBashCommand(inputString, precedingInputBlocks, attachmentMessages, context, setToolJSX), imageMetadataTexts);
1317
+ }
1318
+ if (inputString !== null && !effectiveSkipSlash && inputString.startsWith("/")) {
1319
+ const { processSlashCommand } = await import("./chunk-718k4vsj.js");
1320
+ const slashResult = await processSlashCommand(inputString, precedingInputBlocks, imageContentBlocks, attachmentMessages, context, setToolJSX, uuid, isAlreadyProcessing, canUseTool);
1321
+ return addImageMetadataMessage(slashResult, imageMetadataTexts);
1322
+ }
1323
+ if (inputString !== null && mode === "prompt") {
1324
+ const trimmedInput = inputString.trim();
1325
+ const agentMention = attachmentMessages.find((m) => m.attachment.type === "agent_mention");
1326
+ if (agentMention) {
1327
+ const agentMentionString = `@agent-${agentMention.attachment.agentType}`;
1328
+ const isSubagentOnly = trimmedInput === agentMentionString;
1329
+ const isPrefix = trimmedInput.startsWith(agentMentionString) && !isSubagentOnly;
1330
+ logEvent("tengu_subagent_at_mention", {
1331
+ is_subagent_only: isSubagentOnly,
1332
+ is_prefix: isPrefix
1333
+ });
1334
+ }
1335
+ }
1336
+ return addImageMetadataMessage(processTextPrompt(normalizedInput, imageContentBlocks, imagePasteIds, attachmentMessages, uuid, permissionMode, isMeta), imageMetadataTexts);
1337
+ }
1338
+ function addImageMetadataMessage(result, imageMetadataTexts) {
1339
+ if (imageMetadataTexts.length > 0) {
1340
+ result.messages.push(createUserMessage({
1341
+ content: imageMetadataTexts.map((text) => ({ type: "text", text })),
1342
+ isMeta: true
1343
+ }));
1344
+ }
1345
+ return result;
1346
+ }
1347
+
1348
+ // src/utils/messages/systemInit.ts
1349
+ init_state();
1350
+ init_outputStyles();
1351
+ init_constants();
1352
+ init_auth();
1353
+ init_cwd();
1354
+ init_fastMode();
1355
+ init_settings();
1356
+ import { randomUUID as randomUUID4 } from "crypto";
1357
+ function sdkCompatToolName(name) {
1358
+ return name === AGENT_TOOL_NAME ? LEGACY_AGENT_TOOL_NAME : name;
1359
+ }
1360
+ function buildSystemInitMessage(inputs) {
1361
+ const settings = getSettings_DEPRECATED();
1362
+ const outputStyle = settings?.outputStyle ?? DEFAULT_OUTPUT_STYLE_NAME;
1363
+ const initMessage = {
1364
+ type: "system",
1365
+ subtype: "init",
1366
+ cwd: getCwd(),
1367
+ session_id: getSessionId(),
1368
+ tools: inputs.tools.map((tool) => sdkCompatToolName(tool.name)),
1369
+ mcp_servers: inputs.mcpClients.map((client) => ({
1370
+ name: client.name,
1371
+ status: client.type
1372
+ })),
1373
+ model: inputs.model,
1374
+ permissionMode: inputs.permissionMode,
1375
+ slash_commands: inputs.commands.filter((c) => c.userInvocable !== false).map((c) => c.name),
1376
+ apiKeySource: getAnthropicApiKeyWithSource().source,
1377
+ betas: getSdkBetas(),
1378
+ claude_code_version: "2.1.888",
1379
+ output_style: outputStyle,
1380
+ agents: inputs.agents.map((agent) => agent.agentType),
1381
+ skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
1382
+ plugins: inputs.plugins.map((plugin) => ({
1383
+ name: plugin.name,
1384
+ path: plugin.path,
1385
+ source: plugin.source
1386
+ })),
1387
+ uuid: randomUUID4()
1388
+ };
1389
+ if (false) {}
1390
+ initMessage.fast_mode_state = getFastModeState(inputs.model, inputs.fastMode);
1391
+ return initMessage;
1392
+ }
1393
+
1394
+ export { findUltraplanTriggerPositions, findUltrareviewTriggerPositions, processUserInput, sdkCompatToolName, buildSystemInitMessage, MessageSelector, selectableUserMessagesFilter, messagesAfterAreOnlySynthetic, exports_MessageSelector, init_MessageSelector };