claude-code-best 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/README.md +30 -29
  2. package/dist/{chunk-hph307n4.js → chunk-03v6skhg.js} +26 -26
  3. package/dist/{chunk-vank0acb.js → chunk-040fs3bs.js} +3 -3
  4. package/dist/chunk-04tm5tgb.js +129 -0
  5. package/dist/{chunk-ewfnr2kc.js → chunk-07t4kz2e.js} +63 -56
  6. package/dist/{chunk-dmsneaaq.js → chunk-0bmy4kjm.js} +1 -1
  7. package/dist/{chunk-07hme8g1.js → chunk-0j5m6c68.js} +3 -3
  8. package/dist/{chunk-8rvn67de.js → chunk-0rbwrjqk.js} +66 -59
  9. package/dist/{chunk-c0fka9kt.js → chunk-0rd853rs.js} +63 -56
  10. package/dist/{chunk-ec9bfefg.js → chunk-0rjgkz6a.js} +3 -3
  11. package/dist/{chunk-t3jsc3b4.js → chunk-0rjxhydk.js} +65 -58
  12. package/dist/{chunk-k3h49w53.js → chunk-0s5rp3xp.js} +2 -2
  13. package/dist/{chunk-bgc5qnd6.js → chunk-0sz4ykc8.js} +19 -12
  14. package/dist/chunk-0v61f8bw.js +28 -0
  15. package/dist/{chunk-8wn7137w.js → chunk-0xbnw7e9.js} +2 -2
  16. package/dist/{chunk-26naqvnf.js → chunk-11q4j70f.js} +5 -5
  17. package/dist/{chunk-6b6pv595.js → chunk-12yhesm9.js} +2 -2
  18. package/dist/chunk-19sabysw.js +122 -0
  19. package/dist/{chunk-qszmebqw.js → chunk-1bn94cge.js} +2 -2
  20. package/dist/chunk-1cmzf5f7.js +37 -0
  21. package/dist/{chunk-za24x8e6.js → chunk-1dh9y2g9.js} +306 -151
  22. package/dist/{chunk-ns5ckn0j.js → chunk-1fexraxj.js} +1 -1
  23. package/dist/{chunk-r87w8r5v.js → chunk-1mrw14pd.js} +7 -7
  24. package/dist/chunk-1qzt23et.js +8 -0
  25. package/dist/chunk-1z9bmera.js +8 -0
  26. package/dist/{chunk-20tkh843.js → chunk-221qh3ba.js} +63 -56
  27. package/dist/{chunk-x4azk52n.js → chunk-2501y0qn.js} +21 -21
  28. package/dist/{chunk-tkwtc12m.js → chunk-26bxxwf6.js} +4 -4
  29. package/dist/{chunk-jwa7qf81.js → chunk-27hsrkpd.js} +4 -4
  30. package/dist/{chunk-ab8ddz4h.js → chunk-2by46aay.js} +9 -9
  31. package/dist/{chunk-jgdm5p7t.js → chunk-2cyjtt9z.js} +2 -2
  32. package/dist/{chunk-enq2chfq.js → chunk-2e6jz0ej.js} +3 -3
  33. package/dist/{chunk-7vp42apg.js → chunk-2nvs8639.js} +64 -57
  34. package/dist/{chunk-n9p0ss91.js → chunk-2pr8dmkw.js} +1565 -749
  35. package/dist/{chunk-yspxy3e8.js → chunk-2q1gcvk9.js} +10 -10
  36. package/dist/{chunk-0y082g7m.js → chunk-2q7ww4pa.js} +42 -42
  37. package/dist/chunk-2qg5ewk3.js +207 -0
  38. package/dist/chunk-2t26mfb1.js +80 -0
  39. package/dist/{chunk-x916qx2c.js → chunk-2wa6knad.js} +64 -57
  40. package/dist/chunk-2xcczxbp.js +128 -0
  41. package/dist/{chunk-y3f0q1yz.js → chunk-2y22jqr5.js} +9 -9
  42. package/dist/chunk-37c07frr.js +94 -0
  43. package/dist/{chunk-2f1k60ye.js → chunk-399dvtfq.js} +159 -59
  44. package/dist/chunk-3f8xw8t7.js +26 -0
  45. package/dist/{chunk-wm3yj6z2.js → chunk-3g9nhh30.js} +2 -2
  46. package/dist/chunk-3gbmfs3p.js +140 -0
  47. package/dist/{chunk-nwg30c8d.js → chunk-3gttavbe.js} +34 -44
  48. package/dist/chunk-3pk2fc73.js +514 -0
  49. package/dist/{chunk-p90f2nc9.js → chunk-3sag2vww.js} +20 -20
  50. package/dist/{chunk-7v0fvjcw.js → chunk-3skmxk2y.js} +63 -56
  51. package/dist/{chunk-caey4y8f.js → chunk-3t4w9ysv.js} +11 -11
  52. package/dist/{chunk-c81hswwd.js → chunk-3wt9ytsw.js} +6 -6
  53. package/dist/{chunk-03geymck.js → chunk-3ymerb20.js} +64 -57
  54. package/dist/{chunk-r4v9t688.js → chunk-3z4dcst0.js} +22 -22
  55. package/dist/{chunk-krrxrzr4.js → chunk-40n35nr8.js} +63 -56
  56. package/dist/{chunk-7d11053z.js → chunk-42176dsb.js} +2 -2
  57. package/dist/{chunk-z3q0mr1s.js → chunk-434mgf3p.js} +63 -56
  58. package/dist/{chunk-cfxan8nc.js → chunk-48ef3q17.js} +65 -58
  59. package/dist/{chunk-7rzk7d37.js → chunk-4c843krn.js} +25 -9
  60. package/dist/chunk-4f3pde4x.js +583 -0
  61. package/dist/{chunk-s17095ng.js → chunk-4h87abvn.js} +22 -22
  62. package/dist/chunk-4k37jfk7.js +342 -0
  63. package/dist/{chunk-brjsspt6.js → chunk-4qzt1dqf.js} +21 -21
  64. package/dist/{chunk-sckpstmv.js → chunk-5175g5we.js} +64 -57
  65. package/dist/{chunk-x9w1bv4a.js → chunk-59m2hkn3.js} +5 -5
  66. package/dist/{chunk-4bkr7cdb.js → chunk-5k004pfz.js} +21 -21
  67. package/dist/chunk-5q9cm9at.js +195 -0
  68. package/dist/{chunk-b3v7tk69.js → chunk-5w9eevss.js} +1 -1
  69. package/dist/{chunk-t5ywz5f9.js → chunk-5wsx54ya.js} +66 -59
  70. package/dist/{chunk-4fghnb4h.js → chunk-64m2p0fr.js} +1 -1
  71. package/dist/{chunk-05dy61pz.js → chunk-67f16jpf.js} +14 -25
  72. package/dist/chunk-6c6kdarp.js +226 -0
  73. package/dist/{chunk-jkpnx6d7.js → chunk-6f8rdjpr.js} +2 -2
  74. package/dist/{chunk-rf16rpg8.js → chunk-6h2zne6a.js} +14 -8
  75. package/dist/{chunk-qgvhan2t.js → chunk-6mb3gprt.js} +63 -56
  76. package/dist/chunk-6phbkzpx.js +347 -0
  77. package/dist/{chunk-mp9vfdcd.js → chunk-6q7v03rd.js} +1 -1
  78. package/dist/{chunk-sbzpht0c.js → chunk-6veqdcnr.js} +1 -1
  79. package/dist/{chunk-7bsrkxhf.js → chunk-6xnyvynx.js} +63 -56
  80. package/dist/{chunk-8atss5rz.js → chunk-70ftrmj8.js} +7 -7
  81. package/dist/{chunk-2baftj07.js → chunk-73bv553k.js} +71 -64
  82. package/dist/{chunk-x9jtstht.js → chunk-73yp3q0h.js} +18 -16
  83. package/dist/{chunk-1kq0x8dz.js → chunk-75hd7k1p.js} +14 -10
  84. package/dist/{chunk-pzrjj7h0.js → chunk-79bf1qvf.js} +5 -5
  85. package/dist/{chunk-pm491jb5.js → chunk-7at6y3z2.js} +3 -3
  86. package/dist/chunk-7dv9n7ge.js +91 -0
  87. package/dist/{chunk-47jk53ef.js → chunk-7f2k1ddn.js} +2 -2
  88. package/dist/{chunk-3y5jpqdf.js → chunk-7j7fbmf2.js} +8 -8
  89. package/dist/{chunk-wgcj2cgs.js → chunk-7jx306p8.js} +20 -20
  90. package/dist/{chunk-fgs4axa8.js → chunk-7mer0e9z.js} +20 -20
  91. package/dist/{chunk-yancgz33.js → chunk-7napdtem.js} +22 -22
  92. package/dist/{chunk-hzam3v9n.js → chunk-816j64jc.js} +5 -5
  93. package/dist/{chunk-dvw8byhq.js → chunk-8450evyk.js} +1 -1
  94. package/dist/{chunk-9f3x4r07.js → chunk-899vev03.js} +6 -6
  95. package/dist/{chunk-5e8w9mhp.js → chunk-8ktgxh4r.js} +5 -5
  96. package/dist/{chunk-6as82hge.js → chunk-8kzqyyjd.js} +1 -1
  97. package/dist/{chunk-ebhvnagj.js → chunk-8qraqb46.js} +2 -2
  98. package/dist/{chunk-h7cp4wy3.js → chunk-8rpvgrmr.js} +64 -57
  99. package/dist/{chunk-awhw6wp5.js → chunk-8scfbgn7.js} +137 -92
  100. package/dist/chunk-8vwc039q.js +94 -0
  101. package/dist/{chunk-8qrr3jhc.js → chunk-906fcbs0.js} +10 -10
  102. package/dist/{chunk-r6hgmetw.js → chunk-91xvmecy.js} +20 -20
  103. package/dist/{chunk-j65n711w.js → chunk-94w3b0ds.js} +3 -3
  104. package/dist/{chunk-temejnge.js → chunk-968vbp44.js} +4 -4
  105. package/dist/chunk-98n19k9z.js +136 -0
  106. package/dist/chunk-99qkqkb3.js +126 -0
  107. package/dist/{chunk-vyhzvqzc.js → chunk-9b41k3g2.js} +4 -4
  108. package/dist/{chunk-y6jp6ajk.js → chunk-9cg1cswh.js} +64 -57
  109. package/dist/{chunk-24dgse44.js → chunk-9d7dhwhn.js} +3 -3
  110. package/dist/chunk-9h87btmg.js +123 -0
  111. package/dist/{chunk-5gvt170a.js → chunk-9mvk4gyw.js} +1 -1
  112. package/dist/{chunk-3x9ewb0c.js → chunk-9nqj2261.js} +2 -2
  113. package/dist/{chunk-mt1zbwpm.js → chunk-9q44k0j3.js} +21 -21
  114. package/dist/{chunk-vn6fxqtx.js → chunk-9qa0wks3.js} +64 -57
  115. package/dist/chunk-9qfgk3ey.js +203 -0
  116. package/dist/{chunk-svkdak63.js → chunk-9s6wjjgc.js} +6 -6
  117. package/dist/{chunk-3rdscn7v.js → chunk-9sezj2s0.js} +10 -10
  118. package/dist/chunk-9sq8hkpk.js +8 -0
  119. package/dist/{chunk-pstn17ps.js → chunk-9txcrk0d.js} +69 -62
  120. package/dist/{chunk-pzzr97ff.js → chunk-9w4zt45w.js} +22 -22
  121. package/dist/{chunk-jvq0h0fq.js → chunk-9wm27ekn.js} +3 -3
  122. package/dist/{chunk-2x9v6ryw.js → chunk-9z8x61ch.js} +5 -3
  123. package/dist/{chunk-e1awvmbq.js → chunk-a0kvb5h1.js} +6 -6
  124. package/dist/{chunk-zzwvnewd.js → chunk-a1gr9gv9.js} +11 -11
  125. package/dist/{chunk-7w71dt0w.js → chunk-a2yz9sk4.js} +19 -4
  126. package/dist/{chunk-kh3eed6x.js → chunk-a6a879pe.js} +6 -6
  127. package/dist/{chunk-h724wqmb.js → chunk-a8ea1qyx.js} +63 -56
  128. package/dist/chunk-ab9h55e7.js +27 -0
  129. package/dist/{chunk-m2akjkdt.js → chunk-abcmnpw1.js} +6118 -2774
  130. package/dist/{chunk-rqf8xzbe.js → chunk-acad1ptb.js} +1 -1
  131. package/dist/chunk-aggcq5pt.js +13 -0
  132. package/dist/{chunk-tqgr4vfr.js → chunk-apefr3y8.js} +32 -32
  133. package/dist/{chunk-8g20wmye.js → chunk-argtwy1f.js} +5 -5
  134. package/dist/{chunk-evqj01ne.js → chunk-as6qggjr.js} +66 -59
  135. package/dist/{chunk-rfk6dz01.js → chunk-avv2r6q3.js} +6 -6
  136. package/dist/{chunk-v0bnnvkk.js → chunk-awxdzm87.js} +63 -56
  137. package/dist/chunk-azs4mq8s.js +185 -0
  138. package/dist/{chunk-8axk7tcz.js → chunk-b1tg76s0.js} +26 -26
  139. package/dist/chunk-b2meyyfn.js +126 -0
  140. package/dist/{chunk-6g935wma.js → chunk-b34nmtsh.js} +3 -3
  141. package/dist/chunk-b52gqznc.js +41 -0
  142. package/dist/{chunk-jejc5yrq.js → chunk-b607fyhm.js} +21 -21
  143. package/dist/{chunk-05qw4srn.js → chunk-bbnnxn7n.js} +63 -56
  144. package/dist/{chunk-1aaad6af.js → chunk-bc7vdtyx.js} +2 -2
  145. package/dist/{chunk-pj7pgttc.js → chunk-bd8h3bdx.js} +63 -56
  146. package/dist/{chunk-stfjvnbc.js → chunk-bedpg2b2.js} +19 -96
  147. package/dist/{chunk-zzn4hdgx.js → chunk-bftqj0aq.js} +64 -57
  148. package/dist/{chunk-17h7bnca.js → chunk-bn35xrzj.js} +7 -7
  149. package/dist/{chunk-tegg6r4t.js → chunk-bn99g0q6.js} +1 -1
  150. package/dist/{chunk-3hvpadv2.js → chunk-bqt5ykf8.js} +21 -21
  151. package/dist/{chunk-954x38qh.js → chunk-bvr12bqd.js} +3 -3
  152. package/dist/chunk-c12prd7j.js +127 -0
  153. package/dist/{chunk-ck7414y9.js → chunk-c14fx8xd.js} +63 -56
  154. package/dist/{chunk-v292vhrx.js → chunk-c26ntdxv.js} +5 -5
  155. package/dist/chunk-c2tvdak4.js +358 -0
  156. package/dist/chunk-c5mmqz6b.js +128 -0
  157. package/dist/chunk-cbd6s6et.js +9 -0
  158. package/dist/{chunk-vx7zv6zh.js → chunk-cfken2zf.js} +23 -23
  159. package/dist/chunk-cgzktn8a.js +395 -0
  160. package/dist/{chunk-1dhedd9z.js → chunk-ch9wpxam.js} +1 -1
  161. package/dist/{chunk-scphhw12.js → chunk-ck4dd7vx.js} +63 -56
  162. package/dist/{chunk-fnm8y1x0.js → chunk-cpzppa0f.js} +63 -56
  163. package/dist/chunk-crchz5q8.js +13 -0
  164. package/dist/{chunk-f5gd73ce.js → chunk-cs8wascn.js} +71 -64
  165. package/dist/chunk-cxscz76t.js +66 -0
  166. package/dist/{chunk-01nytp91.js → chunk-d31ye749.js} +68 -61
  167. package/dist/{chunk-6d0241ac.js → chunk-d47prfzj.js} +1 -1
  168. package/dist/{chunk-ambd2vf1.js → chunk-dawa9vdn.js} +7 -7
  169. package/dist/{chunk-abay4sak.js → chunk-dh52jprq.js} +2 -2
  170. package/dist/{chunk-4dxhrqgq.js → chunk-dj6r3bps.js} +78 -71
  171. package/dist/{chunk-gs1a03e2.js → chunk-djf6xgmk.js} +22 -22
  172. package/dist/chunk-drmhxxar.js +300 -0
  173. package/dist/{chunk-8eg4phfy.js → chunk-dsk2j7pz.js} +1 -1
  174. package/dist/{chunk-dgx7p003.js → chunk-dtk2406w.js} +63 -56
  175. package/dist/{chunk-z9fjyp10.js → chunk-dxdkze8z.js} +15 -14
  176. package/dist/{chunk-vfdax1q6.js → chunk-e2spk4fe.js} +2 -2
  177. package/dist/{chunk-bt94xn5q.js → chunk-e39hng3w.js} +1 -1
  178. package/dist/{chunk-2bn3rfrp.js → chunk-e4c9nm5e.js} +1 -1
  179. package/dist/{chunk-qkvakhx1.js → chunk-e732zxst.js} +20 -20
  180. package/dist/{chunk-a6aj70ts.js → chunk-e80zc1av.js} +8 -8
  181. package/dist/{chunk-a9576ng3.js → chunk-e8fna1ag.js} +65 -58
  182. package/dist/{chunk-8xa1kfya.js → chunk-ed7z1w7p.js} +10 -10
  183. package/dist/chunk-edqtm6y0.js +61 -0
  184. package/dist/chunk-ee1b0rvz.js +10 -0
  185. package/dist/{chunk-ns0rmh2k.js → chunk-emm7j4dk.js} +5 -5
  186. package/dist/{chunk-r0qx6xgc.js → chunk-enqry8t5.js} +9 -7
  187. package/dist/{chunk-yfmhhwwv.js → chunk-epznxrz2.js} +12 -12
  188. package/dist/{chunk-g99ezjcy.js → chunk-eq23h0x8.js} +22 -22
  189. package/dist/chunk-ermsg80f.js +127 -0
  190. package/dist/{chunk-nxfhyxc3.js → chunk-erszn6r3.js} +4 -4
  191. package/dist/chunk-ewmc9tav.js +128 -0
  192. package/dist/{chunk-9bmbzk2f.js → chunk-ezkmsnpd.js} +8 -8
  193. package/dist/chunk-f054mssm.js +12 -0
  194. package/dist/{chunk-r95z8zvj.js → chunk-f19hg379.js} +21 -21
  195. package/dist/{chunk-c25j8jpy.js → chunk-f2anq8fp.js} +3 -3
  196. package/dist/{chunk-bp5dhef8.js → chunk-f2k7vxg3.js} +10 -10
  197. package/dist/{chunk-9bp8584t.js → chunk-f8bpjk0x.js} +4 -4
  198. package/dist/{chunk-0s98x7qr.js → chunk-f98xrwe6.js} +63 -56
  199. package/dist/{chunk-v25hrcrp.js → chunk-fbx3sd2f.js} +72 -65
  200. package/dist/{chunk-rhfz4rps.js → chunk-fgzywhh2.js} +5 -5
  201. package/dist/{chunk-v50v1jf1.js → chunk-fjeaknmt.js} +21 -21
  202. package/dist/chunk-fjs4cp8b.js +155 -0
  203. package/dist/{chunk-zs52hzg8.js → chunk-fxtm8zfx.js} +21 -21
  204. package/dist/{chunk-54yfbyzj.js → chunk-fynce2x1.js} +73 -66
  205. package/dist/{chunk-by6f5f3f.js → chunk-g1fmphn5.js} +1 -1
  206. package/dist/{chunk-2qnmyxpy.js → chunk-g4jdxw9z.js} +8 -8
  207. package/dist/{chunk-kw10fbe0.js → chunk-g5fyyzw4.js} +5 -5
  208. package/dist/{chunk-xrcw33a6.js → chunk-g5snnfpz.js} +4 -4
  209. package/dist/chunk-g6ywkjpj.js +329 -0
  210. package/dist/chunk-gc3k4c71.js +120 -0
  211. package/dist/{chunk-av4xr370.js → chunk-gdrmj2pf.js} +24 -24
  212. package/dist/{chunk-4kx5dzdv.js → chunk-gxndbg0a.js} +1 -1
  213. package/dist/{chunk-27831wht.js → chunk-gz475s6y.js} +63 -56
  214. package/dist/{chunk-x8zkjhy7.js → chunk-gzvzgq26.js} +439 -176
  215. package/dist/{chunk-53dgvm3n.js → chunk-h0njsaxa.js} +8 -31
  216. package/dist/{chunk-nha86vac.js → chunk-h10sdaft.js} +64 -57
  217. package/dist/{chunk-eg0tc9yh.js → chunk-h4cqgnfp.js} +3 -3
  218. package/dist/{chunk-s67f3vd9.js → chunk-h5rhq3n7.js} +76 -59
  219. package/dist/{chunk-m1tjr9xq.js → chunk-h6pgm1qp.js} +1 -1
  220. package/dist/chunk-hewjtf7t.js +132 -0
  221. package/dist/{chunk-63aa365z.js → chunk-hfdnqzhf.js} +8 -8
  222. package/dist/{chunk-f4dvpkzw.js → chunk-hhd42y3a.js} +1 -1
  223. package/dist/{chunk-gvf59kpk.js → chunk-hmw06fge.js} +63 -56
  224. package/dist/{chunk-n0vth4gp.js → chunk-hprabxne.js} +1 -1
  225. package/dist/{chunk-nxdnby53.js → chunk-hstsssnj.js} +2 -2
  226. package/dist/chunk-j13svjky.js +158 -0
  227. package/dist/{chunk-vj7ngjnf.js → chunk-j2x5124d.js} +20 -20
  228. package/dist/chunk-j3k55b0k.js +212 -0
  229. package/dist/{chunk-7neqf4fa.js → chunk-j71hj7yz.js} +71 -64
  230. package/dist/{chunk-3wpgtpw3.js → chunk-j7dxyxhv.js} +63 -56
  231. package/dist/{chunk-pdy0cbps.js → chunk-j7xbftdd.js} +5 -5
  232. package/dist/{chunk-7wncxt8v.js → chunk-jars2pn8.js} +63 -56
  233. package/dist/{chunk-ex16f66z.js → chunk-je44d8pc.js} +64 -57
  234. package/dist/{chunk-y744f40h.js → chunk-jgyee51y.js} +64 -57
  235. package/dist/{chunk-2q0frcxq.js → chunk-jk6e2bjt.js} +66 -59
  236. package/dist/chunk-jkcqv906.js +128 -0
  237. package/dist/{chunk-4pkgv0q4.js → chunk-jrkdr66k.js} +64 -57
  238. package/dist/{chunk-v5m176px.js → chunk-jxvms2k5.js} +64 -57
  239. package/dist/{chunk-y8gcjqaj.js → chunk-jzjdkfvb.js} +21 -21
  240. package/dist/{chunk-fry0p30d.js → chunk-k1809z0z.js} +4 -4
  241. package/dist/{chunk-n5r7zefs.js → chunk-k2qry3j2.js} +3 -3
  242. package/dist/{chunk-gbm9xcsb.js → chunk-kaxc456a.js} +4 -4
  243. package/dist/{chunk-xq5m3waj.js → chunk-kh0tbb1f.js} +10 -10
  244. package/dist/{chunk-4w14tqd3.js → chunk-km555nmz.js} +2 -2
  245. package/dist/{chunk-0kce2wqf.js → chunk-kmaj89bz.js} +64 -57
  246. package/dist/chunk-ktvcgnpw.js +46 -0
  247. package/dist/{chunk-zcg5wkge.js → chunk-kty5fqkx.js} +4 -4
  248. package/dist/{chunk-vwmpfzsk.js → chunk-kywppkmb.js} +71 -64
  249. package/dist/chunk-kzj2w83g.js +325 -0
  250. package/dist/{chunk-qe3qr56q.js → chunk-m0avdb0h.js} +1 -1
  251. package/dist/chunk-m0zh7g06.js +13 -0
  252. package/dist/{chunk-b9sss8kt.js → chunk-m1gvrag8.js} +64 -57
  253. package/dist/{chunk-5n5wyzrh.js → chunk-m2r25bw1.js} +4 -4
  254. package/dist/{chunk-5xg0d983.js → chunk-m2rv6qz8.js} +20 -20
  255. package/dist/{chunk-0a04ntky.js → chunk-m3rvjxa4.js} +1 -1
  256. package/dist/{chunk-21mz4040.js → chunk-m48b7sj9.js} +1 -1
  257. package/dist/{chunk-bpww9jrc.js → chunk-m7w3r8n8.js} +63 -56
  258. package/dist/{chunk-dgmtm4rb.js → chunk-mbvn8gy2.js} +65 -58
  259. package/dist/chunk-mdnqgywy.js +32 -0
  260. package/dist/{chunk-834b4cwr.js → chunk-mdnt1rvx.js} +63 -56
  261. package/dist/chunk-mepq00y1.js +337 -0
  262. package/dist/chunk-mfhds0dp.js +415 -0
  263. package/dist/{chunk-zr8jx1me.js → chunk-mja6394w.js} +9 -9
  264. package/dist/{chunk-tq51n13h.js → chunk-mrp3wcy6.js} +63 -56
  265. package/dist/{chunk-53atcfc2.js → chunk-mxx4msjb.js} +63 -56
  266. package/dist/chunk-n014czx3.js +15 -0
  267. package/dist/{chunk-bn09p6rp.js → chunk-n0pqx4rz.js} +6 -6
  268. package/dist/chunk-n3gzjpvg.js +8 -0
  269. package/dist/{chunk-fmmhgjh2.js → chunk-n4h54170.js} +63 -56
  270. package/dist/{chunk-dqrma4xg.js → chunk-n5by3h0t.js} +76 -69
  271. package/dist/chunk-na5yxjbp.js +133 -0
  272. package/dist/{chunk-vvj9yfd6.js → chunk-nb32de90.js} +4 -4
  273. package/dist/{chunk-qd98rbkk.js → chunk-ndgftsr1.js} +1 -1
  274. package/dist/{chunk-nxffmvqq.js → chunk-nez23dsn.js} +28 -28
  275. package/dist/{chunk-n4pdrqfe.js → chunk-nj1wee9b.js} +21 -21
  276. package/dist/{chunk-6383ssyr.js → chunk-nkn6kceq.js} +4 -4
  277. package/dist/{chunk-36ah0k4v.js → chunk-nnhq3697.js} +64 -57
  278. package/dist/chunk-nntvxnk2.js +340 -0
  279. package/dist/chunk-nq0kyezp.js +433 -0
  280. package/dist/chunk-nrwhfe5y.js +105 -0
  281. package/dist/{chunk-81cq3ykn.js → chunk-nt7b1z5t.js} +1 -1
  282. package/dist/{chunk-vyxrqq2j.js → chunk-ntdnzp2z.js} +2 -2
  283. package/dist/{chunk-d86k6nna.js → chunk-ntr44dvp.js} +74 -67
  284. package/dist/chunk-nyq4jqm1.js +243 -0
  285. package/dist/{chunk-xxxpcn1s.js → chunk-p3g3f2ee.js} +84 -56
  286. package/dist/{chunk-2k162dz0.js → chunk-p5q62vjn.js} +64 -57
  287. package/dist/{chunk-ncyvjn2t.js → chunk-p8xpvkpy.js} +66 -59
  288. package/dist/{chunk-csye4xzg.js → chunk-pmn7jtsg.js} +63 -56
  289. package/dist/chunk-pr5a5xz1.js +124 -0
  290. package/dist/chunk-q2aas6kq.js +84 -0
  291. package/dist/{chunk-xm7k6jjc.js → chunk-q2dp7byy.js} +21 -21
  292. package/dist/{chunk-96kvtp4a.js → chunk-q48y3fcp.js} +63 -56
  293. package/dist/{chunk-kegv11w9.js → chunk-q9ekcqx7.js} +3 -3
  294. package/dist/chunk-qazvrdfx.js +8 -0
  295. package/dist/{chunk-mmtadzv4.js → chunk-qb9gk8qg.js} +3 -3
  296. package/dist/{chunk-6fffsyn1.js → chunk-qftvk54y.js} +2 -2
  297. package/dist/{chunk-xpsbj53r.js → chunk-qpsmedbj.js} +64 -57
  298. package/dist/{chunk-xne41nbg.js → chunk-qqvksktb.js} +68 -61
  299. package/dist/{chunk-14x4cnsh.js → chunk-qvmhwtbg.js} +2 -2
  300. package/dist/{chunk-gygm08n5.js → chunk-qvr1mfc2.js} +3 -3
  301. package/dist/{chunk-snkw3ez3.js → chunk-qxbjdz91.js} +69 -62
  302. package/dist/{chunk-hnwtdfn5.js → chunk-qz8h7c7e.js} +63 -56
  303. package/dist/{chunk-byxmnqrn.js → chunk-r446v6sq.js} +63 -56
  304. package/dist/{chunk-j9zd0zgk.js → chunk-r5657hwh.js} +6 -6
  305. package/dist/{chunk-cbb17erf.js → chunk-r98v6fmq.js} +2 -2
  306. package/dist/{chunk-v7kbh63p.js → chunk-ratjpqg8.js} +4 -4
  307. package/dist/{chunk-5r3s9p8x.js → chunk-rcqxbkjs.js} +22 -22
  308. package/dist/{chunk-ctr3c1sg.js → chunk-rcz0e093.js} +2 -2
  309. package/dist/{chunk-vmxyzqbq.js → chunk-rdbr0mc5.js} +3 -3
  310. package/dist/chunk-rebyeaz6.js +226 -0
  311. package/dist/{chunk-mdp7t6vc.js → chunk-rfn63r2s.js} +63 -56
  312. package/dist/chunk-rhjvcccz.js +196 -0
  313. package/dist/chunk-rq3fz6cv.js +125 -0
  314. package/dist/chunk-rqb52zr0.js +273 -0
  315. package/dist/{chunk-9mhk46zc.js → chunk-rramscv8.js} +65 -58
  316. package/dist/{chunk-7yazhrsr.js → chunk-rveecpyh.js} +13 -18
  317. package/dist/{chunk-8e7f9zht.js → chunk-s3nkbr4p.js} +6 -6
  318. package/dist/{chunk-mt5d325t.js → chunk-s4pvw5c2.js} +63 -56
  319. package/dist/{chunk-91aqhy8m.js → chunk-s55ghchb.js} +23 -23
  320. package/dist/{chunk-xfffg80w.js → chunk-s5wv4tve.js} +69 -62
  321. package/dist/{chunk-p4ejm62w.js → chunk-sadtb3z5.js} +63 -56
  322. package/dist/{chunk-kz1tx7rz.js → chunk-sc2j6qsx.js} +64 -57
  323. package/dist/{chunk-b0yyp8et.js → chunk-sd3b922y.js} +41 -5
  324. package/dist/{chunk-sa4v49yg.js → chunk-sdcwxxk6.js} +5 -5
  325. package/dist/chunk-sggasjjn.js +126 -0
  326. package/dist/{chunk-2v5ts0xs.js → chunk-sgnff472.js} +6 -6
  327. package/dist/chunk-sje53cwz.js +160 -0
  328. package/dist/{chunk-2d5783fd.js → chunk-sjhn7p5w.js} +9 -9
  329. package/dist/{chunk-7hqaeswx.js → chunk-skhb9mm3.js} +47 -47
  330. package/dist/chunk-smh1p2qy.js +138 -0
  331. package/dist/chunk-smp65jya.js +152 -0
  332. package/dist/{chunk-c5x53d8e.js → chunk-ss0vfwwq.js} +21 -21
  333. package/dist/chunk-ssxnpnp2.js +185 -0
  334. package/dist/{chunk-q4g44zhy.js → chunk-stvp7mm8.js} +67 -60
  335. package/dist/{chunk-cr287xgs.js → chunk-swasj01d.js} +22 -22
  336. package/dist/{chunk-4wvqsj82.js → chunk-sxkyxfc7.js} +1 -1
  337. package/dist/chunk-t27st4f6.js +11 -0
  338. package/dist/{chunk-h0jkyyzh.js → chunk-t33p3qh3.js} +2 -2
  339. package/dist/{chunk-sqr28nxr.js → chunk-t5am82j3.js} +21 -21
  340. package/dist/{chunk-650dg84f.js → chunk-t688crr3.js} +3 -3
  341. package/dist/chunk-t719e8eh.js +124 -0
  342. package/dist/{chunk-1g7vd9aw.js → chunk-tamranmv.js} +4 -4
  343. package/dist/chunk-tbh4w7g6.js +37 -0
  344. package/dist/{chunk-w6qq17bh.js → chunk-td06pg4k.js} +63 -56
  345. package/dist/{chunk-jv6b8825.js → chunk-tepcfjv9.js} +64 -57
  346. package/dist/{chunk-nfzczzpa.js → chunk-tgtshatc.js} +3 -3
  347. package/dist/{chunk-jyh5er8z.js → chunk-tm5bfdg7.js} +15 -15
  348. package/dist/{chunk-zwmrhef7.js → chunk-tngbfggd.js} +1 -1
  349. package/dist/{chunk-vrbvz6r8.js → chunk-tw9bcrhb.js} +1 -1
  350. package/dist/chunk-twea87k4.js +126 -0
  351. package/dist/{chunk-jw9r1vhk.js → chunk-tzed1ttg.js} +2 -2
  352. package/dist/{chunk-kzws79kx.js → chunk-v077s2dh.js} +63 -56
  353. package/dist/{chunk-ye565wnz.js → chunk-v07sn7tg.js} +4 -4
  354. package/dist/{chunk-0k1jmtw9.js → chunk-v5j77ftw.js} +2 -2
  355. package/dist/{chunk-f8jqr9gf.js → chunk-v70rt7ew.js} +63 -56
  356. package/dist/{chunk-sdw97qke.js → chunk-v7e85mv1.js} +20 -20
  357. package/dist/{chunk-h6xd4mkp.js → chunk-v83yjxgx.js} +4 -4
  358. package/dist/{chunk-r61twape.js → chunk-v8ak17j1.js} +107 -335
  359. package/dist/{chunk-0w5zb7ey.js → chunk-v91nx80s.js} +22 -22
  360. package/dist/{chunk-e41z7j8n.js → chunk-v9qatj12.js} +6 -6
  361. package/dist/{chunk-r9mvmqa3.js → chunk-vaq7mmkt.js} +63 -56
  362. package/dist/{chunk-438syzcr.js → chunk-vekca08b.js} +11 -11
  363. package/dist/{chunk-6rxwptex.js → chunk-vg98anv2.js} +1 -1
  364. package/dist/{chunk-ja87byad.js → chunk-vjy07dp5.js} +72 -65
  365. package/dist/{chunk-q90p1xq1.js → chunk-vp20ty7y.js} +1 -1
  366. package/dist/{chunk-9d00ms93.js → chunk-vpt9jxht.js} +3 -3
  367. package/dist/{chunk-b343wb80.js → chunk-vvsd3vs8.js} +63 -56
  368. package/dist/chunk-vxgc30h6.js +19 -0
  369. package/dist/{chunk-e3ddewwa.js → chunk-vxzmjwjs.js} +63 -56
  370. package/dist/{chunk-36qqb2zz.js → chunk-w6jz347g.js} +63 -56
  371. package/dist/{chunk-0nh980p8.js → chunk-w710jpa2.js} +2 -2
  372. package/dist/{chunk-paycanhw.js → chunk-w7ej2zrf.js} +2 -2
  373. package/dist/{chunk-vjdmt4qp.js → chunk-warzed1x.js} +22 -22
  374. package/dist/{chunk-edk6reza.js → chunk-wb2sg18w.js} +2 -2
  375. package/dist/{chunk-4qd05az9.js → chunk-we1n5raj.js} +7 -7
  376. package/dist/chunk-wf3yck87.js +21 -0
  377. package/dist/{chunk-etym3r9d.js → chunk-wf8acset.js} +3 -3
  378. package/dist/{chunk-2q0zzmty.js → chunk-wghswqwp.js} +27 -27
  379. package/dist/{chunk-gzp6rza1.js → chunk-wmgyt01k.js} +216 -1
  380. package/dist/chunk-wmh6v3e7.js +132 -0
  381. package/dist/chunk-wmpmafbc.js +138 -0
  382. package/dist/{chunk-1sf59qt5.js → chunk-wnf4vwkm.js} +64 -57
  383. package/dist/{chunk-ynv1bpe8.js → chunk-wt20bb12.js} +22 -22
  384. package/dist/{chunk-ap8sbteg.js → chunk-ww3p4y9a.js} +20 -12
  385. package/dist/{chunk-03r5j0h7.js → chunk-x1zesdka.js} +6 -6
  386. package/dist/{chunk-wx6n79wt.js → chunk-x313wqn1.js} +1 -1
  387. package/dist/{chunk-hy4eg9rh.js → chunk-x4xsq1s2.js} +2 -2
  388. package/dist/{chunk-9b6rk8qk.js → chunk-x5r688hj.js} +4 -4
  389. package/dist/chunk-x6f0ext2.js +514 -0
  390. package/dist/chunk-x6pa9me9.js +39 -0
  391. package/dist/{chunk-w4efvhba.js → chunk-xbaknws2.js} +3 -3
  392. package/dist/{chunk-xpwd9a6t.js → chunk-xhf4qr1n.js} +7 -7
  393. package/dist/{chunk-0c1px70b.js → chunk-xjbajnc0.js} +64 -57
  394. package/dist/chunk-xjccz51k.js +129 -0
  395. package/dist/{chunk-4djqhsnj.js → chunk-xk0tvbw1.js} +2 -2
  396. package/dist/{chunk-4h8wztdg.js → chunk-xqjc4jt5.js} +64 -57
  397. package/dist/{chunk-rm1mheme.js → chunk-xsdh0nhd.js} +9 -9
  398. package/dist/{chunk-4r4gn0cf.js → chunk-xsmg4rrh.js} +4 -4
  399. package/dist/chunk-y5tdbxz4.js +127 -0
  400. package/dist/{chunk-hdwtr2yf.js → chunk-y8pkn3xy.js} +5 -5
  401. package/dist/chunk-yashkw24.js +372 -0
  402. package/dist/{chunk-fta35khb.js → chunk-yezeptjf.js} +11 -11
  403. package/dist/{chunk-hr3btr8b.js → chunk-yhb095v3.js} +3 -3
  404. package/dist/{chunk-zhvtmajx.js → chunk-ynqybr2d.js} +64 -57
  405. package/dist/{chunk-pqerscs4.js → chunk-yrbx096r.js} +5 -5
  406. package/dist/{chunk-1b80pdn0.js → chunk-ytp8h1aw.js} +70 -60
  407. package/dist/{chunk-fzzjx191.js → chunk-ywf3v9s7.js} +1 -1
  408. package/dist/{chunk-v1k15ae4.js → chunk-yz7f0ahp.js} +1 -1
  409. package/dist/{chunk-n3w4a8jc.js → chunk-z1wsxdyq.js} +4 -4
  410. package/dist/{chunk-bvnbzqq1.js → chunk-z4phzs0c.js} +63 -56
  411. package/dist/{chunk-e8cewnpa.js → chunk-z5nfm6fz.js} +71 -64
  412. package/dist/{chunk-vcxp7ehh.js → chunk-z6j1ne1h.js} +69 -62
  413. package/dist/{chunk-jrzv14mz.js → chunk-z7k46hmy.js} +126 -115
  414. package/dist/chunk-zbcnvk19.js +38 -0
  415. package/dist/{chunk-p34f6v8t.js → chunk-zgaxdsmh.js} +65 -56
  416. package/dist/chunk-zjv8t5t3.js +942 -0
  417. package/dist/chunk-zjvshnv0.js +131 -0
  418. package/dist/{chunk-t6j072kk.js → chunk-zmrhj53d.js} +21 -21
  419. package/dist/{chunk-tv74hgw9.js → chunk-znv3atvc.js} +1 -1
  420. package/dist/chunk-zsr1mhby.js +126 -0
  421. package/dist/{chunk-2kdh2xhm.js → chunk-zvgv14qd.js} +25 -25
  422. package/dist/{chunk-egwsh2d3.js → chunk-zvh8p8b8.js} +6 -6
  423. package/dist/chunk-zyptmnvp.js +125 -0
  424. package/dist/cli.js +34 -34
  425. package/package.json +7 -2
  426. package/dist/chunk-0786r5qj.js +0 -26
  427. package/dist/chunk-18xdwe7f.js +0 -113
  428. package/dist/chunk-2mvp0yy0.js +0 -121
  429. package/dist/chunk-47te6zef.js +0 -119
  430. package/dist/chunk-83hfzbx3.js +0 -10
  431. package/dist/chunk-8ae0tf0x.js +0 -122
  432. package/dist/chunk-9fmj81q2.js +0 -118
  433. package/dist/chunk-advqggab.js +0 -121
  434. package/dist/chunk-bxwwcaqc.js +0 -129
  435. package/dist/chunk-cwfhgrw5.js +0 -122
  436. package/dist/chunk-dpvkw784.js +0 -117
  437. package/dist/chunk-dyy28gfx.js +0 -119
  438. package/dist/chunk-ec97t249.js +0 -120
  439. package/dist/chunk-fdetpw6s.js +0 -116
  440. package/dist/chunk-feyzykye.js +0 -10
  441. package/dist/chunk-kftpvpke.js +0 -115
  442. package/dist/chunk-mkn9qtyx.js +0 -120
  443. package/dist/chunk-msq3sm15.js +0 -117
  444. package/dist/chunk-pdk7x283.js +0 -131
  445. package/dist/chunk-pfhv31s6.js +0 -121
  446. package/dist/chunk-pkbsek0t.js +0 -118
  447. package/dist/chunk-qhcn44e1.js +0 -119
  448. package/dist/chunk-qsnfsw09.js +0 -119
  449. package/dist/chunk-stbkte9e.js +0 -184
  450. package/dist/chunk-szj5wvdy.js +0 -28
  451. package/dist/chunk-y9zmxrg1.js +0 -57
  452. package/dist/chunk-zaqjcmpr.js +0 -119
  453. package/dist/chunk-zg2vvytp.js +0 -121
  454. package/dist/{chunk-z0csm2zq.js → chunk-jg5ac2fy.js} +394 -394
@@ -9,14 +9,14 @@ import {
9
9
  initializeTeammateContextFromSession,
10
10
  recordTipShown,
11
11
  shouldShowDesktopUpsellStartup
12
- } from "./chunk-qkvakhx1.js";
12
+ } from "./chunk-e732zxst.js";
13
13
  import {
14
14
  useManagePlugins
15
- } from "./chunk-e1awvmbq.js";
15
+ } from "./chunk-a0kvb5h1.js";
16
16
  import {
17
17
  applySkillImprovement,
18
18
  startBackgroundHousekeeping
19
- } from "./chunk-bp5dhef8.js";
19
+ } from "./chunk-f2k7vxg3.js";
20
20
  import {
21
21
  SANDBOX_NETWORK_ACCESS_TOOL_NAME,
22
22
  createCronScheduler,
@@ -26,7 +26,7 @@ import {
26
26
  init_cronJitterConfig,
27
27
  init_cronScheduler,
28
28
  reconcileMarketplaces
29
- } from "./chunk-8xa1kfya.js";
29
+ } from "./chunk-ed7z1w7p.js";
30
30
  import {
31
31
  computeStandaloneAgentContext,
32
32
  exitRestoredWorktree,
@@ -34,13 +34,13 @@ import {
34
34
  restoreSessionStateFromLog,
35
35
  restoreWorktreeForResume,
36
36
  skillChangeDetector
37
- } from "./chunk-ap8sbteg.js";
37
+ } from "./chunk-ww3p4y9a.js";
38
38
  import {
39
39
  useFpsMetrics
40
40
  } from "./chunk-x0ym1db4.js";
41
41
  import {
42
42
  BoundedUUIDSet
43
- } from "./chunk-vmxyzqbq.js";
43
+ } from "./chunk-rdbr0mc5.js";
44
44
  import {
45
45
  consumeEarlyInput
46
46
  } from "./chunk-46fcr28b.js";
@@ -53,62 +53,84 @@ import {
53
53
  messagesAfterAreOnlySynthetic,
54
54
  processUserInput,
55
55
  selectableUserMessagesFilter
56
- } from "./chunk-bgc5qnd6.js";
56
+ } from "./chunk-0sz4ykc8.js";
57
57
  import {
58
58
  init_sprites,
59
59
  renderFace,
60
60
  renderSprite,
61
61
  spriteFrameCount
62
- } from "./chunk-v1k15ae4.js";
62
+ } from "./chunk-yz7f0ahp.js";
63
63
  import {
64
- exports_useVoice,
65
- init_useVoice
66
- } from "./chunk-zr8jx1me.js";
64
+ exports_lanBeacon,
65
+ init_lanBeacon
66
+ } from "./chunk-c12prd7j.js";
67
+ import {
68
+ clearMasterMutedPipes,
69
+ clearSendOverrides,
70
+ exports_useMasterMonitor,
71
+ getAllSlaveClients,
72
+ getSendOverrideVersion,
73
+ getSlaveClientRegistryVersion,
74
+ hasSendOverride,
75
+ init_pipeMuteState,
76
+ init_useMasterMonitor,
77
+ setMasterMutedPipes,
78
+ subscribeSendOverride,
79
+ subscribeToSlaveClientRegistry
80
+ } from "./chunk-yashkw24.js";
67
81
  import {
68
82
  RemoteCallout,
69
83
  init_RemoteCallout
70
- } from "./chunk-hr3btr8b.js";
84
+ } from "./chunk-yhb095v3.js";
71
85
  import {
72
86
  PermissionDialog,
73
87
  PermissionRequestTitle,
74
88
  init_PermissionDialog,
75
89
  init_PermissionRequestTitle
76
90
  } from "./chunk-2pjptqfa.js";
91
+ import {
92
+ exports_useVoice,
93
+ init_useVoice
94
+ } from "./chunk-mja6394w.js";
77
95
  import {
78
96
  ExitFlow,
79
97
  init_ExitFlow
80
- } from "./chunk-650dg84f.js";
98
+ } from "./chunk-t688crr3.js";
81
99
  import {
82
100
  init_exportRenderer,
83
101
  renderMessagesToPlainText
84
- } from "./chunk-4w14tqd3.js";
85
- import {
86
- init_useMergedTools,
87
- useMergedTools
88
- } from "./chunk-jkpnx6d7.js";
89
- import {
90
- init_toolPool,
91
- mergeAndFilterTools
92
- } from "./chunk-hy4eg9rh.js";
93
- import {
94
- init_refresh,
95
- refreshActivePlugins
96
- } from "./chunk-tkwtc12m.js";
102
+ } from "./chunk-km555nmz.js";
97
103
  import {
98
104
  init_setup,
99
105
  isChromeExtensionInstalled,
100
106
  shouldEnableClaudeInChrome
101
- } from "./chunk-svkdak63.js";
107
+ } from "./chunk-9s6wjjgc.js";
102
108
  import {
103
- init_autoModeDenials,
104
- recordAutoModeDenial
105
- } from "./chunk-bcfd2zw7.js";
109
+ getTeammateStatuses,
110
+ init_teamDiscovery
111
+ } from "./chunk-ktvcgnpw.js";
112
+ import {
113
+ exports_pipeRegistry,
114
+ init_pipeRegistry
115
+ } from "./chunk-c2tvdak4.js";
116
+ import {
117
+ init_refresh,
118
+ refreshActivePlugins
119
+ } from "./chunk-26bxxwf6.js";
106
120
  import {
107
121
  FastModePicker,
108
122
  getFastIconString,
109
123
  init_FastIcon,
110
124
  init_fast
111
- } from "./chunk-kegv11w9.js";
125
+ } from "./chunk-q9ekcqx7.js";
126
+ import {
127
+ init_useMergedTools,
128
+ useMergedTools
129
+ } from "./chunk-6f8rdjpr.js";
130
+ import {
131
+ init_toolPool,
132
+ mergeAndFilterTools
133
+ } from "./chunk-x4xsq1s2.js";
112
134
  import {
113
135
  BackgroundTasksDialog,
114
136
  enterTeammateView,
@@ -119,22 +141,26 @@ import {
119
141
  isTerminalStatus,
120
142
  shouldHideTasksFooter,
121
143
  stopOrDismissAgent
122
- } from "./chunk-egwsh2d3.js";
144
+ } from "./chunk-zvh8p8b8.js";
123
145
  import {
124
146
  fromSDKCompactMetadata,
125
147
  init_mappers
126
- } from "./chunk-vank0acb.js";
148
+ } from "./chunk-040fs3bs.js";
127
149
  import {
128
150
  init_Dialog
129
151
  } from "./chunk-w5j0dhpp.js";
152
+ import {
153
+ init_autoModeDenials,
154
+ recordAutoModeDenial
155
+ } from "./chunk-bcfd2zw7.js";
130
156
  import {
131
157
  generateSessionName,
132
158
  init_generateSessionName
133
- } from "./chunk-rhfz4rps.js";
159
+ } from "./chunk-fgzywhh2.js";
134
160
  import {
135
161
  generateSessionTitle,
136
162
  init_sessionTitle
137
- } from "./chunk-hdwtr2yf.js";
163
+ } from "./chunk-y8pkn3xy.js";
138
164
  import {
139
165
  Fuse,
140
166
  init_fuse
@@ -149,7 +175,7 @@ import {
149
175
  useSetPromptOverlay,
150
176
  useSetPromptOverlayDialog,
151
177
  useUnseenDivider
152
- } from "./chunk-av4xr370.js";
178
+ } from "./chunk-gdrmj2pf.js";
153
179
  import {
154
180
  MCPConnectionManager,
155
181
  filterPermissionRelayClients,
@@ -157,35 +183,27 @@ import {
157
183
  init_channelPermissions,
158
184
  shortRequestId,
159
185
  truncateForPreview
160
- } from "./chunk-rf16rpg8.js";
186
+ } from "./chunk-6h2zne6a.js";
161
187
  import {
162
188
  init_pluginAutoupdate,
163
189
  onPluginsAutoUpdated
164
- } from "./chunk-kh3eed6x.js";
190
+ } from "./chunk-a6a879pe.js";
165
191
  import {
166
192
  CHANNEL_PERMISSION_REQUEST_METHOD,
167
193
  findChannelEntry,
168
194
  init_channelNotification
169
- } from "./chunk-gbm9xcsb.js";
195
+ } from "./chunk-kaxc456a.js";
170
196
  import {
171
197
  $toString,
172
198
  init_server
173
199
  } from "./chunk-jdgeec04.js";
174
- import {
175
- init_useSettingsErrors,
176
- useSettingsErrors
177
- } from "./chunk-ebhvnagj.js";
178
- import {
179
- detectUnreachableRules,
180
- init_shadowedRuleDetection
181
- } from "./chunk-4fghnb4h.js";
182
200
  import {
183
201
  PromptInputHelpMenu,
184
202
  init_PromptInputHelpMenu,
185
203
  init_utils as init_utils3,
186
204
  isNonSpacePrintable,
187
205
  isVimModeEnabled
188
- } from "./chunk-pzrjj7h0.js";
206
+ } from "./chunk-79bf1qvf.js";
189
207
  import {
190
208
  editFileInEditor,
191
209
  editPromptInEditor,
@@ -193,11 +211,11 @@ import {
193
211
  init_editor,
194
212
  init_promptEditor,
195
213
  openFileInExternalEditor
196
- } from "./chunk-sa4v49yg.js";
214
+ } from "./chunk-sdcwxxk6.js";
197
215
  import {
198
216
  getResolvedLanguage,
199
217
  init_language
200
- } from "./chunk-dmsneaaq.js";
218
+ } from "./chunk-0bmy4kjm.js";
201
219
  import {
202
220
  ModelPicker,
203
221
  effortLevelToSymbol,
@@ -206,19 +224,23 @@ import {
206
224
  init_ModelPicker,
207
225
  init_extraUsage,
208
226
  isBilledAsExtraUsage
209
- } from "./chunk-z9fjyp10.js";
227
+ } from "./chunk-dxdkze8z.js";
210
228
  import {
211
229
  init_useSearchInput,
212
230
  useSearchInput
213
- } from "./chunk-rqf8xzbe.js";
231
+ } from "./chunk-acad1ptb.js";
214
232
  import {
215
- init_Feedback,
216
- redactSensitiveInfo
217
- } from "./chunk-y3f0q1yz.js";
233
+ init_useSettingsErrors,
234
+ useSettingsErrors
235
+ } from "./chunk-8qraqb46.js";
236
+ import {
237
+ detectUnreachableRules,
238
+ init_shadowedRuleDetection
239
+ } from "./chunk-64m2p0fr.js";
218
240
  import {
219
241
  clearConversation,
220
242
  init_conversation
221
- } from "./chunk-e41z7j8n.js";
243
+ } from "./chunk-v9qatj12.js";
222
244
  import {
223
245
  applyFileSuggestion,
224
246
  findLongestCommonPrefix,
@@ -226,34 +248,34 @@ import {
226
248
  init_fileSuggestions,
227
249
  onIndexBuildComplete,
228
250
  startBackgroundCacheRefresh
229
- } from "./chunk-x9jtstht.js";
251
+ } from "./chunk-73yp3q0h.js";
230
252
  import {
231
253
  getDirectoryCompletions,
232
254
  getPathCompletions,
233
255
  init_directoryCompletion,
234
256
  isPathLikeToken
235
- } from "./chunk-1g7vd9aw.js";
257
+ } from "./chunk-tamranmv.js";
236
258
  import {
237
259
  PromptInputFooterSuggestions,
238
260
  init_PromptInputFooterSuggestions
239
- } from "./chunk-4djqhsnj.js";
261
+ } from "./chunk-xk0tvbw1.js";
240
262
  import {
241
263
  findBtwTriggerPositions,
242
264
  init_sideQuestion
243
- } from "./chunk-6b6pv595.js";
265
+ } from "./chunk-12yhesm9.js";
266
+ import {
267
+ init_Feedback,
268
+ redactSensitiveInfo
269
+ } from "./chunk-2y22jqr5.js";
244
270
  import {
245
271
  checkAndDisableAutoModeIfNeeded,
246
272
  init_bypassPermissionsKillswitch,
247
273
  useKickOffCheckAndDisableAutoModeIfNeeded
248
- } from "./chunk-jwa7qf81.js";
274
+ } from "./chunk-27hsrkpd.js";
249
275
  import {
250
276
  init_useMainLoopModel,
251
277
  useMainLoopModel
252
- } from "./chunk-8wn7137w.js";
253
- import {
254
- attachNdjsonFramer,
255
- init_ndjsonFramer
256
- } from "./chunk-r854e43q.js";
278
+ } from "./chunk-0xbnw7e9.js";
257
279
  import {
258
280
  AGENT_COLORS,
259
281
  AGENT_COLOR_TO_THEME_COLOR,
@@ -416,6 +438,7 @@ import {
416
438
  exports_contextCollapse,
417
439
  exports_coordinatorMode,
418
440
  exports_loadAgentsDir,
441
+ exports_messages,
419
442
  exports_sessionStorage,
420
443
  extractAgentIdsFromMessages,
421
444
  extractBashToolsFromMessages,
@@ -870,6 +893,7 @@ import {
870
893
  readCapped,
871
894
  readUnreadMessages,
872
895
  reconstructContentReplacementState,
896
+ recordAttributionSnapshot,
873
897
  recordTranscript,
874
898
  registerLeaderSetToolPermissionContext,
875
899
  registerLeaderToolUseConfirmQueue,
@@ -957,14 +981,15 @@ import {
957
981
  verifyApiKey,
958
982
  withMemoryCorrectionHint,
959
983
  writeToMailbox
960
- } from "./chunk-m2akjkdt.js";
984
+ } from "./chunk-abcmnpw1.js";
961
985
  import {
962
986
  init_undercover,
963
987
  isUndercover
964
- } from "./chunk-2x9v6ryw.js";
988
+ } from "./chunk-9z8x61ch.js";
965
989
  import {
990
+ incrementPromptCount,
966
991
  init_commitAttribution
967
- } from "./chunk-r0qx6xgc.js";
992
+ } from "./chunk-enqry8t5.js";
968
993
  import {
969
994
  DEFAULT_TASKS_MODE_TASK_LIST_ID,
970
995
  claimTask,
@@ -986,7 +1011,7 @@ import {
986
1011
  syncTeammateMode,
987
1012
  unassignTeammateTasks,
988
1013
  updateTask
989
- } from "./chunk-2qnmyxpy.js";
1014
+ } from "./chunk-g4jdxw9z.js";
990
1015
  import {
991
1016
  asSystemPrompt,
992
1017
  emitTaskTerminatedSdk,
@@ -1000,36 +1025,43 @@ import {
1000
1025
  notifyAutomationStateChanged,
1001
1026
  setNextTickAt,
1002
1027
  shouldTick
1003
- } from "./chunk-7rzk7d37.js";
1004
- import {
1005
- escapeXml,
1006
- init_xml as init_xml2
1007
- } from "./chunk-7hqaeswx.js";
1028
+ } from "./chunk-4c843krn.js";
1008
1029
  import {
1009
1030
  init_bridgeEnabled,
1010
1031
  isBridgeEnabled
1011
- } from "./chunk-0nh980p8.js";
1032
+ } from "./chunk-w710jpa2.js";
1033
+ import {
1034
+ escapeXml,
1035
+ init_xml as init_xml2
1036
+ } from "./chunk-skhb9mm3.js";
1012
1037
  import {
1013
1038
  CLAUDE_IN_CHROME_MCP_SERVER_NAME,
1014
1039
  init_common,
1015
1040
  isTrackedClaudeInChromeTabId
1016
- } from "./chunk-vvj9yfd6.js";
1041
+ } from "./chunk-nb32de90.js";
1042
+ import {
1043
+ exports_pipeTransport,
1044
+ getPipeDisplayRole,
1045
+ getPipeIpc,
1046
+ init_pipeTransport,
1047
+ isPipeControlled
1048
+ } from "./chunk-mfhds0dp.js";
1017
1049
  import {
1018
1050
  RARITY_COLORS,
1019
1051
  getCompanion,
1020
1052
  init_companion,
1021
1053
  init_types
1022
- } from "./chunk-n0vth4gp.js";
1054
+ } from "./chunk-hprabxne.js";
1023
1055
  import {
1024
1056
  init_shellQuote,
1025
1057
  quote,
1026
1058
  tryParseShellCommand
1027
- } from "./chunk-h0jkyyzh.js";
1059
+ } from "./chunk-t33p3qh3.js";
1028
1060
  import {
1029
1061
  init_useDoublePress,
1030
1062
  init_useExitOnCtrlCDWithKeybindings,
1031
1063
  useExitOnCtrlCDWithKeybindings
1032
- } from "./chunk-xrcw33a6.js";
1064
+ } from "./chunk-g5snnfpz.js";
1033
1065
  import {
1034
1066
  READ_FILE_STATE_CACHE_SIZE,
1035
1067
  createFileStateCacheWithSizeLimit,
@@ -1041,41 +1073,41 @@ import {
1041
1073
  init_projectOnboardingState,
1042
1074
  init_terminalSetup,
1043
1075
  maybeMarkProjectOnboardingComplete
1044
- } from "./chunk-rm1mheme.js";
1076
+ } from "./chunk-xsdh0nhd.js";
1045
1077
  import {
1046
1078
  init_useKeybinding
1047
1079
  } from "./chunk-rd2884ff.js";
1048
1080
  import {
1049
1081
  init_poorMode,
1050
1082
  isPoorModeActive
1051
- } from "./chunk-4wvqsj82.js";
1083
+ } from "./chunk-sxkyxfc7.js";
1052
1084
  import {
1053
1085
  hasVoiceAuth,
1054
1086
  init_voiceModeEnabled,
1055
1087
  isVoiceGrowthBookEnabled
1056
- } from "./chunk-by6f5f3f.js";
1088
+ } from "./chunk-g1fmphn5.js";
1089
+ import {
1090
+ init_browser,
1091
+ openBrowser
1092
+ } from "./chunk-1fexraxj.js";
1057
1093
  import {
1058
1094
  getOAuthHeaders,
1059
1095
  init_api,
1060
1096
  prepareApiRequest,
1061
1097
  updateSessionTitle
1062
- } from "./chunk-zcg5wkge.js";
1063
- import {
1064
- init_browser,
1065
- openBrowser
1066
- } from "./chunk-ns5ckn0j.js";
1098
+ } from "./chunk-kty5fqkx.js";
1067
1099
  import {
1068
1100
  endInteractionSpan,
1069
1101
  init_events,
1070
1102
  init_sessionTracing,
1071
1103
  logOTelEvent
1072
- } from "./chunk-pm491jb5.js";
1104
+ } from "./chunk-7at6y3z2.js";
1073
1105
  import {
1074
1106
  IT2_COMMAND,
1075
1107
  init_detection,
1076
1108
  isInsideTmux,
1077
1109
  isInsideTmuxSync
1078
- } from "./chunk-7w71dt0w.js";
1110
+ } from "./chunk-a2yz9sk4.js";
1079
1111
  import {
1080
1112
  TEAM_LEAD_NAME,
1081
1113
  TMUX_COMMAND,
@@ -1086,7 +1118,7 @@ import {
1086
1118
  extractCommandArguments,
1087
1119
  init_parser,
1088
1120
  parseCommand
1089
- } from "./chunk-8eg4phfy.js";
1121
+ } from "./chunk-dsk2j7pz.js";
1090
1122
  import {
1091
1123
  ALLOWED_OFFICIAL_MARKETPLACE_NAMES,
1092
1124
  AwsAuthStatusManager,
@@ -1194,17 +1226,17 @@ import {
1194
1226
  toExternalPermissionMode,
1195
1227
  truncateToLines,
1196
1228
  updateSettingsForSource
1197
- } from "./chunk-za24x8e6.js";
1229
+ } from "./chunk-1dh9y2g9.js";
1198
1230
  import {
1199
1231
  init_json,
1200
1232
  safeParseJSON
1201
- } from "./chunk-ec9bfefg.js";
1233
+ } from "./chunk-0rjgkz6a.js";
1202
1234
  import {
1203
1235
  expandPath,
1204
1236
  getDirectoryForPath,
1205
1237
  init_path,
1206
1238
  toRelativePath
1207
- } from "./chunk-6383ssyr.js";
1239
+ } from "./chunk-nkn6kceq.js";
1208
1240
  import {
1209
1241
  count,
1210
1242
  getAgentName,
@@ -1227,12 +1259,12 @@ import {
1227
1259
  import {
1228
1260
  getPlatform,
1229
1261
  init_platform
1230
- } from "./chunk-ctr3c1sg.js";
1262
+ } from "./chunk-rcz0e093.js";
1231
1263
  import {
1232
1264
  env,
1233
1265
  getHostPlatformForAnalytics,
1234
1266
  init_env
1235
- } from "./chunk-1aaad6af.js";
1267
+ } from "./chunk-bc7vdtyx.js";
1236
1268
  import {
1237
1269
  init_bundledMode,
1238
1270
  isInBundledMode
@@ -1255,7 +1287,7 @@ import {
1255
1287
  formatTokens,
1256
1288
  init_format,
1257
1289
  truncateToWidth
1258
- } from "./chunk-k3h49w53.js";
1290
+ } from "./chunk-0s5rp3xp.js";
1259
1291
  import {
1260
1292
  firstGrapheme,
1261
1293
  getGraphemeSegmenter,
@@ -1328,19 +1360,19 @@ import {
1328
1360
  init_diagLogs,
1329
1361
  init_git,
1330
1362
  logForDiagnosticsNoPII
1331
- } from "./chunk-a6aj70ts.js";
1363
+ } from "./chunk-e80zc1av.js";
1332
1364
  import {
1333
1365
  init_memoize,
1334
1366
  memoizeWithLRU
1335
- } from "./chunk-vyxrqq2j.js";
1367
+ } from "./chunk-ntdnzp2z.js";
1336
1368
  import {
1337
1369
  execFileNoThrow,
1338
1370
  init_execFileNoThrow
1339
- } from "./chunk-24dgse44.js";
1371
+ } from "./chunk-9d7dhwhn.js";
1340
1372
  import {
1341
1373
  getCwd,
1342
1374
  init_cwd
1343
- } from "./chunk-tv74hgw9.js";
1375
+ } from "./chunk-znv3atvc.js";
1344
1376
  import {
1345
1377
  BASH_INPUT_TAG,
1346
1378
  CHANNEL_TAG,
@@ -1355,11 +1387,11 @@ import {
1355
1387
  init_log,
1356
1388
  init_xml,
1357
1389
  logError
1358
- } from "./chunk-jgdm5p7t.js";
1390
+ } from "./chunk-2cyjtt9z.js";
1359
1391
  import {
1360
1392
  init_which,
1361
1393
  which
1362
- } from "./chunk-wx6n79wt.js";
1394
+ } from "./chunk-x313wqn1.js";
1363
1395
  import {
1364
1396
  figures_default,
1365
1397
  init_figures
@@ -1380,9 +1412,10 @@ import {
1380
1412
  registerCleanup,
1381
1413
  safeResolvePath,
1382
1414
  toError
1383
- } from "./chunk-edk6reza.js";
1415
+ } from "./chunk-wb2sg18w.js";
1384
1416
  import {
1385
1417
  createSignal,
1418
+ exports_state,
1386
1419
  getAllowedChannels,
1387
1420
  getBudgetContinuationCount,
1388
1421
  getCurrentTurnTokenBudget,
@@ -1429,13 +1462,12 @@ import {
1429
1462
  snapshotOutputTokensForTurn,
1430
1463
  switchSession,
1431
1464
  updateLastInteractionTime
1432
- } from "./chunk-gzp6rza1.js";
1465
+ } from "./chunk-wmgyt01k.js";
1433
1466
  import {
1434
1467
  APIUserAbortError,
1435
1468
  init_sdk
1436
- } from "./chunk-z0csm2zq.js";
1469
+ } from "./chunk-jg5ac2fy.js";
1437
1470
  import {
1438
- getClaudeConfigHomeDir,
1439
1471
  init_envUtils,
1440
1472
  isEnvDefinedFalsy,
1441
1473
  isEnvTruthy,
@@ -2150,6 +2182,194 @@ var init_VoiceIndicator = __esm(() => {
2150
2182
  PROCESSING_BRIGHT = { r: 185, g: 185, b: 185 };
2151
2183
  });
2152
2184
 
2185
+ // src/utils/pipePermissionRelay.ts
2186
+ var exports_pipePermissionRelay = {};
2187
+ __export(exports_pipePermissionRelay, {
2188
+ tryRelayPipePermissionRequest: () => tryRelayPipePermissionRequest,
2189
+ setRelayMuted: () => setRelayMuted,
2190
+ setPipeRelay: () => setPipeRelay,
2191
+ resolvePipePermissionResponse: () => resolvePipePermissionResponse,
2192
+ notifyPipePermissionCancel: () => notifyPipePermissionCancel,
2193
+ makePipePermissionResponsePayload: () => makePipePermissionResponsePayload,
2194
+ isRelayMuted: () => isRelayMuted,
2195
+ getPipeRelay: () => getPipeRelay,
2196
+ forgetPipePermissionRequest: () => forgetPipePermissionRequest,
2197
+ clearPendingPipePermissions: () => clearPendingPipePermissions,
2198
+ cancelPipePermissionRequest: () => cancelPipePermissionRequest
2199
+ });
2200
+ import { randomUUID as randomUUID7 } from "crypto";
2201
+ function setRelayMuted(muted) {
2202
+ _relayMuted = muted;
2203
+ }
2204
+ function isRelayMuted() {
2205
+ return _relayMuted;
2206
+ }
2207
+ function setPipeRelay(fn) {
2208
+ _pipeRelay = fn;
2209
+ if (!fn)
2210
+ _relayMuted = false;
2211
+ }
2212
+ function getPipeRelay() {
2213
+ return _pipeRelay;
2214
+ }
2215
+ function getPipeSender() {
2216
+ return _pipeRelay ?? null;
2217
+ }
2218
+ function tryRelayPipePermissionRequest(toolUseConfirm, onResponse) {
2219
+ if (_relayMuted)
2220
+ return null;
2221
+ const send = getPipeSender();
2222
+ if (!send)
2223
+ return null;
2224
+ const requestId = randomUUID7();
2225
+ const payload = {
2226
+ requestId,
2227
+ toolName: toolUseConfirm.tool.name,
2228
+ toolUseID: toolUseConfirm.toolUseID,
2229
+ description: toolUseConfirm.description,
2230
+ input: toolUseConfirm.input,
2231
+ permissionResult: toolUseConfirm.permissionResult,
2232
+ permissionPromptStartTimeMs: toolUseConfirm.permissionPromptStartTimeMs
2233
+ };
2234
+ pendingPipePermissions.set(requestId, { onResponse });
2235
+ send({ type: "permission_request", data: JSON.stringify(payload) });
2236
+ return requestId;
2237
+ }
2238
+ function resolvePipePermissionResponse(payload) {
2239
+ const pending = pendingPipePermissions.get(payload.requestId);
2240
+ if (!pending)
2241
+ return false;
2242
+ pendingPipePermissions.delete(payload.requestId);
2243
+ pending.onResponse(payload);
2244
+ return true;
2245
+ }
2246
+ function cancelPipePermissionRequest(requestId, reason) {
2247
+ const pending = pendingPipePermissions.get(requestId);
2248
+ if (!pending)
2249
+ return false;
2250
+ pendingPipePermissions.delete(requestId);
2251
+ pending.onResponse({
2252
+ requestId,
2253
+ behavior: "deny",
2254
+ feedback: reason ?? "Permission request was cancelled by main."
2255
+ });
2256
+ return true;
2257
+ }
2258
+ function forgetPipePermissionRequest(requestId) {
2259
+ if (!requestId)
2260
+ return;
2261
+ pendingPipePermissions.delete(requestId);
2262
+ }
2263
+ function notifyPipePermissionCancel(requestId, reason) {
2264
+ if (!requestId)
2265
+ return;
2266
+ if (_relayMuted)
2267
+ return;
2268
+ const send = getPipeSender();
2269
+ if (!send)
2270
+ return;
2271
+ send({
2272
+ type: "permission_cancel",
2273
+ data: JSON.stringify({ requestId, reason })
2274
+ });
2275
+ }
2276
+ function clearPendingPipePermissions(reason = "Pipe permission relay was disconnected.") {
2277
+ for (const requestId of [...pendingPipePermissions.keys()]) {
2278
+ cancelPipePermissionRequest(requestId, reason);
2279
+ }
2280
+ }
2281
+ function makePipePermissionResponsePayload(requestId, behavior, updatedInputOrFeedback, permissionUpdatesOrContentBlocks, feedback, contentBlocks) {
2282
+ if (behavior === "allow") {
2283
+ return {
2284
+ requestId,
2285
+ behavior,
2286
+ updatedInput: updatedInputOrFeedback ?? {},
2287
+ permissionUpdates: permissionUpdatesOrContentBlocks ?? [],
2288
+ feedback,
2289
+ contentBlocks
2290
+ };
2291
+ }
2292
+ return {
2293
+ requestId,
2294
+ behavior,
2295
+ feedback: updatedInputOrFeedback,
2296
+ contentBlocks: permissionUpdatesOrContentBlocks
2297
+ };
2298
+ }
2299
+ var pendingPipePermissions, _pipeRelay = null, _relayMuted = false;
2300
+ var init_pipePermissionRelay = __esm(() => {
2301
+ pendingPipePermissions = new Map;
2302
+ });
2303
+
2304
+ // src/components/FeedbackSurvey/submitTranscriptShare.ts
2305
+ import { readFile, stat } from "fs/promises";
2306
+ async function submitTranscriptShare(messages, trigger, appearanceId) {
2307
+ try {
2308
+ logForDebugging("Collecting transcript for sharing", { level: "info" });
2309
+ const transcript = normalizeMessagesForAPI(messages);
2310
+ const agentIds = extractAgentIdsFromMessages(messages);
2311
+ const subagentTranscripts = await loadSubagentTranscripts(agentIds);
2312
+ let rawTranscriptJsonl;
2313
+ try {
2314
+ const transcriptPath = getTranscriptPath();
2315
+ const { size } = await stat(transcriptPath);
2316
+ if (size <= MAX_TRANSCRIPT_READ_BYTES) {
2317
+ rawTranscriptJsonl = await readFile(transcriptPath, "utf-8");
2318
+ } else {
2319
+ logForDebugging(`Skipping raw transcript read: file too large (${size} bytes)`, { level: "warn" });
2320
+ }
2321
+ } catch {}
2322
+ const data = {
2323
+ trigger,
2324
+ version: "2.1.888",
2325
+ platform: process.platform,
2326
+ transcript,
2327
+ subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
2328
+ rawTranscriptJsonl
2329
+ };
2330
+ const content = redactSensitiveInfo(jsonStringify(data));
2331
+ await checkAndRefreshOAuthTokenIfNeeded();
2332
+ const authResult = getAuthHeaders();
2333
+ if (authResult.error) {
2334
+ return { success: false };
2335
+ }
2336
+ const headers = {
2337
+ "Content-Type": "application/json",
2338
+ "User-Agent": getUserAgent(),
2339
+ ...authResult.headers
2340
+ };
2341
+ const response = await axios_default.post("https://api.anthropic.com/api/claude_code_shared_session_transcripts", { content, appearance_id: appearanceId }, {
2342
+ headers,
2343
+ timeout: 30000
2344
+ });
2345
+ if (response.status === 200 || response.status === 201) {
2346
+ const result = response.data;
2347
+ logForDebugging("Transcript shared successfully", { level: "info" });
2348
+ return {
2349
+ success: true,
2350
+ transcriptId: result?.transcript_id
2351
+ };
2352
+ }
2353
+ return { success: false };
2354
+ } catch (err) {
2355
+ logForDebugging(errorMessage(err), {
2356
+ level: "error"
2357
+ });
2358
+ return { success: false };
2359
+ }
2360
+ }
2361
+ var init_submitTranscriptShare = __esm(() => {
2362
+ init_axios();
2363
+ init_auth();
2364
+ init_debug();
2365
+ init_errors();
2366
+ init_http();
2367
+ init_messages();
2368
+ init_sessionStorage();
2369
+ init_slowOperations();
2370
+ init_Feedback();
2371
+ });
2372
+
2153
2373
  // src/hooks/useVoiceIntegration.tsx
2154
2374
  var exports_useVoiceIntegration = {};
2155
2375
  __export(exports_useVoiceIntegration, {
@@ -2514,10 +2734,45 @@ var exports_useFrustrationDetection = {};
2514
2734
  __export(exports_useFrustrationDetection, {
2515
2735
  useFrustrationDetection: () => useFrustrationDetection
2516
2736
  });
2517
- function useFrustrationDetection(_messages, _isLoading, _hasActivePrompt, _otherSurveyOpen) {
2518
- return { state: "closed", handleTranscriptSelect: () => {} };
2737
+ function detectFrustration(messages) {
2738
+ const apiErrors = messages.filter((m) => m.isApiErrorMessage);
2739
+ return apiErrors.length >= 2;
2519
2740
  }
2520
- var init_useFrustrationDetection = () => {};
2741
+ function useFrustrationDetection(messages, isLoading, hasActivePrompt, otherSurveyOpen) {
2742
+ const [state, setState] = import_react122.useState("closed");
2743
+ const config = getGlobalConfig();
2744
+ if (config.transcriptShareDismissed) {
2745
+ return { state: "closed", handleTranscriptSelect: () => {} };
2746
+ }
2747
+ if (!isPolicyAllowed("product_feedback")) {
2748
+ return { state: "closed", handleTranscriptSelect: () => {} };
2749
+ }
2750
+ if (isLoading || hasActivePrompt || otherSurveyOpen) {
2751
+ return { state: "closed", handleTranscriptSelect: () => {} };
2752
+ }
2753
+ const frustrated = detectFrustration(messages);
2754
+ const effectiveState = frustrated && state === "closed" ? "transcript_prompt" : state;
2755
+ function handleTranscriptSelect(choice) {
2756
+ if (choice === "yes") {
2757
+ submitTranscriptShare(messages, "frustration", crypto.randomUUID());
2758
+ setState("submitted");
2759
+ } else {
2760
+ saveGlobalConfig((current) => ({
2761
+ ...current,
2762
+ transcriptShareDismissed: true
2763
+ }));
2764
+ setState("closed");
2765
+ }
2766
+ }
2767
+ return { state: effectiveState, handleTranscriptSelect };
2768
+ }
2769
+ var import_react122;
2770
+ var init_useFrustrationDetection = __esm(() => {
2771
+ init_config2();
2772
+ init_policyLimits();
2773
+ init_submitTranscriptShare();
2774
+ import_react122 = __toESM(require_react(), 1);
2775
+ });
2521
2776
 
2522
2777
  // src/hooks/notifs/useAntOrgWarningNotification.ts
2523
2778
  var exports_useAntOrgWarningNotification = {};
@@ -2533,9 +2788,9 @@ __export(exports_useProactive, {
2533
2788
  useProactive: () => useProactive
2534
2789
  });
2535
2790
  function useProactive(opts) {
2536
- const optsRef = import_react122.useRef(opts);
2791
+ const optsRef = import_react123.useRef(opts);
2537
2792
  optsRef.current = opts;
2538
- import_react122.useEffect(() => {
2793
+ import_react123.useEffect(() => {
2539
2794
  if (!isProactiveActive())
2540
2795
  return;
2541
2796
  let timer = null;
@@ -2584,13 +2839,13 @@ function useProactive(opts) {
2584
2839
  isContextBlocked()
2585
2840
  ]);
2586
2841
  }
2587
- var import_react122, TICK_INTERVAL_MS = 30000;
2842
+ var import_react123, TICK_INTERVAL_MS = 30000;
2588
2843
  var init_useProactive = __esm(() => {
2589
2844
  init_xml();
2590
2845
  init_cwd();
2591
2846
  init_autonomyRuns();
2592
2847
  init_proactive();
2593
- import_react122 = __toESM(require_react(), 1);
2848
+ import_react123 = __toESM(require_react(), 1);
2594
2849
  });
2595
2850
 
2596
2851
  // src/hooks/useScheduledTasks.ts
@@ -2603,11 +2858,11 @@ function useScheduledTasks({
2603
2858
  assistantMode = false,
2604
2859
  setMessages
2605
2860
  }) {
2606
- const isLoadingRef = import_react123.useRef(isLoading);
2861
+ const isLoadingRef = import_react124.useRef(isLoading);
2607
2862
  isLoadingRef.current = isLoading;
2608
2863
  const store = useAppStateStore();
2609
2864
  const setAppState = useSetAppState();
2610
- import_react123.useEffect(() => {
2865
+ import_react124.useEffect(() => {
2611
2866
  if (!isKairosCronEnabled())
2612
2867
  return;
2613
2868
  const enqueueForLead = async (prompt) => {
@@ -2688,7 +2943,7 @@ function formatCronFireTime(d) {
2688
2943
  minute: "2-digit"
2689
2944
  }).replace(/,? at |, /, " ").replace(/ ([AP]M)/, (_, ampm) => ampm.toLowerCase());
2690
2945
  }
2691
- var import_react123;
2946
+ var import_react124;
2692
2947
  var init_useScheduledTasks = __esm(() => {
2693
2948
  init_AppState();
2694
2949
  init_Task();
@@ -2704,7 +2959,889 @@ var init_useScheduledTasks = __esm(() => {
2704
2959
  init_messageQueueManager();
2705
2960
  init_messages();
2706
2961
  init_workloadContext();
2707
- import_react123 = __toESM(require_react(), 1);
2962
+ import_react124 = __toESM(require_react(), 1);
2963
+ });
2964
+
2965
+ // src/hooks/useSlaveNotifications.ts
2966
+ var exports_useSlaveNotifications = {};
2967
+ __export(exports_useSlaveNotifications, {
2968
+ useSlaveNotifications: () => useSlaveNotifications
2969
+ });
2970
+ function foldSlaveNotif(acc, _incoming) {
2971
+ if (!("text" in acc))
2972
+ return acc;
2973
+ const match = acc.text.match(/\((\d+)\)$/);
2974
+ const count2 = match ? parseInt(match[1], 10) + 1 : 2;
2975
+ const base = acc.text.replace(/\s*\(\d+\)$/, "");
2976
+ return {
2977
+ ...acc,
2978
+ text: `${base} (${count2})`,
2979
+ fold: foldSlaveNotif
2980
+ };
2981
+ }
2982
+ function truncate(s, max) {
2983
+ if (s.length <= max)
2984
+ return s;
2985
+ return s.slice(0, max) + "\u2026";
2986
+ }
2987
+ function useSlaveNotifications() {
2988
+ const role = useAppState((s) => getPipeIpc(s).role);
2989
+ const slaves = useAppState((s) => getPipeIpc(s).slaves);
2990
+ const { addNotification } = useNotifications();
2991
+ const lastSeenRef = import_react125.useRef({});
2992
+ import_react125.useEffect(() => {
2993
+ if (role !== "master")
2994
+ return;
2995
+ for (const [name, slave] of Object.entries(slaves)) {
2996
+ const lastSeen = lastSeenRef.current[name] ?? 0;
2997
+ const newEntries = slave.history.slice(lastSeen);
2998
+ lastSeenRef.current[name] = slave.history.length;
2999
+ for (const entry of newEntries) {
3000
+ const notification = makeNotification(name, entry);
3001
+ if (notification) {
3002
+ addNotification(notification);
3003
+ }
3004
+ }
3005
+ }
3006
+ for (const name of Object.keys(lastSeenRef.current)) {
3007
+ if (!(name in slaves)) {
3008
+ delete lastSeenRef.current[name];
3009
+ }
3010
+ }
3011
+ }, [addNotification, role, slaves]);
3012
+ }
3013
+ function makeNotification(slaveName, entry) {
3014
+ const shortName = slaveName.length > 16 ? `${slaveName.slice(0, 16)}\u2026` : slaveName;
3015
+ switch (entry.type) {
3016
+ case "prompt_ack":
3017
+ return {
3018
+ key: `slave-ack-${slaveName}`,
3019
+ text: `[${shortName}] \u2713 \u5DF2\u63A5\u6536\u4EFB\u52A1`,
3020
+ priority: "low",
3021
+ timeoutMs: 2500,
3022
+ fold: foldSlaveNotif
3023
+ };
3024
+ case "done":
3025
+ return {
3026
+ key: `slave-done-${slaveName}`,
3027
+ text: `[${shortName}] \u2713 \u4EFB\u52A1\u5B8C\u6210`,
3028
+ priority: "medium",
3029
+ timeoutMs: 5000,
3030
+ fold: foldSlaveNotif
3031
+ };
3032
+ case "error":
3033
+ return {
3034
+ key: `slave-error-${slaveName}`,
3035
+ text: `[${shortName}] \u2717 \u9519\u8BEF: ${truncate(entry.content, 60)}`,
3036
+ color: "error",
3037
+ priority: "high",
3038
+ timeoutMs: 8000
3039
+ };
3040
+ case "tool_start":
3041
+ return {
3042
+ key: `slave-tool-${slaveName}`,
3043
+ text: `[${shortName}] \u5DE5\u5177: ${truncate(entry.content, 40)}`,
3044
+ priority: "low",
3045
+ timeoutMs: 3000,
3046
+ fold: foldSlaveNotif
3047
+ };
3048
+ case "prompt":
3049
+ return {
3050
+ key: `slave-prompt-${slaveName}`,
3051
+ text: `[${shortName}] \u25B6 \u5F00\u59CB\u5904\u7406: ${truncate(entry.content, 50)}`,
3052
+ priority: "medium",
3053
+ timeoutMs: 4000
3054
+ };
3055
+ case "stream":
3056
+ case "tool_result":
3057
+ default:
3058
+ return null;
3059
+ }
3060
+ }
3061
+ var import_react125;
3062
+ var init_useSlaveNotifications = __esm(() => {
3063
+ init_notifications();
3064
+ init_AppState();
3065
+ init_pipeTransport();
3066
+ import_react125 = __toESM(require_react(), 1);
3067
+ });
3068
+
3069
+ // src/hooks/usePipeIpc.ts
3070
+ var exports_usePipeIpc = {};
3071
+ __export(exports_usePipeIpc, {
3072
+ usePipeIpc: () => usePipeIpc
3073
+ });
3074
+ function removeDeadSlave(slaveName, store) {
3075
+ mm().removeSlaveClient(slaveName);
3076
+ store.setState((prev) => {
3077
+ const pipeIpc = pt().getPipeIpc(prev);
3078
+ const { [slaveName]: _removed, ...remainingSlaves } = pipeIpc.slaves;
3079
+ return {
3080
+ ...prev,
3081
+ pipeIpc: {
3082
+ ...pipeIpc,
3083
+ role: Object.keys(remainingSlaves).length > 0 ? "master" : "main",
3084
+ displayRole: Object.keys(remainingSlaves).length > 0 ? "master" : "main",
3085
+ slaves: remainingSlaves,
3086
+ selectedPipes: (pipeIpc.selectedPipes ?? []).filter((name) => name !== slaveName),
3087
+ discoveredPipes: (pipeIpc.discoveredPipes ?? []).filter((pipe) => pipe.pipeName !== slaveName)
3088
+ }
3089
+ };
3090
+ });
3091
+ }
3092
+ function refreshDiscoveredPipes(pipeName, aliveSubs, store) {
3093
+ const freshDiscovered = aliveSubs.filter((sub) => sub.pipeName !== pipeName).map((sub) => ({
3094
+ id: sub.id,
3095
+ pipeName: sub.pipeName,
3096
+ role: `sub-${sub.subIndex}`,
3097
+ machineId: sub.machineId,
3098
+ ip: sub.ip,
3099
+ hostname: sub.hostname,
3100
+ alive: true
3101
+ }));
3102
+ let lanDiscovered = [];
3103
+ if (true) {
3104
+ const beacon = lb().getLanBeacon();
3105
+ if (beacon) {
3106
+ const localNames = new Set(freshDiscovered.map((p) => p.pipeName));
3107
+ localNames.add(pipeName);
3108
+ for (const [pName, peer] of beacon.getPeers()) {
3109
+ if (!localNames.has(pName)) {
3110
+ lanDiscovered.push({
3111
+ id: `lan-${pName}`,
3112
+ pipeName: pName,
3113
+ role: peer.role,
3114
+ machineId: peer.machineId,
3115
+ ip: peer.ip,
3116
+ hostname: peer.hostname,
3117
+ alive: true
3118
+ });
3119
+ }
3120
+ }
3121
+ }
3122
+ }
3123
+ const allDiscovered = [...freshDiscovered, ...lanDiscovered];
3124
+ const prev = pt().getPipeIpc(store.getState());
3125
+ const prevNames = (prev.discoveredPipes ?? []).map((p) => p.pipeName).join(",");
3126
+ const newNames = allDiscovered.map((p) => p.pipeName).join(",");
3127
+ if (prevNames === newNames)
3128
+ return;
3129
+ store.setState((prev2) => {
3130
+ const pipeIpc = pt().getPipeIpc(prev2);
3131
+ const aliveNames = new Set(allDiscovered.map((pipe) => pipe.pipeName));
3132
+ return {
3133
+ ...prev2,
3134
+ pipeIpc: {
3135
+ ...pipeIpc,
3136
+ discoveredPipes: allDiscovered,
3137
+ selectedPipes: (pipeIpc.selectedPipes ?? []).filter((name) => aliveNames.has(name))
3138
+ }
3139
+ };
3140
+ });
3141
+ }
3142
+ function registerMessageHandlers(server, pipeName, machineId, store, handleIncomingPrompt) {
3143
+ server.onMessage((msg, reply) => {
3144
+ if (msg.type === "ping")
3145
+ reply({ type: "pong" });
3146
+ });
3147
+ server.onMessage((msg, reply) => {
3148
+ if (msg.type !== "attach_request")
3149
+ return;
3150
+ const state = store.getState();
3151
+ const currentPipeState = pt().getPipeIpc(state);
3152
+ if (pt().isPipeControlled(currentPipeState)) {
3153
+ reply({ type: "attach_reject", data: "Already controlled" });
3154
+ return;
3155
+ }
3156
+ const isLanPeer = msg.meta?.machineId && msg.meta.machineId !== machineId;
3157
+ if (!isLanPeer && currentPipeState.role !== "sub") {
3158
+ reply({
3159
+ type: "attach_reject",
3160
+ data: "Only sub sessions can be attached."
3161
+ });
3162
+ return;
3163
+ }
3164
+ reply({ type: "attach_accept" });
3165
+ const clients = Array.from(server.clients);
3166
+ const masterSocket = clients[clients.length - 1];
3167
+ pp().setPipeRelay((relayMsg) => {
3168
+ if (masterSocket && !masterSocket.destroyed) {
3169
+ relayMsg.from = relayMsg.from ?? pipeName;
3170
+ relayMsg.ts = relayMsg.ts ?? new Date().toISOString();
3171
+ masterSocket.write(JSON.stringify(relayMsg) + `
3172
+ `);
3173
+ }
3174
+ });
3175
+ store.setState((prev) => ({
3176
+ ...prev,
3177
+ pipeIpc: {
3178
+ ...pt().getPipeIpc(prev),
3179
+ role: "sub",
3180
+ displayRole: pt().getPipeDisplayRole(pt().getPipeIpc(prev)),
3181
+ attachedBy: msg.from ?? "unknown"
3182
+ }
3183
+ }));
3184
+ });
3185
+ server.onMessage((msg, reply) => {
3186
+ if (msg.type === "prompt" && msg.data) {
3187
+ const accepted = handleIncomingPrompt(msg.data);
3188
+ if (accepted) {
3189
+ reply({ type: "prompt_ack", data: "accepted" });
3190
+ } else {
3191
+ reply({
3192
+ type: "error",
3193
+ data: "Slave is busy and could not accept the prompt."
3194
+ });
3195
+ }
3196
+ }
3197
+ });
3198
+ server.onMessage((msg, _reply) => {
3199
+ if (msg.type !== "permission_response" && msg.type !== "permission_cancel")
3200
+ return;
3201
+ const { resolvePipePermissionResponse: resolvePipePermissionResponse2, cancelPipePermissionRequest: cancelPipePermissionRequest2 } = (init_pipePermissionRelay(), __toCommonJS(exports_pipePermissionRelay));
3202
+ try {
3203
+ const payload = msg.data ? JSON.parse(msg.data) : undefined;
3204
+ if (!payload?.requestId)
3205
+ return;
3206
+ if (msg.type === "permission_response") {
3207
+ resolvePipePermissionResponse2(payload);
3208
+ } else {
3209
+ cancelPipePermissionRequest2(payload.requestId, payload.reason);
3210
+ }
3211
+ } catch {}
3212
+ });
3213
+ server.onMessage((msg, _reply) => {
3214
+ if (msg.type === "relay_mute") {
3215
+ pp().setRelayMuted(true);
3216
+ } else if (msg.type === "relay_unmute") {
3217
+ pp().setRelayMuted(false);
3218
+ }
3219
+ });
3220
+ server.onMessage((msg, _reply) => {
3221
+ if (msg.type !== "detach")
3222
+ return;
3223
+ const { clearPendingPipePermissions: clearPendingPipePermissions2 } = (init_pipePermissionRelay(), __toCommonJS(exports_pipePermissionRelay));
3224
+ clearPendingPipePermissions2("Pipe detached before permission was resolved.");
3225
+ pp().setPipeRelay(null);
3226
+ store.setState((prev) => ({
3227
+ ...prev,
3228
+ pipeIpc: (() => {
3229
+ const pipeIpc = pt().getPipeIpc(prev);
3230
+ const nextRole = pipeIpc.subIndex != null ? "sub" : "main";
3231
+ const nextPipeState = { ...pipeIpc, role: nextRole, attachedBy: null };
3232
+ return {
3233
+ ...nextPipeState,
3234
+ displayRole: pt().getPipeDisplayRole(nextPipeState)
3235
+ };
3236
+ })()
3237
+ }));
3238
+ });
3239
+ }
3240
+ function runMainHeartbeat(pipeName, machineId, store, disposed) {
3241
+ (async () => {
3242
+ try {
3243
+ await pr().cleanupStaleEntries();
3244
+ const aliveSubs = await pr().getAliveSubs();
3245
+ refreshDiscoveredPipes(pipeName, aliveSubs, store);
3246
+ const connectedSlaves = mm().getAllSlaveClients();
3247
+ const aliveSubNames = new Set(aliveSubs.map((sub) => sub.pipeName));
3248
+ const attachTargets = aliveSubs.map((sub) => ({
3249
+ pipeName: sub.pipeName
3250
+ }));
3251
+ if (true) {
3252
+ const beacon = lb().getLanBeacon();
3253
+ if (beacon) {
3254
+ const localNames = new Set(attachTargets.map((t) => t.pipeName));
3255
+ localNames.add(pipeName);
3256
+ for (const [pName, peer] of beacon.getPeers()) {
3257
+ if (!localNames.has(pName)) {
3258
+ attachTargets.push({
3259
+ pipeName: pName,
3260
+ tcpEndpoint: { host: peer.ip, port: peer.tcpPort }
3261
+ });
3262
+ aliveSubNames.add(pName);
3263
+ }
3264
+ }
3265
+ }
3266
+ }
3267
+ const currentPipeState = pt().getPipeIpc(store.getState());
3268
+ for (const target of attachTargets) {
3269
+ if (target.pipeName === pipeName)
3270
+ continue;
3271
+ if (connectedSlaves.has(target.pipeName))
3272
+ continue;
3273
+ try {
3274
+ const myName = currentPipeState.serverName ?? pipeName;
3275
+ const client = await pt().connectToPipe(target.pipeName, myName, 3000, target.tcpEndpoint);
3276
+ const attached = await new Promise((resolve) => {
3277
+ const timeout2 = setTimeout(() => {
3278
+ client.disconnect();
3279
+ resolve(false);
3280
+ }, 3000);
3281
+ client.onMessage((msg) => {
3282
+ if (msg.type === "attach_accept") {
3283
+ clearTimeout(timeout2);
3284
+ resolve(true);
3285
+ } else if (msg.type === "attach_reject") {
3286
+ clearTimeout(timeout2);
3287
+ client.disconnect();
3288
+ resolve(false);
3289
+ }
3290
+ });
3291
+ client.send({
3292
+ type: "attach_request",
3293
+ meta: { machineId }
3294
+ });
3295
+ });
3296
+ if (attached && !disposed.current) {
3297
+ mm().addSlaveClient(target.pipeName, client);
3298
+ client.on("disconnect", () => {
3299
+ removeDeadSlave(target.pipeName, store);
3300
+ });
3301
+ store.setState((prev) => ({
3302
+ ...prev,
3303
+ pipeIpc: {
3304
+ ...pt().getPipeIpc(prev),
3305
+ role: "master",
3306
+ displayRole: "master",
3307
+ slaves: {
3308
+ ...pt().getPipeIpc(prev).slaves,
3309
+ [target.pipeName]: {
3310
+ name: target.pipeName,
3311
+ connectedAt: new Date().toISOString(),
3312
+ status: "idle",
3313
+ unreadCount: 0,
3314
+ history: []
3315
+ }
3316
+ }
3317
+ }
3318
+ }));
3319
+ }
3320
+ } catch {}
3321
+ }
3322
+ let lanPeerNames = null;
3323
+ if (true) {
3324
+ const beacon = lb().getLanBeacon();
3325
+ if (beacon) {
3326
+ lanPeerNames = new Set(beacon.getPeers().keys());
3327
+ }
3328
+ }
3329
+ for (const [slaveName, client] of connectedSlaves.entries()) {
3330
+ const inLocalRegistry = aliveSubNames.has(slaveName);
3331
+ const inLanBeacon = lanPeerNames?.has(slaveName) ?? false;
3332
+ if (!client.connected || !inLocalRegistry && !inLanBeacon) {
3333
+ removeDeadSlave(slaveName, store);
3334
+ }
3335
+ }
3336
+ } catch {}
3337
+ })();
3338
+ }
3339
+ function runSubHeartbeat(pipeName, machineId, entry, store, disposed) {
3340
+ (async () => {
3341
+ try {
3342
+ const mainAlive = await pr().isMainAlive();
3343
+ if (!mainAlive && !disposed.current) {
3344
+ const registry = await pr().readRegistry();
3345
+ const isSameMachine = pr().isMainMachine(machineId, registry);
3346
+ if (isSameMachine) {
3347
+ await pr().registerAsMain(entry);
3348
+ } else {
3349
+ await pr().revertToIndependent(pipeName);
3350
+ }
3351
+ store.setState((prev) => ({
3352
+ ...prev,
3353
+ pipeIpc: {
3354
+ ...pt().getPipeIpc(prev),
3355
+ role: "main",
3356
+ subIndex: null,
3357
+ displayRole: "main",
3358
+ attachedBy: null
3359
+ }
3360
+ }));
3361
+ pp().setPipeRelay(null);
3362
+ }
3363
+ } catch {}
3364
+ })();
3365
+ }
3366
+ function usePipeIpc({
3367
+ store,
3368
+ handleIncomingPrompt
3369
+ }) {
3370
+ if (false)
3371
+ ;
3372
+ import_react126.useEffect(() => {
3373
+ const pipeName = `cli-${bs().getSessionId().slice(0, 8)}`;
3374
+ const disposed = { current: false };
3375
+ let heartbeatTimer = null;
3376
+ let heartbeatBusy = false;
3377
+ let pipeServer = null;
3378
+ (async () => {
3379
+ try {
3380
+ const machId = await pr().getMachineId();
3381
+ const mac = pr().getMacAddress();
3382
+ const localIp = pt().getLocalIp();
3383
+ const host = osm().hostname();
3384
+ const roleResult = await pr().determineRole(machId);
3385
+ const entry = {
3386
+ id: pipeName,
3387
+ pid: process.pid,
3388
+ machineId: machId,
3389
+ startedAt: Date.now(),
3390
+ ip: localIp,
3391
+ mac,
3392
+ hostname: host,
3393
+ pipeName
3394
+ };
3395
+ let initialRole = "main";
3396
+ let subIndex = null;
3397
+ let displayRole = "main";
3398
+ if (roleResult.role === "main" || roleResult.role === "main-recover") {
3399
+ await pr().registerAsMain(entry);
3400
+ } else {
3401
+ subIndex = roleResult.subIndex;
3402
+ await pr().registerAsSub(entry, subIndex);
3403
+ initialRole = "sub";
3404
+ displayRole = `sub-${subIndex}`;
3405
+ }
3406
+ const server = await pt().createPipeServer(pipeName, { enableTcp: true, tcpPort: 0 });
3407
+ pipeServer = server;
3408
+ if (disposed.current) {
3409
+ await server.close();
3410
+ await pr().unregister(pipeName);
3411
+ return;
3412
+ }
3413
+ if (server.tcpAddress) {
3414
+ const beacon = new (lb()).LanBeacon({
3415
+ pipeName,
3416
+ machineId: machId,
3417
+ hostname: host,
3418
+ ip: localIp,
3419
+ tcpPort: server.tcpAddress.port,
3420
+ role: initialRole
3421
+ });
3422
+ beacon.start();
3423
+ lb().setLanBeacon(beacon);
3424
+ const entryWithTcp = {
3425
+ ...entry,
3426
+ tcpPort: server.tcpAddress.port,
3427
+ lanVisible: true
3428
+ };
3429
+ if (initialRole === "main") {
3430
+ await pr().registerAsMain(entryWithTcp);
3431
+ } else if (subIndex != null) {
3432
+ await pr().registerAsSub(entryWithTcp, subIndex);
3433
+ }
3434
+ }
3435
+ store.setState((prev) => ({
3436
+ ...prev,
3437
+ pipeIpc: {
3438
+ ...pt().getPipeIpc(prev),
3439
+ serverName: pipeName,
3440
+ role: initialRole,
3441
+ subIndex,
3442
+ displayRole,
3443
+ localIp,
3444
+ hostname: host,
3445
+ machineId: machId,
3446
+ mac
3447
+ }
3448
+ }));
3449
+ registerMessageHandlers(server, pipeName, machId, store, handleIncomingPrompt);
3450
+ const HEARTBEAT_INTERVAL_MS = 5000;
3451
+ heartbeatTimer = setInterval(() => {
3452
+ if (disposed.current || heartbeatBusy)
3453
+ return;
3454
+ heartbeatBusy = true;
3455
+ const currentPipeState = pt().getPipeIpc(store.getState());
3456
+ if (currentPipeState.role === "main" || currentPipeState.role === "master") {
3457
+ runMainHeartbeat(pipeName, machId, store, disposed);
3458
+ } else if (currentPipeState.role === "sub") {
3459
+ runSubHeartbeat(pipeName, machId, entry, store, disposed);
3460
+ }
3461
+ setTimeout(() => {
3462
+ heartbeatBusy = false;
3463
+ }, 4000);
3464
+ }, HEARTBEAT_INTERVAL_MS);
3465
+ } catch {}
3466
+ })();
3467
+ return () => {
3468
+ disposed.current = true;
3469
+ if (heartbeatTimer) {
3470
+ clearInterval(heartbeatTimer);
3471
+ heartbeatTimer = null;
3472
+ }
3473
+ const allClients = mm().getAllSlaveClients();
3474
+ for (const [name, client] of allClients.entries()) {
3475
+ try {
3476
+ client.send({ type: "detach" });
3477
+ } catch {}
3478
+ client.disconnect();
3479
+ removeDeadSlave(name, store);
3480
+ }
3481
+ const beacon = lb().getLanBeacon();
3482
+ if (beacon) {
3483
+ try {
3484
+ beacon.stop();
3485
+ } catch {}
3486
+ lb().setLanBeacon(null);
3487
+ }
3488
+ pr().unregister(pipeName).catch(() => {});
3489
+ if (pipeServer) {
3490
+ pipeServer.close().catch(() => {});
3491
+ pipeServer = null;
3492
+ }
3493
+ pp().setPipeRelay(null);
3494
+ };
3495
+ }, []);
3496
+ }
3497
+ var import_react126, pt = () => (init_pipeTransport(), __toCommonJS(exports_pipeTransport)), pr = () => (init_pipeRegistry(), __toCommonJS(exports_pipeRegistry)), mm = () => (init_useMasterMonitor(), __toCommonJS(exports_useMasterMonitor)), bs = () => (init_state(), __toCommonJS(exports_state)), lb = () => (init_lanBeacon(), __toCommonJS(exports_lanBeacon)), pp = () => (init_pipePermissionRelay(), __toCommonJS(exports_pipePermissionRelay)), osm = () => __require("os");
3498
+ var init_usePipeIpc = __esm(() => {
3499
+ import_react126 = __toESM(require_react(), 1);
3500
+ });
3501
+
3502
+ // src/hooks/usePipeRelay.ts
3503
+ var exports_usePipeRelay = {};
3504
+ __export(exports_usePipeRelay, {
3505
+ usePipeRelay: () => usePipeRelay
3506
+ });
3507
+ function usePipeRelay() {
3508
+ const pipeReturnHadErrorRef = import_react127.useRef(false);
3509
+ const relayPipeMessage = import_react127.useCallback((message) => {
3510
+ const relay = getPipeRelay();
3511
+ if (typeof relay !== "function") {
3512
+ return false;
3513
+ }
3514
+ if (isRelayMuted()) {
3515
+ return false;
3516
+ }
3517
+ relay(message);
3518
+ return true;
3519
+ }, []);
3520
+ return { relayPipeMessage, pipeReturnHadErrorRef };
3521
+ }
3522
+ var import_react127;
3523
+ var init_usePipeRelay = __esm(() => {
3524
+ init_pipePermissionRelay();
3525
+ import_react127 = __toESM(require_react(), 1);
3526
+ });
3527
+
3528
+ // src/hooks/usePipePermissionForward.ts
3529
+ var exports_usePipePermissionForward = {};
3530
+ __export(exports_usePipePermissionForward, {
3531
+ usePipePermissionForward: () => usePipePermissionForward
3532
+ });
3533
+ function usePipePermissionForward({
3534
+ store,
3535
+ tools,
3536
+ setMessages,
3537
+ setToolUseConfirmQueue,
3538
+ getToolUseContext,
3539
+ mainLoopModel
3540
+ }) {
3541
+ import_react128.useEffect(() => {
3542
+ if (false)
3543
+ ;
3544
+ const { subscribePipeEntries, getSlaveClient } = (init_useMasterMonitor(), __toCommonJS(exports_useMasterMonitor));
3545
+ const { getPipeIpc: getPipeIpc2 } = (init_pipeTransport(), __toCommonJS(exports_pipeTransport));
3546
+ const { createAssistantMessage: createAssistantMessage2, createSystemMessage: createSystemMessage2 } = (init_messages(), __toCommonJS(exports_messages));
3547
+ return subscribePipeEntries((pipeName, entry) => {
3548
+ const content = entry.content.trim();
3549
+ const pipeIpcState = getPipeIpc2(store.getState());
3550
+ const peerInfo = (pipeIpcState.discoveredPipes ?? []).find((pipe) => pipe.pipeName === pipeName);
3551
+ const isLan = peerInfo?.ip && peerInfo.ip !== pipeIpcState.localIp;
3552
+ const displayRole = peerInfo ? isLan ? `${peerInfo.role} ${peerInfo.hostname}/${peerInfo.ip}` : peerInfo.role : pipeName;
3553
+ if (entry.type === "permission_request") {
3554
+ try {
3555
+ const payload = JSON.parse(content);
3556
+ const tool = tools.find((candidate) => candidate.name === payload.toolName);
3557
+ const client = getSlaveClient(pipeName);
3558
+ if (!client)
3559
+ return;
3560
+ if (!tool) {
3561
+ client.send({
3562
+ type: "permission_response",
3563
+ data: JSON.stringify({
3564
+ requestId: payload.requestId,
3565
+ behavior: "deny",
3566
+ feedback: `Tool "${payload.toolName}" is not available in main.`
3567
+ })
3568
+ });
3569
+ return;
3570
+ }
3571
+ const assistantMessage = createAssistantMessage2({ content: "" });
3572
+ const toolUseContext = getToolUseContext([], [], new AbortController, mainLoopModel);
3573
+ setToolUseConfirmQueue((queue) => [
3574
+ ...queue,
3575
+ {
3576
+ assistantMessage,
3577
+ tool,
3578
+ description: payload.description,
3579
+ input: payload.input,
3580
+ toolUseContext,
3581
+ toolUseID: `pipe:${payload.requestId}`,
3582
+ pipeName,
3583
+ permissionResult: payload.permissionResult,
3584
+ permissionPromptStartTimeMs: payload.permissionPromptStartTimeMs,
3585
+ workerBadge: {
3586
+ name: `${displayRole} / ${pipeName}`,
3587
+ color: "cyan"
3588
+ },
3589
+ onUserInteraction() {},
3590
+ onAbort() {
3591
+ client.send({
3592
+ type: "permission_response",
3593
+ data: JSON.stringify({
3594
+ requestId: payload.requestId,
3595
+ behavior: "deny",
3596
+ feedback: "Permission request was aborted in main."
3597
+ })
3598
+ });
3599
+ },
3600
+ onAllow(updatedInput, permissionUpdates, feedback, contentBlocks) {
3601
+ client.send({
3602
+ type: "permission_response",
3603
+ data: JSON.stringify({
3604
+ requestId: payload.requestId,
3605
+ behavior: "allow",
3606
+ updatedInput,
3607
+ permissionUpdates,
3608
+ feedback,
3609
+ contentBlocks
3610
+ })
3611
+ });
3612
+ },
3613
+ onReject(feedback, contentBlocks) {
3614
+ client.send({
3615
+ type: "permission_response",
3616
+ data: JSON.stringify({
3617
+ requestId: payload.requestId,
3618
+ behavior: "deny",
3619
+ feedback,
3620
+ contentBlocks
3621
+ })
3622
+ });
3623
+ },
3624
+ async recheckPermission() {}
3625
+ }
3626
+ ]);
3627
+ } catch {}
3628
+ return;
3629
+ }
3630
+ if (entry.type === "permission_cancel") {
3631
+ try {
3632
+ const payload = JSON.parse(content);
3633
+ setToolUseConfirmQueue((queue) => queue.filter((item) => item.toolUseID !== `pipe:${payload.requestId}`));
3634
+ } catch {}
3635
+ return;
3636
+ }
3637
+ let message = null;
3638
+ if (entry.type === "stream" && content) {
3639
+ message = createSystemMessage2(`[${displayRole} / ${pipeName}] ${content}`, "warning");
3640
+ } else if (entry.type === "error") {
3641
+ message = createSystemMessage2(`[${displayRole} / ${pipeName}] Error: ${content || "no output"}`, "error");
3642
+ } else if (entry.type === "done") {
3643
+ message = createSystemMessage2(`[${displayRole} / ${pipeName}] Completed`, "warning");
3644
+ }
3645
+ if (message) {
3646
+ setMessages((prev) => [...prev, message]);
3647
+ }
3648
+ });
3649
+ }, [
3650
+ getToolUseContext,
3651
+ mainLoopModel,
3652
+ setMessages,
3653
+ setToolUseConfirmQueue,
3654
+ store,
3655
+ tools
3656
+ ]);
3657
+ }
3658
+ var import_react128;
3659
+ var init_usePipePermissionForward = __esm(() => {
3660
+ import_react128 = __toESM(require_react(), 1);
3661
+ });
3662
+
3663
+ // src/hooks/usePipeMuteSync.ts
3664
+ var exports_usePipeMuteSync = {};
3665
+ __export(exports_usePipeMuteSync, {
3666
+ usePipeMuteSync: () => usePipeMuteSync
3667
+ });
3668
+ function usePipeMuteSync({
3669
+ setToolUseConfirmQueue
3670
+ }) {
3671
+ const routeMode = useAppState((s) => getPipeIpc(s).routeMode ?? "selected");
3672
+ const selectedPipes = useAppState((s) => getPipeIpc(s).selectedPipes ?? []);
3673
+ const registryVersion = import_react129.useSyncExternalStore(subscribeToSlaveClientRegistry, getSlaveClientRegistryVersion, getSlaveClientRegistryVersion);
3674
+ const sendOverrideVersion = import_react129.useSyncExternalStore(subscribeSendOverride, getSendOverrideVersion, getSendOverrideVersion);
3675
+ const prevMutedRef = import_react129.useRef(new Set);
3676
+ import_react129.useEffect(() => {
3677
+ const slaves = getAllSlaveClients();
3678
+ const nextMuted = new Set;
3679
+ if (routeMode === "local") {
3680
+ for (const name of slaves.keys()) {
3681
+ if (!hasSendOverride(name)) {
3682
+ nextMuted.add(name);
3683
+ }
3684
+ }
3685
+ } else {
3686
+ const selectedSet = new Set(selectedPipes);
3687
+ for (const name of slaves.keys()) {
3688
+ if (!selectedSet.has(name) && !hasSendOverride(name)) {
3689
+ nextMuted.add(name);
3690
+ }
3691
+ }
3692
+ }
3693
+ setMasterMutedPipes(nextMuted);
3694
+ const prevMuted = prevMutedRef.current;
3695
+ for (const name of nextMuted) {
3696
+ if (!prevMuted.has(name)) {
3697
+ setToolUseConfirmQueue((queue) => {
3698
+ const toAbort = queue.filter((item) => item.pipeName === name);
3699
+ for (const item of toAbort) {
3700
+ try {
3701
+ item.onAbort?.();
3702
+ } catch {}
3703
+ }
3704
+ return queue.filter((item) => item.pipeName !== name);
3705
+ });
3706
+ const client = slaves.get(name);
3707
+ if (client?.connected) {
3708
+ try {
3709
+ client.send({ type: "relay_mute" });
3710
+ } catch {}
3711
+ }
3712
+ }
3713
+ }
3714
+ for (const name of prevMuted) {
3715
+ if (!nextMuted.has(name)) {
3716
+ const client = slaves.get(name);
3717
+ if (client?.connected) {
3718
+ try {
3719
+ client.send({ type: "relay_unmute" });
3720
+ } catch {}
3721
+ }
3722
+ }
3723
+ }
3724
+ prevMutedRef.current = nextMuted;
3725
+ }, [routeMode, selectedPipes, registryVersion, sendOverrideVersion, setToolUseConfirmQueue]);
3726
+ import_react129.useEffect(() => {
3727
+ return () => {
3728
+ clearMasterMutedPipes();
3729
+ clearSendOverrides();
3730
+ };
3731
+ }, []);
3732
+ }
3733
+ var import_react129;
3734
+ var init_usePipeMuteSync = __esm(() => {
3735
+ init_AppState();
3736
+ init_pipeTransport();
3737
+ init_pipeMuteState();
3738
+ init_useMasterMonitor();
3739
+ import_react129 = __toESM(require_react(), 1);
3740
+ });
3741
+
3742
+ // src/hooks/usePipeRouter.ts
3743
+ var exports_usePipeRouter = {};
3744
+ __export(exports_usePipeRouter, {
3745
+ usePipeRouter: () => usePipeRouter
3746
+ });
3747
+ function usePipeRouter({ store, setAppState, addNotification }) {
3748
+ const routeToSelectedPipes = import_react130.useCallback((input) => {
3749
+ if (false)
3750
+ ;
3751
+ if (!input.trim() || input.trim().startsWith("/"))
3752
+ return false;
3753
+ const pipeState = store.getState().pipeIpc;
3754
+ const selectedPipes = pipeState?.selectedPipes ?? [];
3755
+ const routeMode = pipeState?.routeMode ?? "selected";
3756
+ if (selectedPipes.length === 0 || routeMode === "local")
3757
+ return false;
3758
+ const { getConnectedSlaveTargets } = (init_useMasterMonitor(), __toCommonJS(exports_useMasterMonitor));
3759
+ const { getPipeIpc: getPipeIpc2 } = (init_pipeTransport(), __toCommonJS(exports_pipeTransport));
3760
+ const targets = getConnectedSlaveTargets(selectedPipes);
3761
+ const pipeIpcForDisplay = getPipeIpc2(store.getState());
3762
+ const discovered = pipeIpcForDisplay.discoveredPipes ?? [];
3763
+ const sentTargetNames = [];
3764
+ const sentTargetLabels = [];
3765
+ const failedTargetNames = [];
3766
+ for (const { name, client } of targets) {
3767
+ try {
3768
+ client.send({ type: "prompt", data: input.trim() });
3769
+ sentTargetNames.push(name);
3770
+ const info = discovered.find((d) => d.pipeName === name);
3771
+ if (info) {
3772
+ const isLan = info.ip && info.ip !== pipeIpcForDisplay.localIp;
3773
+ sentTargetLabels.push(isLan ? `[${info.role}] ${info.hostname}/${info.ip}` : `[${info.role}]`);
3774
+ } else {
3775
+ sentTargetLabels.push(name);
3776
+ }
3777
+ } catch {
3778
+ failedTargetNames.push(name);
3779
+ }
3780
+ }
3781
+ if (sentTargetNames.length > 0) {
3782
+ const promptText = input.trim();
3783
+ const promptTimestamp = new Date().toISOString();
3784
+ setAppState((prev) => {
3785
+ const pipeIpc = getPipeIpc2(prev);
3786
+ const nextSlaves = { ...pipeIpc.slaves };
3787
+ for (const name of sentTargetNames) {
3788
+ const slave = nextSlaves[name];
3789
+ if (!slave)
3790
+ continue;
3791
+ nextSlaves[name] = {
3792
+ ...slave,
3793
+ status: "busy",
3794
+ lastActivityAt: promptTimestamp,
3795
+ lastSummary: `Queued: ${promptText}`,
3796
+ lastEventType: "prompt",
3797
+ history: [
3798
+ ...slave.history,
3799
+ {
3800
+ type: "prompt",
3801
+ content: promptText,
3802
+ from: pipeIpc.serverName ?? "master",
3803
+ timestamp: promptTimestamp
3804
+ }
3805
+ ]
3806
+ };
3807
+ }
3808
+ return {
3809
+ ...prev,
3810
+ pipeIpc: { ...pipeIpc, slaves: nextSlaves }
3811
+ };
3812
+ });
3813
+ addNotification({
3814
+ key: "pipe-route-success",
3815
+ text: `Routed to ${sentTargetLabels.join(", ")}; main can continue other tasks`,
3816
+ color: "success",
3817
+ priority: "immediate",
3818
+ timeoutMs: 3000
3819
+ });
3820
+ } else {
3821
+ addNotification({
3822
+ key: "pipe-route-fallback",
3823
+ text: "Selected pipes are unavailable; processing locally.",
3824
+ color: "warning",
3825
+ priority: "immediate",
3826
+ timeoutMs: 4000
3827
+ });
3828
+ }
3829
+ if (failedTargetNames.length > 0) {
3830
+ addNotification({
3831
+ key: "pipe-route-partial-failure",
3832
+ text: `Failed to send to: ${failedTargetNames.join(", ")}`,
3833
+ color: "warning",
3834
+ priority: "immediate",
3835
+ timeoutMs: 4000
3836
+ });
3837
+ }
3838
+ return sentTargetNames.length > 0;
3839
+ }, [store, setAppState, addNotification]);
3840
+ return { routeToSelectedPipes };
3841
+ }
3842
+ var import_react130;
3843
+ var init_usePipeRouter = __esm(() => {
3844
+ import_react130 = __toESM(require_react(), 1);
2708
3845
  });
2709
3846
 
2710
3847
  // src/components/AntModelSwitchCallout.tsx
@@ -2727,14 +3864,14 @@ __export(exports_UndercoverAutoCallout, {
2727
3864
  UndercoverAutoCallout: () => UndercoverAutoCallout
2728
3865
  });
2729
3866
  function UndercoverAutoCallout({ onDone }) {
2730
- import_react124.useEffect(() => {
3867
+ import_react131.useEffect(() => {
2731
3868
  onDone();
2732
3869
  }, [onDone]);
2733
3870
  return null;
2734
3871
  }
2735
- var import_react124;
3872
+ var import_react131;
2736
3873
  var init_UndercoverAutoCallout = __esm(() => {
2737
- import_react124 = __toESM(require_react(), 1);
3874
+ import_react131 = __toESM(require_react(), 1);
2738
3875
  });
2739
3876
 
2740
3877
  // src/screens/REPL.tsx
@@ -2750,9 +3887,9 @@ init_exportRenderer();
2750
3887
  init_editor();
2751
3888
  init_src();
2752
3889
  import { spawnSync } from "child_process";
2753
- import { dirname, join as join6 } from "path";
3890
+ import { dirname, join as join5 } from "path";
2754
3891
  import { tmpdir } from "os";
2755
- import { writeFile as writeFile3 } from "fs/promises";
3892
+ import { writeFile as writeFile2 } from "fs/promises";
2756
3893
 
2757
3894
  // src/components/CostThresholdDialog.tsx
2758
3895
  init_src();
@@ -2849,7 +3986,7 @@ function formatIdleDuration(minutes) {
2849
3986
  init_notifications();
2850
3987
  init_notifier();
2851
3988
  var React47 = __toESM(require_react(), 1);
2852
- var import_react125 = __toESM(require_react(), 1);
3989
+ var import_react132 = __toESM(require_react(), 1);
2853
3990
 
2854
3991
  // src/services/preventSleep.ts
2855
3992
  init_cleanupRegistry();
@@ -3532,11 +4669,11 @@ function useReplBridge(messages, setMessages, abortControllerRef, commands, main
3532
4669
  }
3533
4670
  if (cancelled)
3534
4671
  return;
3535
- const { initReplBridge } = await import("./chunk-4dxhrqgq.js");
3536
- const { shouldShowAppUpgradeMessage } = await import("./chunk-91aqhy8m.js");
4672
+ const { initReplBridge } = await import("./chunk-dj6r3bps.js");
4673
+ const { shouldShowAppUpgradeMessage } = await import("./chunk-s55ghchb.js");
3537
4674
  let perpetual = false;
3538
4675
  if (true) {
3539
- const { isAssistantMode } = await import("./chunk-0786r5qj.js");
4676
+ const { isAssistantMode } = await import("./chunk-na5yxjbp.js");
3540
4677
  perpetual = isAssistantMode();
3541
4678
  }
3542
4679
  async function handleInboundMessage(msg) {
@@ -3545,7 +4682,7 @@ function useReplBridge(messages, setMessages, abortControllerRef, commands, main
3545
4682
  if (!fields)
3546
4683
  return;
3547
4684
  const { uuid } = fields;
3548
- const { resolveAndPrepend } = await import("./chunk-vjdmt4qp.js");
4685
+ const { resolveAndPrepend } = await import("./chunk-warzed1x.js");
3549
4686
  const rawContent = fields.content;
3550
4687
  let sanitized = typeof rawContent === "string" ? rawContent : rawContent;
3551
4688
  if (false) {}
@@ -16852,46 +17989,11 @@ init_PermissionMode();
16852
17989
  init_slowOperations();
16853
17990
  init_detection();
16854
17991
  init_registry();
17992
+ init_types4();
16855
17993
  init_constants7();
16856
17994
  init_teamHelpers();
16857
17995
  init_tasks();
16858
-
16859
- // src/utils/teamDiscovery.ts
16860
- init_types4();
16861
- init_teamHelpers();
16862
- function getTeammateStatuses(teamName) {
16863
- const teamFile = readTeamFile(teamName);
16864
- if (!teamFile) {
16865
- return [];
16866
- }
16867
- const hiddenPaneIds = new Set(teamFile.hiddenPaneIds ?? []);
16868
- const statuses = [];
16869
- for (const member of teamFile.members) {
16870
- if (member.name === "team-lead") {
16871
- continue;
16872
- }
16873
- const isActive = member.isActive !== false;
16874
- const status = isActive ? "running" : "idle";
16875
- statuses.push({
16876
- name: member.name,
16877
- agentId: member.agentId,
16878
- agentType: member.agentType,
16879
- model: member.model,
16880
- prompt: member.prompt,
16881
- status,
16882
- color: member.color,
16883
- tmuxPaneId: member.tmuxPaneId,
16884
- cwd: member.cwd,
16885
- worktreePath: member.worktreePath,
16886
- isHidden: hiddenPaneIds.has(member.tmuxPaneId),
16887
- backendType: member.backendType && isPaneBackend(member.backendType) ? member.backendType : undefined,
16888
- mode: member.mode
16889
- });
16890
- }
16891
- return statuses;
16892
- }
16893
-
16894
- // src/components/teams/TeamsDialog.tsx
17996
+ init_teamDiscovery();
16895
17997
  init_teammateMailbox();
16896
17998
  init_src();
16897
17999
  init_ThemedText();
@@ -16956,19 +18058,19 @@ function TeamsDialog({ initialTeams, onDone }) {
16956
18058
  memberName: teammateStatuses[selectedIndex].name
16957
18059
  });
16958
18060
  } else if (dialogLevel.type === "teammateDetail" && currentTeammate) {
16959
- viewTeammateOutput(currentTeammate.tmuxPaneId, currentTeammate.backendType);
18061
+ viewTeammateOutput(currentTeammate.tmuxPaneId, currentTeammate.backendType && isPaneBackend(currentTeammate.backendType) ? currentTeammate.backendType : undefined);
16960
18062
  onDone();
16961
18063
  }
16962
18064
  return;
16963
18065
  }
16964
18066
  if (input === "k") {
16965
18067
  if (dialogLevel.type === "teammateList" && teammateStatuses[selectedIndex]) {
16966
- killTeammate(teammateStatuses[selectedIndex].tmuxPaneId, teammateStatuses[selectedIndex].backendType, dialogLevel.teamName, teammateStatuses[selectedIndex].agentId, teammateStatuses[selectedIndex].name, setAppState).then(() => {
18068
+ killTeammate(teammateStatuses[selectedIndex].tmuxPaneId, teammateStatuses[selectedIndex].backendType && isPaneBackend(teammateStatuses[selectedIndex].backendType) ? teammateStatuses[selectedIndex].backendType : undefined, dialogLevel.teamName, teammateStatuses[selectedIndex].agentId, teammateStatuses[selectedIndex].name, setAppState).then(() => {
16967
18069
  setRefreshKey((k) => k + 1);
16968
18070
  setSelectedIndex((prev) => Math.max(0, Math.min(prev, teammateStatuses.length - 2)));
16969
18071
  });
16970
18072
  } else if (dialogLevel.type === "teammateDetail" && currentTeammate) {
16971
- killTeammate(currentTeammate.tmuxPaneId, currentTeammate.backendType, dialogLevel.teamName, currentTeammate.agentId, currentTeammate.name, setAppState);
18073
+ killTeammate(currentTeammate.tmuxPaneId, currentTeammate.backendType && isPaneBackend(currentTeammate.backendType) ? currentTeammate.backendType : undefined, dialogLevel.teamName, currentTeammate.agentId, currentTeammate.name, setAppState);
16972
18074
  goBackToList();
16973
18075
  }
16974
18076
  return;
@@ -17009,7 +18111,7 @@ function TeamsDialog({ initialTeams, onDone }) {
17009
18111
  if (input === "p" && dialogLevel.type === "teammateList") {
17010
18112
  const idleTeammates = teammateStatuses.filter((t) => t.status === "idle");
17011
18113
  if (idleTeammates.length > 0) {
17012
- Promise.all(idleTeammates.map((t) => killTeammate(t.tmuxPaneId, t.backendType, dialogLevel.teamName, t.agentId, t.name, setAppState))).then(() => {
18114
+ Promise.all(idleTeammates.map((t) => killTeammate(t.tmuxPaneId, t.backendType && isPaneBackend(t.backendType) ? t.backendType : undefined, dialogLevel.teamName, t.agentId, t.name, setAppState))).then(() => {
17013
18115
  setRefreshKey((k) => k + 1);
17014
18116
  setSelectedIndex((prev) => Math.max(0, Math.min(prev, teammateStatuses.length - idleTeammates.length - 1)));
17015
18117
  });
@@ -17040,12 +18142,7 @@ function TeamsDialog({ initialTeams, onDone }) {
17040
18142
  }
17041
18143
  return null;
17042
18144
  }
17043
- function TeamDetailView({
17044
- teamName,
17045
- teammates,
17046
- selectedIndex,
17047
- onCancel
17048
- }) {
18145
+ function TeamDetailView({ teamName, teammates, selectedIndex, onCancel }) {
17049
18146
  const subtitle = `${teammates.length} ${teammates.length === 1 ? "teammate" : "teammates"}`;
17050
18147
  const supportsHideShow = getCachedBackend()?.supportsHideShow ?? false;
17051
18148
  const cycleModeShortcut = useShortcutDisplay("confirm:cycleMode", "Confirmation", "shift+tab");
@@ -17087,10 +18184,7 @@ function TeamDetailView({
17087
18184
  ]
17088
18185
  }, undefined, true, undefined, this);
17089
18186
  }
17090
- function TeammateListItem({
17091
- teammate,
17092
- isSelected
17093
- }) {
18187
+ function TeammateListItem({ teammate, isSelected }) {
17094
18188
  const isIdle = teammate.status === "idle";
17095
18189
  const shouldDim = isIdle && !isSelected;
17096
18190
  const mode = teammate.mode ? permissionModeFromString(teammate.mode) : "default";
@@ -17129,11 +18223,7 @@ function TeammateListItem({
17129
18223
  ]
17130
18224
  }, undefined, true, undefined, this);
17131
18225
  }
17132
- function TeammateDetailView({
17133
- teammate,
17134
- teamName,
17135
- onCancel
17136
- }) {
18226
+ function TeammateDetailView({ teammate, teamName, onCancel }) {
17137
18227
  const [promptExpanded, setPromptExpanded] = import_react53.useState(false);
17138
18228
  const cycleModeShortcut = useShortcutDisplay("confirm:cycleMode", "Confirmation", "shift+tab");
17139
18229
  const themeColor = teammate.color ? AGENT_COLOR_TO_THEME_COLOR[teammate.color] : undefined;
@@ -17290,6 +18380,8 @@ async function killTeammate(paneId, backendType, teamName, teammateId, teammateN
17290
18380
  async function viewTeammateOutput(paneId, backendType) {
17291
18381
  if (backendType === "iterm2") {
17292
18382
  await execFileNoThrow(IT2_COMMAND, ["session", "focus", "-s", paneId]);
18383
+ } else if (backendType === "windows-terminal") {
18384
+ logForDebugging(`[TeamsDialog] viewTeammateOutput: Windows Terminal pane ${paneId} \u2014 manual tab switch required`);
17293
18385
  } else {
17294
18386
  const args = isInsideTmuxSync() ? ["select-pane", "-t", paneId] : ["-L", getSwarmSocketName(), "select-pane", "-t", paneId];
17295
18387
  await execFileNoThrow(TMUX_COMMAND, args);
@@ -18505,219 +19597,9 @@ init_src();
18505
19597
  init_overlayContext();
18506
19598
  init_AppState();
18507
19599
  init_fullscreen();
18508
- var import_react60 = __toESM(require_react(), 1);
18509
-
18510
- // src/utils/pipeTransport.ts
18511
- init_envUtils();
18512
- init_log();
18513
- init_ndjsonFramer();
18514
- import { createServer, createConnection } from "net";
18515
- import { mkdir, unlink, readdir, writeFile } from "fs/promises";
18516
- import { join as join2 } from "path";
18517
- import { EventEmitter } from "events";
18518
- function getPipesDir() {
18519
- return join2(getClaudeConfigHomeDir(), "pipes");
18520
- }
18521
- function getPipePath(name) {
18522
- const safeName = name.replace(/[^a-zA-Z0-9_-]/g, "_");
18523
- if (process.platform === "win32") {
18524
- return `\\\\.\\pipe\\claude-code-${safeName}`;
18525
- }
18526
- return join2(getPipesDir(), `${safeName}.sock`);
18527
- }
18528
- async function ensurePipesDir() {
18529
- await mkdir(getPipesDir(), { recursive: true });
18530
- }
18531
-
18532
- class PipeServer extends EventEmitter {
18533
- server = null;
18534
- tcpServer = null;
18535
- clients = new Set;
18536
- handlers = [];
18537
- _tcpAddress = null;
18538
- name;
18539
- socketPath;
18540
- constructor(name) {
18541
- super();
18542
- this.name = name;
18543
- this.socketPath = getPipePath(name);
18544
- }
18545
- get tcpAddress() {
18546
- return this._tcpAddress;
18547
- }
18548
- setupSocket(socket) {
18549
- this.clients.add(socket);
18550
- this.emit("connection", socket);
18551
- attachNdjsonFramer(socket, (msg) => {
18552
- this.emit("message", msg);
18553
- const reply = (replyMsg) => {
18554
- replyMsg.from = replyMsg.from ?? this.name;
18555
- replyMsg.ts = replyMsg.ts ?? new Date().toISOString();
18556
- if (!socket.destroyed) {
18557
- socket.write(JSON.stringify(replyMsg) + `
18558
- `);
18559
- }
18560
- };
18561
- for (const handler of this.handlers) {
18562
- handler(msg, reply);
18563
- }
18564
- });
18565
- socket.on("close", () => {
18566
- this.clients.delete(socket);
18567
- this.emit("disconnect", socket);
18568
- });
18569
- socket.on("error", (err) => {
18570
- this.clients.delete(socket);
18571
- logError(err);
18572
- });
18573
- }
18574
- async start(options) {
18575
- await ensurePipesDir();
18576
- if (process.platform !== "win32") {
18577
- try {
18578
- await unlink(this.socketPath);
18579
- } catch {}
18580
- }
18581
- await new Promise((resolve, reject) => {
18582
- this.server = createServer((socket) => this.setupSocket(socket));
18583
- this.server.on("error", reject);
18584
- this.server.listen(this.socketPath, () => {
18585
- if (process.platform === "win32") {
18586
- const regFile = join2(getPipesDir(), `${this.name}.pipe`);
18587
- const { hostname } = __require("os");
18588
- writeFile(regFile, JSON.stringify({
18589
- pid: process.pid,
18590
- ts: Date.now(),
18591
- ip: getLocalIp(),
18592
- hostname: hostname()
18593
- })).catch(() => {});
18594
- }
18595
- resolve();
18596
- });
18597
- });
18598
- if (options?.enableTcp) {
18599
- await this.startTcpServer(options.tcpPort ?? 0);
18600
- }
18601
- }
18602
- async startTcpServer(port) {
18603
- return new Promise((resolve, reject) => {
18604
- this.tcpServer = createServer((socket) => this.setupSocket(socket));
18605
- this.tcpServer.on("error", reject);
18606
- this.tcpServer.listen(port, "0.0.0.0", () => {
18607
- const addr = this.tcpServer.address();
18608
- if (addr && typeof addr === "object") {
18609
- this._tcpAddress = { host: "0.0.0.0", port: addr.port };
18610
- }
18611
- resolve();
18612
- });
18613
- });
18614
- }
18615
- onMessage(handler) {
18616
- this.handlers.push(handler);
18617
- }
18618
- broadcast(msg) {
18619
- msg.from = msg.from ?? this.name;
18620
- msg.ts = msg.ts ?? new Date().toISOString();
18621
- const line = JSON.stringify(msg) + `
18622
- `;
18623
- for (const client of this.clients) {
18624
- if (!client.destroyed) {
18625
- client.write(line);
18626
- }
18627
- }
18628
- }
18629
- sendTo(socket, msg) {
18630
- msg.from = msg.from ?? this.name;
18631
- msg.ts = msg.ts ?? new Date().toISOString();
18632
- if (!socket.destroyed) {
18633
- socket.write(JSON.stringify(msg) + `
18634
- `);
18635
- }
18636
- }
18637
- get connectionCount() {
18638
- return this.clients.size;
18639
- }
18640
- async close() {
18641
- for (const client of this.clients) {
18642
- client.destroy();
18643
- }
18644
- this.clients.clear();
18645
- if (this.tcpServer) {
18646
- await new Promise((resolve) => {
18647
- this.tcpServer.close(() => {
18648
- this.tcpServer = null;
18649
- this._tcpAddress = null;
18650
- resolve();
18651
- });
18652
- });
18653
- }
18654
- return new Promise((resolve) => {
18655
- if (!this.server) {
18656
- resolve();
18657
- return;
18658
- }
18659
- this.server.close(() => {
18660
- this.server = null;
18661
- if (process.platform === "win32") {
18662
- const regFile = join2(getPipesDir(), `${this.name}.pipe`);
18663
- unlink(regFile).catch(() => {});
18664
- } else {
18665
- unlink(this.socketPath).catch(() => {});
18666
- }
18667
- resolve();
18668
- });
18669
- });
18670
- }
18671
- }
18672
- var DEFAULT_PIPE_IPC = {
18673
- role: "main",
18674
- subIndex: null,
18675
- displayRole: "main",
18676
- serverName: null,
18677
- attachedBy: null,
18678
- localIp: null,
18679
- hostname: null,
18680
- machineId: null,
18681
- mac: null,
18682
- statusVisible: false,
18683
- selectorOpen: false,
18684
- selectedPipes: [],
18685
- routeMode: "selected",
18686
- slaves: {},
18687
- discoveredPipes: []
18688
- };
18689
- function isPipeControlled(pipeIpc) {
18690
- return Boolean(pipeIpc.attachedBy);
18691
- }
18692
- function getPipeDisplayRole(pipeIpc) {
18693
- if (pipeIpc.role === "master") {
18694
- return "master";
18695
- }
18696
- if (pipeIpc.subIndex != null) {
18697
- return `sub-${pipeIpc.subIndex}`;
18698
- }
18699
- return "main";
18700
- }
18701
- function getLocalIp() {
18702
- try {
18703
- const { networkInterfaces } = __require("os");
18704
- const nets = networkInterfaces();
18705
- for (const name of Object.keys(nets)) {
18706
- for (const net of nets[name] ?? []) {
18707
- if (net.family === "IPv4" && !net.internal) {
18708
- return net.address;
18709
- }
18710
- }
18711
- }
18712
- } catch {}
18713
- return "127.0.0.1";
18714
- }
18715
- function getPipeIpc(state) {
18716
- return state?.pipeIpc ?? DEFAULT_PIPE_IPC;
18717
- }
18718
-
18719
- // src/components/PromptInput/PromptInputFooter.tsx
19600
+ init_pipeTransport();
18720
19601
  init_undercover();
19602
+ var import_react60 = __toESM(require_react(), 1);
18721
19603
 
18722
19604
  // src/components/StatusLine.tsx
18723
19605
  init_analytics();
@@ -20118,8 +21000,8 @@ function BridgeStatusIndicator({ bridgeSelected }) {
20118
21000
  }, undefined, true, undefined, this);
20119
21001
  }
20120
21002
  function PipeStatusInline() {
20121
- if (true)
20122
- return null;
21003
+ if (false)
21004
+ ;
20123
21005
  const pipeIpc = useAppState((s) => s.pipeIpc);
20124
21006
  const setAppState = useSetAppState();
20125
21007
  const [cursorIndex, setCursorIndex] = import_react60.useState(0);
@@ -20668,10 +21550,13 @@ function useSwarmBanner() {
20668
21550
  const viewedTeammate = getViewedTeammateTask(state);
20669
21551
  const viewedColor = toThemeColor(viewedTeammate?.identity.color);
20670
21552
  const inProcessMode = isInProcessEnabled();
20671
- const nativePanes = getCachedDetectionResult()?.isNative ?? false;
21553
+ const detection = getCachedDetectionResult();
21554
+ const nativePanes = detection?.isNative ?? false;
21555
+ const backendType = detection?.backend.type;
20672
21556
  if (insideTmux === false && !inProcessMode && !nativePanes) {
21557
+ const hint = backendType === "windows-terminal" ? "View teammates in the Windows Terminal tabs spawned for each teammate" : `View teammates: \`tmux -L ${getSwarmSocketName()} a\``;
20673
21558
  return {
20674
- text: `View teammates: \`tmux -L ${getSwarmSocketName()} a\``,
21559
+ text: hint,
20675
21560
  bgColor: viewedColor
20676
21561
  };
20677
21562
  }
@@ -24860,57 +25745,9 @@ init_bashPermissions();
24860
25745
  init_toolName();
24861
25746
  init_classifierApprovals();
24862
25747
  init_errors();
24863
- import { randomUUID as randomUUID8 } from "crypto";
24864
-
24865
- // src/utils/pipePermissionRelay.ts
24866
- import { randomUUID as randomUUID7 } from "crypto";
24867
- var pendingPipePermissions = new Map;
24868
- var _pipeRelay = null;
24869
- var _relayMuted = false;
24870
- function getPipeSender() {
24871
- return _pipeRelay ?? null;
24872
- }
24873
- function tryRelayPipePermissionRequest(toolUseConfirm, onResponse) {
24874
- if (_relayMuted)
24875
- return null;
24876
- const send = getPipeSender();
24877
- if (!send)
24878
- return null;
24879
- const requestId = randomUUID7();
24880
- const payload = {
24881
- requestId,
24882
- toolName: toolUseConfirm.tool.name,
24883
- toolUseID: toolUseConfirm.toolUseID,
24884
- description: toolUseConfirm.description,
24885
- input: toolUseConfirm.input,
24886
- permissionResult: toolUseConfirm.permissionResult,
24887
- permissionPromptStartTimeMs: toolUseConfirm.permissionPromptStartTimeMs
24888
- };
24889
- pendingPipePermissions.set(requestId, { onResponse });
24890
- send({ type: "permission_request", data: JSON.stringify(payload) });
24891
- return requestId;
24892
- }
24893
- function forgetPipePermissionRequest(requestId) {
24894
- if (!requestId)
24895
- return;
24896
- pendingPipePermissions.delete(requestId);
24897
- }
24898
- function notifyPipePermissionCancel(requestId, reason) {
24899
- if (!requestId)
24900
- return;
24901
- if (_relayMuted)
24902
- return;
24903
- const send = getPipeSender();
24904
- if (!send)
24905
- return;
24906
- send({
24907
- type: "permission_cancel",
24908
- data: JSON.stringify({ requestId, reason })
24909
- });
24910
- }
24911
-
24912
- // src/hooks/toolPermission/handlers/interactiveHandler.ts
25748
+ init_pipePermissionRelay();
24913
25749
  init_permissions();
25750
+ import { randomUUID as randomUUID8 } from "crypto";
24914
25751
 
24915
25752
  // src/hooks/toolPermission/PermissionContext.ts
24916
25753
  init_analytics();
@@ -26204,6 +27041,7 @@ function TeammateViewHeader() {
26204
27041
  }
26205
27042
 
26206
27043
  // src/screens/REPL.tsx
27044
+ init_pipeTransport();
26207
27045
  init_useTasksV2();
26208
27046
  init_projectOnboardingState();
26209
27047
  init_sessionStart();
@@ -27455,73 +28293,7 @@ init_messages();
27455
28293
  init_model();
27456
28294
  init_settings();
27457
28295
  init_events();
27458
-
27459
- // src/components/FeedbackSurvey/submitTranscriptShare.ts
27460
- init_axios();
27461
- init_auth();
27462
- init_debug();
27463
- init_errors();
27464
- init_http();
27465
- init_messages();
27466
- init_sessionStorage();
27467
- init_slowOperations();
27468
- init_Feedback();
27469
- import { readFile, stat } from "fs/promises";
27470
- async function submitTranscriptShare(messages, trigger, appearanceId) {
27471
- try {
27472
- logForDebugging("Collecting transcript for sharing", { level: "info" });
27473
- const transcript = normalizeMessagesForAPI(messages);
27474
- const agentIds = extractAgentIdsFromMessages(messages);
27475
- const subagentTranscripts = await loadSubagentTranscripts(agentIds);
27476
- let rawTranscriptJsonl;
27477
- try {
27478
- const transcriptPath = getTranscriptPath();
27479
- const { size } = await stat(transcriptPath);
27480
- if (size <= MAX_TRANSCRIPT_READ_BYTES) {
27481
- rawTranscriptJsonl = await readFile(transcriptPath, "utf-8");
27482
- } else {
27483
- logForDebugging(`Skipping raw transcript read: file too large (${size} bytes)`, { level: "warn" });
27484
- }
27485
- } catch {}
27486
- const data = {
27487
- trigger,
27488
- version: "2.1.888",
27489
- platform: process.platform,
27490
- transcript,
27491
- subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
27492
- rawTranscriptJsonl
27493
- };
27494
- const content = redactSensitiveInfo(jsonStringify(data));
27495
- await checkAndRefreshOAuthTokenIfNeeded();
27496
- const authResult = getAuthHeaders();
27497
- if (authResult.error) {
27498
- return { success: false };
27499
- }
27500
- const headers = {
27501
- "Content-Type": "application/json",
27502
- "User-Agent": getUserAgent(),
27503
- ...authResult.headers
27504
- };
27505
- const response = await axios_default.post("https://api.anthropic.com/api/claude_code_shared_session_transcripts", { content, appearance_id: appearanceId }, {
27506
- headers,
27507
- timeout: 30000
27508
- });
27509
- if (response.status === 200 || response.status === 201) {
27510
- const result = response.data;
27511
- logForDebugging("Transcript shared successfully", { level: "info" });
27512
- return {
27513
- success: true,
27514
- transcriptId: result?.transcript_id
27515
- };
27516
- }
27517
- return { success: false };
27518
- } catch (err) {
27519
- logForDebugging(errorMessage(err), {
27520
- level: "error"
27521
- });
27522
- return { success: false };
27523
- }
27524
- }
28296
+ init_submitTranscriptShare();
27525
28297
 
27526
28298
  // src/components/FeedbackSurvey/useSurveyState.tsx
27527
28299
  var import_react97 = __toESM(require_react(), 1);
@@ -27849,6 +28621,7 @@ init_envUtils();
27849
28621
  init_memoryFileDetection();
27850
28622
  init_messages();
27851
28623
  init_events();
28624
+ init_submitTranscriptShare();
27852
28625
  var import_react99 = __toESM(require_react(), 1);
27853
28626
  var HIDE_THANKS_AFTER_MS = 3000;
27854
28627
  var MEMORY_SURVEY_GATE = "tengu_dunwich_bell";
@@ -28676,7 +29449,7 @@ init_marketplaceHelpers();
28676
29449
  init_marketplaceManager();
28677
29450
  init_officialMarketplace();
28678
29451
  init_officialMarketplaceGcs();
28679
- import { join as join3 } from "path";
29452
+ import { join as join2 } from "path";
28680
29453
  function isOfficialMarketplaceAutoInstallDisabled() {
28681
29454
  return isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL);
28682
29455
  }
@@ -28765,7 +29538,7 @@ async function checkAndInstallOfficialMarketplace() {
28765
29538
  return { installed: false, skipped: true, reason: "policy_blocked" };
28766
29539
  }
28767
29540
  const cacheDir = getMarketplacesCacheDir();
28768
- const installLocation = join3(cacheDir, OFFICIAL_MARKETPLACE_NAME);
29541
+ const installLocation = join2(cacheDir, OFFICIAL_MARKETPLACE_NAME);
28769
29542
  const gcsSha = await fetchOfficialMarketplaceFromGcs(installLocation, cacheDir);
28770
29543
  if (gcsSha !== null) {
28771
29544
  const known = await loadKnownMarketplacesConfig();
@@ -29537,7 +30310,7 @@ init_config2();
29537
30310
  init_debug();
29538
30311
  init_log();
29539
30312
  var React37 = __toESM(require_react(), 1);
29540
- import { extname as extname2, join as join4 } from "path";
30313
+ import { extname as extname2, join as join3 } from "path";
29541
30314
 
29542
30315
  // src/utils/plugins/lspRecommendation.ts
29543
30316
  import { extname } from "path";
@@ -29861,7 +30634,7 @@ function useLspPluginRecommendation() {
29861
30634
  case "yes":
29862
30635
  installPluginAndNotify(pluginId, pluginName, "lsp-plugin", addNotification, async (pluginData) => {
29863
30636
  logForDebugging(`[useLspPluginRecommendation] Installing plugin: ${pluginId}`);
29864
- const localSourcePath = typeof pluginData.entry.source === "string" ? join4(pluginData.marketplaceInstallLocation, pluginData.entry.source) : undefined;
30637
+ const localSourcePath = typeof pluginData.entry.source === "string" ? join3(pluginData.marketplaceInstallLocation, pluginData.entry.source) : undefined;
29865
30638
  await cacheAndRegisterPlugin(pluginId, pluginData.entry, "user", undefined, localSourcePath);
29866
30639
  const settings = getSettingsForSource("userSettings");
29867
30640
  updateSettingsForSource("userSettings", {
@@ -30803,7 +31576,7 @@ var MIGRATIONS = [
30803
31576
  return;
30804
31577
  return {
30805
31578
  key: "opus-pro-update",
30806
- text: isLegacyRemap ? "Model updated to Opus 4.6 \xB7 Set CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP=1 to opt out" : "Model updated to Opus 4.6",
31579
+ text: isLegacyRemap ? "Model updated to Opus 4.7 \xB7 Set CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP=1 to opt out" : "Model updated to Opus 4.7",
30807
31580
  color: "suggestion",
30808
31581
  priority: "high",
30809
31582
  timeoutMs: isLegacyRemap ? 8000 : 3000
@@ -31322,8 +32095,8 @@ init_sessionStorage();
31322
32095
  init_overlayContext();
31323
32096
  var React43 = __toESM(require_react(), 1);
31324
32097
  var jsx_dev_runtime95 = __toESM(require_jsx_dev_runtime(), 1);
31325
- import { join as join5 } from "path";
31326
- import { stat as stat2, writeFile as writeFile2 } from "fs/promises";
32098
+ import { join as join4 } from "path";
32099
+ import { stat as stat2, writeFile } from "fs/promises";
31327
32100
  var MAX_VISIBLE_LINES = 24;
31328
32101
  var CHROME_LINES = 11;
31329
32102
  function getDateStamp() {
@@ -31411,8 +32184,8 @@ Implement this plan.`,
31411
32184
  });
31412
32185
  break;
31413
32186
  case "cancel": {
31414
- const savePath = join5(getCwd(), `${getDateStamp()}-ultraplan.md`);
31415
- await writeFile2(savePath, plan, { encoding: "utf-8" });
32187
+ const savePath = join4(getCwd(), `${getDateStamp()}-ultraplan.md`);
32188
+ await writeFile(savePath, plan, { encoding: "utf-8" });
31416
32189
  setMessages((prev) => [
31417
32190
  ...prev,
31418
32191
  createSystemMessage(`Ultraplan rejected \xB7 Plan saved to ${toRelativePath(savePath)}`, "suggestion")
@@ -32234,23 +33007,13 @@ var PROACTIVE_NULL = () => null;
32234
33007
  var SUGGEST_BG_PR_NOOP = (_p, _n) => false;
32235
33008
  var useProactive2 = (init_useProactive(), __toCommonJS(exports_useProactive)).useProactive;
32236
33009
  var useScheduledTasks2 = (init_useScheduledTasks(), __toCommonJS(exports_useScheduledTasks)).useScheduledTasks;
32237
- var useMasterMonitor = () => {
32238
- return;
32239
- };
32240
- var useSlaveNotifications = () => {
32241
- return;
32242
- };
32243
- var usePipeIpc = () => {
32244
- return;
32245
- };
32246
- var usePipeRelay = () => ({ relayPipeMessage: () => false, pipeReturnHadErrorRef: { current: false } });
32247
- var usePipePermissionForward = () => {
32248
- return;
32249
- };
32250
- var usePipeMuteSync = () => {
32251
- return;
32252
- };
32253
- var usePipeRouter = () => ({ routeToSelectedPipes: () => false });
33010
+ var useMasterMonitor = (init_useMasterMonitor(), __toCommonJS(exports_useMasterMonitor)).useMasterMonitor;
33011
+ var useSlaveNotifications2 = (init_useSlaveNotifications(), __toCommonJS(exports_useSlaveNotifications)).useSlaveNotifications;
33012
+ var usePipeIpc2 = (init_usePipeIpc(), __toCommonJS(exports_usePipeIpc)).usePipeIpc;
33013
+ var usePipeRelay2 = (init_usePipeRelay(), __toCommonJS(exports_usePipeRelay)).usePipeRelay;
33014
+ var usePipePermissionForward2 = (init_usePipePermissionForward(), __toCommonJS(exports_usePipePermissionForward)).usePipePermissionForward;
33015
+ var usePipeMuteSync2 = (init_usePipeMuteSync(), __toCommonJS(exports_usePipeMuteSync)).usePipeMuteSync;
33016
+ var usePipeRouter2 = (init_usePipeRouter(), __toCommonJS(exports_usePipeRouter)).usePipeRouter;
32254
33017
  var AntModelSwitchCallout2 = process.env.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).AntModelSwitchCallout : null;
32255
33018
  var shouldShowAntModelSwitch = process.env.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).shouldShowModelSwitchCallout : () => false;
32256
33019
  var UndercoverAutoCallout2 = process.env.USER_TYPE === "ant" ? (init_UndercoverAutoCallout(), __toCommonJS(exports_UndercoverAutoCallout)).UndercoverAutoCallout : null;
@@ -32362,7 +33125,7 @@ function TranscriptSearchBar({
32362
33125
  };
32363
33126
  }, []);
32364
33127
  const warmDone = indexStatus !== "building";
32365
- import_react125.useEffect(() => {
33128
+ import_react132.useEffect(() => {
32366
33129
  if (!warmDone)
32367
33130
  return;
32368
33131
  jumpRef.current?.setSearchQuery(query2);
@@ -32432,8 +33195,8 @@ function AnimatedTerminalTitle({
32432
33195
  noPrefix
32433
33196
  }) {
32434
33197
  const terminalFocused = useTerminalFocus();
32435
- const [frame, setFrame] = import_react125.useState(0);
32436
- import_react125.useEffect(() => {
33198
+ const [frame, setFrame] = import_react132.useState(0);
33199
+ import_react132.useEffect(() => {
32437
33200
  if (disabled || noPrefix || !isAnimating || !terminalFocused)
32438
33201
  return;
32439
33202
  const interval = setInterval((setFrame2) => setFrame2((f) => (f + 1) % TITLE_ANIMATION_FRAMES.length), TITLE_ANIMATION_INTERVAL_MS, setFrame);
@@ -32471,15 +33234,15 @@ function REPL({
32471
33234
  thinkingConfig
32472
33235
  }) {
32473
33236
  const isRemoteSession = !!remoteSessionConfig;
32474
- const titleDisabled = import_react125.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE), []);
32475
- const moreRightEnabled = import_react125.useMemo(() => process.env.USER_TYPE === "ant" && isEnvTruthy(process.env.CLAUDE_MORERIGHT), []);
32476
- const disableVirtualScroll = import_react125.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL), []);
33237
+ const titleDisabled = import_react132.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE), []);
33238
+ const moreRightEnabled = import_react132.useMemo(() => process.env.USER_TYPE === "ant" && isEnvTruthy(process.env.CLAUDE_MORERIGHT), []);
33239
+ const disableVirtualScroll = import_react132.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL), []);
32477
33240
  const disableMessageActions = false;
32478
- import_react125.useEffect(() => {
33241
+ import_react132.useEffect(() => {
32479
33242
  logForDebugging(`[REPL:mount] REPL mounted, disabled=${disabled}`);
32480
33243
  return () => logForDebugging(`[REPL:unmount] REPL unmounting`);
32481
33244
  }, [disabled]);
32482
- const [mainThreadAgentDefinition, setMainThreadAgentDefinition] = import_react125.useState(initialMainThreadAgentDefinition);
33245
+ const [mainThreadAgentDefinition, setMainThreadAgentDefinition] = import_react132.useState(initialMainThreadAgentDefinition);
32483
33246
  const toolPermissionContext = useAppState((s) => s.toolPermissionContext);
32484
33247
  const verbose = useAppState((s) => s.verbose);
32485
33248
  const mcp = useAppState((s) => s.mcp);
@@ -32502,7 +33265,7 @@ function REPL({
32502
33265
  const setAppState = useSetAppState();
32503
33266
  const viewedLocalAgent = viewingAgentTaskId ? tasks[viewingAgentTaskId] : undefined;
32504
33267
  const needsBootstrap = isLocalAgentTask(viewedLocalAgent) && viewedLocalAgent.retain && !viewedLocalAgent.diskLoaded;
32505
- import_react125.useEffect(() => {
33268
+ import_react132.useEffect(() => {
32506
33269
  if (!viewingAgentTaskId || !needsBootstrap)
32507
33270
  return;
32508
33271
  const taskId = viewingAgentTaskId;
@@ -32531,40 +33294,40 @@ function REPL({
32531
33294
  const store = useAppStateStore();
32532
33295
  const terminal = useTerminalNotification();
32533
33296
  const mainLoopModel = useMainLoopModel();
32534
- const [localCommands, setLocalCommands] = import_react125.useState(initialCommands);
33297
+ const [localCommands, setLocalCommands] = import_react132.useState(initialCommands);
32535
33298
  useSkillsChange(isRemoteSession ? undefined : getProjectRoot(), setLocalCommands);
32536
33299
  const proactiveActive = React47.useSyncExternalStore(proactiveModule3?.subscribeToProactiveChanges ?? PROACTIVE_NO_OP_SUBSCRIBE, proactiveModule3?.isProactiveActive ?? PROACTIVE_FALSE);
32537
33300
  const proactiveNextTickAt = React47.useSyncExternalStore(proactiveModule3?.subscribeToProactiveChanges ?? PROACTIVE_NO_OP_SUBSCRIBE, proactiveModule3?.getNextTickAt ?? PROACTIVE_NULL);
32538
33301
  const isBriefOnly = useAppState((s) => s.isBriefOnly);
32539
- const localTools = import_react125.useMemo(() => getTools(toolPermissionContext), [toolPermissionContext, proactiveActive, isBriefOnly]);
33302
+ const localTools = import_react132.useMemo(() => getTools(toolPermissionContext), [toolPermissionContext, proactiveActive, isBriefOnly]);
32540
33303
  useKickOffCheckAndDisableAutoModeIfNeeded();
32541
- const [dynamicMcpConfig, setDynamicMcpConfig] = import_react125.useState(initialDynamicMcpConfig);
32542
- const onChangeDynamicMcpConfig = import_react125.useCallback((config) => {
33304
+ const [dynamicMcpConfig, setDynamicMcpConfig] = import_react132.useState(initialDynamicMcpConfig);
33305
+ const onChangeDynamicMcpConfig = import_react132.useCallback((config) => {
32543
33306
  setDynamicMcpConfig(config);
32544
33307
  }, [setDynamicMcpConfig]);
32545
- const [screen, setScreen] = import_react125.useState("prompt");
32546
- const [showAllInTranscript, setShowAllInTranscript] = import_react125.useState(false);
32547
- const [dumpMode, setDumpMode] = import_react125.useState(false);
32548
- const [editorStatus, setEditorStatus] = import_react125.useState("");
32549
- const editorGenRef = import_react125.useRef(0);
32550
- const editorTimerRef = import_react125.useRef(undefined);
32551
- const editorRenderingRef = import_react125.useRef(false);
33308
+ const [screen, setScreen] = import_react132.useState("prompt");
33309
+ const [showAllInTranscript, setShowAllInTranscript] = import_react132.useState(false);
33310
+ const [dumpMode, setDumpMode] = import_react132.useState(false);
33311
+ const [editorStatus, setEditorStatus] = import_react132.useState("");
33312
+ const editorGenRef = import_react132.useRef(0);
33313
+ const editorTimerRef = import_react132.useRef(undefined);
33314
+ const editorRenderingRef = import_react132.useRef(false);
32552
33315
  const { addNotification, removeNotification } = useNotifications();
32553
33316
  let trySuggestBgPRIntercept = SUGGEST_BG_PR_NOOP;
32554
33317
  const mcpClients = useMergedClients(initialMcpClients, mcp.clients);
32555
- const [ideSelection, setIDESelection] = import_react125.useState(undefined);
32556
- const [ideToInstallExtension, setIDEToInstallExtension] = import_react125.useState(null);
32557
- const [ideInstallationStatus, setIDEInstallationStatus] = import_react125.useState(null);
32558
- const [showIdeOnboarding, setShowIdeOnboarding] = import_react125.useState(false);
32559
- const [showModelSwitchCallout, setShowModelSwitchCallout] = import_react125.useState(() => {
33318
+ const [ideSelection, setIDESelection] = import_react132.useState(undefined);
33319
+ const [ideToInstallExtension, setIDEToInstallExtension] = import_react132.useState(null);
33320
+ const [ideInstallationStatus, setIDEInstallationStatus] = import_react132.useState(null);
33321
+ const [showIdeOnboarding, setShowIdeOnboarding] = import_react132.useState(false);
33322
+ const [showModelSwitchCallout, setShowModelSwitchCallout] = import_react132.useState(() => {
32560
33323
  if (process.env.USER_TYPE === "ant") {
32561
33324
  return shouldShowAntModelSwitch();
32562
33325
  }
32563
33326
  return false;
32564
33327
  });
32565
- const [showEffortCallout, setShowEffortCallout] = import_react125.useState(() => shouldShowEffortCallout(mainLoopModel));
33328
+ const [showEffortCallout, setShowEffortCallout] = import_react132.useState(() => shouldShowEffortCallout(mainLoopModel));
32566
33329
  const showRemoteCallout = useAppState((s) => s.showRemoteCallout);
32567
- const [showDesktopUpsellStartup, setShowDesktopUpsellStartup] = import_react125.useState(() => shouldShowDesktopUpsellStartup());
33330
+ const [showDesktopUpsellStartup, setShowDesktopUpsellStartup] = import_react132.useState(() => shouldShowDesktopUpsellStartup());
32568
33331
  useModelMigrationNotifications();
32569
33332
  useCanSwitchToExistingSubscription();
32570
33333
  useIDEStatusIndicator({ ideSelection, mcpClients, ideInstallationStatus });
@@ -32584,12 +33347,12 @@ function REPL({
32584
33347
  useTeammateLifecycleNotification();
32585
33348
  const { recommendation: lspRecommendation, handleResponse: handleLspResponse } = useLspPluginRecommendation();
32586
33349
  const { recommendation: hintRecommendation, handleResponse: handleHintResponse } = useClaudeCodeHintRecommendation();
32587
- const combinedInitialTools = import_react125.useMemo(() => {
33350
+ const combinedInitialTools = import_react132.useMemo(() => {
32588
33351
  return [...localTools, ...initialTools];
32589
33352
  }, [localTools, initialTools]);
32590
33353
  useManagePlugins({ enabled: !isRemoteSession });
32591
33354
  const tasksV2 = useTasksV2WithCollapseEffect();
32592
- import_react125.useEffect(() => {
33355
+ import_react132.useEffect(() => {
32593
33356
  if (isRemoteSession)
32594
33357
  return;
32595
33358
  performStartupChecks(setAppState);
@@ -32599,7 +33362,7 @@ function REPL({
32599
33362
  enabled: !isRemoteSession
32600
33363
  });
32601
33364
  const mergedTools = useMergedTools(combinedInitialTools, mcp.tools, toolPermissionContext);
32602
- const { tools, allowedAgentTypes } = import_react125.useMemo(() => {
33365
+ const { tools, allowedAgentTypes } = import_react132.useMemo(() => {
32603
33366
  if (!mainThreadAgentDefinition) {
32604
33367
  return {
32605
33368
  tools: mergedTools,
@@ -32614,15 +33377,15 @@ function REPL({
32614
33377
  }, [mainThreadAgentDefinition, mergedTools]);
32615
33378
  const commandsWithPlugins = useMergedCommands(localCommands, plugins.commands);
32616
33379
  const mergedCommands = useMergedCommands(commandsWithPlugins, mcp.commands);
32617
- const commands = import_react125.useMemo(() => disableSlashCommands ? [] : mergedCommands, [disableSlashCommands, mergedCommands]);
33380
+ const commands = import_react132.useMemo(() => disableSlashCommands ? [] : mergedCommands, [disableSlashCommands, mergedCommands]);
32618
33381
  useIdeLogging(isRemoteSession ? EMPTY_MCP_CLIENTS2 : mcp.clients);
32619
33382
  useIdeSelection(isRemoteSession ? EMPTY_MCP_CLIENTS2 : mcp.clients, setIDESelection);
32620
- const [streamMode, setStreamMode] = import_react125.useState("responding");
32621
- const streamModeRef = import_react125.useRef(streamMode);
33383
+ const [streamMode, setStreamMode] = import_react132.useState("responding");
33384
+ const streamModeRef = import_react132.useRef(streamMode);
32622
33385
  streamModeRef.current = streamMode;
32623
- const [streamingToolUses, setStreamingToolUses] = import_react125.useState([]);
32624
- const [streamingThinking, setStreamingThinking] = import_react125.useState(null);
32625
- import_react125.useEffect(() => {
33386
+ const [streamingToolUses, setStreamingToolUses] = import_react132.useState([]);
33387
+ const [streamingThinking, setStreamingThinking] = import_react132.useState(null);
33388
+ import_react132.useEffect(() => {
32626
33389
  if (streamingThinking && !streamingThinking.isStreaming && streamingThinking.streamingEndedAt) {
32627
33390
  const elapsed = Date.now() - streamingThinking.streamingEndedAt;
32628
33391
  const remaining = 30000 - elapsed;
@@ -32634,14 +33397,14 @@ function REPL({
32634
33397
  }
32635
33398
  }
32636
33399
  }, [streamingThinking]);
32637
- const [abortController, setAbortController] = import_react125.useState(null);
32638
- const abortControllerRef = import_react125.useRef(null);
33400
+ const [abortController, setAbortController] = import_react132.useState(null);
33401
+ const abortControllerRef = import_react132.useRef(null);
32639
33402
  abortControllerRef.current = abortController;
32640
- const sendBridgeResultRef = import_react125.useRef(() => {});
32641
- const restoreMessageSyncRef = import_react125.useRef(() => {});
32642
- const scrollRef = import_react125.useRef(null);
32643
- const modalScrollRef = import_react125.useRef(null);
32644
- const lastUserScrollTsRef = import_react125.useRef(0);
33403
+ const sendBridgeResultRef = import_react132.useRef(() => {});
33404
+ const restoreMessageSyncRef = import_react132.useRef(() => {});
33405
+ const scrollRef = import_react132.useRef(null);
33406
+ const modalScrollRef = import_react132.useRef(null);
33407
+ const lastUserScrollTsRef = import_react132.useRef(0);
32645
33408
  const queryGuard = React47.useRef(new QueryGuard).current;
32646
33409
  const isQueryActive = React47.useSyncExternalStore(queryGuard.subscribe, queryGuard.getSnapshot);
32647
33410
  const [isExternalLoading, setIsExternalLoadingRaw] = React47.useState(remoteSessionConfig?.hasInitialPrompt ?? false);
@@ -32672,8 +33435,8 @@ function REPL({
32672
33435
  const focusedInputDialogRef = React47.useRef(undefined);
32673
33436
  const PROMPT_SUPPRESSION_MS = 1500;
32674
33437
  const [isPromptInputActive, setIsPromptInputActive] = React47.useState(false);
32675
- const [autoUpdaterResult, setAutoUpdaterResult] = import_react125.useState(null);
32676
- import_react125.useEffect(() => {
33438
+ const [autoUpdaterResult, setAutoUpdaterResult] = import_react132.useState(null);
33439
+ import_react132.useEffect(() => {
32677
33440
  if (autoUpdaterResult?.notifications) {
32678
33441
  autoUpdaterResult.notifications.forEach((notification) => {
32679
33442
  addNotification({
@@ -32684,7 +33447,7 @@ function REPL({
32684
33447
  });
32685
33448
  }
32686
33449
  }, [autoUpdaterResult, addNotification]);
32687
- import_react125.useEffect(() => {
33450
+ import_react132.useEffect(() => {
32688
33451
  if (isFullscreenEnvEnabled()) {
32689
33452
  maybeGetTmuxMouseHint().then((hint) => {
32690
33453
  if (hint) {
@@ -32697,22 +33460,22 @@ function REPL({
32697
33460
  });
32698
33461
  }
32699
33462
  }, []);
32700
- const [showUndercoverCallout, setShowUndercoverCallout] = import_react125.useState(false);
32701
- import_react125.useEffect(() => {
33463
+ const [showUndercoverCallout, setShowUndercoverCallout] = import_react132.useState(false);
33464
+ import_react132.useEffect(() => {
32702
33465
  if (process.env.USER_TYPE === "ant") {
32703
33466
  (async () => {
32704
- const { isInternalModelRepo } = await import("./chunk-brjsspt6.js");
33467
+ const { isInternalModelRepo } = await import("./chunk-4qzt1dqf.js");
32705
33468
  await isInternalModelRepo();
32706
- const { shouldShowUndercoverAutoNotice } = await import("./chunk-pzzr97ff.js");
33469
+ const { shouldShowUndercoverAutoNotice } = await import("./chunk-9w4zt45w.js");
32707
33470
  if (shouldShowUndercoverAutoNotice()) {
32708
33471
  setShowUndercoverCallout(true);
32709
33472
  }
32710
33473
  })();
32711
33474
  }
32712
33475
  }, []);
32713
- const [toolJSX, setToolJSXInternal] = import_react125.useState(null);
32714
- const localJSXCommandRef = import_react125.useRef(null);
32715
- const setToolJSX = import_react125.useCallback((args) => {
33476
+ const [toolJSX, setToolJSXInternal] = import_react132.useState(null);
33477
+ const localJSXCommandRef = import_react132.useRef(null);
33478
+ const setToolJSX = import_react132.useCallback((args) => {
32716
33479
  if (args?.isLocalJSXCommand) {
32717
33480
  const { clearLocalJSX: _, ...rest } = args;
32718
33481
  localJSXCommandRef.current = { ...rest, isLocalJSXCommand: true };
@@ -32733,21 +33496,21 @@ function REPL({
32733
33496
  }
32734
33497
  setToolJSXInternal(args);
32735
33498
  }, []);
32736
- const [toolUseConfirmQueue, setToolUseConfirmQueue] = import_react125.useState([]);
32737
- const [permissionStickyFooter, setPermissionStickyFooter] = import_react125.useState(null);
32738
- const [sandboxPermissionRequestQueue, setSandboxPermissionRequestQueue] = import_react125.useState([]);
32739
- const [promptQueue, setPromptQueue] = import_react125.useState([]);
32740
- const sandboxBridgeCleanupRef = import_react125.useRef(new Map);
33499
+ const [toolUseConfirmQueue, setToolUseConfirmQueue] = import_react132.useState([]);
33500
+ const [permissionStickyFooter, setPermissionStickyFooter] = import_react132.useState(null);
33501
+ const [sandboxPermissionRequestQueue, setSandboxPermissionRequestQueue] = import_react132.useState([]);
33502
+ const [promptQueue, setPromptQueue] = import_react132.useState([]);
33503
+ const sandboxBridgeCleanupRef = import_react132.useRef(new Map);
32741
33504
  const terminalTitleFromRename = useAppState((s) => s.settings.terminalTitleFromRename) !== false;
32742
33505
  const sessionTitle = terminalTitleFromRename ? getCurrentSessionTitle(getSessionId()) : undefined;
32743
- const [haikuTitle, setHaikuTitle] = import_react125.useState();
32744
- const haikuTitleAttemptedRef = import_react125.useRef((initialMessages?.length ?? 0) > 0);
33506
+ const [haikuTitle, setHaikuTitle] = import_react132.useState();
33507
+ const haikuTitleAttemptedRef = import_react132.useRef((initialMessages?.length ?? 0) > 0);
32745
33508
  const agentTitle = mainThreadAgentDefinition?.agentType;
32746
33509
  const terminalTitle = sessionTitle ?? agentTitle ?? haikuTitle ?? "Claude Code";
32747
33510
  const isWaitingForApproval = toolUseConfirmQueue.length > 0 || promptQueue.length > 0 || pendingWorkerRequest || pendingSandboxRequest;
32748
33511
  const isShowingLocalJSXCommand = toolJSX?.isLocalJSXCommand === true && toolJSX?.jsx != null;
32749
33512
  const titleIsAnimating = isLoading && !isWaitingForApproval && !isShowingLocalJSXCommand;
32750
- import_react125.useEffect(() => {
33513
+ import_react132.useEffect(() => {
32751
33514
  if (isLoading && !isWaitingForApproval && !isShowingLocalJSXCommand) {
32752
33515
  startPreventSleep();
32753
33516
  return () => stopPreventSleep();
@@ -32755,7 +33518,7 @@ function REPL({
32755
33518
  }, [isLoading, isWaitingForApproval, isShowingLocalJSXCommand]);
32756
33519
  const sessionStatus = isWaitingForApproval || isShowingLocalJSXCommand ? "waiting" : isLoading ? "busy" : "idle";
32757
33520
  const waitingFor = sessionStatus !== "waiting" ? undefined : toolUseConfirmQueue.length > 0 ? `approve ${toolUseConfirmQueue[0].tool.name}` : pendingWorkerRequest ? "worker request" : pendingSandboxRequest ? "sandbox request" : isShowingLocalJSXCommand ? "dialog open" : "input needed";
32758
- import_react125.useEffect(() => {
33521
+ import_react132.useEffect(() => {
32759
33522
  if (true) {
32760
33523
  updateSessionActivity({ status: sessionStatus, waitingFor });
32761
33524
  }
@@ -32763,14 +33526,14 @@ function REPL({
32763
33526
  const tabStatusGateEnabled = getFeatureValue_CACHED_MAY_BE_STALE("tengu_terminal_sidebar", false);
32764
33527
  const showStatusInTerminalTab = tabStatusGateEnabled && (getGlobalConfig().showStatusInTerminalTab ?? false);
32765
33528
  useTabStatus(titleDisabled || !showStatusInTerminalTab ? null : sessionStatus);
32766
- import_react125.useEffect(() => {
33529
+ import_react132.useEffect(() => {
32767
33530
  registerLeaderToolUseConfirmQueue(setToolUseConfirmQueue);
32768
33531
  return () => unregisterLeaderToolUseConfirmQueue();
32769
33532
  }, [setToolUseConfirmQueue]);
32770
- const [messages, rawSetMessages] = import_react125.useState(initialMessages ?? []);
32771
- const messagesRef = import_react125.useRef(messages);
32772
- const idleHintShownRef = import_react125.useRef(false);
32773
- const setMessages = import_react125.useCallback((action) => {
33533
+ const [messages, rawSetMessages] = import_react132.useState(initialMessages ?? []);
33534
+ const messagesRef = import_react132.useRef(messages);
33535
+ const idleHintShownRef = import_react132.useRef(false);
33536
+ const setMessages = import_react132.useCallback((action) => {
32774
33537
  const prev = messagesRef.current;
32775
33538
  const next = typeof action === "function" ? action(messagesRef.current) : action;
32776
33539
  messagesRef.current = next;
@@ -32787,7 +33550,7 @@ function REPL({
32787
33550
  }
32788
33551
  rawSetMessages(next);
32789
33552
  }, []);
32790
- const setUserInputOnProcessing = import_react125.useCallback((input) => {
33553
+ const setUserInputOnProcessing = import_react132.useCallback((input) => {
32791
33554
  if (input !== undefined) {
32792
33555
  userInputBaselineRef.current = messagesRef.current.length;
32793
33556
  userMessagePendingRef.current = true;
@@ -32800,17 +33563,17 @@ function REPL({
32800
33563
  if (true) {
32801
33564
  useAwaySummary(messages, setMessages, isLoading);
32802
33565
  }
32803
- const [cursor, setCursor] = import_react125.useState(null);
32804
- const cursorNavRef = import_react125.useRef(null);
32805
- const unseenDivider = import_react125.useMemo(() => computeUnseenDivider(messages, dividerIndex), [dividerIndex, messages.length]);
32806
- const repinScroll = import_react125.useCallback(() => {
33566
+ const [cursor, setCursor] = import_react132.useState(null);
33567
+ const cursorNavRef = import_react132.useRef(null);
33568
+ const unseenDivider = import_react132.useMemo(() => computeUnseenDivider(messages, dividerIndex), [dividerIndex, messages.length]);
33569
+ const repinScroll = import_react132.useCallback(() => {
32807
33570
  scrollRef.current?.scrollToBottom();
32808
33571
  onRepin();
32809
33572
  setCursor(null);
32810
33573
  }, [onRepin, setCursor]);
32811
33574
  const lastMsg = messages.at(-1);
32812
33575
  const lastMsgIsHuman = lastMsg != null && isHumanTurn(lastMsg);
32813
- import_react125.useEffect(() => {
33576
+ import_react132.useEffect(() => {
32814
33577
  if (lastMsgIsHuman) {
32815
33578
  repinScroll();
32816
33579
  }
@@ -32821,7 +33584,7 @@ function REPL({
32821
33584
  scrollRef,
32822
33585
  onPrepend: shiftDivider
32823
33586
  });
32824
- const composedOnScroll = import_react125.useCallback((sticky, handle) => {
33587
+ const composedOnScroll = import_react132.useCallback((sticky, handle) => {
32825
33588
  lastUserScrollTsRef.current = Date.now();
32826
33589
  if (sticky) {
32827
33590
  onRepin();
@@ -32835,17 +33598,17 @@ function REPL({
32835
33598
  }
32836
33599
  }, [onRepin, onScrollAway, maybeLoadOlder, setAppState]);
32837
33600
  const awaitPendingHooks = useDeferredHookMessages(pendingHookMessages, setMessages);
32838
- const deferredMessages = import_react125.useDeferredValue(messages);
33601
+ const deferredMessages = import_react132.useDeferredValue(messages);
32839
33602
  const deferredBehind = messages.length - deferredMessages.length;
32840
33603
  if (deferredBehind > 0) {
32841
33604
  logForDebugging(`[useDeferredValue] Messages deferred by ${deferredBehind} (${deferredMessages.length}\u2192${messages.length})`);
32842
33605
  }
32843
- const [frozenTranscriptState, setFrozenTranscriptState] = import_react125.useState(null);
32844
- const [inputValue, setInputValueRaw] = import_react125.useState(() => consumeEarlyInput());
32845
- const inputValueRef = import_react125.useRef(inputValue);
33606
+ const [frozenTranscriptState, setFrozenTranscriptState] = import_react132.useState(null);
33607
+ const [inputValue, setInputValueRaw] = import_react132.useState(() => consumeEarlyInput());
33608
+ const inputValueRef = import_react132.useRef(inputValue);
32846
33609
  inputValueRef.current = inputValue;
32847
- const insertTextRef = import_react125.useRef(null);
32848
- const setInputValue = import_react125.useCallback((value) => {
33610
+ const insertTextRef = import_react132.useRef(null);
33611
+ const setInputValue = import_react132.useCallback((value) => {
32849
33612
  if (trySuggestBgPRIntercept(inputValueRef.current, value))
32850
33613
  return;
32851
33614
  if (inputValueRef.current === "" && value !== "" && Date.now() - lastUserScrollTsRef.current >= RECENT_SCROLL_REPIN_WINDOW_MS) {
@@ -32855,20 +33618,20 @@ function REPL({
32855
33618
  setInputValueRaw(value);
32856
33619
  setIsPromptInputActive(value.trim().length > 0);
32857
33620
  }, [setIsPromptInputActive, repinScroll, trySuggestBgPRIntercept]);
32858
- import_react125.useEffect(() => {
33621
+ import_react132.useEffect(() => {
32859
33622
  if (inputValue.trim().length === 0)
32860
33623
  return;
32861
33624
  const timer = setTimeout(setIsPromptInputActive, PROMPT_SUPPRESSION_MS, false);
32862
33625
  return () => clearTimeout(timer);
32863
33626
  }, [inputValue]);
32864
- const [inputMode, setInputMode] = import_react125.useState("prompt");
32865
- const [stashedPrompt, setStashedPrompt] = import_react125.useState();
32866
- const handleRemoteInit = import_react125.useCallback((remoteSlashCommands) => {
33627
+ const [inputMode, setInputMode] = import_react132.useState("prompt");
33628
+ const [stashedPrompt, setStashedPrompt] = import_react132.useState();
33629
+ const handleRemoteInit = import_react132.useCallback((remoteSlashCommands) => {
32867
33630
  const remoteCommandSet = new Set(remoteSlashCommands);
32868
33631
  setLocalCommands((prev) => prev.filter((cmd) => remoteCommandSet.has(cmd.name) || REMOTE_SAFE_COMMANDS.has(cmd)));
32869
33632
  }, [setLocalCommands]);
32870
- const [inProgressToolUseIDs, setInProgressToolUseIDs] = import_react125.useState(new Set);
32871
- const hasInterruptibleToolInProgressRef = import_react125.useRef(false);
33633
+ const [inProgressToolUseIDs, setInProgressToolUseIDs] = import_react132.useState(new Set);
33634
+ const hasInterruptibleToolInProgressRef = import_react132.useRef(false);
32872
33635
  const remoteSession = useRemoteSession({
32873
33636
  config: remoteSessionConfig,
32874
33637
  setMessages,
@@ -32895,11 +33658,11 @@ function REPL({
32895
33658
  tools: combinedInitialTools
32896
33659
  });
32897
33660
  const activeRemote = sshRemote.isRemoteMode ? sshRemote : directConnect.isRemoteMode ? directConnect : remoteSession;
32898
- const [pastedContents, setPastedContents] = import_react125.useState({});
32899
- const [submitCount, setSubmitCount] = import_react125.useState(0);
32900
- const responseLengthRef = import_react125.useRef(0);
32901
- const apiMetricsRef = import_react125.useRef([]);
32902
- const setResponseLength = import_react125.useCallback((f) => {
33661
+ const [pastedContents, setPastedContents] = import_react132.useState({});
33662
+ const [submitCount, setSubmitCount] = import_react132.useState(0);
33663
+ const responseLengthRef = import_react132.useRef(0);
33664
+ const apiMetricsRef = import_react132.useRef([]);
33665
+ const setResponseLength = import_react132.useCallback((f) => {
32903
33666
  const prev = responseLengthRef.current;
32904
33667
  responseLengthRef.current = f(prev);
32905
33668
  if (responseLengthRef.current > prev) {
@@ -32911,47 +33674,47 @@ function REPL({
32911
33674
  }
32912
33675
  }
32913
33676
  }, []);
32914
- const [streamingText, setStreamingText] = import_react125.useState(null);
33677
+ const [streamingText, setStreamingText] = import_react132.useState(null);
32915
33678
  const reducedMotion = useAppState((s) => s.settings.prefersReducedMotion) ?? false;
32916
33679
  const showStreamingText = !reducedMotion && !hasCursorUpViewportYankBug();
32917
- const onStreamingText = import_react125.useCallback((f) => {
33680
+ const onStreamingText = import_react132.useCallback((f) => {
32918
33681
  if (!showStreamingText)
32919
33682
  return;
32920
33683
  setStreamingText(f);
32921
33684
  }, [showStreamingText]);
32922
33685
  const visibleStreamingText = streamingText && showStreamingText ? streamingText.substring(0, streamingText.lastIndexOf(`
32923
33686
  `) + 1) || null : null;
32924
- const [lastQueryCompletionTime, setLastQueryCompletionTime] = import_react125.useState(0);
32925
- const [spinnerMessage, setSpinnerMessage] = import_react125.useState(null);
32926
- const [spinnerColor, setSpinnerColor] = import_react125.useState(null);
32927
- const [spinnerShimmerColor, setSpinnerShimmerColor] = import_react125.useState(null);
32928
- const [isMessageSelectorVisible, setIsMessageSelectorVisible] = import_react125.useState(false);
32929
- const [messageSelectorPreselect, setMessageSelectorPreselect] = import_react125.useState(undefined);
32930
- const [showCostDialog, setShowCostDialog] = import_react125.useState(false);
32931
- const [conversationId, setConversationId] = import_react125.useState(randomUUID11());
32932
- const [idleReturnPending, setIdleReturnPending] = import_react125.useState(null);
32933
- const skipIdleCheckRef = import_react125.useRef(false);
32934
- const lastQueryCompletionTimeRef = import_react125.useRef(lastQueryCompletionTime);
33687
+ const [lastQueryCompletionTime, setLastQueryCompletionTime] = import_react132.useState(0);
33688
+ const [spinnerMessage, setSpinnerMessage] = import_react132.useState(null);
33689
+ const [spinnerColor, setSpinnerColor] = import_react132.useState(null);
33690
+ const [spinnerShimmerColor, setSpinnerShimmerColor] = import_react132.useState(null);
33691
+ const [isMessageSelectorVisible, setIsMessageSelectorVisible] = import_react132.useState(false);
33692
+ const [messageSelectorPreselect, setMessageSelectorPreselect] = import_react132.useState(undefined);
33693
+ const [showCostDialog, setShowCostDialog] = import_react132.useState(false);
33694
+ const [conversationId, setConversationId] = import_react132.useState(randomUUID11());
33695
+ const [idleReturnPending, setIdleReturnPending] = import_react132.useState(null);
33696
+ const skipIdleCheckRef = import_react132.useRef(false);
33697
+ const lastQueryCompletionTimeRef = import_react132.useRef(lastQueryCompletionTime);
32935
33698
  lastQueryCompletionTimeRef.current = lastQueryCompletionTime;
32936
- const [contentReplacementStateRef] = import_react125.useState(() => ({
33699
+ const [contentReplacementStateRef] = import_react132.useState(() => ({
32937
33700
  current: provisionContentReplacementState(initialMessages, initialContentReplacements)
32938
33701
  }));
32939
- const [haveShownCostDialog, setHaveShownCostDialog] = import_react125.useState(getGlobalConfig().hasAcknowledgedCostThreshold);
32940
- const [vimMode, setVimMode] = import_react125.useState("INSERT");
32941
- const [showBashesDialog, setShowBashesDialog] = import_react125.useState(false);
32942
- const [isSearchingHistory, setIsSearchingHistory] = import_react125.useState(false);
32943
- const [isHelpOpen, setIsHelpOpen] = import_react125.useState(false);
32944
- import_react125.useEffect(() => {
33702
+ const [haveShownCostDialog, setHaveShownCostDialog] = import_react132.useState(getGlobalConfig().hasAcknowledgedCostThreshold);
33703
+ const [vimMode, setVimMode] = import_react132.useState("INSERT");
33704
+ const [showBashesDialog, setShowBashesDialog] = import_react132.useState(false);
33705
+ const [isSearchingHistory, setIsSearchingHistory] = import_react132.useState(false);
33706
+ const [isHelpOpen, setIsHelpOpen] = import_react132.useState(false);
33707
+ import_react132.useEffect(() => {
32945
33708
  if (ultraplanPendingChoice && showBashesDialog) {
32946
33709
  setShowBashesDialog(false);
32947
33710
  }
32948
33711
  }, [ultraplanPendingChoice, showBashesDialog]);
32949
33712
  const isTerminalFocused = useTerminalFocus();
32950
- const terminalFocusRef = import_react125.useRef(isTerminalFocused);
33713
+ const terminalFocusRef = import_react132.useRef(isTerminalFocused);
32951
33714
  terminalFocusRef.current = isTerminalFocused;
32952
33715
  const [theme] = useTheme();
32953
33716
  const tipPickedThisTurnRef = React47.useRef(false);
32954
- const pickNewSpinnerTip = import_react125.useCallback(() => {
33717
+ const pickNewSpinnerTip = import_react132.useCallback(() => {
32955
33718
  if (tipPickedThisTurnRef.current)
32956
33719
  return;
32957
33720
  tipPickedThisTurnRef.current = true;
@@ -32981,7 +33744,7 @@ function REPL({
32981
33744
  }
32982
33745
  });
32983
33746
  }, [setAppState, theme]);
32984
- const resetLoadingState = import_react125.useCallback(() => {
33747
+ const resetLoadingState = import_react132.useCallback(() => {
32985
33748
  setIsExternalLoading(false);
32986
33749
  setUserInputOnProcessing(undefined);
32987
33750
  responseLengthRef.current = 0;
@@ -32995,8 +33758,8 @@ function REPL({
32995
33758
  endInteractionSpan();
32996
33759
  clearSpeculativeChecks();
32997
33760
  }, [pickNewSpinnerTip]);
32998
- const hasRunningTeammates = import_react125.useMemo(() => getAllInProcessTeammateTasks(tasks).some((t) => t.status === "running"), [tasks]);
32999
- import_react125.useEffect(() => {
33761
+ const hasRunningTeammates = import_react132.useMemo(() => getAllInProcessTeammateTasks(tasks).some((t) => t.status === "running"), [tasks]);
33762
+ import_react132.useEffect(() => {
33000
33763
  if (!hasRunningTeammates && swarmStartTimeRef.current !== null) {
33001
33764
  const totalMs = Date.now() - swarmStartTimeRef.current;
33002
33765
  const deferredBudget = swarmBudgetInfoRef.current;
@@ -33008,8 +33771,8 @@ function REPL({
33008
33771
  ]);
33009
33772
  }
33010
33773
  }, [hasRunningTeammates, setMessages]);
33011
- const safeYoloMessageShownRef = import_react125.useRef(false);
33012
- import_react125.useEffect(() => {
33774
+ const safeYoloMessageShownRef = import_react132.useRef(false);
33775
+ import_react132.useEffect(() => {
33013
33776
  if (true) {
33014
33777
  if (toolPermissionContext.mode !== "auto") {
33015
33778
  safeYoloMessageShownRef.current = false;
@@ -33037,8 +33800,8 @@ function REPL({
33037
33800
  return () => clearTimeout(timer);
33038
33801
  }
33039
33802
  }, [toolPermissionContext.mode, setMessages]);
33040
- const worktreeTipShownRef = import_react125.useRef(false);
33041
- import_react125.useEffect(() => {
33803
+ const worktreeTipShownRef = import_react132.useRef(false);
33804
+ import_react132.useEffect(() => {
33042
33805
  if (worktreeTipShownRef.current)
33043
33806
  return;
33044
33807
  const wt = getCurrentWorktreeSession();
@@ -33053,7 +33816,7 @@ function REPL({
33053
33816
  createSystemMessage(`Worktree creation took ${secs}s. For large repos, set \`worktree.sparsePaths\` in .claude/settings.json to check out only the directories you need \u2014 e.g. \`{"worktree": {"sparsePaths": ["src", "packages/foo"]}}\`.`, "info")
33054
33817
  ]);
33055
33818
  }, [setMessages]);
33056
- const onlySleepToolActive = import_react125.useMemo(() => {
33819
+ const onlySleepToolActive = import_react132.useMemo(() => {
33057
33820
  const lastAssistant = messages.findLast((m) => m.type === "assistant");
33058
33821
  if (lastAssistant?.type !== "assistant")
33059
33822
  return false;
@@ -33078,7 +33841,7 @@ function REPL({
33078
33841
  const feedbackSurveyOriginal = useFeedbackSurvey(messages, isLoading, submitCount, "session", hasActivePrompt);
33079
33842
  const skillImprovementSurvey = useSkillImprovementSurvey(setMessages);
33080
33843
  const showIssueFlagBanner = useIssueFlagBanner(messages, submitCount);
33081
- const feedbackSurvey = import_react125.useMemo(() => ({
33844
+ const feedbackSurvey = import_react132.useMemo(() => ({
33082
33845
  ...feedbackSurveyOriginal,
33083
33846
  handleSelect: (selected) => {
33084
33847
  didAutoRunIssueRef.current = false;
@@ -33105,7 +33868,7 @@ function REPL({
33105
33868
  ...prev,
33106
33869
  fileHistory: fileHistoryState
33107
33870
  })));
33108
- const resume = import_react125.useCallback(async (sessionId, log, entrypoint) => {
33871
+ const resume = import_react132.useCallback(async (sessionId, log, entrypoint) => {
33109
33872
  const resumeStart = performance.now();
33110
33873
  try {
33111
33874
  const messages2 = deserializeMessages(log.messages);
@@ -33165,7 +33928,7 @@ function REPL({
33165
33928
  saveCurrentSessionCosts();
33166
33929
  resetCostState();
33167
33930
  switchSession(asSessionId(sessionId), log.fullPath ? dirname(log.fullPath) : null);
33168
- const { renameRecordingForSession } = await import("./chunk-fta35khb.js");
33931
+ const { renameRecordingForSession } = await import("./chunk-yezeptjf.js");
33169
33932
  await renameRecordingForSession();
33170
33933
  await resetSessionFilePointer();
33171
33934
  clearSessionMetadata();
@@ -33213,20 +33976,20 @@ function REPL({
33213
33976
  throw error;
33214
33977
  }
33215
33978
  }, [resetLoadingState, setAppState]);
33216
- const [initialReadFileState] = import_react125.useState(() => createFileStateCacheWithSizeLimit(READ_FILE_STATE_CACHE_SIZE));
33217
- const readFileState = import_react125.useRef(initialReadFileState);
33218
- const bashTools = import_react125.useRef(new Set);
33219
- const bashToolsProcessedIdx = import_react125.useRef(0);
33220
- const discoveredSkillNamesRef = import_react125.useRef(new Set);
33221
- const loadedNestedMemoryPathsRef = import_react125.useRef(new Set);
33222
- const restoreReadFileState = import_react125.useCallback((messages2, cwd) => {
33979
+ const [initialReadFileState] = import_react132.useState(() => createFileStateCacheWithSizeLimit(READ_FILE_STATE_CACHE_SIZE));
33980
+ const readFileState = import_react132.useRef(initialReadFileState);
33981
+ const bashTools = import_react132.useRef(new Set);
33982
+ const bashToolsProcessedIdx = import_react132.useRef(0);
33983
+ const discoveredSkillNamesRef = import_react132.useRef(new Set);
33984
+ const loadedNestedMemoryPathsRef = import_react132.useRef(new Set);
33985
+ const restoreReadFileState = import_react132.useCallback((messages2, cwd) => {
33223
33986
  const extracted = extractReadFilesFromMessages(messages2, cwd, READ_FILE_STATE_CACHE_SIZE);
33224
33987
  readFileState.current = mergeFileStateCaches(readFileState.current, extracted);
33225
33988
  for (const tool of extractBashToolsFromMessages(messages2)) {
33226
33989
  bashTools.current.add(tool);
33227
33990
  }
33228
33991
  }, []);
33229
- import_react125.useEffect(() => {
33992
+ import_react132.useEffect(() => {
33230
33993
  if (initialMessages && initialMessages.length > 0) {
33231
33994
  restoreReadFileState(initialMessages, getOriginalCwd());
33232
33995
  restoreRemoteAgentTasks({
@@ -33237,10 +34000,10 @@ function REPL({
33237
34000
  }
33238
34001
  }, []);
33239
34002
  const { status: apiKeyStatus, reverify } = useApiKeyVerification();
33240
- const [autoRunIssueReason, setAutoRunIssueReason] = import_react125.useState(null);
33241
- const didAutoRunIssueRef = import_react125.useRef(false);
33242
- const [exitFlow, setExitFlow] = import_react125.useState(null);
33243
- const [isExiting, setIsExiting] = import_react125.useState(false);
34003
+ const [autoRunIssueReason, setAutoRunIssueReason] = import_react132.useState(null);
34004
+ const didAutoRunIssueRef = import_react132.useRef(false);
34005
+ const [exitFlow, setExitFlow] = import_react132.useState(null);
34006
+ const [isExiting, setIsExiting] = import_react132.useState(false);
33244
34007
  const showingCostDialog = !isLoading && showCostDialog;
33245
34008
  function getFocusedInputDialog() {
33246
34009
  if (isExiting || exitFlow)
@@ -33289,7 +34052,7 @@ function REPL({
33289
34052
  const focusedInputDialog = getFocusedInputDialog();
33290
34053
  const hasSuppressedDialogs = isPromptInputActive && (sandboxPermissionRequestQueue[0] || toolUseConfirmQueue[0] || promptQueue[0] || workerSandboxPermissions.queue[0] || elicitation.queue[0] || showingCostDialog);
33291
34054
  focusedInputDialogRef.current = focusedInputDialog;
33292
- import_react125.useEffect(() => {
34055
+ import_react132.useEffect(() => {
33293
34056
  if (!isLoading)
33294
34057
  return;
33295
34058
  const isPaused = focusedInputDialog === "tool-permission";
@@ -33301,8 +34064,8 @@ function REPL({
33301
34064
  pauseStartTimeRef.current = null;
33302
34065
  }
33303
34066
  }, [focusedInputDialog, isLoading]);
33304
- const prevDialogRef = import_react125.useRef(focusedInputDialog);
33305
- import_react125.useLayoutEffect(() => {
34067
+ const prevDialogRef = import_react132.useRef(focusedInputDialog);
34068
+ import_react132.useLayoutEffect(() => {
33306
34069
  const was = prevDialogRef.current === "tool-permission";
33307
34070
  const now = focusedInputDialog === "tool-permission";
33308
34071
  if (was !== now)
@@ -33343,7 +34106,7 @@ function REPL({
33343
34106
  setAbortController(null);
33344
34107
  mrOnTurnComplete(messagesRef.current, true);
33345
34108
  }
33346
- const handleQueuedCommandOnCancel = import_react125.useCallback(() => {
34109
+ const handleQueuedCommandOnCancel = import_react132.useCallback(() => {
33347
34110
  const result = popAllEditable(inputValue, 0);
33348
34111
  if (!result)
33349
34112
  return;
@@ -33375,7 +34138,7 @@ function REPL({
33375
34138
  inputValue,
33376
34139
  streamMode
33377
34140
  };
33378
- import_react125.useEffect(() => {
34141
+ import_react132.useEffect(() => {
33379
34142
  const totalCost = getTotalCostUSD();
33380
34143
  if (totalCost >= 5 && !showCostDialog && !haveShownCostDialog) {
33381
34144
  logEvent("tengu_cost_threshold_reached", {});
@@ -33385,7 +34148,7 @@ function REPL({
33385
34148
  }
33386
34149
  }
33387
34150
  }, [messages, showCostDialog, haveShownCostDialog]);
33388
- const sandboxAskCallback = import_react125.useCallback(async (hostPattern) => {
34151
+ const sandboxAskCallback = import_react132.useCallback(async (hostPattern) => {
33389
34152
  if (isAgentSwarmsEnabled() && isSwarmWorker()) {
33390
34153
  const requestId = generateSandboxRequestId();
33391
34154
  const sent = await sendSandboxPermissionRequestViaMailbox(hostPattern.host, requestId);
@@ -33460,7 +34223,7 @@ function REPL({
33460
34223
  }
33461
34224
  });
33462
34225
  }, [setAppState, store]);
33463
- import_react125.useEffect(() => {
34226
+ import_react132.useEffect(() => {
33464
34227
  const reason = SandboxManager.getSandboxUnavailableReason();
33465
34228
  if (!reason)
33466
34229
  return;
@@ -33499,7 +34262,7 @@ Error: sandbox required but unavailable: ${reason}
33499
34262
  gracefulShutdownSync(1, "other");
33500
34263
  });
33501
34264
  }
33502
- const setToolPermissionContext = import_react125.useCallback((context, options) => {
34265
+ const setToolPermissionContext = import_react132.useCallback((context, options) => {
33503
34266
  setAppState((prev) => ({
33504
34267
  ...prev,
33505
34268
  toolPermissionContext: {
@@ -33516,15 +34279,15 @@ Error: sandbox required but unavailable: ${reason}
33516
34279
  });
33517
34280
  }, setToolUseConfirmQueue);
33518
34281
  }, [setAppState, setToolUseConfirmQueue]);
33519
- import_react125.useEffect(() => {
34282
+ import_react132.useEffect(() => {
33520
34283
  registerLeaderSetToolPermissionContext(setToolPermissionContext);
33521
34284
  return () => unregisterLeaderSetToolPermissionContext();
33522
34285
  }, [setToolPermissionContext]);
33523
34286
  const canUseTool = useCanUseTool_default(setToolUseConfirmQueue, setToolPermissionContext);
33524
- const requestPrompt = import_react125.useCallback((title, toolInputSummary) => (request) => new Promise((resolve, reject) => {
34287
+ const requestPrompt = import_react132.useCallback((title, toolInputSummary) => (request) => new Promise((resolve, reject) => {
33525
34288
  setPromptQueue((prev) => [...prev, { request, title, toolInputSummary, resolve, reject }]);
33526
34289
  }), []);
33527
- const getToolUseContext = import_react125.useCallback((messages2, newMessages, abortController2, mainLoopModel2) => {
34290
+ const getToolUseContext = import_react132.useCallback((messages2, newMessages, abortController2, mainLoopModel2) => {
33528
34291
  const s = store.getState();
33529
34292
  const computeTools = () => {
33530
34293
  const state = store.getState();
@@ -33655,7 +34418,7 @@ Error: sandbox required but unavailable: ${reason}
33655
34418
  appendSystemPrompt,
33656
34419
  setConversationId
33657
34420
  ]);
33658
- const handleBackgroundQuery = import_react125.useCallback(() => {
34421
+ const handleBackgroundQuery = import_react132.useCallback(() => {
33659
34422
  abortController?.abort("background");
33660
34423
  const removedNotifications = removeByFilter((cmd) => cmd.mode === "task-notification");
33661
34424
  (async () => {
@@ -33715,7 +34478,7 @@ Error: sandbox required but unavailable: ${reason}
33715
34478
  setAbortController,
33716
34479
  onBackgroundQuery: handleBackgroundQuery
33717
34480
  });
33718
- const onQueryEvent = import_react125.useCallback((event) => {
34481
+ const onQueryEvent = import_react132.useCallback((event) => {
33719
34482
  handleMessageFromStream(event, (newMessage) => {
33720
34483
  if (isCompactBoundaryMessage(newMessage)) {
33721
34484
  if (isFullscreenEnvEnabled()) {
@@ -33754,7 +34517,33 @@ Error: sandbox required but unavailable: ${reason}
33754
34517
  proactiveModule3?.setContextBlocked(false);
33755
34518
  }
33756
34519
  }
33757
- if (false) {}
34520
+ if (newMessage.type === "assistant") {
34521
+ const msg = newMessage.message;
34522
+ const contentBlocks = msg?.content ?? newMessage.content ?? [];
34523
+ const textParts = [];
34524
+ if (Array.isArray(contentBlocks)) {
34525
+ for (const block of contentBlocks) {
34526
+ if (typeof block === "string") {
34527
+ textParts.push(block);
34528
+ } else if (block?.type === "text" && block.text) {
34529
+ textParts.push(block.text);
34530
+ }
34531
+ }
34532
+ } else if (typeof contentBlocks === "string") {
34533
+ textParts.push(contentBlocks);
34534
+ }
34535
+ const text = textParts.join(`
34536
+ `).trim();
34537
+ if ("isApiErrorMessage" in newMessage && newMessage.isApiErrorMessage) {
34538
+ pipeReturnHadErrorRef.current = true;
34539
+ relayPipeMessage({
34540
+ type: "error",
34541
+ data: text || "Slave request failed"
34542
+ });
34543
+ } else if (text) {
34544
+ relayPipeMessage({ type: "stream", data: text });
34545
+ }
34546
+ }
33758
34547
  }, (newContent) => {
33759
34548
  setResponseLength((length) => length + newContent.length);
33760
34549
  }, setStreamMode, setStreamingToolUses, (tombstonedMessage) => {
@@ -33772,7 +34561,7 @@ Error: sandbox required but unavailable: ${reason}
33772
34561
  });
33773
34562
  }, onStreamingText);
33774
34563
  }, [setMessages, setResponseLength, setStreamMode, setStreamingToolUses, setStreamingThinking, onStreamingText]);
33775
- const onQueryImpl = import_react125.useCallback(async (messagesIncludingNewMessages, newMessages, abortController2, shouldQuery, additionalAllowedTools, mainLoopModelParam, effort) => {
34564
+ const onQueryImpl = import_react132.useCallback(async (messagesIncludingNewMessages, newMessages, abortController2, shouldQuery, additionalAllowedTools, mainLoopModelParam, effort) => {
33776
34565
  if (shouldQuery) {
33777
34566
  const freshClients = mergeClients(initialMcpClients, store.getState().mcp.clients);
33778
34567
  diagnosticTracker.handleQueryStart(freshClients);
@@ -33877,7 +34666,15 @@ Error: sandbox required but unavailable: ${reason}
33877
34666
  _fireCompanionObserver(messagesRef.current, (reaction) => setAppState((prev) => prev.companionReaction === reaction ? prev : { ...prev, companionReaction: reaction }));
33878
34667
  }
33879
34668
  queryCheckpoint("query_end");
33880
- if (false) {}
34669
+ if (true) {
34670
+ if (abortController2.signal.aborted) {
34671
+ pipeReturnHadErrorRef.current = true;
34672
+ relayPipeMessage({
34673
+ type: "error",
34674
+ data: "Slave request was interrupted before completion."
34675
+ });
34676
+ }
34677
+ }
33881
34678
  if (process.env.USER_TYPE === "ant" && apiMetricsRef.current.length > 0) {
33882
34679
  const entries = apiMetricsRef.current;
33883
34680
  const ttfts = entries.map((e) => e.ttftMs);
@@ -33929,7 +34726,7 @@ Error: sandbox required but unavailable: ${reason}
33929
34726
  sessionTitle,
33930
34727
  titleDisabled
33931
34728
  ]);
33932
- const onQuery = import_react125.useCallback(async (newMessages, abortController2, shouldQuery, additionalAllowedTools, mainLoopModelParam, onBeforeQueryCallback, input, effort) => {
34729
+ const onQuery = import_react132.useCallback(async (newMessages, abortController2, shouldQuery, additionalAllowedTools, mainLoopModelParam, onBeforeQueryCallback, input, effort) => {
33933
34730
  if (isAgentSwarmsEnabled()) {
33934
34731
  const teamName = getTeamName();
33935
34732
  const agentName = getAgentName();
@@ -33973,7 +34770,13 @@ Error: sandbox required but unavailable: ${reason}
33973
34770
  try {
33974
34771
  await onQueryImpl(latestMessages, newMessages, abortController2, shouldQuery, additionalAllowedTools, mainLoopModelParam, effort);
33975
34772
  } catch (error) {
33976
- if (false) {}
34773
+ if (true) {
34774
+ pipeReturnHadErrorRef.current = true;
34775
+ relayPipeMessage({
34776
+ type: "error",
34777
+ data: error instanceof Error ? error.message : String(error)
34778
+ });
34779
+ }
33977
34780
  throw error;
33978
34781
  }
33979
34782
  } finally {
@@ -33982,7 +34785,12 @@ Error: sandbox required but unavailable: ${reason}
33982
34785
  skipIdleCheckRef.current = false;
33983
34786
  resetLoadingState();
33984
34787
  await mrOnTurnComplete(messagesRef.current, abortController2.signal.aborted);
33985
- if (false) {}
34788
+ if (!pipeReturnHadErrorRef.current) {
34789
+ relayPipeMessage({
34790
+ type: "done",
34791
+ data: ""
34792
+ });
34793
+ }
33986
34794
  sendBridgeResultRef.current();
33987
34795
  if (process.env.USER_TYPE === "ant" && !abortController2.signal.aborted) {
33988
34796
  setAppState((prev) => {
@@ -34036,8 +34844,8 @@ Error: sandbox required but unavailable: ${reason}
34036
34844
  }
34037
34845
  }
34038
34846
  }, [onQueryImpl, setAppState, resetLoadingState, queryGuard, mrOnBeforeQuery, mrOnTurnComplete]);
34039
- const initialMessageRef = import_react125.useRef(false);
34040
- import_react125.useEffect(() => {
34847
+ const initialMessageRef = import_react132.useRef(false);
34848
+ import_react132.useEffect(() => {
34041
34849
  const pending = initialMessage;
34042
34850
  if (!pending || isLoading || initialMessageRef.current)
34043
34851
  return;
@@ -34045,7 +34853,7 @@ Error: sandbox required but unavailable: ${reason}
34045
34853
  async function processInitialMessage(initialMsg) {
34046
34854
  if (initialMsg.clearContext) {
34047
34855
  const oldPlanSlug = initialMsg.message.planContent ? getPlanSlug() : undefined;
34048
- const { clearConversation: clearConversation2 } = await import("./chunk-pkbsek0t.js");
34856
+ const { clearConversation: clearConversation2 } = await import("./chunk-zyptmnvp.js");
34049
34857
  await clearConversation2({
34050
34858
  setMessages,
34051
34859
  readFileState: readFileState.current,
@@ -34105,7 +34913,7 @@ Error: sandbox required but unavailable: ${reason}
34105
34913
  }
34106
34914
  processInitialMessage(pending);
34107
34915
  }, [initialMessage, isLoading, setMessages, setAppState, onQuery, mainLoopModel, tools]);
34108
- const onSubmit = import_react125.useCallback(async (input, helpers, speculationAccept, options) => {
34916
+ const onSubmit = import_react132.useCallback(async (input, helpers, speculationAccept, options) => {
34109
34917
  repinScroll();
34110
34918
  if (true) {
34111
34919
  proactiveModule3?.resumeProactive();
@@ -34259,7 +35067,16 @@ Error: sandbox required but unavailable: ${reason}
34259
35067
  setUserInputOnProcessing(input);
34260
35068
  resetTimingRefs();
34261
35069
  }
34262
- if (false) {}
35070
+ if (true) {
35071
+ setAppState((prev) => ({
35072
+ ...prev,
35073
+ attribution: incrementPromptCount(prev.attribution, (snapshot) => {
35074
+ recordAttributionSnapshot(snapshot).catch((error) => {
35075
+ logForDebugging(`Attribution: Failed to save snapshot: ${error}`);
35076
+ });
35077
+ })
35078
+ }));
35079
+ }
34263
35080
  }
34264
35081
  if (speculationAccept) {
34265
35082
  const { queryRequired } = await handleSpeculationAccept(speculationAccept.state, speculationAccept.speculationSessionTimeSavedMs, speculationAccept.setAppState, input, {
@@ -34383,7 +35200,7 @@ Error: sandbox required but unavailable: ${reason}
34383
35200
  awaitPendingHooks,
34384
35201
  repinScroll
34385
35202
  ]);
34386
- const onAgentSubmit = import_react125.useCallback(async (input, task, helpers) => {
35203
+ const onAgentSubmit = import_react132.useCallback(async (input, task, helpers) => {
34387
35204
  if (isLocalAgentTask(task)) {
34388
35205
  appendMessageToLocalAgent(task.id, createUserMessage({ content: input }), setAppState);
34389
35206
  if (task.status === "running") {
@@ -34416,7 +35233,7 @@ Error: sandbox required but unavailable: ${reason}
34416
35233
  helpers.setCursorOffset(0);
34417
35234
  helpers.clearBuffer();
34418
35235
  }, [setAppState, setInputValue, getToolUseContext, canUseTool, mainLoopModel, addNotification]);
34419
- const handleAutoRunIssue = import_react125.useCallback(() => {
35236
+ const handleAutoRunIssue = import_react132.useCallback(() => {
34420
35237
  const command = autoRunIssueReason ? getAutoRunCommand(autoRunIssueReason) : "/issue";
34421
35238
  setAutoRunIssueReason(null);
34422
35239
  onSubmit(command, {
@@ -34427,10 +35244,10 @@ Error: sandbox required but unavailable: ${reason}
34427
35244
  logForDebugging(`Auto-run ${command} failed: ${errorMessage(err)}`);
34428
35245
  });
34429
35246
  }, [onSubmit, autoRunIssueReason]);
34430
- const handleCancelAutoRunIssue = import_react125.useCallback(() => {
35247
+ const handleCancelAutoRunIssue = import_react132.useCallback(() => {
34431
35248
  setAutoRunIssueReason(null);
34432
35249
  }, []);
34433
- const handleSurveyRequestFeedback = import_react125.useCallback(() => {
35250
+ const handleSurveyRequestFeedback = import_react132.useCallback(() => {
34434
35251
  const command = process.env.USER_TYPE === "ant" ? "/issue" : "/feedback";
34435
35252
  onSubmit(command, {
34436
35253
  setCursorOffset: () => {},
@@ -34440,16 +35257,16 @@ Error: sandbox required but unavailable: ${reason}
34440
35257
  logForDebugging(`Survey feedback request failed: ${err instanceof Error ? err.message : String(err)}`);
34441
35258
  });
34442
35259
  }, [onSubmit]);
34443
- const onSubmitRef = import_react125.useRef(onSubmit);
35260
+ const onSubmitRef = import_react132.useRef(onSubmit);
34444
35261
  onSubmitRef.current = onSubmit;
34445
- const handleOpenRateLimitOptions = import_react125.useCallback(() => {
35262
+ const handleOpenRateLimitOptions = import_react132.useCallback(() => {
34446
35263
  onSubmitRef.current("/rate-limit-options", {
34447
35264
  setCursorOffset: () => {},
34448
35265
  clearBuffer: () => {},
34449
35266
  resetHistory: () => {}
34450
35267
  });
34451
35268
  }, []);
34452
- const handleExit = import_react125.useCallback(async () => {
35269
+ const handleExit = import_react132.useCallback(async () => {
34453
35270
  setIsExiting(true);
34454
35271
  if (isBgSession()) {
34455
35272
  spawnSync("tmux", ["detach-client"], { stdio: "ignore" });
@@ -34475,10 +35292,10 @@ Error: sandbox required but unavailable: ${reason}
34475
35292
  setIsExiting(false);
34476
35293
  }
34477
35294
  }, []);
34478
- const handleShowMessageSelector = import_react125.useCallback(() => {
35295
+ const handleShowMessageSelector = import_react132.useCallback(() => {
34479
35296
  setIsMessageSelectorVisible((prev) => !prev);
34480
35297
  }, []);
34481
- const rewindConversationTo = import_react125.useCallback((message) => {
35298
+ const rewindConversationTo = import_react132.useCallback((message) => {
34482
35299
  const prev = messagesRef.current;
34483
35300
  const messageIndex = prev.lastIndexOf(message);
34484
35301
  if (messageIndex === -1)
@@ -34511,7 +35328,7 @@ Error: sandbox required but unavailable: ${reason}
34511
35328
  }
34512
35329
  }));
34513
35330
  }, [setMessages, setAppState]);
34514
- const restoreMessageSync = import_react125.useCallback((message) => {
35331
+ const restoreMessageSync = import_react132.useCallback((message) => {
34515
35332
  rewindConversationTo(message);
34516
35333
  const r = textForResubmit(message);
34517
35334
  if (r) {
@@ -34538,7 +35355,7 @@ Error: sandbox required but unavailable: ${reason}
34538
35355
  }
34539
35356
  }, [rewindConversationTo, setInputValue]);
34540
35357
  restoreMessageSyncRef.current = restoreMessageSync;
34541
- const handleRestoreMessage = import_react125.useCallback(async (message) => {
35358
+ const handleRestoreMessage = import_react132.useCallback(async (message) => {
34542
35359
  setImmediate((restore, message2) => restore(message2), restoreMessageSync, message);
34543
35360
  }, [restoreMessageSync]);
34544
35361
  const findRawIndex = (uuid) => {
@@ -34600,8 +35417,8 @@ ${fileList}`);
34600
35417
  const { sendBridgeResult } = useReplBridge(messages, setMessages, abortControllerRef, commands, mainLoopModel);
34601
35418
  sendBridgeResultRef.current = sendBridgeResult;
34602
35419
  useAfterFirstRender();
34603
- const hasCountedQueueUseRef = import_react125.useRef(false);
34604
- import_react125.useEffect(() => {
35420
+ const hasCountedQueueUseRef = import_react132.useRef(false);
35421
+ import_react132.useEffect(() => {
34605
35422
  if (queuedCommands.length < 1) {
34606
35423
  hasCountedQueueUseRef.current = false;
34607
35424
  return;
@@ -34614,7 +35431,7 @@ ${fileList}`);
34614
35431
  promptQueueUseCount: (current.promptQueueUseCount ?? 0) + 1
34615
35432
  }));
34616
35433
  }, [queuedCommands.length]);
34617
- const executeQueuedInput = import_react125.useCallback(async (queuedCommands2) => {
35434
+ const executeQueuedInput = import_react132.useCallback(async (queuedCommands2) => {
34618
35435
  await handlePromptSubmit({
34619
35436
  helpers: {
34620
35437
  setCursorOffset: () => {},
@@ -34662,16 +35479,16 @@ ${fileList}`);
34662
35479
  hasActiveLocalJsxUI: isShowingLocalJSXCommand,
34663
35480
  queryGuard
34664
35481
  });
34665
- import_react125.useEffect(() => {
35482
+ import_react132.useEffect(() => {
34666
35483
  activityManager.recordUserActivity();
34667
35484
  updateLastInteractionTime(true);
34668
35485
  }, [inputValue, submitCount]);
34669
- import_react125.useEffect(() => {
35486
+ import_react132.useEffect(() => {
34670
35487
  if (submitCount === 1) {
34671
35488
  startBackgroundHousekeeping();
34672
35489
  }
34673
35490
  }, [submitCount]);
34674
- import_react125.useEffect(() => {
35491
+ import_react132.useEffect(() => {
34675
35492
  if (isLoading)
34676
35493
  return;
34677
35494
  if (submitCount === 0)
@@ -34693,7 +35510,7 @@ ${fileList}`);
34693
35510
  }, getGlobalConfig().messageIdleNotifThresholdMs, lastQueryCompletionTime, isLoading, toolJSX, focusedInputDialogRef, terminal);
34694
35511
  return () => clearTimeout(timer);
34695
35512
  }, [isLoading, toolJSX, submitCount, lastQueryCompletionTime, terminal]);
34696
- import_react125.useEffect(() => {
35513
+ import_react132.useEffect(() => {
34697
35514
  if (lastQueryCompletionTime === 0)
34698
35515
  return;
34699
35516
  if (isLoading)
@@ -34765,7 +35582,7 @@ ${fileList}`);
34765
35582
  idleHintShownRef.current = false;
34766
35583
  };
34767
35584
  }, [lastQueryCompletionTime, isLoading, addNotification, removeNotification]);
34768
- const handleIncomingPrompt = import_react125.useCallback((input, options) => {
35585
+ const handleIncomingPrompt = import_react132.useCallback((input, options) => {
34769
35586
  if (queryGuard.isActive)
34770
35587
  return false;
34771
35588
  if (getCommandQueue().some((cmd) => cmd.mode === "prompt" || cmd.mode === "bash")) {
@@ -34810,7 +35627,7 @@ ${fileList}`);
34810
35627
  });
34811
35628
  return true;
34812
35629
  }, [onQuery, mainLoopModel, store]);
34813
- const { relayPipeMessage, pipeReturnHadErrorRef } = usePipeRelay();
35630
+ const { relayPipeMessage, pipeReturnHadErrorRef } = usePipeRelay2();
34814
35631
  const voice = useVoiceIntegration2({ setInputValueRaw, inputValueRef, insertTextRef });
34815
35632
  useInboxPoller({
34816
35633
  enabled: isAgentSwarmsEnabled(),
@@ -34820,12 +35637,12 @@ ${fileList}`);
34820
35637
  });
34821
35638
  useMailboxBridge({ isLoading, onSubmitMessage: handleIncomingPrompt });
34822
35639
  useMasterMonitor();
34823
- useSlaveNotifications();
35640
+ useSlaveNotifications2();
34824
35641
  const pipeIpcState = useAppState((s) => getPipeIpc(s));
34825
- usePipePermissionForward({ store, tools, setMessages, setToolUseConfirmQueue, getToolUseContext, mainLoopModel });
34826
- usePipeMuteSync({ setToolUseConfirmQueue });
34827
- usePipeIpc({ store, handleIncomingPrompt });
34828
- const { routeToSelectedPipes } = usePipeRouter({ store, setAppState, addNotification });
35642
+ usePipePermissionForward2({ store, tools, setMessages, setToolUseConfirmQueue, getToolUseContext, mainLoopModel });
35643
+ usePipeMuteSync2({ setToolUseConfirmQueue });
35644
+ usePipeIpc2({ store, handleIncomingPrompt });
35645
+ const { routeToSelectedPipes } = usePipeRouter2({ store, setAppState, addNotification });
34829
35646
  if (true) {
34830
35647
  const assistantMode = store.getState().kairosEnabled;
34831
35648
  useScheduledTasks2({ isLoading, assistantMode, setMessages });
@@ -34844,7 +35661,7 @@ ${fileList}`);
34844
35661
  isInPlanMode: toolPermissionContext.mode === "plan",
34845
35662
  onQueueTick: (command) => enqueue(command)
34846
35663
  });
34847
- import_react125.useEffect(() => {
35664
+ import_react132.useEffect(() => {
34848
35665
  if (!proactiveActive) {
34849
35666
  notifyAutomationStateChanged(null);
34850
35667
  return;
@@ -34876,20 +35693,20 @@ ${fileList}`);
34876
35693
  queuedCommands.length,
34877
35694
  toolPermissionContext.mode
34878
35695
  ]);
34879
- import_react125.useEffect(() => {
35696
+ import_react132.useEffect(() => {
34880
35697
  if (queuedCommands.some((cmd) => cmd.priority === "now")) {
34881
35698
  abortControllerRef.current?.abort("interrupt");
34882
35699
  }
34883
35700
  }, [queuedCommands]);
34884
- import_react125.useEffect(() => {
35701
+ import_react132.useEffect(() => {
34885
35702
  onInit();
34886
35703
  return () => {
34887
35704
  diagnosticTracker.shutdown();
34888
35705
  };
34889
35706
  }, []);
34890
35707
  const { internal_eventEmitter } = use_stdin_default();
34891
- const [remountKey, setRemountKey] = import_react125.useState(0);
34892
- import_react125.useEffect(() => {
35708
+ const [remountKey, setRemountKey] = import_react132.useState(0);
35709
+ import_react132.useEffect(() => {
34893
35710
  const handleSuspend = () => {
34894
35711
  process.stdout.write(`
34895
35712
  Claude Code has been suspended. Run \`fg\` to bring Claude Code back.
@@ -34906,7 +35723,7 @@ Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
34906
35723
  internal_eventEmitter?.off("resume", handleResume);
34907
35724
  };
34908
35725
  }, [internal_eventEmitter]);
34909
- const stopHookSpinnerSuffix = import_react125.useMemo(() => {
35726
+ const stopHookSpinnerSuffix = import_react132.useMemo(() => {
34910
35727
  if (!isLoading)
34911
35728
  return null;
34912
35729
  const progressMsgs = messages.filter((m) => {
@@ -34943,22 +35760,22 @@ Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
34943
35760
  }
34944
35761
  return total === 1 ? `running ${hookType} hook` : `running stop hooks\u2026 ${completedCount}/${total}`;
34945
35762
  }, [messages, isLoading]);
34946
- const handleEnterTranscript = import_react125.useCallback(() => {
35763
+ const handleEnterTranscript = import_react132.useCallback(() => {
34947
35764
  setFrozenTranscriptState({
34948
35765
  messagesLength: messages.length,
34949
35766
  streamingToolUsesLength: streamingToolUses.length
34950
35767
  });
34951
35768
  }, [messages.length, streamingToolUses.length]);
34952
- const handleExitTranscript = import_react125.useCallback(() => {
35769
+ const handleExitTranscript = import_react132.useCallback(() => {
34953
35770
  setFrozenTranscriptState(null);
34954
35771
  }, []);
34955
35772
  const virtualScrollActive = isFullscreenEnvEnabled() && !disableVirtualScroll;
34956
- const jumpRef = import_react125.useRef(null);
34957
- const [searchOpen, setSearchOpen] = import_react125.useState(false);
34958
- const [searchQuery, setSearchQuery] = import_react125.useState("");
34959
- const [searchCount, setSearchCount] = import_react125.useState(0);
34960
- const [searchCurrent, setSearchCurrent] = import_react125.useState(0);
34961
- const onSearchMatchesChange = import_react125.useCallback((count2, current) => {
35773
+ const jumpRef = import_react132.useRef(null);
35774
+ const [searchOpen, setSearchOpen] = import_react132.useState(false);
35775
+ const [searchQuery, setSearchQuery] = import_react132.useState("");
35776
+ const [searchCount, setSearchCount] = import_react132.useState(0);
35777
+ const [searchCurrent, setSearchCurrent] = import_react132.useState(0);
35778
+ const onSearchMatchesChange = import_react132.useCallback((count2, current) => {
34962
35779
  setSearchCount(count2);
34963
35780
  setSearchCurrent(current);
34964
35781
  }, []);
@@ -35028,8 +35845,8 @@ Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
35028
35845
  const w = Math.max(80, (process.stdout.columns ?? 80) - 6);
35029
35846
  const raw = await renderMessagesToPlainText(deferredMessages, tools, w);
35030
35847
  const text = raw.replace(/[ \t]+$/gm, "");
35031
- const path2 = join6(tmpdir(), `cc-transcript-${Date.now()}.txt`);
35032
- await writeFile3(path2, text);
35848
+ const path2 = join5(tmpdir(), `cc-transcript-${Date.now()}.txt`);
35849
+ await writeFile2(path2, text);
35033
35850
  const opened = openFileInExternalEditor(path2);
35034
35851
  setStatus(opened ? `opening ${path2}` : `wrote ${path2} \xB7 no $VISUAL/$EDITOR set`);
35035
35852
  } catch (e) {
@@ -35043,7 +35860,7 @@ Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
35043
35860
  }
35044
35861
  }, { isActive: screen === "transcript" && virtualScrollActive && !searchOpen });
35045
35862
  const inTranscript = screen === "transcript" && virtualScrollActive;
35046
- import_react125.useEffect(() => {
35863
+ import_react132.useEffect(() => {
35047
35864
  if (!inTranscript) {
35048
35865
  setSearchQuery("");
35049
35866
  setSearchCount(0);
@@ -35055,7 +35872,7 @@ Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
35055
35872
  setEditorStatus("");
35056
35873
  }
35057
35874
  }, [inTranscript]);
35058
- import_react125.useEffect(() => {
35875
+ import_react132.useEffect(() => {
35059
35876
  setHighlight(inTranscript ? searchQuery : "");
35060
35877
  if (!inTranscript)
35061
35878
  setPositions(null);
@@ -35310,7 +36127,6 @@ Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
35310
36127
  children: toolJSX.jsx
35311
36128
  }, undefined, false, undefined, this),
35312
36129
  process.env.USER_TYPE === "ant" && /* @__PURE__ */ jsx_dev_runtime97.jsxDEV(TungstenLiveMonitor, {}, undefined, false, undefined, this),
35313
- null,
35314
36130
  /* @__PURE__ */ jsx_dev_runtime97.jsxDEV(ThemedBox_default, {
35315
36131
  flexGrow: 1
35316
36132
  }, undefined, false, undefined, this),
@@ -35531,7 +36347,7 @@ Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
35531
36347
  });
35532
36348
  }
35533
36349
  if (action === "clear") {
35534
- const { clearConversation: clearConversation2 } = await import("./chunk-pkbsek0t.js");
36350
+ const { clearConversation: clearConversation2 } = await import("./chunk-zyptmnvp.js");
35535
36351
  await clearConversation2({
35536
36352
  setMessages,
35537
36353
  readFileState: readFileState.current,
@@ -35708,7 +36524,7 @@ Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
35708
36524
  inputValue,
35709
36525
  setInputValue
35710
36526
  }, undefined, false, undefined, this),
35711
- process.env.USER_TYPE === "ant" && skillImprovementSurvey.suggestion && /* @__PURE__ */ jsx_dev_runtime97.jsxDEV(SkillImprovementSurvey, {
36527
+ skillImprovementSurvey.suggestion && /* @__PURE__ */ jsx_dev_runtime97.jsxDEV(SkillImprovementSurvey, {
35712
36528
  isOpen: skillImprovementSurvey.isOpen,
35713
36529
  skillName: skillImprovementSurvey.suggestion.skillName,
35714
36530
  updates: skillImprovementSurvey.suggestion.updates,