@stigmer/server-slim 3.13.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 (738) hide show
  1. package/README.md +3 -0
  2. package/console/404.html +1 -0
  3. package/console/Icon-bw.svg +10 -0
  4. package/console/Icon-light.svg +10 -0
  5. package/console/__next.__PAGE__.txt +5 -0
  6. package/console/__next._full.txt +28 -0
  7. package/console/__next._head.txt +6 -0
  8. package/console/__next._index.txt +17 -0
  9. package/console/__next._tree.txt +5 -0
  10. package/console/_next/static/XrBnttPHHP5Wmi7mT4uLM/_buildManifest.js +11 -0
  11. package/console/_next/static/XrBnttPHHP5Wmi7mT4uLM/_clientMiddlewareManifest.js +1 -0
  12. package/console/_next/static/XrBnttPHHP5Wmi7mT4uLM/_ssgManifest.js +1 -0
  13. package/console/_next/static/chunks/0-6znc4v4kg4~.js +1 -0
  14. package/console/_next/static/chunks/0-73gkqs33_.~.js +1 -0
  15. package/console/_next/static/chunks/0-l4jzu40dd8w.js +1 -0
  16. package/console/_next/static/chunks/0-z-fnjdx4ulh.js +1 -0
  17. package/console/_next/static/chunks/0-zcgxw8vt51~.js +1 -0
  18. package/console/_next/static/chunks/0.f-b71h~m9l_.js +1 -0
  19. package/console/_next/static/chunks/0.p57pbuzo8j7.js +90 -0
  20. package/console/_next/static/chunks/0.qu8zg6yocro.js +1 -0
  21. package/console/_next/static/chunks/00-fpv~l3r27l.js +1 -0
  22. package/console/_next/static/chunks/005ctashl3n1r.js +1 -0
  23. package/console/_next/static/chunks/0068d1zb538z~.js +1 -0
  24. package/console/_next/static/chunks/008b.zzs.t4bw.js +139 -0
  25. package/console/_next/static/chunks/00d~s.n2ue-_h.js +1 -0
  26. package/console/_next/static/chunks/00o8ud2dmna2j.js +1 -0
  27. package/console/_next/static/chunks/00r~itj4ekq5y.js +1 -0
  28. package/console/_next/static/chunks/01.9x7hzkgv7j.js +1 -0
  29. package/console/_next/static/chunks/016uwj-o-jqap.js +1 -0
  30. package/console/_next/static/chunks/01f1gh.2dzexy.js +1 -0
  31. package/console/_next/static/chunks/01ontipw7_pn-.js +1 -0
  32. package/console/_next/static/chunks/02fsq8lsaeu8j.js +1 -0
  33. package/console/_next/static/chunks/02qsbdquvk64o.js +1 -0
  34. package/console/_next/static/chunks/03.b9z-1o34dx.js +1 -0
  35. package/console/_next/static/chunks/038jxymv2x4u-.js +148 -0
  36. package/console/_next/static/chunks/03f2f6enzzhsy.js +1 -0
  37. package/console/_next/static/chunks/03l_lqxocp3uj.js +1 -0
  38. package/console/_next/static/chunks/03lth2le32c6r.js +201 -0
  39. package/console/_next/static/chunks/03v0v690_bw8u.js +62 -0
  40. package/console/_next/static/chunks/03yru4-m-450t.js +1 -0
  41. package/console/_next/static/chunks/03~yq9q893hmn.js +1 -0
  42. package/console/_next/static/chunks/04nu-nyhd8yfk.js +18 -0
  43. package/console/_next/static/chunks/04uzf6wcrofgt.js +1 -0
  44. package/console/_next/static/chunks/056bfxvkb8fd~.js +1 -0
  45. package/console/_next/static/chunks/06huuay3x3z07.js +1 -0
  46. package/console/_next/static/chunks/06o.rsm2b~dht.js +60 -0
  47. package/console/_next/static/chunks/07.l7154cu7z-.js +1 -0
  48. package/console/_next/static/chunks/07wnm1~gr1rx~.js +1 -0
  49. package/console/_next/static/chunks/08.rk-nar1l2t.js +25 -0
  50. package/console/_next/static/chunks/08iibm2~7e.mj.js +1 -0
  51. package/console/_next/static/chunks/08o5wsrurx9ux.js +5 -0
  52. package/console/_next/static/chunks/09~n7y-jkmjlj.js +152 -0
  53. package/console/_next/static/chunks/0_mhv9_2_g.-d.js +119 -0
  54. package/console/_next/static/chunks/0af53k.rxu1kn.js +1 -0
  55. package/console/_next/static/chunks/0amugang-25bm.js +1 -0
  56. package/console/_next/static/chunks/0awsj.h.eiuen.js +1 -0
  57. package/console/_next/static/chunks/0axtn1ln1j35_.js +79 -0
  58. package/console/_next/static/chunks/0c5xj4q0jmdu0.js +1 -0
  59. package/console/_next/static/chunks/0c7llz2igr3w7.js +1 -0
  60. package/console/_next/static/chunks/0cgp87bgoglgv.js +1 -0
  61. package/console/_next/static/chunks/0co3~00k0sae5.js +1 -0
  62. package/console/_next/static/chunks/0cq0zrqlu~xa7.js +1 -0
  63. package/console/_next/static/chunks/0cs_h74-ljzlt.js +77 -0
  64. package/console/_next/static/chunks/0cu8k_dz43e4y.js +1 -0
  65. package/console/_next/static/chunks/0d05q_m7mqj4o.js +1 -0
  66. package/console/_next/static/chunks/0dsde0n1co0l..js +1 -0
  67. package/console/_next/static/chunks/0e4xdug~7dxzk.js +1 -0
  68. package/console/_next/static/chunks/0e7hldxv930hc.js +12 -0
  69. package/console/_next/static/chunks/0ed3hfv95qark.js +10 -0
  70. package/console/_next/static/chunks/0f1nokqa6poai.js +1 -0
  71. package/console/_next/static/chunks/0f8bbcvfh6x_j.js +64 -0
  72. package/console/_next/static/chunks/0fy2-q-5a0j3r.js +1 -0
  73. package/console/_next/static/chunks/0g-98wql22rf4.css +1 -0
  74. package/console/_next/static/chunks/0g167wye7-x6z.js +1 -0
  75. package/console/_next/static/chunks/0g4_345f39a55.js +1 -0
  76. package/console/_next/static/chunks/0ge0mq0ea60lx.js +1 -0
  77. package/console/_next/static/chunks/0gepanyj709pr.js +1 -0
  78. package/console/_next/static/chunks/0glne1asott9e.js +2 -0
  79. package/console/_next/static/chunks/0hb.-vcj2w6kf.js +1 -0
  80. package/console/_next/static/chunks/0hdh_2akzrlxi.js +287 -0
  81. package/console/_next/static/chunks/0hhe78mplcj67.js +1 -0
  82. package/console/_next/static/chunks/0hori02zn~h3o.js +1 -0
  83. package/console/_next/static/chunks/0hq~c-~dp2g~1.js +1 -0
  84. package/console/_next/static/chunks/0i.l9589uvx0j.js +1 -0
  85. package/console/_next/static/chunks/0i8pgzf~hu-3m.js +24 -0
  86. package/console/_next/static/chunks/0icpvuwlmnlty.js +43 -0
  87. package/console/_next/static/chunks/0icsogze8wb_v.js +3 -0
  88. package/console/_next/static/chunks/0ij17mw0v0qd-.js +1 -0
  89. package/console/_next/static/chunks/0io-wgdji~5d0.js +1 -0
  90. package/console/_next/static/chunks/0ipk1er3w80bj.js +24 -0
  91. package/console/_next/static/chunks/0irq1yd9ix16u.js +1 -0
  92. package/console/_next/static/chunks/0iwpyv2wbln6f.js +1 -0
  93. package/console/_next/static/chunks/0ixo5_jc~m0~2.js +1 -0
  94. package/console/_next/static/chunks/0jxlubusvmdjm.js +1 -0
  95. package/console/_next/static/chunks/0j~3z.dgn_8ff.css +6 -0
  96. package/console/_next/static/chunks/0k9_1v72yx36d.js +226 -0
  97. package/console/_next/static/chunks/0ka-.7dww7nze.js +101 -0
  98. package/console/_next/static/chunks/0kt3942_0py-t.js +1 -0
  99. package/console/_next/static/chunks/0l3uvjh3oslhq.js +1 -0
  100. package/console/_next/static/chunks/0lp.du_t-~cqs.js +2 -0
  101. package/console/_next/static/chunks/0lq22-4n7_uyt.js +34 -0
  102. package/console/_next/static/chunks/0lypu-.xpph9..js +15 -0
  103. package/console/_next/static/chunks/0mb.pnhflhw95.js +1 -0
  104. package/console/_next/static/chunks/0mcz_room09fj.js +1 -0
  105. package/console/_next/static/chunks/0mo3-obfy2_6v.js +15 -0
  106. package/console/_next/static/chunks/0mtfbfe5xd3.6.js +1 -0
  107. package/console/_next/static/chunks/0mvcspqlkvjri.js +1 -0
  108. package/console/_next/static/chunks/0n2qydw3oc1oj.js +1 -0
  109. package/console/_next/static/chunks/0nnkdto25tilf.js +1 -0
  110. package/console/_next/static/chunks/0npm9l63~4j0v.js +1 -0
  111. package/console/_next/static/chunks/0nu6llqvg4741.js +1 -0
  112. package/console/_next/static/chunks/0n~glqz40m6gv.js +1 -0
  113. package/console/_next/static/chunks/0o-.19qua6web.js +5 -0
  114. package/console/_next/static/chunks/0omq5mq8dkd24.js +1 -0
  115. package/console/_next/static/chunks/0oprw5m.lmqln.js +1 -0
  116. package/console/_next/static/chunks/0ortphe030oky.js +1 -0
  117. package/console/_next/static/chunks/0oufb2b491l23.js +153 -0
  118. package/console/_next/static/chunks/0owq59irnycu5.js +1 -0
  119. package/console/_next/static/chunks/0ptwwlt0l20~o.js +1 -0
  120. package/console/_next/static/chunks/0q2tc-vqxe1_n.js +1 -0
  121. package/console/_next/static/chunks/0qfu4h5g.k-yt.js +1 -0
  122. package/console/_next/static/chunks/0qji_.pm~u8x3.js +1 -0
  123. package/console/_next/static/chunks/0qm2930z0c.8m.js +80 -0
  124. package/console/_next/static/chunks/0q~1rz_i~v0vs.js +1 -0
  125. package/console/_next/static/chunks/0r4lipg4xb6fx.js +1 -0
  126. package/console/_next/static/chunks/0rhvismtjivza.js +104 -0
  127. package/console/_next/static/chunks/0rmt10l3458p_.js +93 -0
  128. package/console/_next/static/chunks/0rob~86j~8vge.js +1 -0
  129. package/console/_next/static/chunks/0r~zu0c3j_b7p.js +1 -0
  130. package/console/_next/static/chunks/0s0v8xobo-2ok.js +34 -0
  131. package/console/_next/static/chunks/0s8nwq43gep9_.js +15 -0
  132. package/console/_next/static/chunks/0spswjguxbqfn.js +1 -0
  133. package/console/_next/static/chunks/0t6aq14rpn1.w.js +1 -0
  134. package/console/_next/static/chunks/0taiwi2j.k7mm.js +1 -0
  135. package/console/_next/static/chunks/0tj3k0t29gpn7.js +1 -0
  136. package/console/_next/static/chunks/0tq77.56bu2eu.js +1 -0
  137. package/console/_next/static/chunks/0ulcdeu8yx-cn.js +1 -0
  138. package/console/_next/static/chunks/0uvbqsa~x3_x6.js +1 -0
  139. package/console/_next/static/chunks/0uw8zy_zoej6s.js +1 -0
  140. package/console/_next/static/chunks/0uz5-~rqk9vr..js +1 -0
  141. package/console/_next/static/chunks/0w3ug0~zih~j2.js +1 -0
  142. package/console/_next/static/chunks/0wfrz3x.bxehc.js +1 -0
  143. package/console/_next/static/chunks/0wyb4nqlt6his.js +1 -0
  144. package/console/_next/static/chunks/0x.4919xjicc5.js +75 -0
  145. package/console/_next/static/chunks/0xr1dk~mec2dn.js +1 -0
  146. package/console/_next/static/chunks/0xxouzzjw_a6q.js +115 -0
  147. package/console/_next/static/chunks/0y0u4wm.3~_ac.js +1 -0
  148. package/console/_next/static/chunks/0y4vop46pw7ip.js +2 -0
  149. package/console/_next/static/chunks/0y5z3t-z1c8ks.js.map +5 -0
  150. package/console/_next/static/chunks/0y99xmlf_e2si.js +1 -0
  151. package/console/_next/static/chunks/0ydl92ezt_ppz.js +1 -0
  152. package/console/_next/static/chunks/0ywlzawl2ml3h.js +1 -0
  153. package/console/_next/static/chunks/0yysdfbgz-l8n.js +1 -0
  154. package/console/_next/static/chunks/0zjs5hlwbvch9.js +4 -0
  155. package/console/_next/static/chunks/0zsntdh42--v1.js +1 -0
  156. package/console/_next/static/chunks/104yvyc1ce3q5.js +1 -0
  157. package/console/_next/static/chunks/1051z1rwyse00.js +1 -0
  158. package/console/_next/static/chunks/10h6g4u9i~5h8.js +1 -0
  159. package/console/_next/static/chunks/10isn5~-bj4w5.js +4 -0
  160. package/console/_next/static/chunks/10ymqudg~95gr.js +1 -0
  161. package/console/_next/static/chunks/111eimn8nia.7.js +1 -0
  162. package/console/_next/static/chunks/1155_-gh-rcvi.js +1 -0
  163. package/console/_next/static/chunks/117cg_x8i7.ol.js +1 -0
  164. package/console/_next/static/chunks/11_7qxlc92f5s.js +1 -0
  165. package/console/_next/static/chunks/11h85j-8~tny3.js +36 -0
  166. package/console/_next/static/chunks/11t~35bechtea.js +1 -0
  167. package/console/_next/static/chunks/11uh-ttx4zin-.js +9 -0
  168. package/console/_next/static/chunks/11xfx57fbi3md.js +2 -0
  169. package/console/_next/static/chunks/12329wyw7127c.js +1 -0
  170. package/console/_next/static/chunks/123jshjvn0ocr.js +31 -0
  171. package/console/_next/static/chunks/128ahbvhdeeq-.js +1 -0
  172. package/console/_next/static/chunks/13hl4dngamd3l.js +127 -0
  173. package/console/_next/static/chunks/14.38bpm-d3-l.js +1 -0
  174. package/console/_next/static/chunks/14i46k409qlt0.js +1 -0
  175. package/console/_next/static/chunks/14j238ax8coge.js +29 -0
  176. package/console/_next/static/chunks/159151ghv9-cc.js +1 -0
  177. package/console/_next/static/chunks/15hlb71q~xfev.js +1 -0
  178. package/console/_next/static/chunks/15r_pfbdb2jhp.js +23 -0
  179. package/console/_next/static/chunks/15wc.2zpsy4wc.js +4 -0
  180. package/console/_next/static/chunks/16pzrphqjtyli.js +1 -0
  181. package/console/_next/static/chunks/16ukgtm3fhab~.js +1071 -0
  182. package/console/_next/static/chunks/170p3g7_6_620.js +2 -0
  183. package/console/_next/static/chunks/175hd_pl41_vh.js +15 -0
  184. package/console/_next/static/chunks/17glhyaxi4vs-.js +1 -0
  185. package/console/_next/static/chunks/17jhgtykn778_.js +1 -0
  186. package/console/_next/static/chunks/17v4twif7y~.b.js +1 -0
  187. package/console/_next/static/chunks/182b_f_n0-cdr.js +1 -0
  188. package/console/_next/static/chunks/187v8dzyf1l-f.js +80 -0
  189. package/console/_next/static/chunks/turbopack-0cvnq9zq1g68-.js +1 -0
  190. package/console/_next/static/chunks/turbopack-172c~.rma.yso.js +1 -0
  191. package/console/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +1 -0
  192. package/console/_next/static/media/02263ebadd758ea4-s.0qg7j5o.yrclm.woff2 +0 -0
  193. package/console/_next/static/media/03fc1b4a8d284b5e-s.09.f.n_ccld80.woff2 +0 -0
  194. package/console/_next/static/media/07454f8ad8aaac57-s.0tqkxa-w3pk~c.woff2 +0 -0
  195. package/console/_next/static/media/1bcd0e671759a44c-s.0vnh8.d8wxa2x.woff2 +0 -0
  196. package/console/_next/static/media/1bffadaabf893a1e-s.16ipb6fqu393i.woff2 +0 -0
  197. package/console/_next/static/media/224e262ef877bfa4-s.0mo8vqgr8yagc.woff2 +0 -0
  198. package/console/_next/static/media/2bbe8d2671613f1f-s.067x_6k0k23tk.woff2 +0 -0
  199. package/console/_next/static/media/2c55a0e60120577a-s.0bjc5tiuqdqro.woff2 +0 -0
  200. package/console/_next/static/media/2fe89d53234c61d4-s.0k_.i63k_i_qa.woff2 +0 -0
  201. package/console/_next/static/media/4fa387ec64143e14-s.0wkzw~je483f-.woff2 +0 -0
  202. package/console/_next/static/media/53b9e256198e5412-s.0-wfv7uh4i7h9.woff2 +0 -0
  203. package/console/_next/static/media/5476f68d60460930-s.0wxq9webf.ew4.woff2 +0 -0
  204. package/console/_next/static/media/57215795b8570f5c-s.0vwgtotjdgnhr.woff2 +0 -0
  205. package/console/_next/static/media/59b15b4bcd7b1eb5-s.0x08jh8vondwt.woff2 +0 -0
  206. package/console/_next/static/media/5ce348bf30bf5439-s.0zgw-jeven.3w.woff2 +0 -0
  207. package/console/_next/static/media/5e05ae5b48faa55e-s.0m9hhkgdlzukj.woff2 +0 -0
  208. package/console/_next/static/media/6306c77e7c8268e4-s.0rhz0arwfsn~5.woff2 +0 -0
  209. package/console/_next/static/media/68757d6cddeff913-s.0hkrq11n-dhos.woff2 +0 -0
  210. package/console/_next/static/media/7178b3e590c64307-s.0nx0ww8fni_q3.woff2 +0 -0
  211. package/console/_next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2 +0 -0
  212. package/console/_next/static/media/7d817b4c03b0c5f1-s.0l76wvqk9d84w.woff2 +0 -0
  213. package/console/_next/static/media/7f11d98043fdedc9-s.0r4w1y.tjq0ay.woff2 +0 -0
  214. package/console/_next/static/media/7fea77d1d19108bf-s.0xyeb7czu1stb.woff2 +0 -0
  215. package/console/_next/static/media/83afe278b6a6bb3c-s.0q-301v4kxxnr.woff2 +0 -0
  216. package/console/_next/static/media/8a480f0b521d4e75-s.0jzbimsg8vl84.woff2 +0 -0
  217. package/console/_next/static/media/90c51ce8fb754fe8-s.00z~hoalba5dm.woff2 +0 -0
  218. package/console/_next/static/media/99e609270109b47d-s.16-z~2sp29ex6.woff2 +0 -0
  219. package/console/_next/static/media/9c72aa0f40e4eef8-s.0m6w47a4e5dy9.woff2 +0 -0
  220. package/console/_next/static/media/a7afbb44bec2bb18-s.0juuwbcf7uz~t.woff2 +0 -0
  221. package/console/_next/static/media/ad66f9afd8947f86-s.11u06r12fd6v_.woff2 +0 -0
  222. package/console/_next/static/media/bbc41e54d2fcbd21-s.0k4k9394f2q-k.woff2 +0 -0
  223. package/console/_next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2 +0 -0
  224. package/console/_next/static/media/d8cb5ab3660140cd-s.0ri_id_kcagyz.woff2 +0 -0
  225. package/console/_next/static/media/e15f58668ad64cb8-s.0~.8lt~vdqmc3.woff2 +0 -0
  226. package/console/_next/static/media/e390973e931a41c5-s.08hd0g.321csk.woff2 +0 -0
  227. package/console/_next/static/media/e532fa1b9921e1cd-s.0~wrfy7sm-h4g.woff2 +0 -0
  228. package/console/_next/static/media/e6d00ff86ef9e699-s.0lcb62h0-.jh3.woff2 +0 -0
  229. package/console/_next/static/media/effe91970fc4db64-s.07ig5l8azj~hy.woff2 +0 -0
  230. package/console/_next/static/media/elk-worker.min.13hrbirt7_.ef.js +6401 -0
  231. package/console/_next/static/media/favicon.0x3dzn~oxb6tn.ico +0 -0
  232. package/console/_next/static/media/fef07dbb0973bf53-s.12tyk43_3sh9u.woff2 +0 -0
  233. package/console/_not-found/__next._full.txt +29 -0
  234. package/console/_not-found/__next._head.txt +6 -0
  235. package/console/_not-found/__next._index.txt +17 -0
  236. package/console/_not-found/__next._not-found.__PAGE__.txt +6 -0
  237. package/console/_not-found/__next._not-found.txt +5 -0
  238. package/console/_not-found/__next._tree.txt +3 -0
  239. package/console/_not-found.html +1 -0
  240. package/console/_not-found.txt +29 -0
  241. package/console/apple-touch-icon-dark.png +0 -0
  242. package/console/apple-touch-icon-light.png +0 -0
  243. package/console/auth/callback/__next._full.txt +36 -0
  244. package/console/auth/callback/__next._head.txt +6 -0
  245. package/console/auth/callback/__next._index.txt +17 -0
  246. package/console/auth/callback/__next._tree.txt +5 -0
  247. package/console/auth/callback/__next.auth.callback.__PAGE__.txt +9 -0
  248. package/console/auth/callback/__next.auth.callback.txt +5 -0
  249. package/console/auth/callback/__next.auth.txt +5 -0
  250. package/console/auth/callback.html +1 -0
  251. package/console/auth/callback.txt +36 -0
  252. package/console/auth/github/callback/__next._full.txt +37 -0
  253. package/console/auth/github/callback/__next._head.txt +6 -0
  254. package/console/auth/github/callback/__next._index.txt +17 -0
  255. package/console/auth/github/callback/__next._tree.txt +5 -0
  256. package/console/auth/github/callback/__next.auth.github.callback.__PAGE__.txt +9 -0
  257. package/console/auth/github/callback/__next.auth.github.callback.txt +5 -0
  258. package/console/auth/github/callback/__next.auth.github.txt +5 -0
  259. package/console/auth/github/callback/__next.auth.txt +5 -0
  260. package/console/auth/github/callback.html +1 -0
  261. package/console/auth/github/callback.txt +37 -0
  262. package/console/auth/oauth/callback/__next._full.txt +37 -0
  263. package/console/auth/oauth/callback/__next._head.txt +6 -0
  264. package/console/auth/oauth/callback/__next._index.txt +17 -0
  265. package/console/auth/oauth/callback/__next._tree.txt +5 -0
  266. package/console/auth/oauth/callback/__next.auth.oauth.callback.__PAGE__.txt +9 -0
  267. package/console/auth/oauth/callback/__next.auth.oauth.callback.txt +5 -0
  268. package/console/auth/oauth/callback/__next.auth.oauth.txt +5 -0
  269. package/console/auth/oauth/callback/__next.auth.txt +5 -0
  270. package/console/auth/oauth/callback.html +1 -0
  271. package/console/auth/oauth/callback.txt +37 -0
  272. package/console/chat/__placeholder__/__placeholder__/__next._full.txt +35 -0
  273. package/console/chat/__placeholder__/__placeholder__/__next._head.txt +6 -0
  274. package/console/chat/__placeholder__/__placeholder__/__next._index.txt +17 -0
  275. package/console/chat/__placeholder__/__placeholder__/__next._tree.txt +5 -0
  276. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.__PAGE__.txt +6 -0
  277. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.txt +5 -0
  278. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.txt +5 -0
  279. package/console/chat/__placeholder__/__placeholder__/__next.chat.txt +5 -0
  280. package/console/chat/__placeholder__/__placeholder__.html +1 -0
  281. package/console/chat/__placeholder__/__placeholder__.txt +35 -0
  282. package/console/conversations/__next._full.txt +32 -0
  283. package/console/conversations/__next._head.txt +6 -0
  284. package/console/conversations/__next._index.txt +17 -0
  285. package/console/conversations/__next._tree.txt +5 -0
  286. package/console/conversations/__next.conversations.__PAGE__.txt +6 -0
  287. package/console/conversations/__next.conversations.txt +5 -0
  288. package/console/conversations/__placeholder__/__placeholder__/__next._full.txt +35 -0
  289. package/console/conversations/__placeholder__/__placeholder__/__next._head.txt +6 -0
  290. package/console/conversations/__placeholder__/__placeholder__/__next._index.txt +17 -0
  291. package/console/conversations/__placeholder__/__placeholder__/__next._tree.txt +5 -0
  292. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.__PAGE__.txt +6 -0
  293. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.txt +5 -0
  294. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.txt +5 -0
  295. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.txt +5 -0
  296. package/console/conversations/__placeholder__/__placeholder__.html +1 -0
  297. package/console/conversations/__placeholder__/__placeholder__.txt +35 -0
  298. package/console/conversations.html +1 -0
  299. package/console/conversations.txt +32 -0
  300. package/console/dashboard/__next._full.txt +32 -0
  301. package/console/dashboard/__next._head.txt +6 -0
  302. package/console/dashboard/__next._index.txt +17 -0
  303. package/console/dashboard/__next._tree.txt +5 -0
  304. package/console/dashboard/__next.dashboard.__PAGE__.txt +6 -0
  305. package/console/dashboard/__next.dashboard.txt +5 -0
  306. package/console/dashboard.html +1 -0
  307. package/console/dashboard.txt +32 -0
  308. package/console/embed.js +1 -0
  309. package/console/executions/__placeholder__/__next._full.txt +32 -0
  310. package/console/executions/__placeholder__/__next._head.txt +6 -0
  311. package/console/executions/__placeholder__/__next._index.txt +17 -0
  312. package/console/executions/__placeholder__/__next._tree.txt +5 -0
  313. package/console/executions/__placeholder__/__next.executions.$d$id.__PAGE__.txt +5 -0
  314. package/console/executions/__placeholder__/__next.executions.$d$id.txt +5 -0
  315. package/console/executions/__placeholder__/__next.executions.txt +5 -0
  316. package/console/executions/__placeholder__.html +1 -0
  317. package/console/executions/__placeholder__.txt +32 -0
  318. package/console/favicon-dark-16x16.png +0 -0
  319. package/console/favicon-dark-32x32.png +0 -0
  320. package/console/favicon-dark.ico +0 -0
  321. package/console/favicon-dark.svg +11 -0
  322. package/console/favicon-light-16x16.png +0 -0
  323. package/console/favicon-light-32x32.png +0 -0
  324. package/console/favicon-light.ico +0 -0
  325. package/console/favicon-light.svg +11 -0
  326. package/console/favicon.ico +0 -0
  327. package/console/index.html +1 -0
  328. package/console/index.txt +28 -0
  329. package/console/invite/__placeholder__/__next._full.txt +33 -0
  330. package/console/invite/__placeholder__/__next._head.txt +6 -0
  331. package/console/invite/__placeholder__/__next._index.txt +17 -0
  332. package/console/invite/__placeholder__/__next._tree.txt +5 -0
  333. package/console/invite/__placeholder__/__next.invite.$d$token.__PAGE__.txt +6 -0
  334. package/console/invite/__placeholder__/__next.invite.$d$token.txt +5 -0
  335. package/console/invite/__placeholder__/__next.invite.txt +5 -0
  336. package/console/invite/__placeholder__.html +1 -0
  337. package/console/invite/__placeholder__.txt +33 -0
  338. package/console/library/__next._full.txt +33 -0
  339. package/console/library/__next._head.txt +6 -0
  340. package/console/library/__next._index.txt +17 -0
  341. package/console/library/__next._tree.txt +5 -0
  342. package/console/library/__next.library.__PAGE__.txt +6 -0
  343. package/console/library/__next.library.txt +7 -0
  344. package/console/library/agents/__next._full.txt +36 -0
  345. package/console/library/agents/__next._head.txt +6 -0
  346. package/console/library/agents/__next._index.txt +17 -0
  347. package/console/library/agents/__next._tree.txt +5 -0
  348. package/console/library/agents/__next.library.agents.__PAGE__.txt +6 -0
  349. package/console/library/agents/__next.library.agents.txt +5 -0
  350. package/console/library/agents/__next.library.txt +7 -0
  351. package/console/library/agents/__placeholder__/__placeholder__/__next._full.txt +39 -0
  352. package/console/library/agents/__placeholder__/__placeholder__/__next._head.txt +6 -0
  353. package/console/library/agents/__placeholder__/__placeholder__/__next._index.txt +17 -0
  354. package/console/library/agents/__placeholder__/__placeholder__/__next._tree.txt +5 -0
  355. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.__PAGE__.txt +6 -0
  356. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.txt +5 -0
  357. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.txt +5 -0
  358. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.txt +5 -0
  359. package/console/library/agents/__placeholder__/__placeholder__/__next.library.txt +7 -0
  360. package/console/library/agents/__placeholder__/__placeholder__.html +1 -0
  361. package/console/library/agents/__placeholder__/__placeholder__.txt +39 -0
  362. package/console/library/agents/new/__next._full.txt +40 -0
  363. package/console/library/agents/new/__next._head.txt +6 -0
  364. package/console/library/agents/new/__next._index.txt +17 -0
  365. package/console/library/agents/new/__next._tree.txt +5 -0
  366. package/console/library/agents/new/__next.library.agents.new.__PAGE__.txt +9 -0
  367. package/console/library/agents/new/__next.library.agents.new.txt +5 -0
  368. package/console/library/agents/new/__next.library.agents.txt +5 -0
  369. package/console/library/agents/new/__next.library.txt +7 -0
  370. package/console/library/agents/new.html +1 -0
  371. package/console/library/agents/new.txt +40 -0
  372. package/console/library/agents.html +1 -0
  373. package/console/library/agents.txt +36 -0
  374. package/console/library/mcp-servers/__next._full.txt +36 -0
  375. package/console/library/mcp-servers/__next._head.txt +6 -0
  376. package/console/library/mcp-servers/__next._index.txt +17 -0
  377. package/console/library/mcp-servers/__next._tree.txt +5 -0
  378. package/console/library/mcp-servers/__next.library.mcp-servers.__PAGE__.txt +6 -0
  379. package/console/library/mcp-servers/__next.library.mcp-servers.txt +5 -0
  380. package/console/library/mcp-servers/__next.library.txt +7 -0
  381. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._full.txt +39 -0
  382. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._head.txt +6 -0
  383. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._index.txt +17 -0
  384. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._tree.txt +5 -0
  385. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.__PAGE__.txt +6 -0
  386. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.txt +5 -0
  387. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.txt +5 -0
  388. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.txt +5 -0
  389. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.txt +7 -0
  390. package/console/library/mcp-servers/__placeholder__/__placeholder__.html +1 -0
  391. package/console/library/mcp-servers/__placeholder__/__placeholder__.txt +39 -0
  392. package/console/library/mcp-servers/new/__next._full.txt +40 -0
  393. package/console/library/mcp-servers/new/__next._head.txt +6 -0
  394. package/console/library/mcp-servers/new/__next._index.txt +17 -0
  395. package/console/library/mcp-servers/new/__next._tree.txt +5 -0
  396. package/console/library/mcp-servers/new/__next.library.mcp-servers.new.__PAGE__.txt +9 -0
  397. package/console/library/mcp-servers/new/__next.library.mcp-servers.new.txt +5 -0
  398. package/console/library/mcp-servers/new/__next.library.mcp-servers.txt +5 -0
  399. package/console/library/mcp-servers/new/__next.library.txt +7 -0
  400. package/console/library/mcp-servers/new.html +1 -0
  401. package/console/library/mcp-servers/new.txt +40 -0
  402. package/console/library/mcp-servers.html +1 -0
  403. package/console/library/mcp-servers.txt +36 -0
  404. package/console/library/schedules/__next._full.txt +36 -0
  405. package/console/library/schedules/__next._head.txt +6 -0
  406. package/console/library/schedules/__next._index.txt +17 -0
  407. package/console/library/schedules/__next._tree.txt +5 -0
  408. package/console/library/schedules/__next.library.schedules.__PAGE__.txt +6 -0
  409. package/console/library/schedules/__next.library.schedules.txt +5 -0
  410. package/console/library/schedules/__next.library.txt +7 -0
  411. package/console/library/schedules/__placeholder__/__placeholder__/__next._full.txt +39 -0
  412. package/console/library/schedules/__placeholder__/__placeholder__/__next._head.txt +6 -0
  413. package/console/library/schedules/__placeholder__/__placeholder__/__next._index.txt +17 -0
  414. package/console/library/schedules/__placeholder__/__placeholder__/__next._tree.txt +5 -0
  415. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.__PAGE__.txt +6 -0
  416. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.txt +5 -0
  417. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.txt +5 -0
  418. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.txt +5 -0
  419. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.txt +7 -0
  420. package/console/library/schedules/__placeholder__/__placeholder__.html +1 -0
  421. package/console/library/schedules/__placeholder__/__placeholder__.txt +39 -0
  422. package/console/library/schedules/new/__next._full.txt +40 -0
  423. package/console/library/schedules/new/__next._head.txt +6 -0
  424. package/console/library/schedules/new/__next._index.txt +17 -0
  425. package/console/library/schedules/new/__next._tree.txt +5 -0
  426. package/console/library/schedules/new/__next.library.schedules.new.__PAGE__.txt +9 -0
  427. package/console/library/schedules/new/__next.library.schedules.new.txt +5 -0
  428. package/console/library/schedules/new/__next.library.schedules.txt +5 -0
  429. package/console/library/schedules/new/__next.library.txt +7 -0
  430. package/console/library/schedules/new.html +1 -0
  431. package/console/library/schedules/new.txt +40 -0
  432. package/console/library/schedules.html +1 -0
  433. package/console/library/schedules.txt +36 -0
  434. package/console/library/skills/__next._full.txt +36 -0
  435. package/console/library/skills/__next._head.txt +6 -0
  436. package/console/library/skills/__next._index.txt +17 -0
  437. package/console/library/skills/__next._tree.txt +5 -0
  438. package/console/library/skills/__next.library.skills.__PAGE__.txt +6 -0
  439. package/console/library/skills/__next.library.skills.txt +5 -0
  440. package/console/library/skills/__next.library.txt +7 -0
  441. package/console/library/skills/__placeholder__/__placeholder__/__next._full.txt +39 -0
  442. package/console/library/skills/__placeholder__/__placeholder__/__next._head.txt +6 -0
  443. package/console/library/skills/__placeholder__/__placeholder__/__next._index.txt +17 -0
  444. package/console/library/skills/__placeholder__/__placeholder__/__next._tree.txt +5 -0
  445. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.__PAGE__.txt +6 -0
  446. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.txt +5 -0
  447. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.txt +5 -0
  448. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.txt +5 -0
  449. package/console/library/skills/__placeholder__/__placeholder__/__next.library.txt +7 -0
  450. package/console/library/skills/__placeholder__/__placeholder__.html +1 -0
  451. package/console/library/skills/__placeholder__/__placeholder__.txt +39 -0
  452. package/console/library/skills/new/__next._full.txt +40 -0
  453. package/console/library/skills/new/__next._head.txt +6 -0
  454. package/console/library/skills/new/__next._index.txt +17 -0
  455. package/console/library/skills/new/__next._tree.txt +5 -0
  456. package/console/library/skills/new/__next.library.skills.new.__PAGE__.txt +9 -0
  457. package/console/library/skills/new/__next.library.skills.new.txt +5 -0
  458. package/console/library/skills/new/__next.library.skills.txt +5 -0
  459. package/console/library/skills/new/__next.library.txt +7 -0
  460. package/console/library/skills/new.html +1 -0
  461. package/console/library/skills/new.txt +40 -0
  462. package/console/library/skills.html +1 -0
  463. package/console/library/skills.txt +36 -0
  464. package/console/library/workflows/__next._full.txt +36 -0
  465. package/console/library/workflows/__next._head.txt +6 -0
  466. package/console/library/workflows/__next._index.txt +17 -0
  467. package/console/library/workflows/__next._tree.txt +5 -0
  468. package/console/library/workflows/__next.library.txt +7 -0
  469. package/console/library/workflows/__next.library.workflows.__PAGE__.txt +6 -0
  470. package/console/library/workflows/__next.library.workflows.txt +5 -0
  471. package/console/library/workflows/__placeholder__/__placeholder__/__next._full.txt +39 -0
  472. package/console/library/workflows/__placeholder__/__placeholder__/__next._head.txt +6 -0
  473. package/console/library/workflows/__placeholder__/__placeholder__/__next._index.txt +17 -0
  474. package/console/library/workflows/__placeholder__/__placeholder__/__next._tree.txt +5 -0
  475. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.txt +7 -0
  476. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.__PAGE__.txt +6 -0
  477. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.txt +5 -0
  478. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.txt +5 -0
  479. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.txt +5 -0
  480. package/console/library/workflows/__placeholder__/__placeholder__.html +1 -0
  481. package/console/library/workflows/__placeholder__/__placeholder__.txt +39 -0
  482. package/console/library/workflows/executions/__next._full.txt +37 -0
  483. package/console/library/workflows/executions/__next._head.txt +6 -0
  484. package/console/library/workflows/executions/__next._index.txt +17 -0
  485. package/console/library/workflows/executions/__next._tree.txt +5 -0
  486. package/console/library/workflows/executions/__next.library.txt +7 -0
  487. package/console/library/workflows/executions/__next.library.workflows.executions.__PAGE__.txt +6 -0
  488. package/console/library/workflows/executions/__next.library.workflows.executions.txt +5 -0
  489. package/console/library/workflows/executions/__next.library.workflows.txt +5 -0
  490. package/console/library/workflows/executions.html +1 -0
  491. package/console/library/workflows/executions.txt +37 -0
  492. package/console/library/workflows/new/__next._full.txt +40 -0
  493. package/console/library/workflows/new/__next._head.txt +6 -0
  494. package/console/library/workflows/new/__next._index.txt +17 -0
  495. package/console/library/workflows/new/__next._tree.txt +5 -0
  496. package/console/library/workflows/new/__next.library.txt +7 -0
  497. package/console/library/workflows/new/__next.library.workflows.new.__PAGE__.txt +9 -0
  498. package/console/library/workflows/new/__next.library.workflows.new.txt +5 -0
  499. package/console/library/workflows/new/__next.library.workflows.txt +5 -0
  500. package/console/library/workflows/new.html +1 -0
  501. package/console/library/workflows/new.txt +40 -0
  502. package/console/library/workflows.html +1 -0
  503. package/console/library/workflows.txt +36 -0
  504. package/console/library.html +1 -0
  505. package/console/library.txt +33 -0
  506. package/console/login/__next._full.txt +35 -0
  507. package/console/login/__next._head.txt +6 -0
  508. package/console/login/__next._index.txt +17 -0
  509. package/console/login/__next._tree.txt +5 -0
  510. package/console/login/__next.login.__PAGE__.txt +9 -0
  511. package/console/login/__next.login.txt +5 -0
  512. package/console/login.html +1 -0
  513. package/console/login.txt +35 -0
  514. package/console/logo.svg +1 -0
  515. package/console/oauth/slack/callback/__next._full.txt +37 -0
  516. package/console/oauth/slack/callback/__next._head.txt +6 -0
  517. package/console/oauth/slack/callback/__next._index.txt +17 -0
  518. package/console/oauth/slack/callback/__next._tree.txt +5 -0
  519. package/console/oauth/slack/callback/__next.oauth.slack.callback.__PAGE__.txt +9 -0
  520. package/console/oauth/slack/callback/__next.oauth.slack.callback.txt +5 -0
  521. package/console/oauth/slack/callback/__next.oauth.slack.txt +5 -0
  522. package/console/oauth/slack/callback/__next.oauth.txt +5 -0
  523. package/console/oauth/slack/callback.html +1 -0
  524. package/console/oauth/slack/callback.txt +37 -0
  525. package/console/sessions/__placeholder__/__next._full.txt +32 -0
  526. package/console/sessions/__placeholder__/__next._head.txt +6 -0
  527. package/console/sessions/__placeholder__/__next._index.txt +17 -0
  528. package/console/sessions/__placeholder__/__next._tree.txt +5 -0
  529. package/console/sessions/__placeholder__/__next.sessions.$d$id.__PAGE__.txt +5 -0
  530. package/console/sessions/__placeholder__/__next.sessions.$d$id.txt +5 -0
  531. package/console/sessions/__placeholder__/__next.sessions.txt +5 -0
  532. package/console/sessions/__placeholder__.html +1 -0
  533. package/console/sessions/__placeholder__.txt +32 -0
  534. package/console/settings/__next._full.txt +35 -0
  535. package/console/settings/__next._head.txt +6 -0
  536. package/console/settings/__next._index.txt +17 -0
  537. package/console/settings/__next._tree.txt +5 -0
  538. package/console/settings/__next.settings.__PAGE__.txt +9 -0
  539. package/console/settings/__next.settings.txt +6 -0
  540. package/console/settings/account-preferences/__next._full.txt +35 -0
  541. package/console/settings/account-preferences/__next._head.txt +6 -0
  542. package/console/settings/account-preferences/__next._index.txt +17 -0
  543. package/console/settings/account-preferences/__next._tree.txt +5 -0
  544. package/console/settings/account-preferences/__next.settings.account-preferences.__PAGE__.txt +6 -0
  545. package/console/settings/account-preferences/__next.settings.account-preferences.txt +5 -0
  546. package/console/settings/account-preferences/__next.settings.txt +6 -0
  547. package/console/settings/account-preferences.html +1 -0
  548. package/console/settings/account-preferences.txt +35 -0
  549. package/console/settings/api-keys/__next._full.txt +35 -0
  550. package/console/settings/api-keys/__next._head.txt +6 -0
  551. package/console/settings/api-keys/__next._index.txt +17 -0
  552. package/console/settings/api-keys/__next._tree.txt +5 -0
  553. package/console/settings/api-keys/__next.settings.api-keys.__PAGE__.txt +6 -0
  554. package/console/settings/api-keys/__next.settings.api-keys.txt +5 -0
  555. package/console/settings/api-keys/__next.settings.txt +6 -0
  556. package/console/settings/api-keys.html +1 -0
  557. package/console/settings/api-keys.txt +35 -0
  558. package/console/settings/billing/__next._full.txt +38 -0
  559. package/console/settings/billing/__next._head.txt +6 -0
  560. package/console/settings/billing/__next._index.txt +17 -0
  561. package/console/settings/billing/__next._tree.txt +5 -0
  562. package/console/settings/billing/__next.settings.billing.__PAGE__.txt +9 -0
  563. package/console/settings/billing/__next.settings.billing.txt +5 -0
  564. package/console/settings/billing/__next.settings.txt +6 -0
  565. package/console/settings/billing.html +1 -0
  566. package/console/settings/billing.txt +38 -0
  567. package/console/settings/channel-apps/__next._full.txt +35 -0
  568. package/console/settings/channel-apps/__next._head.txt +6 -0
  569. package/console/settings/channel-apps/__next._index.txt +17 -0
  570. package/console/settings/channel-apps/__next._tree.txt +5 -0
  571. package/console/settings/channel-apps/__next.settings.channel-apps.__PAGE__.txt +6 -0
  572. package/console/settings/channel-apps/__next.settings.channel-apps.txt +5 -0
  573. package/console/settings/channel-apps/__next.settings.txt +6 -0
  574. package/console/settings/channel-apps.html +1 -0
  575. package/console/settings/channel-apps.txt +35 -0
  576. package/console/settings/cursor-accounts/__next._full.txt +38 -0
  577. package/console/settings/cursor-accounts/__next._head.txt +6 -0
  578. package/console/settings/cursor-accounts/__next._index.txt +17 -0
  579. package/console/settings/cursor-accounts/__next._tree.txt +5 -0
  580. package/console/settings/cursor-accounts/__next.settings.cursor-accounts.__PAGE__.txt +9 -0
  581. package/console/settings/cursor-accounts/__next.settings.cursor-accounts.txt +5 -0
  582. package/console/settings/cursor-accounts/__next.settings.txt +6 -0
  583. package/console/settings/cursor-accounts.html +1 -0
  584. package/console/settings/cursor-accounts.txt +38 -0
  585. package/console/settings/environments/__next._full.txt +35 -0
  586. package/console/settings/environments/__next._head.txt +6 -0
  587. package/console/settings/environments/__next._index.txt +17 -0
  588. package/console/settings/environments/__next._tree.txt +5 -0
  589. package/console/settings/environments/__next.settings.environments.__PAGE__.txt +6 -0
  590. package/console/settings/environments/__next.settings.environments.txt +5 -0
  591. package/console/settings/environments/__next.settings.txt +6 -0
  592. package/console/settings/environments.html +1 -0
  593. package/console/settings/environments.txt +35 -0
  594. package/console/settings/identity-providers/__next._full.txt +35 -0
  595. package/console/settings/identity-providers/__next._head.txt +6 -0
  596. package/console/settings/identity-providers/__next._index.txt +17 -0
  597. package/console/settings/identity-providers/__next._tree.txt +5 -0
  598. package/console/settings/identity-providers/__next.settings.identity-providers.__PAGE__.txt +6 -0
  599. package/console/settings/identity-providers/__next.settings.identity-providers.txt +5 -0
  600. package/console/settings/identity-providers/__next.settings.txt +6 -0
  601. package/console/settings/identity-providers.html +1 -0
  602. package/console/settings/identity-providers.txt +35 -0
  603. package/console/settings/invitations/__next._full.txt +35 -0
  604. package/console/settings/invitations/__next._head.txt +6 -0
  605. package/console/settings/invitations/__next._index.txt +17 -0
  606. package/console/settings/invitations/__next._tree.txt +5 -0
  607. package/console/settings/invitations/__next.settings.invitations.__PAGE__.txt +6 -0
  608. package/console/settings/invitations/__next.settings.invitations.txt +5 -0
  609. package/console/settings/invitations/__next.settings.txt +6 -0
  610. package/console/settings/invitations.html +1 -0
  611. package/console/settings/invitations.txt +35 -0
  612. package/console/settings/members/__next._full.txt +35 -0
  613. package/console/settings/members/__next._head.txt +6 -0
  614. package/console/settings/members/__next._index.txt +17 -0
  615. package/console/settings/members/__next._tree.txt +5 -0
  616. package/console/settings/members/__next.settings.members.__PAGE__.txt +6 -0
  617. package/console/settings/members/__next.settings.members.txt +5 -0
  618. package/console/settings/members/__next.settings.txt +6 -0
  619. package/console/settings/members.html +1 -0
  620. package/console/settings/members.txt +35 -0
  621. package/console/settings/memory/__next._full.txt +35 -0
  622. package/console/settings/memory/__next._head.txt +6 -0
  623. package/console/settings/memory/__next._index.txt +17 -0
  624. package/console/settings/memory/__next._tree.txt +5 -0
  625. package/console/settings/memory/__next.settings.memory.__PAGE__.txt +6 -0
  626. package/console/settings/memory/__next.settings.memory.txt +5 -0
  627. package/console/settings/memory/__next.settings.txt +6 -0
  628. package/console/settings/memory.html +1 -0
  629. package/console/settings/memory.txt +35 -0
  630. package/console/settings/oauth-apps/__next._full.txt +35 -0
  631. package/console/settings/oauth-apps/__next._head.txt +6 -0
  632. package/console/settings/oauth-apps/__next._index.txt +17 -0
  633. package/console/settings/oauth-apps/__next._tree.txt +5 -0
  634. package/console/settings/oauth-apps/__next.settings.oauth-apps.__PAGE__.txt +6 -0
  635. package/console/settings/oauth-apps/__next.settings.oauth-apps.txt +5 -0
  636. package/console/settings/oauth-apps/__next.settings.txt +6 -0
  637. package/console/settings/oauth-apps.html +1 -0
  638. package/console/settings/oauth-apps.txt +35 -0
  639. package/console/settings/org-preferences/__next._full.txt +35 -0
  640. package/console/settings/org-preferences/__next._head.txt +6 -0
  641. package/console/settings/org-preferences/__next._index.txt +17 -0
  642. package/console/settings/org-preferences/__next._tree.txt +5 -0
  643. package/console/settings/org-preferences/__next.settings.org-preferences.__PAGE__.txt +6 -0
  644. package/console/settings/org-preferences/__next.settings.org-preferences.txt +5 -0
  645. package/console/settings/org-preferences/__next.settings.txt +6 -0
  646. package/console/settings/org-preferences.html +1 -0
  647. package/console/settings/org-preferences.txt +35 -0
  648. package/console/settings/org-profile/__next._full.txt +35 -0
  649. package/console/settings/org-profile/__next._head.txt +6 -0
  650. package/console/settings/org-profile/__next._index.txt +17 -0
  651. package/console/settings/org-profile/__next._tree.txt +5 -0
  652. package/console/settings/org-profile/__next.settings.org-profile.__PAGE__.txt +6 -0
  653. package/console/settings/org-profile/__next.settings.org-profile.txt +5 -0
  654. package/console/settings/org-profile/__next.settings.txt +6 -0
  655. package/console/settings/org-profile.html +1 -0
  656. package/console/settings/org-profile.txt +35 -0
  657. package/console/settings/platform-clients/__next._full.txt +35 -0
  658. package/console/settings/platform-clients/__next._head.txt +6 -0
  659. package/console/settings/platform-clients/__next._index.txt +17 -0
  660. package/console/settings/platform-clients/__next._tree.txt +5 -0
  661. package/console/settings/platform-clients/__next.settings.platform-clients.__PAGE__.txt +6 -0
  662. package/console/settings/platform-clients/__next.settings.platform-clients.txt +5 -0
  663. package/console/settings/platform-clients/__next.settings.txt +6 -0
  664. package/console/settings/platform-clients.html +1 -0
  665. package/console/settings/platform-clients.txt +35 -0
  666. package/console/settings/pricing-governance/__next._full.txt +38 -0
  667. package/console/settings/pricing-governance/__next._head.txt +6 -0
  668. package/console/settings/pricing-governance/__next._index.txt +17 -0
  669. package/console/settings/pricing-governance/__next._tree.txt +5 -0
  670. package/console/settings/pricing-governance/__next.settings.pricing-governance.__PAGE__.txt +9 -0
  671. package/console/settings/pricing-governance/__next.settings.pricing-governance.txt +5 -0
  672. package/console/settings/pricing-governance/__next.settings.txt +6 -0
  673. package/console/settings/pricing-governance.html +1 -0
  674. package/console/settings/pricing-governance.txt +38 -0
  675. package/console/settings/provider-standing/__next._full.txt +38 -0
  676. package/console/settings/provider-standing/__next._head.txt +6 -0
  677. package/console/settings/provider-standing/__next._index.txt +17 -0
  678. package/console/settings/provider-standing/__next._tree.txt +5 -0
  679. package/console/settings/provider-standing/__next.settings.provider-standing.__PAGE__.txt +9 -0
  680. package/console/settings/provider-standing/__next.settings.provider-standing.txt +5 -0
  681. package/console/settings/provider-standing/__next.settings.txt +6 -0
  682. package/console/settings/provider-standing.html +1 -0
  683. package/console/settings/provider-standing.txt +38 -0
  684. package/console/settings/usage/__next._full.txt +35 -0
  685. package/console/settings/usage/__next._head.txt +6 -0
  686. package/console/settings/usage/__next._index.txt +17 -0
  687. package/console/settings/usage/__next._tree.txt +5 -0
  688. package/console/settings/usage/__next.settings.txt +6 -0
  689. package/console/settings/usage/__next.settings.usage.__PAGE__.txt +6 -0
  690. package/console/settings/usage/__next.settings.usage.txt +5 -0
  691. package/console/settings/usage.html +1 -0
  692. package/console/settings/usage.txt +35 -0
  693. package/console/settings.html +1 -0
  694. package/console/settings.txt +35 -0
  695. package/console/workflows/__next._full.txt +32 -0
  696. package/console/workflows/__next._head.txt +6 -0
  697. package/console/workflows/__next._index.txt +17 -0
  698. package/console/workflows/__next._tree.txt +5 -0
  699. package/console/workflows/__next.workflows.__PAGE__.txt +6 -0
  700. package/console/workflows/__next.workflows.txt +5 -0
  701. package/console/workflows/__placeholder__/__placeholder__/__next._full.txt +35 -0
  702. package/console/workflows/__placeholder__/__placeholder__/__next._head.txt +6 -0
  703. package/console/workflows/__placeholder__/__placeholder__/__next._index.txt +17 -0
  704. package/console/workflows/__placeholder__/__placeholder__/__next._tree.txt +5 -0
  705. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.__PAGE__.txt +6 -0
  706. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.txt +5 -0
  707. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.txt +5 -0
  708. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.txt +5 -0
  709. package/console/workflows/__placeholder__/__placeholder__.html +1 -0
  710. package/console/workflows/__placeholder__/__placeholder__.txt +35 -0
  711. package/console/workflows/executions/__next._full.txt +33 -0
  712. package/console/workflows/executions/__next._head.txt +6 -0
  713. package/console/workflows/executions/__next._index.txt +17 -0
  714. package/console/workflows/executions/__next._tree.txt +5 -0
  715. package/console/workflows/executions/__next.workflows.executions.__PAGE__.txt +6 -0
  716. package/console/workflows/executions/__next.workflows.executions.txt +5 -0
  717. package/console/workflows/executions/__next.workflows.txt +5 -0
  718. package/console/workflows/executions/__placeholder__/__next._full.txt +34 -0
  719. package/console/workflows/executions/__placeholder__/__next._head.txt +6 -0
  720. package/console/workflows/executions/__placeholder__/__next._index.txt +17 -0
  721. package/console/workflows/executions/__placeholder__/__next._tree.txt +5 -0
  722. package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.__PAGE__.txt +6 -0
  723. package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.txt +5 -0
  724. package/console/workflows/executions/__placeholder__/__next.workflows.executions.txt +5 -0
  725. package/console/workflows/executions/__placeholder__/__next.workflows.txt +5 -0
  726. package/console/workflows/executions/__placeholder__.html +1 -0
  727. package/console/workflows/executions/__placeholder__.txt +34 -0
  728. package/console/workflows/executions.html +1 -0
  729. package/console/workflows/executions.txt +33 -0
  730. package/console/workflows.html +1 -0
  731. package/console/workflows.txt +32 -0
  732. package/main.js +1138 -0
  733. package/mappings.wasm +0 -0
  734. package/package.json +25 -0
  735. package/workflow-bundle-agent-execution.js +31729 -0
  736. package/workflow-bundle-schedule.js +11315 -0
  737. package/workflow-bundle-workflow-execution.js +29297 -0
  738. package/workflow-worker-thread.cjs +111 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,309504,e=>{"use strict";e.s(["isPerfLoggingEnabled",0,function(){return!1}])},282838,e=>{"use strict";var t=e.i(271645),s=e.i(309504);e.s(["useRenderTracer",0,function(e,r){let n=(0,t.useRef)(0),i=(0,t.useRef)(null);if(!(0,s.isPerfLoggingEnabled)())return;n.current+=1;let o=n.current,l=i.current;if(o%10==0||1===o){let t=[];if(l)for(let e of Object.keys(r))Object.is(r[e],l[e])||t.push(e);let s=[`[stgm:perf:render] ${e}`,`render=#${o}`];for(let[e,t]of Object.entries(r))"string"==typeof t?s.push(`${e}=${t.length>40?t.slice(0,40)+"…":t}`):("number"==typeof t||"boolean"==typeof t)&&s.push(`${e}=${String(t)}`);l&&s.push(t.length>0?`changed=[${t.join(",")}]`:"changed=[]"),console.debug(s.join(" "))}i.current={...r}}])},389223,554823,e=>{"use strict";var t=e.i(271645);let s=null,r=null;function n(){let e=(r||(r=window.matchMedia("(prefers-reduced-motion: reduce)")),r);return!!e&&(null===s&&(s=e.matches,e.addEventListener("change",e=>{s=e.matches})),s)}e.s(["getAnimationDuration",0,function(e){return n()?0:e},"prefersReducedMotion",0,n],554823),e.s(["useRevealLine",0,function(e){let s=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!e)return;let t=s.current;if(!t)return;let r=t.querySelector(`[data-line="${e.line}"]`);r?.scrollIntoView?.({block:"center",behavior:n()?"auto":"smooth"})},[e?.nonce]),{containerRef:s,isRevealed:(0,t.useCallback)(t=>e?.line===t,[e?.line])}}],389223)},432814,e=>{"use strict";var t=e.i(661438);let s=new Set(["yaml","yml","json","md","txt","toml","xml","csv","log","sh","bash","py","ts","js","go","rs","html","css","sql","env","cfg","ini","conf"]),r=new Set(["yaml","yml"]),n=new Set(["json"]),i=new Set(["md","mdx"]);function o(e){let t=e.lastIndexOf(".");return -1===t||t===e.length-1?null:e.slice(t+1).toLowerCase()}let l=["B","KB","MB","GB","TB"];e.s(["formatArtifactSize",0,function(e){let t="bigint"==typeof e?Number(e):e;if(0===t)return"0 B";let s=Math.min(Math.floor(Math.log(t)/Math.log(1024)),l.length-1),r=t/Math.pow(1024,s);return 0===s?`${t} B`:`${r.toFixed(1)} ${l[s]}`},"getArtifactRenderMode",0,function(e,t){let s=o(e);if(s&&i.has(s))return"markdown";if(s&&r.has(s))return"yaml";if(s&&n.has(s))return"json";if(t){let e=t.toLowerCase();if(e.includes("markdown"))return"markdown";if(e.includes("yaml"))return"yaml";if(e.includes("json"))return"json"}return"text"},"isTextArtifact",0,function(e){if(e.kind===t.ExecutionArtifactKind.DIRECTORY)return!1;let r=o(e.name);return null!==r&&s.has(r)}])},851624,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(918789),n=e.i(893976),i=e.i(61855),o=e.i(389223),l=e.i(432814);function a({content:e,reveal:n}){let[o,l]=(0,s.useState)(n?"source":"rendered");(0,s.useEffect)(()=>{n&&l("source")},[n?.nonce]);let c=(0,s.useMemo)(()=>(0,i.unwrapEnclosingMarkdownFence)(e),[e]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"stg:flex stg:items-center stg:border-b stg:border-border stg:px-4 stg:py-1.5",children:(0,t.jsxs)("div",{className:"stg:inline-flex stg:rounded-md stg:bg-muted stg:p-0.5",role:"tablist","aria-label":"View mode",children:[(0,t.jsx)(d,{active:"rendered"===o,onClick:()=>l("rendered"),label:"Rendered"}),(0,t.jsx)(d,{active:"source"===o,onClick:()=>l("source"),label:"Source"})]})}),"rendered"===o?(0,t.jsx)("div",{className:"stg:p-5",children:(0,t.jsx)(r.default,{remarkPlugins:i.REMARK_PLUGINS,components:i.MARKDOWN_COMPONENTS,children:c})}):(0,t.jsx)(p,{content:e,reveal:n})]})}function d({active:e,onClick:s,label:r}){return(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":e,onClick:s,className:(0,n.cn)("stg:rounded-sm stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",e?"stg:bg-background stg:text-foreground stg:shadow-sm":"stg:text-muted-foreground stg:hover:text-foreground"),children:r})}function c({content:e,reveal:s}){let{containerRef:r,isRevealed:i}=(0,o.useRevealLine)(s),l=e.split("\n");return(0,t.jsx)("pre",{className:"stg:overflow-x-auto stg:p-4 stg:font-mono stg:text-xs stg:leading-relaxed stg:text-foreground",children:(0,t.jsx)("code",{ref:r,children:l.map((e,s)=>(0,t.jsx)("span",{"data-line":s+1,className:(0,n.cn)("stg:block stg:border-l-2 stg:border-transparent",i(s+1)&&"stg:border-primary stg:bg-primary-subtle"),children:(0,t.jsx)("span",{className:"stg:whitespace-pre",children:e.trim()?function(e){if(!e.trim())return e;if(/^---\s*$/.test(e)||/^\.\.\.\s*$/.test(e))return(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:e});let s=e.match(/^(\s*)(#.*)$/);if(s)return(0,t.jsxs)(t.Fragment,{children:[s[1],(0,t.jsx)("span",{className:"stg:text-muted-foreground stg:italic",children:s[2]})]});let r=e.match(/^(\s*(?:-\s+)?)([\w][\w.-]*)(:(?:\s|$))(.*)/);if(r){var n;let e,[,s,i,o,l]=r;return(0,t.jsxs)(t.Fragment,{children:[s,(0,t.jsx)("span",{className:"stg:text-primary",children:i}),(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:o}),l?(e=(n=l).trim(),/^[|>][-+]?\s*$/.test(e)?(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:n}):/^(true|false|null|~)$/.test(e)?(0,t.jsx)("span",{className:"stg:font-medium",children:n}):(0,t.jsx)(t.Fragment,{children:n})):null]})}return(0,t.jsx)(t.Fragment,{children:e})}(e):"\n"})},s))})})}function u({content:e}){return(0,t.jsx)("pre",{className:"stg:overflow-x-auto stg:p-4 stg:font-mono stg:text-xs stg:leading-relaxed stg:text-foreground",children:(0,t.jsx)("code",{children:function(e){let s;try{s=JSON.stringify(JSON.parse(e),null,2)}catch{s=e}return s.split("\n").map((e,s)=>{let r=e.match(/^(\s*)"([^"]+)"(\s*:)(.*)/);if(r){var n;let e,i,[,o,l,a,d]=r;return(0,t.jsxs)("span",{children:[s>0&&"\n",o,(0,t.jsxs)("span",{className:"stg:text-primary",children:['"',l,'"']}),(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:a}),(e=(n=d).trim().replace(/,\s*$/,""),i=n.trim().endsWith(",")?",":"",/^".*"$/.test(e)?(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("span",{className:"stg:text-success",children:e}),i]}):/^(true|false|null)$/.test(e)?(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("span",{className:"stg:font-medium",children:e}),i]}):/^-?\d/.test(e)?(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("span",{className:"stg:text-warning",children:e}),i]}):(0,t.jsx)(t.Fragment,{children:n}))]},s)}return(0,t.jsxs)("span",{children:[s>0&&"\n",e]},s)})}(e)})})}function g({content:e,reveal:s}){return(0,t.jsx)(p,{content:e,reveal:s})}function p({content:e,reveal:s}){let{containerRef:r,isRevealed:i}=(0,o.useRevealLine)(s),l=e.split("\n"),a=String(l.length).length;return(0,t.jsx)("pre",{className:"stg:overflow-x-auto stg:font-mono stg:text-xs stg:leading-relaxed stg:text-foreground",children:(0,t.jsx)("code",{ref:r,children:l.map((e,s)=>(0,t.jsxs)("span",{"data-line":s+1,className:(0,n.cn)("stg:flex stg:border-l-2 stg:border-transparent",i(s+1)&&"stg:border-primary stg:bg-primary-subtle"),children:[(0,t.jsx)("span",{className:"stg:sticky stg:left-0 stg:select-none stg:bg-background stg:pr-4 stg:text-right stg:text-muted-foreground",style:{minWidth:`${a+2}ch`},"aria-hidden":"true",children:s+1}),(0,t.jsx)("span",{className:"stg:flex-1 stg:whitespace-pre stg:pl-2",children:e||"\n"})]},s))})})}function h(){return(0,t.jsx)("div",{className:"stg:border-t stg:border-border stg:bg-warning/10 stg:px-4 stg:py-2 stg:text-xs stg:text-warning",children:"Content was truncated. Download the full file for complete content."})}e.s(["ArtifactContentRenderer",0,function({content:e,fileName:s,contentType:r,isTruncated:i=!1,reveal:o,className:d}){let m=(0,l.getArtifactRenderMode)(s,r);return(0,t.jsxs)("div",{className:(0,n.cn)(d),children:["markdown"===m?(0,t.jsx)(a,{content:e,reveal:o}):"yaml"===m?(0,t.jsx)(c,{content:e,reveal:o}):"json"===m?o?(0,t.jsx)(p,{content:e,reveal:o}):(0,t.jsx)(u,{content:e}):(0,t.jsx)(g,{content:e,reveal:o}),i&&(0,t.jsx)(h,{})]})}])},411570,e=>{"use strict";var t=e.i(271645);e.s(["useIsOverflowing",0,function(e){let s=(0,t.useRef)(null),[r,n]=(0,t.useState)(!1);return(0,t.useLayoutEffect)(()=>{if(!e)return void n(e=>!e&&e);let t=s.current;if(!t)return;let r=()=>{let e=t.scrollHeight>t.clientHeight+1;n(t=>t===e?t:e)};r();let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[e]),{ref:s,isOverflowing:r}}])},679239,e=>{"use strict";var t=e.i(843476),s=e.i(893976);function r({expanded:e}){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:(0,s.cn)("stg:shrink-0 stg:transition-transform stg:duration-150",e&&"stg:rotate-180"),"aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2.5 3.5L5 6.5L7.5 3.5"})})}e.s(["RevealToggle",0,function({expanded:e,onToggle:n,moreLabel:i="Show more",lessLabel:o="Show less",cursorTarget:l,className:a}){return(0,t.jsxs)("button",{type:"button",onClick:n,"aria-expanded":e,"data-cursor-target":l,className:(0,s.cn)("stg:mt-1 stg:flex stg:w-full stg:items-center stg:justify-center stg:gap-1 stg:rounded stg:py-0.5","stg:text-xs stg:font-medium stg:text-muted-foreground stg:transition-colors stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",a),children:[(0,t.jsx)("span",{children:e?o:i}),(0,t.jsx)(r,{expanded:e})]})}])},719705,154111,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(411570),i=e.i(679239);e.s(["BoundedContent",0,function({children:e,maxHeightClass:o="stg:max-h-48",cursorTarget:l,className:a}){let[d,c]=(0,s.useState)(!1),u=!d,{ref:g,isOverflowing:p}=(0,n.useIsOverflowing)(u),h=p||d,m=u&&p;return(0,t.jsxs)("div",{className:a,children:[(0,t.jsxs)("div",{ref:g,className:(0,r.cn)("stg:relative stg:overflow-hidden",u&&o),children:[e,m&&(0,t.jsx)("div",{"aria-hidden":"true",className:"stg:pointer-events-none stg:absolute stg:inset-x-0 stg:bottom-0 stg:h-8 stg:bg-gradient-to-t stg:from-background stg:to-transparent"})]}),h&&(0,t.jsx)(i.RevealToggle,{expanded:d,onToggle:()=>c(e=>!e),cursorTarget:l})]})}],719705);var o=e.i(598529),l=e.i(929146);e.s(["UnifiedDiffView",0,function({patch:e,className:n}){let i=(0,s.useMemo)(()=>(function(e){if(!e)return[];try{return(function(e){let t=e.split(/\n/),s=[],r=0;function n(e){let s=/^(---|\+\+\+)\s+/.exec(t[r]);if(s){let n=s[1],i=t[r].substring(3).trim().split(" ",2),o=(i[1]||"").trim(),l=i[0].replace(/\\\\/g,"\\");l.startsWith('"')&&l.endsWith('"')&&(l=l.substr(1,l.length-2)),"---"===n?(e.oldFileName=l,e.oldHeader=o):(e.newFileName=l,e.newHeader=o),r++}}for(;r<t.length;)!function(){let e={};for(s.push(e);r<t.length;){let s=t[r];if(/^(---|\+\+\+|@@)\s/.test(s))break;let n=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(s);n&&(e.index=s.substring(n[0].length).trim()),r++}for(n(e),n(e),e.hunks=[];r<t.length;){let s=t[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(s))break;if(/^@@/.test(s))e.hunks.push(function(){var e;let s=r,n=t[r++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),i={oldStart:+n[1],oldLines:void 0===n[2]?1:+n[2],newStart:+n[3],newLines:void 0===n[4]?1:+n[4],lines:[]};0===i.oldLines&&(i.oldStart+=1),0===i.newLines&&(i.newStart+=1);let o=0,l=0;for(;r<t.length&&(l<i.oldLines||o<i.newLines||(null==(e=t[r])?void 0:e.startsWith("\\")));r++){let e=0==t[r].length&&r!=t.length-1?" ":t[r][0];if("+"===e||"-"===e||" "===e||"\\"===e)i.lines.push(t[r]),"+"===e?o++:"-"===e?l++:" "===e&&(o++,l++);else throw Error(`Hunk at line ${s+1} contained invalid line ${t[r]}`)}if(o||1!==i.newLines||(i.newLines=0),l||1!==i.oldLines||(i.oldLines=0),o!==i.newLines)throw Error("Added line count did not match for hunk at line "+(s+1));if(l!==i.oldLines)throw Error("Removed line count did not match for hunk at line "+(s+1));return i}());else if(s)throw Error("Unknown line "+(r+1)+" "+JSON.stringify(s));else r++}}();return s})(e).flatMap(e=>(0,l.mapPatchHunks)(e.hunks))}catch{return[]}})(e),[e]);if(i.length>0)return(0,t.jsx)(o.DiffViewer,{hunks:i,className:n});let a=e.split("\n");return(0,t.jsx)("pre",{className:(0,r.cn)("stg:max-h-96 stg:overflow-auto stg:whitespace-pre-wrap stg:break-words stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:p-2 stg:font-mono stg:text-xs",n),children:a.map((e,s)=>(0,t.jsx)("div",{className:(0,r.cn)(e.startsWith("+")&&!e.startsWith("+++")&&"stg:text-diff-added-fg",e.startsWith("-")&&!e.startsWith("---")&&"stg:text-diff-removed-fg",e.startsWith("@@")&&"stg:text-diff-hunk-header-fg"),children:e||" "},s))})}],154111)},130460,e=>{"use strict";var t=e.i(891287),s=e.i(238616),r=e.i(661438);function n(e){return e.status===r.FileChangeSetStatus.RECONCILED||e.status===r.FileChangeSetStatus.FAILED?e.status:!function(e){if(0===e.changes.length)return!1;let t=new Set;for(let s of e.decisions){if(s.scope===r.FileDecisionScope.CHANGE_SET)return!0;s.scope===r.FileDecisionScope.FILE&&t.add(s.fileChangeId)}for(let s of e.changes)if(!t.has(s.id))return!1;return!0}(e)?r.FileChangeSetStatus.AWAITING_REVIEW:r.FileChangeSetStatus.DECIDED}e.s(["displayFileChangeSets",0,function(e){let i=e?.fileChangeSets;return i&&i.length>0?i:function(e){if(!e||0===e.events.length)return[];let i=[],o=new Map;for(let l of e.events){let e=l.changeSetId;if(!e)continue;let a=o.get(e);a||(a=(0,t.create)(s.FileChangeSetSchema,{id:e}),o.set(e,a),i.push(e)),function(e,t){switch(t.eventType){case r.FileReviewEventType.BASELINE_CAPTURED:{let s="baselineCaptured"===t.payload.case?t.payload.value:void 0;e.turnId=s?.turnId??"",e.harnessId=s?.harnessId??"",e.baselineSnapshot=s?.baselineSnapshot,e.status=r.FileChangeSetStatus.CAPTURING;break}case r.FileReviewEventType.CANDIDATE_CAPTURED:{let s="candidateCaptured"===t.payload.case?t.payload.value:void 0;e.candidateSnapshot=s?.candidateSnapshot,e.changes=s?.changes??[],e.aggregateDigest=s?.aggregateDigest??"",e.diffCompleteness=s?.diffCompleteness??e.diffCompleteness,e.status=n(e);break}case r.FileReviewEventType.FILE_DECIDED:"fileDecided"===t.payload.case&&e.decisions.push(t.payload.value),e.status=n(e);break;case r.FileReviewEventType.RECONCILED:{let s="reconciled"===t.payload.case?t.payload.value:void 0;e.approvedSnapshot=s?.approvedSnapshot,e.status=r.FileChangeSetStatus.RECONCILED;break}case r.FileReviewEventType.FAILED:e.status=r.FileChangeSetStatus.FAILED}}(a,l)}return i.map(e=>o.get(e))}(e?.fileReviewEventStream)}])},585413,e=>{"use strict";var t=e.i(891287),s=e.i(522017),r=e.i(661438);e.s(["toDisplayFileChange",0,function(e){return(0,t.create)(s.FileChangeSchema,{path:e.pathAfter||e.pathBefore,changeType:function(e){switch(e){case r.FileChangeKind.ADD:return r.FileChangeType.CREATE;case r.FileChangeKind.DELETE:return r.FileChangeType.DELETE;case r.FileChangeKind.RENAME:return r.FileChangeType.RENAME;default:return r.FileChangeType.MODIFY}}(e.kind),captureLevel:r.FileChangeCaptureLevel.WHOLE_FILE,before:e.before,after:e.after,linesAdded:e.linesAdded,linesRemoved:e.linesRemoved,renameFrom:e.kind===r.FileChangeKind.RENAME?e.pathBefore:""})}])},980213,6486,791418,163568,278611,e=>{"use strict";var t=e.i(891287),s=e.i(522017),r=e.i(661438),n=e.i(130460),i=e.i(585413),o=e.i(321091);function l(e){var n;if(1===e.length)return e[0];let i=e[0],o=e[e.length-1],l=(n=i,o.changeType===r.FileChangeType.DELETE?r.FileChangeType.DELETE:n.changeType===r.FileChangeType.CREATE?r.FileChangeType.CREATE:n.changeType===r.FileChangeType.RENAME?r.FileChangeType.RENAME:r.FileChangeType.MODIFY);return i.captureLevel===r.FileChangeCaptureLevel.WHOLE_FILE&&o.captureLevel===r.FileChangeCaptureLevel.WHOLE_FILE?(0,t.create)(s.FileChangeSchema,{path:o.path,absolutePath:o.absolutePath,changeType:l,captureLevel:r.FileChangeCaptureLevel.WHOLE_FILE,before:i.before,after:o.after,renameFrom:l===r.FileChangeType.RENAME?i.renameFrom:""}):(0,t.create)(s.FileChangeSchema,{path:o.path,absolutePath:o.absolutePath,changeType:l,captureLevel:r.FileChangeCaptureLevel.HUNK_ONLY,unifiedDiff:o.unifiedDiff,linesAdded:o.linesAdded,linesRemoved:o.linesRemoved,renameFrom:l===r.FileChangeType.RENAME?i.renameFrom:""})}let a={[r.FileChangeType.MODIFY]:0,[r.FileChangeType.CREATE]:1,[r.FileChangeType.RENAME]:1,[r.FileChangeType.DELETE]:2,[r.FileChangeType.UNSPECIFIED]:3};function d(e,t){let s=(a[e.changeType]??3)-(a[t.changeType]??3);return 0!==s?s:e.path.localeCompare(t.path,void 0,{sensitivity:"base"})}function c(e){let t=0,s=0;for(let r of e)for(let e of r.lines)"added"===e.type?t++:"removed"===e.type&&s++;return{additions:t,deletions:s}}function u(e){return e?e.isBinary?null:"inline"===e.body.case?e.body.value:null:""}e.s(["countHunks",0,c,"deriveExecutionFileChanges",0,function(e){let t=new Map,s=e=>{let s=e.path||e.absolutePath;if(!s)return;let r=t.get(s);r?r.push(e):t.set(s,[e])};for(let t of e)for(let e of(0,n.displayFileChangeSets)(t.status).flatMap(e=>e.changes))s((0,i.toDisplayFileChange)(e));let r=Array.from(t.values(),l);return r.sort(d),r},"toFileDiffEntry",0,function(e){let t=e.changeType===r.FileChangeType.CREATE?"added":e.changeType===r.FileChangeType.DELETE?"removed":"modified";if(e.captureLevel===r.FileChangeCaptureLevel.HUNK_ONLY)return{path:e.path,changeType:t,additions:e.linesAdded,deletions:e.linesRemoved};let s=u(e.before),n=u(e.after);if(null!==s&&null!==n){let{additions:r,deletions:i}=c((0,o.computeDiff)(s,n));return{path:e.path,changeType:t,additions:r,deletions:i}}return{path:e.path,changeType:t,additions:e.linesAdded,deletions:e.linesRemoved}}],980213);var g=e.i(843476),p=e.i(271645),h=e.i(893976),m=e.i(188482),x=e.i(193799);let f=(0,p.createContext)({workspaceEntries:[]});e.s(["FilePathContext",0,f],6486);let b=".stigmer/";function v(e){let t=e.replace(/^\/+/,"");return t.startsWith(b)?{kind:"platform",subpath:t.slice(b.length)}:".stigmer"===t?{kind:"platform",subpath:""}:{kind:"workspace",remainder:t}}function j(e){if(!e)return{dir:"",base:""};let t=e.replace(/\/+$/,""),s=t.lastIndexOf("/");if(s<0)return{dir:"",base:t};let r=t.slice(s+1);return r?{dir:t.slice(0,s+1),base:r}:{dir:"",base:t}}function y(e,t){if(!e)return{action:"copy",value:e,tooltip:"Copy path"};let s=v(e);if("platform"===s.kind)return{action:"copy",value:e,tooltip:"Copy path"};let{remainder:r}=s;if(0===t.length)return{action:"copy",value:e,tooltip:"Copy path"};let{entry:n,relPath:i}=function(e,t){if(1===t.length)return{entry:t[0],relPath:e};let s=e.split("/");for(let e=0;e<s.length;e++)for(let r of t)if(r.name===s[e])return{entry:r,relPath:s.slice(e+1).join("/")};return{entry:t[0],relPath:e}}(r,t),o=n.source?.source;if(o?.case==="gitRepo"){let e=function(e,t,s,r){let n;try{n=new URL(e)}catch{return null}if("github.com"!==n.hostname)return null;let i=n.pathname.replace(/\.git$/,"").replace(/^\/|\/$/g,"");if(!i)return null;let o=r.replace(/^\/+/,"");return o.startsWith(i+"/")&&(o=o.slice(i.length+1)),`https://github.com/${i}/blob/${s||t||"HEAD"}/${o}`}(o.value.url,o.value.branch,o.value.commit,i);if(e)return{action:"link",url:e,tooltip:"Open on GitHub"}}return o?.case==="localPath"?{action:"copy",value:function(e,t){if(!t)return e;let s=e.replace(/\/+$/,""),r=t.replace(/^\/+/,"");return`${s}/${r}`}(o.value.path,i),tooltip:"Copy path"}:{action:"copy",value:e,tooltip:"Copy path"}}function C(){return(0,g.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:opacity-0 stg:transition-opacity stg:group-hover/fpl:opacity-70","aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M9 3L5 7"}),(0,g.jsx)("path",{d:"M7 3H9V5"}),(0,g.jsx)("path",{d:"M5 3H3.5C2.95 3 2.5 3.45 2.5 4V8.5C2.5 9.05 2.95 9.5 3.5 9.5H8C8.55 9.5 9 9.05 9 8.5V7"})]})}function k(){return(0,g.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:opacity-0 stg:transition-opacity stg:group-hover/fpl:opacity-70","aria-hidden":"true",children:[(0,g.jsx)("rect",{x:"4",y:"4",width:"6.5",height:"6.5",rx:"1"}),(0,g.jsx)("path",{d:"M8 4V2.5C8 1.95 7.55 1.5 7 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V7C1.5 7.55 1.95 8 2.5 8H4"})]})}e.s(["classifyPath",0,v,"resolvePathAction",0,y,"splitDisplayPath",0,j],791418),e.s(["FilePathLink",0,function({path:e,dirDisplay:t="hide",className:s}){let{workspaceEntries:r,onFilePathClick:n}=(0,p.useContext)(f),{copy:i,copied:o}=(0,x.useCopyFeedback)(),l=(0,p.useMemo)(()=>y(e,r),[e,r]),{dir:a,base:d}=(0,p.useMemo)(()=>j(e),[e]),c="copy"===l.action?l.value:e,u=`${l.tooltip}: ${c}`,b=(0,p.useCallback)(()=>{i("copy"===l.action?l.value:e)},[l,e,i]),v=(0,p.useCallback)(t=>{if(t.stopPropagation(),n&&!1!==n(e,l)){"link"===l.action&&t.preventDefault();return}"copy"===l.action&&b()},[n,e,l,b]),w=(0,h.cn)("stg:inline-flex stg:min-w-0 stg:items-center stg:gap-1 stg:font-mono stg:text-foreground","stg:transition-colors stg:hover:text-primary stg:hover:underline","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring stg:focus-visible:rounded-sm",s),N=o?(0,g.jsx)("span",{className:"stg:min-w-0 stg:truncate",children:"Copied"}):(0,g.jsxs)(g.Fragment,{children:["dim"===t&&a&&(0,g.jsx)("span",{className:"stg:min-w-0 stg:truncate stg:text-muted-foreground-faint",children:a}),(0,g.jsx)("span",{className:"stg:shrink-0",children:d})]});return"link"===l.action?(0,g.jsxs)(m.Tooltip,{children:[(0,g.jsxs)(m.TooltipTrigger,{render:(0,g.jsx)("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",onClick:v,"aria-label":u,className:(0,h.cn)(w,"stg:group/fpl")}),children:[N,(0,g.jsx)(C,{})]}),(0,g.jsx)(m.TooltipContent,{side:"top",className:"stg:break-all",children:c})]}):(0,g.jsxs)(m.Tooltip,{children:[(0,g.jsxs)(m.TooltipTrigger,{render:(0,g.jsx)("button",{type:"button",onClick:v,"aria-label":u,className:(0,h.cn)(w,"stg:group/fpl stg:cursor-pointer")}),children:[N,!o&&(0,g.jsx)(k,{})]}),(0,g.jsx)(m.TooltipContent,{side:"top",className:"stg:break-all",children:c})]})}],163568);let w={"empty-create":"New empty file",create:"New file — preview unavailable","no-preview":"No preview available for this change"};e.s(["EmptyChangeNotice",0,function({kind:e,className:t}){return(0,g.jsx)("div",{role:"status","data-cursor-target":"empty-change-notice",className:(0,h.cn)("stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:px-3 stg:py-2 stg:text-xs stg:text-muted-foreground",t),children:w[e]})}],278611)},445726,e=>{"use strict";function t(e){return e.spec?.executionConfig?.buildFromPlan===!0}e.s(["execIdFromStorageKey",0,function(e){let t=e.split("/");return t.length>=3&&"artifacts"===t[0]&&t[1]?t[1]:null},"isBuildFromPlanTurn",0,t,"sortChronologically",0,function(e){return[...e].sort((e,t)=>{let s=e.metadata?.id??"",r=t.metadata?.id??"";return s===r?0:s?r?s<r?-1:1:-1:1})},"supersededExecutionIds",0,function(e,t){let s=new Set;for(let t of e){let e=t.spec?.supersedesExecutionId;e&&s.add(e)}return t&&s.add(t),s},"syntheticUserPrompt",0,function(e){let s=e.spec?.message;return!s||"execute"===s||t(e)?null:s}])},669226,e=>{"use strict";var t=e.i(891287),s=e.i(261024),r=e.i(586108),n=e.i(583093);let i={content:null,contentType:null,isTruncated:!1};e.s(["useArtifactContent",0,function(e,o,l,a,d){let c=(0,r.useStigmer)(),{data:u,isLoading:g,isRefetching:p,error:h,refetch:m}=(0,n.useFetch)(e&&o?()=>c.agentExecution.getArtifactContent((0,t.create)(s.GetArtifactContentRequestSchema,{executionId:e,storageKey:o,...l?{entryPath:l}:{}})).then(e=>({content:new TextDecoder().decode(e.content),contentType:e.contentType||null,isTruncated:e.truncated})):null,[e,o,l,a,c],i,d?{cacheKey:d}:void 0);return{content:u.content,contentType:u.contentType,isTruncated:u.isTruncated,isLoading:g,isRefetching:p,error:h,refetch:m}}])},814859,e=>{"use strict";var t=e.i(271645),s=e.i(891287),r=e.i(261024),n=e.i(586108),i=e.i(583093);let o={url:null};e.s(["useArtifactDownloadUrl",0,function(e,l,a){let d=(0,n.useStigmer)(),c=(a?.enabled??!0)&&!!e&&!!l,{data:u,isLoading:g,isRefetching:p,error:h,refetch:m}=(0,i.useFetch)(c?()=>d.agentExecution.getArtifactDownloadUrl((0,s.create)(r.GetArtifactDownloadUrlRequestSchema,{executionId:e,storageKey:l})).then(e=>({url:e.downloadUrl||null})):null,[e,l,c,d],o,{cacheKey:l?`artifact-url:${l}`:void 0});return(0,t.useMemo)(()=>({url:u.url,isLoading:g,isRefetching:p,error:h,refetch:m}),[u.url,g,p,h,m])}])},92649,821354,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(661438),n=e.i(893976),i=e.i(719705),o=e.i(321091),l=e.i(598529),a=e.i(154111),d=e.i(980213),c=e.i(163568),u=e.i(278611),g=e.i(445726),p=e.i(669226),h=e.i(814859);function m(e){let t=x(e.before),r=x(e.after),n=(0,p.useArtifactContent)(t?(0,g.execIdFromStorageKey)(t.storageKey):null,t?t.storageKey:null,null,t?.contentHash),i=(0,p.useArtifactContent)(r?(0,g.execIdFromStorageKey)(r.storageKey):null,r?r.storageKey:null,null,r?.contentHash),o=n.isTruncated||i.isTruncated,l=r??t,{url:a}=(0,h.useArtifactDownloadUrl)(l?(0,g.execIdFromStorageKey)(l.storageKey):null,l?l.storageKey:null,{enabled:o});return(0,s.useMemo)(()=>({beforeText:f(e.before,n.content),afterText:f(e.after,i.content),isBinary:!!(e.before?.isBinary||e.after?.isBinary),isLoading:n.isLoading||i.isLoading,error:n.error??i.error,isTruncated:o,downloadUrl:a}),[e.before,e.after,n.content,i.content,n.isLoading,i.isLoading,n.error,i.error,o,a])}function x(e){return!e||e.isBinary?null:"ref"===e.body.case?e.body.value:null}function f(e,t){return!e||e.isBinary?"":"inline"===e.body.case?e.body.value:t}function b({change:e,hunks:s,isBinary:n,isLoading:o,error:d,isTruncated:c,downloadUrl:g,bodyClassName:p,bounded:h}){let m=e.changeType===r.FileChangeType.CREATE?"empty-create":"no-preview",x=e=>h?(0,t.jsx)(i.BoundedContent,{cursorTarget:"file-diff-expand",children:e}):e;return n?(0,t.jsx)(v,{children:"Binary file changed."}):e.captureLevel===r.FileChangeCaptureLevel.HUNK_ONLY?e.unifiedDiff?x((0,t.jsx)(a.UnifiedDiffView,{patch:e.unifiedDiff,className:p})):(0,t.jsx)(u.EmptyChangeNotice,{kind:m,className:p}):c?(0,t.jsxs)(v,{children:["This file is too large to diff inline."," ",g&&(0,t.jsx)("a",{href:g,target:"_blank",rel:"noreferrer",className:"stg:font-medium stg:text-primary stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:"Download the full file"})]}):o?(0,t.jsx)(v,{children:"Loading diff…"}):d?(0,t.jsx)(v,{variant:"error",children:"Could not load this file's contents."}):0===s.length?(0,t.jsx)(u.EmptyChangeNotice,{kind:m,className:p}):x((0,t.jsx)(l.DiffViewer,{hunks:s,className:p}))}function v({children:e,variant:s="muted"}){return(0,t.jsx)("div",{role:"status",className:(0,n.cn)("stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:px-3 stg:py-2 stg:text-xs","error"===s?"stg:text-destructive":"stg:text-muted-foreground"),children:e})}e.s(["useFileChangeContent",0,m],821354),e.s(["FileChangeDiff",0,function({change:e,className:i,bodyClassName:l,bounded:a=!1,showFileName:u=!0,showStats:g=!0}){let{beforeText:p,afterText:h,isBinary:x,isLoading:f,error:v,isTruncated:j,downloadUrl:y}=m(e),C=(0,s.useMemo)(()=>null===p||null===h?[]:(0,o.computeDiff)(p,h),[p,h]),k=(0,s.useMemo)(()=>{if(e.captureLevel===r.FileChangeCaptureLevel.HUNK_ONLY)return{additions:e.linesAdded,deletions:e.linesRemoved};let t=(0,d.countHunks)(C);return t.additions>0||t.deletions>0?t:{additions:e.linesAdded,deletions:e.linesRemoved}},[e.captureLevel,e.linesAdded,e.linesRemoved,C]),w=g&&(k.additions>0||k.deletions>0);return(0,t.jsxs)("div",{className:(0,n.cn)("stg:flex stg:flex-col stg:gap-1.5",i),"data-cursor-target":"file-diff",children:[(u||w)&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-xs stg:text-muted-foreground",children:[u&&e.changeType===r.FileChangeType.RENAME&&e.renameFrom&&(0,t.jsxs)("span",{className:"stg:min-w-0 stg:truncate stg:font-mono stg:text-muted-foreground-faint",children:[e.renameFrom," →"]}),u&&(0,t.jsx)(c.FilePathLink,{path:e.path,dirDisplay:"dim",className:"stg:text-xs"}),w&&(0,t.jsxs)("span",{className:"stg:shrink-0 stg:tabular-nums",children:[(0,t.jsxs)("span",{className:"stg:text-diff-added-fg",children:["+",k.additions]})," ",(0,t.jsxs)("span",{className:"stg:text-diff-removed-fg",children:["-",k.deletions]})]})]}),(0,t.jsx)(b,{change:e,hunks:C,isBinary:x,isLoading:f,error:v,isTruncated:j,downloadUrl:y,bodyClassName:l,bounded:a})]})}],92649)},835992,e=>{"use strict";var t=e.i(271645),s=e.i(891287),r=e.i(261024),n=e.i(586108),i=e.i(326283);e.s(["useArtifactDownload",0,function(e){let o=(0,n.useStigmer)(),[l,a]=(0,t.useState)(!1),[d,c]=(0,t.useState)(null),u=(0,t.useCallback)(async(t,n)=>{if(e&&t&&!l){a(!0),c(null);try{let i=await o.agentExecution.getArtifactDownloadUrl((0,s.create)(r.GetArtifactDownloadUrlRequestSchema,{executionId:e,storageKey:t,asAttachment:!0}));i.downloadUrl&&function(e,t){if("u"<typeof document)return window.open(e,"_blank","noopener,noreferrer");let s=document.createElement("a");s.href=e,t&&(s.download=t),s.rel="noopener noreferrer",s.target="_blank",document.body.appendChild(s),s.click(),document.body.removeChild(s)}(i.downloadUrl,n)}catch(e){c((0,i.toError)(e))}finally{a(!1)}}},[e,o,l]);return(0,t.useMemo)(()=>({download:u,isDownloading:l,error:d}),[u,l,d])}])},385062,509968,e=>{"use strict";var t=e.i(843476),s=e.i(661438),r=e.i(869803),n=e.i(851624);let i=[85,72,90,65,78,88,70,82];function o({fileName:e,content:s,contentType:r,isLoading:a,error:d,isTruncated:c}){return a?(0,t.jsx)("div",{className:"stg:space-y-2 stg:p-4","aria-busy":"true","aria-label":"Loading content",children:i.map((e,s)=>(0,t.jsx)("div",{className:"stg:h-4 stg:animate-pulse stg:rounded stg:bg-muted",style:{width:`${e}%`},"aria-hidden":"true"},s))}):d?(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:items-center stg:justify-center stg:gap-2 stg:p-8 stg:text-center",children:[(0,t.jsx)(l,{}),(0,t.jsx)("p",{className:"stg:text-sm stg:text-destructive",children:d.message})]}):null===s?(0,t.jsx)("div",{className:"stg:p-8 stg:text-center stg:text-sm stg:text-muted-foreground",children:"Content not available for preview."}):(0,t.jsx)(n.ArtifactContentRenderer,{content:s,fileName:e,contentType:r,isTruncated:c})}function l(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:text-destructive","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6.5"}),(0,t.jsx)("path",{d:"M8 5.5V8.5"}),(0,t.jsx)("circle",{cx:"8",cy:"11",r:"0.5",fill:"currentColor",stroke:"none"})]})}function a({artifact:e,skillDetection:s}){let n=e.entries;return(0,t.jsxs)("div",{className:"stg:p-4",children:[s.detected&&(0,t.jsxs)("div",{className:"stg:mb-4 stg:rounded-md stg:bg-primary-subtle stg:p-3",children:[(0,t.jsx)("p",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:s.skillName}),s.skillDescription&&(0,t.jsx)("p",{className:"stg:mt-1 stg:text-xs stg:text-muted-foreground",children:s.skillDescription})]}),n.length>0?(0,t.jsxs)("div",{children:[(0,t.jsxs)("h3",{className:"stg:mb-2 stg:text-xs stg:font-medium stg:text-muted-foreground",children:["Files (",n.length,")"]}),(0,t.jsx)("ul",{className:`${r.UNSTYLED_LIST} stg:space-y-0.5`,role:"list",children:n.map(e=>(0,t.jsxs)("li",{className:"stg:flex stg:items-center stg:gap-2 stg:rounded-sm stg:px-2 stg:py-1 stg:font-mono stg:text-xs stg:text-foreground",children:[(0,t.jsx)(d,{name:e}),(0,t.jsx)("span",{className:"stg:min-w-0 stg:truncate",children:e})]},e))})]}):(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:"File listing not available."})]})}function d({name:e}){return e.endsWith("/")?(0,t.jsx)(u,{}):(0,t.jsx)(c,{})}function c(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 1H4C3.45 1 3 1.45 3 2V12C3 12.55 3.45 13 4 13H10C10.55 13 11 12.55 11 12V4L8 1Z"}),(0,t.jsx)("path",{d:"M8 1V4H11"})]})}function u(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M13 11C13 11.55 12.55 12 12 12H2C1.45 12 1 11.55 1 11V3C1 2.45 1.45 2 2 2H5L7 4H12C12.55 4 13 4.45 13 5V11Z"})})}e.s(["ArtifactFileContent",0,o],509968),e.s(["ArtifactContentBody",0,function({artifact:e,content:r,contentType:n,isLoading:i,error:l,isTruncated:d,skillDetection:c,className:u}){let g=e.kind===s.ExecutionArtifactKind.DIRECTORY;return(0,t.jsx)("div",{className:u,children:g?(0,t.jsx)(a,{artifact:e,skillDetection:c}):(0,t.jsx)(o,{fileName:e.name,content:r,contentType:n,isLoading:i,error:l,isTruncated:d})})}],385062)},422891,e=>{"use strict";var t=e.i(843476),s=e.i(893976);e.s(["CheckCircleIcon",0,function(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M4 6L5.5 7.5L8 4.5"})]})},"ChevronIcon",0,function({expanded:e}){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:(0,s.cn)("stg:shrink-0 stg:text-muted-foreground stg:transition-transform stg:duration-150",e&&"stg:rotate-90"),"aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3.5 2L6.5 5L3.5 8"})})},"ClockIcon",0,function(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M6 3.5V6L7.5 7.5"})]})},"DotIcon",0,function(){return(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",children:(0,t.jsx)("circle",{cx:"4",cy:"4",r:"2.5"})})},"SlashCircleIcon",0,function(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M2.8 9.2L9.2 2.8"})]})},"SpinnerIcon",0,function({size:e=10,className:r}={}){return(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:(0,s.cn)("stg:animate-spin",r),"aria-hidden":"true",children:(0,t.jsx)("path",{d:"M6 1.5A4.5 4.5 0 1 1 1.5 6",strokeLinecap:"round"})})},"XCircleIcon",0,function(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M4.5 4.5L7.5 7.5M7.5 4.5L4.5 7.5"})]})}])},415400,285716,180762,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(468806),i=e.i(835992),o=e.i(432814),l=e.i(385062),a=e.i(422891);function d({label:e,isTerminal:s,isApplying:n,onApply:i}){let o=s&&!n;return(0,t.jsx)("button",{type:"button",onClick:o?i:void 0,disabled:!o,"aria-busy":n,className:(0,r.cn)("stg:rounded-md stg:px-4 stg:py-1.5 stg:text-xs stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:ring-offset-2","stg:disabled:cursor-not-allowed",o?"stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover":"stg:bg-muted stg:text-muted-foreground"),children:n?(0,t.jsxs)("span",{className:"stg:inline-flex stg:items-center stg:gap-1.5",children:[(0,t.jsx)(a.SpinnerIcon,{size:12,className:"stg:shrink-0"}),"Applying","…"]}):e})}e.s(["ArtifactApplyButton",0,d],285716);var c=e.i(661438),u=e.i(669226);e.i(222258);var g=e.i(967785);let p={detected:!1},h={Agent:"Agent",McpServer:"MCP Server"},m=new Set(Object.keys(h)),x=/^[a-z]+\.stigmer\.ai\/v\d+$/;function f(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let b={detected:!1},v={detected:!1};function j(e){return e.kind===c.ExecutionArtifactKind.DIRECTORY&&e.entries.includes("SKILL.md")}let y={detected:!1};var C=e.i(891287),k=e.i(217516),w=e.i(864652),N=e.i(586108),T=e.i(326283),E=e.i(193799);function S(e,t,r,n){var i;let l=e.kind===c.ExecutionArtifactKind.DIRECTORY,a=!l&&(0,o.isTextArtifact)(e),{content:d,contentType:S,isTruncated:A,isLoading:L,error:M,refetch:I}=(0,u.useArtifactContent)(a?t:null,a?e.storageKey:null,void 0,e.contentHash||void 0,n?.cacheKey),F=(i=a?d:null,(0,s.useMemo)(()=>null===i?b:function(e){let t;try{t=(0,g.parse)(e)}catch{return p}if(!f(t))return p;let{apiVersion:s,kind:r,metadata:n}=t;if("string"!=typeof s||!x.test(s)||"string"!=typeof r||!m.has(r)||!f(n))return p;let i=n.name;return"string"!=typeof i||0===i.length?p:{detected:!0,apiVersion:s,kind:r,displayName:h[r],resourceName:i,resourceOrg:"string"==typeof n.org&&n.org.length>0?n.org:void 0}}(i),[i])),{detection:P,isLoading:D}=function(e,t){let r=!!e&&j(e),{content:n,isLoading:i,error:o}=(0,u.useArtifactContent)(r&&t?t:null,r&&e?e.storageKey:null,r?"SKILL.md":null);return{detection:(0,s.useMemo)(()=>{if(!e||!r||!n)return y;if(!j(e))return v;let t=function(e){let t,s=e.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(!s)return null;try{t=(0,g.parse)(s[1])}catch{return null}if("object"!=typeof t||null===t||Array.isArray(t))return null;let r=t,n=r.name;return"string"!=typeof n||0===n.length?null:{name:n,description:"string"==typeof r.description&&r.description.length>0?r.description:void 0}}(n);return t?{detected:!0,skillName:t.name,skillDescription:t.description,fileCount:e.entries.length,entries:e.entries}:v},[e,r,n]),isLoading:r&&i,error:r?o:null}}(l?e:null,l?t:null),R=F.detected||P.detected,_=a&&L||l&&D,O=null;if(F.detected)O=`${F.displayName} detected`;else if(P.detected){let e=P.fileCount;O=`Skill \u00B7 ${e} ${1===e?"file":"files"}`}let K=null;F.detected?K=`Apply to ${r}`:P.detected&&(K=`Push Skill to ${r}`);let{applyYamlResource:B,pushSkillPackage:$,isApplying:W,error:H,clearError:U}=function(){let e=(0,N.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,i]=(0,s.useState)(null),o=(0,s.useCallback)(()=>i(null),[]);return{applyYamlResource:(0,s.useCallback)(async(t,s)=>{r(!0),i(null);try{let r=(0,w.parseManifest)(t,{org:s});if(r.length>1)throw Error("This artifact contains multiple resource documents. Use Apply YAML in the Library to apply multi-document manifests.");let n=await e.manifest.apply(r[0]);return{kind:n.yamlKind,name:n.name,org:n.org,slug:n.slug}}catch(e){throw i((0,T.toError)(e)),e}finally{r(!1)}},[e]),pushSkillPackage:(0,s.useCallback)(async t=>{r(!0),i(null);try{let s=(0,C.create)(k.PushSkillFromExecutionArtifactRequestSchema,{org:t.org,executionId:t.executionId,storageKey:t.storageKey,tag:t.tag??""}),r=await e.skill.pushFromExecutionArtifact(s);return{kind:"Skill",name:r.metadata?.name??"",org:r.metadata?.org??t.org,slug:r.metadata?.slug??""}}catch(e){throw i((0,T.toError)(e)),e}finally{r(!1)}},[e]),isApplying:t,error:n,clearError:o}}(),[V,G]=(0,s.useState)(null),z=n?.onApplied,q=(0,s.useCallback)(async()=>{U();try{let s;if(F.detected&&d)s=await B(d,r);else{if(!P.detected)return;s=await $({org:r,executionId:t,storageKey:e.storageKey})}G(s),z?.(s)}catch{}},[F.detected,P.detected,d,r,t,e.storageKey,B,$,U,z]),{copy:J,copied:Y}=(0,E.useCopyFeedback)(),X=(0,s.useCallback)(()=>{d&&J(d)},[d,J]);return(0,s.useMemo)(()=>({content:d,contentType:S,isTruncated:A,isLoading:L,error:M,refetch:I,isDirectory:l,skillDetection:P,isDetected:R,isDetecting:_,detectionLabel:O,ctaLabel:K,apply:q,isApplying:W,applyResult:V,applyError:H,copy:X,copied:Y}),[d,S,A,L,M,I,l,P,R,_,O,K,q,W,V,H,X,Y])}function A({artifact:e,executionId:n,org:i,isTerminal:o,onClose:a,onApplied:d,onImplement:c,className:u}){let g=S(e,n,i,{onApplied:d}),p=(0,s.useCallback)(()=>{c?.(),a()},[c,a]);return(0,t.jsxs)("div",{className:(0,r.cn)("stg:flex stg:max-h-[80vh] stg:flex-col",u),children:[(0,t.jsx)(M,{artifact:e,isDirectory:g.isDirectory,detectionLabel:g.detectionLabel,isDetecting:g.isDetecting,onClose:a}),(0,t.jsx)(l.ArtifactContentBody,{artifact:e,content:g.content,contentType:g.contentType,isLoading:g.isLoading,error:g.error,isTruncated:g.isTruncated,skillDetection:g.skillDetection,className:"stg:min-h-0 stg:flex-1 stg:overflow-y-auto stg:border-t stg:border-border"}),(0,t.jsx)(I,{artifact:e,executionId:n,isDirectory:g.isDirectory,hasContent:null!==g.content,copied:g.copied,onCopy:g.copy,isDetected:g.isDetected,ctaLabel:g.ctaLabel,isTerminal:o,isApplying:g.isApplying,applyResult:g.applyResult,applyError:g.applyError,onApply:g.apply,onImplement:c?p:void 0}),(0,t.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"stg:sr-only",children:g.copied&&"Content copied to clipboard"})]})}e.s(["useArtifactInspection",0,S],180762);let L="stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:rounded-sm";function M({artifact:e,isDirectory:s,detectionLabel:n,isDetecting:i,onClose:l}){return(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3 stg:p-4 stg:pb-3",children:[(0,t.jsx)("span",{className:"stg:mt-0.5 stg:shrink-0 stg:text-muted-foreground",children:s?(0,t.jsx)(D,{}):(0,t.jsx)(P,{})}),(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,t.jsxs)("h2",{className:"stg:truncate stg:text-sm stg:font-semibold stg:text-foreground",children:[e.name,s&&"/"]}),(0,t.jsxs)("div",{className:"stg:mt-0.5 stg:flex stg:flex-wrap stg:items-center stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:tabular-nums stg:text-muted-foreground",children:(0,o.formatArtifactSize)(e.sizeBytes)}),i&&!n&&(0,t.jsx)("span",{className:"stg:h-4 stg:w-24 stg:animate-pulse stg:rounded-full stg:bg-muted","aria-hidden":"true"}),n&&(0,t.jsx)("span",{className:"stg:inline-flex stg:items-center stg:rounded-full stg:bg-primary-subtle stg:px-2 stg:py-0.5 stg:text-xs stg:font-medium stg:text-primary",children:n})]})]}),(0,t.jsx)("button",{type:"button",onClick:l,"aria-label":"Close preview",className:(0,r.cn)("stg:shrink-0 stg:rounded-sm stg:p-1 stg:text-muted-foreground stg:transition-colors stg:hover:text-foreground",L),children:(0,t.jsx)(F,{})})]})}function I({artifact:e,executionId:s,isDirectory:n,hasContent:o,copied:l,onCopy:a,isDetected:c,ctaLabel:u,isTerminal:g,isApplying:p,applyResult:h,applyError:m,onApply:x,onImplement:f}){let{download:b,isDownloading:v}=(0,i.useArtifactDownload)(s);return(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-3 stg:border-t stg:border-border stg:px-4 stg:py-3",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-3",children:[!n&&o&&(0,t.jsxs)("button",{type:"button",onClick:a,"aria-label":l?"Copied to clipboard":"Copy content",className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:text-xs stg:font-medium stg:transition-colors",l?"stg:text-success":"stg:text-muted-foreground stg:hover:text-foreground",L),children:[l?(0,t.jsx)(K,{}):(0,t.jsx)(R,{}),l?"Copied":"Copy"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>b(e.storageKey,e.name),disabled:v,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:text-xs stg:font-medium stg:text-muted-foreground stg:transition-colors stg:hover:text-foreground stg:disabled:opacity-50",L),children:[(0,t.jsx)(_,{}),v?"Preparing…":n?"Download ZIP":"Download"]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-3",children:[f&&(0,t.jsxs)("button",{type:"button",onClick:f,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-4 stg:py-1.5 stg:text-xs stg:font-medium stg:transition-colors","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:ring-offset-2"),children:[(0,t.jsx)(O,{}),"Build"]}),h?(0,t.jsxs)("span",{className:"stg:inline-flex stg:items-center stg:gap-1.5 stg:text-xs stg:font-medium stg:text-success",children:[(0,t.jsx)(K,{}),"Applied ","·"," ",h.name||h.kind]}):m?(0,t.jsxs)("span",{className:"stg:inline-flex stg:items-center stg:gap-2",role:"alert",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:text-destructive",children:m.message}),(0,t.jsx)("button",{type:"button",onClick:x,className:(0,r.cn)("stg:text-xs stg:font-medium stg:text-destructive stg:underline stg:transition-colors stg:hover:text-destructive-muted",L),children:"Retry"})]}):c&&u?(0,t.jsx)("span",{"data-cursor-target":"apply-resource-button",children:(0,t.jsx)(d,{label:u,isTerminal:g,isApplying:p,onApply:x})}):null]})]})}function F(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M3 3L11 11"}),(0,t.jsx)("path",{d:"M11 3L3 11"})]})}function P(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M9.5 1.5H5C4.17 1.5 3.5 2.17 3.5 3V13C3.5 13.83 4.17 14.5 5 14.5H11C11.83 14.5 12.5 13.83 12.5 13V4.5L9.5 1.5Z"}),(0,t.jsx)("path",{d:"M9.5 1.5V4.5H12.5"})]})}function D(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M14.5 12.5C14.5 13.33 13.83 14 13 14H3C2.17 14 1.5 13.33 1.5 12.5V3.5C1.5 2.67 2.17 2 3 2H6L8 4.5H13C13.83 4.5 14.5 5.17 14.5 6V12.5Z"})})}function R(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"4",y:"4",width:"6.5",height:"6.5",rx:"1"}),(0,t.jsx)("path",{d:"M8 4V2.5C8 1.95 7.55 1.5 7 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V7C1.5 7.55 1.95 8 2.5 8H4"})]})}function _(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M6 1.5V8.5"}),(0,t.jsx)("path",{d:"M3 6L6 9L9 6"}),(0,t.jsx)("path",{d:"M2 10.5H10"})]})}function O(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2 6h8M7 3l3 3-3 3"})})}function K(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2 6.5L4.5 9L10 3"})})}e.s(["ArtifactPreviewModal",0,function({artifact:e,executionId:i,org:o,isTerminal:l,open:a,onClose:d,onApplied:c,onImplement:u,className:g}){let p=(0,s.useCallback)(e=>{e||d()},[d]);return(0,t.jsx)(n.DialogShell,{open:a,onOpenChange:p,width:"3xl","aria-label":`Preview ${e.name}`,className:(0,r.cn)("stg:bg-background stg:text-foreground stg:outline-none",g),children:a&&(0,t.jsx)(A,{artifact:e,executionId:i,org:o,isTerminal:l,onClose:d,onApplied:c,onImplement:u})})}],415400)},848681,e=>{"use strict";var t=e.i(661438);function s(e){var s;return e.kind===t.ExecutionArtifactKind.FILE&&("plan.md"===(s=e.name)||s.endsWith(".plan.md"))}function r(e){let t=e?.status?.artifacts;if(t&&0!==t.length){for(let e=t.length-1;e>=0;e--)if(s(t[e]))return t[e]}}e.s(["findLatestSessionPlan",0,function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],n=r(s),i=s.metadata?.id;if(n&&i)return{executionId:i,artifact:n}}},"findPlanArtifact",0,r,"isPlanArtifact",0,s])},644731,909661,e=>{"use strict";var t=e.i(857844);e.s(["Streamdown",()=>t.C],644731);var s=e.i(843476),r=e.i(271645),n=e.i(661438),i=e.i(893976);let o=(0,r.memo)(function({mode:e,className:t}){return e!==n.InteractionMode.PLAN?null:(0,s.jsxs)("span",{role:"status","aria-label":"Plan mode",className:(0,i.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-1.5 stg:py-0.5 stg:text-[0.65rem] stg:font-medium","stg:bg-accent stg:text-muted-foreground",t),children:[(0,s.jsx)(l,{}),"Plan"]})});function l(){return(0,s.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("path",{d:"M2 3h8M2 6h5M2 9h6"})})}e.s(["InteractionModeBadge",0,o],909661)},877897,606195,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(255928),i=e.i(933221),o=e.i(188482),l=e.i(364802),a=e.i(835992),d=e.i(814859);function c(e){if(e.filename)return e.filename;let t=e.storageKey??"";return t.slice(t.lastIndexOf("/")+1)||"attachment"}function u({attachment:e,executionId:s,onPreview:n}){let{url:l,error:a}=(0,d.useArtifactDownloadUrl)(s,e.storageKey??null),g=c(e);return a?(0,t.jsx)(p,{attachment:e,executionId:s}):(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)("span",{role:"listitem","aria-label":g,className:"stg:inline-flex"}),children:(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":`Preview ${g}`,className:(0,r.cn)(i.UNSTYLED_BUTTON,"stg:relative stg:block stg:h-14 stg:w-14 stg:overflow-hidden stg:rounded-md stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:l?(0,t.jsx)("img",{src:l,alt:"","aria-hidden":"true",loading:"lazy",className:"stg:h-full stg:w-full stg:object-cover"}):(0,t.jsx)("span",{className:"stg:block stg:h-full stg:w-full stg:animate-pulse stg:bg-muted","aria-hidden":"true"})})}),(0,t.jsx)(o.TooltipContent,{side:"top",className:"stg:break-all",children:g})]})}function g({name:e}){return(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)("span",{role:"listitem","aria-label":e,className:"stg:inline-flex stg:h-14 stg:w-14 stg:items-center stg:justify-center stg:rounded-md stg:bg-muted-subtle"}),children:(0,t.jsx)(m,{})}),(0,t.jsx)(o.TooltipContent,{side:"top",className:"stg:break-all",children:e})]})}function p({attachment:e,executionId:s}){let{download:n,isDownloading:o}=(0,a.useArtifactDownload)(s??null),d=c(e),u=null!=s&&!!e.storageKey,g=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x,{}),(0,t.jsx)(l.TruncatedText,{text:d,className:"stg:min-w-0"})]});return(0,t.jsx)("span",{role:"listitem","aria-label":d,className:"stg:inline-flex stg:max-w-[200px] stg:items-center stg:rounded-md stg:bg-muted-subtle stg:px-2 stg:py-0.5 stg:text-xs stg:text-foreground",children:u?(0,t.jsx)("button",{type:"button",onClick:()=>void n(e.storageKey,d),disabled:o,"aria-label":`Download ${d}`,className:(0,r.cn)(i.UNSTYLED_BUTTON,"stg:flex stg:min-w-0 stg:items-center stg:gap-1 stg:rounded-sm stg:hover:text-accent-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",o&&"stg:opacity-70"),children:g}):(0,t.jsx)("span",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-1",children:g})})}function h({attachment:e,executionId:s,onClose:r}){let{url:i}=(0,d.useArtifactDownloadUrl)(s,e.storageKey??null);return(0,t.jsx)(n.AttachmentImageLightbox,{src:i,filename:c(e),open:!0,onClose:r})}function m(){return(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,t.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,t.jsx)("path",{d:"M21 15l-5-5L5 21"})]})}function x(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 1H4C3.45 1 3 1.45 3 2V12C3 12.55 3.45 13 4 13H10C10.55 13 11 12.55 11 12V4L8 1Z"}),(0,t.jsx)("path",{d:"M8 1V4H11"})]})}e.s(["MessageAttachments",0,function({attachments:e,executionId:n,className:i}){let[o,l]=(0,s.useState)(null),a=null!==o?e.find(e=>e.storageKey===o)??null:null;return 0===e.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,r.cn)("stg:flex stg:flex-wrap stg:items-center stg:gap-1.5",i),role:"list","aria-label":"Submitted attachments",children:e.map((e,s)=>{let r=e.contentType?.startsWith("image/")??!1,i=e.storageKey??`${c(e)}-${s}`;return r&&n&&e.storageKey?(0,t.jsx)(u,{attachment:e,executionId:n,onPreview:()=>l(e.storageKey)},i):r&&!n?(0,t.jsx)(g,{name:c(e)},i):(0,t.jsx)(p,{attachment:e,executionId:n},i)})}),a&&n&&a.storageKey&&(0,t.jsx)(h,{attachment:a,executionId:n,onClose:()=>l(null)})]})}],877897),e.i(146696);var f=e.i(644731),b=e.i(61855);let v=(0,s.memo)(function({content:e,className:n}){let{title:i,body:o}=(0,s.useMemo)(()=>(0,b.extractLeadingH1)((0,b.unwrapEnclosingMarkdownFence)(e,!0)),[e]);return(0,t.jsx)("div",{role:"article","aria-label":"Plan document",className:(0,r.cn)("stg:mx-4",n),children:(0,t.jsxs)("div",{className:"stg:overflow-hidden stg:rounded-lg stg:border stg:border-border-muted stg:bg-card",children:[(0,t.jsxs)("header",{className:"stg:flex stg:items-center stg:gap-2 stg:border-b stg:border-border-muted stg:bg-muted-faint stg:px-4 stg:py-2.5",children:[(0,t.jsx)(j,{}),(0,t.jsx)("span",{className:"stg:min-w-0 stg:flex-1 stg:truncate stg:text-sm stg:font-semibold stg:text-foreground",children:i??"Plan"})]}),(0,t.jsx)("div",{className:"stgm-prose stg:px-4 stg:py-4",children:(0,t.jsx)(f.Streamdown,{components:b.PLAN_DOCUMENT_MARKDOWN_COMPONENTS,isAnimating:!1,children:o})})]})})});function j(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M3 4h10M3 8h7M3 12h8"}),(0,t.jsx)("path",{d:"M12.5 10.5l1.5 1.5-1.5 1.5"})]})}e.s(["PlanDocumentMessage",0,v],606195)},664857,770166,364949,e=>{"use strict";var t=e.i(843476),s=e.i(271645);e.i(146696);var r=e.i(644731),n=e.i(661438),i=e.i(893976),o=e.i(61855),l=e.i(909661),a=e.i(877897),d=e.i(606195),c=e.i(282838),u=e.i(188482),g=e.i(193799);let p=(0,s.memo)(function({message:e,className:s,onEdit:r,isPlanDocument:i,interactionMode:o,attachments:l,executionId:a}){switch((0,c.useRenderTracer)("MessageEntry",{messageType:e.type,contentLength:e.content.length,isStreaming:e.isStreaming}),e.type){case n.MessageType.MESSAGE_HUMAN:return(0,t.jsx)(h,{content:e.content,className:s,onEdit:r,interactionMode:o,attachments:l,executionId:a});case n.MessageType.MESSAGE_AI:if(i)return(0,t.jsx)(d.PlanDocumentMessage,{content:e.content,className:s});return(0,t.jsx)(x,{content:e.content,isStreaming:e.isStreaming,className:s});case n.MessageType.MESSAGE_THINKING:return(0,t.jsx)(C,{content:e.content,isStreaming:e.isStreaming,className:s});case n.MessageType.MESSAGE_SYSTEM:return(0,t.jsx)(k,{content:e.content,className:s});default:return null}});function h({content:e,className:s,onEdit:r,interactionMode:n,attachments:o,executionId:d}){return(0,t.jsxs)("div",{role:"article","aria-label":"User message",className:(0,i.cn)("stg:group stg:relative stg:ms-[20%] stg:rounded-lg stg:bg-muted-subtle stg:px-4 stg:py-3",s),children:[void 0!==n&&(0,t.jsx)(l.InteractionModeBadge,{mode:n,className:"stg:mb-1.5"}),o&&o.length>0&&(0,t.jsx)(a.MessageAttachments,{attachments:o,executionId:d,className:"stg:mb-2"}),(0,t.jsx)("p",{className:"stg:text-sm stg:text-foreground stg:whitespace-pre-wrap",children:e}),(0,t.jsxs)("div",{className:"stg:absolute stg:-top-2.5 stg:-right-2.5 stg:flex stg:gap-1",children:[(0,t.jsx)(v,{text:e,variant:"bubble"}),r&&(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":"Edit message",className:f}),children:(0,t.jsx)(m,{})}),(0,t.jsx)(u.TooltipContent,{side:"top",children:"Edit"})]})]})]})}function m(){return(0,t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12 20h9"}),(0,t.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}function x({content:e,isStreaming:n,className:l}){(0,c.useRenderTracer)("AiMessage",{contentLength:e.length,isStreaming:n});let a=(0,s.useMemo)(()=>(0,o.unwrapEnclosingMarkdownFence)(e),[e]);return(0,t.jsxs)("div",{role:"article","aria-label":"AI response","aria-busy":n,className:(0,i.cn)("stg:group stg:px-4 stg:py-3",l),children:[(0,t.jsx)("div",{className:"stgm-prose",children:(0,t.jsx)(r.Streamdown,{components:o.MARKDOWN_COMPONENTS,isAnimating:n,caret:"block",children:a})}),!n&&a.trim().length>0&&(0,t.jsx)("div",{className:"stg:mt-1 stg:flex stg:h-6 stg:items-center",children:(0,t.jsx)(v,{text:a,variant:"quiet"})})]})}let f=(0,i.cn)("stg:inline-flex stg:h-7 stg:w-7 stg:items-center stg:justify-center stg:rounded-full","stg:border stg:border-border stg:bg-card stg:text-muted-foreground stg:shadow-sm stg:transition","stg:hover:text-foreground stg:hover:bg-accent-hover","stg:opacity-0 stg:group-hover:opacity-100 stg:focus-visible:opacity-100","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),b=(0,i.cn)("stg:inline-flex stg:h-6 stg:w-6 stg:items-center stg:justify-center stg:rounded-md","stg:text-muted-foreground-subtle stg:transition","stg:hover:text-muted-foreground stg:hover:bg-accent-hover","stg:opacity-0 stg:group-hover:opacity-100 stg:focus-visible:opacity-100","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring");function v({text:e,variant:s}){let{copy:r,copied:n}=(0,g.useCopyFeedback)();return(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsx)(u.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:()=>void r(e),"aria-label":n?"Copied":"Copy message",className:"bubble"===s?f:b}),children:n?(0,t.jsx)(y,{}):(0,t.jsx)(j,{})}),(0,t.jsx)(u.TooltipContent,{side:"top",children:n?"Copied":"Copy"})]})}function j(){return(0,t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function y(){return(0,t.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})})}function C({content:e,isStreaming:r,className:n}){let[o,l]=(0,s.useState)(!1),a=e.trim().length>0;if(!a&&!r)return null;let d=e.length>80?e.slice(0,80).trimEnd()+"...":e;return(0,t.jsxs)("div",{role:"article","aria-label":"Model thinking",className:(0,i.cn)("stg:px-4 stg:py-1.5",n),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":o,onClick:()=>l(e=>!e),className:(0,i.cn)("stg:flex stg:items-center stg:gap-1.5 stg:text-xs stg:text-muted-foreground stg:transition-colors","stg:hover:text-foreground stg:cursor-pointer"),children:[(0,t.jsx)(w,{isStreaming:r}),(0,t.jsx)("span",{className:(0,i.cn)("stg:min-w-0 stg:truncate",r&&"stgm-shimmer-label"),children:r&&!a?"Thinking...":o?"Thinking":d}),a&&(0,t.jsx)(N,{expanded:o})]}),o&&a&&(0,t.jsx)("div",{className:"stg:mt-1.5 stg:border-l-2 stg:border-muted-foreground/20 stg:pl-3",children:(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground stg:whitespace-pre-wrap stg:leading-relaxed",children:[e,r&&(0,t.jsx)("span",{className:"stg:inline-block stg:w-[2px] stg:h-[0.8em] stg:bg-muted-foreground stg:align-text-bottom stg:animate-pulse stg:ml-0.5","aria-hidden":"true"})]})})]})}function k({content:e,className:s}){return(0,t.jsx)("div",{role:"article","aria-label":"System message",className:(0,i.cn)("stg:px-4 stg:py-2",s),children:(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground stg:italic",children:e})})}function w({isStreaming:e}){return e?(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"stg:shrink-0 stg:animate-spin","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M6 1.5A4.5 4.5 0 1 1 1.5 6",strokeLinecap:"round"})}):(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"6",cy:"5",r:"3.5"}),(0,t.jsx)("path",{d:"M4.5 9.5C4.5 8.5 5 8 6 8s1.5.5 1.5 1.5"}),(0,t.jsx)("circle",{cx:"5",cy:"4.5",r:"0.5",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"7",cy:"4.5",r:"0.5",fill:"currentColor"})]})}function N({expanded:e}){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:(0,i.cn)("stg:shrink-0 stg:transition-transform stg:duration-150",e&&"stg:rotate-90"),"aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3.5 2L6.5 5L3.5 8"})})}e.s(["MessageEntry",0,p],664857),e.s(["useAutoDisclosure",0,function(e,t){let[r,n]=(0,s.useState)(t?.initialOpen??e),i=(0,s.useRef)(!1),o=(0,s.useRef)(e);return(0,s.useEffect)(()=>{o.current===e||(o.current=e,i.current||n(e))},[e]),[r,(0,s.useRef)(()=>{i.current=!0,n(e=>!e)}).current]}],770166),e.s(["useIsTextTruncated",0,function(e){let t=(0,s.useRef)(null),[r,n]=(0,s.useState)(!1);return(0,s.useLayoutEffect)(()=>{if(!e)return void n(e=>!e&&e);let s=t.current;if(!s)return;let r=()=>{let e=s.scrollWidth>s.clientWidth+1;n(t=>t===e?t:e)};r();let i=new ResizeObserver(r);return i.observe(s),()=>i.disconnect()},[e]),{ref:t,isTruncated:r}}],364949)},863714,e=>{"use strict";var t=e.i(843476),s=e.i(893976),r=e.i(422891);let n={row:"stg:border-b stg:border-border-muted stg:last:border-b-0",quiet:""},i="stg:flex stg:w-full stg:items-center stg:gap-2 stg:px-2.5 stg:py-1.5 stg:text-xs",o=(0,s.cn)("stg:cursor-pointer stg:text-left stg:transition-colors","stg:hover:bg-muted-subtle","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring");e.s(["ThreadCardBody",0,function({id:e,cursorTarget:s,rail:r=!1,children:n}){return(0,t.jsx)("div",{id:e,"data-cursor-target":s,className:r?"stg:ml-1.5 stg:border-l-2 stg:border-border-muted stg:py-1 stg:pl-3 stg:pr-2.5":"stg:px-2.5 stg:pb-2.5 stg:pt-1",children:n})},"ThreadCardHeader",0,function({gesture:e={kind:"none"},ariaLabel:n,children:l}){return"none"===e.kind?(0,t.jsx)("div",{className:i,children:l}):(0,t.jsxs)("div",{role:"button",tabIndex:0,"aria-label":n,"aria-expanded":e.expanded,onClick:e.onToggle,onKeyDown:t=>{t.target===t.currentTarget&&("Enter"===t.key||" "===t.key)&&(t.preventDefault(),e.onToggle())},className:(0,s.cn)(i,o,e.expanded&&"stg:bg-muted-faint"),children:[l,(0,t.jsx)(r.ChevronIcon,{expanded:e.expanded})]})},"ThreadCardShell",0,function({variant:e="card",accent:r=null,cursorTarget:i,className:o,ref:l,children:a}){let d="card"===e?(0,s.cn)("stg:rounded-lg stg:border stg:border-border-prominent stg:overflow-hidden","warning"===r&&"stg:border-l-2 stg:border-l-warning","destructive"===r&&"stg:border-l-2 stg:border-l-destructive"):n[e];return(0,t.jsx)("div",{ref:l,"data-cursor-target":i,className:(0,s.cn)(d,o),children:a})}])},820505,46103,926472,e=>{"use strict";var t=e.i(843476),s=e.i(893976),r=e.i(271645),n=e.i(679239);function i({content:e,className:o}){let l=e.split("\n"),a=l.length>10,[d,c]=(0,r.useState)(!1),u=a&&!d?l.slice(0,10).join("\n")+"\n…":e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:(0,s.cn)("stg:whitespace-pre-wrap stg:break-words stg:font-mono",o),children:u}),a&&(0,t.jsx)(n.RevealToggle,{expanded:d,onToggle:()=>c(e=>!e),moreLabel:`Show all ${l.length} lines`})]})}function o(e,t,s){if(!t)return e;let r=e,n=r.indexOf(t);for(;-1!==n;)n=(r=r.slice(0,n)+s+r.slice(n+t.length)).indexOf(t,n+s.length);return r}e.s(["CollapsibleCode",0,function({label:e,content:i,className:o}){let l=i.split("\n"),a=l.length>10,[d,c]=(0,r.useState)(!1),u=a&&!d?l.slice(0,10).join("\n")+"\n…":i;return(0,t.jsxs)("div",{className:(0,s.cn)("stg:space-y-1",o),children:[(0,t.jsx)("span",{className:"stg:font-medium stg:text-muted-foreground",children:e}),(0,t.jsx)("pre",{className:"stg:max-h-80 stg:overflow-auto stg:whitespace-pre-wrap stg:break-words stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:p-2 stg:font-mono stg:text-foreground",children:u}),a&&(0,t.jsx)(n.RevealToggle,{expanded:d,onToggle:()=>c(e=>!e),moreLabel:`Show all ${l.length} lines`})]})},"CollapsibleJsonBlock",0,function({label:e,content:n}){let[i,o]=(0,r.useState)(!1),l=n.split("\n"),a=l.length>3;return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),className:"stg:flex stg:items-center stg:gap-1 stg:font-medium stg:text-muted-foreground stg:transition-colors stg:hover:text-foreground",children:[(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:(0,s.cn)("stg:shrink-0 stg:transition-transform stg:duration-150",i&&"stg:rotate-90"),"aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2 1L6 4L2 7"})}),e,!i&&a&&(0,t.jsxs)("span",{className:"stg:font-normal stg:text-muted-foreground-subtle",children:["(",l.length," lines)"]})]}),i&&(0,t.jsx)("pre",{className:"stg:max-h-80 stg:overflow-auto stg:whitespace-pre-wrap stg:break-words stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:p-2 stg:font-mono stg:text-foreground",children:n})]})},"CollapsiblePre",0,i,"FilePathIcon",0,function(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M7 1H3C2.45 1 2 1.45 2 2V10C2 10.55 2.45 11 3 11H9C9.55 11 10 10.55 10 10V4L7 1Z"}),(0,t.jsx)("path",{d:"M7 1V4H10"})]})},"McpServerIcon",0,function(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"6",cy:"3",r:"1.5"}),(0,t.jsx)("circle",{cx:"6",cy:"9",r:"1.5"}),(0,t.jsx)("path",{d:"M6 4.5V7.5"}),(0,t.jsx)("path",{d:"M3 6H4.5"}),(0,t.jsx)("path",{d:"M7.5 6H9"})]})},"formatJson",0,function(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}},"humanizeArgKey",0,function(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\b[a-z]/g,e=>e.toUpperCase())},"isScalar",0,function(e){let t=typeof e;return"string"===t||"number"===t||"boolean"===t}],46103);let l=(0,r.createContext)({sandboxWorkspaceRoot:""});function a(){let{sandboxWorkspaceRoot:e}=(0,r.useContext)(l);return(0,r.useCallback)(t=>(function(e,t){if(!e||!t)return e;let s=t.replace(/\/+$/,"");e=o(e,s+"/",""),e=o(e,s,".");let r=s.lastIndexOf("/");if(r>0){let t=s.slice(0,r);e=o(e,t+"/","~/"),e=o(e,t,"~")}return e})(t,e),[e])}function d({exitCode:e}){return(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"stg:sr-only",children:["Command exited with code ",e]}),(0,t.jsxs)("span",{"aria-hidden":"true",className:"stg:inline-block stg:rounded stg:bg-destructive-subtle stg:px-1 stg:py-0.5 stg:text-[10px] stg:font-medium stg:leading-none stg:tabular-nums stg:text-destructive",children:["exit ",e]})]})}e.s(["SandboxContext",0,l,"useSandboxNormalize",0,a],926472),e.s(["TerminalSession",0,function({command:e,stdout:r,stderr:n,exitCode:o,className:l}){let c=a();return(0,t.jsxs)("div",{"data-cursor-target":"terminal-session",className:(0,s.cn)("stg:space-y-1 stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:p-2.5 stg:font-mono stg:text-xs",l),children:[e&&(0,t.jsxs)("pre",{className:"stg:whitespace-pre-wrap stg:break-words stg:text-foreground",children:[(0,t.jsx)("span",{className:"stg:select-none stg:text-muted-foreground",children:"$ "}),c(e)]}),r&&(0,t.jsx)(i,{content:c(r),className:"stg:text-foreground"}),n&&(0,t.jsx)(i,{content:c(n),className:"stg:text-destructive"}),void 0!==o&&0!==o&&(0,t.jsx)(d,{exitCode:o})]})},"TerminalTail",0,function({command:e,stdout:r,stderr:n,exitCode:i,className:o}){let l=a(),c=[r,n].filter(e=>!!e).join("\n").replace(/\s+$/,""),u=c?l(c).split("\n"):[],g=u.slice(-3),p=u.length-g.length;return(0,t.jsxs)("div",{"data-cursor-target":"terminal-tail",className:(0,s.cn)("stg:space-y-1 stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:p-2.5 stg:font-mono stg:text-xs",o),children:[e&&(0,t.jsxs)("pre",{className:"stg:whitespace-pre-wrap stg:break-words stg:text-foreground",children:[(0,t.jsx)("span",{className:"stg:select-none stg:text-muted-foreground",children:"$ "}),l(e)]}),g.length>0&&(0,t.jsxs)("pre",{className:"stg:whitespace-pre-wrap stg:break-words stg:text-muted-foreground",children:[p>0&&(0,t.jsxs)("span",{className:"stg:block stg:select-none stg:text-muted-foreground-subtle",children:["… +",p," ",1===p?"line":"lines"]}),g.join("\n")]}),void 0!==i&&0!==i&&(0,t.jsx)(d,{exitCode:i})]})}],820505)},430777,347279,403497,890965,145831,827497,954418,321425,855328,574100,741690,340021,654997,3115,222898,565621,372063,24669,596639,212823,e=>{"use strict";e.s(["ToolCallGroup",()=>so],430777);var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(282838),i=e.i(661438),o=e.i(770166),l=e.i(364949),a=e.i(863714),d=e.i(422891),c=e.i(820505),u=e.i(585413),g=e.i(719705),p=e.i(92649);function h(e){return e.diffComplete?{kind:"reviewable"}:e.before?.isBinary||e.after?.isBinary?{kind:"binary"}:{kind:"unavailable",reason:function(e){switch(e){case i.FileReviewBlockReason.SECRET_WITHHELD:return"secret";case i.FileReviewBlockReason.SIZE_ELIDED:return"size";default:return"unknown"}}(e.blockedReason)}}function m(e){let t=null,s=new Map;for(let r of e.decisions)r.scope===i.FileDecisionScope.CHANGE_SET?t=r.action:r.scope===i.FileDecisionScope.FILE&&r.fileChangeId&&s.set(r.fileChangeId,r.action);let r=new Map;for(let n of e.changes){let e=s.get(n.id)??t;null!=e&&r.set(n.id,e)}return r}function x(e,t){if(!t)return null;let s=t.replace(/\\/g,"/");for(let t of e.changes){let e=t.pathAfter||t.pathBefore;if(e&&(s===e||s.endsWith(`/${e}`)))return t}return null}let f={changeSetsById:new Map},b=(0,s.createContext)(f);function v(e,t){let{changeSetsById:r}=(0,s.useContext)(b);if(!e)return null;var n=r.get(e);if(!n)return null;switch(n.status){case i.FileChangeSetStatus.AWAITING_REVIEW:return"pending";case i.FileChangeSetStatus.FAILED:return"failed";case i.FileChangeSetStatus.DECIDED:case i.FileChangeSetStatus.RECONCILED:{if(!t)return null;let e=x(n,t);if(!e)return null;let s=m(n).get(e.id);if(s===i.FileDecisionAction.APPROVE)return"kept";if(s===i.FileDecisionAction.REJECT)return"discarded";return null}default:return null}}function j(e,t){let{changeSetsById:r}=(0,s.useContext)(b);if(!e)return null;var n=r.get(e);if(!n||!t)return null;let i=x(n,t);return i&&"reviewable"===h(i).kind?i:null}e.s(["FileReviewContext",0,b,"useFileReviewRowChange",0,j,"useFileReviewRowState",0,v],347279);var y=e.i(364802);let C=new Map([["read",i.ToolKind.FILE_READ],["read_file",i.ToolKind.FILE_READ],["Read",i.ToolKind.FILE_READ],["write",i.ToolKind.FILE_WRITE],["write_file",i.ToolKind.FILE_WRITE],["create_file",i.ToolKind.FILE_WRITE],["overwrite_file",i.ToolKind.FILE_WRITE],["Write",i.ToolKind.FILE_WRITE],["edit",i.ToolKind.FILE_EDIT],["edit_file",i.ToolKind.FILE_EDIT],["str_replace_editor",i.ToolKind.FILE_EDIT],["StrReplace",i.ToolKind.FILE_EDIT],["EditNotebook",i.ToolKind.FILE_EDIT],["delete",i.ToolKind.FILE_DELETE],["delete_file",i.ToolKind.FILE_DELETE],["remove_file",i.ToolKind.FILE_DELETE],["Delete",i.ToolKind.FILE_DELETE],["shell",i.ToolKind.SHELL],["bash",i.ToolKind.SHELL],["execute",i.ToolKind.SHELL],["execute_command",i.ToolKind.SHELL],["run_command",i.ToolKind.SHELL],["terminal",i.ToolKind.SHELL],["Shell",i.ToolKind.SHELL],["grep",i.ToolKind.SEARCH],["glob",i.ToolKind.SEARCH],["search",i.ToolKind.SEARCH],["ripgrep",i.ToolKind.SEARCH],["find_files",i.ToolKind.SEARCH],["Grep",i.ToolKind.SEARCH],["Glob",i.ToolKind.SEARCH],["SemanticSearch",i.ToolKind.SEARCH],["ls",i.ToolKind.LIST],["list_directory",i.ToolKind.LIST],["web_fetch",i.ToolKind.FETCH],["WebFetch",i.ToolKind.FETCH],["WebSearch",i.ToolKind.WEB_SEARCH],["think",i.ToolKind.THINK],["write_todos",i.ToolKind.TODO],["updateTodos",i.ToolKind.TODO],["TodoWrite",i.ToolKind.TODO],["task",i.ToolKind.SUBAGENT],["Task",i.ToolKind.SUBAGENT]]);function k(e){return void 0!==e.toolKind&&e.toolKind!==i.ToolKind.UNSPECIFIED?e.toolKind:w(e.name,e.mcpServerSlug)}function w(e,t){if("remember"===e&&"stigmer-memory"===t)return i.ToolKind.MEMORY;let s=C.get(e);return void 0!==s?s:t&&t.length>0?i.ToolKind.MCP:i.ToolKind.UNSPECIFIED}function N(e,t){if(e!==i.ToolKind.SHELL||!t)return null;let s=t.description;if("string"!=typeof s)return null;let r=s.trim();return r.length>0?r:null}let T=["path","file_path","file","filename"],E=["old_string","old_text","oldText"],S=["new_string","new_text","newText","replacement"],A=["contents","content","file_content"],L=/\n?\[Command (?:succeeded|failed with exit code (\d+))\]\s*$/,M=/^\s*\d+[:\t]/;function I(e){let t=[];for(let s of e)"string"==typeof s&&s.length>0&&t.push({file:s,text:s});return t}function F(e){if(!e)return{type:"empty"};let t=R(e);return void 0!==t&&(O(t)||Array.isArray(t))?{type:"json",value:t}:{type:"text",text:e}}function P(e,t){if(e)for(let s of t){let t=e[s];if("string"==typeof t&&t.length>0)return t}}function D(e){return e.split("\n").map(e=>e.replace(/\s+$/,"")).filter(e=>e.trim().length>0)}function R(e){let t=e.trim();if(t&&("{"===t[0]||"["===t[0]))try{return JSON.parse(t)}catch{return}}function _(e){let t=O(e)?e.content:Array.isArray(e)?e:void 0;if(!Array.isArray(t))return null;let s=[];for(let e of t)O(e)&&"string"==typeof e.type&&s.push({type:e.type,text:$(e.text)});return s.length>0?s:null}function O(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function K(e){return O(e)&&O(e.value)?e.value:void 0}function B(e){return O(e)&&("stdout"in e||"exitCode"in e)}function $(e){return"string"==typeof e?e:void 0}function W(e){return"number"==typeof e&&Number.isFinite(e)?e:void 0}let H=new Map([["ts","typescript"],["tsx","tsx"],["js","javascript"],["jsx","jsx"],["py","python"],["go","go"],["rs","rust"],["java","java"],["rb","ruby"],["sh","bash"],["md","markdown"],["json","json"],["yaml","yaml"],["yml","yaml"],["proto","protobuf"],["sql","sql"],["css","css"],["html","html"],["toml","toml"]]);function U(e){let t=e.lastIndexOf(".");if(!(t<0))return H.get(e.slice(t+1).toLowerCase())}let V=new Set(["read","list","search","think"]);function G(e){return V.has(e)?"quiet":"card"}let z=new Set(["edit","write","mcp","web-search","fetch","memory","unknown"]),q=new Set(["shell"]),J=new Set(["read","list","search"]);function Y(e){return q.has(e)?"tail":z.has(e)?"preview":"summary"}function X(e){return J.has(e)}function Z(e){return"read"===e||"write"===e||"edit"===e||"delete"===e}let Q={[i.ToolKind.FILE_READ]:{category:"read",label:"Read",primaryField:"path",fallbackFields:["file_path","file"]},[i.ToolKind.FILE_WRITE]:{category:"write",label:"Write",primaryField:"path",fallbackFields:["file_path","file","filename"]},[i.ToolKind.FILE_EDIT]:{category:"edit",label:"Edit",primaryField:"path",fallbackFields:["file_path","file","filename"]},[i.ToolKind.FILE_DELETE]:{category:"delete",label:"Delete",primaryField:"path",fallbackFields:["file_path","file","filename"]},[i.ToolKind.SHELL]:{category:"shell",label:"Shell",primaryField:"command",intentField:"description"},[i.ToolKind.SEARCH]:{category:"search",label:"Search",primaryField:"pattern",fallbackFields:["query","q"]},[i.ToolKind.LIST]:{category:"list",label:"List",primaryField:"path"},[i.ToolKind.FETCH]:{category:"fetch",label:"Fetch",primaryField:"url",fallbackFields:["uri"]},[i.ToolKind.WEB_SEARCH]:{category:"web-search",label:"Web Search",primaryField:"query",fallbackFields:["q","search_term"]},[i.ToolKind.THINK]:{category:"think",label:"Thinking",primaryField:"thought"},[i.ToolKind.SUBAGENT]:{category:"sub-agent",label:"Sub-agent",primaryField:"description",fallbackFields:["prompt"]},[i.ToolKind.TODO]:{category:"internal",label:"Todos",primaryField:"todos"},[i.ToolKind.MEMORY]:{category:"memory",label:"Remember",primaryField:"fact"}};function ee(e){return w(e)===i.ToolKind.TODO}function et(e){return e.status===i.ToolCallStatus.TOOL_CALL_SKIPPED&&!e.requiresApproval&&!e.result&&!e.error&&!e.argsPreview}function es(e,t){let s=Q[e];return s?{category:s.category,label:s.label,primaryArgField:s.primaryField,fallbackArgFields:s.fallbackFields??[],...s.intentField?{intentArgField:s.intentField}:{}}:e===i.ToolKind.MCP?{category:"mcp",label:eo(t),primaryArgField:"slug",fallbackArgFields:["name","org"]}:{category:"unknown",label:eo(t),primaryArgField:"",fallbackArgFields:[]}}function er(e,t){return es(w(e,t),e)}function en(e){return es(k(e),e.name)}function ei(e,t,s){return es(e!==i.ToolKind.UNSPECIFIED?e:w(t,s),t)}function eo(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\b[a-z]/g,e=>e.toUpperCase()).replace(/\bMcp\b/gi,"MCP").replace(/\bApi\b/gi,"API").replace(/\bId\b/gi,"ID").replace(/\bUrl\b/gi,"URL").replace(/\bIam\b/gi,"IAM")}function el(e,t,s){if(!e)return null;let r=t=>{let s=e[t];return"string"==typeof s&&s.length>0?s:null};if(t){let e=r(t);if(e)return e}for(let e of s){let t=r(e);if(t)return t}return null}function ea(e){let t=en(e),s=el(e.args,t.primaryArgField,t.fallbackArgFields);if(s)return s;if(("unknown"===t.category||"mcp"===t.category)&&e.args){let t=Object.keys(e.args);if(t.length>0){let s=e.args[t[0]];if("string"==typeof s)return s}}return null}function ed(e,t,s,r){if(!t)return null;try{let n=JSON.parse(t);if("object"!=typeof n||null===n)return null;let i=void 0!==r?ei(r,e,s):er(e,s);return el(n,i.primaryArgField,i.fallbackArgFields)}catch{return null}}function ec(e,t,s,r){if(!t)return null;let n=void 0!==r&&r!==i.ToolKind.UNSPECIFIED?r:w(e,s);if(n!==i.ToolKind.SHELL)return null;try{let e=JSON.parse(t);if("object"!=typeof e||null===e)return null;return N(n,e)}catch{return null}}let eu=["contents","content","file_content","new_text","new_string","replacement"];function eg(e){if(!e)return null;try{let t=JSON.parse(e);if("object"!=typeof t||null===t)return null;for(let e of eu){let s=t[e];if("string"==typeof s&&s.length>0)return s}return null}catch{return null}}e.s(["defaultChromeForCategory",0,G,"defaultDisclosureForCategory",0,Y,"extractPrimaryArg",0,ea,"extractPrimaryArgFromPreview",0,ed,"extractShellIntentFromPreview",0,ec,"extractWriteContentFromPreview",0,eg,"humanizeToolName",0,eo,"isCollapsedToolCall",0,et,"isFileCategory",0,Z,"isInternalTool",0,ee,"isRunGroupableCategory",0,X,"resolveToolCategory",0,er,"resolveToolCategoryFromCall",0,en,"resolveToolCategoryFromKind",0,ei],403497);var ep=e.i(46103),eh=e.i(445726),em=e.i(814859),ex=e.i(835992),ef=e.i(669226);function eb(e,t=!0){let r=e?.storageKey||null,n=t&&!!r,i=n?(0,eh.execIdFromStorageKey)(r):null,{content:o,isLoading:l,isTruncated:a,error:d}=(0,ef.useArtifactContent)(n?i:null,n?r:null,null,e?.contentHash||void 0);return(0,s.useMemo)(()=>({content:o,isLoading:l,isTruncated:a,error:d}),[o,l,a,d])}function ev({toolCall:e,className:s}){let n=ti(e.startedAt,e.completedAt);return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-3 stg:text-xs",s),children:[(0,t.jsx)(ek,{mcpServerSlug:e.mcpServerSlug,toolName:e.name,duration:n}),e.args&&Object.keys(e.args).length>0&&(0,t.jsx)(ew,{args:e.args}),e.outputRef?.storageKey?(0,t.jsx)(ej,{outputRef:e.outputRef}):e.result&&(0,t.jsx)(eT,{result:e.result})]})}function ej({outputRef:e}){return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)("span",{className:"stg:font-medium stg:text-muted-foreground",children:"Result"}),e.isImage?(0,t.jsx)(ey,{storageKey:e.storageKey}):(0,t.jsx)(eC,{outputRef:e})]})}function ey({storageKey:e}){let r=(0,s.useMemo)(()=>(0,eh.execIdFromStorageKey)(e),[e]),{url:n,error:i}=(0,em.useArtifactDownloadUrl)(r,e);return i?(0,t.jsx)("p",{className:"stg:text-xs stg:text-destructive",children:"Couldn't load image output."}):n?(0,t.jsx)("a",{href:n,target:"_blank",rel:"noreferrer",className:"stg:inline-block stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:(0,t.jsx)("img",{src:n,alt:"Tool output screenshot",loading:"lazy",className:"stg:max-h-96 stg:w-auto stg:rounded-md stg:border stg:border-border"})}):(0,t.jsx)("div",{className:"stg:h-40 stg:w-64 stg:animate-pulse stg:rounded-md stg:border stg:border-border stg:bg-muted","aria-busy":"true","aria-label":"Loading image output"})}function eC({outputRef:e}){let[n,i]=(0,s.useState)(!1),o=(0,s.useMemo)(()=>(0,eh.execIdFromStorageKey)(e.storageKey),[e.storageKey]),{content:l,isLoading:a,isTruncated:d,error:c}=eb(e,n),{download:u,isDownloading:g}=(0,ex.useArtifactDownload)(o),p=Number(e.sizeBytes),h=p?` (${p>=1048576?`${(p/1048576).toFixed(1)} MB`:p>=1024?`${(p/1024).toFixed(1)} KB`:`${p} B`})`:"",m="stg:max-h-80 stg:overflow-auto stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:p-2 stg:text-foreground",x="stg:inline-block stg:text-xs stg:font-medium stg:text-primary stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring";return(0,t.jsx)("div",{className:"stg:space-y-1",children:n?a?(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:"Loading full output…"}):c?(0,t.jsx)("p",{className:"stg:text-xs stg:text-destructive",children:"Couldn't load full output. Try again."}):null!==l?(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)(ep.CollapsiblePre,{content:l,className:m}),d&&(0,t.jsx)("button",{type:"button",onClick:()=>u(e.storageKey),disabled:g,className:(0,r.cn)(x,"stg:disabled:opacity-50"),children:g?"Preparing download…":`Output truncated — download full file${h}`})]}):null:(0,t.jsxs)(t.Fragment,{children:[e.truncatedPreview&&(0,t.jsx)(ep.CollapsiblePre,{content:e.truncatedPreview,className:m}),(0,t.jsxs)("button",{type:"button",onClick:()=>i(!0),className:x,children:["View full output",h]})]})})}function ek({mcpServerSlug:e,toolName:s,duration:r}){return e||r?(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:gap-x-3 stg:gap-y-1 stg:text-muted-foreground",children:[e&&(0,t.jsxs)("span",{className:"stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-mono",children:[(0,t.jsx)(ep.McpServerIcon,{}),e,(0,t.jsx)("span",{className:"stg:text-muted-foreground-subtle",children:"/"}),(0,t.jsx)("span",{className:"stg:text-foreground",children:eo(s)})]}),r&&(0,t.jsx)("span",{children:r})]}):null}function ew({args:e}){let s=Object.entries(e);if(0===s.length)return null;let r=[],n=[];for(let[e,t]of s)(0,ep.isScalar)(t)?r.push([e,String(t)]):n.push([e,t]);return(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsx)("span",{className:"stg:font-medium stg:text-muted-foreground",children:"Arguments"}),r.length>0&&(0,t.jsx)("dl",{className:"stg:grid stg:grid-cols-[auto_1fr] stg:gap-x-3 stg:gap-y-1 stg:rounded-md stg:border stg:border-border stg:bg-muted-faint stg:px-2.5 stg:py-2",children:r.map(([e,s])=>(0,t.jsx)(eN,{label:e,value:s},e))}),n.map(([e,s])=>(0,t.jsx)(ep.CollapsibleJsonBlock,{label:(0,ep.humanizeArgKey)(e),content:(0,ep.formatJson)(s)},e))]})}function eN({label:e,value:s}){let r=s.includes("\n");return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{className:"stg:whitespace-nowrap stg:font-mono stg:text-muted-foreground",children:(0,ep.humanizeArgKey)(e)}),r?(0,t.jsx)("dd",{className:"stg:min-w-0",children:(0,t.jsx)("pre",{className:"stg:whitespace-pre-wrap stg:break-words stg:rounded stg:border stg:border-border stg:bg-muted-subtle stg:px-2 stg:py-1 stg:font-mono stg:text-foreground",children:s})}):(0,t.jsx)("dd",{className:"stg:min-w-0",children:(0,t.jsx)(y.TruncatedText,{text:s,className:"stg:block stg:font-mono stg:text-foreground"})})]})}function eT({result:e}){let s=function(e){let t=e.trim(),s=eS(t);if(void 0!==s){let e=eE(s);return null!==e?e:JSON.stringify(s,null,2)}let r=function(e){if(!e.startsWith("[")&&!e.startsWith("{"))return;let t=e.replace(/'/g,'"').replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false").replace(/\bNone\b/g,"null");return eS(t=t.replace(/,\s*([}\]])/g,"$1"))}(t);if(void 0!==r){let e=eE(r);return null!==e?e:JSON.stringify(r,null,2)}return t}(e);return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)("span",{className:"stg:font-medium stg:text-muted-foreground",children:"Result"}),(0,t.jsx)(ep.CollapsiblePre,{content:s,className:"stg:max-h-80 stg:overflow-auto stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:p-2 stg:text-foreground"})]})}function eE(e){if(!(Array.isArray(e)&&0!==e.length&&e.every(e=>"object"==typeof e&&null!==e&&"type"in e&&"string"==typeof e.type)))return null;let t=[];for(let s of e)if("text"===s.type&&"string"==typeof s.text){let e=eS(s.text.trim());void 0!==e?t.push(JSON.stringify(e,null,2)):t.push(s.text)}return t.length>0?t.join("\n\n"):null}function eS(e){try{return JSON.parse(e)}catch{return}}var eA=e.i(163568);function eL({toolName:e,args:n,mcpServerSlug:i,showFileName:o=!0,className:l}){let a=(0,s.useMemo)(()=>er(e,i),[e,i]),d=(0,s.useMemo)(()=>(function(e,t){if(!e)return null;let s=t=>{let s=e[t];return"string"==typeof s&&s.length>0?s:null};if(t.primaryArgField){let e=s(t.primaryArgField);if(e)return e}for(let e of t.fallbackArgFields){let t=s(e);if(t)return t}if("unknown"===t.category||"mcp"===t.category){let t=Object.keys(e);if(t.length>0){let s=e[t[0]];if("string"==typeof s)return s}}return null})(n,a),[n,a]);return(0,t.jsx)("div",{className:(0,r.cn)("stg:text-xs",l),children:(0,t.jsx)(eM,{category:a.category,toolName:e,args:n,primaryArg:d,mcpServerSlug:i,showFileName:o})})}function eM({category:e,toolName:s,args:r,primaryArg:n,mcpServerSlug:i,showFileName:o}){switch(e){case"shell":return n?(0,t.jsx)(eI,{command:n}):null;case"read":case"write":case"edit":case"delete":return n?(0,t.jsx)(eF,{path:n,category:e,args:r,showFileName:o}):null;case"search":case"list":return n?(0,t.jsx)(eP,{pattern:n}):null;case"mcp":return(0,t.jsx)(eD,{toolName:s,args:r,mcpServerSlug:i??""});default:return r&&Object.keys(r).length>0?(0,t.jsx)(eR,{args:r}):null}}function eI({command:e}){return(0,t.jsx)(c.TerminalSession,{command:e})}function eF({path:e,category:r,args:n,showFileName:i=!0}){let o=(0,s.useMemo)(()=>("write"===r||"edit"===r)&&n?function(e){for(let t of e_){let s=e[t];if("string"==typeof s&&s.length>0)return s}return null}(n):null,[r,n]);return(0,t.jsxs)("div",{className:"stg:space-y-1.5",children:[i&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5 stg:text-xs",children:[(0,t.jsx)(ep.FilePathIcon,{}),(0,t.jsx)(eA.FilePathLink,{path:e,className:"stg:text-xs"})]}),o&&(0,t.jsx)(ep.CollapsibleCode,{label:"Content",content:o})]})}function eP({pattern:e}){return(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5 stg:text-xs",children:[(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:"Pattern:"}),(0,t.jsx)("code",{className:"stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-mono stg:text-foreground",children:e})]})}function eD({toolName:e,args:s,mcpServerSlug:r}){return(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsx)(ek,{mcpServerSlug:r,toolName:e,duration:null}),s&&Object.keys(s).length>0&&(0,t.jsx)(ew,{args:s})]})}function eR({args:e}){return(0,t.jsx)(ep.CollapsibleCode,{label:"Arguments",content:(0,ep.formatJson)(e)})}let e_=["contents","content","file_content","new_text","new_string","replacement"];var eO=e.i(321091),eK=e.i(598529),eB=e.i(154111),e$=e.i(278611);function eW({view:e,showFileName:s=!0,showStats:n=!0,className:i}){switch(e.type){case"diff":return(0,t.jsx)(eU,{view:e,showFileName:s,showStats:n,className:i});case"terminal":return(0,t.jsx)(eV,{view:e,className:i});case"search":return(0,t.jsx)(ez,{view:e,showCount:n,className:i});case"list":return(0,t.jsx)(eX,{entries:e.entries,count:e.count,showCount:n,className:i});case"file":return(0,t.jsx)(eZ,{view:e,showFileName:s,className:i});case"contentBlocks":return(0,t.jsx)(eQ,{blocks:e.blocks,className:i});case"outputRef":return(0,t.jsx)(e0,{view:e,className:i});case"text":return e.text?(0,t.jsx)(ep.CollapsiblePre,{content:e.text,className:(0,r.cn)("stg:text-foreground",i)}):null;case"json":return(0,t.jsx)(ep.CollapsibleCode,{label:"Result",content:(0,ep.formatJson)(e.value),className:i});case"memoryProposal":return(0,t.jsx)(ep.CollapsiblePre,{content:e.fact,className:(0,r.cn)("stg:text-foreground",i)});case"error":return(0,t.jsx)(e2,{message:e.message,className:i});case"empty":return null}}function eH(e){let t=0,s=0;for(let r of e)for(let e of r.lines)"added"===e.type?t++:"removed"===e.type&&s++;return{added:t,removed:s}}function eU({view:e,showFileName:n=!0,showStats:i=!0,className:o}){let l=(0,s.useMemo)(()=>void 0!==e.oldText&&void 0!==e.newText?(0,eO.computeDiff)(e.oldText,e.newText):[],[e.oldText,e.newText]),a=(0,s.useMemo)(()=>void 0!==e.linesAdded||void 0!==e.linesRemoved?{added:e.linesAdded??0,removed:e.linesRemoved??0}:l.length>0?eH(l):null,[e.linesAdded,e.linesRemoved,l]),d=n&&!!e.path,c=i&&null!=a;return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-1",o),"data-cursor-target":"file-diff",children:[(d||c)&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-muted-foreground",children:[d&&(0,t.jsx)(eA.FilePathLink,{path:e.path,dirDisplay:"dim",className:"stg:text-xs"}),c&&a&&(0,t.jsxs)("span",{className:"stg:shrink-0 stg:tabular-nums stg:text-xs",children:[(0,t.jsxs)("span",{className:"stg:text-diff-added-fg",children:["+",a.added]})," ",(0,t.jsxs)("span",{className:"stg:text-diff-removed-fg",children:["-",a.removed]})]})]}),l.length>0?(0,t.jsx)(eK.DiffViewer,{hunks:l}):e.unifiedDiff?(0,t.jsx)(eB.UnifiedDiffView,{patch:e.unifiedDiff}):(0,t.jsx)(e$.EmptyChangeNotice,{kind:"no-preview"})]})}function eV({view:e,className:s}){return(0,t.jsx)(c.TerminalSession,{command:e.command,stdout:e.stdout,stderr:e.stderr,exitCode:e.exitCode,className:s})}function eG(e,t){return"files"===t?`${e} ${1===e?"file":"files"}`:`${e} ${1===e?"match":"matches"}`}function ez({view:e,showCount:s=!0,className:n}){let{matches:i,count:o,kind:l,truncated:a}=e;if(0===o&&0===i.length)return(0,t.jsx)("p",{className:(0,r.cn)("stg:text-xs stg:text-muted-foreground",n),children:"files"===l?"No files found":"No matches"});let d=s?`${eG(o,l)}${a?` \u00b7 showing first ${i.length}`:""}`:a?`Showing first ${i.length} of ${o}`:null;return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-1",n),children:[d&&(0,t.jsx)("span",{className:"stg:font-medium stg:text-muted-foreground",children:d}),"files"===l?(0,t.jsx)(eJ,{matches:i}):(0,t.jsx)(eY,{matches:i})]})}function eq({children:e}){return(0,t.jsx)("div",{className:"stg:max-h-80 stg:overflow-auto stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:text-xs",children:e})}function eJ({matches:e}){return(0,t.jsx)(eq,{children:e.map((e,s)=>(0,t.jsx)("div",{className:"stg:border-b stg:border-border-muted stg:px-2 stg:py-0.5 stg:last:border-b-0",children:(0,t.jsx)(eA.FilePathLink,{path:e.file??e.text,dirDisplay:"dim",className:"stg:text-xs"})},s))})}function eY({matches:e}){let r=(0,s.useMemo)(()=>(function(e){let t=[];for(let s of e){let e=t[t.length-1];e&&e.file===s.file?e.matches.push(s):t.push({file:s.file,matches:[s]})}return t})(e),[e]);return(0,t.jsx)(eq,{children:r.map((e,s)=>(0,t.jsxs)("div",{className:"stg:border-b stg:border-border-muted stg:last:border-b-0",children:[e.file&&(0,t.jsx)("div",{className:"stg:bg-muted-faint stg:px-2 stg:py-0.5",children:(0,t.jsx)(eA.FilePathLink,{path:e.file,dirDisplay:"dim",className:"stg:text-xs"})}),e.matches.map((e,s)=>(0,t.jsxs)("div",{className:"stg:whitespace-pre-wrap stg:break-words stg:px-2 stg:py-0.5 stg:font-mono stg:text-foreground",children:[void 0!==e.line&&(0,t.jsxs)("span",{className:"stg:select-none stg:text-muted-foreground-subtle",children:[e.line,": "]}),e.text]},s))]},s))})}function eX({entries:e,count:s,showCount:n=!0,className:i}){return 0===s?(0,t.jsx)("p",{className:(0,r.cn)("stg:text-xs stg:text-muted-foreground",i),children:"Empty"}):(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-1",i),children:[n&&(0,t.jsxs)("span",{className:"stg:font-medium stg:text-muted-foreground",children:[s," ",1===s?"item":"items"]}),(0,t.jsx)("div",{className:"stg:max-h-80 stg:overflow-auto stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:font-mono stg:text-xs",children:e.map((e,s)=>(0,t.jsx)("div",{className:"stg:truncate stg:px-2 stg:py-0.5 stg:text-foreground",children:e},s))})]})}function eZ({view:e,showFileName:s=!0,className:n}){return e.content?(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-1",n),children:[s&&e.path&&(0,t.jsx)(eA.FilePathLink,{path:e.path,className:"stg:text-xs"}),(0,t.jsx)(ep.CollapsibleCode,{label:e.truncated?"Content (truncated)":"Content",content:e.content})]}):s&&e.path?(0,t.jsx)("div",{className:(0,r.cn)("stg:flex stg:items-center stg:gap-1.5 stg:text-xs",n),children:(0,t.jsx)(eA.FilePathLink,{path:e.path,className:"stg:text-xs"})}):s?null:(0,t.jsx)(e$.EmptyChangeNotice,{kind:"no-preview",className:n})}function eQ({blocks:e,className:n}){let i=(0,s.useMemo)(()=>e.map(e=>"text"===e.type&&e.text?e.text:`[${e.type}]`).join("\n"),[e]);return(0,t.jsx)(ep.CollapsiblePre,{content:i,className:(0,r.cn)("stg:text-foreground",n)})}function e0({view:e,className:s}){return e.isImage?(0,t.jsx)(e1,{storageKey:e.storageKey,className:s}):(0,t.jsx)(e5,{view:e,className:s})}function e1({storageKey:e,className:n}){let i=(0,s.useMemo)(()=>(0,eh.execIdFromStorageKey)(e),[e]),{url:o,error:l}=(0,em.useArtifactDownloadUrl)(i,e);return l?(0,t.jsx)("p",{className:(0,r.cn)("stg:text-xs stg:text-destructive",n),children:"Couldn't load image output."}):o?(0,t.jsx)("div",{className:(0,r.cn)("stg:space-y-1",n),children:(0,t.jsx)("a",{href:o,target:"_blank",rel:"noreferrer",className:"stg:inline-block stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:(0,t.jsx)("img",{src:o,alt:"Tool output screenshot",loading:"lazy",className:"stg:max-h-96 stg:w-auto stg:rounded-md stg:border stg:border-border"})})}):(0,t.jsx)("div",{className:(0,r.cn)("stg:h-40 stg:w-64 stg:animate-pulse stg:rounded-md stg:border stg:border-border stg:bg-muted",n),"aria-busy":"true","aria-label":"Loading image output"})}function e5({view:e,className:n}){var i;let[o,l]=(0,s.useState)(!1),a=(0,s.useMemo)(()=>(0,eh.execIdFromStorageKey)(e.storageKey),[e.storageKey]),{content:d,isLoading:c,isTruncated:u,error:g}=eb({storageKey:e.storageKey,contentHash:e.contentHash},o),{download:p,isDownloading:h}=(0,ex.useArtifactDownload)(a),m=e.sizeBytes?` (${(i=e.sizeBytes)>=1048576?`${(i/1048576).toFixed(1)} MB`:i>=1024?`${(i/1024).toFixed(1)} KB`:`${i} B`})`:"";return(0,t.jsx)("div",{className:(0,r.cn)("stg:space-y-1",n),children:o?c?(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:"Loading full output…"}):g?(0,t.jsx)("p",{className:"stg:text-xs stg:text-destructive",children:"Couldn't load full output. Try again."}):null!==d?(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)(ep.CollapsiblePre,{content:d,className:"stg:text-foreground"}),u&&(0,t.jsx)("button",{type:"button",onClick:()=>p(e.storageKey),disabled:h,className:"stg:inline-block stg:text-xs stg:font-medium stg:text-primary stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:disabled:opacity-50",children:h?"Preparing download…":`Output truncated — download full file${m}`})]}):null:(0,t.jsxs)(t.Fragment,{children:[e.preview&&(0,t.jsx)(ep.CollapsiblePre,{content:e.preview,className:"stg:text-foreground"}),(0,t.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"stg:inline-block stg:text-xs stg:font-medium stg:text-primary stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:["View full output",m]})]})})}function e2({message:e,className:s}){return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-1",s),children:[(0,t.jsx)("span",{className:"stg:font-medium stg:text-destructive",children:"Error"}),(0,t.jsx)("pre",{className:"stg:whitespace-pre-wrap stg:break-words stg:rounded-md stg:border stg:border-destructive/20 stg:bg-destructive-subtle stg:p-2 stg:font-mono stg:text-destructive",children:e})]})}let e4=new Map;function e3(e){return(0,s.useMemo)(()=>{let t=k(e),s=en(e),r=function(e){let t=e.result??"",s=e.args;if(e.status===i.ToolCallStatus.TOOL_CALL_FAILED&&(e.error||t))return{type:"error",message:e.error||t};if(e.outputRef&&e.outputRef.storageKey){let s=e.outputRef;return{type:"outputRef",storageKey:s.storageKey,contentHash:s.contentHash,isImage:s.isImage,mimeType:s.mimeType,sizeBytes:Number(s.sizeBytes),preview:s.truncatedPreview||t}}switch(k(e)){case i.ToolKind.FILE_EDIT:let r,n,o,l;return c=s,u=t,r=P(c,T)??"",n=P(c,E),o=P(c,S),{type:"diff",path:r,oldText:n,newText:o,linesAdded:(l=K(R(u)))?W(l.linesAdded):void 0,linesRemoved:l?W(l.linesRemoved):void 0,unifiedDiff:l?$(l.diffString):void 0};case i.ToolKind.FILE_WRITE:let a;return{type:"file",path:a=P(g=s,T)??"",content:P(g,A)??"",language:U(a),truncated:!1};case i.ToolKind.FILE_READ:let d;return p=s,h=t,{type:"file",path:d=P(p,T)??"",content:h,language:U(d),truncated:(m=h,/\[truncated: \d+ chars total\]/.test(m))};case i.ToolKind.FILE_DELETE:return t?{type:"text",text:t}:{type:"empty"};case i.ToolKind.SHELL:var c,u,g,p,h,m,x,f,b,v,j=t,y=s;let C=P(y,["command"]),w=R(j),N=B(w)?w:K(w);if(B(N))return{type:"terminal",command:C,stdout:$(N.stdout)??"",stderr:$(N.stderr)??"",exitCode:W(N.exitCode)};let H=j.match(L);return H?{type:"terminal",command:C,stdout:j.replace(L,""),stderr:"",exitCode:void 0!==H[1]?Number(H[1]):0}:{type:"terminal",command:C,stdout:j,stderr:""};case i.ToolKind.SEARCH:return function(e){let t=R(e);if(void 0!==t){let e=function(e){let t=K(e)??(O(e)?e:void 0);if(!t)return null;let s=!!t.clientTruncated||!!t.ripgrepTruncated;if(Array.isArray(t.files)){let e=I(t.files),r=W(t.totalFiles)??e.length;return r>0&&0===e.length?null:{type:"search",matches:e,count:r,kind:"files",truncated:s}}return O(t.workspaceResults)?function(e,t){let s=[],r=[],n=0,i=!1,o=t;for(let t of Object.values(e)){let e=O(t)?t.output:void 0;if(!O(e))continue;Array.isArray(e.files)&&s.push(...I(e.files)),Array.isArray(e.matches)&&r.push(...function(e){let t=[];for(let s of e){if("string"==typeof s){s.length>0&&t.push({text:s});continue}if(!O(s))continue;let e=$(s.file)??$(s.path),r=W(s.line)??W(s.lineNumber),n=$(s.text)??$(s.line_text)??$(s.content)??"";t.push({file:e,line:r,text:n})}return t}(e.matches));let l=W(e.count);void 0!==l&&(n+=l,i=!0),(e.clientTruncated||e.ripgrepTruncated)&&(o=!0)}let l=r.length>0,a=l?r:s;return i&&n>0&&0===a.length?null:{type:"search",matches:a,count:i?n:a.length,kind:l?"content":"files",truncated:o}}(t.workspaceResults,s):null}(t);if(e)return e;if(O(t)||Array.isArray(t))return{type:"json",value:t}}var s=e;let r=D(s),n=r.filter(e=>M.test(e));if(n.length>0){let e=n.map(e=>({text:e.trim()}));return{type:"search",matches:e,count:e.length,kind:"content"}}let i=r.filter(e=>!/^no (files|matches|results)/i.test(e)).map(e=>({file:e,text:e}));return{type:"search",matches:i,count:i.length,kind:"files"}}(t);case i.ToolKind.LIST:let V;return{type:"list",entries:V=D(t),count:V.length};case i.ToolKind.THINK:return x=s,f=t,{type:"text",text:P(x,["thought"])??f};case i.ToolKind.MCP:let G,z;return b=t,v=e.mcpServerSlug,(z=_(G=R(b)))?{type:"contentBlocks",blocks:z,mcpServerSlug:v}:void 0!==G&&(O(G)||Array.isArray(G))?{type:"json",value:G}:b?{type:"text",text:b}:{type:"empty"};case i.ToolKind.MEMORY:return function(e){let t=R(e),s=_(t),r=s?R(s.find(e=>"text"===e.type)?.text??""):t;if(O(r)&&O(r.memory)){let e=r.memory,t=O(e.metadata)?e.metadata:void 0,s=O(e.spec)?e.spec:void 0,n=$(t?.id)??"",i=$(s?.content)??"";if(""!==n&&""!==i)return{type:"memoryProposal",memoryId:n,fact:i}}return F(e)}(t);default:return F(t)}}(e),n=e4.get(t),o=n?.label?.(e),l=o??s.label,a=N(k(e),e.args),d=o??a??s.label,c=n?.summary?.(e,r)??function(e){switch(e.type){case"diff":{var t;let s=void 0!==(t=e).linesAdded||void 0!==t.linesRemoved?{added:t.linesAdded??0,removed:t.linesRemoved??0}:void 0!==t.oldText&&void 0!==t.newText?eH((0,eO.computeDiff)(t.oldText,t.newText)):null;return s?`+${s.added} -${s.removed}`:null}case"terminal":return void 0!==e.exitCode&&0!==e.exitCode?`exit ${e.exitCode}`:null;case"search":return eG(e.count,e.kind);case"list":return`${e.count} ${1===e.count?"item":"items"}`;default:return null}}(r),u=n?.disclosure?.(e,r)??Y(s.category),g=n?.chrome?.(e,r)??G(s.category),p=n?.runGroupable?.(e)??X(s.category);return{kind:t,category:s.category,label:l,intent:a,title:d,primaryArg:ea(e),result:r,resultSummary:c,disclosure:u,chrome:g,runGroupable:p}},[e])}function e6(e){switch(e){case i.ApprovalPolicySource.CLASSIFIER_DEFAULT:return"required by the tool's default policy";case i.ApprovalPolicySource.PINNED_OVERRIDE:return"required by a pinned override";case i.ApprovalPolicySource.AGENT_OVERRIDE:return"required by agent override";case i.ApprovalPolicySource.BUILTIN_CATEGORY:return"required by built-in tool policy";case i.ApprovalPolicySource.ANNOTATION_DESTRUCTIVE_TIGHTEN:return"required: marked destructive by the server";case i.ApprovalPolicySource.AUTO_APPROVE_ALL:return"auto-approved by a run-wide bypass";case i.ApprovalPolicySource.APPROVAL_LEASE:return"auto-approved by a run lease";case i.ApprovalPolicySource.UNATTENDED_SKIP:return"skipped: approval not available on this surface";case i.ApprovalPolicySource.UNSPECIFIED:default:return null}}function e8(e){switch(e){case i.ApprovalPolicySource.PINNED_OVERRIDE:case i.ApprovalPolicySource.AGENT_OVERRIDE:case i.ApprovalPolicySource.ANNOTATION_DESTRUCTIVE_TIGHTEN:case i.ApprovalPolicySource.AUTO_APPROVE_ALL:case i.ApprovalPolicySource.APPROVAL_LEASE:case i.ApprovalPolicySource.UNATTENDED_SKIP:return!0;case i.ApprovalPolicySource.CLASSIFIER_DEFAULT:case i.ApprovalPolicySource.BUILTIN_CATEGORY:case i.ApprovalPolicySource.UNSPECIFIED:default:return!1}}function e7({toolCall:e,primaryArgTruncated:s=!1,className:n}){let{category:i,result:o,primaryArg:l}=e3(e),a=j(e.fileChangeSetId,l);return(0,t.jsx)("div",{className:(0,r.cn)("stg:space-y-2 stg:text-xs",n),children:(0,t.jsx)(e9,{toolCall:e,category:i,result:o,primaryArg:l,primaryArgTruncated:s,capturedChange:a})})}function e9({toolCall:e,category:s,result:r,primaryArg:n,primaryArgTruncated:i,capturedChange:o}){let l=(0,t.jsx)(tt,{toolCall:e});switch(s){case"think":return(0,t.jsx)(ts,{toolCall:e});case"mcp":return(0,t.jsx)(ev,{toolCall:e});case"search":case"list":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tn,{toolCall:e}),i&&n&&(0,t.jsx)(te,{category:s,value:n}),(0,t.jsx)(eW,{view:r,showStats:!1})]});case"edit":case"write":{if("write"===s&&o)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tn,{toolCall:e}),(0,t.jsx)(tr,{change:o})]});let n=(0,t.jsx)(eW,{view:r,showFileName:!1,showStats:!1});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tn,{toolCall:e}),"file"===r.type?n:(0,t.jsx)(g.BoundedContent,{cursorTarget:"tool-detail-expand",children:n})]})}case"read":case"delete":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tn,{toolCall:e}),l,"error"===r.type&&(0,t.jsx)(eW,{view:r})]});case"shell":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tn,{toolCall:e}),"error"===r.type?(0,t.jsxs)(t.Fragment,{children:[l,(0,t.jsx)(eW,{view:r})]}):(0,t.jsx)(eW,{view:r})]});default:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tn,{toolCall:e}),l,(0,t.jsx)(eW,{view:r})]})}}function te({category:e,value:s}){return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)("span",{className:"stg:font-medium stg:text-muted-foreground",children:"list"===e?"Path":"Query"}),(0,t.jsx)("code",{className:"stg:block stg:whitespace-pre-wrap stg:break-words stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-mono stg:text-foreground",children:s})]})}function tt({toolCall:e}){return(0,t.jsx)(eL,{toolName:e.name,args:e.args,mcpServerSlug:e.mcpServerSlug})}function ts({toolCall:e}){let s=e.args?.thought||e.result;return s?(0,t.jsx)("div",{className:"stg:rounded-md stg:border stg:border-border-muted stg:bg-muted-faint stg:p-3",children:(0,t.jsx)(ep.CollapsiblePre,{content:s,className:"stg:italic stg:text-muted-foreground stg:whitespace-pre-wrap"})}):null}function tr({change:e}){let r=(0,s.useMemo)(()=>(0,u.toDisplayFileChange)(e),[e]);return(0,t.jsx)(p.FileChangeDiff,{change:r,bounded:!0,showFileName:!1})}function tn({toolCall:e}){if(!e8(e.approvalPolicySource))return null;let s=e6(e.approvalPolicySource);return s?(0,t.jsx)("p",{className:"stg:text-[11px] stg:italic stg:text-muted-foreground",children:s}):null}function ti(e,t){if(!e||!t)return null;let s=new Date(e).getTime(),r=new Date(t).getTime();if(Number.isNaN(s)||Number.isNaN(r))return null;let n=r-s;if(n<0)return null;if(n<1e3)return`${n}ms`;if(n<6e4)return`${(n/1e3).toFixed(1)}s`;let i=Math.floor(n/6e4),o=Math.round(n%6e4/1e3);return o>0?`${i}m ${o}s`:`${i}m`}function to(e,t){let s=ti(e,t);return null===s||s.endsWith("ms")?null:s}function tl(e){let t=(0,s.useMemo)(()=>{if(!e)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t},[e]),[r,n]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(null===t)return void n(null);n(Math.max(0,Date.now()-t));let e=setInterval(()=>{n(Math.max(0,Date.now()-t))},1e3);return()=>clearInterval(e)},[t]),null===t?null:r}function ta(e){if(e<1e3)return"just now";let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let s=Math.floor(t/60),r=t%60;if(s<60)return r>0?`${s}m ${r}s`:`${s}m`;let n=Math.floor(s/60),i=s%60;return i>0?`${n}h ${i}m`:`${n}h`}e.s(["SubAgentSection",()=>tw],827497);var td=e.i(664857);let tc={approvalsByToolCallId:new Map,submittingIds:new Set,errorsByToolCallId:new Map},tu=(0,s.createContext)(tc);function tg(e){let{approvalsByToolCallId:t,onSubmit:r,submittingIds:n,errorsByToolCallId:i}=(0,s.useContext)(tu),o=(0,s.useCallback)((t,s)=>{r?.(e,t,s)},[r,e]),l=e?t.get(e):void 0;return l&&r?{pendingApproval:l,onSubmit:o,isSubmitting:n.has(e),error:i.get(e)??null}:null}e.s(["ApprovalContext",0,tu,"useApproval",0,tg],890965);var tp=e.i(869803);let th=new Map([[i.TodoStatus.TODO_IN_PROGRESS,0],[i.TodoStatus.TODO_PENDING,1],[i.TodoStatus.TODO_COMPLETED,2],[i.TodoStatus.TODO_CANCELLED,3]]);function tm(e){return th.get(e.status)??4}function tx({todos:e,className:n,TodoRow:i=tv}){let o=(0,s.useMemo)(()=>{let t=Object.values(e);return 0===t.length?[]:t.slice().sort((e,t)=>tm(e)-tm(t))},[e]);return 0===o.length?null:(0,t.jsx)("ul",{role:"list",className:(0,r.cn)(tp.UNSTYLED_LIST,"stg:flex stg:flex-col stg:gap-1",n),"aria-label":"Tasks",children:o.map(e=>(0,t.jsx)(i,{item:e},e.id))})}function tf(e){if(!e)return null;for(let t of Object.values(e))if(t.status===i.TodoStatus.TODO_IN_PROGRESS)return t;return null}function tb(e){if(!e)return null;let t=Object.values(e);if(0===t.length)return null;let s=t.filter(e=>e.status===i.TodoStatus.TODO_COMPLETED).length;return`${s}/${t.length} completed`}function tv({item:e}){let s=tj[e.status]??tC,n=ty[e.status]??"stg:text-muted-foreground",o=e.status===i.TodoStatus.TODO_CANCELLED;return(0,t.jsxs)("li",{className:"stg:flex stg:items-start stg:gap-1.5 stg:text-xs",children:[(0,t.jsx)("span",{className:(0,r.cn)("stg:mt-0.5 stg:shrink-0",n),"aria-hidden":"true",children:(0,t.jsx)(s,{})}),(0,t.jsx)("span",{className:(0,r.cn)("stg:min-w-0 stg:break-words",o?"stg:text-muted-foreground stg:line-through":"stg:text-foreground"),children:e.content})]})}let tj={[i.TodoStatus.TODO_PENDING]:tC,[i.TodoStatus.TODO_IN_PROGRESS]:tk,[i.TodoStatus.TODO_COMPLETED]:function(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M2.5 6L5 8.5L9.5 3.5"})})},[i.TodoStatus.TODO_CANCELLED]:function(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M3 3L9 9M9 3L3 9"})})}},ty={[i.TodoStatus.TODO_PENDING]:"stg:text-muted-foreground",[i.TodoStatus.TODO_IN_PROGRESS]:"stg:text-foreground",[i.TodoStatus.TODO_COMPLETED]:"stg:text-success",[i.TodoStatus.TODO_CANCELLED]:"stg:text-muted-foreground"};function tC(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"})})}function tk(){return(0,t.jsxs)("span",{className:"stg:relative stg:flex stg:h-3 stg:w-3 stg:items-center stg:justify-center",children:[(0,t.jsx)("span",{className:"stg:absolute stg:inline-flex stg:h-2 stg:w-2 stg:animate-ping stg:rounded-full stg:bg-current stg:opacity-75"}),(0,t.jsx)("span",{className:"stg:relative stg:inline-flex stg:h-2 stg:w-2 stg:rounded-full stg:bg-current"})]})}e.s(["TodoInProgressIcon",0,tk,"TodoList",0,tx,"findActiveTodo",0,tf,"todoCompletionSummary",0,tb],145831);let tw=(0,s.memo)(function({subAgentExecution:e,collapsible:s=!0,className:r}){(0,n.useRenderTracer)("SubAgentSection",{status:e.status,name:e.name});let o=to(e.startedAt,e.completedAt),l=tA[e.status],a=l.icon,d=e.status===i.SubAgentStatus.SUB_AGENT_FAILED,c=function(e,t){let s=[];for(let r=0;r<t.length;r++){let n=t[r];if(n.type!==i.MessageType.MESSAGE_TOOL&&(s.push({kind:"message",message:n,key:`${e}-m${r}`}),n.type===i.MessageType.MESSAGE_AI&&n.toolCalls.length>0)){let t=n.toolCalls.filter(e=>!ee(e.name));t.length>0&&s.push({kind:"tool-group",toolCalls:t.length===n.toolCalls.length?n.toolCalls:t,key:`${e}-m${r}-tc`})}}return s}(e.id,e.messages),u=e.subject||e.name;return s?(0,t.jsx)(tN,{sub:e,statusInfo:l,displayLabel:u,duration:o,isFailed:d,threadItems:c,className:r}):(0,t.jsx)(tE,{sub:e,statusInfo:l,StatusIcon:a,duration:o,isFailed:d,threadItems:c,className:r})});function tN({sub:e,statusInfo:n,displayLabel:l,duration:a,isFailed:c,threadItems:u,className:g}){let p=null!=e.todos&&Object.keys(e.todos).length>0,h=e.status===i.SubAgentStatus.SUB_AGENT_IN_PROGRESS,m=e.status===i.SubAgentStatus.SUB_AGENT_COMPLETED,{approvalsByToolCallId:x}=(0,s.useContext)(tu),f=(0,s.useMemo)(()=>{if(0===x.size)return!1;for(let t of e.messages)if(t.type===i.MessageType.MESSAGE_AI){for(let e of t.toolCalls)if(e.id&&x.has(e.id))return!0}return!1},[e.messages,x]),[b,v]=(0,o.useAutoDisclosure)(h||f),j=(0,s.useMemo)(()=>tf(e.todos),[e.todos]),y=(0,s.useMemo)(()=>m&&p?tb(e.todos):null,[e.todos,m,p]),C=h&&j?j.content:m&&y?y:null,k=`Sub-agent: ${l}, ${n.label}`;return(0,t.jsxs)("div",{role:"group","aria-label":k,className:(0,r.cn)("stg:rounded-md stg:border stg:border-border stg:border-l-2 stg:border-l-primary/30 stg:bg-muted-faint",g),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":b,onClick:v,className:(0,r.cn)("stg:flex stg:w-full stg:items-center stg:gap-2 stg:px-2.5 stg:py-1.5 stg:text-left stg:text-xs stg:text-muted-foreground stg:transition-colors","stg:hover:bg-muted-subtle","stg:cursor-pointer"),children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-primary-muted","aria-hidden":"true",children:(0,t.jsx)(tF,{})}),(0,t.jsx)("span",{className:"stg:min-w-0 stg:flex-1 stg:truncate",children:l}),h&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)(d.SpinnerIcon,{size:12})}),(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0 stg:rounded stg:px-1 stg:py-0.5 stg:text-[10px] stg:font-medium stg:leading-none",n.badgeClass),children:n.label}),h?(0,t.jsx)(tT,{startedAt:e.startedAt}):a&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:tabular-nums stg:text-muted-foreground",children:a}),(0,t.jsx)(tP,{expanded:b})]}),C&&!b&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5 stg:px-2.5 stg:pb-1.5 stg:text-xs stg:text-muted-foreground",children:[(0,t.jsx)("span",{className:"stg:ml-[20px] stg:shrink-0","aria-hidden":"true",children:h&&j?(0,t.jsx)(tk,{}):(0,t.jsx)(tI,{})}),(0,t.jsx)("span",{className:"stg:min-w-0 stg:truncate",children:C})]}),(0,t.jsx)("div",{className:(0,r.cn)("stg:grid stg:transition-[grid-template-rows] stg:duration-150 stg:ease-out",b?"stg:grid-rows-[1fr]":"stg:grid-rows-[0fr]"),children:(0,t.jsx)("div",{className:"stg:overflow-hidden",children:b&&(0,t.jsx)("div",{className:"stg:border-t stg:border-border-muted stg:px-2.5 stg:pb-2 stg:pt-1.5",children:(0,t.jsx)(tS,{threadItems:u,todos:e.todos,input:e.input,isFailed:c,error:e.error})})})})]})}function tT({startedAt:e}){let s=tl(e);return null===s?null:(0,t.jsx)("span",{className:"stg:shrink-0 stg:tabular-nums stg:text-muted-foreground",children:ta(s)})}function tE({sub:e,statusInfo:s,StatusIcon:n,duration:i,isFailed:o,threadItems:l,className:a}){return(0,t.jsxs)("div",{className:(0,r.cn)("stg:border-l-2 stg:border-primary/20 stg:pl-3",a),children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:gap-x-2 stg:gap-y-1 stg:py-1.5 stg:text-xs",children:[(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0",s.colorClass),"aria-hidden":"true",children:(0,t.jsx)(n,{})}),(0,t.jsx)("span",{className:"stg:font-medium stg:text-foreground",children:e.name}),e.subject&&(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:e.subject}),i&&(0,t.jsx)("span",{className:"stg:tabular-nums stg:text-muted-foreground",children:i})]}),(0,t.jsx)(tS,{threadItems:l,todos:e.todos,input:e.input,isFailed:o,error:e.error})]})}function tS({threadItems:e,todos:s,input:r,isFailed:n,error:i}){let o=null!=s&&Object.keys(s).length>0;return(0,t.jsxs)(t.Fragment,{children:[o&&(0,t.jsx)(tx,{todos:s,className:"stg:pb-1"}),r&&(0,t.jsx)("div",{className:"stg:border-l-2 stg:border-muted-foreground/25 stg:pl-2.5 stg:text-xs stg:text-muted-foreground stg:whitespace-pre-wrap stg:mb-1",children:r}),e.length>0&&(0,t.jsx)("div",{className:"stg:flex stg:flex-col stg:gap-1 stg:pb-1",children:e.map(e=>{switch(e.kind){case"message":return(0,t.jsx)(td.MessageEntry,{message:e.message},e.key);case"tool-group":return(0,t.jsx)(so,{toolCalls:e.toolCalls},e.key)}})}),n&&i&&(0,t.jsx)("div",{className:"stg:rounded-md stg:border stg:border-destructive/20 stg:bg-destructive-subtle stg:px-2 stg:py-1.5 stg:text-xs stg:text-destructive",children:i})]})}let tA={[i.SubAgentStatus.SUB_AGENT_STATUS_UNSPECIFIED]:{label:"Unknown",colorClass:"stg:text-muted-foreground",badgeClass:"stg:bg-muted stg:text-muted-foreground",icon:tM},[i.SubAgentStatus.SUB_AGENT_PENDING]:{label:"Pending",colorClass:"stg:text-muted-foreground",badgeClass:"stg:bg-muted stg:text-muted-foreground",icon:tM},[i.SubAgentStatus.SUB_AGENT_IN_PROGRESS]:{label:"Running",colorClass:"stg:text-foreground",badgeClass:"stg:bg-muted stg:text-foreground",icon:()=>(0,t.jsx)(d.SpinnerIcon,{size:12})},[i.SubAgentStatus.SUB_AGENT_COMPLETED]:{label:"Completed",colorClass:"stg:text-success",badgeClass:"stg:bg-success/15 stg:text-success",icon:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M4 6L5.5 7.5L8 4.5"})]})}},[i.SubAgentStatus.SUB_AGENT_FAILED]:{label:"Failed",colorClass:"stg:text-destructive",badgeClass:"stg:bg-destructive/15 stg:text-destructive",icon:tL},[i.SubAgentStatus.SUB_AGENT_CANCELLED]:{label:"Cancelled",colorClass:"stg:text-muted-foreground",badgeClass:"stg:bg-muted stg:text-muted-foreground",icon:tL}};function tL(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M4.5 4.5L7.5 7.5M7.5 4.5L4.5 7.5"})]})}function tM(){return(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",children:(0,t.jsx)("circle",{cx:"4",cy:"4",r:"2.5"})})}function tI(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M2.5 6L5 8.5L9.5 3.5"})})}function tF(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"2",y:"6",width:"12",height:"8",rx:"2"}),(0,t.jsx)("path",{d:"M5.5 10H5.51M10.5 10H10.51",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 2V6"}),(0,t.jsx)("circle",{cx:"8",cy:"1.5",r:"1"}),(0,t.jsx)("path",{d:"M0.5 9.5H2M14 9.5H15.5"})]})}function tP({expanded:e}){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:(0,r.cn)("stg:shrink-0 stg:text-muted-foreground stg:transition-transform stg:duration-150",e&&"stg:rotate-90"),"aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4.5 2.5L7.5 6L4.5 9.5"})})}e.s(["ApprovalCard",()=>tK,"ApprovalCardBody",()=>t$],855328);let tD=(0,r.cn)("stg:inline-flex stg:items-center stg:justify-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5","stg:text-xs stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:ring-offset-2","stg:disabled:cursor-not-allowed stg:disabled:opacity-50 stg:disabled:pointer-events-none"),tR={primary:"stg:border stg:border-border stg:bg-accent stg:text-accent-foreground stg:hover:bg-accent-hover",ghost:"stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover",danger:(0,r.cn)("stg:text-muted-foreground","stg:hover:bg-destructive-subtle stg:hover:text-destructive","stg:focus-visible:bg-destructive-subtle stg:focus-visible:text-destructive")};function t_({label:e,variant:s,onClick:n,isSubmitting:i=!1,isActive:o=!1,disabled:l=!1,className:a,cursorTarget:c,ariaDescribedby:u}){return(0,t.jsxs)("button",{type:"button",disabled:i||l,onClick:n,"aria-label":e,"aria-describedby":u,"data-cursor-target":c,className:(0,r.cn)(tD,tR[s],a),children:[o&&i?(0,t.jsx)(d.SpinnerIcon,{}):null,e]})}function tO({error:e,leadIn:s,cursorTarget:r}){return(0,t.jsxs)("p",{role:"alert",className:"stg:text-[11px] stg:text-destructive","data-cursor-target":r,children:["Couldn’t ",s," — ",e.message]})}e.s(["DecisionButton",0,t_],954418),e.s(["InCardDecisionError",0,tO],321425);let tK=(0,s.memo)(function({pendingApproval:e,onSubmit:s,isSubmitting:n=!1,error:i=null,className:o}){let l="delete"===ei(e.toolKind,e.toolName,e.mcpServerSlug).category?"stg:border-l-2 stg:border-l-destructive":"stg:border-l-2 stg:border-l-warning";return(0,t.jsxs)("div",{role:"alert","aria-label":`Approval required for ${e.toolName}`,className:(0,r.cn)("stg:rounded-lg stg:border stg:border-border-prominent",l,o),children:[(0,t.jsx)(tB,{pendingApproval:e,bordered:!0}),(0,t.jsx)(t$,{pendingApproval:e,onSubmit:s,isSubmitting:n,error:i})]})});function tB({pendingApproval:e,bordered:n=!1}){let i=ei(e.toolKind,e.toolName,e.mcpServerSlug),o=t6[i.category],l=(0,s.useMemo)(()=>ed(e.toolName,e.argsPreview,e.mcpServerSlug,e.toolKind),[e.toolName,e.argsPreview,e.mcpServerSlug,e.toolKind]),a=(0,s.useMemo)(()=>ec(e.toolName,e.argsPreview,e.mcpServerSlug,e.toolKind),[e.toolName,e.argsPreview,e.mcpServerSlug,e.toolKind]);return(0,t.jsxs)("div",{className:(0,r.cn)("stg:flex stg:items-center stg:gap-2 stg:px-2.5 stg:py-1.5 stg:text-xs",n&&"stg:border-b stg:border-border-muted"),children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-warning","aria-hidden":"true",children:(0,t.jsx)(o,{})}),(0,t.jsxs)("span",{className:"stg:min-w-0 stg:flex-1 stg:flex stg:items-center stg:gap-1.5 stg:overflow-hidden",children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:font-medium stg:text-foreground",children:a??i.label}),l&&"shell"!==i.category&&(Z(i.category)?(0,t.jsx)(eA.FilePathLink,{path:l,className:"stg:min-w-0 stg:text-xs stg:text-muted-foreground"}):(0,t.jsx)("span",{className:"stg:min-w-0 stg:truncate stg:font-mono stg:text-muted-foreground",children:l}))]}),e.fromSubAgent&&e.subAgentName&&(0,t.jsxs)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1 stg:py-0.5 stg:font-mono stg:text-muted-foreground",children:["via ",e.subAgentSubject||e.subAgentName]}),(0,t.jsx)(tW,{requestedAt:e.requestedAt}),(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-warning","aria-hidden":"true",children:(0,t.jsx)(tH,{})})]})}function t$({pendingApproval:e,onSubmit:n,isSubmitting:o=!1,error:l=null,className:a}){let[d,c]=(0,s.useState)(null),u=(0,s.useCallback)(e=>{c(e),n(e)},[n]);(0,s.useEffect)(()=>{o||c(null)},[o]);let g=ei(e.toolKind,e.toolName,e.mcpServerSlug),p=(0,s.useMemo)(()=>{if(!e.argsPreview)return null;try{let t=JSON.parse(e.argsPreview);if("object"==typeof t&&null!==t)return t;return null}catch{return null}},[e.argsPreview]),h=(0,s.useMemo)(()=>(function(e,t){if(t)return`Approve all ${t} tools`;switch(e){case"shell":return"Approve all shell commands";case"delete":return"Approve all file deletions";case"write":case"edit":return"Approve all file edits";default:return"Approve all of this kind"}})(g.category,e.mcpServerSlug),[g.category,e.mcpServerSlug]),m=(0,s.useMemo)(()=>e6(e.approvalPolicySource),[e.approvalPolicySource]),x=null!=m&&e8(e.approvalPolicySource),f=!!e.message&&"shell"!==g.category&&!Z(g.category),b="write"===g.category||"edit"===g.category,v=(0,s.useMemo)(()=>eg(e.argsPreview),[e.argsPreview]),j=null;if(b&&null===v){let s=e.toolKind===i.ToolKind.FILE_WRITE?"create":"no-preview";j=(0,t.jsx)(e$.EmptyChangeNotice,{kind:s})}else p&&(j=(0,t.jsx)(eL,{toolName:e.toolName,args:p,mcpServerSlug:e.mcpServerSlug,showFileName:!b}));return(0,t.jsxs)("div",{className:(0,r.cn)("stg:px-3 stg:py-2.5 stg:space-y-2",a),children:[f&&(0,t.jsx)("p",{className:"stg:text-xs stg:text-foreground",children:e.message}),j,"shell"===g.category&&(0,t.jsx)("p",{className:"stg:text-[11px] stg:italic stg:text-muted-foreground",children:"Files this command creates or changes are covered by this approval — they are kept automatically, with no second review."}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:pt-1",children:[(0,t.jsx)(t_,{label:"Approve",variant:"primary",onClick:()=>u(i.ApprovalAction.APPROVE),isActive:d===i.ApprovalAction.APPROVE,isSubmitting:o,cursorTarget:"approve-button"}),(0,t.jsx)(t_,{label:"Skip",variant:"ghost",onClick:()=>u(i.ApprovalAction.SKIP),isActive:d===i.ApprovalAction.SKIP,isSubmitting:o}),(0,t.jsx)(t_,{label:"Reject",variant:"danger",onClick:()=>u(i.ApprovalAction.REJECT),isActive:d===i.ApprovalAction.REJECT,isSubmitting:o}),(0,t.jsx)(t_,{label:h,variant:"ghost",onClick:()=>u(i.ApprovalAction.APPROVE_ALL),isActive:d===i.ApprovalAction.APPROVE_ALL,isSubmitting:o,className:"stg:ml-auto",cursorTarget:"approve-all-button"})]}),x&&(0,t.jsx)("p",{className:"stg:text-[11px] stg:italic stg:text-muted-foreground","data-cursor-target":"approval-gate-reason",children:m}),l&&(0,t.jsx)(tO,{error:l,leadIn:"submit decision",cursorTarget:"approval-error"})]})}function tW({requestedAt:e}){let s=tl(e);return null===s?null:(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-xs stg:text-muted-foreground",children:ta(s)})}function tH(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M6 3.5V6L7.5 7.5"})]})}var tU=e.i(610595),tV=e.i(564138),tG=e.i(379410),tz=e.i(832981),tq=e.i(689960),tJ=e.i(910304),tY=e.i(586108),tX=e.i(583093);let tZ={memory:null,notFound:!1};var tQ=e.i(631829);function t0({memoryId:e,fact:n,className:i}){let{memory:o,isLoading:l,notFound:a,error:d}=function(e){let t=(0,tY.useStigmer)(),{data:s,isLoading:r,error:n,refetch:i}=(0,tX.useFetch)(e?()=>t.memory.get(e).then(e=>({memory:e,notFound:!1}),e=>{if((0,tJ.isNotFound)(e))return{memory:null,notFound:!0};throw e}):null,[t,e],tZ);return{memory:s.memory,isLoading:r,notFound:s.notFound,error:n,refetch:i}}(e),{confirmMemory:c,isConfirming:u,error:g}=(0,tq.useConfirmMemory)(),{rejectMemory:p,isRejecting:h,error:m}=(0,tQ.useRejectMemory)(),[x,f]=(0,s.useState)(null),b=(0,s.useCallback)(async t=>{try{f(await t(e))}catch{}},[e]),v=x??o,j=v?.status?.lifecycleState,y=v?.spec?.content||n,C=v?(0,tz.formatMemoryProvenance)(v):null,k=g??m,w=u||h,N=!a&&null==d&&(void 0===j||j===tV.MemoryLifecycleState.lifecycle_state_unspecified||j===tV.MemoryLifecycleState.lifecycle_state_proposed);return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-2",i),"data-cursor-target":"memory-proposal",children:[(0,t.jsx)("p",{className:"stg:text-sm stg:text-foreground stg:whitespace-pre-wrap",children:y}),(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",children:[C?`${C} \xb7 `:"","Proposed to remember — nothing is stored in your sessions until you confirm it."]}),a?(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",role:"status",children:"No longer stored."}):d?(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",role:"status",children:"Couldn't load this proposal's current state — review it in Settings → Memory."}):N?(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,t.jsxs)(t1,{label:`Confirm memory: ${y}`,onClick:()=>void b(c),disabled:w||l,emphasis:"primary",children:[u&&(0,t.jsx)(tG.SpinnerIcon,{size:12}),"Confirm"]}),(0,t.jsxs)(t1,{label:`Reject memory: ${y}`,onClick:()=>void b(p),disabled:w||l,children:[h&&(0,t.jsx)(tG.SpinnerIcon,{size:12}),"Reject"]})]}):(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",role:"status",children:j===tV.MemoryLifecycleState.lifecycle_state_confirmed?"Confirmed — recalled in your future sessions.":"Rejected — not stored."}),k&&(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-destructive",role:"alert",children:(0,tU.getUserMessage)(k)})]})}function t1({label:e,onClick:s,disabled:n,emphasis:i,children:o}){return(0,t.jsx)("button",{type:"button","aria-label":e,onClick:s,disabled:n,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","primary"===i?"stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover":"stg:border stg:border-input stg:bg-background stg:text-foreground stg:hover:bg-accent stg:hover:text-accent-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:o})}var t5=e.i(188482);let t2=(0,s.memo)(function({toolCall:e,subAgentExecution:s,defaultExpanded:d=!1,bordered:u=!0,className:g}){(0,n.useRenderTracer)("ToolCallItem",{status:e.status,id:e.id});let p=function(e){switch(e.status){case i.ToolCallStatus.TOOL_CALL_RUNNING:return"running";case i.ToolCallStatus.TOOL_CALL_WAITING_APPROVAL:if(e.approvalAction===i.ApprovalAction.APPROVE||e.approvalAction===i.ApprovalAction.SKIP||e.approvalAction===i.ApprovalAction.REJECT)return"completed";return"waiting";case i.ToolCallStatus.TOOL_CALL_FAILED:return"failed";case i.ToolCallStatus.TOOL_CALL_COMPLETED:case i.ToolCallStatus.TOOL_CALL_SKIPPED:return"completed";case i.ToolCallStatus.TOOL_CALL_INTERRUPTED:return"interrupted";default:return"pending"}}(e),h=se[p],m=to(e.startedAt,e.completedAt),x=null!=s,{category:f,label:b,intent:j,title:y,primaryArg:C,result:k,resultSummary:w,disclosure:N,chrome:T}=e3(e),E=t6[f],S=tg(e.id),A=!x&&"tail"===N,L=A&&(e.status===i.ToolCallStatus.TOOL_CALL_FAILED||"error"===k.type||"terminal"===k.type&&void 0!==k.exitCode&&0!==k.exitCode),M=e.status===i.ToolCallStatus.TOOL_CALL_RUNNING||null!=S||L,[I,F]=(0,o.useAutoDisclosure)(M,{initialOpen:d||M}),P=x?s.subject||s.name||b:y,D=function(e){if(!e.requiresApproval)return null;switch(e.approvalAction){case i.ApprovalAction.APPROVE:return{label:"Approved",colorClass:"stg:bg-success/15 stg:text-success"};case i.ApprovalAction.SKIP:return{label:"Skipped",colorClass:"stg:bg-muted stg:text-muted-foreground"};case i.ApprovalAction.REJECT:return{label:"Rejected",colorClass:"stg:bg-destructive/15 stg:text-destructive"};default:return null}}(e),R=v(e.fileChangeSetId,C),_=R?t4[R]:null,O="search"===f||"list"===f,{ref:K,isTruncated:B}=(0,l.useIsTextTruncated)(O),$=null!=S?"delete"===f?"destructive":"warning":null,W=e.status===i.ToolCallStatus.TOOL_CALL_FAILED||"error"===k.type,H=u?"quiet"!==T||x||null!=S||W?"card":"quiet":"row",U=!x&&"read"===f&&(e.status===i.ToolCallStatus.TOOL_CALL_COMPLETED||e.status===i.ToolCallStatus.TOOL_CALL_SKIPPED),V=(0,t.jsxs)(t.Fragment,{children:[D&&(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0 stg:rounded stg:px-1 stg:py-0.5 stg:text-[10px] stg:font-medium stg:leading-none",D.colorClass),children:D.label}),_&&(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0 stg:rounded stg:px-1 stg:py-0.5 stg:text-[10px] stg:font-medium stg:leading-none",_.colorClass),"data-cursor-target":"file-review-row-badge",children:_.label}),e.mcpServerSlug&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1 stg:py-0.5 stg:font-mono stg:text-muted-foreground",children:e.mcpServerSlug}),h&&(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0",t3[p]),"aria-hidden":"true",children:(0,t.jsx)(h,{})}),m&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:tabular-nums stg:text-muted-foreground",children:m})]});if(U)return(0,t.jsx)(a.ThreadCardShell,{variant:H,accent:$,cursorTarget:"tool-call-row",className:g,children:(0,t.jsxs)(a.ThreadCardHeader,{children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)(E,{})}),(0,t.jsxs)("span",{className:"stg:min-w-0 stg:flex-1 stg:flex stg:items-center stg:gap-1.5 stg:overflow-hidden",children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:font-medium stg:text-foreground",children:P}),C&&(0,t.jsx)(eA.FilePathLink,{path:C,className:"stg:min-w-0 stg:text-xs"})]}),V]})});let G=x?null:"shell"===f?j?C:null:C,z=!x&&null!=C&&Z(f),q=A&&null==S&&"terminal"===k.type?k:null,J=!x&&("preview"===N||A&&null==q),Y=x?(0,t.jsx)(tw,{subAgentExecution:s,collapsible:!1}):S?(0,t.jsx)(t$,{pendingApproval:S.pendingApproval,onSubmit:S.onSubmit,isSubmitting:S.isSubmitting,error:S.error}):"memoryProposal"===k.type?(0,t.jsx)(t0,{memoryId:k.memoryId,fact:k.fact}):(0,t.jsx)(e7,{toolCall:e,primaryArgTruncated:B}),X=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)(E,{})}),(0,t.jsxs)("span",{className:"stg:min-w-0 stg:flex-1 stg:flex stg:items-baseline stg:gap-1.5 stg:overflow-hidden",children:[(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0 stg:font-medium","running"===p?"stgm-shimmer-label":"stg:text-foreground"),children:P}),z&&C?(0,t.jsx)(eA.FilePathLink,{path:C,className:"stg:min-w-0 stg:text-xs stg:text-muted-foreground"}):G&&(0,t.jsxs)(t5.Tooltip,{children:[(0,t.jsx)(t5.TooltipTrigger,{render:(0,t.jsx)("span",{ref:O?K:void 0,className:"stg:min-w-0 stg:truncate stg:text-muted-foreground stg:font-mono"}),children:G}),(0,t.jsx)(t5.TooltipContent,{side:"top",className:"stg:break-all",children:G})]}),!x&&"shell"!==f&&w&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:tabular-nums stg:text-muted-foreground",children:w})]}),V]});if(J){let e=null!=S||"empty"!==k.type;return(0,t.jsxs)(a.ThreadCardShell,{variant:H,accent:$,cursorTarget:"tool-call-row",className:g,children:[(0,t.jsx)(a.ThreadCardHeader,{children:X}),e&&(0,t.jsx)(a.ThreadCardBody,{cursorTarget:"tool-preview",rail:"quiet"===H,children:Y})]})}return q?(0,t.jsxs)(a.ThreadCardShell,{variant:H,accent:$,cursorTarget:"tool-call-row",className:g,children:[(0,t.jsx)(a.ThreadCardHeader,{gesture:{kind:"expand",expanded:I,onToggle:F},children:X}),I?(0,t.jsx)(a.ThreadCardBody,{cursorTarget:"tool-preview",children:Y}):(0,t.jsx)(a.ThreadCardBody,{children:(0,t.jsx)(c.TerminalTail,{command:q.command,stdout:q.stdout,stderr:q.stderr,exitCode:q.exitCode})})]}):(0,t.jsxs)(a.ThreadCardShell,{variant:H,accent:$,cursorTarget:"tool-call-row",className:g,children:[(0,t.jsx)(a.ThreadCardHeader,{gesture:{kind:"expand",expanded:I,onToggle:F},children:X}),I&&(0,t.jsx)(a.ThreadCardBody,{rail:"quiet"===H,children:Y})]})}),t4={pending:{label:"Pending review",colorClass:"stg:bg-warning/15 stg:text-warning"},kept:{label:"Kept",colorClass:"stg:bg-success/15 stg:text-success"},discarded:{label:"Discarded",colorClass:"stg:bg-destructive/15 stg:text-destructive"},failed:{label:"Review failed",colorClass:"stg:bg-destructive/15 stg:text-destructive"}},t3={running:"stg:text-foreground",waiting:"stg:text-warning",failed:"stg:text-destructive",completed:"stg:text-success",pending:"stg:text-muted-foreground",interrupted:"stg:text-muted-foreground"},t6={shell:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"1",y:"1.5",width:"10",height:"9",rx:"1.5"}),(0,t.jsx)("path",{d:"M3 4.5L5 6.5L3 8.5"}),(0,t.jsx)("path",{d:"M6.5 8.5H9"})]})},read:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M7 1H3C2.45 1 2 1.45 2 2V10C2 10.55 2.45 11 3 11H9C9.55 11 10 10.55 10 10V4L7 1Z"}),(0,t.jsx)("path",{d:"M7 1V4H10"})]})},write:t7,edit:t7,delete:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M2 3H10"}),(0,t.jsx)("path",{d:"M3 3V10C3 10.55 3.45 11 4 11H8C8.55 11 9 10.55 9 10V3"}),(0,t.jsx)("path",{d:"M4.5 1H7.5"})]})},search:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"5.5",cy:"5.5",r:"3.5"}),(0,t.jsx)("path",{d:"M8 8L10.5 10.5"})]})},list:function(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M1.5 3V9.5C1.5 10.05 1.95 10.5 2.5 10.5H9.5C10.05 10.5 10.5 10.05 10.5 9.5V4.5C10.5 3.95 10.05 3.5 9.5 3.5H6L5 2H2.5C1.95 2 1.5 2.45 1.5 3Z"})})},fetch:t8,"web-search":t8,think:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M6 2C4.9 2 4 2.9 4 4C3.17 4 2.5 4.67 2.5 5.5C2.5 6.33 3 6.87 3 6.87C2.5 7.37 2.5 8.13 3 8.63C3.5 9.13 4.3 9.13 4.8 8.63L6 7.5"}),(0,t.jsx)("path",{d:"M6 2C7.1 2 8 2.9 8 4C8.83 4 9.5 4.67 9.5 5.5C9.5 6.33 9 6.87 9 6.87C9.5 7.37 9.5 8.13 9 8.63C8.5 9.13 7.7 9.13 7.2 8.63L6 7.5"}),(0,t.jsx)("path",{d:"M6 7.5V11"})]})},"sub-agent":function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"2",y:"4",width:"8",height:"6",rx:"1.5"}),(0,t.jsx)("circle",{cx:"4.5",cy:"7",r:"0.75",fill:"currentColor",stroke:"none"}),(0,t.jsx)("circle",{cx:"7.5",cy:"7",r:"0.75",fill:"currentColor",stroke:"none"}),(0,t.jsx)("path",{d:"M6 1V4"}),(0,t.jsx)("circle",{cx:"6",cy:"1",r:"0.75"})]})},internal:t9,mcp:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M4 1.5V4"}),(0,t.jsx)("path",{d:"M8 1.5V4"}),(0,t.jsx)("path",{d:"M2.5 4H9.5V6.5C9.5 8.43 7.93 10 6 10C4.07 10 2.5 8.43 2.5 6.5V4Z"}),(0,t.jsx)("path",{d:"M6 10V11"})]})},memory:function(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M9 11L6 8.5L3 11V2.5C3 1.95 3.45 1.5 4 1.5H8C8.55 1.5 9 1.95 9 2.5V11Z"})})},unknown:t9};function t8(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M1.5 6H10.5"}),(0,t.jsx)("path",{d:"M6 1.5C7.5 3 7.5 9 6 10.5C4.5 9 4.5 3 6 1.5Z"})]})}function t7(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M7 1H3C2.45 1 2 1.45 2 2V10C2 10.55 2.45 11 3 11H9C9.55 11 10 10.55 10 10V4L7 1Z"}),(0,t.jsx)("path",{d:"M7 1V4H10"}),(0,t.jsx)("path",{d:"M5 7L8 7"}),(0,t.jsx)("path",{d:"M5 9L7 9"})]})}function t9(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M8.5 2C7.67 2 7 2.67 7 3.5C7 3.78 7.08 4.04 7.22 4.26L3.74 7.74C3.52 7.6 3.27 7.5 3 7.5C2.17 7.5 1.5 8.17 1.5 9C1.5 9.83 2.17 10.5 3 10.5C3.83 10.5 4.5 9.83 4.5 9C4.5 8.73 4.4 8.48 4.26 8.26L7.74 4.78C7.96 4.92 8.22 5 8.5 5C9.33 5 10 4.33 10 3.5C10 3.22 9.92 2.96 9.78 2.74L8.5 4L7.5 3L8.76 1.72C8.54 1.58 8.28 1.5 8 1.5"})})}let se={running:d.SpinnerIcon,waiting:d.ClockIcon,failed:d.XCircleIcon,completed:null,pending:d.DotIcon,interrupted:d.SlashCircleIcon},st=(0,s.memo)(function({category:e,toolCalls:l,formatLabel:a,className:d}){(0,n.useRenderTracer)("ToolRunGroup",{category:e,count:l.length});let c=function(e){let t=!1,s=!1,r=!1,n=!0;for(let o of e)switch(o.status){case i.ToolCallStatus.TOOL_CALL_RUNNING:t=!0,n=!1;break;case i.ToolCallStatus.TOOL_CALL_WAITING_APPROVAL:if(o.approvalAction===i.ApprovalAction.APPROVE||o.approvalAction===i.ApprovalAction.SKIP||o.approvalAction===i.ApprovalAction.REJECT)break;s=!0,n=!1;break;case i.ToolCallStatus.TOOL_CALL_FAILED:r=!0;break;case i.ToolCallStatus.TOOL_CALL_COMPLETED:case i.ToolCallStatus.TOOL_CALL_SKIPPED:case i.ToolCallStatus.TOOL_CALL_INTERRUPTED:break;default:n=!1}return t?"running":s?"waiting":r?"failed":n?"completed":"pending"}(l),u="running"===c,{approvalsByToolCallId:g}=(0,s.useContext)(tu),p=(0,s.useMemo)(()=>0!==g.size&&l.some(e=>e.id&&g.has(e.id)),[l,g]),[h,m]=(0,o.useAutoDisclosure)(u||"waiting"===c||"pending"===c||p),x=a?a(l):function(e,t){switch(e){case"read":return`Read ${t} files`;case"list":return`Listed ${t} directories`;case"search":return`Searched ${t} times`;default:return`${t} calls`}}(e,l.length),f=t6[e],b=sr[c];return(0,t.jsxs)("div",{role:"group","aria-label":x,"data-cursor-target":"tool-run-group",className:d,children:[(0,t.jsxs)("button",{type:"button","aria-expanded":h,onClick:m,className:(0,r.cn)("stg:flex stg:w-full stg:cursor-pointer stg:items-center stg:gap-2 stg:px-2.5 stg:py-1.5 stg:text-left stg:text-xs stg:text-muted-foreground stg:transition-colors","stg:hover:bg-muted-subtle","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring"),children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)(f,{})}),(0,t.jsx)("span",{className:(0,r.cn)("stg:min-w-0 stg:flex-1 stg:truncate stg:font-medium",u?"stgm-shimmer-label":"stg:text-foreground"),children:x}),b&&(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0",ss[c]),"aria-hidden":"true",children:(0,t.jsx)(b,{})}),(0,t.jsx)(sn,{expanded:h})]}),h&&(0,t.jsx)("div",{className:"stg:ml-1.5 stg:border-l-2 stg:border-border-muted stg:pl-2",children:l.map(e=>(0,t.jsx)(t2,{toolCall:e,bordered:!1},e.id||e.name))})]})},function(e,t){if(e.category!==t.category||e.toolCalls.length!==t.toolCalls.length)return!1;for(let s=0;s<e.toolCalls.length;s++)if(e.toolCalls[s]!==t.toolCalls[s])return!1;return e.formatLabel===t.formatLabel&&e.className===t.className}),ss={running:"stg:text-foreground",waiting:"stg:text-warning",failed:"stg:text-destructive",completed:"stg:text-success",pending:"stg:text-muted-foreground"},sr={running:d.SpinnerIcon,waiting:function(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M6 3.5V6L7.5 7.5"})]})},failed:function(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M4.5 4.5L7.5 7.5M7.5 4.5L4.5 7.5"})]})},completed:null,pending:function(){return(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",children:(0,t.jsx)("circle",{cx:"4",cy:"4",r:"2.5"})})}};function sn({expanded:e}){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:(0,r.cn)("stg:shrink-0 stg:text-muted-foreground stg:transition-transform stg:duration-150",e&&"stg:rotate-90"),"aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3.5 2L6.5 5L3.5 8"})})}function si(e){return e.id||e.name}let so=(0,s.memo)(function({toolCalls:e,subAgentExecutions:i,formatSummary:o,className:l}){(0,n.useRenderTracer)("ToolCallGroup",{toolCallCount:e.length});let a=(0,s.useMemo)(()=>e.filter(e=>!et(e)),[e]),d=(0,s.useMemo)(()=>(function(e){let t=[],s=e.map(e=>en(e).category),r=e.map(e=>{let t,s;return t=k(e),(s=e4.get(t)?.runGroupable)?s(e):X(en(e).category)}),n=0;for(;n<e.length;){let i=s[n];if(r[n]){let o=n+1;for(;o<e.length&&r[o]&&s[o]===i;)o++;if(o-n>=2){let s=e.slice(n,o);t.push({kind:"run",category:i,toolCalls:s,key:`run-${i}-${si(s[0])}`}),n=o;continue}}t.push({kind:"row",toolCall:e[n],key:si(e[n])}),n++}return t})(a),[a]),c=(0,s.useMemo)(()=>{if(!i||0===i.length)return null;let e=new Map;for(let t of i)e.set(t.id,t);return e},[i]);if(0===a.length)return null;let u=`${a.length} tool ${1===a.length?"call":"calls"}`;return(0,t.jsx)("div",{role:"group","aria-label":u,"data-cursor-target":"tool-call-group",className:(0,r.cn)("stg:flex stg:flex-col stg:gap-2",l),children:d.map(e=>"run"===e.kind?(0,t.jsx)(st,{category:e.category,toolCalls:e.toolCalls,formatLabel:o},e.key):(0,t.jsx)(t2,{toolCall:e.toolCall,subAgentExecution:c?.get(e.toolCall.id)??null},e.key))})},function(e,t){if(e.toolCalls.length!==t.toolCalls.length)return!1;for(let s=0;s<e.toolCalls.length;s++)if(e.toolCalls[s]!==t.toolCalls[s])return!1;return e.subAgentExecutions===t.subAgentExecutions&&e.formatSummary===t.formatSummary&&e.defaultExpanded===t.defaultExpanded&&e.className===t.className}),sl=new Map([[i.ExecutionPhase.EXECUTION_PENDING,{label:"Pending",icon:sd,colorClass:"stg:text-muted-foreground"}],[i.ExecutionPhase.EXECUTION_IN_PROGRESS,{label:"Running",icon:sd,colorClass:"stg:text-foreground"}],[i.ExecutionPhase.EXECUTION_COMPLETED,{label:"Completed",icon:function(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M2.5 6L5 8.5L9.5 3.5"})})},colorClass:"stg:text-success"}],[i.ExecutionPhase.EXECUTION_FAILED,{label:"Failed",icon:sc,colorClass:"stg:text-destructive"}],[i.ExecutionPhase.EXECUTION_CANCELLED,{label:"Cancelled",icon:sc,colorClass:"stg:text-muted-foreground"}],[i.ExecutionPhase.EXECUTION_TERMINATED,{label:"Terminated",icon:function(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:(0,t.jsx)("rect",{x:"2",y:"2",width:"8",height:"8",rx:"1"})})},colorClass:"stg:text-destructive"}],[i.ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,{label:"Waiting for approval",icon:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M6 3.5V6L7.5 7.5"})]})},colorClass:"stg:text-warning"}],[i.ExecutionPhase.EXECUTION_PAUSED,{label:"Paused",icon:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:[(0,t.jsx)("rect",{x:"2.5",y:"2",width:"2.5",height:"8",rx:"0.5"}),(0,t.jsx)("rect",{x:"7",y:"2",width:"2.5",height:"8",rx:"0.5"})]})},colorClass:"stg:text-muted-foreground"}]]),sa=(0,s.memo)(function({phase:e,className:s}){let n=sl.get(e);if(!n)return null;let i=n.icon;return(0,t.jsxs)("span",{role:"status","aria-label":n.label,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:text-xs stg:font-medium",n.colorClass,s),children:[(0,t.jsx)("span",{"aria-hidden":"true",children:(0,t.jsx)(i,{})}),n.label]})});function sd(){return(0,t.jsxs)("span",{className:"stg:relative stg:flex stg:h-2 stg:w-2",children:[(0,t.jsx)("span",{className:"stg:absolute stg:inline-flex stg:h-full stg:w-full stg:animate-ping stg:rounded-full stg:bg-current stg:opacity-75"}),(0,t.jsx)("span",{className:"stg:relative stg:inline-flex stg:h-2 stg:w-2 stg:rounded-full stg:bg-current"})]})}function sc(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M3 3L9 9M9 3L3 9"})})}e.s(["ExecutionPhaseBadge",0,sa],574100);let su=(0,s.memo)(function({workspaceEntries:e,serverPhase:n,isAwaitingResponse:i,className:o}){let l,a=!i&&!!n,d=(0,s.useMemo)(()=>{let t,s;return t=e?.some(e=>e.source?.source.case==="gitRepo"),s=[{message:"Initializing execution…",durationMs:4e3}],t&&s.push({message:"Setting up workspace…",durationMs:4e3}),s.push({message:"Preparing agent environment…",durationMs:4e3},{message:"Almost ready…",durationMs:4e3}),s},[e]),[c,u]=(0,s.useState)(0);return(0,s.useEffect)(()=>{u(0)},[d]),(0,s.useEffect)(()=>{if(i||a||c>=d.length-1)return;let e=setTimeout(()=>{u(e=>Math.min(e+1,d.length-1))},d[c].durationMs);return()=>clearTimeout(e)},[i,a,c,d]),l=i?"Thinking…":n||d[Math.min(c,d.length-1)].message,(0,t.jsxs)("div",{role:"status","aria-label":l,className:(0,r.cn)("stg:flex stg:items-center stg:gap-2.5 stg:px-4 stg:py-2",o),children:[(0,t.jsx)(sg,{}),(0,t.jsx)("span",{className:"stg:text-sm stg:animate-in stg:fade-in stg:duration-300 stgm-shimmer-label",children:l})]})});function sg(){return(0,t.jsxs)("span",{className:"stg:relative stg:flex stg:h-2 stg:w-2 stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("span",{className:"stg:absolute stg:inline-flex stg:h-full stg:w-full stg:animate-ping stg:rounded-full stg:bg-muted-foreground stg:opacity-75"}),(0,t.jsx)("span",{className:"stg:relative stg:inline-flex stg:h-2 stg:w-2 stg:rounded-full stg:bg-muted-foreground"})]})}e.s(["SetupProgress",0,su],741690);let sp=(0,s.memo)(function({report:e,facts:n,className:i}){let[o,l]=(0,s.useState)(!1),a=(0,s.useId)(),d=(0,s.useMemo)(()=>{let t;return t=new Set(e.injectedMemoryIds),n.filter(e=>t.has(e.memoryId))},[e,n]);if(!e.selectionActive)return null;let c=e.injectedMemoryIds.length,u=`Recalled ${c} of ${n.length} memories`;return(0,t.jsxs)("div",{role:"status","aria-label":u,className:(0,r.cn)("stg:mx-4 stg:rounded-md stg:border stg:border-border/50 stg:bg-muted/30",i),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":o,"aria-controls":a,onClick:()=>l(e=>!e),className:(0,r.cn)("stg:flex stg:w-full stg:items-center stg:gap-3 stg:px-3 stg:py-2 stg:text-left","stg:text-xs stg:text-muted-foreground hover:stg:text-foreground"),children:[(0,t.jsx)(sh,{}),(0,t.jsxs)("span",{className:"stg:flex stg:min-w-0 stg:flex-1 stg:flex-wrap stg:items-baseline stg:gap-x-2",children:[(0,t.jsx)("span",{className:"stg:font-medium",children:u}),e.embeddingModel&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"stg:text-muted-foreground/50",children:"·"}),(0,t.jsx)("span",{className:"stg:text-muted-foreground/80",children:e.embeddingModel})]})]}),(0,t.jsx)(sm,{expanded:o})]}),o&&(0,t.jsx)("ul",{id:a,className:"stg:m-0 stg:flex stg:list-none stg:flex-col stg:gap-1.5 stg:border-t stg:border-border/50 stg:px-3 stg:py-2",children:d.map(e=>(0,t.jsx)("li",{className:"stg:text-xs stg:leading-relaxed stg:text-muted-foreground",children:e.content},e.memoryId))})]})});function sh(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground/70","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 2a3 3 0 0 0-3 3c-1.2.4-2 1.5-2 2.8 0 1 .5 1.9 1.3 2.4A2.8 2.8 0 0 0 7 13.8c.4.1.7.2 1 .2s.6-.1 1-.2a2.8 2.8 0 0 0 2.7-3.6c.8-.5 1.3-1.4 1.3-2.4 0-1.3-.8-2.4-2-2.8a3 3 0 0 0-3-3z"}),(0,t.jsx)("path",{d:"M8 2v12"})]})}function sm({expanded:e}){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground/70","aria-hidden":"true",children:e?(0,t.jsx)("path",{d:"M4 10l4-4 4 4"}):(0,t.jsx)("path",{d:"M4 6l4 4 4-4"})})}e.s(["RecalledMemoriesCard",0,sp],340021);let sx=(0,s.memo)(function({label:e="Working…",className:s}){return(0,t.jsx)("div",{role:"status","aria-label":e,"data-cursor-target":"liveness-status-line",className:(0,r.cn)("stg:flex stg:items-center stg:px-4 stg:py-1.5",s),children:(0,t.jsx)("span",{className:"stg:text-xs stgm-shimmer-label",children:e})})});function sf({linesAdded:e,linesRemoved:s}){return 0===e&&0===s?null:(0,t.jsxs)("span",{className:"stg:shrink-0 stg:text-xs stg:tabular-nums","aria-label":`${e} added, ${s} removed`,"data-cursor-target":"file-review-line-stats",children:[(0,t.jsxs)("span",{className:"stg:text-diff-added-fg",children:["+",e]})," ",(0,t.jsxs)("span",{className:"stg:text-diff-removed-fg",children:["-",s]})]})}e.s(["LivenessStatusLine",0,sx],654997),e.s(["ExecutionErrorNotice",0,function({error:e,retryMessage:n,onRetry:i}){let[o,l]=(0,s.useState)(!1),a=/\[StallTimeoutError\]|execution interrupted|retry or resume/i.test(e);return(0,t.jsxs)("div",{role:a?"status":"alert",className:(0,r.cn)("stg:mx-4 stg:flex stg:flex-col stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-2",a?"stg:bg-muted":"stg:bg-destructive-subtle"),children:[(0,t.jsx)("p",{className:(0,r.cn)("stg:text-xs stg:whitespace-pre-wrap stg:break-words",a?"stg:text-foreground":"stg:text-destructive",!o&&"stg:line-clamp-3"),children:e}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-3 stg:text-xs",children:[(0,t.jsx)("button",{type:"button",onClick:()=>l(e=>!e),className:"stg:font-medium stg:text-muted-foreground stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:o?"Show less":"Show more"}),!!i&&!!n&&(0,t.jsx)("button",{type:"button",onClick:()=>i(n),className:"stg:font-medium stg:text-foreground stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:a?"Resume":"Retry"})]})]})}],3115);let sb={[i.FileChangeKind.ADD]:{letter:"A",colorClass:"stg:text-diff-added-fg",label:"added"},[i.FileChangeKind.MODIFY]:{letter:"M",colorClass:"stg:text-diff-hunk-header-fg",label:"modified"},[i.FileChangeKind.DELETE]:{letter:"D",colorClass:"stg:text-diff-removed-fg",label:"deleted"},[i.FileChangeKind.RENAME]:{letter:"R",colorClass:"stg:text-diff-hunk-header-fg",label:"renamed"},[i.FileChangeKind.BINARY_CHANGE]:{letter:"M",colorClass:"stg:text-diff-hunk-header-fg",label:"modified (binary)"}};function sv({kind:e}){let s=sb[e];return s?(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0 stg:font-mono stg:text-[10px] stg:font-bold",s.colorClass),"aria-label":s.label,children:s.letter}):null}e.s(["FileKindBadge",0,sv,"FileLineStats",0,sf],222898);var sj=e.i(676951),sy=e.i(891287),sC=e.i(261024),sk=e.i(326283);function sw(e,t){return t?`${e}:${t}`:e}let sN=new Map;e.s(["fileDecisionKey",0,sw,"useFileReview",0,function(){let e=(0,tY.useStigmer)(),[t,r]=(0,s.useState)(new Set),[n,o]=(0,s.useState)(sN),[l,a]=(0,s.useState)(null),d=(0,s.useCallback)(e=>{o(t=>{if(!t.has(e))return t;let s=new Map(t);return s.delete(e),s})},[]),c=(0,s.useCallback)(()=>{o(sN),a(null)},[]),u=(0,s.useCallback)(async(t,s,n,l)=>{let c=l?.fileChangeId??"",u=l?.scope??(c?i.FileDecisionScope.FILE:i.FileDecisionScope.CHANGE_SET),g=sw(s,c||void 0);r(e=>{let t=new Set(e);return t.add(g),t}),d(g),a(null);try{let r=(0,sy.create)(sC.SubmitFileDecisionInputSchema,{agentExecutionId:t,changeSetId:s,scope:u,fileChangeId:c,action:n,expectedDigest:l?.expectedDigest??"",reason:l?.reason??"",acknowledgeUnreviewable:l?.acknowledgeUnreviewable??!1});await e.agentExecution.submitFileDecision(r)}catch(t){let e=(0,sk.toError)(t);throw o(t=>new Map(t).set(g,e)),a(e),t}finally{r(e=>{let t=new Set(e);return t.delete(g),t})}},[e,d]);return(0,s.useMemo)(()=>({submitFileDecision:u,submittingDecisionKeys:t,decisionErrors:n,clearDecisionError:d,error:l,clearError:c}),[u,t,n,d,l,c])}],565621);let sT=new Set,sE=new Map,sS=(0,s.memo)(function({fileChangeSet:e,onSubmit:n,submittingDecisionKeys:o=sT,decisionErrors:l=sE,interactive:a=!0,showDiffs:d=!0,className:c}){var u,g,p,x;let f,b=e.changes,v=b.length,j=e.id,y=(0,s.useMemo)(()=>(function(e){let t=new Map;for(let s of e)s.scope===i.FileDecisionScope.FILE&&s.fileChangeId&&t.set(s.fileChangeId,s.action);return t})(e.decisions),[e.decisions]),C=y.size,k=(0,s.useMemo)(()=>m(e),[e]),w=function(e){switch(e.diffCompleteness){case i.DiffCompleteness.COMPLETE:return"complete";case i.DiffCompleteness.BINARY_SUMMARY_ONLY:return"binary-only";default:return"blocked"}}(e),N="complete"!==w,T="binary-only"===w,E=v>1||N,S=v>1||!N,[A,L]=(0,s.useState)(()=>a&&(N||C>0||v>1&&!d)),M=(0,s.useId)(),I=o.has(j),F=l.get(j)??null,[P,D]=(0,s.useState)(null);(0,s.useEffect)(()=>{I||D(null)},[I]);let R=(0,s.useCallback)(t=>{D(t),n?.(t,{scope:i.FileDecisionScope.CHANGE_SET,expectedDigest:e.aggregateDigest,acknowledgeUnreviewable:t===i.FileDecisionAction.APPROVE&&T})},[n,e.aggregateDigest,T]),_=(0,s.useCallback)((e,t)=>{n?.(t,{scope:i.FileDecisionScope.FILE,fileChangeId:e.id,expectedDigest:e.fileDigest,acknowledgeUnreviewable:t===i.FileDecisionAction.APPROVE&&"binary"===h(e).kind})},[n]),O=(0,s.useMemo)(()=>{let e=0,t=0;for(let s of b)e+=s.linesAdded,t+=s.linesRemoved;return{additions:e,deletions:t}},[b]),K=(0,s.useMemo)(()=>{let e=!1,t=!1;for(let s of b){let r=h(s);"binary"===r.kind?e=!0:"unavailable"===r.kind&&(t=!0)}return{hasBinary:e,hasUnavailable:t}},[b]),B=(0,s.useId)(),$=(u=v,g=C,f=T?"Keep":"Approve",u<=1?{approve:f,reject:"Reject"}:g>0&&g<u?{approve:`${f} remaining`,reject:"Reject remaining"}:{approve:`${f} all`,reject:"Reject all"}),W=!a&&e.decisions.some(e=>e.origin===i.FileDecisionOrigin.POLICY_APPROVED_COMMAND),H=a?`${v} file${1===v?"":"s"} awaiting review`:W?"Kept automatically — produced by a command you approved":function(e,t,s){let r=0,n=0;for(let e of t){let t=s.get(e.id);t===i.FileDecisionAction.APPROVE?r++:t===i.FileDecisionAction.REJECT&&n++}let o=e-r-n;if(0===r&&0===n)return`${e} file${1===e?"":"s"} changed`;let l=[];return r>0&&l.push(`${r} kept`),n>0&&l.push(`${n} discarded`),o>0&&l.push(`${o} not reviewed`),l.join(" · ")}(v,b,k);return(0,t.jsxs)("div",{role:a?"alert":"group","aria-label":a?`Review ${v} file change${1===v?"":"s"}`:`${v} file change${1===v?"":"s"}`,className:(0,r.cn)("stg:rounded-lg stg:border stg:border-border-prominent",a&&"stg:border-l-2 stg:border-l-warning",c),children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:gap-2 stg:px-2.5 stg:py-1.5 stg:text-xs",children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:font-medium stg:text-foreground",children:a?"Review file changes":"File changes"}),(0,t.jsxs)("span",{className:"stg:flex stg:min-w-0 stg:flex-1 stg:items-center stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:min-w-0 stg:truncate stg:text-muted-foreground",children:H}),(0,t.jsx)(sf,{linesAdded:O.additions,linesRemoved:O.deletions})]}),a&&S&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(t_,{label:$.approve,variant:"primary",onClick:()=>R(i.FileDecisionAction.APPROVE),isActive:P===i.FileDecisionAction.APPROVE,isSubmitting:I,disabled:N&&!T,ariaDescribedby:N?B:void 0,cursorTarget:"file-review-approve"}),(0,t.jsx)(t_,{label:$.reject,variant:"danger",onClick:()=>R(i.FileDecisionAction.REJECT),isActive:P===i.FileDecisionAction.REJECT,isSubmitting:I,cursorTarget:"file-review-reject"})]}),(0,t.jsxs)("button",{type:"button","aria-expanded":A,"aria-controls":M,onClick:()=>L(e=>!e),"data-cursor-target":"file-review-expander",className:(0,r.cn)("stg:inline-flex stg:shrink-0 stg:items-center stg:gap-1 stg:rounded-md stg:border stg:border-border stg:px-2 stg:py-1","stg:text-xs stg:font-medium stg:text-muted-foreground stg:transition-colors","stg:hover:bg-accent-hover stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:[A?"Hide":a?d?"Review":"Files":"Show",(0,t.jsx)(sA,{expanded:A})]})]}),a&&N&&S&&(0,t.jsx)("p",{id:B,className:"stg:px-2.5 stg:pb-1.5 stg:text-[11px] stg:italic stg:text-muted-foreground",children:(p=E,x=K,T?p?"This set includes binary files with no text diff. Keep all keeps every file as-is (their exact bytes are applied), or decide each file below.":"This is a binary change with no text diff. Keep it as-is (its exact bytes are applied) or discard it.":p?x.hasUnavailable?"Part of this change isn't available to review, so the whole set can't be approved — keep the reviewable files and discard the rest.":x.hasBinary?"This set includes a binary change with no text diff, so it can't be approved at once — decide each file below (keep the reviewable ones; keep or discard the binary).":"Some files can't be reviewed completely, so the whole set can't be approved at once — keep the reviewable files and discard the rest.":x.hasUnavailable?"This change isn't available to review, so it can't be approved — it can only be discarded.":x.hasBinary?"This is a binary change with no text diff, so it can't be approved as a complete change — it can only be discarded.":"This change can't be reviewed completely, so it can't be approved as a complete change.")}),a&&F&&(0,t.jsx)("div",{className:"stg:px-2.5 stg:pb-1.5",children:(0,t.jsx)(tO,{error:F,leadIn:"submit decision",cursorTarget:"file-review-error"})}),A&&(0,t.jsxs)("div",{id:M,className:"stg:space-y-2 stg:border-t stg:border-border-muted stg:px-3 stg:py-2.5",children:[d&&(0,t.jsx)(sj.DiffSummary,{fileCount:v,additions:O.additions,deletions:O.deletions}),a?E?b.map(e=>(0,t.jsx)(sL,{change:e,verdict:y.get(e.id)??null,isSubmitting:o.has(sw(j,e.id))||I,error:l.get(sw(j,e.id))??null,onDecide:_,showDiffs:d},e.id)):b.map(e=>d?(0,t.jsxs)("div",{className:"stg:space-y-1.5",children:[(0,t.jsx)(sB,{change:e}),(0,t.jsx)(sI,{change:e})]},e.id):(0,t.jsx)(sF,{change:e},e.id)):b.map(e=>(0,t.jsx)(sM,{change:e,verdict:k.get(e.id)??null,showDiffs:d},e.id)),a&&E&&(0,t.jsx)(sW,{decided:C,total:v})]})]})});function sA({expanded:e}){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:(0,r.cn)("stg:shrink-0 stg:transition-transform stg:duration-150",e&&"stg:rotate-90"),"aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3.5 2L6.5 5L3.5 8"})})}let sL=(0,s.memo)(function({change:e,verdict:r,isSubmitting:n,error:i,onDecide:o,showDiffs:l}){let a=h(e),d="reviewable"!==a.kind,c=(0,s.useId)(),u=(0,t.jsx)(sD,{change:e,reviewability:a,verdict:r,isSubmitting:n,onDecide:o,describedById:d?c:void 0});return(0,t.jsxs)("div",{className:"stg:space-y-1.5",children:[l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(sB,{change:e}),(0,t.jsx)(sI,{change:e}),u]}):(0,t.jsx)(sF,{change:e,trailing:u}),d&&(0,t.jsx)(s$,{reviewability:a,id:c}),i&&(0,t.jsx)(tO,{error:i,leadIn:"save",cursorTarget:"file-review-file-error"})]})}),sM=(0,s.memo)(function({change:e,verdict:s,showDiffs:r}){return r?(0,t.jsxs)("div",{className:"stg:space-y-1.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)(sB,{change:e}),(0,t.jsx)(sP,{verdict:s})]}),(0,t.jsx)(sI,{change:e})]}):(0,t.jsx)(sF,{change:e,trailing:(0,t.jsx)(sP,{verdict:s})})});function sI({change:e}){let r=(0,s.useMemo)(()=>(0,u.toDisplayFileChange)(e),[e]);return(0,t.jsx)(p.FileChangeDiff,{change:r,bounded:!0})}function sF({change:e,trailing:s}){let r=e.pathAfter||e.pathBefore,n=e.kind===i.FileChangeKind.RENAME&&e.pathBefore!==e.pathAfter?e.pathBefore:"";return(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:gap-x-2 stg:gap-y-1","data-cursor-target":"file-review-list-row",children:[(0,t.jsx)(sv,{kind:e.kind}),n&&(0,t.jsxs)("span",{className:"stg:min-w-0 stg:truncate stg:font-mono stg:text-xs stg:text-muted-foreground-faint",children:[n," → "]}),(0,t.jsx)(eA.FilePathLink,{path:r,dirDisplay:"dim",className:"stg:min-w-0 stg:flex-1 stg:text-xs"}),(0,t.jsx)(sf,{linesAdded:e.linesAdded,linesRemoved:e.linesRemoved}),(0,t.jsx)(sB,{change:e}),s]})}function sP({verdict:e}){return e===i.FileDecisionAction.APPROVE?(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-[11px] stg:font-medium stg:text-diff-added-fg",children:"Kept"}):e===i.FileDecisionAction.REJECT?(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-[11px] stg:font-medium stg:text-diff-removed-fg",children:"Discarded"}):(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-[11px] stg:italic stg:text-muted-foreground",children:"Not reviewed"})}function sD({change:e,reviewability:r,verdict:n,isSubmitting:o,onDecide:l,describedById:a}){let[d,c]=(0,s.useState)(null);(0,s.useEffect)(()=>{o||c(null)},[o]);let u=d??n,g=e.pathAfter||e.pathBefore,p="binary"===r.kind,h="unavailable"===r.kind,m=p?`Keep ${g} anyway (binary — no text diff)`:`Keep ${g}`,x=(0,s.useCallback)(t=>{o||(c(t),l(e,t))},[o,l,e]);return(0,t.jsxs)("div",{role:"radiogroup","aria-label":`Decision for ${g}`,"aria-describedby":a,className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,t.jsx)(sO,{label:p?"Keep anyway":"Keep",accessibleLabel:m,tone:"keep",selected:u===i.FileDecisionAction.APPROVE,busy:o&&d===i.FileDecisionAction.APPROVE,disabled:o||h,onClick:()=>x(i.FileDecisionAction.APPROVE)}),(0,t.jsx)(sO,{label:"Discard",accessibleLabel:`Discard ${g}`,tone:"discard",selected:u===i.FileDecisionAction.REJECT,busy:o&&d===i.FileDecisionAction.REJECT,disabled:o,onClick:()=>x(i.FileDecisionAction.REJECT)})]})}let sR=(0,r.cn)("stg:inline-flex stg:items-center stg:justify-center stg:gap-1.5 stg:rounded-md stg:border stg:px-2.5 stg:py-1","stg:text-xs stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:ring-offset-2","stg:disabled:cursor-not-allowed stg:disabled:opacity-50"),s_={keep:"stg:border-success stg:bg-success-subtle stg:text-success",discard:"stg:border-destructive stg:bg-destructive-subtle stg:text-destructive"};function sO({label:e,accessibleLabel:s,tone:n,selected:i,busy:o,disabled:l,onClick:a}){return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":i,"aria-label":s,disabled:l,onClick:a,"data-cursor-target":`file-review-${n}`,className:(0,r.cn)(sR,i?s_[n]:"stg:border-border stg:text-muted-foreground stg:hover:bg-accent-hover stg:hover:text-foreground"),children:[o?(0,t.jsx)(d.SpinnerIcon,{}):null,e]})}let sK={[i.FileCaptureClass.GIT_IGNORED_CAPTURED]:{label:"gitignored",aria:"This file is ignored by git; the change was captured for review"},[i.FileCaptureClass.NON_GIT_CAS]:{label:"outside git",aria:"This file is outside the git repository; the change was captured for review"}};function sB({change:e}){let s=sK[e.captureClass];return s?(0,t.jsx)("span",{className:"stg:inline-flex stg:w-fit stg:items-center stg:rounded stg:border stg:border-border stg:bg-muted-subtle stg:px-1.5 stg:py-0.5 stg:text-[11px] stg:font-medium stg:text-muted-foreground","aria-label":s.aria,"data-cursor-target":"file-review-capture",children:s.label}):null}function s$({reviewability:e,id:s}){let r=function(e){switch(e.kind){case"binary":return"Binary file — no text diff to review. Keep it as-is (its exact bytes are applied) or discard it.";case"unavailable":switch(e.reason){case"secret":return"Contents withheld — this path looks like a secret, so it was never captured for review and can only be discarded.";case"size":return"Diff too large to display — the full contents were elided to stay within limits, so this change can only be discarded.";default:return"The full diff isn't available to review, so this change can only be discarded."}default:return null}}(e);return r?(0,t.jsx)("p",{id:s,className:"stg:text-[11px] stg:italic stg:text-muted-foreground","data-cursor-target":"file-review-block-reason",children:r}):null}function sW({decided:e,total:s}){return(0,t.jsxs)("p",{role:"status",className:"stg:text-[11px] stg:text-muted-foreground",children:[e," of ",s," files reviewed",e>0&&e<s&&" — decide the rest to continue"]})}e.s(["FileReviewCard",0,sS],372063);var sH=e.i(635025);let sU=(0,s.memo)(function({event:e,className:s}){var n;let i=Math.round(100*e.compressionRatio),o=!e.model;return(0,t.jsxs)("div",{role:"status","aria-label":"Context compacted",className:(0,r.cn)("stg:mx-4 stg:flex stg:items-center stg:gap-3 stg:rounded-md stg:border stg:border-border/50","stg:bg-muted/30 stg:px-3 stg:py-2",s),children:[(0,t.jsx)(sV,{}),(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:flex-1 stg:flex-col stg:gap-0.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-1.5 stg:text-xs stg:font-medium stg:text-muted-foreground",children:[(0,t.jsx)("span",{children:o?"Detected context compaction":"Context compacted"}),e.timestamp&&(0,t.jsx)("time",{dateTime:e.timestamp,className:"stg:ml-auto stg:tabular-nums stg:text-muted-foreground/70",children:function(e){try{return new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}catch{return e}}(e.timestamp)})]}),(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:gap-x-2 stg:text-xs stg:tabular-nums stg:text-muted-foreground/80",children:[(0,t.jsxs)("span",{children:[(0,sH.formatTokenCount)(e.tokensBefore)," → ",(0,sH.formatTokenCount)(e.tokensAfter)," tokens"]}),(0,t.jsx)("span",{className:"stg:text-muted-foreground/50",children:"·"}),(0,t.jsxs)("span",{children:[i,"% reduction"]}),e.durationMs>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"stg:text-muted-foreground/50",children:"·"}),(0,t.jsx)("span",{children:(n=e.durationMs)<1e3?`${n}ms`:`${(n/1e3).toFixed(1)}s`})]}),e.model&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"stg:text-muted-foreground/50",children:"·"}),(0,t.jsx)("span",{children:e.model})]}),e.costUsd>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"stg:text-muted-foreground/50",children:"·"}),(0,t.jsxs)("span",{children:["$",e.costUsd<.01?e.costUsd.toFixed(4):e.costUsd.toFixed(2)]})]})]})]})]})});function sV(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground/70","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 2v4l4-2-4-2zM12 14v-4l-4 2 4 2z"}),(0,t.jsx)("path",{d:"M4 8h8"})]})}function sG(e,t){return(0,s.useCallback)(s=>{e&&!t&&"Enter"===s.key&&(s.metaKey||s.ctrlKey)&&(s.preventDefault(),e())},[e,t])}e.s(["SummarizationCard",0,sU],24669),e.s(["useBuildFromPlanHotkey",0,sG],596639);let sz=(0,s.memo)(function({onImplement:e,disabled:s,className:n}){let i=sG(e,s);return e?(0,t.jsxs)("div",{role:"status","aria-label":"Plan complete",onKeyDown:i,className:(0,r.cn)("stg:mx-4 stg:flex stg:items-center stg:gap-3 stg:rounded-md stg:border stg:border-border-muted","stg:bg-muted-faint stg:px-3 stg:py-2.5",n),children:[(0,t.jsx)(sq,{}),(0,t.jsx)("span",{className:"stg:min-w-0 stg:flex-1 stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Plan complete — ready to build?"}),(0,t.jsxs)("button",{type:"button",disabled:s,onClick:e,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5","stg:text-xs stg:font-medium stg:transition-colors","stg:bg-primary stg:text-primary-foreground","stg:hover:bg-primary-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:[(0,t.jsx)(sJ,{}),"Build"]})]}):null});function sq(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground/70","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M3 4h10M3 8h7M3 12h8"}),(0,t.jsx)("path",{d:"M12.5 10.5l1.5 1.5-1.5 1.5"})]})}function sJ(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2 6h8M7 3l3 3-3 3"})})}e.s(["PlanCompletionCard",0,sz],212823)},931442,953647,710419,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(188482),i=e.i(415400),o=e.i(432814),l=e.i(891287),a=e.i(261024),d=e.i(586108),c=e.i(326283),u=e.i(835992),g=e.i(596639);let p=(0,s.memo)(function({executionId:e,artifact:n,title:p,org:y,onImplement:C,onOpenPlan:k,disabled:w,buildPending:N,className:T}){let[E,S]=(0,s.useState)(!1),A=(0,g.useBuildFromPlanHotkey)(C,w),{copy:L,isCopying:M,copied:I}=function(e){let t=(0,d.useStigmer)(),[r,n]=(0,s.useState)(!1),[i,o]=(0,s.useState)(!1),[u,g]=(0,s.useState)(null),p=(0,s.useRef)(null);(0,s.useEffect)(()=>()=>{null!==p.current&&clearTimeout(p.current)},[]);let h=(0,s.useCallback)(async s=>{if(e&&s&&!r){n(!0),g(null);try{let r=await t.agentExecution.getArtifactContent((0,l.create)(a.GetArtifactContentRequestSchema,{executionId:e,storageKey:s})),n=new TextDecoder().decode(r.content);await navigator.clipboard.writeText(n),o(!0),null!==p.current&&clearTimeout(p.current),p.current=setTimeout(()=>o(!1),2e3)}catch(e){g((0,c.toError)(e))}finally{n(!1)}}},[e,t,r]);return(0,s.useMemo)(()=>({copy:h,isCopying:r,copied:i,error:u}),[h,r,i,u])}(e),{download:F,isDownloading:P}=(0,u.useArtifactDownload)(e);return(0,t.jsxs)("div",{role:"region","aria-label":"Plan",onKeyDown:A,className:(0,r.cn)("stg:mx-4 stg:flex stg:flex-wrap stg:items-center stg:gap-x-3 stg:gap-y-2 stg:rounded-lg","stg:border stg:border-border-muted stg:bg-card stg:px-3 stg:py-2.5",T),children:[(0,t.jsx)(m,{}),(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1 stg:basis-48",children:[(0,t.jsx)("div",{className:"stg:truncate stg:text-sm stg:font-medium stg:text-foreground",children:p??"Plan"}),(0,t.jsxs)("div",{className:"stg:text-[0.65rem] stg:text-muted-foreground-faint",children:[n.name,(0,t.jsx)("span",{"aria-hidden":"true",children:" · "}),(0,t.jsx)("span",{className:"stg:tabular-nums",children:(0,o.formatArtifactSize)(n.sizeBytes)})]})]}),(0,t.jsxs)("div",{className:"stg:ml-auto stg:flex stg:flex-wrap stg:items-center stg:gap-x-1.5 stg:gap-y-1.5",children:[k?(0,t.jsx)(h,{label:"Open plan",onClick:k,icon:(0,t.jsx)(j,{})}):y&&(0,t.jsx)(h,{label:"Open plan",onClick:()=>S(!0),icon:(0,t.jsx)(j,{})}),(0,t.jsx)(h,{label:I?"Copied":M?"Copying…":"Copy plan",onClick:()=>L(n.storageKey),disabled:M,icon:I?(0,t.jsx)(v,{}):(0,t.jsx)(b,{})}),(0,t.jsx)(h,{label:P?"Preparing…":`Download ${n.name}`,onClick:()=>F(n.storageKey,n.name),disabled:P,icon:(0,t.jsx)(f,{})}),C&&(0,t.jsxs)("button",{type:"button",disabled:w,onClick:C,className:(0,r.cn)("stg:ml-1.5 stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5","stg:text-xs stg:font-medium stg:transition-colors","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:[(0,t.jsx)(x,{}),N?"Starting build…":"Build"]})]}),(0,t.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"stg:sr-only",children:I&&"Plan copied to clipboard"}),y&&E&&(0,t.jsx)(i.ArtifactPreviewModal,{artifact:n,executionId:e,org:y,isTerminal:!0,open:!0,onClose:()=>S(!1),onImplement:C})]})});function h({label:e,onClick:s,icon:i,disabled:o}){return(0,t.jsxs)(n.Tooltip,{children:[(0,t.jsx)(n.TooltipTrigger,{render:(0,t.jsx)("span",{className:"stg:inline-flex"}),children:(0,t.jsx)("button",{type:"button","aria-label":e,onClick:s,disabled:o,className:(0,r.cn)("stg:inline-flex stg:items-center stg:rounded-md stg:p-1.5 stg:text-muted-foreground","stg:transition-colors stg:hover:bg-muted stg:hover:text-foreground","stg:disabled:pointer-events-none stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:rounded-sm"),children:i})}),(0,t.jsx)(n.TooltipContent,{side:"top",children:e})]})}function m(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground-faint","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M3 4h10M3 8h7M3 12h8"}),(0,t.jsx)("path",{d:"M12.5 10.5l1.5 1.5-1.5 1.5"})]})}function x(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2 6h8M7 3l3 3-3 3"})})}function f(){return(0,t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M6 1.5V8.5"}),(0,t.jsx)("path",{d:"M3 6L6 9L9 6"}),(0,t.jsx)("path",{d:"M2 10.5H10"})]})}function b(){return(0,t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"4",y:"4",width:"6.5",height:"6.5",rx:"1"}),(0,t.jsx)("path",{d:"M8 4V2.5C8 1.95 7.55 1.5 7 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V7C1.5 7.55 1.95 8 2.5 8H4"})]})}function v(){return(0,t.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-success","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2 6.5L4.5 9L10 3"})})}function j(){return(0,t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M1.5 8S4 3.5 8 3.5s6.5 4.5 6.5 4.5-2.5 4.5-6.5 4.5S1.5 8 1.5 8Z"}),(0,t.jsx)("circle",{cx:"8",cy:"8",r:"1.75"})]})}e.s(["PlanArtifactCard",0,p],931442);let y=(0,s.memo)(function({title:e,sizeBytes:s,onOpenPlan:n,className:i}){return(0,t.jsxs)("div",{role:"region","aria-label":"Plan being written","aria-busy":"true",className:(0,r.cn)("stg:mx-4 stg:flex stg:flex-wrap stg:items-center stg:gap-x-3 stg:gap-y-2 stg:rounded-lg","stg:border stg:border-border-muted stg:bg-card stg:px-3 stg:py-2.5",i),children:[(0,t.jsx)(C,{className:"stg:animate-pulse"}),(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1 stg:basis-48",children:[(0,t.jsx)("div",{className:"stg:truncate stg:text-sm stg:font-medium stg:text-foreground",children:e??"Writing plan…"}),(0,t.jsxs)("div",{className:"stg:text-[0.65rem] stg:text-muted-foreground-faint",children:[(0,t.jsx)("span",{role:"status",children:"Writing…"}),(0,t.jsx)("span",{"aria-hidden":"true",children:" · "}),(0,t.jsx)("span",{className:"stg:tabular-nums",children:(0,o.formatArtifactSize)(s)})]})]}),n&&(0,t.jsxs)("button",{type:"button",onClick:n,className:(0,r.cn)("stg:ml-auto stg:inline-flex stg:items-center stg:gap-1 stg:text-xs stg:font-medium stg:text-muted-foreground stg:transition-colors stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:rounded-sm"),children:[(0,t.jsx)(k,{}),"Open plan"]})]})});function C({className:e}){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:(0,r.cn)("stg:shrink-0 stg:text-muted-foreground-faint",e),"aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M3 4h10M3 8h7M3 12h8"}),(0,t.jsx)("path",{d:"M12.5 10.5l1.5 1.5-1.5 1.5"})]})}function k(){return(0,t.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M1.5 8S4 3.5 8 3.5s6.5 4.5 6.5 4.5-2.5 4.5-6.5 4.5S1.5 8 1.5 8Z"}),(0,t.jsx)("circle",{cx:"8",cy:"8",r:"1.75"})]})}e.s(["PlanStreamingCard",0,y],953647);var w=e.i(661438),N=e.i(282838),T=e.i(770166),E=e.i(145831);let S=(0,s.memo)(function({todos:e,className:n,TodoRow:i}){(0,N.useRenderTracer)("TodoCard",{todos:e});let o=Object.keys(e).length,l=null!=(0,E.findActiveTodo)(e),a=(0,E.todoCompletionSummary)(e),d=(0,s.useMemo)(()=>o>0&&Object.values(e).every(e=>e.status===w.TodoStatus.TODO_COMPLETED||e.status===w.TodoStatus.TODO_CANCELLED),[e,o]),[c,u]=(0,T.useAutoDisclosure)(l);return 0===o?null:(0,t.jsxs)("div",{role:"region","aria-label":"Agent to-dos","data-cursor-target":"todo-card",className:(0,r.cn)("stg:rounded-lg stg:border stg:border-border-prominent stg:overflow-hidden",n),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":c,onClick:u,className:(0,r.cn)("stg:flex stg:w-full stg:cursor-pointer stg:items-center stg:gap-2 stg:px-2.5 stg:py-1.5 stg:text-left stg:text-xs stg:text-muted-foreground stg:transition-colors","stg:hover:bg-muted-subtle","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring"),children:[(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0",d?"stg:text-success":"stg:text-muted-foreground"),"aria-hidden":"true",children:(0,t.jsx)(A,{})}),(0,t.jsx)("span",{className:"stg:min-w-0 stg:flex-1 stg:truncate stg:font-medium stg:text-foreground",children:"To-dos"}),a&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:tabular-nums stg:text-muted-foreground",children:a}),(0,t.jsx)(L,{expanded:c})]}),c&&(0,t.jsx)("div",{className:"stg:border-t stg:border-border-muted stg:px-2.5 stg:py-2",children:(0,t.jsx)(E.TodoList,{todos:e,TodoRow:i})})]})},function(e,t){return e.todos===t.todos&&e.className===t.className&&e.TodoRow===t.TodoRow});function A(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M2 3h8M2 6h6M2 9h7"})})}function L({expanded:e}){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:(0,r.cn)("stg:shrink-0 stg:text-muted-foreground stg:transition-transform stg:duration-150",e&&"stg:rotate-90"),"aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3.5 2L6.5 5L3.5 8"})})}e.s(["TodoCard",0,S],710419)},226634,341698,793322,283393,122801,480751,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(891287),n=e.i(522017),i=e.i(661438),o=e.i(130460),l=e.i(445726),a=e.i(893976),d=e.i(574803),c=e.i(664857),u=e.i(430777),g=e.i(827497),p=e.i(574100),h=e.i(741690),m=e.i(340021),x=e.i(654997),f=e.i(855328),b=e.i(3115),v=e.i(372063),j=e.i(24669),y=e.i(212823),C=e.i(931442),k=e.i(953647),w=e.i(710419),N=e.i(848681);let T=/^(`{3,})(?:markdown|md)?[ \t]*\r?\n/,E=/^#[ \t]/;function S(e){if(e?.spec?.executionConfig?.interactionMode!==i.InteractionMode.PLAN)return;let t=e.status?.phase;if(void 0===t||(0,d.isTerminalPhase)(t))return;let s=e.status?.messages??[];for(let e=s.length-1;e>=0;e--){let t=s[e];if(t.type!==i.MessageType.MESSAGE_AI||0===t.content.trim().length)continue;let r=function(e){let t=e.trim(),s=T.exec(t);if(!s)return e;let r=t.slice(s[0].length),n=RegExp(`(?:^|\\r?\\n)${s[1]}[ \\t]*$`).exec(r);return n?r.slice(0,n.index):r}(t.content);return E.test(r.trimStart())?{messageIndex:e,displayText:r}:void 0}}e.s(["findStreamingPlan",0,S],341698);var A=e.i(403497),L=e.i(6486),M=e.i(926472),I=e.i(890965),F=e.i(347279),P=e.i(61855),D=e.i(282838),R=e.i(309504);function _(e,t){let r=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(!(0,R.isPerfLoggingEnabled)()||(r.current+=1,r.current%10!=0))return;let s=e.current;if(!s)return;let n=()=>{let e=s.querySelectorAll("*").length;console.debug(`[stgm:perf:dom] ${t} nodes=${e}`)};if("function"==typeof requestIdleCallback){let e=requestIdleCallback(n);return()=>cancelIdleCallback(e)}let i=setTimeout(n,0);return()=>clearTimeout(i)})}e.s(["useDomNodeCount",0,_],793322);let O=0,K=(e,t,s,r)=>{((O+=1)%10==0||1===O)&&console.debug(`[stgm:perf:profiler] ${e} phase=${t} actualDuration=${s.toFixed(1)}ms baseDuration=${r.toFixed(1)}ms`)};function B({id:e,children:r}){return(0,R.isPerfLoggingEnabled)()?(0,t.jsx)(s.Profiler,{id:e,onRender:K,children:r}):r}e.s(["DevProfiler",0,B],283393);var $=e.i(106909),W=e.i(901982);function H({visible:e,count:s,onClick:r}){let n=1===s?"1 approval needed":`${s} approvals needed`;return(0,t.jsxs)("button",{type:"button",onClick:r,"aria-label":`${n} — jump to it`,"aria-hidden":!e,tabIndex:e?0:-1,className:(0,a.cn)("stg:absolute stg:bottom-3 stg:left-1/2 stg:z-10 stg:-translate-x-1/2","stg:flex stg:items-center stg:gap-1.5 stg:rounded-full","stg:border stg:border-warning/40 stg:bg-warning/10 stg:px-3 stg:py-1.5","stg:text-xs stg:font-medium stg:text-warning stg:shadow-md","stg:transition-[opacity,transform] stg:duration-[var(--stgm-motion-duration)]","stg:hover:bg-warning/20","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",e?"stg:pointer-events-auto stg:translate-y-0 stg:opacity-100":"stg:pointer-events-none stg:translate-y-2 stg:opacity-0"),children:[(0,t.jsx)(U,{}),n]})}function U(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.5"}),(0,t.jsx)("path",{d:"M6 3.5V6L7.5 7.5"})]})}function V({animate:e,children:r}){let[n,i]=(0,s.useState)(e),o=(0,s.useRef)(void 0),l=(0,s.useCallback)(()=>{i(!1),void 0!==o.current&&(clearTimeout(o.current),o.current=void 0)},[]),a=(0,s.useCallback)(e=>{void 0!==o.current&&(clearTimeout(o.current),o.current=void 0),e&&n&&(o.current=setTimeout(()=>{i(!1),o.current=void 0},300))},[n]);return n?(0,t.jsx)("div",{ref:a,className:"stgm-thread-item-enter",onAnimationEnd:l,children:r}):r}e.s(["ApprovalPeekBar",0,H],122801),e.s(["ThreadItemWrapper",0,V],480751);let G=(0,s.lazy)(()=>e.A(714587).then(e=>({default:e.VirtualizedThread}))),z=[],q=new Set,J=new Map;function Y(e){return null!=e&&(0,a.cn)("stg:w-full stg:max-w-3xl stg:px-4","center"===e&&"stg:mx-auto")}function X(e){let t=e.status?.messages;return!!t&&0!==t.length&&t.some(e=>!!(e.toolCalls.length>0)||e.type===i.MessageType.MESSAGE_AI&&!!(e.content.trim().length>0)||e.type===i.MessageType.MESSAGE_THINKING&&!!(e.content.trim().length>0))}function Z(e){return e.status?.phase===i.ExecutionPhase.EXECUTION_COMPLETED&&e.spec?.executionConfig?.interactionMode===i.InteractionMode.PLAN}function Q(e,t,s){for(let r of e)r.fileChangeSetId&&s.set(r.fileChangeSetId,t)}function ee({items:e,className:s,contentColumn:r,formatToolCallSummary:n,onApprovalSubmit:i,submittingApprovalIds:o,approvalErrors:l,filePathCtx:d,sandboxCtx:c,approvalCtx:u,fileReviewCtx:g,unresolvedApprovalCount:p,onBuildFromPlan:h,onOpenPlan:m,org:x,planActionsDisabled:f,planBuildPending:b,onRetrySend:v,onRetryExecution:j,onEditMessage:y,slots:C,pinToLatestSignal:k}){let{scrollRef:w,sentinelRef:N,contentRef:T,isFollowing:E,jumpToLatest:S}=(0,$.useAutoScroll)();return(0,$.usePinToLatestOnSignal)(k,S),_(w,"MessageThread"),(0,t.jsxs)("div",{className:(0,a.cn)("stg:relative stg:min-h-0",s),children:[(0,t.jsxs)("div",{ref:w,role:"log","aria-live":"polite","aria-relevant":"additions",className:(0,a.cn)("stg:h-full stg:overflow-y-auto stg:pt-6 stg:pb-4 stg:[overflow-anchor:none]","stg:[scrollbar-width:thin] stg:[scrollbar-color:var(--color-border)_transparent]","stg:[&::-webkit-scrollbar]:w-1.5","stg:[&::-webkit-scrollbar-track]:bg-transparent","stg:[&::-webkit-scrollbar-thumb]:rounded-full stg:[&::-webkit-scrollbar-thumb]:bg-border/40"),children:[(0,t.jsx)(M.SandboxContext.Provider,{value:c,children:(0,t.jsx)(L.FilePathContext.Provider,{value:d,children:(0,t.jsx)(I.ApprovalContext.Provider,{value:u,children:(0,t.jsx)(F.FileReviewContext.Provider,{value:g,children:(0,t.jsx)(B,{id:"MessageThread",children:(0,t.jsx)("div",{ref:T,className:(0,a.cn)("stg:flex stg:flex-col stg:gap-4",Y(r)),children:e.map(e=>(0,t.jsx)(V,{animate:!0,children:(0,t.jsx)(et,{item:e,formatToolCallSummary:n,onApprovalSubmit:i,submittingApprovalIds:o,approvalErrors:l,onBuildFromPlan:h,onOpenPlan:m,org:x,planActionsDisabled:f,planBuildPending:b,onRetrySend:v,onRetryExecution:j,onEditMessage:y,slots:C})},e.key))})})})})})}),(0,t.jsx)("div",{ref:N,"aria-hidden":"true"})]}),(0,t.jsx)(W.JumpToLatestButton,{onClick:S,visible:!E&&0===p}),(0,t.jsx)(H,{visible:!E&&p>0,count:p,onClick:S})]})}function et({item:e,formatToolCallSummary:s,onApprovalSubmit:r,submittingApprovalIds:n,approvalErrors:i,onBuildFromPlan:o,onOpenPlan:l,org:a,planActionsDisabled:d,planBuildPending:v,onRetrySend:N,onRetryExecution:T,onEditMessage:E,slots:S}){switch(e.kind){case"message":{let s=S?.MessageEntry??c.MessageEntry;if(e.isFailed)return(0,t.jsx)(es,{message:e.message,attachments:e.attachments,onRetry:N,MessageEntryComponent:s});return(0,t.jsx)(s,{message:e.message,className:e.isPending?"stg:opacity-70":void 0,isPlanDocument:e.isPlanDocument,interactionMode:e.interactionMode,attachments:e.attachments,executionId:e.executionId,onEdit:e.isEditable&&E?()=>E(e.message.content):void 0})}case"tool-group":return(0,t.jsx)(u.ToolCallGroup,{toolCalls:e.toolCalls,subAgentExecutions:e.subAgentExecutions,formatSummary:s,className:"stg:mx-4"});case"sub-agent":return(0,t.jsx)(g.SubAgentSection,{subAgentExecution:e.subAgentExecution,className:"stg:mx-4"});case"phase-badge":return(0,t.jsx)("div",{className:"stg:flex stg:justify-center stg:py-3",children:(0,t.jsx)(p.ExecutionPhaseBadge,{phase:e.phase})});case"execution-error":{let s=S?.ExecutionErrorNotice??b.ExecutionErrorNotice;return(0,t.jsx)(s,{error:e.error,retryMessage:e.retryMessage,onRetry:T})}case"approval-request":return(0,t.jsx)(er,{pendingApproval:e.pendingApproval,onApprovalSubmit:r,isSubmitting:n?.has(e.pendingApproval.toolCallId)??!1,error:i?.get(e.pendingApproval.toolCallId)??null,ApprovalCardComponent:S?.ApprovalCard??f.ApprovalCard});case"file-review-record":return(0,t.jsx)(en,{fileChangeSet:e.fileChangeSet});case"setup-progress":{let s=S?.SetupProgress??h.SetupProgress;return(0,t.jsx)(s,{workspaceEntries:e.workspaceEntries,serverPhase:e.serverPhase,isAwaitingResponse:e.isAwaitingResponse})}case"recalled-memories":{let s=S?.RecalledMemoriesCard??m.RecalledMemoriesCard;return(0,t.jsx)(s,{report:e.report,facts:e.facts})}case"context-compacted":return(0,t.jsx)(j.SummarizationCard,{event:e.event});case"liveness":{let e=S?.LivenessStatusLine??x.LivenessStatusLine;return(0,t.jsx)(e,{})}case"todos":{let s=S?.TodoCard??w.TodoCard;return(0,t.jsx)(s,{todos:e.todos,className:"stg:mx-4",TodoRow:S?.TodoRow})}case"plan-completion":{let s=S?.PlanArtifactCard??C.PlanArtifactCard,r=S?.PlanCompletionCard??y.PlanCompletionCard;return e.planArtifact&&e.executionId?(0,t.jsx)(s,{executionId:e.executionId,artifact:e.planArtifact,title:e.planTitle,org:a,onImplement:e.isLatestPlan?o:void 0,onOpenPlan:l?()=>l(e.executionId):void 0,disabled:d,buildPending:v}):(0,t.jsx)(r,{onImplement:e.isLatestPlan?o:void 0,disabled:d})}case"plan-writing":{let s=S?.PlanStreamingCard??k.PlanStreamingCard;return(0,t.jsx)(s,{title:e.planTitle,sizeBytes:e.planSize,onOpenPlan:l?()=>l(e.executionId):void 0})}}}function es({message:e,attachments:s,onRetry:r,MessageEntryComponent:n}){return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,t.jsx)(n,{message:e,attachments:s}),(0,t.jsxs)("div",{role:"alert",className:"stg:mx-4 stg:flex stg:items-center stg:gap-2 stg:text-xs stg:text-destructive",children:[(0,t.jsx)("span",{className:"stg:min-w-0 stg:flex-1 stg:truncate",children:"Couldn’t send."}),r&&(0,t.jsx)("button",{type:"button",onClick:r,className:"stg:shrink-0 stg:rounded stg:font-medium stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:"Retry"})]})]})}let er=(0,s.memo)(function({pendingApproval:e,onApprovalSubmit:r,isSubmitting:n,error:i=null,ApprovalCardComponent:o}){let l=(0,s.useCallback)((t,s)=>{r(e.toolCallId,t,s)},[r,e.toolCallId]);return(0,t.jsx)(o,{pendingApproval:e,onSubmit:l,isSubmitting:n,error:i,className:"stg:mx-4"})}),en=(0,s.memo)(function({fileChangeSet:e}){return(0,t.jsx)(v.FileReviewCard,{fileChangeSet:e,interactive:!1,showDiffs:!1,className:"stg:mx-4"})});e.s(["MessageThread",0,function({executions:e,activeStreamExecution:c,pendingUserMessage:u,pendingAttachments:g,pendingMessageFailed:p=!1,onRetrySend:h,scrollOnSend:m=!0,onRetryExecution:x,onEditMessage:f,className:b,formatToolCallSummary:v,onApprovalSubmit:j,submittingApprovalIds:y,approvalErrors:C,showFileReviewRecords:k=!1,workspaceEntries:w,onFilePathClick:T,sandboxWorkspaceRoot:E,summarizationEvents:L,virtualized:M=!1,onBuildFromPlan:I,onOpenPlan:F,org:_,planActionsDisabled:O,planBuildPending:K,contentColumn:B,slots:$}){(0,D.useRenderTracer)("MessageThread",{executions:e,activeStreamExecution:c});let W=null!=j,H=null!=f,U=null!=F,V=(0,s.useMemo)(()=>(function(e,t,s,a,c,u,g=!1,p=!1,h=!1,m=!1,x){let f=[],b=new Set,v=t?[...e.filter(e=>e.metadata?.id!==t.metadata?.id),t]:e,j=t?v.length-1:-1,y=null;for(let e=v.length-1;e>=0;e--)if(Z(v[e])){y=v[e].metadata?.id??`_e${e}`;break}let C=u?.length?[...u]:[],k=0;for(let e=0;e<v.length;e++){let t=v[e],a=t.metadata?.id??`_e${e}`,c=e===j,u=t.status?.messages??[],g=t.status?.subAgentExecutions??[],x=Z(t),L=x?function(e){for(let t=e.length-1;t>=0;t--){let s=e[t];if(s.type===i.MessageType.MESSAGE_AI&&s.content.trim().length>0)return t}return -1}(u):-1,M=x?(0,N.findPlanArtifact)(t):void 0,I=L>=0&&void 0!==M,F=m&&c?S(t):void 0,D=h?(0,o.displayFileChangeSets)(t.status):[],R=new Map,_=t.status?.todos,O=null!=_&&Object.keys(_).length>0,K=!1;function w(){!K&&O&&(K=!0,f.push({kind:"todos",executionId:a,todos:_,key:`${a}-todos`}))}let B=(0,l.syntheticUserPrompt)(t);if(B){let e=(0,r.create)(n.AgentMessageSchema);e.type=i.MessageType.MESSAGE_HUMAN,e.content=B;let o=c&&null!=s&&B===s,l=t.spec?.attachments;f.push({kind:"message",message:e,key:o?"pending-user-turn":`${a}-spec`,isEditable:c&&p,interactionMode:t.spec?.executionConfig?.interactionMode,attachments:l&&l.length>0?l:void 0,executionId:t.metadata?.id})}let $=t.status?.recalledMemoriesReport;$?.selectionActive&&f.push({kind:"recalled-memories",report:$,facts:t.spec?.recalledMemories?.facts??[],key:`${a}-recalled-memories`});for(let e=0;e<u.length;e++){let t=u[e];if(t.type===i.MessageType.MESSAGE_TOOL)continue;var T,E=t.timestamp;if(E&&0!==C.length)for(;k<C.length&&C[k].timestamp&&C[k].timestamp<=E;){let e=C[k];f.push({kind:"context-compacted",event:e,key:`compacted-${e.timestamp}`}),k++}(t.type!==i.MessageType.MESSAGE_AI||t.content.trim())&&(I&&e===L||e===F?.messageIndex||f.push({kind:"message",message:t,key:`${a}-m${e}`,isPlanDocument:!I&&e===L}),(t.type===i.MessageType.MESSAGE_AI||t.type===i.MessageType.MESSAGE_THINKING)&&w());let s=t.type===i.MessageType.MESSAGE_AI&&t.toolCalls.some(A.isCollapsedToolCall)?t.toolCalls.filter(e=>!(0,A.isCollapsedToolCall)(e)):t.toolCalls;if(t.type===i.MessageType.MESSAGE_AI&&s.length>0)if(w(),s.some(e=>"task"===e.name||(0,A.isInternalTool)(e.name))){let t=[],r=[];for(let e of s)if("task"===e.name){let t=g.find(t=>t.id===e.id);t&&r.push(t)}else(0,A.isInternalTool)(e.name)||t.push(e);if(t.length>0)for(let s of(f.push({kind:"tool-group",toolCalls:t,subAgentExecutions:g,key:`${a}-m${e}-tc`}),Q(t,f.length-1,R),t))s.id&&b.add(s.id);for(let e of r){f.push({kind:"sub-agent",subAgentExecution:e,key:`sa-${e.id}`});for(let t of e.messages)if(t.type===i.MessageType.MESSAGE_AI)for(let e of t.toolCalls)e.id&&!(0,A.isInternalTool)(e.name)&&b.add(e.id)}}else for(let t of(f.push({kind:"tool-group",toolCalls:s,subAgentExecutions:g,key:`${a}-m${e}-tc`}),Q(s,f.length-1,R),s))t.id&&b.add(t.id)}if(x){let e=a===y;(M||e)&&f.push({kind:"plan-completion",key:`${a}-plan-completion`,executionId:t.metadata?.id??"",planArtifact:M,planTitle:I?(T=u[L].content,(0,P.extractLeadingH1)((0,P.unwrapEnclosingMarkdownFence)(T,!0)).title??void 0):void 0,isLatestPlan:e})}else F&&f.push({kind:"plan-writing",key:`${a}-plan-completion`,executionId:t.metadata?.id??"",planTitle:(0,P.extractLeadingH1)(F.displayText).title??void 0,planSize:F.displayText.length});w(),D.length>0&&function(e,t,s,r){let n=[],o=[];for(let e of t){if(0===e.changes.length||!r&&e.status===i.FileChangeSetStatus.AWAITING_REVIEW)continue;let t={kind:"file-review-record",fileChangeSet:e,key:`file-review-${e.id}`},l=s.get(e.id);void 0!==l?n.push({index:l,item:t}):o.push(t)}n.sort((e,t)=>e.index-t.index);let l=0;for(let{index:t,item:s}of n)e.splice(t+1+l,0,s),l++;e.push(...o)}(f,D,R,(0,d.isTerminalPhase)(t.status?.phase??i.ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED))}for(;k<C.length;){let e=C[k];f.push({kind:"context-compacted",event:e,key:`compacted-${e.timestamp}`}),k++}let L=v[v.length-1],M=L?.status?.phase??i.ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED;if(t&&!X(t)){let e=M===i.ExecutionPhase.EXECUTION_PENDING||M===i.ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED,s=M===i.ExecutionPhase.EXECUTION_IN_PROGRESS;if(e){let e=t.status?.setupProgress?.currentPhase||void 0;f.push({kind:"setup-progress",workspaceEntries:c??[],serverPhase:e,key:"setup-progress"})}else s&&f.push({kind:"setup-progress",workspaceEntries:c??[],isAwaitingResponse:!0,key:"setup-progress"})}if((0,d.isTerminalPhase)(M)&&M!==i.ExecutionPhase.EXECUTION_COMPLETED){f.push({kind:"phase-badge",phase:M,key:`phase-${M}`});let e=L?.status?.error;if(e&&M!==i.ExecutionPhase.EXECUTION_CANCELLED){let t=L?.spec?.message,s=L?.spec?.executionConfig?.buildFromPlan===!0;f.push({kind:"execution-error",error:e,retryMessage:t&&"execute"!==t&&!s?t:void 0,key:`execution-error-${L?.metadata?.id??M}`})}}if(a){let e=L?.status?.pendingApprovals??[];for(let t=0;t<e.length;t++){let s=e[t];s.toolCallId&&b.has(s.toolCallId)||f.push({kind:"approval-request",pendingApproval:s,key:`approval-${s.toolCallId||t}`})}}if(t&&X(t)&&t.status?.phase===i.ExecutionPhase.EXECUTION_IN_PROGRESS&&(t.status.pendingApprovals?.length??0)===0&&!function(e){for(let t of e.status?.subAgentExecutions??[])if(t.status===i.SubAgentStatus.SUB_AGENT_IN_PROGRESS||t.status===i.SubAgentStatus.SUB_AGENT_PENDING)return!0;for(let t of e.status?.messages??[])for(let e of t.toolCalls)if(e.status===i.ToolCallStatus.TOOL_CALL_RUNNING)return!0;return!1}(t)&&f.push({kind:"liveness",key:"liveness-status"}),s&&!(!g&&L?.spec?.message===s)){let e=(0,r.create)(n.AgentMessageSchema);e.type=i.MessageType.MESSAGE_HUMAN,e.content=s,f.push({kind:"message",message:e,key:"pending-user-turn",isPending:!g,isFailed:g,attachments:x&&x.length>0?x:void 0})}return f})(e,c,u,W,w,L,p,H,k,U,g),[e,c,u,W,w,L,p,H,k,U,g]);!function(e){let t=(0,s.useRef)(null);if(!(0,R.isPerfLoggingEnabled)())return;let r=new Map;for(let t=0;t<e.length;t++){let s=r.get(e[t].key);void 0!==s?console.warn(`[stgm:perf:keys] Duplicate key "${e[t].key}" at indices ${s} and ${t} (${e[s].kind}, ${e[t].kind}). React will silently drop one.`):r.set(e[t].key,t)}let n=t.current;if(t.current=e,!n||0===n.length)return;let i=new Map;for(let e=0;e<n.length;e++)i.set(n[e].key,e);let o=new Set(r.keys()),l=[];for(let e of i.keys())o.has(e)||l.push(e);if(0===l.length)return;let a=0;for(let t of l){let s=i.get(t);if(s<e.length){let r=e[s];i.has(r.key)||(a++,console.warn(`[stgm:perf:keys] Key swap at index ${s}: "${t}" (${n[s].kind}) → "${r.key}" (${r.kind}). This causes React to unmount/remount the row.`))}}a>3&&console.warn(`[stgm:perf:keys] ${a} key swaps detected in a single render. Thread items may be using unstable keys.`)}(V);let[Y,et]=(0,s.useState)(0),es=(0,s.useRef)(!1);(0,s.useEffect)(()=>{let e=!!u;e&&!es.current&&et(e=>e+1),es.current=e},[u]);let er=m?Y:void 0,en=(0,s.useMemo)(()=>({workspaceEntries:w??[],onFilePathClick:T}),[w,T]),ei=(0,s.useMemo)(()=>({sandboxWorkspaceRoot:E??""}),[E]),eo=c??e[e.length-1],el=W?eo?.status?.pendingApprovals??z:z,ea=(0,s.useMemo)(()=>{let e=new Map;for(let t of el)t.toolCallId&&e.set(t.toolCallId,t);return e},[el]),ed=(0,s.useMemo)(()=>({approvalsByToolCallId:ea,onSubmit:j,submittingIds:y??q,errorsByToolCallId:C??J}),[ea,j,y,C]),ec=(0,s.useMemo)(()=>{let t=new Map;for(let s of c?[...e,c]:e)for(let e of(0,o.displayFileChangeSets)(s.status))t.set(e.id,e);return{changeSetsById:t}},[e,c]),eu=el.length;return M?(0,t.jsx)("div",{className:(0,a.cn)("stg:relative stg:min-h-0",b),children:(0,t.jsx)(s.Suspense,{fallback:null,children:(0,t.jsx)(G,{items:V,formatToolCallSummary:v,onApprovalSubmit:j,submittingApprovalIds:y,approvalErrors:C,filePathCtx:en,sandboxCtx:ei,approvalCtx:ed,fileReviewCtx:ec,unresolvedApprovalCount:eu,onBuildFromPlan:I,onOpenPlan:F,org:_,planActionsDisabled:O,planBuildPending:K,contentColumn:B,onRetrySend:h,onRetryExecution:x,onEditMessage:f,slots:$,pinToLatestSignal:er})})}):(0,t.jsx)(ee,{items:V,className:b,contentColumn:B,formatToolCallSummary:v,onApprovalSubmit:j,submittingApprovalIds:y,approvalErrors:C,filePathCtx:en,sandboxCtx:ei,approvalCtx:ed,fileReviewCtx:ec,unresolvedApprovalCount:eu,onBuildFromPlan:I,onOpenPlan:F,org:_,planActionsDisabled:O,planBuildPending:K,onRetrySend:h,onRetryExecution:x,onEditMessage:f,slots:$,pinToLatestSignal:er})},"ThreadItemRenderer",0,et,"threadContentColumnClass",0,Y],226634)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,201002,e=>{"use strict";var t=e.i(843476),n=e.i(271645);function o(e){(0,n.useEffect)(()=>{let{pathname:t,search:n,hash:o}=window.location,r=e(t.split("/").filter(Boolean));r&&window.location.replace(r+n+o)},[e])}let r="__placeholder__";function i(e){let t=e[1],n=e[2];return t&&n&&t!==r&&n!==r?`/library/workflows/${t}/${n}`:null}function l(e){let t=e[2];return t&&t!==r?`/executions/${t}`:null}function c(){return(0,t.jsx)("p",{className:"px-6 py-8 text-sm text-muted-foreground",children:"Redirecting…"})}e.s(["LegacyWorkflowDetailRedirect",0,function(){return o(i),(0,t.jsx)(c,{})},"LegacyWorkflowExecutionRedirect",0,function(){return o(l),(0,t.jsx)(c,{})}],201002)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,40890,e=>{"use strict";var c=e.i(324590);e.i(539927),e.s([],861987),e.i(861987),e.s(["createArchitectureServices",()=>c.createArchitectureServices],40890)}]);